Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.2 KB
Raw Blame
import type { Accessor } from 'solid-js';
import type { EmailRecipient } from '../core/email-recipient';
import type { SenderInbox } from '../core/email-sender';
import type { ReplyType } from '../core/reply-type';

export interface EmailFormContextInputs {
  viewerEmail: Accessor<string | undefined>;
  inboxes: Accessor<SenderInbox[]>;
  /** The composer's fallback sending inbox, used when a reply's own inbox is
   *  not the viewer's (a thread shared with them). */
  primaryInboxId?: Accessor<string | undefined>;
}

/** Only the reply capabilities consumed by the composer; the caller owns navigation. */
export interface EmailReplySession {
  thread: Accessor<
    | {
        db_id: string;
        link_id: string;
        inbox_visible: boolean;
        provider_id?: string | null;
      }
    | undefined
  >;
  recipientOptions: Accessor<EmailRecipient[]>;
  /** False for a thread shared with the viewer: it sits in its owner's inbox,
   *  which the viewer cannot send from. */
  ownsThreadInbox: Accessor<boolean>;
  isPersonalReply: Accessor<boolean>;
  onDraftRemoved(): void;
  exitToThread(target: 'last' | 'selected'): boolean;
  replyRequest: {
    replyType: Accessor<ReplyType | undefined>;
    clear(): void;
  };
}