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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/connector-link-kinds.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
"@plotday/twister": minor
---

Added: `kind` to `LinkTypeConfig` so connectors can declare what each link type is: `calendar`, `task`, `team-task`, or `message`. Plot uses this to group connectors and to decide which channels of a connection a workspace can enable, so a composite connector's calendar and mail channels can be treated differently. The field is optional and defaults to `team-task`; declare it on every link type you publish.
2 changes: 2 additions & 0 deletions connectors/airtable/src/airtable.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,6 +111,7 @@ export class Airtable extends Connector<Airtable> {
{
type: "task",
label: "Task",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
logo: LOGO,
Expand DownExpand Up@@ -178,6 +179,7 @@ export class Airtable extends Connector<Airtable> {
{
type: "task",
label: "Task",
kind: "team-task" as const,
noteLabel: "Comment",
logo: LOGO,
logoDark: LOGO,
Expand Down
1 change: 1 addition & 0 deletions connectors/apple/src/calendar/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ export const CALENDAR_LINK_TYPES: LinkTypeConfig[] = [
{
type: "event",
label: "Event",
kind: "calendar",
sourceName: "iCloud Calendar",
sharingModel: "thread",
includesSchedules: true,
Expand Down
1 change: 1 addition & 0 deletions connectors/apple/src/mail/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,6 +15,7 @@ export const MAIL_LINK_TYPES: LinkTypeConfig[] = [
// "… email". `sourceName` brands the type per-product, so it reads
// "iCloud email thread" rather than the full connector name.
label: "Thread",
kind: "message",
sourceName: "iCloud email",
// The connector's word for a note on this thread, so in-thread composer
// copy reads "Add a reply" (matching Gmail) rather than "Add a note".
Expand Down
1 change: 1 addition & 0 deletions connectors/apple/src/reminders/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@ export const REMINDERS_LINK_TYPES: LinkTypeConfig[] = [
{
type: "reminder",
label: "Reminder",
kind: "task",
sourceName: "iCloud Reminders",
// Personal to-do list, no recipient roster — mirrors Google Tasks.
sharingModel: "none" as const,
Expand Down
2 changes: 2 additions & 0 deletions connectors/asana/src/asana.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -204,6 +204,7 @@ export class Asana extends Connector<Asana> {
{
type: "task",
label: "Task",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
supportsFileAttachments: true,
Expand DownExpand Up@@ -357,6 +358,7 @@ export class Asana extends Connector<Asana> {
{
type: "task",
label: "Task",
kind: "team-task" as const,
noteLabel: "Comment",
// Channel-level configs fully shadow the twist-level linkTypes,
// so the sharing model must be repeated here.
Expand Down
3 changes: 3 additions & 0 deletions connectors/attio/src/attio.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -189,6 +189,7 @@ export class Attio extends Connector<Attio> {
{
type: "deal",
label: "Deal",
kind: "team-task",
sharingModel: "channel" as const,
logo: "https://plot.day/assets/logo-attio.svg",
logoDark: "https://plot.day/assets/logo-attio-dark.svg",
Expand All@@ -198,6 +199,7 @@ export class Attio extends Connector<Attio> {
{
type: "person",
label: "Person",
kind: "team-task",
sharingModel: "channel" as const,
logo: "https://plot.day/assets/logo-attio.svg",
logoDark: "https://plot.day/assets/logo-attio-dark.svg",
Expand All@@ -207,6 +209,7 @@ export class Attio extends Connector<Attio> {
{
type: "company",
label: "Company",
kind: "team-task",
sharingModel: "channel" as const,
logo: "https://plot.day/assets/logo-attio.svg",
logoDark: "https://plot.day/assets/logo-attio-dark.svg",
Expand Down
2 changes: 2 additions & 0 deletions connectors/fellow/src/fellow.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -121,12 +121,14 @@ export class Fellow extends Connector<Fellow> {
{
type: "meeting",
label: "Meeting",
kind: "team-task",
sharingModel: "thread" as const,
logo: "https://plot.day/assets/logo-fellow.svg",
},
{
type: "task",
label: "Action Item",
kind: "team-task",
sharingModel: "none" as const,
logo: "https://plot.day/assets/logo-fellow.svg",
supportsAssignee: true,
Expand Down
2 changes: 2 additions & 0 deletions connectors/github/src/github.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -215,6 +215,7 @@ export class GitHub extends Connector<GitHub> {
{
type: "pull_request",
label: "Pull Request",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
logo: "https://api.iconify.design/logos/github-icon.svg",
Expand All@@ -230,6 +231,7 @@ export class GitHub extends Connector<GitHub> {
{
type: "issue",
label: "Issue",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
logo: "https://api.iconify.design/logos/github-icon.svg",
Expand Down
2 changes: 2 additions & 0 deletions connectors/google-chat/src/google-chat.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -109,6 +109,7 @@ export class GoogleChat extends Connector<GoogleChat> {
{
type: "thread",
label: "Thread",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "channel" as const,
// Logo: full-color SVG from static assets (iconify has no logos/google-chat)
Expand All@@ -122,6 +123,7 @@ export class GoogleChat extends Connector<GoogleChat> {
{
type: "dm",
label: "Direct messages",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "thread" as const,
logo: "https://plot.day/assets/logo-google-chat.svg",
Expand Down
10 changes: 5 additions & 5 deletions connectors/google-drive/src/google-drive.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -139,11 +139,11 @@ export class GoogleDrive extends Connector<GoogleDrive> {
"Reads your contacts to show who shared or commented",
];
readonly linkTypes = [
{ type: "doc", label: "Document", noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googledocs.svg?color=%234285F4", logoMono: "https://api.iconify.design/simple-icons/googledocs.svg" },
{ type: "sheet", label: "Spreadsheet", noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googlesheets.svg?color=%2334A853", logoMono: "https://api.iconify.design/simple-icons/googlesheets.svg" },
{ type: "slide", label: "Presentation", noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googleslides.svg?color=%23FBBC04", logoMono: "https://api.iconify.design/simple-icons/googleslides.svg" },
{ type: "form", label: "Form", noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googleforms.svg?color=%23673AB7", logoMono: "https://api.iconify.design/simple-icons/googleforms.svg" },
{ type: "document", label: "File", noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/logos/google-drive.svg", logoMono: "https://api.iconify.design/simple-icons/googledrive.svg" },
{ type: "doc", label: "Document", kind: "team-task" as const, noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googledocs.svg?color=%234285F4", logoMono: "https://api.iconify.design/simple-icons/googledocs.svg" },
{ type: "sheet", label: "Spreadsheet", kind: "team-task" as const, noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googlesheets.svg?color=%2334A853", logoMono: "https://api.iconify.design/simple-icons/googlesheets.svg" },
{ type: "slide", label: "Presentation", kind: "team-task" as const, noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googleslides.svg?color=%23FBBC04", logoMono: "https://api.iconify.design/simple-icons/googleslides.svg" },
{ type: "form", label: "Form", kind: "team-task" as const, noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/simple-icons/googleforms.svg?color=%23673AB7", logoMono: "https://api.iconify.design/simple-icons/googleforms.svg" },
{ type: "document", label: "File", kind: "team-task" as const, noteLabel: "Comment", sharingModel: "thread" as const, logo: "https://api.iconify.design/logos/google-drive.svg", logoMono: "https://api.iconify.design/simple-icons/googledrive.svg" },
];

build(build: ToolBuilder) {
Expand Down
1 change: 1 addition & 0 deletions connectors/google/src/calendar/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,6 +48,7 @@ export const CALENDAR_LINK_TYPES: LinkTypeConfig[] = [
{
type: "event",
label: "Event",
kind: "calendar",
// Per-product brand for aggregate connectors (the Google connector's
// display name is "Gmail & Calendar"); standalone Google Calendar falls
// back to its own display name anyway.
Expand Down
1 change: 1 addition & 0 deletions connectors/google/src/mail/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,7 @@ export const GMAIL_LINK_TYPES: LinkTypeConfig[] = [
{
type: "email",
label: "Thread",
kind: "message",
// Per-product brand for aggregate connectors (the Google connector's
// display name is "Gmail & Calendar"); standalone Gmail falls back to its
// own display name anyway.
Expand Down
1 change: 1 addition & 0 deletions connectors/google/src/tasks/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,6 +17,7 @@ export const TASKS_LINK_TYPES: LinkTypeConfig[] = [
{
type: "task",
label: "Task",
kind: "task",
// Per-product brand for aggregate connectors (the Google connector's
// display name is "Gmail & Calendar"); standalone Google Tasks falls back
// to its own display name anyway.
Expand Down
1 change: 1 addition & 0 deletions connectors/granola/src/granola.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -126,6 +126,7 @@ export class Granola extends Connector<Granola> {
{
type: "meeting",
label: "Notes",
kind: "team-task",
sharingModel: "thread" as const,
logo: "https://plot.day/assets/logo-granola.png",
},
Expand Down
4 changes: 4 additions & 0 deletions connectors/hubspot/src/hubspot.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -287,6 +287,7 @@ export class HubSpot extends Connector<HubSpot> {
{
type: "deal",
label: "Deal",
kind: "team-task",
sharingModel: "channel" as const,
logo: HUBSPOT_LOGO,
statuses: dealStatuses,
Expand All@@ -295,6 +296,7 @@ export class HubSpot extends Connector<HubSpot> {
{
type: "contact",
label: "Contact",
kind: "team-task",
sharingModel: "channel" as const,
logo: HUBSPOT_LOGO,
statuses: [],
Expand All@@ -303,6 +305,7 @@ export class HubSpot extends Connector<HubSpot> {
{
type: "company",
label: "Company",
kind: "team-task",
sharingModel: "channel" as const,
logo: HUBSPOT_LOGO,
statuses: [],
Expand All@@ -314,6 +317,7 @@ export class HubSpot extends Connector<HubSpot> {
{
type: "task",
label: "Task",
kind: "team-task",
sharingModel: "channel" as const,
logo: HUBSPOT_LOGO,
statuses: TASK_STATUSES,
Expand Down
2 changes: 2 additions & 0 deletions connectors/jira/src/jira.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -97,6 +97,7 @@ export class Jira extends Connector<Jira> {
{
type: "issue",
label: "Issue",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
logo: "https://api.iconify.design/logos/jira.svg",
Expand DownExpand Up@@ -178,6 +179,7 @@ export class Jira extends Connector<Jira> {
{
type: "issue",
label: "Issue",
kind: "team-task" as const,
noteLabel: "Comment",
// Channel-level configs fully shadow the twist-level linkTypes,
// so sharingModel + logos must be repeated here (matches Linear).
Expand Down
2 changes: 2 additions & 0 deletions connectors/linear/src/linear.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,6 +104,7 @@ export class Linear extends Connector<Linear> {
{
type: "issue",
label: "Issue",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
composePlaceholder: "Create a Linear issue",
Expand DownExpand Up@@ -198,6 +199,7 @@ export class Linear extends Connector<Linear> {
{
type: "issue",
label: "Issue",
kind: "team-task" as const,
noteLabel: "Comment",
// Channel-level configs fully shadow the twist-level linkTypes in
// getTypeConfig(), so the sharing model must be repeated here —
Expand Down
2 changes: 2 additions & 0 deletions connectors/ms-teams/src/ms-teams.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -91,6 +91,7 @@ export class MsTeams extends Connector<MsTeams> {
{
type: "thread",
label: "Thread",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "channel" as const,
logo: "https://api.iconify.design/logos/microsoft-teams.svg",
Expand All@@ -103,6 +104,7 @@ export class MsTeams extends Connector<MsTeams> {
{
type: "dm",
label: "Direct messages",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "thread" as const,
logo: "https://api.iconify.design/logos/microsoft-teams.svg",
Expand Down
1 change: 1 addition & 0 deletions connectors/outlook/src/calendar/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,6 +29,7 @@ export const OUTLOOK_CALENDAR_LINK_TYPES: LinkTypeConfig[] = [
{
type: "event",
label: "Event",
kind: "calendar",
// Per-product brand for the aggregate Outlook connector (display name
// "Outlook"); standalone Outlook Calendar falls back to its own display name.
sourceName: "Outlook Calendar",
Expand Down
1 change: 1 addition & 0 deletions connectors/outlook/src/mail/channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,6 +20,7 @@ export const OUTLOOK_MAIL_LINK_TYPES: LinkTypeConfig[] = [
{
type: "email",
label: "Thread",
kind: "message",
// Per-product brand for the aggregate Outlook connector (display name
// "Outlook"); standalone Outlook Mail falls back to its own display name.
sourceName: "Outlook Mail",
Expand Down
2 changes: 2 additions & 0 deletions connectors/slack/src/slack.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -303,6 +303,7 @@ export class Slack extends Connector<Slack> {
{
type: "thread",
label: "Thread",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "channel" as const,
supportsFileAttachments: true,
Expand All@@ -315,6 +316,7 @@ export class Slack extends Connector<Slack> {
{
type: "dm",
label: "Direct messages",
kind: "message" as const,
noteLabel: "Message",
sharingModel: "thread" as const,
supportsFileAttachments: true,
Expand Down
2 changes: 2 additions & 0 deletions connectors/todoist/src/todoist.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -124,6 +124,7 @@ export class Todoist extends Connector<Todoist> {
{
type: "task",
label: "Task",
kind: "task" as const,
noteLabel: "Comment",
sharingModel: "thread" as const,
composePlaceholder: "Create a Todoist task",
Expand DownExpand Up@@ -202,6 +203,7 @@ export class Todoist extends Connector<Todoist> {
{
type: "task",
label: "Task",
kind: "task" as const,
noteLabel: "Comment",
// Channel-level configs fully shadow the twist-level linkTypes
// in getTypeConfig(), so the sharing model and capability flags
Expand Down
1 change: 1 addition & 0 deletions connectors/trello/src/trello-channels.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,6 +19,7 @@ export function buildCardLinkType(lists: TrelloList[]): LinkTypeConfig {
return {
type: "card",
label: "Card",
kind: "team-task",
noteLabel: "Comment",
sharingModel: "channel",
composePlaceholder: "Create a Trello card",
Expand Down
1 change: 1 addition & 0 deletions connectors/trello/src/trello.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,6 +32,7 @@ export class Trello extends Connector<Trello> {
{
type: "card",
label: "Card",
kind: "team-task" as const,
noteLabel: "Comment",
sharingModel: "channel" as const,
composePlaceholder: "Create a Trello card",
Expand Down
Loading
Loading