Documentation
¶
Overview ¶
Package nylas provides the Nylas API client implementation.
Package nylas provides the Nylas API client implementation.
Index ¶
- func ExtractOTP(subject, body string) string
- func FindOTP(messages []domain.Message) (*domain.OTPResult, error)
- type DemoClient
- func (d *DemoClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
- func (d *DemoClient) CancelBooking(ctx context.Context, bookingID string, reason string) error
- func (d *DemoClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
- func (d *DemoClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
- func (d *DemoClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
- func (d *DemoClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
- func (d *DemoClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
- func (d *DemoClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
- func (d *DemoClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
- func (d *DemoClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
- func (d *DemoClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (d *DemoClient) CreateEvent(ctx context.Context, grantID, calendarID string, ...) (*domain.Event, error)
- func (d *DemoClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
- func (d *DemoClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
- func (d *DemoClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
- func (d *DemoClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
- func (d *DemoClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (d *DemoClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
- func (d *DemoClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
- func (d *DemoClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
- func (d *DemoClient) DeleteApplication(ctx context.Context, appID string) error
- func (d *DemoClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
- func (d *DemoClient) DeleteConnector(ctx context.Context, connectorID string) error
- func (d *DemoClient) DeleteContact(ctx context.Context, grantID, contactID string) error
- func (d *DemoClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
- func (d *DemoClient) DeleteCredential(ctx context.Context, credentialID string) error
- func (d *DemoClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
- func (d *DemoClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
- func (d *DemoClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
- func (d *DemoClient) DeleteInboundInbox(ctx context.Context, grantID string) error
- func (d *DemoClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
- func (d *DemoClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
- func (d *DemoClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
- func (d *DemoClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
- func (d *DemoClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
- func (d *DemoClient) DeleteThread(ctx context.Context, grantID, threadID string) error
- func (d *DemoClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
- func (d *DemoClient) DeleteWebhook(ctx context.Context, webhookID string) error
- func (d *DemoClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
- func (d *DemoClient) ExchangeCode(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
- func (d *DemoClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
- func (d *DemoClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
- func (d *DemoClient) GetAvailability(ctx context.Context, req *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
- func (d *DemoClient) GetBooking(ctx context.Context, bookingID string) (*domain.Booking, error)
- func (d *DemoClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
- func (d *DemoClient) GetCalendars(ctx context.Context, grantID string) ([]domain.Calendar, error)
- func (d *DemoClient) GetConnector(ctx context.Context, connectorID string) (*domain.Connector, error)
- func (d *DemoClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
- func (d *DemoClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
- func (d *DemoClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
- func (d *DemoClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
- func (d *DemoClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
- func (d *DemoClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
- func (d *DemoClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
- func (d *DemoClient) GetDraft(ctx context.Context, grantID, draftID string) (*domain.Draft, error)
- func (d *DemoClient) GetDrafts(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
- func (d *DemoClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
- func (d *DemoClient) GetEvents(ctx context.Context, grantID, calendarID string, ...) ([]domain.Event, error)
- func (d *DemoClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, ...) (*domain.EventListResponse, error)
- func (d *DemoClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
- func (d *DemoClient) GetFolders(ctx context.Context, grantID string) ([]domain.Folder, error)
- func (d *DemoClient) GetFreeBusy(ctx context.Context, grantID string, req *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
- func (d *DemoClient) GetGrant(ctx context.Context, grantID string) (*domain.Grant, error)
- func (d *DemoClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
- func (d *DemoClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
- func (d *DemoClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
- func (d *DemoClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
- func (d *DemoClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
- func (d *DemoClient) GetMessages(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
- func (d *DemoClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
- func (d *DemoClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
- func (d *DemoClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
- func (d *DemoClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
- func (d *DemoClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, ...) ([]domain.Event, error)
- func (d *DemoClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
- func (d *DemoClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
- func (d *DemoClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
- func (d *DemoClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
- func (d *DemoClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
- func (d *DemoClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
- func (d *DemoClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
- func (d *DemoClient) GetWebhook(ctx context.Context, webhookID string) (*domain.Webhook, error)
- func (d *DemoClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
- func (d *DemoClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
- func (d *DemoClient) ListApplications(ctx context.Context) ([]domain.Application, error)
- func (d *DemoClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
- func (d *DemoClient) ListBookings(ctx context.Context, configID string) ([]domain.Booking, error)
- func (d *DemoClient) ListConnectors(ctx context.Context) ([]domain.Connector, error)
- func (d *DemoClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
- func (d *DemoClient) ListGrants(ctx context.Context) ([]domain.Grant, error)
- func (d *DemoClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
- func (d *DemoClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
- func (d *DemoClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
- func (d *DemoClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
- func (d *DemoClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
- func (d *DemoClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
- func (d *DemoClient) ListWebhooks(ctx context.Context) ([]domain.Webhook, error)
- func (d *DemoClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
- func (d *DemoClient) RevokeGrant(ctx context.Context, grantID string) error
- func (d *DemoClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
- func (d *DemoClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
- func (d *DemoClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, ...) error
- func (d *DemoClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
- func (d *DemoClient) SetCredentials(clientID, clientSecret, apiKey string)
- func (d *DemoClient) SetRegion(region string)
- func (d *DemoClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
- func (d *DemoClient) SmartComposeReply(ctx context.Context, grantID, messageID string, ...) (*domain.SmartComposeSuggestion, error)
- func (d *DemoClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
- func (d *DemoClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, ...) (*domain.Calendar, error)
- func (d *DemoClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
- func (d *DemoClient) UpdateContact(ctx context.Context, grantID, contactID string, ...) (*domain.Contact, error)
- func (d *DemoClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, ...) (*domain.ContactGroup, error)
- func (d *DemoClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
- func (d *DemoClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (d *DemoClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (d *DemoClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
- func (d *DemoClient) UpdateMessage(ctx context.Context, grantID, messageID string, ...) (*domain.Message, error)
- func (d *DemoClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (d *DemoClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, ...) (*domain.SchedulerConfiguration, error)
- func (d *DemoClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (d *DemoClient) UpdateThread(ctx context.Context, grantID, threadID string, ...) (*domain.Thread, error)
- func (d *DemoClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
- type HTTPClient
- func (c *HTTPClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
- func (c *HTTPClient) CancelBooking(ctx context.Context, bookingID string, reason string) error
- func (c *HTTPClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
- func (c *HTTPClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
- func (c *HTTPClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
- func (c *HTTPClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
- func (c *HTTPClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
- func (c *HTTPClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
- func (c *HTTPClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
- func (c *HTTPClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
- func (c *HTTPClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (c *HTTPClient) CreateDraftWithAttachmentFromReader(ctx context.Context, grantID string, req *domain.CreateDraftRequest, ...) (*domain.Draft, error)
- func (c *HTTPClient) CreateEvent(ctx context.Context, grantID, calendarID string, ...) (*domain.Event, error)
- func (c *HTTPClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
- func (c *HTTPClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
- func (c *HTTPClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
- func (c *HTTPClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
- func (c *HTTPClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (c *HTTPClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
- func (c *HTTPClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
- func (c *HTTPClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
- func (c *HTTPClient) DeleteApplication(ctx context.Context, appID string) error
- func (c *HTTPClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
- func (c *HTTPClient) DeleteConnector(ctx context.Context, connectorID string) error
- func (c *HTTPClient) DeleteContact(ctx context.Context, grantID, contactID string) error
- func (c *HTTPClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
- func (c *HTTPClient) DeleteCredential(ctx context.Context, credentialID string) error
- func (c *HTTPClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
- func (c *HTTPClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
- func (c *HTTPClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
- func (c *HTTPClient) DeleteInboundInbox(ctx context.Context, grantID string) error
- func (c *HTTPClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
- func (c *HTTPClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
- func (c *HTTPClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
- func (c *HTTPClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
- func (c *HTTPClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
- func (c *HTTPClient) DeleteThread(ctx context.Context, grantID, threadID string) error
- func (c *HTTPClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
- func (c *HTTPClient) DeleteWebhook(ctx context.Context, webhookID string) error
- func (c *HTTPClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
- func (c *HTTPClient) ExchangeCode(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
- func (c *HTTPClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
- func (c *HTTPClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
- func (c *HTTPClient) GetAvailability(ctx context.Context, availReq *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
- func (c *HTTPClient) GetBooking(ctx context.Context, bookingID string) (*domain.Booking, error)
- func (c *HTTPClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
- func (c *HTTPClient) GetCalendars(ctx context.Context, grantID string) ([]domain.Calendar, error)
- func (c *HTTPClient) GetConnector(ctx context.Context, connectorID string) (*domain.Connector, error)
- func (c *HTTPClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
- func (c *HTTPClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
- func (c *HTTPClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
- func (c *HTTPClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
- func (c *HTTPClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
- func (c *HTTPClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
- func (c *HTTPClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
- func (c *HTTPClient) GetDraft(ctx context.Context, grantID, draftID string) (*domain.Draft, error)
- func (c *HTTPClient) GetDrafts(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
- func (c *HTTPClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
- func (c *HTTPClient) GetEvents(ctx context.Context, grantID, calendarID string, ...) ([]domain.Event, error)
- func (c *HTTPClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, ...) (*domain.EventListResponse, error)
- func (c *HTTPClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
- func (c *HTTPClient) GetFolders(ctx context.Context, grantID string) ([]domain.Folder, error)
- func (c *HTTPClient) GetFreeBusy(ctx context.Context, grantID string, freeBusyReq *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
- func (c *HTTPClient) GetGrant(ctx context.Context, grantID string) (*domain.Grant, error)
- func (c *HTTPClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
- func (c *HTTPClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
- func (c *HTTPClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
- func (c *HTTPClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
- func (c *HTTPClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
- func (c *HTTPClient) GetMessages(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
- func (c *HTTPClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
- func (c *HTTPClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
- func (c *HTTPClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
- func (c *HTTPClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
- func (c *HTTPClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, ...) ([]domain.Event, error)
- func (c *HTTPClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
- func (c *HTTPClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
- func (c *HTTPClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
- func (c *HTTPClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
- func (c *HTTPClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
- func (c *HTTPClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
- func (c *HTTPClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
- func (c *HTTPClient) GetWebhook(ctx context.Context, webhookID string) (*domain.Webhook, error)
- func (c *HTTPClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
- func (c *HTTPClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
- func (c *HTTPClient) ListApplications(ctx context.Context) ([]domain.Application, error)
- func (c *HTTPClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
- func (c *HTTPClient) ListBookings(ctx context.Context, configID string) ([]domain.Booking, error)
- func (c *HTTPClient) ListConnectors(ctx context.Context) ([]domain.Connector, error)
- func (c *HTTPClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
- func (c *HTTPClient) ListGrants(ctx context.Context) ([]domain.Grant, error)
- func (c *HTTPClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
- func (c *HTTPClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
- func (c *HTTPClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
- func (c *HTTPClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
- func (c *HTTPClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
- func (c *HTTPClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
- func (c *HTTPClient) ListWebhooks(ctx context.Context) ([]domain.Webhook, error)
- func (c *HTTPClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
- func (c *HTTPClient) RevokeGrant(ctx context.Context, grantID string) error
- func (c *HTTPClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
- func (c *HTTPClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
- func (c *HTTPClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, ...) error
- func (c *HTTPClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
- func (c *HTTPClient) SetBaseURL(url string)
- func (c *HTTPClient) SetCredentials(clientID, clientSecret, apiKey string)
- func (c *HTTPClient) SetMaxRetries(retries int)
- func (c *HTTPClient) SetRegion(region string)
- func (c *HTTPClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
- func (c *HTTPClient) SmartComposeReply(ctx context.Context, grantID, messageID string, ...) (*domain.SmartComposeSuggestion, error)
- func (c *HTTPClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
- func (c *HTTPClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, ...) (*domain.Calendar, error)
- func (c *HTTPClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
- func (c *HTTPClient) UpdateContact(ctx context.Context, grantID, contactID string, ...) (*domain.Contact, error)
- func (c *HTTPClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, ...) (*domain.ContactGroup, error)
- func (c *HTTPClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
- func (c *HTTPClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (c *HTTPClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (c *HTTPClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
- func (c *HTTPClient) UpdateMessage(ctx context.Context, grantID, messageID string, ...) (*domain.Message, error)
- func (c *HTTPClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (c *HTTPClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, ...) (*domain.SchedulerConfiguration, error)
- func (c *HTTPClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (c *HTTPClient) UpdateThread(ctx context.Context, grantID, threadID string, ...) (*domain.Thread, error)
- func (c *HTTPClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
- type ListResponse
- type MockClient
- func (m *MockClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
- func (m *MockClient) CancelBooking(ctx context.Context, bookingID string, reason string) error
- func (m *MockClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
- func (m *MockClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
- func (m *MockClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
- func (m *MockClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
- func (m *MockClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
- func (m *MockClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
- func (m *MockClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
- func (m *MockClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
- func (m *MockClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (m *MockClient) CreateEvent(ctx context.Context, grantID, calendarID string, ...) (*domain.Event, error)
- func (m *MockClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
- func (m *MockClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
- func (m *MockClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
- func (m *MockClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
- func (m *MockClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (m *MockClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
- func (m *MockClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
- func (m *MockClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
- func (m *MockClient) DeleteApplication(ctx context.Context, appID string) error
- func (m *MockClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
- func (m *MockClient) DeleteConnector(ctx context.Context, connectorID string) error
- func (m *MockClient) DeleteContact(ctx context.Context, grantID, contactID string) error
- func (m *MockClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
- func (m *MockClient) DeleteCredential(ctx context.Context, credentialID string) error
- func (m *MockClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
- func (m *MockClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
- func (m *MockClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
- func (m *MockClient) DeleteInboundInbox(ctx context.Context, grantID string) error
- func (m *MockClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
- func (m *MockClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
- func (m *MockClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
- func (m *MockClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
- func (m *MockClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
- func (m *MockClient) DeleteThread(ctx context.Context, grantID, threadID string) error
- func (m *MockClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
- func (m *MockClient) DeleteWebhook(ctx context.Context, webhookID string) error
- func (m *MockClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
- func (m *MockClient) ExchangeCode(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
- func (m *MockClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
- func (m *MockClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
- func (m *MockClient) GetAvailability(ctx context.Context, req *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
- func (m *MockClient) GetBooking(ctx context.Context, bookingID string) (*domain.Booking, error)
- func (m *MockClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
- func (m *MockClient) GetCalendars(ctx context.Context, grantID string) ([]domain.Calendar, error)
- func (m *MockClient) GetConnector(ctx context.Context, connectorID string) (*domain.Connector, error)
- func (m *MockClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
- func (m *MockClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
- func (m *MockClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
- func (m *MockClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
- func (m *MockClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
- func (m *MockClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
- func (m *MockClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
- func (m *MockClient) GetDraft(ctx context.Context, grantID, draftID string) (*domain.Draft, error)
- func (m *MockClient) GetDrafts(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
- func (m *MockClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
- func (m *MockClient) GetEvents(ctx context.Context, grantID, calendarID string, ...) ([]domain.Event, error)
- func (m *MockClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, ...) (*domain.EventListResponse, error)
- func (m *MockClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
- func (m *MockClient) GetFolders(ctx context.Context, grantID string) ([]domain.Folder, error)
- func (m *MockClient) GetFreeBusy(ctx context.Context, grantID string, req *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
- func (m *MockClient) GetGrant(ctx context.Context, grantID string) (*domain.Grant, error)
- func (m *MockClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
- func (m *MockClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
- func (m *MockClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
- func (m *MockClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
- func (m *MockClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
- func (m *MockClient) GetMessages(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
- func (m *MockClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
- func (m *MockClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
- func (m *MockClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
- func (m *MockClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
- func (m *MockClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, ...) ([]domain.Event, error)
- func (m *MockClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
- func (m *MockClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
- func (m *MockClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
- func (m *MockClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
- func (m *MockClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
- func (m *MockClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
- func (m *MockClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
- func (m *MockClient) GetWebhook(ctx context.Context, webhookID string) (*domain.Webhook, error)
- func (m *MockClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
- func (m *MockClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
- func (m *MockClient) ListApplications(ctx context.Context) ([]domain.Application, error)
- func (m *MockClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
- func (m *MockClient) ListBookings(ctx context.Context, configID string) ([]domain.Booking, error)
- func (m *MockClient) ListConnectors(ctx context.Context) ([]domain.Connector, error)
- func (m *MockClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
- func (m *MockClient) ListGrants(ctx context.Context) ([]domain.Grant, error)
- func (m *MockClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
- func (m *MockClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
- func (m *MockClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
- func (m *MockClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
- func (m *MockClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
- func (m *MockClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
- func (m *MockClient) ListWebhooks(ctx context.Context) ([]domain.Webhook, error)
- func (m *MockClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
- func (m *MockClient) RevokeGrant(ctx context.Context, grantID string) error
- func (m *MockClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
- func (m *MockClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
- func (m *MockClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, ...) error
- func (m *MockClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
- func (m *MockClient) SetCredentials(clientID, clientSecret, apiKey string)
- func (m *MockClient) SetRegion(region string)
- func (m *MockClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
- func (m *MockClient) SmartComposeReply(ctx context.Context, grantID, messageID string, ...) (*domain.SmartComposeSuggestion, error)
- func (m *MockClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
- func (m *MockClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, ...) (*domain.Calendar, error)
- func (m *MockClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
- func (m *MockClient) UpdateContact(ctx context.Context, grantID, contactID string, ...) (*domain.Contact, error)
- func (m *MockClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, ...) (*domain.ContactGroup, error)
- func (m *MockClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
- func (m *MockClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
- func (m *MockClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (m *MockClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
- func (m *MockClient) UpdateMessage(ctx context.Context, grantID, messageID string, ...) (*domain.Message, error)
- func (m *MockClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, ...) (*domain.Event, error)
- func (m *MockClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, ...) (*domain.SchedulerConfiguration, error)
- func (m *MockClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
- func (m *MockClient) UpdateThread(ctx context.Context, grantID, threadID string, ...) (*domain.Thread, error)
- func (m *MockClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
- type QueryBuilder
- func (qb *QueryBuilder) Add(key, value string) *QueryBuilder
- func (qb *QueryBuilder) AddBool(key string, value bool) *QueryBuilder
- func (qb *QueryBuilder) AddBoolPtr(key string, value *bool) *QueryBuilder
- func (qb *QueryBuilder) AddInt(key string, value int) *QueryBuilder
- func (qb *QueryBuilder) AddInt64(key string, value int64) *QueryBuilder
- func (qb *QueryBuilder) AddSlice(key string, values []string) *QueryBuilder
- func (qb *QueryBuilder) BuildURL(baseURL string) string
- func (qb *QueryBuilder) Encode() string
- func (qb *QueryBuilder) Values() url.Values
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractOTP ¶
ExtractOTP attempts to extract an OTP code from message content.
Types ¶
type DemoClient ¶
type DemoClient struct{}
DemoClient is a client that returns realistic demo data for screenshots and demos. It implements the ports.NylasClient interface without requiring any credentials.
func NewDemoClient ¶
func NewDemoClient() *DemoClient
NewDemoClient creates a new DemoClient for demo mode.
func (*DemoClient) BuildAuthURL ¶
func (d *DemoClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
BuildAuthURL returns a mock auth URL.
func (*DemoClient) CancelBooking ¶
func (*DemoClient) CancelScheduledMessage ¶
func (d *DemoClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
CancelScheduledMessage simulates canceling a scheduled message.
func (*DemoClient) ConfirmBooking ¶
func (d *DemoClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
func (*DemoClient) CreateApplication ¶
func (d *DemoClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
func (*DemoClient) CreateCalendar ¶
func (d *DemoClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
CreateCalendar simulates creating a calendar.
func (*DemoClient) CreateConnector ¶
func (d *DemoClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
func (*DemoClient) CreateContact ¶
func (d *DemoClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
CreateContact simulates creating a contact.
func (*DemoClient) CreateContactGroup ¶
func (d *DemoClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
CreateContactGroup creates a demo contact group.
func (*DemoClient) CreateCredential ¶
func (d *DemoClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
func (*DemoClient) CreateDraft ¶
func (d *DemoClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
CreateDraft simulates creating a draft.
func (*DemoClient) CreateEvent ¶
func (d *DemoClient) CreateEvent(ctx context.Context, grantID, calendarID string, req *domain.CreateEventRequest) (*domain.Event, error)
CreateEvent simulates creating an event.
func (*DemoClient) CreateFolder ¶
func (d *DemoClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
CreateFolder simulates creating a folder.
func (*DemoClient) CreateInboundInbox ¶
func (d *DemoClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
CreateInboundInbox simulates creating an inbound inbox.
func (*DemoClient) CreateNotetaker ¶
func (d *DemoClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
CreateNotetaker simulates creating a notetaker.
func (*DemoClient) CreateSchedulerConfiguration ¶
func (d *DemoClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
func (*DemoClient) CreateSchedulerPage ¶
func (d *DemoClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
func (*DemoClient) CreateSchedulerSession ¶
func (d *DemoClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
func (*DemoClient) CreateVirtualCalendarGrant ¶
func (d *DemoClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
func (*DemoClient) CreateWebhook ¶
func (d *DemoClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
CreateWebhook simulates creating a webhook.
func (*DemoClient) DeleteApplication ¶
func (d *DemoClient) DeleteApplication(ctx context.Context, appID string) error
func (*DemoClient) DeleteCalendar ¶
func (d *DemoClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
DeleteCalendar simulates deleting a calendar.
func (*DemoClient) DeleteConnector ¶
func (d *DemoClient) DeleteConnector(ctx context.Context, connectorID string) error
func (*DemoClient) DeleteContact ¶
func (d *DemoClient) DeleteContact(ctx context.Context, grantID, contactID string) error
DeleteContact simulates deleting a contact.
func (*DemoClient) DeleteContactGroup ¶
func (d *DemoClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
DeleteContactGroup deletes a demo contact group.
func (*DemoClient) DeleteCredential ¶
func (d *DemoClient) DeleteCredential(ctx context.Context, credentialID string) error
func (*DemoClient) DeleteDraft ¶
func (d *DemoClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
DeleteDraft simulates deleting a draft.
func (*DemoClient) DeleteEvent ¶
func (d *DemoClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
DeleteEvent simulates deleting an event.
func (*DemoClient) DeleteFolder ¶
func (d *DemoClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
DeleteFolder simulates deleting a folder.
func (*DemoClient) DeleteInboundInbox ¶
func (d *DemoClient) DeleteInboundInbox(ctx context.Context, grantID string) error
DeleteInboundInbox simulates deleting an inbound inbox.
func (*DemoClient) DeleteMessage ¶
func (d *DemoClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
DeleteMessage simulates deleting a message.
func (*DemoClient) DeleteNotetaker ¶
func (d *DemoClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
DeleteNotetaker simulates deleting a notetaker.
func (*DemoClient) DeleteRecurringEventInstance ¶
func (d *DemoClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
func (*DemoClient) DeleteSchedulerConfiguration ¶
func (d *DemoClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
func (*DemoClient) DeleteSchedulerPage ¶
func (d *DemoClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
func (*DemoClient) DeleteThread ¶
func (d *DemoClient) DeleteThread(ctx context.Context, grantID, threadID string) error
DeleteThread simulates deleting a thread.
func (*DemoClient) DeleteVirtualCalendarGrant ¶
func (d *DemoClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
func (*DemoClient) DeleteWebhook ¶
func (d *DemoClient) DeleteWebhook(ctx context.Context, webhookID string) error
DeleteWebhook simulates deleting a webhook.
func (*DemoClient) DownloadAttachment ¶
func (d *DemoClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
DownloadAttachment returns mock attachment content.
func (*DemoClient) ExchangeCode ¶
func (d *DemoClient) ExchangeCode(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
ExchangeCode returns a mock grant.
func (*DemoClient) GetApplication ¶
func (d *DemoClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
func (*DemoClient) GetAttachment ¶
func (d *DemoClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
GetAttachment returns demo attachment metadata.
func (*DemoClient) GetAvailability ¶
func (d *DemoClient) GetAvailability(ctx context.Context, req *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
GetAvailability returns demo availability slots.
func (*DemoClient) GetBooking ¶
func (*DemoClient) GetCalendar ¶
func (d *DemoClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
GetCalendar returns a demo calendar.
func (*DemoClient) GetCalendars ¶
GetCalendars returns demo calendars.
func (*DemoClient) GetConnector ¶
func (*DemoClient) GetContact ¶
func (d *DemoClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
GetContact returns a demo contact.
func (*DemoClient) GetContactGroup ¶
func (d *DemoClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
GetContactGroup returns a demo contact group.
func (*DemoClient) GetContactGroups ¶
func (d *DemoClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
GetContactGroups returns demo contact groups.
func (*DemoClient) GetContactWithPicture ¶
func (d *DemoClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
GetContactWithPicture returns a demo contact with optional profile picture.
func (*DemoClient) GetContacts ¶
func (d *DemoClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
GetContacts returns demo contacts.
func (*DemoClient) GetContactsWithCursor ¶
func (d *DemoClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
GetContactsWithCursor returns demo contacts with pagination.
func (*DemoClient) GetCredential ¶
func (d *DemoClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
func (*DemoClient) GetDrafts ¶
func (d *DemoClient) GetDrafts(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
GetDrafts returns demo drafts.
func (*DemoClient) GetEvent ¶
func (d *DemoClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
GetEvent returns a demo event.
func (*DemoClient) GetEvents ¶
func (d *DemoClient) GetEvents(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) ([]domain.Event, error)
GetEvents returns demo events.
func (*DemoClient) GetEventsWithCursor ¶
func (d *DemoClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) (*domain.EventListResponse, error)
GetEventsWithCursor returns demo events with pagination.
func (*DemoClient) GetFolder ¶
func (d *DemoClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
GetFolder returns a demo folder.
func (*DemoClient) GetFolders ¶
GetFolders returns demo folders.
func (*DemoClient) GetFreeBusy ¶
func (d *DemoClient) GetFreeBusy(ctx context.Context, grantID string, req *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
GetFreeBusy returns demo free/busy information.
func (*DemoClient) GetGrantStats ¶
func (d *DemoClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
func (*DemoClient) GetInboundInbox ¶
func (d *DemoClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
GetInboundInbox returns a demo inbound inbox.
func (*DemoClient) GetInboundMessages ¶
func (d *DemoClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
GetInboundMessages returns demo inbound messages.
func (*DemoClient) GetMessage ¶
func (d *DemoClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
GetMessage returns a demo message.
func (*DemoClient) GetMessageWithFields ¶
func (d *DemoClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
GetMessageWithFields retrieves a demo message with optional field selection.
func (*DemoClient) GetMessages ¶
func (d *DemoClient) GetMessages(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
GetMessages returns demo messages.
func (*DemoClient) GetMessagesWithCursor ¶
func (d *DemoClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
GetMessagesWithCursor returns demo messages with pagination.
func (*DemoClient) GetMessagesWithParams ¶
func (d *DemoClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
GetMessagesWithParams returns demo messages.
func (*DemoClient) GetNotetaker ¶
func (d *DemoClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
GetNotetaker returns a demo notetaker.
func (*DemoClient) GetNotetakerMedia ¶
func (d *DemoClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
GetNotetakerMedia returns demo notetaker media.
func (*DemoClient) GetRecurringEventInstances ¶
func (d *DemoClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, params *domain.EventQueryParams) ([]domain.Event, error)
func (*DemoClient) GetScheduledMessage ¶
func (d *DemoClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
GetScheduledMessage returns a demo scheduled message.
func (*DemoClient) GetSchedulerConfiguration ¶
func (d *DemoClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
func (*DemoClient) GetSchedulerPage ¶
func (d *DemoClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
func (*DemoClient) GetSchedulerSession ¶
func (d *DemoClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
func (*DemoClient) GetThread ¶
func (d *DemoClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
GetThread returns a demo thread.
func (*DemoClient) GetThreads ¶
func (d *DemoClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
GetThreads returns demo threads.
func (*DemoClient) GetVirtualCalendarGrant ¶
func (d *DemoClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
func (*DemoClient) GetWebhook ¶
GetWebhook returns a demo webhook.
func (*DemoClient) GetWebhookMockPayload ¶
func (d *DemoClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
GetWebhookMockPayload returns a mock payload for a trigger type.
func (*DemoClient) ListAllGrants ¶
func (d *DemoClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
func (*DemoClient) ListApplications ¶
func (d *DemoClient) ListApplications(ctx context.Context) ([]domain.Application, error)
func (*DemoClient) ListAttachments ¶
func (d *DemoClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
func (*DemoClient) ListBookings ¶
func (*DemoClient) ListConnectors ¶
func (*DemoClient) ListCredentials ¶
func (d *DemoClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
func (*DemoClient) ListGrants ¶
ListGrants returns demo grants.
func (*DemoClient) ListInboundInboxes ¶
func (d *DemoClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
func (*DemoClient) ListNotetakers ¶
func (d *DemoClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
ListNotetakers returns demo notetakers.
func (*DemoClient) ListScheduledMessages ¶
func (d *DemoClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
func (*DemoClient) ListSchedulerConfigurations ¶
func (d *DemoClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
func (*DemoClient) ListSchedulerPages ¶
func (d *DemoClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
func (*DemoClient) ListVirtualCalendarGrants ¶
func (d *DemoClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
func (*DemoClient) ListWebhooks ¶
func (*DemoClient) RescheduleBooking ¶
func (d *DemoClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
func (*DemoClient) RevokeGrant ¶
func (d *DemoClient) RevokeGrant(ctx context.Context, grantID string) error
RevokeGrant is a no-op for demo client.
func (*DemoClient) SendDraft ¶
func (d *DemoClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
SendDraft simulates sending a draft.
func (*DemoClient) SendMessage ¶
func (d *DemoClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
SendMessage simulates sending a message.
func (*DemoClient) SendRSVP ¶
func (d *DemoClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, req *domain.SendRSVPRequest) error
SendRSVP simulates sending an RSVP response.
func (*DemoClient) SendWebhookTestEvent ¶
func (d *DemoClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
SendWebhookTestEvent simulates sending a test event.
func (*DemoClient) SetCredentials ¶
func (d *DemoClient) SetCredentials(clientID, clientSecret, apiKey string)
SetCredentials is a no-op for demo client.
func (*DemoClient) SetRegion ¶
func (d *DemoClient) SetRegion(region string)
SetRegion is a no-op for demo client.
func (*DemoClient) SmartCompose ¶
func (d *DemoClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartCompose generates an AI-powered email draft based on a prompt.
func (*DemoClient) SmartComposeReply ¶
func (d *DemoClient) SmartComposeReply(ctx context.Context, grantID, messageID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartComposeReply generates an AI-powered reply to a specific message.
func (*DemoClient) UpdateApplication ¶
func (d *DemoClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
func (*DemoClient) UpdateCalendar ¶
func (d *DemoClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, req *domain.UpdateCalendarRequest) (*domain.Calendar, error)
UpdateCalendar simulates updating a calendar.
func (*DemoClient) UpdateConnector ¶
func (d *DemoClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
func (*DemoClient) UpdateContact ¶
func (d *DemoClient) UpdateContact(ctx context.Context, grantID, contactID string, req *domain.UpdateContactRequest) (*domain.Contact, error)
UpdateContact simulates updating a contact.
func (*DemoClient) UpdateContactGroup ¶
func (d *DemoClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, req *domain.UpdateContactGroupRequest) (*domain.ContactGroup, error)
UpdateContactGroup updates a demo contact group.
func (*DemoClient) UpdateCredential ¶
func (d *DemoClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
func (*DemoClient) UpdateDraft ¶
func (d *DemoClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
UpdateDraft simulates updating a draft.
func (*DemoClient) UpdateEvent ¶
func (d *DemoClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
UpdateEvent simulates updating an event.
func (*DemoClient) UpdateFolder ¶
func (d *DemoClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
UpdateFolder simulates updating a folder.
func (*DemoClient) UpdateMessage ¶
func (d *DemoClient) UpdateMessage(ctx context.Context, grantID, messageID string, req *domain.UpdateMessageRequest) (*domain.Message, error)
UpdateMessage simulates updating a message.
func (*DemoClient) UpdateRecurringEventInstance ¶
func (d *DemoClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
func (*DemoClient) UpdateSchedulerConfiguration ¶
func (d *DemoClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, req *domain.UpdateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
func (*DemoClient) UpdateSchedulerPage ¶
func (d *DemoClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
func (*DemoClient) UpdateThread ¶
func (d *DemoClient) UpdateThread(ctx context.Context, grantID, threadID string, req *domain.UpdateMessageRequest) (*domain.Thread, error)
UpdateThread simulates updating a thread.
func (*DemoClient) UpdateWebhook ¶
func (d *DemoClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
UpdateWebhook simulates updating a webhook.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient implements the NylasClient interface.
func NewHTTPClient ¶
func NewHTTPClient() *HTTPClient
NewHTTPClient creates a new Nylas HTTP client with rate limiting and retry logic. Rate limiting prevents API quota exhaustion and temporary account suspension. Default: 10 requests/second with burst capacity of 20 requests. Retry logic handles transient errors with exponential backoff and Retry-After header support.
func (*HTTPClient) BuildAuthURL ¶
func (c *HTTPClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
BuildAuthURL builds the OAuth authorization URL.
func (*HTTPClient) CancelBooking ¶
CancelBooking cancels a booking.
func (*HTTPClient) CancelScheduledMessage ¶
func (c *HTTPClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
CancelScheduledMessage cancels a scheduled message.
func (*HTTPClient) ConfirmBooking ¶
func (c *HTTPClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
ConfirmBooking confirms a booking.
func (*HTTPClient) CreateApplication ¶
func (c *HTTPClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
CreateApplication creates a new application.
func (*HTTPClient) CreateCalendar ¶
func (c *HTTPClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
CreateCalendar creates a new calendar.
func (*HTTPClient) CreateConnector ¶
func (c *HTTPClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
CreateConnector creates a new connector.
func (*HTTPClient) CreateContact ¶
func (c *HTTPClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
CreateContact creates a new contact.
func (*HTTPClient) CreateContactGroup ¶
func (c *HTTPClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
CreateContactGroup creates a new contact group.
func (*HTTPClient) CreateCredential ¶
func (c *HTTPClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
CreateCredential creates a new credential.
func (*HTTPClient) CreateDraft ¶
func (c *HTTPClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
CreateDraft creates a new draft.
func (*HTTPClient) CreateDraftWithAttachmentFromReader ¶
func (c *HTTPClient) CreateDraftWithAttachmentFromReader(ctx context.Context, grantID string, req *domain.CreateDraftRequest, filename string, contentType string, reader io.Reader) (*domain.Draft, error)
CreateDraftWithAttachmentFromReader creates a draft with an attachment from an io.Reader. This is useful for large attachments or streaming file uploads.
func (*HTTPClient) CreateEvent ¶
func (c *HTTPClient) CreateEvent(ctx context.Context, grantID, calendarID string, req *domain.CreateEventRequest) (*domain.Event, error)
CreateEvent creates a new event.
func (*HTTPClient) CreateFolder ¶
func (c *HTTPClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
CreateFolder creates a new folder.
func (*HTTPClient) CreateInboundInbox ¶
func (c *HTTPClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
CreateInboundInbox creates a new inbound inbox with the given email address. The email parameter is the local part (e.g., "support" for support@app.nylas.email).
func (*HTTPClient) CreateNotetaker ¶
func (c *HTTPClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
CreateNotetaker creates a new notetaker to join a meeting.
func (*HTTPClient) CreateSchedulerConfiguration ¶
func (c *HTTPClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
CreateSchedulerConfiguration creates a new scheduler configuration.
func (*HTTPClient) CreateSchedulerPage ¶
func (c *HTTPClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
CreateSchedulerPage creates a new scheduler page.
func (*HTTPClient) CreateSchedulerSession ¶
func (c *HTTPClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
CreateSchedulerSession creates a new scheduler session.
func (*HTTPClient) CreateVirtualCalendarGrant ¶
func (c *HTTPClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
func (*HTTPClient) CreateWebhook ¶
func (c *HTTPClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
CreateWebhook creates a new webhook.
func (*HTTPClient) DeleteApplication ¶
func (c *HTTPClient) DeleteApplication(ctx context.Context, appID string) error
DeleteApplication deletes an application.
func (*HTTPClient) DeleteCalendar ¶
func (c *HTTPClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
DeleteCalendar deletes a calendar.
func (*HTTPClient) DeleteConnector ¶
func (c *HTTPClient) DeleteConnector(ctx context.Context, connectorID string) error
DeleteConnector deletes a connector.
func (*HTTPClient) DeleteContact ¶
func (c *HTTPClient) DeleteContact(ctx context.Context, grantID, contactID string) error
DeleteContact deletes a contact.
func (*HTTPClient) DeleteContactGroup ¶
func (c *HTTPClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
DeleteContactGroup deletes a contact group.
func (*HTTPClient) DeleteCredential ¶
func (c *HTTPClient) DeleteCredential(ctx context.Context, credentialID string) error
DeleteCredential deletes a credential.
func (*HTTPClient) DeleteDraft ¶
func (c *HTTPClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
DeleteDraft deletes a draft.
func (*HTTPClient) DeleteEvent ¶
func (c *HTTPClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
DeleteEvent deletes an event.
func (*HTTPClient) DeleteFolder ¶
func (c *HTTPClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
DeleteFolder deletes a folder.
func (*HTTPClient) DeleteInboundInbox ¶
func (c *HTTPClient) DeleteInboundInbox(ctx context.Context, grantID string) error
DeleteInboundInbox deletes an inbound inbox by revoking its grant.
func (*HTTPClient) DeleteMessage ¶
func (c *HTTPClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
DeleteMessage deletes a message (moves to trash).
func (*HTTPClient) DeleteNotetaker ¶
func (c *HTTPClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
DeleteNotetaker deletes/cancels a notetaker.
func (*HTTPClient) DeleteRecurringEventInstance ¶
func (c *HTTPClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
DeleteRecurringEventInstance deletes a single instance of a recurring event.
func (*HTTPClient) DeleteSchedulerConfiguration ¶
func (c *HTTPClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
DeleteSchedulerConfiguration deletes a scheduler configuration.
func (*HTTPClient) DeleteSchedulerPage ¶
func (c *HTTPClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
DeleteSchedulerPage deletes a scheduler page.
func (*HTTPClient) DeleteThread ¶
func (c *HTTPClient) DeleteThread(ctx context.Context, grantID, threadID string) error
DeleteThread deletes a thread.
func (*HTTPClient) DeleteVirtualCalendarGrant ¶
func (c *HTTPClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
DeleteVirtualCalendarGrant deletes a virtual calendar grant.
func (*HTTPClient) DeleteWebhook ¶
func (c *HTTPClient) DeleteWebhook(ctx context.Context, webhookID string) error
DeleteWebhook deletes a webhook.
func (*HTTPClient) DownloadAttachment ¶
func (c *HTTPClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
DownloadAttachment downloads attachment content.
func (*HTTPClient) ExchangeCode ¶
func (c *HTTPClient) ExchangeCode(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
ExchangeCode exchanges an authorization code for tokens.
func (*HTTPClient) GetApplication ¶
func (c *HTTPClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
GetApplication retrieves a specific application.
func (*HTTPClient) GetAttachment ¶
func (c *HTTPClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
GetAttachment retrieves attachment metadata.
func (*HTTPClient) GetAvailability ¶
func (c *HTTPClient) GetAvailability(ctx context.Context, availReq *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
GetAvailability retrieves availability information.
func (*HTTPClient) GetBooking ¶
GetBooking retrieves a specific booking.
func (*HTTPClient) GetCalendar ¶
func (c *HTTPClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
GetCalendar retrieves a single calendar by ID.
func (*HTTPClient) GetCalendars ¶
func (*HTTPClient) GetConnector ¶
func (c *HTTPClient) GetConnector(ctx context.Context, connectorID string) (*domain.Connector, error)
GetConnector retrieves a specific connector.
func (*HTTPClient) GetContact ¶
func (c *HTTPClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
GetContact retrieves a single contact by ID.
func (*HTTPClient) GetContactGroup ¶
func (c *HTTPClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
GetContactGroup retrieves a single contact group by ID.
func (*HTTPClient) GetContactGroups ¶
func (c *HTTPClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
GetContactGroups retrieves contact groups for a grant.
func (*HTTPClient) GetContactWithPicture ¶
func (c *HTTPClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
GetContactWithPicture retrieves a single contact by ID with optional profile picture.
func (*HTTPClient) GetContacts ¶
func (c *HTTPClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
GetContacts retrieves contacts for a grant.
func (*HTTPClient) GetContactsWithCursor ¶
func (c *HTTPClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
GetContactsWithCursor retrieves contacts with pagination cursor.
func (*HTTPClient) GetCredential ¶
func (c *HTTPClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
GetCredential retrieves a specific credential.
func (*HTTPClient) GetDrafts ¶
func (c *HTTPClient) GetDrafts(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
GetDrafts retrieves drafts for a grant.
func (*HTTPClient) GetEvent ¶
func (c *HTTPClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
GetEvent retrieves a single event by ID.
func (*HTTPClient) GetEvents ¶
func (c *HTTPClient) GetEvents(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) ([]domain.Event, error)
func (*HTTPClient) GetEventsWithCursor ¶
func (c *HTTPClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) (*domain.EventListResponse, error)
GetEventsWithCursor retrieves events with pagination cursor support.
func (*HTTPClient) GetFolder ¶
func (c *HTTPClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
GetFolder retrieves a single folder by ID.
func (*HTTPClient) GetFolders ¶
GetFolders retrieves all folders for a grant.
func (*HTTPClient) GetFreeBusy ¶
func (c *HTTPClient) GetFreeBusy(ctx context.Context, grantID string, freeBusyReq *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
GetFreeBusy retrieves free/busy information.
func (*HTTPClient) GetGrantStats ¶
func (c *HTTPClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
GetGrantStats retrieves grant statistics.
func (*HTTPClient) GetInboundInbox ¶
func (c *HTTPClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
GetInboundInbox retrieves a specific inbound inbox by grant ID.
func (*HTTPClient) GetInboundMessages ¶
func (c *HTTPClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
GetInboundMessages retrieves messages for an inbound inbox.
func (*HTTPClient) GetMessage ¶
func (c *HTTPClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
GetMessage retrieves a single message by ID.
func (*HTTPClient) GetMessageWithFields ¶
func (c *HTTPClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
GetMessageWithFields retrieves a message with optional field selection. Pass "raw_mime" to fields to retrieve the full RFC822/MIME message.
func (*HTTPClient) GetMessages ¶
func (c *HTTPClient) GetMessages(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
GetMessages retrieves recent messages for a grant (simple version).
func (*HTTPClient) GetMessagesWithCursor ¶
func (c *HTTPClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
GetMessagesWithCursor retrieves messages with pagination cursor support.
func (*HTTPClient) GetMessagesWithParams ¶
func (c *HTTPClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
GetMessagesWithParams retrieves messages with query parameters.
func (*HTTPClient) GetNotetaker ¶
func (c *HTTPClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
GetNotetaker retrieves a single notetaker by ID.
func (*HTTPClient) GetNotetakerMedia ¶
func (c *HTTPClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
GetNotetakerMedia retrieves the media (recording/transcript) for a notetaker.
func (*HTTPClient) GetRecurringEventInstances ¶
func (c *HTTPClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, params *domain.EventQueryParams) ([]domain.Event, error)
GetRecurringEventInstances retrieves all instances of a recurring event.
func (*HTTPClient) GetScheduledMessage ¶
func (c *HTTPClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
GetScheduledMessage retrieves a specific scheduled message.
func (*HTTPClient) GetSchedulerConfiguration ¶
func (c *HTTPClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
GetSchedulerConfiguration retrieves a specific scheduler configuration.
func (*HTTPClient) GetSchedulerPage ¶
func (c *HTTPClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
GetSchedulerPage retrieves a specific scheduler page.
func (*HTTPClient) GetSchedulerSession ¶
func (c *HTTPClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
GetSchedulerSession retrieves a scheduler session.
func (*HTTPClient) GetThread ¶
func (c *HTTPClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
GetThread retrieves a single thread by ID.
func (*HTTPClient) GetThreads ¶
func (c *HTTPClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
GetThreads retrieves threads with query parameters.
func (*HTTPClient) GetVirtualCalendarGrant ¶
func (c *HTTPClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
GetVirtualCalendarGrant retrieves a single virtual calendar grant by ID.
func (*HTTPClient) GetWebhook ¶
GetWebhook retrieves a single webhook by ID.
func (*HTTPClient) GetWebhookMockPayload ¶
func (c *HTTPClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
GetWebhookMockPayload gets a mock payload for a trigger type.
func (*HTTPClient) ListAllGrants ¶
func (c *HTTPClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
ListAllGrants retrieves all grants with optional filtering.
func (*HTTPClient) ListApplications ¶
func (c *HTTPClient) ListApplications(ctx context.Context) ([]domain.Application, error)
ListApplications retrieves all applications.
func (*HTTPClient) ListAttachments ¶
func (c *HTTPClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
ListAttachments retrieves all attachments for a message. This is a convenience method that fetches the message and extracts attachments.
func (*HTTPClient) ListBookings ¶
ListBookings retrieves all bookings for a configuration.
func (*HTTPClient) ListConnectors ¶
ListConnectors retrieves all connectors.
func (*HTTPClient) ListCredentials ¶
func (c *HTTPClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
ListCredentials retrieves all credentials for a connector.
func (*HTTPClient) ListGrants ¶
ListGrants lists all grants for the application.
func (*HTTPClient) ListInboundInboxes ¶
func (c *HTTPClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
ListInboundInboxes lists all inbound inboxes (grants with provider=inbox).
func (*HTTPClient) ListNotetakers ¶
func (c *HTTPClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
ListNotetakers retrieves all notetakers for a grant.
func (*HTTPClient) ListScheduledMessages ¶
func (c *HTTPClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
ListScheduledMessages retrieves all scheduled messages for a grant.
func (*HTTPClient) ListSchedulerConfigurations ¶
func (c *HTTPClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
ListSchedulerConfigurations retrieves all scheduler configurations.
func (*HTTPClient) ListSchedulerPages ¶
func (c *HTTPClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
ListSchedulerPages retrieves all scheduler pages.
func (*HTTPClient) ListVirtualCalendarGrants ¶
func (c *HTTPClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
ListVirtualCalendarGrants lists all virtual calendar grants.
func (*HTTPClient) ListWebhooks ¶
ListWebhooks retrieves all webhooks.
func (*HTTPClient) RescheduleBooking ¶
func (c *HTTPClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
RescheduleBooking reschedules a booking.
func (*HTTPClient) RevokeGrant ¶
func (c *HTTPClient) RevokeGrant(ctx context.Context, grantID string) error
RevokeGrant revokes a grant.
func (*HTTPClient) SendDraft ¶
func (c *HTTPClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
SendDraft sends a draft.
func (*HTTPClient) SendMessage ¶
func (c *HTTPClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
SendMessage sends an email.
func (*HTTPClient) SendRSVP ¶
func (c *HTTPClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, req *domain.SendRSVPRequest) error
SendRSVP sends an RSVP response to an event invitation.
func (*HTTPClient) SendWebhookTestEvent ¶
func (c *HTTPClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
SendWebhookTestEvent sends a test event to a webhook URL.
func (*HTTPClient) SetBaseURL ¶
func (c *HTTPClient) SetBaseURL(url string)
SetBaseURL sets the base URL (for testing purposes).
func (*HTTPClient) SetCredentials ¶
func (c *HTTPClient) SetCredentials(clientID, clientSecret, apiKey string)
SetCredentials sets the API credentials.
func (*HTTPClient) SetMaxRetries ¶
func (c *HTTPClient) SetMaxRetries(retries int)
SetMaxRetries sets the maximum number of retries (for testing purposes).
func (*HTTPClient) SetRegion ¶
func (c *HTTPClient) SetRegion(region string)
SetRegion sets the API region (us or eu).
func (*HTTPClient) SmartCompose ¶
func (c *HTTPClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartCompose generates an AI-powered email draft based on a prompt. Uses Nylas Smart Compose API (requires Plus package).
func (*HTTPClient) SmartComposeReply ¶
func (c *HTTPClient) SmartComposeReply(ctx context.Context, grantID, messageID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartComposeReply generates an AI-powered reply to a specific message. Uses Nylas Smart Compose API (requires Plus package).
func (*HTTPClient) UpdateApplication ¶
func (c *HTTPClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
UpdateApplication updates an existing application.
func (*HTTPClient) UpdateCalendar ¶
func (c *HTTPClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, req *domain.UpdateCalendarRequest) (*domain.Calendar, error)
UpdateCalendar updates an existing calendar.
func (*HTTPClient) UpdateConnector ¶
func (c *HTTPClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
UpdateConnector updates an existing connector.
func (*HTTPClient) UpdateContact ¶
func (c *HTTPClient) UpdateContact(ctx context.Context, grantID, contactID string, req *domain.UpdateContactRequest) (*domain.Contact, error)
UpdateContact updates an existing contact.
func (*HTTPClient) UpdateContactGroup ¶
func (c *HTTPClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, req *domain.UpdateContactGroupRequest) (*domain.ContactGroup, error)
UpdateContactGroup updates an existing contact group.
func (*HTTPClient) UpdateCredential ¶
func (c *HTTPClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
UpdateCredential updates an existing credential.
func (*HTTPClient) UpdateDraft ¶
func (c *HTTPClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
UpdateDraft updates an existing draft.
func (*HTTPClient) UpdateEvent ¶
func (c *HTTPClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
UpdateEvent updates an existing event.
func (*HTTPClient) UpdateFolder ¶
func (c *HTTPClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
UpdateFolder updates an existing folder.
func (*HTTPClient) UpdateMessage ¶
func (c *HTTPClient) UpdateMessage(ctx context.Context, grantID, messageID string, req *domain.UpdateMessageRequest) (*domain.Message, error)
UpdateMessage updates message properties.
func (*HTTPClient) UpdateRecurringEventInstance ¶
func (c *HTTPClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
UpdateRecurringEventInstance updates a single instance of a recurring event.
func (*HTTPClient) UpdateSchedulerConfiguration ¶
func (c *HTTPClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, req *domain.UpdateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
UpdateSchedulerConfiguration updates an existing scheduler configuration.
func (*HTTPClient) UpdateSchedulerPage ¶
func (c *HTTPClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
UpdateSchedulerPage updates an existing scheduler page.
func (*HTTPClient) UpdateThread ¶
func (c *HTTPClient) UpdateThread(ctx context.Context, grantID, threadID string, req *domain.UpdateMessageRequest) (*domain.Thread, error)
UpdateThread updates thread properties.
func (*HTTPClient) UpdateWebhook ¶
func (c *HTTPClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
UpdateWebhook updates an existing webhook.
type ListResponse ¶
ListResponse is a generic paginated response.
type MockClient ¶
type MockClient struct {
// State
Region string
ClientID string
ClientSecret string
APIKey string
// Call tracking
ExchangeCodeCalled bool
ListGrantsCalled bool
GetGrantCalled bool
RevokeGrantCalled bool
GetMessagesCalled bool
GetMessagesWithParamsCalled bool
GetMessageCalled bool
SendMessageCalled bool
UpdateMessageCalled bool
DeleteMessageCalled bool
GetThreadsCalled bool
GetThreadCalled bool
UpdateThreadCalled bool
DeleteThreadCalled bool
GetDraftsCalled bool
GetDraftCalled bool
CreateDraftCalled bool
UpdateDraftCalled bool
DeleteDraftCalled bool
SendDraftCalled bool
GetFoldersCalled bool
GetFolderCalled bool
CreateFolderCalled bool
UpdateFolderCalled bool
DeleteFolderCalled bool
ListAttachmentsCalled bool
GetAttachmentCalled bool
DownloadAttachmentCalled bool
LastGrantID string
LastMessageID string
LastThreadID string
LastDraftID string
LastFolderID string
LastAttachmentID string
// Custom functions
ExchangeCodeFunc func(ctx context.Context, code, redirectURI string) (*domain.Grant, error)
ListGrantsFunc func(ctx context.Context) ([]domain.Grant, error)
GetGrantFunc func(ctx context.Context, grantID string) (*domain.Grant, error)
RevokeGrantFunc func(ctx context.Context, grantID string) error
GetMessagesFunc func(ctx context.Context, grantID string, limit int) ([]domain.Message, error)
GetMessagesWithParamsFunc func(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
GetMessageFunc func(ctx context.Context, grantID, messageID string) (*domain.Message, error)
SendMessageFunc func(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
UpdateMessageFunc func(ctx context.Context, grantID, messageID string, req *domain.UpdateMessageRequest) (*domain.Message, error)
DeleteMessageFunc func(ctx context.Context, grantID, messageID string) error
GetThreadsFunc func(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
GetThreadFunc func(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
UpdateThreadFunc func(ctx context.Context, grantID, threadID string, req *domain.UpdateMessageRequest) (*domain.Thread, error)
DeleteThreadFunc func(ctx context.Context, grantID, threadID string) error
GetDraftsFunc func(ctx context.Context, grantID string, limit int) ([]domain.Draft, error)
GetDraftFunc func(ctx context.Context, grantID, draftID string) (*domain.Draft, error)
CreateDraftFunc func(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
UpdateDraftFunc func(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
DeleteDraftFunc func(ctx context.Context, grantID, draftID string) error
SendDraftFunc func(ctx context.Context, grantID, draftID string) (*domain.Message, error)
GetFoldersFunc func(ctx context.Context, grantID string) ([]domain.Folder, error)
GetFolderFunc func(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
CreateFolderFunc func(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
UpdateFolderFunc func(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
DeleteFolderFunc func(ctx context.Context, grantID, folderID string) error
ListAttachmentsFunc func(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
GetAttachmentFunc func(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
DownloadAttachmentFunc func(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
// Calendar functions
GetCalendarsFunc func(ctx context.Context, grantID string) ([]domain.Calendar, error)
GetEventsFunc func(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) ([]domain.Event, error)
GetEventFunc func(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
CreateEventFunc func(ctx context.Context, grantID, calendarID string, req *domain.CreateEventRequest) (*domain.Event, error)
UpdateEventFunc func(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
DeleteEventFunc func(ctx context.Context, grantID, calendarID, eventID string) error
}
func (*MockClient) BuildAuthURL ¶
func (m *MockClient) BuildAuthURL(provider domain.Provider, redirectURI string) string
BuildAuthURL returns a mock auth URL.
func (*MockClient) CancelBooking ¶
func (*MockClient) CancelScheduledMessage ¶
func (m *MockClient) CancelScheduledMessage(ctx context.Context, grantID, scheduleID string) error
CancelScheduledMessage cancels a scheduled message.
func (*MockClient) ConfirmBooking ¶
func (m *MockClient) ConfirmBooking(ctx context.Context, bookingID string, req *domain.ConfirmBookingRequest) (*domain.Booking, error)
func (*MockClient) CreateApplication ¶
func (m *MockClient) CreateApplication(ctx context.Context, req *domain.CreateApplicationRequest) (*domain.Application, error)
func (*MockClient) CreateCalendar ¶
func (m *MockClient) CreateCalendar(ctx context.Context, grantID string, req *domain.CreateCalendarRequest) (*domain.Calendar, error)
CreateCalendar creates a new calendar.
func (*MockClient) CreateConnector ¶
func (m *MockClient) CreateConnector(ctx context.Context, req *domain.CreateConnectorRequest) (*domain.Connector, error)
func (*MockClient) CreateContact ¶
func (m *MockClient) CreateContact(ctx context.Context, grantID string, req *domain.CreateContactRequest) (*domain.Contact, error)
CreateContact creates a new contact.
func (*MockClient) CreateContactGroup ¶
func (m *MockClient) CreateContactGroup(ctx context.Context, grantID string, req *domain.CreateContactGroupRequest) (*domain.ContactGroup, error)
CreateContactGroup creates a new contact group.
func (*MockClient) CreateCredential ¶
func (m *MockClient) CreateCredential(ctx context.Context, connectorID string, req *domain.CreateCredentialRequest) (*domain.ConnectorCredential, error)
func (*MockClient) CreateDraft ¶
func (m *MockClient) CreateDraft(ctx context.Context, grantID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
CreateDraft creates a new draft.
func (*MockClient) CreateEvent ¶
func (m *MockClient) CreateEvent(ctx context.Context, grantID, calendarID string, req *domain.CreateEventRequest) (*domain.Event, error)
CreateEvent creates a new event.
func (*MockClient) CreateFolder ¶
func (m *MockClient) CreateFolder(ctx context.Context, grantID string, req *domain.CreateFolderRequest) (*domain.Folder, error)
CreateFolder creates a new folder.
func (*MockClient) CreateInboundInbox ¶
func (m *MockClient) CreateInboundInbox(ctx context.Context, email string) (*domain.InboundInbox, error)
CreateInboundInbox creates a new inbound inbox.
func (*MockClient) CreateNotetaker ¶
func (m *MockClient) CreateNotetaker(ctx context.Context, grantID string, req *domain.CreateNotetakerRequest) (*domain.Notetaker, error)
CreateNotetaker creates a new notetaker.
func (*MockClient) CreateSchedulerConfiguration ¶
func (m *MockClient) CreateSchedulerConfiguration(ctx context.Context, req *domain.CreateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
func (*MockClient) CreateSchedulerPage ¶
func (m *MockClient) CreateSchedulerPage(ctx context.Context, req *domain.CreateSchedulerPageRequest) (*domain.SchedulerPage, error)
func (*MockClient) CreateSchedulerSession ¶
func (m *MockClient) CreateSchedulerSession(ctx context.Context, req *domain.CreateSchedulerSessionRequest) (*domain.SchedulerSession, error)
func (*MockClient) CreateVirtualCalendarGrant ¶
func (m *MockClient) CreateVirtualCalendarGrant(ctx context.Context, email string) (*domain.VirtualCalendarGrant, error)
func (*MockClient) CreateWebhook ¶
func (m *MockClient) CreateWebhook(ctx context.Context, req *domain.CreateWebhookRequest) (*domain.Webhook, error)
CreateWebhook creates a new webhook.
func (*MockClient) DeleteApplication ¶
func (m *MockClient) DeleteApplication(ctx context.Context, appID string) error
func (*MockClient) DeleteCalendar ¶
func (m *MockClient) DeleteCalendar(ctx context.Context, grantID, calendarID string) error
DeleteCalendar deletes a calendar.
func (*MockClient) DeleteConnector ¶
func (m *MockClient) DeleteConnector(ctx context.Context, connectorID string) error
func (*MockClient) DeleteContact ¶
func (m *MockClient) DeleteContact(ctx context.Context, grantID, contactID string) error
DeleteContact deletes a contact.
func (*MockClient) DeleteContactGroup ¶
func (m *MockClient) DeleteContactGroup(ctx context.Context, grantID, groupID string) error
DeleteContactGroup deletes a contact group.
func (*MockClient) DeleteCredential ¶
func (m *MockClient) DeleteCredential(ctx context.Context, credentialID string) error
func (*MockClient) DeleteDraft ¶
func (m *MockClient) DeleteDraft(ctx context.Context, grantID, draftID string) error
DeleteDraft deletes a draft.
func (*MockClient) DeleteEvent ¶
func (m *MockClient) DeleteEvent(ctx context.Context, grantID, calendarID, eventID string) error
DeleteEvent deletes an event.
func (*MockClient) DeleteFolder ¶
func (m *MockClient) DeleteFolder(ctx context.Context, grantID, folderID string) error
DeleteFolder deletes a folder.
func (*MockClient) DeleteInboundInbox ¶
func (m *MockClient) DeleteInboundInbox(ctx context.Context, grantID string) error
DeleteInboundInbox deletes an inbound inbox.
func (*MockClient) DeleteMessage ¶
func (m *MockClient) DeleteMessage(ctx context.Context, grantID, messageID string) error
DeleteMessage deletes a message.
func (*MockClient) DeleteNotetaker ¶
func (m *MockClient) DeleteNotetaker(ctx context.Context, grantID, notetakerID string) error
DeleteNotetaker deletes a notetaker.
func (*MockClient) DeleteRecurringEventInstance ¶
func (m *MockClient) DeleteRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string) error
func (*MockClient) DeleteSchedulerConfiguration ¶
func (m *MockClient) DeleteSchedulerConfiguration(ctx context.Context, configID string) error
func (*MockClient) DeleteSchedulerPage ¶
func (m *MockClient) DeleteSchedulerPage(ctx context.Context, pageID string) error
func (*MockClient) DeleteThread ¶
func (m *MockClient) DeleteThread(ctx context.Context, grantID, threadID string) error
DeleteThread deletes a thread.
func (*MockClient) DeleteVirtualCalendarGrant ¶
func (m *MockClient) DeleteVirtualCalendarGrant(ctx context.Context, grantID string) error
func (*MockClient) DeleteWebhook ¶
func (m *MockClient) DeleteWebhook(ctx context.Context, webhookID string) error
DeleteWebhook deletes a webhook.
func (*MockClient) DownloadAttachment ¶
func (m *MockClient) DownloadAttachment(ctx context.Context, grantID, messageID, attachmentID string) (io.ReadCloser, error)
DownloadAttachment downloads attachment content.
func (*MockClient) ExchangeCode ¶
func (*MockClient) GetApplication ¶
func (m *MockClient) GetApplication(ctx context.Context, appID string) (*domain.Application, error)
func (*MockClient) GetAttachment ¶
func (m *MockClient) GetAttachment(ctx context.Context, grantID, messageID, attachmentID string) (*domain.Attachment, error)
GetAttachment retrieves attachment metadata.
func (*MockClient) GetAvailability ¶
func (m *MockClient) GetAvailability(ctx context.Context, req *domain.AvailabilityRequest) (*domain.AvailabilityResponse, error)
GetAvailability finds available meeting times.
func (*MockClient) GetBooking ¶
func (*MockClient) GetCalendar ¶
func (m *MockClient) GetCalendar(ctx context.Context, grantID, calendarID string) (*domain.Calendar, error)
GetCalendar retrieves a single calendar.
func (*MockClient) GetCalendars ¶
func (*MockClient) GetConnector ¶
func (*MockClient) GetContact ¶
func (m *MockClient) GetContact(ctx context.Context, grantID, contactID string) (*domain.Contact, error)
GetContact retrieves a single contact.
func (*MockClient) GetContactGroup ¶
func (m *MockClient) GetContactGroup(ctx context.Context, grantID, groupID string) (*domain.ContactGroup, error)
GetContactGroup retrieves a single contact group.
func (*MockClient) GetContactGroups ¶
func (m *MockClient) GetContactGroups(ctx context.Context, grantID string) ([]domain.ContactGroup, error)
GetContactGroups retrieves contact groups.
func (*MockClient) GetContactWithPicture ¶
func (m *MockClient) GetContactWithPicture(ctx context.Context, grantID, contactID string, includePicture bool) (*domain.Contact, error)
GetContactWithPicture retrieves a single contact with optional profile picture.
func (*MockClient) GetContacts ¶
func (m *MockClient) GetContacts(ctx context.Context, grantID string, params *domain.ContactQueryParams) ([]domain.Contact, error)
func (*MockClient) GetContactsWithCursor ¶
func (m *MockClient) GetContactsWithCursor(ctx context.Context, grantID string, params *domain.ContactQueryParams) (*domain.ContactListResponse, error)
GetContactsWithCursor retrieves contacts with pagination.
func (*MockClient) GetCredential ¶
func (m *MockClient) GetCredential(ctx context.Context, credentialID string) (*domain.ConnectorCredential, error)
func (*MockClient) GetEvent ¶
func (m *MockClient) GetEvent(ctx context.Context, grantID, calendarID, eventID string) (*domain.Event, error)
GetEvent retrieves a single event.
func (*MockClient) GetEvents ¶
func (m *MockClient) GetEvents(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) ([]domain.Event, error)
func (*MockClient) GetEventsWithCursor ¶
func (m *MockClient) GetEventsWithCursor(ctx context.Context, grantID, calendarID string, params *domain.EventQueryParams) (*domain.EventListResponse, error)
GetEventsWithCursor retrieves events with pagination.
func (*MockClient) GetFolder ¶
func (m *MockClient) GetFolder(ctx context.Context, grantID, folderID string) (*domain.Folder, error)
GetFolder retrieves a single folder.
func (*MockClient) GetFolders ¶
func (*MockClient) GetFreeBusy ¶
func (m *MockClient) GetFreeBusy(ctx context.Context, grantID string, req *domain.FreeBusyRequest) (*domain.FreeBusyResponse, error)
GetFreeBusy retrieves free/busy information.
func (*MockClient) GetGrantStats ¶
func (m *MockClient) GetGrantStats(ctx context.Context) (*domain.GrantStats, error)
func (*MockClient) GetInboundInbox ¶
func (m *MockClient) GetInboundInbox(ctx context.Context, grantID string) (*domain.InboundInbox, error)
GetInboundInbox retrieves a specific inbound inbox.
func (*MockClient) GetInboundMessages ¶
func (m *MockClient) GetInboundMessages(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.InboundMessage, error)
GetInboundMessages retrieves messages for an inbound inbox.
func (*MockClient) GetMessage ¶
func (m *MockClient) GetMessage(ctx context.Context, grantID, messageID string) (*domain.Message, error)
GetMessage retrieves a single message.
func (*MockClient) GetMessageWithFields ¶
func (m *MockClient) GetMessageWithFields(ctx context.Context, grantID, messageID string, fields string) (*domain.Message, error)
GetMessageWithFields retrieves a message with optional field selection.
func (*MockClient) GetMessages ¶
func (*MockClient) GetMessagesWithCursor ¶
func (m *MockClient) GetMessagesWithCursor(ctx context.Context, grantID string, params *domain.MessageQueryParams) (*domain.MessageListResponse, error)
GetMessagesWithCursor retrieves messages with pagination cursor support.
func (*MockClient) GetMessagesWithParams ¶
func (m *MockClient) GetMessagesWithParams(ctx context.Context, grantID string, params *domain.MessageQueryParams) ([]domain.Message, error)
GetMessagesWithParams retrieves messages with query parameters.
func (*MockClient) GetNotetaker ¶
func (m *MockClient) GetNotetaker(ctx context.Context, grantID, notetakerID string) (*domain.Notetaker, error)
GetNotetaker retrieves a single notetaker.
func (*MockClient) GetNotetakerMedia ¶
func (m *MockClient) GetNotetakerMedia(ctx context.Context, grantID, notetakerID string) (*domain.MediaData, error)
GetNotetakerMedia retrieves notetaker media.
func (*MockClient) GetRecurringEventInstances ¶
func (m *MockClient) GetRecurringEventInstances(ctx context.Context, grantID, calendarID, masterEventID string, params *domain.EventQueryParams) ([]domain.Event, error)
func (*MockClient) GetScheduledMessage ¶
func (m *MockClient) GetScheduledMessage(ctx context.Context, grantID, scheduleID string) (*domain.ScheduledMessage, error)
GetScheduledMessage retrieves a specific scheduled message.
func (*MockClient) GetSchedulerConfiguration ¶
func (m *MockClient) GetSchedulerConfiguration(ctx context.Context, configID string) (*domain.SchedulerConfiguration, error)
func (*MockClient) GetSchedulerPage ¶
func (m *MockClient) GetSchedulerPage(ctx context.Context, pageID string) (*domain.SchedulerPage, error)
func (*MockClient) GetSchedulerSession ¶
func (m *MockClient) GetSchedulerSession(ctx context.Context, sessionID string) (*domain.SchedulerSession, error)
func (*MockClient) GetThread ¶
func (m *MockClient) GetThread(ctx context.Context, grantID, threadID string) (*domain.Thread, error)
GetThread retrieves a single thread.
func (*MockClient) GetThreads ¶
func (m *MockClient) GetThreads(ctx context.Context, grantID string, params *domain.ThreadQueryParams) ([]domain.Thread, error)
func (*MockClient) GetVirtualCalendarGrant ¶
func (m *MockClient) GetVirtualCalendarGrant(ctx context.Context, grantID string) (*domain.VirtualCalendarGrant, error)
func (*MockClient) GetWebhook ¶
GetWebhook retrieves a single webhook.
func (*MockClient) GetWebhookMockPayload ¶
func (m *MockClient) GetWebhookMockPayload(ctx context.Context, triggerType string) (map[string]any, error)
GetWebhookMockPayload returns a mock payload for a trigger type.
func (*MockClient) ListAllGrants ¶
func (m *MockClient) ListAllGrants(ctx context.Context, params *domain.GrantsQueryParams) ([]domain.Grant, error)
func (*MockClient) ListApplications ¶
func (m *MockClient) ListApplications(ctx context.Context) ([]domain.Application, error)
func (*MockClient) ListAttachments ¶
func (m *MockClient) ListAttachments(ctx context.Context, grantID, messageID string) ([]domain.Attachment, error)
func (*MockClient) ListBookings ¶
func (*MockClient) ListConnectors ¶
func (*MockClient) ListCredentials ¶
func (m *MockClient) ListCredentials(ctx context.Context, connectorID string) ([]domain.ConnectorCredential, error)
func (*MockClient) ListGrants ¶
ListGrants lists all grants.
func (*MockClient) ListInboundInboxes ¶
func (m *MockClient) ListInboundInboxes(ctx context.Context) ([]domain.InboundInbox, error)
ListInboundInboxes lists all inbound inboxes.
func (*MockClient) ListNotetakers ¶
func (m *MockClient) ListNotetakers(ctx context.Context, grantID string, params *domain.NotetakerQueryParams) ([]domain.Notetaker, error)
func (*MockClient) ListScheduledMessages ¶
func (m *MockClient) ListScheduledMessages(ctx context.Context, grantID string) ([]domain.ScheduledMessage, error)
ListScheduledMessages retrieves scheduled messages.
func (*MockClient) ListSchedulerConfigurations ¶
func (m *MockClient) ListSchedulerConfigurations(ctx context.Context) ([]domain.SchedulerConfiguration, error)
func (*MockClient) ListSchedulerPages ¶
func (m *MockClient) ListSchedulerPages(ctx context.Context) ([]domain.SchedulerPage, error)
func (*MockClient) ListVirtualCalendarGrants ¶
func (m *MockClient) ListVirtualCalendarGrants(ctx context.Context) ([]domain.VirtualCalendarGrant, error)
func (*MockClient) ListWebhooks ¶
func (*MockClient) RescheduleBooking ¶
func (m *MockClient) RescheduleBooking(ctx context.Context, bookingID string, req *domain.RescheduleBookingRequest) (*domain.Booking, error)
func (*MockClient) RevokeGrant ¶
func (m *MockClient) RevokeGrant(ctx context.Context, grantID string) error
RevokeGrant revokes a grant.
func (*MockClient) SendDraft ¶
func (m *MockClient) SendDraft(ctx context.Context, grantID, draftID string) (*domain.Message, error)
SendDraft sends a draft.
func (*MockClient) SendMessage ¶
func (m *MockClient) SendMessage(ctx context.Context, grantID string, req *domain.SendMessageRequest) (*domain.Message, error)
SendMessage sends an email.
func (*MockClient) SendRSVP ¶
func (m *MockClient) SendRSVP(ctx context.Context, grantID, calendarID, eventID string, req *domain.SendRSVPRequest) error
SendRSVP sends an RSVP response to an event invitation.
func (*MockClient) SendWebhookTestEvent ¶
func (m *MockClient) SendWebhookTestEvent(ctx context.Context, webhookURL string) error
SendWebhookTestEvent sends a test event to a webhook URL.
func (*MockClient) SetCredentials ¶
func (m *MockClient) SetCredentials(clientID, clientSecret, apiKey string)
SetCredentials sets the API credentials.
func (*MockClient) SetRegion ¶
func (m *MockClient) SetRegion(region string)
SetRegion sets the API region.
func (*MockClient) SmartCompose ¶
func (m *MockClient) SmartCompose(ctx context.Context, grantID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartCompose generates an AI-powered email draft.
func (*MockClient) SmartComposeReply ¶
func (m *MockClient) SmartComposeReply(ctx context.Context, grantID, messageID string, req *domain.SmartComposeRequest) (*domain.SmartComposeSuggestion, error)
SmartComposeReply generates an AI-powered reply to a message.
func (*MockClient) UpdateApplication ¶
func (m *MockClient) UpdateApplication(ctx context.Context, appID string, req *domain.UpdateApplicationRequest) (*domain.Application, error)
func (*MockClient) UpdateCalendar ¶
func (m *MockClient) UpdateCalendar(ctx context.Context, grantID, calendarID string, req *domain.UpdateCalendarRequest) (*domain.Calendar, error)
UpdateCalendar updates an existing calendar.
func (*MockClient) UpdateConnector ¶
func (m *MockClient) UpdateConnector(ctx context.Context, connectorID string, req *domain.UpdateConnectorRequest) (*domain.Connector, error)
func (*MockClient) UpdateContact ¶
func (m *MockClient) UpdateContact(ctx context.Context, grantID, contactID string, req *domain.UpdateContactRequest) (*domain.Contact, error)
UpdateContact updates an existing contact.
func (*MockClient) UpdateContactGroup ¶
func (m *MockClient) UpdateContactGroup(ctx context.Context, grantID, groupID string, req *domain.UpdateContactGroupRequest) (*domain.ContactGroup, error)
UpdateContactGroup updates an existing contact group.
func (*MockClient) UpdateCredential ¶
func (m *MockClient) UpdateCredential(ctx context.Context, credentialID string, req *domain.UpdateCredentialRequest) (*domain.ConnectorCredential, error)
func (*MockClient) UpdateDraft ¶
func (m *MockClient) UpdateDraft(ctx context.Context, grantID, draftID string, req *domain.CreateDraftRequest) (*domain.Draft, error)
UpdateDraft updates an existing draft.
func (*MockClient) UpdateEvent ¶
func (m *MockClient) UpdateEvent(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
UpdateEvent updates an existing event.
func (*MockClient) UpdateFolder ¶
func (m *MockClient) UpdateFolder(ctx context.Context, grantID, folderID string, req *domain.UpdateFolderRequest) (*domain.Folder, error)
UpdateFolder updates an existing folder.
func (*MockClient) UpdateMessage ¶
func (m *MockClient) UpdateMessage(ctx context.Context, grantID, messageID string, req *domain.UpdateMessageRequest) (*domain.Message, error)
UpdateMessage updates message properties.
func (*MockClient) UpdateRecurringEventInstance ¶
func (m *MockClient) UpdateRecurringEventInstance(ctx context.Context, grantID, calendarID, eventID string, req *domain.UpdateEventRequest) (*domain.Event, error)
func (*MockClient) UpdateSchedulerConfiguration ¶
func (m *MockClient) UpdateSchedulerConfiguration(ctx context.Context, configID string, req *domain.UpdateSchedulerConfigurationRequest) (*domain.SchedulerConfiguration, error)
func (*MockClient) UpdateSchedulerPage ¶
func (m *MockClient) UpdateSchedulerPage(ctx context.Context, pageID string, req *domain.UpdateSchedulerPageRequest) (*domain.SchedulerPage, error)
func (*MockClient) UpdateThread ¶
func (m *MockClient) UpdateThread(ctx context.Context, grantID, threadID string, req *domain.UpdateMessageRequest) (*domain.Thread, error)
UpdateThread updates thread properties.
func (*MockClient) UpdateWebhook ¶
func (m *MockClient) UpdateWebhook(ctx context.Context, webhookID string, req *domain.UpdateWebhookRequest) (*domain.Webhook, error)
UpdateWebhook updates an existing webhook.
type QueryBuilder ¶
type QueryBuilder struct {
// contains filtered or unexported fields
}
QueryBuilder helps build URL query parameters from structs. Fields are read using the "query" struct tag.
Supported types:
- string: added if non-empty
- int, int64: added if > 0
- bool: added as "true" if true
- *bool: added if non-nil
- *int: added if non-nil and > 0
- []string: each value added with the same key
func NewQueryBuilder ¶
func NewQueryBuilder() *QueryBuilder
NewQueryBuilder creates a new QueryBuilder.
func (*QueryBuilder) Add ¶
func (qb *QueryBuilder) Add(key, value string) *QueryBuilder
Add adds a key-value pair to the query.
func (*QueryBuilder) AddBool ¶
func (qb *QueryBuilder) AddBool(key string, value bool) *QueryBuilder
AddBool adds a boolean value if true.
func (*QueryBuilder) AddBoolPtr ¶
func (qb *QueryBuilder) AddBoolPtr(key string, value *bool) *QueryBuilder
AddBoolPtr adds a boolean pointer value if non-nil.
func (*QueryBuilder) AddInt ¶
func (qb *QueryBuilder) AddInt(key string, value int) *QueryBuilder
AddInt adds an integer value if greater than 0.
func (*QueryBuilder) AddInt64 ¶
func (qb *QueryBuilder) AddInt64(key string, value int64) *QueryBuilder
AddInt64 adds an int64 value if greater than 0.
func (*QueryBuilder) AddSlice ¶
func (qb *QueryBuilder) AddSlice(key string, values []string) *QueryBuilder
AddSlice adds each string in the slice with the same key.
func (*QueryBuilder) BuildURL ¶
func (qb *QueryBuilder) BuildURL(baseURL string) string
BuildURL appends the query string to the base URL if there are parameters.
func (*QueryBuilder) Encode ¶
func (qb *QueryBuilder) Encode() string
Encode returns the encoded query string.
func (*QueryBuilder) Values ¶
func (qb *QueryBuilder) Values() url.Values
Values returns the underlying url.Values.
Source Files
¶
- admin.go
- attachments.go
- auth.go
- calendars_calendars.go
- calendars_converters.go
- calendars_events.go
- calendars_types.go
- calendars_virtual_recurring.go
- client.go
- client_helpers.go
- contacts.go
- demo_admin.go
- demo_advanced.go
- demo_attachments.go
- demo_calendars.go
- demo_client.go
- demo_contacts.go
- demo_drafts.go
- demo_events.go
- demo_folders.go
- demo_grants.go
- demo_inbound.go
- demo_messages.go
- demo_productivity.go
- demo_threads.go
- demo_webhooks.go
- drafts.go
- drafts_update.go
- folders.go
- inbound.go
- messages.go
- messages_send.go
- mock_admin.go
- mock_advanced.go
- mock_attachments.go
- mock_calendars.go
- mock_client.go
- mock_contacts.go
- mock_drafts.go
- mock_events.go
- mock_folders.go
- mock_grants.go
- mock_messages.go
- mock_productivity.go
- mock_scheduler.go
- mock_threads.go
- mock_webhooks.go
- notetakers.go
- otp.go
- scheduler.go
- threads.go
- webhooks.go