Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "cmd=$(jq -r '.tool_input.command // \"\"'); if echo \"$cmd\" | grep -q 'gh pr create'; then git diff main...HEAD --name-only | grep -q 'CHANGELOG.md' || echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"CHANGELOG.md has not been updated on this branch.\",\"additionalContext\":\"STOP: Do not open the PR yet. CHANGELOG.md has not been modified on this branch. Per .claude/instructions.md, open CHANGELOG.md and add an entry under the ## [Unreleased] section describing the changes in this PR, then retry gh pr create.\"}}'; fi"
}
]
}
]
}
}
6 changes: 5 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
"Bash(./gradlew:*)",
"Bash(./gradlew build:*)",
"Bash(gh pr *)",
"Bash(gh issue *)"
"Bash(gh issue *)",
"Bash(python3 -c ' *)",
"mcp__claude_ai_Atlassian__getJiraIssue",
"mcp__claude_ai_Atlassian__getAccessibleAtlassianResources",
"WebFetch(domain:developer.nylas.com)"
]
}
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@
* `colorId` field on `Event`, `CreateEventRequest`, and `UpdateEventRequest` for Google Calendar event colors, mapped to the `color_id` JSON property.
Valid values are strings `"1"` through `"11"`.
See [Google Calendar Colors](https://developers.google.com/calendar/api/v3/reference/colors).
* `resources` field (`List<EventResource>`) on `Event`, `CreateEventRequest`, and `UpdateEventRequest` for associating rooms or resources with events
* `textDescription` field on `Event` for the plain-text description of an event (`text_description`)
* `EventResource` model with `email` (required) and `name` (optional) fields
* `select` and `tentativeAsBusy` query parameters on `ListEventQueryParams`, `FindEventQueryParams`, `CreateEventQueryParams`, and `UpdateEventQueryParams`
* `skipNylasEmail` query parameter on `SendRsvpQueryParams` to suppress Nylas notification emails when sending an RSVP
* `eventType` on `ListEventQueryParams` now accepts `List<EventType>` (was `EventType`) to allow filtering by multiple event types simultaneously
* Extended `EventNotetaker.MeetingSettings` and `EventNotetakerRequest.MeetingSettings` with new fields:
- `actionItems` / `actionItemsSettings` (`ActionItemsSettings`) for AI-generated action items with optional custom instructions
- `summary` / `summarySettings` (`SummarySettings`) for AI-generated meeting summaries with optional custom instructions
- `leaveAfterSilenceSeconds` for configuring inactivity timeout
- `transcriptionSettings` (`TranscriptionSettings`) with `expectedLanguages` and `fallbackLanguage`

### Fixed
* `Configuration.participants` now defaults to an empty list when the field is absent from the API response (e.g. group-event configurations), preventing a `JsonDataException` from being thrown during deserialization.
Expand Down
28 changes: 28 additions & 0 deletions src/main/kotlin/com/nylas/models/CreateEventQueryParams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ data class CreateEventQueryParams(
*/
@Json(name = "notify_participants")
val notifyParticipants: Boolean? = null,
/**
* Comma-separated list of fields to return in the response.
*/
@Json(name = "select")
val select: String? = null,
/**
* When true, tentative events are counted as busy.
*/
@Json(name = "tentative_as_busy")
val tentativeAsBusy: Boolean? = null,
) : IQueryParams {
/**
* Builder for [CreateEventQueryParams].
Expand All @@ -25,6 +35,8 @@ data class CreateEventQueryParams(
private val calendarId: String,
) {
private var notifyParticipants: Boolean? = null
private var select: String? = null
private var tentativeAsBusy: Boolean? = null

/**
* Sets whether notifications containing the calendar event is sent to all event participants.
Expand All @@ -33,13 +45,29 @@ data class CreateEventQueryParams(
*/
fun notifyParticipants(notifyParticipants: Boolean?) = apply { this.notifyParticipants = notifyParticipants }

/**
* Sets the comma-separated list of fields to return in the response.
* @param select The fields to return.
* @return The builder.
*/
fun select(select: String?) = apply { this.select = select }

/**
* Sets whether tentative events are counted as busy.
* @param tentativeAsBusy Whether tentative events are counted as busy.
* @return The builder.
*/
fun tentativeAsBusy(tentativeAsBusy: Boolean?) = apply { this.tentativeAsBusy = tentativeAsBusy }

/**
* Builds a [CreateEventQueryParams] instance.
* @return The [CreateEventQueryParams] instance.
*/
fun build() = CreateEventQueryParams(
calendarId,
notifyParticipants,
select,
tentativeAsBusy,
)
}
}
14 changes: 14 additions & 0 deletions src/main/kotlin/com/nylas/models/CreateEventRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ data class CreateEventRequest(
*/
@Json(name = "color_id")
val colorId: String? = null,
/**
* List of resources (e.g. rooms) to associate with the event.
*/
@Json(name = "resources")
val resources: List<EventResource>? = null,
) {
/**
* This sealed class represents the different types of event time configurations.
Expand Down Expand Up @@ -519,6 +524,7 @@ data class CreateEventRequest(
private var hideParticipant: Boolean? = null
private var notetaker: EventNotetakerRequest? = null
private var colorId: String? = null
private var resources: List<EventResource>? = null

/**
* Set the event title.
Expand Down Expand Up @@ -642,6 +648,13 @@ data class CreateEventRequest(
*/
fun colorId(colorId: String) = apply { this.colorId = colorId }

/**
* Set the list of resources (e.g. rooms) to associate with the event.
* @param resources The list of resources.
* @return The builder.
*/
fun resources(resources: List<EventResource>) = apply { this.resources = resources }

/**
* Builds the [CreateEventRequest] object.
* @return [CreateEventRequest] object.
Expand All @@ -665,6 +678,7 @@ data class CreateEventRequest(
hideParticipant,
notetaker,
colorId,
resources,
)
}
}
10 changes: 10 additions & 0 deletions src/main/kotlin/com/nylas/models/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ data class Event(
*/
@Json(name = "color_id")
val colorId: String? = null,
/**
* List of resources (e.g. rooms) associated with the event.
*/
@Json(name = "resources")
val resources: List<EventResource>? = null,
/**
* Plain-text description of the event, if available.
*/
@Json(name = "text_description")
val textDescription: String? = null,
) {
/**
* Get the type of object.
Expand Down
110 changes: 108 additions & 2 deletions src/main/kotlin/com/nylas/models/EventNotetaker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,60 @@ data class EventNotetaker(
*/
@Json(name = "transcription")
val transcription: Boolean? = true,
)

/**
* When true, Notetaker generates action items from the meeting.
*/
@Json(name = "action_items")
val actionItems: Boolean? = null,

/**
* Settings for action item generation.
*/
@Json(name = "action_items_settings")
val actionItemsSettings: ActionItemsSettings? = null,

/**
* When true, Notetaker generates a summary of the meeting.
*/
@Json(name = "summary")
val summary: Boolean? = null,

/**
* Settings for summary generation.
*/
@Json(name = "summary_settings")
val summarySettings: SummarySettings? = null,

/**
* Number of seconds of silence after which Notetaker leaves the meeting.
*/
@Json(name = "leave_after_silence_seconds")
val leaveAfterSilenceSeconds: Int? = null,

/**
* Settings for transcription.
*/
@Json(name = "transcription_settings")
val transcriptionSettings: TranscriptionSettings? = null,
) {
data class ActionItemsSettings(
@Json(name = "custom_instructions")
val customInstructions: String? = null,
)

data class SummarySettings(
@Json(name = "custom_instructions")
val customInstructions: String? = null,
)

data class TranscriptionSettings(
@Json(name = "expected_languages")
val expectedLanguages: List<String>? = null,
@Json(name = "fallback_language")
val fallbackLanguage: String? = null,
)
}
}

/**
Expand Down Expand Up @@ -87,5 +140,58 @@ data class EventNotetakerRequest(
*/
@Json(name = "transcription")
val transcription: Boolean? = true,
)

/**
* When true, Notetaker generates action items from the meeting.
*/
@Json(name = "action_items")
val actionItems: Boolean? = null,

/**
* Settings for action item generation.
*/
@Json(name = "action_items_settings")
val actionItemsSettings: ActionItemsSettings? = null,

/**
* When true, Notetaker generates a summary of the meeting.
*/
@Json(name = "summary")
val summary: Boolean? = null,

/**
* Settings for summary generation.
*/
@Json(name = "summary_settings")
val summarySettings: SummarySettings? = null,

/**
* Number of seconds of silence after which Notetaker leaves the meeting.
*/
@Json(name = "leave_after_silence_seconds")
val leaveAfterSilenceSeconds: Int? = null,

/**
* Settings for transcription.
*/
@Json(name = "transcription_settings")
val transcriptionSettings: TranscriptionSettings? = null,
) {
data class ActionItemsSettings(
@Json(name = "custom_instructions")
val customInstructions: String? = null,
)

data class SummarySettings(
@Json(name = "custom_instructions")
val customInstructions: String? = null,
)

data class TranscriptionSettings(
@Json(name = "expected_languages")
val expectedLanguages: List<String>? = null,
@Json(name = "fallback_language")
val fallbackLanguage: String? = null,
)
}
}
12 changes: 12 additions & 0 deletions src/main/kotlin/com/nylas/models/EventResource.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.nylas.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
data class EventResource(
@Json(name = "email")
val email: String,
@Json(name = "name")
val name: String? = null,
)
29 changes: 29 additions & 0 deletions src/main/kotlin/com/nylas/models/FindEventQueryParams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ data class FindEventQueryParams(
*/
@Json(name = "calendar_id")
val calendarId: String,
/**
* Comma-separated list of fields to return in the response.
*/
@Json(name = "select")
val select: String? = null,
/**
* When true, tentative events are counted as busy.
*/
@Json(name = "tentative_as_busy")
val tentativeAsBusy: Boolean? = null,
) : IQueryParams {
/**
* Builder for [FindEventQueryParams].
Expand All @@ -19,12 +29,31 @@ data class FindEventQueryParams(
data class Builder(
private val calendarId: String,
) {
private var select: String? = null
private var tentativeAsBusy: Boolean? = null

/**
* Sets the comma-separated list of fields to return in the response.
* @param select The fields to return.
* @return The builder.
*/
fun select(select: String?) = apply { this.select = select }

/**
* Sets whether tentative events are counted as busy.
* @param tentativeAsBusy Whether tentative events are counted as busy.
* @return The builder.
*/
fun tentativeAsBusy(tentativeAsBusy: Boolean?) = apply { this.tentativeAsBusy = tentativeAsBusy }

/**
* Builds a new [FindEventQueryParams] instance.
* @return [FindEventQueryParams]
*/
fun build() = FindEventQueryParams(
calendarId,
select,
tentativeAsBusy,
)
}
}
Loading
Loading