api

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTPClient

func NewHTTPClient(apiKey string) *http.Client

NewHTTPClient creates an http.Client with the custom transport

Types

type AddSheetTabRequest added in v0.3.1

type AddSheetTabRequest struct {
	Title       string `json:"title"`
	RowCount    *int   `json:"rowCount,omitempty"`
	ColumnCount *int   `json:"columnCount,omitempty"`
	Index       *int   `json:"index,omitempty"`
}

AddSheetTabRequest represents a request to add a worksheet tab.

type AddSheetTabResponse added in v0.3.1

type AddSheetTabResponse struct {
	Success       bool    `json:"success"`
	SpreadsheetID string  `json:"spreadsheetId"`
	SheetID       int     `json:"sheetId"`
	Title         string  `json:"title"`
	RowCount      int     `json:"rowCount"`
	ColumnCount   int     `json:"columnCount"`
	ErrorCode     *string `json:"errorCode,omitempty"`
	ErrorMessage  *string `json:"errorMessage,omitempty"`
	AccessInfo    *string `json:"accessInfo,omitempty"`
}

AddSheetTabResponse is the response for creating a worksheet tab.

type AddTaskCommentRequest added in v0.3.0

type AddTaskCommentRequest struct {
	Body string `json:"body"`
}

AddTaskCommentRequest is the POST /tasks/items/{id}/comments body.

type AppendBlockInput added in v0.3.0

type AppendBlockInput struct {
	Type     string                 `json:"type"`
	Text     string                 `json:"text"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

AppendBlockInput is one entry of an AppendBlocksRequest.

type AppendBlocksRequest added in v0.3.0

type AppendBlocksRequest struct {
	Blocks []AppendBlockInput `json:"blocks"`
}

AppendBlocksRequest is the POST /tasks/items/{id}/blocks body (Notion).

type AppendBlocksResponse added in v0.3.0

type AppendBlocksResponse struct {
	Success        bool    `json:"success"`
	BlocksAppended int     `json:"blocksAppended"`
	Error          *string `json:"error,omitempty"`
	ErrorCode      *string `json:"errorCode,omitempty"`
}

AppendBlocksResponse is returned by POST /tasks/items/{id}/blocks.

type AppendSheetRowsRequest added in v0.2.0

type AppendSheetRowsRequest struct {
	Range            string          `json:"range"`
	Values           [][]interface{} `json:"values"`
	ValueInputOption string          `json:"valueInputOption,omitempty"`
}

AppendSheetRowsRequest represents a request to append rows to a sheet

type Attachment

type Attachment struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	ContentType string `json:"contentType,omitempty"`
	Size        int64  `json:"size"`
	IsInline    bool   `json:"isInline"`
}

Attachment represents an email attachment

type Attendee

type Attendee struct {
	Email          string `json:"email"`
	Name           string `json:"name,omitempty"`
	DisplayName    string `json:"displayName,omitempty"` // Alias
	Response       string `json:"response,omitempty"`
	ResponseStatus string `json:"responseStatus,omitempty"` // Alias
}

Attendee represents an event attendee

type AuthStatusResponse

type AuthStatusResponse struct {
	Email        string    `json:"email"`
	OperatorName string    `json:"operatorName"`
	KeyID        int       `json:"keyId"`
	KeyTitle     string    `json:"keyTitle,omitempty"`
	CreatedAt    time.Time `json:"createdAt"`
}

AuthStatusResponse is the response for auth status endpoint

type BusyPeriod

type BusyPeriod struct {
	StartUtc        time.Time `json:"startUtc"`
	EndUtc          time.Time `json:"endUtc"`
	DurationMinutes int       `json:"durationMinutes"`
}

BusyPeriod represents a single busy time block

type Calendar

type Calendar struct {
	ID              int64     `json:"id"`
	ExternalID      string    `json:"externalId,omitempty"`
	Name            string    `json:"name"`
	Provider        string    `json:"provider"`
	Timezone        string    `json:"timezone,omitempty"`
	IsPrimary       bool      `json:"isPrimary"`
	IsOperatorOwner bool      `json:"isOperatorOwner,omitempty"`
	OwnerEmail      string    `json:"ownerEmail,omitempty"`
	LastSyncedAt    time.Time `json:"lastSyncedAt,omitempty"`
}

Calendar represents a calendar

type CalendarsResponse

type CalendarsResponse struct {
	Data       []Calendar `json:"data"`
	AccessInfo string     `json:"accessInfo,omitempty"`
}

CalendarsResponse is the response type for calendars

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string) *Client

func (*Client) AddItemComment added in v0.3.0

func (c *Client) AddItemComment(itemID, provider, body string) (*TaskCommentResult, error)

AddItemComment posts a new comment on an item.

func (*Client) AddSheetTab added in v0.3.1

func (c *Client) AddSheetTab(fileID string, req AddSheetTabRequest) (*AddSheetTabResponse, error)

AddSheetTab adds a worksheet tab and returns its assigned sheetId.

func (*Client) AppendItemBlocks added in v0.3.0

func (c *Client) AppendItemBlocks(itemID, provider string, blocks []AppendBlockInput) (*AppendBlocksResponse, error)

AppendItemBlocks appends blocks to a Notion page body.

func (*Client) AppendSheetRows added in v0.2.0

func (c *Client) AppendSheetRows(fileID string, req AppendSheetRowsRequest) (*DriveOperationResult, error)

AppendSheetRows appends rows after the last row with data in the specified range

func (*Client) CopyDriveFile added in v0.3.1

func (c *Client) CopyDriveFile(fileID string, req CopyFileRequest) (*DriveOperationResult, error)

CopyDriveFile duplicates a Drive file, returning the new file's id.

func (*Client) CreateDriveFile added in v0.3.0

CreateDriveFile creates a file with inline UTF-8 text content (POST /files). For Workspace target MIME types, Drive auto-imports the content; otherwise the file is stored as-is. Use UploadDriveFile for binary content.

func (*Client) CreateDriveFolder added in v0.2.0

func (c *Client) CreateDriveFolder(req CreateFolderRequest) (*DriveOperationResult, error)

CreateDriveFolder creates a new folder in Google Drive

func (*Client) CreateEvent

func (c *Client) CreateEvent(req CreateEventRequest) (*Event, error)

CreateEvent creates a new event

func (*Client) CreateTaskItem added in v0.3.0

func (c *Client) CreateTaskItem(boardID, provider string, req CreateTaskItemRequest) (*TaskItemResult, error)

CreateTaskItem creates a new item on a board.

func (*Client) Delete

func (c *Client) Delete(path string) ([]byte, error)

func (*Client) DeleteDriveFile added in v0.2.0

func (c *Client) DeleteDriveFile(fileID string) error

DeleteDriveFile moves a file to trash (204 No Content on success)

func (*Client) DeleteEmail

func (c *Client) DeleteEmail(emailID string) error

DeleteEmail deletes (trashes) an email

func (*Client) DeleteEvent

func (c *Client) DeleteEvent(eventID string, notifyAttendees bool) (*DeleteEventResponse, error)

DeleteEvent deletes a calendar event

func (*Client) DeleteSheetTab added in v0.3.1

func (c *Client) DeleteSheetTab(fileID string, sheetID *int, title string) error

DeleteSheetTab deletes one tab, identified by numeric sheetID (preferred when set) or title. The endpoint returns 204 with no body.

func (*Client) DeleteTaskItem added in v0.3.0

func (c *Client) DeleteTaskItem(itemID, provider string) (*TaskOperationResult, error)

DeleteTaskItem deletes (or archives, for Notion) an item.

func (*Client) EditDoc added in v0.2.0

func (c *Client) EditDoc(fileID string, req EditDocRequest) (*DriveOperationResult, error)

EditDoc applies text editing operations to a Google Doc

func (*Client) ForwardEmail

func (c *Client) ForwardEmail(emailID string, req ForwardEmailRequest) (*EmailActionResponse, error)

ForwardEmail forwards an email to specified recipients

func (*Client) Get

func (c *Client) Get(path string) ([]byte, error)

func (*Client) GetAllBoardItems added in v0.3.0

func (c *Client) GetAllBoardItems(params TaskItemListParams) (*TaskItemsResponse, error)

GetAllBoardItems auto-paginates items up to taskPaginationCap pages.

func (*Client) GetAllDriveFiles added in v0.2.0

func (c *Client) GetAllDriveFiles(params DriveListParams) (*DriveFilesResponse, error)

GetAllDriveFiles fetches all drive files by auto-paginating (safety cap: 50 pages)

func (*Client) GetAllEmails

func (c *Client) GetAllEmails(params EmailParams) (*EmailsResponse, error)

GetAllEmails fetches all emails by auto-paginating through results. Each page already refills toward `limit` from subsequent pages when the firewall trims the first batch; we iterate until HasMore is false or the safety cap fires.

func (*Client) GetAllEvents

func (c *Client) GetAllEvents(params EventParams) (*EventsResponse, error)

GetAllEvents fetches all events by auto-paginating through results

func (*Client) GetAllItemBlocks added in v0.3.0

func (c *Client) GetAllItemBlocks(params TaskBlockListParams) (*TaskBlockListResponse, error)

GetAllItemBlocks auto-paginates blocks up to taskPaginationCap pages.

func (*Client) GetAllTaskBoards added in v0.3.0

func (c *Client) GetAllTaskBoards(params TaskBoardListParams) (*TaskBoardsResponse, error)

GetAllTaskBoards auto-paginates boards up to taskPaginationCap pages. Advances by cursor when present, otherwise by page; returns a partial result with NextCursor/NextPage still set when the cap is hit.

func (*Client) GetAuthStatus

func (c *Client) GetAuthStatus() (*AuthStatusResponse, error)

GetAuthStatus returns the current authentication status

func (*Client) GetBoardItems added in v0.3.0

func (c *Client) GetBoardItems(params TaskItemListParams) (*TaskItemsResponse, error)

GetBoardItems returns one page of items on a board.

func (*Client) GetCalendars

func (c *Client) GetCalendars() (*CalendarsResponse, error)

GetCalendars returns all calendars

func (*Client) GetDocContent added in v0.2.0

func (c *Client) GetDocContent(fileID, format string) (*DocContentResponse, error)

GetDocContent returns the content of a Google Doc

func (*Client) GetDriveFile added in v0.2.0

func (c *Client) GetDriveFile(fileID string) (*SingleDriveFileResponse, error)

GetDriveFile returns metadata for a single drive file

func (*Client) GetDriveFileContent added in v0.3.0

func (c *Client) GetDriveFileContent(fileID string) (*DriveFileContentResponse, error)

GetDriveFileContent returns the textual content of a file. For Google Workspace types (Sheets, Slides) the response steers to the dedicated endpoint via Readable=false + Reason; the HTTP status is always 200.

func (c *Client) GetDriveFileLinks(fileID string) (*DriveFileLinkResponse, error)

GetDriveFileLinks returns view/download/export links for a file

func (*Client) GetDriveFiles added in v0.2.0

func (c *Client) GetDriveFiles(params DriveListParams) (*DriveFilesResponse, error)

GetDriveFiles returns drive files matching the given parameters

func (*Client) GetDrivePermissions added in v0.2.0

func (c *Client) GetDrivePermissions(fileID string) (*DrivePermissionsResponse, error)

GetDrivePermissions returns the sharing permissions for a file

func (*Client) GetEmail

func (c *Client) GetEmail(emailID string, includeBody bool) (*SingleEmailResponse, error)

GetEmail returns a single email by ID

func (*Client) GetEmails

func (c *Client) GetEmails(params EmailParams) (*EmailsResponse, error)

GetEmails returns emails based on search parameters

func (*Client) GetEvent

func (c *Client) GetEvent(eventID string) (*SingleEventResponse, error)

GetEvent returns a single event by ID

func (*Client) GetEvents

func (c *Client) GetEvents(params EventParams) (*EventsResponse, error)

GetEvents returns events based on parameters

func (*Client) GetEventsByContact

func (c *Client) GetEventsByContact(params EventsByContactParams) (*EventsResponse, error)

GetEventsByContact returns events with a specific contact Requires at least one of: email or name email and name parameters support partial matching (case-insensitive)

func (*Client) GetFreeBusy

func (c *Client) GetFreeBusy(params FreeBusyParams) (*FreeBusyResponse, error)

GetFreeBusy returns free/busy information for calendars

func (*Client) GetItemBlocks added in v0.3.0

func (c *Client) GetItemBlocks(params TaskBlockListParams) (*TaskBlockListResponse, error)

GetItemBlocks returns one page of Notion page-body blocks.

func (*Client) GetItemComments added in v0.3.0

func (c *Client) GetItemComments(itemID, provider string) (*TaskCommentsResponse, error)

GetItemComments lists comments on an item.

func (*Client) GetSheetBulkContent added in v0.3.0

func (c *Client) GetSheetBulkContent(fileID string, ranges []string, maxRowsPerSheet int) (*SheetBulkContentResponse, error)

GetSheetBulkContent reads every tab of a spreadsheet in one upstream call. Pass nil/empty ranges to use the metadata-driven default (capped per tab by maxRowsPerSheet; 0 means use the server default of 200). Tabs with more data than was returned are annotated with Clipped=true and a FullRange usable directly against /values.

func (*Client) GetSheetMetadata added in v0.2.0

func (c *Client) GetSheetMetadata(fileID string) (*SheetMetadataResponse, error)

GetSheetMetadata returns spreadsheet title and sheet tab info

func (*Client) GetSlidesContent added in v0.3.0

func (c *Client) GetSlidesContent(fileID, format string) (*SlidesContentResponse, error)

GetSlidesContent returns deck content. format="" defaults to text. "structured" returns raw Slides API JSON.

func (*Client) GetSlidesMetadata added in v0.3.0

func (c *Client) GetSlidesMetadata(fileID string) (*SlidesMetadataResponse, error)

GetSlidesMetadata returns deck title and per-slide index+title.

func (*Client) GetTaskBoard added in v0.3.0

func (c *Client) GetTaskBoard(boardID, provider string) (*TaskBoardResponse, error)

GetTaskBoard returns one board's metadata (groups + columns).

func (*Client) GetTaskBoards added in v0.3.0

func (c *Client) GetTaskBoards(params TaskBoardListParams) (*TaskBoardsResponse, error)

GetTaskBoards returns one page of boards.

func (*Client) GetTaskItem added in v0.3.0

func (c *Client) GetTaskItem(itemID, provider string) (*TaskItemResponse, error)

GetTaskItem returns a single item.

func (*Client) GetTaskProviders added in v0.3.0

func (c *Client) GetTaskProviders() (TaskProvidersResponse, error)

GetTaskProviders lists task providers connected to the account.

func (*Client) GetThread

func (c *Client) GetThread(threadID string) (*ThreadResponse, error)

GetThread returns all messages in a thread by ID

func (*Client) Logout

func (c *Client) Logout() error

Logout revokes the current API key

func (*Client) ModifyEmail

func (c *Client) ModifyEmail(emailID string, req ModifyEmailRequest) error

ModifyEmail modifies email properties (read status, labels)

func (*Client) MoveDriveFile added in v0.2.0

func (c *Client) MoveDriveFile(fileID string, req MoveFileRequest) (*DriveOperationResult, error)

MoveDriveFile moves a file to a different folder

func (*Client) Patch

func (c *Client) Patch(path string, data interface{}) ([]byte, error)

func (*Client) Post

func (c *Client) Post(path string, data interface{}) ([]byte, error)

func (*Client) PostRaw added in v0.2.0

func (c *Client) PostRaw(path string, body []byte, contentType string) ([]byte, error)

PostRaw sends a POST request with a raw byte body and specified Content-Type

func (*Client) Put added in v0.2.0

func (c *Client) Put(path string, data interface{}) ([]byte, error)

Put sends a PUT request with JSON body

func (*Client) ReadSheetTab added in v0.3.1

func (c *Client) ReadSheetTab(fileID, title string, sheetID *int) (*SheetValuesResponse, error)

ReadSheetTab reads the entire used range of one tab, identified by numeric sheetID (preferred when set) or title.

func (*Client) ReadSheetValues added in v0.2.0

func (c *Client) ReadSheetValues(fileID, rangeStr string) (*SheetValuesResponse, error)

ReadSheetValues reads cell values from a range in a spreadsheet

func (*Client) RenameDriveFile added in v0.2.0

func (c *Client) RenameDriveFile(fileID string, req RenameFileRequest) (*DriveOperationResult, error)

RenameDriveFile renames a file or folder

func (*Client) ReplyToEmail

func (c *Client) ReplyToEmail(emailID string, req ReplyEmailRequest) (*EmailActionResponse, error)

ReplyToEmail replies to an existing email

func (*Client) RespondToEvent

func (c *Client) RespondToEvent(eventID, status string) (*Event, error)

RespondToEvent responds to an event invitation

func (*Client) SearchTasks added in v0.3.0

func (c *Client) SearchTasks(params TaskSearchParams) (*TaskSearchResponse, error)

SearchTasks searches items across all in-scope boards (or the supplied subset). Server-side single-shot — the API doesn't paginate this endpoint; bump Limit (clamped to 1–200) to widen the result set.

func (*Client) SendEmail

func (c *Client) SendEmail(req SendEmailRequest) (*EmailActionResponse, error)

SendEmail sends a new email

func (*Client) ShareDriveFile added in v0.2.0

func (c *Client) ShareDriveFile(fileID string, req ShareFileRequest) (*DriveOperationResult, error)

ShareDriveFile shares a file with a user, group, domain, or anyone

func (*Client) UpdateEvent

func (c *Client) UpdateEvent(eventID string, req UpdateEventRequest) (*Event, error)

UpdateEvent updates an existing event (partial update)

func (*Client) UpdateTaskItem added in v0.3.0

func (c *Client) UpdateTaskItem(itemID, provider string, req UpdateTaskItemRequest) (*TaskItemResult, error)

UpdateTaskItem patches an existing item.

func (*Client) UploadDriveFile added in v0.2.0

func (c *Client) UploadDriveFile(fileName, mimeType, folderID, description string, body []byte) (*DriveOperationResult, error)

UploadDriveFile uploads a file to Google Drive. Pass an empty body to create a Google Workspace file.

func (*Client) WithBaseURL

func (c *Client) WithBaseURL(baseURL string) *Client

WithBaseURL sets a custom base URL (useful for testing)

func (*Client) WriteSheetValues added in v0.2.0

func (c *Client) WriteSheetValues(fileID string, req WriteSheetValuesRequest) (*DriveOperationResult, error)

WriteSheetValues writes cell values to a range in a spreadsheet (overwrites)

type CopyFileRequest added in v0.3.1

type CopyFileRequest struct {
	Name           *string `json:"name,omitempty"`
	ParentFolderID *string `json:"parentFolderId,omitempty"`
}

CopyFileRequest represents a request to duplicate a Drive file. Both fields optional.

type CreateDriveFileWithContentRequest added in v0.3.0

type CreateDriveFileWithContentRequest struct {
	Name            string  `json:"name"`
	MimeType        string  `json:"mimeType"`
	Content         string  `json:"content"`
	ContentMimeType *string `json:"contentMimeType,omitempty"`
	FolderID        *string `json:"folderId,omitempty"`
	Description     *string `json:"description,omitempty"`
}

CreateDriveFileWithContentRequest represents a request to create a file with inline UTF-8 text content (POST /files). For Workspace target mime types (document/spreadsheet/presentation), Drive auto-imports the content.

type CreateEventRequest

type CreateEventRequest struct {
	CalendarID  int64     `json:"calendarId"`
	Summary     string    `json:"summary"`
	Description string    `json:"description,omitempty"`
	Location    string    `json:"location,omitempty"`
	From        time.Time `json:"from"`
	To          time.Time `json:"to"`
	IsAllDay    bool      `json:"isAllDay,omitempty"`
	Attendees   []string  `json:"attendees,omitempty"`
	Recurrence  []string  `json:"recurrence,omitempty"`
}

CreateEventRequest represents a request to create an event

type CreateFolderRequest added in v0.2.0

type CreateFolderRequest struct {
	Name           string  `json:"name"`
	ParentFolderID *string `json:"parentFolderId,omitempty"`
	Description    *string `json:"description,omitempty"`
}

CreateFolderRequest represents a request to create a new folder

type CreateTaskItemRequest added in v0.3.0

type CreateTaskItemRequest struct {
	Name    string            `json:"name"`
	GroupID *string           `json:"groupId,omitempty"`
	Fields  map[string]string `json:"fields,omitempty"`
}

CreateTaskItemRequest is the POST /tasks/boards/{id}/items body.

type DeleteEventResponse

type DeleteEventResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

DeleteEventResponse is the response from deleting an event

type DocContentResponse added in v0.2.0

type DocContentResponse struct {
	PlainText         *string     `json:"plainText,omitempty"`
	StructuredContent interface{} `json:"structuredContent,omitempty"`
	Title             *string     `json:"title,omitempty"`
	AccessInfo        *string     `json:"accessInfo,omitempty"`
}

DocContentResponse is the response for reading a Google Doc

type DocEditOperation added in v0.2.0

type DocEditOperation struct {
	Type      string  `json:"type"`
	Text      *string `json:"text,omitempty"`
	Index     *int    `json:"index,omitempty"`
	Find      *string `json:"find,omitempty"`
	Replace   *string `json:"replace,omitempty"`
	MatchCase *bool   `json:"matchCase,omitempty"`
}

DocEditOperation represents a single text editing operation on a Google Doc

type DriveFile added in v0.2.0

type DriveFile struct {
	ID               string            `json:"id"`
	Name             *string           `json:"name,omitempty"`
	MimeType         *string           `json:"mimeType,omitempty"`
	Size             *int64            `json:"size,omitempty"`
	CreatedTime      *string           `json:"createdTime,omitempty"`
	ModifiedTime     *string           `json:"modifiedTime,omitempty"`
	Owners           []DriveUser       `json:"owners,omitempty"`
	SharedWith       []DriveUser       `json:"sharedWith,omitempty"`
	SharedBy         *DriveUser        `json:"sharedBy,omitempty"`
	Description      *string           `json:"description,omitempty"`
	WebViewLink      *string           `json:"webViewLink,omitempty"`
	DownloadLink     *string           `json:"downloadLink,omitempty"`
	ParentFolderID   *string           `json:"parentFolderId,omitempty"`
	ParentFolderName *string           `json:"parentFolderName,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
	IsFolder         bool              `json:"isFolder"`
	Provider         string            `json:"provider"`
}

DriveFile represents a file or folder in Google Drive

type DriveFileContentResponse added in v0.3.0

type DriveFileContentResponse struct {
	FileID          *string `json:"fileId,omitempty"`
	Name            *string `json:"name,omitempty"`
	MimeType        *string `json:"mimeType,omitempty"`
	ContentMimeType *string `json:"contentMimeType,omitempty"`
	Content         *string `json:"content,omitempty"`
	ByteLength      *int64  `json:"byteLength,omitempty"`
	Readable        bool    `json:"readable"`
	Truncated       bool    `json:"truncated"`
	Reason          *string `json:"reason,omitempty"`
	WebViewLink     *string `json:"webViewLink,omitempty"`
	WebContentLink  *string `json:"webContentLink,omitempty"`
	AccessInfo      *string `json:"accessInfo,omitempty"`
}

DriveFileContentResponse is the response for GET /files/{id}/content. Readability is conveyed via Readable+Reason; HTTP status is always 200. Reason values: BINARY_CONTENT, TOO_LARGE, EXPORT_FAILED, USE_SHEETS_ENDPOINT, USE_SLIDES_ENDPOINT.

type DriveFileLinkResponse added in v0.2.0

type DriveFileLinkResponse struct {
	Success               bool              `json:"success"`
	WebViewLink           *string           `json:"webViewLink,omitempty"`
	DownloadUrl           *string           `json:"downloadUrl,omitempty"`
	ExportLinks           map[string]string `json:"exportLinks,omitempty"`
	FileName              *string           `json:"fileName,omitempty"`
	MimeType              *string           `json:"mimeType,omitempty"`
	Size                  *int64            `json:"size,omitempty"`
	IsGoogleWorkspaceFile bool              `json:"isGoogleWorkspaceFile"`
	ErrorMessage          *string           `json:"errorMessage,omitempty"`
	ErrorCode             *string           `json:"errorCode,omitempty"`
}

DriveFileLinkResponse is the response for file download/export links

type DriveFilesResponse added in v0.2.0

type DriveFilesResponse struct {
	Files         []DriveFile `json:"files"`
	NextPageToken *string     `json:"nextPageToken,omitempty"`
	HasMore       bool        `json:"hasMore,omitempty"`
	AccessInfo    *string     `json:"accessInfo,omitempty"`
	AuthWarnings  []string    `json:"authWarnings,omitempty"`
}

DriveFilesResponse is the response for drive file list/search

type DriveListParams added in v0.2.0

type DriveListParams struct {
	Q              string
	FolderID       string
	MimeType       string
	Name           string
	TrashedOnly    bool
	SharedWithMe   bool
	ModifiedAfter  string
	ModifiedBefore string
	Limit          int
	PageToken      string
	OrderBy        string
}

DriveListParams holds parameters for drive file list/search queries

type DriveOperationResult added in v0.2.0

type DriveOperationResult struct {
	Success      bool    `json:"success"`
	FileID       *string `json:"fileId,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
	ErrorCode    *string `json:"errorCode,omitempty"`
}

DriveOperationResult is the response for mutating drive operations

type DrivePermission added in v0.2.0

type DrivePermission struct {
	ID           string  `json:"id"`
	Type         string  `json:"type"`
	Role         string  `json:"role"`
	EmailAddress *string `json:"emailAddress,omitempty"`
	Domain       *string `json:"domain,omitempty"`
	DisplayName  *string `json:"displayName,omitempty"`
}

DrivePermission represents a single sharing permission (ACL entry)

type DrivePermissionsResponse added in v0.2.0

type DrivePermissionsResponse struct {
	Permissions []DrivePermission `json:"permissions"`
	AccessInfo  *string           `json:"accessInfo,omitempty"`
}

DrivePermissionsResponse is the response for file permissions

type DriveUser added in v0.2.0

type DriveUser struct {
	Email       string  `json:"email"`
	DisplayName *string `json:"displayName,omitempty"`
	Role        *string `json:"role,omitempty"`
}

DriveUser represents a file owner or collaborator

type EditDocRequest added in v0.2.0

type EditDocRequest struct {
	Operations []DocEditOperation `json:"operations"`
}

EditDocRequest represents a request to edit a Google Doc

type Email

type Email struct {
	ID          string        `json:"id"`
	ThreadID    string        `json:"threadId,omitempty"`
	Subject     string        `json:"subject,omitempty"`
	From        *Participant  `json:"from,omitempty"`
	To          []Participant `json:"to,omitempty"`
	CC          []Participant `json:"cc,omitempty"`
	BCC         []Participant `json:"bcc,omitempty"`
	BodyPreview string        `json:"bodyPreview,omitempty"`
	Body        string        `json:"body,omitempty"`
	BodyType    string        `json:"bodyType,omitempty"`
	// Pointer types so a wire-omitted field (per spec contract) stays
	// omitted in our re-emission instead of decoding as Go zero-time and
	// re-emitting "0001-01-01T00:00:00Z" through -jc output.
	SentAt            *time.Time   `json:"sentAt,omitempty"`
	ReceivedAt        *time.Time   `json:"receivedAt,omitempty"`
	IsRead            bool         `json:"isRead"`
	IsOutbound        bool         `json:"isOutbound"`
	HasAttachments    bool         `json:"hasAttachments"`
	Attachments       []Attachment `json:"attachments,omitempty"`
	Labels            []string     `json:"labels,omitempty"`
	Importance        string       `json:"importance,omitempty"`
	Provider          string       `json:"provider"`
	EmailAccountOwner string       `json:"emailAccountOwner,omitempty"`
}

Email represents an email message (EmailAccessDto on the wire). IsRead, IsOutbound, HasAttachments, Provider are structural — always present. EmailAccountOwner identifies which connected mailbox a result came from.

type EmailActionResponse

type EmailActionResponse struct {
	Success      bool   `json:"success"`
	EmailID      string `json:"emailId,omitempty"`
	ThreadID     string `json:"threadId,omitempty"`
	ErrorMessage string `json:"errorMessage,omitempty"`
	ErrorCode    string `json:"errorCode,omitempty"`
}

EmailActionResponse is the response for send/reply/forward operations (SendEmailResult on the wire).

type EmailParams

type EmailParams struct {
	Query         string
	From          string
	To            string
	Subject       string
	Label         string
	Unread        *bool
	After         time.Time
	Before        time.Time
	HasAttachment *bool
	Limit         int
	IncludeBody   bool
	PageToken     string
}

EmailParams holds parameters for email list/search queries

type EmailsResponse

type EmailsResponse struct {
	Emails        []Email  `json:"emails"`
	HasMore       bool     `json:"hasMoreEmailsInNextResultPage,omitempty"`
	NextPageToken string   `json:"nextPageToken,omitempty"`
	AccessInfo    string   `json:"accessInfo,omitempty"`
	AuthWarnings  []string `json:"authWarnings,omitempty"`
}

EmailsResponse is the response type for email list/search operations. Pagination: drive iteration via HasMore + NextPageToken — there is no totalCount (the firewall filters server-side and a pre-filter count would mislead).

type Event

type Event struct {
	ID               string     `json:"id"`
	CalendarID       int64      `json:"calendarId,omitempty"`
	Title            string     `json:"title"`
	Summary          string     `json:"summary,omitempty"` // Alias for backwards compat
	Description      string     `json:"description,omitempty"`
	Location         string     `json:"location,omitempty"`
	StartUtc         time.Time  `json:"startUtc"`
	EndUtc           time.Time  `json:"endUtc"`
	StartLocal       string     `json:"startLocal,omitempty"`
	EndLocal         string     `json:"endLocal,omitempty"`
	DurationMinutes  int        `json:"durationMinutes,omitempty"`
	Status           string     `json:"status"`
	AllDay           bool       `json:"allDay"`
	IsAllDay         bool       `json:"isAllDay,omitempty"` // Alias for backwards compat
	Attendees        []Attendee `json:"attendees,omitempty"`
	Organizer        string     `json:"organizer,omitempty"`
	JoinUrl          string     `json:"joinUrl,omitempty"`
	Labels           []string   `json:"labels,omitempty"`
	IsRecurringEvent bool       `json:"isRecurringEvent,omitempty"`
}

Event represents a calendar event

type EventParams

type EventParams struct {
	From             time.Time
	To               time.Time
	CalendarID       int64
	Limit            int
	Offset           int
	Query            string // keyword search (q parameter)
	Attendees        string // comma-separated attendee emails
	IncludeCancelled bool
}

EventParams holds parameters for event queries

type EventsByContactParams

type EventsByContactParams struct {
	Email  string // Partial email matching (case-insensitive)
	Name   string // Partial name/display name matching (case-insensitive)
	Limit  int
	Offset int
}

EventsByContactParams holds parameters for events by-contact queries

type EventsResponse

type EventsResponse struct {
	RequestID                string  `json:"request_id,omitempty"`
	Events                   []Event `json:"events"`
	Meta                     *Meta   `json:"meta,omitempty"`
	AccessInfo               string  `json:"accessInfo,omitempty"`
	CurrentUserCalendarEmail string  `json:"currentUserCalendarEmail,omitempty"`
}

EventsResponse is the response type for calendar events

type FlexTime added in v0.3.0

type FlexTime struct{ time.Time }

FlexTime is a time.Time that tolerates the backend's occasional zero-stamped naive datetimes (e.g. "0001-01-01T00:00:00" with no offset) on meta fields that don't have a query-bound value.

func (*FlexTime) UnmarshalJSON added in v0.3.0

func (t *FlexTime) UnmarshalJSON(b []byte) error

type ForwardEmailRequest

type ForwardEmailRequest struct {
	To       []Participant `json:"to"`
	CC       []Participant `json:"cc,omitempty"`
	Body     string        `json:"body,omitempty"`
	BodyType string        `json:"bodyType,omitempty"`
}

ForwardEmailRequest represents a request to forward an email

type FreeBusyCalendar

type FreeBusyCalendar struct {
	CalendarID   int64        `json:"calendarId"`
	CalendarName string       `json:"calendarName"`
	Busy         []BusyPeriod `json:"busy"`
}

FreeBusyCalendar represents free/busy info for a single calendar

type FreeBusyParams

type FreeBusyParams struct {
	From      time.Time
	To        time.Time
	Calendars string // comma-separated calendar IDs
}

FreeBusyParams holds parameters for free/busy queries

type FreeBusyResponse

type FreeBusyResponse struct {
	Calendars  []FreeBusyCalendar `json:"calendars"`
	AccessInfo string             `json:"accessInfo,omitempty"`
}

FreeBusyResponse is the response type for free/busy queries

type Meta

type Meta struct {
	Count       int      `json:"count,omitempty"`
	Offset      int      `json:"offset,omitempty"`
	HasMore     bool     `json:"hasMore,omitempty"`
	TotalCount  int      `json:"totalCount,omitempty"`
	Truncated   bool     `json:"truncated,omitempty"`
	ExecutionMs int      `json:"execution_ms,omitempty"`
	From        FlexTime `json:"from,omitempty"`
	To          FlexTime `json:"to,omitempty"`
	Timestamp   FlexTime `json:"timestamp,omitempty"`
}

Meta contains response metadata

type ModifyEmailRequest

type ModifyEmailRequest struct {
	MarkAsRead   *bool    `json:"markAsRead,omitempty"`
	AddLabels    []string `json:"addLabels,omitempty"`
	RemoveLabels []string `json:"removeLabels,omitempty"`
}

ModifyEmailRequest represents a request to modify email properties

type MoveFileRequest added in v0.2.0

type MoveFileRequest struct {
	DestinationFolderID string `json:"destinationFolderId"`
}

MoveFileRequest represents a request to move a file to another folder

type Participant

type Participant struct {
	Email string `json:"email"`
	Name  string `json:"name,omitempty"`
}

Participant represents an email participant (sender/recipient)

type RenameFileRequest added in v0.2.0

type RenameFileRequest struct {
	NewName string `json:"newName"`
}

RenameFileRequest represents a request to rename a file or folder

type ReplyEmailRequest

type ReplyEmailRequest struct {
	Body     string        `json:"body"`
	BodyType string        `json:"bodyType,omitempty"`
	ReplyAll bool          `json:"replyAll,omitempty"`
	To       []Participant `json:"to,omitempty"`
	CC       []Participant `json:"cc,omitempty"`
	BCC      []Participant `json:"bcc,omitempty"`
}

ReplyEmailRequest represents a request to reply to an email. To/CC/BCC are additive: they loop in recipients who were not on the original message, on top of the recipients derived server-side from the source thread (the sender, plus the thread's to/cc when ReplyAll is true).

type SendEmailRequest

type SendEmailRequest struct {
	To           []Participant `json:"to"`
	CC           []Participant `json:"cc,omitempty"`
	BCC          []Participant `json:"bcc,omitempty"`
	Subject      string        `json:"subject"`
	Body         string        `json:"body"`
	BodyType     string        `json:"bodyType,omitempty"`
	Importance   string        `json:"importance,omitempty"`
	ConnectionID *int64        `json:"connectionId,omitempty"`
	SendFrom     string        `json:"sendFrom,omitempty"`
}

SendEmailRequest represents a request to send a new email. For multi-mailbox tokens, pin the sending mailbox via SendFrom (email address) or ConnectionID (integer). Omit both to use the first active connection.

type ShareFileRequest added in v0.2.0

type ShareFileRequest struct {
	Type             string  `json:"type"`
	Role             string  `json:"role"`
	EmailAddress     *string `json:"emailAddress,omitempty"`
	Domain           *string `json:"domain,omitempty"`
	SendNotification *bool   `json:"sendNotification,omitempty"`
	Message          *string `json:"message,omitempty"`
}

ShareFileRequest represents a request to share a file

type SheetBulkContentResponse added in v0.3.0

type SheetBulkContentResponse struct {
	SpreadsheetID string                `json:"spreadsheetId"`
	Title         *string               `json:"title,omitempty"`
	Sheets        []SheetBulkContentTab `json:"sheets"`
	AccessInfo    *string               `json:"accessInfo,omitempty"`
}

SheetBulkContentResponse is the response for GET /sheets/{id}/content.

type SheetBulkContentTab added in v0.3.0

type SheetBulkContentTab struct {
	Title     string          `json:"title"`
	Range     string          `json:"range"`
	Values    [][]interface{} `json:"values"`
	Clipped   bool            `json:"clipped,omitempty"`
	FullRange *string         `json:"fullRange,omitempty"`
}

SheetBulkContentTab represents one tab's content in a bulk read. Clipped is true when the tab has more data than was returned; in that case FullRange names the A1 range needed to read the rest via /values.

type SheetMetadataResponse added in v0.2.0

type SheetMetadataResponse struct {
	SpreadsheetID string         `json:"spreadsheetId"`
	Title         *string        `json:"title,omitempty"`
	Sheets        []SheetTabInfo `json:"sheets"`
	AccessInfo    *string        `json:"accessInfo,omitempty"`
}

SheetMetadataResponse is the response for spreadsheet metadata

type SheetRangeUpdate added in v0.3.1

type SheetRangeUpdate struct {
	Range  string          `json:"range"`
	Values [][]interface{} `json:"values"`
}

SheetRangeUpdate is one range/value pair in a batch write.

type SheetTabInfo added in v0.2.0

type SheetTabInfo struct {
	SheetID     int    `json:"sheetId"`
	Title       string `json:"title"`
	RowCount    int    `json:"rowCount"`
	ColumnCount int    `json:"columnCount"`
}

SheetTabInfo represents metadata for a single sheet tab

type SheetValuesResponse added in v0.2.0

type SheetValuesResponse struct {
	Range      string          `json:"range"`
	Values     [][]interface{} `json:"values"`
	AccessInfo *string         `json:"accessInfo,omitempty"`
}

SheetValuesResponse is the response for reading sheet cell values

type SingleDriveFileResponse added in v0.2.0

type SingleDriveFileResponse struct {
	File       *DriveFile `json:"file"`
	AccessInfo *string    `json:"accessInfo,omitempty"`
}

SingleDriveFileResponse wraps a single file with access info

type SingleEmailResponse

type SingleEmailResponse struct {
	Email      Email  `json:"email"`
	AccessInfo string `json:"accessInfo,omitempty"`
}

SingleEmailResponse wraps a single email with access info

type SingleEventResponse

type SingleEventResponse struct {
	Event                    Event  `json:"event"`
	AccessInfo               string `json:"accessInfo,omitempty"`
	CurrentUserCalendarEmail string `json:"currentUserCalendarEmail,omitempty"`
}

SingleEventResponse is the response type for a single event GET

type SlideInfo added in v0.3.0

type SlideInfo struct {
	Index int     `json:"index"`
	Title *string `json:"title,omitempty"`
}

SlideInfo represents one slide's index + title in the deck metadata.

type SlidesContentResponse added in v0.3.0

type SlidesContentResponse struct {
	PlainText         *string     `json:"plainText,omitempty"`
	StructuredContent interface{} `json:"structuredContent,omitempty"`
	Title             *string     `json:"title,omitempty"`
	SlideCount        int         `json:"slideCount"`
	AccessInfo        *string     `json:"accessInfo,omitempty"`
}

SlidesContentResponse is the response for GET /slides/{id}/content. PlainText populated when format=text; StructuredContent populated when format=structured. Never both.

type SlidesMetadataResponse added in v0.3.0

type SlidesMetadataResponse struct {
	PresentationID string      `json:"presentationId"`
	Title          *string     `json:"title,omitempty"`
	Slides         []SlideInfo `json:"slides"`
	AccessInfo     *string     `json:"accessInfo,omitempty"`
}

SlidesMetadataResponse is the response for GET /slides/{id}.

type TaskBlockDto added in v0.3.0

type TaskBlockDto struct {
	ID          string                 `json:"id"`
	Type        string                 `json:"type"`
	Text        *string                `json:"text,omitempty"`
	RichText    *string                `json:"richText,omitempty"`
	HasChildren bool                   `json:"hasChildren"`
	Children    []TaskBlockDto         `json:"children,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

TaskBlockDto is one block of a Notion page body.

type TaskBlockListParams added in v0.3.0

type TaskBlockListParams struct {
	Provider string
	ItemID   string
	Limit    int
	Cursor   string
}

TaskBlockListParams parameterises GET /tasks/items/{id}/blocks.

type TaskBlockListResponse added in v0.3.0

type TaskBlockListResponse struct {
	Blocks     []TaskBlockDto `json:"blocks"`
	NextCursor *string        `json:"nextCursor,omitempty"`
	HasMore    bool           `json:"hasMore"`
	AccessInfo *string        `json:"accessInfo,omitempty"`
}

TaskBlockListResponse wraps a Notion page-body block list.

type TaskBoardDto added in v0.3.0

type TaskBoardDto struct {
	ID            string          `json:"id"`
	Name          *string         `json:"name,omitempty"`
	Description   *string         `json:"description,omitempty"`
	State         *string         `json:"state,omitempty"`
	Groups        []TaskGroupDto  `json:"groups,omitempty"`
	Columns       []TaskColumnDto `json:"columns,omitempty"`
	WorkspaceID   *string         `json:"workspaceId,omitempty"`
	WorkspaceName *string         `json:"workspaceName,omitempty"`
	FolderID      *string         `json:"folderId,omitempty"`
	FolderName    *string         `json:"folderName,omitempty"`
	Tags          []TaskTagDto    `json:"tags,omitempty"`
}

TaskBoardDto is one board (Monday board / Notion database / Asana project / Jira project / Linear team).

type TaskBoardListParams added in v0.3.0

type TaskBoardListParams struct {
	Provider string
	Limit    int
	Cursor   string
	Page     int
}

TaskBoardListParams parameterises GET /tasks/boards.

type TaskBoardResponse added in v0.3.0

type TaskBoardResponse struct {
	Provider   *string       `json:"provider,omitempty"`
	Board      *TaskBoardDto `json:"board,omitempty"`
	AccessInfo *string       `json:"accessInfo,omitempty"`
}

TaskBoardResponse wraps a single-board response.

type TaskBoardsResponse added in v0.3.0

type TaskBoardsResponse struct {
	Provider   *string        `json:"provider,omitempty"`
	Boards     []TaskBoardDto `json:"boards"`
	NextCursor *string        `json:"nextCursor,omitempty"`
	NextPage   *int           `json:"nextPage,omitempty"`
	AccessInfo *string        `json:"accessInfo,omitempty"`
}

TaskBoardsResponse wraps a paginated board list.

type TaskColumnDto added in v0.3.0

type TaskColumnDto struct {
	ID    string `json:"id"`
	Title string `json:"title"`
	Type  string `json:"type"`
}

TaskColumnDto describes a column/property on a board.

type TaskColumnValueDto added in v0.3.0

type TaskColumnValueDto struct {
	ColumnID    string  `json:"columnId"`
	ColumnTitle string  `json:"columnTitle"`
	Type        string  `json:"type"`
	Text        *string `json:"text,omitempty"`
	Value       *string `json:"value,omitempty"`
}

TaskColumnValueDto is one column's value on an item (provider-specific column metadata).

type TaskCommentDto added in v0.3.0

type TaskCommentDto struct {
	ID         string  `json:"id"`
	Body       *string `json:"body,omitempty"`
	AuthorName *string `json:"authorName,omitempty"`
	CreatedAt  *string `json:"createdAt,omitempty"`
}

TaskCommentDto is one comment on an item.

type TaskCommentResult added in v0.3.0

type TaskCommentResult struct {
	Provider     *string `json:"provider,omitempty"`
	Success      bool    `json:"success"`
	CommentID    *string `json:"commentId,omitempty"`
	ErrorCode    *string `json:"errorCode,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

TaskCommentResult is returned by POST /tasks/items/{id}/comments.

type TaskCommentsResponse added in v0.3.0

type TaskCommentsResponse struct {
	Provider   *string          `json:"provider,omitempty"`
	ItemID     string           `json:"itemId"`
	Comments   []TaskCommentDto `json:"comments"`
	AccessInfo *string          `json:"accessInfo,omitempty"`
}

TaskCommentsResponse wraps an item's comment list.

type TaskConnectionInfoDto added in v0.3.0

type TaskConnectionInfoDto struct {
	TaskProviderID      int    `json:"taskProviderId"`
	ProviderCode        string `json:"providerCode"`
	ProviderDisplayName string `json:"providerDisplayName"`
}

TaskConnectionInfoDto is one row in GET /tasks/providers.

type TaskGroupDto added in v0.3.0

type TaskGroupDto struct {
	ID    string  `json:"id"`
	Title string  `json:"title"`
	Color *string `json:"color,omitempty"`
}

TaskGroupDto is a group/section/status-option within a board.

type TaskItemDto added in v0.3.0

type TaskItemDto struct {
	ID           string               `json:"id"`
	Name         *string              `json:"name,omitempty"`
	GroupID      *string              `json:"groupId,omitempty"`
	GroupName    *string              `json:"groupName,omitempty"`
	Status       *string              `json:"status,omitempty"`
	Assignees    []string             `json:"assignees,omitempty"`
	DueDate      *string              `json:"dueDate,omitempty"`
	Priority     *string              `json:"priority,omitempty"`
	Labels       []string             `json:"labels,omitempty"`
	Description  *string              `json:"description,omitempty"`
	Comments     []TaskCommentDto     `json:"comments,omitempty"`
	ColumnValues []TaskColumnValueDto `json:"columnValues,omitempty"`
	SubItems     []TaskItemDto        `json:"subItems,omitempty"`
}

TaskItemDto is one item (task / issue / page) on a board. id, groupId, groupName are structural and always returned even when other fields are masked off by the token's visibleTaskFields.

type TaskItemListParams added in v0.3.0

type TaskItemListParams struct {
	Provider string
	BoardID  string
	Limit    int
	Cursor   string
	Page     int
	GroupID  string
	Query    string
	Status   string
}

TaskItemListParams parameterises GET /tasks/boards/{id}/items.

type TaskItemResponse added in v0.3.0

type TaskItemResponse struct {
	Provider   *string      `json:"provider,omitempty"`
	Item       *TaskItemDto `json:"item,omitempty"`
	AccessInfo *string      `json:"accessInfo,omitempty"`
}

TaskItemResponse wraps a single-item response.

type TaskItemResult added in v0.3.0

type TaskItemResult struct {
	Provider       *string      `json:"provider,omitempty"`
	Success        bool         `json:"success"`
	ItemID         *string      `json:"itemId,omitempty"`
	Item           *TaskItemDto `json:"item,omitempty"`
	ErrorCode      *string      `json:"errorCode,omitempty"`
	ErrorMessage   *string      `json:"errorMessage,omitempty"`
	RejectedFields []string     `json:"rejectedFields,omitempty"`
}

TaskItemResult is returned by POST/PATCH on items. RejectedFields lists keys stripped by the token's writability mask (HTTP 200 still — only "every field rejected" becomes 403 NO_WRITABLE_FIELDS).

type TaskItemsResponse added in v0.3.0

type TaskItemsResponse struct {
	Provider   *string       `json:"provider,omitempty"`
	Items      []TaskItemDto `json:"items"`
	NextCursor *string       `json:"nextCursor,omitempty"`
	NextPage   *int          `json:"nextPage,omitempty"`
	TotalCount *int          `json:"totalCount,omitempty"`
	AccessInfo *string       `json:"accessInfo,omitempty"`
}

TaskItemsResponse wraps a paginated item list. TotalCount is the upstream count BEFORE assignee-rule filtering — len(Items) may be smaller per page when access rules are active.

type TaskOperationResult added in v0.3.0

type TaskOperationResult struct {
	Provider     *string `json:"provider,omitempty"`
	Success      bool    `json:"success"`
	ErrorCode    *string `json:"errorCode,omitempty"`
	ErrorMessage *string `json:"errorMessage,omitempty"`
}

TaskOperationResult is returned by DELETE /tasks/items/{id}.

type TaskProvidersResponse added in v0.3.0

type TaskProvidersResponse []TaskConnectionInfoDto

TaskProvidersResponse is GET /tasks/providers — a flat (un-wrapped) array.

type TaskSearchParams added in v0.3.0

type TaskSearchParams struct {
	Provider string
	Query    string
	Limit    int
	BoardIDs []string
}

TaskSearchParams parameterises GET /tasks/items/search.

type TaskSearchResponse added in v0.3.0

type TaskSearchResponse struct {
	Provider       *string               `json:"provider,omitempty"`
	Query          string                `json:"query"`
	Results        []TaskSearchResultDto `json:"results"`
	TotalResults   int                   `json:"totalResults"`
	BoardsSearched int                   `json:"boardsSearched"`
	BoardsFailed   int                   `json:"boardsFailed"`
	AccessInfo     *string               `json:"accessInfo,omitempty"`
}

TaskSearchResponse wraps a cross-board search. BoardsFailed > 0 means partial results — treat as a soft warning, not an error.

type TaskSearchResultDto added in v0.3.0

type TaskSearchResultDto struct {
	BoardID   string      `json:"boardId"`
	BoardName *string     `json:"boardName,omitempty"`
	Item      TaskItemDto `json:"item"`
}

TaskSearchResultDto is one hit in a cross-board search.

type TaskTagDto added in v0.3.0

type TaskTagDto struct {
	ID    string  `json:"id"`
	Name  string  `json:"name"`
	Color *string `json:"color,omitempty"`
}

TaskTagDto is a board-level tag (Monday).

type ThreadResponse

type ThreadResponse struct {
	ID            string        `json:"id"`
	Subject       string        `json:"subject,omitempty"`
	Messages      []Email       `json:"messages"`
	MessageCount  int           `json:"messageCount"`
	Participants  []Participant `json:"participants,omitempty"`
	LastMessageAt *time.Time    `json:"lastMessageAt,omitempty"`
	Provider      string        `json:"provider"`
	AccessInfo    string        `json:"accessInfo,omitempty"`
}

ThreadResponse is the response type for GET /threads/{id}

type Transport

type Transport struct {
	Base   http.RoundTripper
	APIKey string
}

Transport implements http.RoundTripper with automatic auth and logging

func NewTransport

func NewTransport(apiKey string) *Transport

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

type UpdateEventRequest

type UpdateEventRequest struct {
	Summary           string     `json:"summary,omitempty"`
	Description       string     `json:"description,omitempty"`
	Location          string     `json:"location,omitempty"`
	From              *time.Time `json:"from,omitempty"`
	To                *time.Time `json:"to,omitempty"`
	IsAllDay          *bool      `json:"isAllDay,omitempty"`
	AddAttendees      []string   `json:"addAttendees,omitempty"`
	RemoveAttendees   []string   `json:"removeAttendees,omitempty"`
	SendNotifications *bool      `json:"sendNotifications,omitempty"`
}

UpdateEventRequest represents a request to update an event (PATCH)

type UpdateTaskItemRequest added in v0.3.0

type UpdateTaskItemRequest struct {
	Fields map[string]string `json:"fields"`
}

UpdateTaskItemRequest is the PATCH /tasks/items/{id} body. Only the keys in Fields are updated; omitted keys are left untouched. Empty map -> 400.

type WriteSheetValuesRequest added in v0.2.0

type WriteSheetValuesRequest struct {
	Range            string             `json:"range,omitempty"`
	Values           [][]interface{}    `json:"values,omitempty"`
	Updates          []SheetRangeUpdate `json:"updates,omitempty"`
	ValueInputOption string             `json:"valueInputOption,omitempty"`
}

WriteSheetValuesRequest represents a request to write cell values. Provide either a single Range+Values, or a batch via Updates (the backend ignores the top-level Range/Values when Updates is non-empty).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL