Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat: getting started (#5226)
Peter Chinmana519f0a68e9c
diff --git a/.sqlx/query-8d25b1711e2c00fe92b1921e1c2ee17e311301f88b1550dbff4eb41b6e12db13.json b/.sqlx/query-92d726292a9cbe88efbfbb2a07c245b0dfd0dfcdd308f23084b7f076c26462b7.jsonsimilarity index 79%rename from .sqlx/query-8d25b1711e2c00fe92b1921e1c2ee17e311301f88b1550dbff4eb41b6e12db13.jsonrename to .sqlx/query-92d726292a9cbe88efbfbb2a07c245b0dfd0dfcdd308f23084b7f076c26462b7.jsonindex 9623da14ab..a7d36b84a3 100644--- a/.sqlx/query-8d25b1711e2c00fe92b1921e1c2ee17e311301f88b1550dbff4eb41b6e12db13.json+++ b/.sqlx/query-92d726292a9cbe88efbfbb2a07c245b0dfd0dfcdd308f23084b7f076c26462b7.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT\n u.\"id\" as \"user_id\",\n u.\"email\" as \"email\",\n u.\"stripeCustomerId\" as \"stripe_customer_id?\",\n u.\"name\" as name,\n u.\"tutorialComplete\" as tutorial_complete,\n u.\"group\" as \"group?\",\n u.\"hasChromeExt\" as has_chrome_ext,\n u.\"aiDataConsent\" as ai_data_consent,\n mu.has_trialed as has_trialed,\n u.macro_user_id as \"macro_user_id\"\n FROM \"User\" u\n JOIN \"macro_user\" mu ON u.macro_user_id = mu.id\n WHERE u.\"id\" = $1\n ",+ "query": "\n SELECT\n u.\"id\" as \"user_id\",\n u.\"email\" as \"email\",\n u.\"stripeCustomerId\" as \"stripe_customer_id?\",\n u.\"name\" as name,\n u.\"tutorialComplete\" as tutorial_complete,\n u.\"group\" as \"group?\",\n u.\"hasChromeExt\" as has_chrome_ext,\n u.\"aiDataConsent\" as ai_data_consent,\n mu.has_trialed as has_trialed,\n u.macro_user_id as \"macro_user_id\",\n u.\"createdAt\" as \"created_at?\"\n FROM \"User\" u\n JOIN \"macro_user\" mu ON u.macro_user_id = mu.id\n WHERE u.\"id\" = $1\n ","describe": {"columns": [{@@ -52,6 +52,11 @@"ordinal": 9,"name": "macro_user_id","type_info": "Uuid"+ },+ {+ "ordinal": 10,+ "name": "created_at?",+ "type_info": "Timestamptz"}],"parameters": {@@ -69,8 +74,9 @@false,false,false,- false+ false,+ true]},- "hash": "8d25b1711e2c00fe92b1921e1c2ee17e311301f88b1550dbff4eb41b6e12db13"+ "hash": "92d726292a9cbe88efbfbb2a07c245b0dfd0dfcdd308f23084b7f076c26462b7"}diff --git a/Cargo.lock b/Cargo.lockindex 72429e8e5c..d56c9d81d1 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -969,6 +969,7 @@ dependencies = ["aws-sdk-sqs","axum","base64 0.22.1",+ "bot_id","channels","chrono","comms_db_client",@@ -8992,6 +8993,7 @@ dependencies = [name = "mention_utils"version = "0.1.0"dependencies = [+ "bot_id","channel_sender","cool_asserts","either",@@ -15443,6 +15445,7 @@ dependencies = ["js-sys","rand 0.10.1","serde_core",+ "sha1_smol","wasm-bindgen",]diff --git a/Cargo.toml b/Cargo.tomlindex 3eeab8867f..67178b708d 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -256,7 +256,7 @@ utoipa = { version = "5.4.0", features = ["uuid",] }utoipa-swagger-ui = { version = "9", features = ["axum", "vendored"] }-uuid = { version = "1.15.1", features = ["fast-rng", "serde", "v4", "v7"] }+uuid = { version = "1.15.1", features = ["fast-rng", "serde", "v4", "v5", "v7"] }wasm-bindgen = "0.2"wasm-bindgen-futures = "0.4"# this is pinned to match axum 0.7.9 dependency requirementsdiff --git a/apps/web/src/components/app/Layout.tsx b/apps/web/src/components/app/Layout.tsxindex 839859ccca..4d5df93497 100644--- a/apps/web/src/components/app/Layout.tsx+++ b/apps/web/src/components/app/Layout.tsx@@ -1,3 +1,4 @@+import { DEFAULT_ROUTE } from '@app/constants/defaultRoute';import { ROUTER_BASE_CONCAT } from '@app/constants/routerBase';import Banner from '@app/features/auth/banner/Banner';import { GithubReauthenticationPrompt } from '@app/features/auth/GithubReauthenticationPrompt';@@ -304,12 +305,14 @@ function NewOnboardingRedirect() {}if (AUTH_URLS.includes(location.pathname)) return;// Preserve the deep link the user arrived on (a shared doc, an invite):- // the flow carries it as ?next and its finish() returns there instead of- // home. Base-relative so navigate() can resolve it against the router.+ // /setup carries it as ?next and its finish() returns there instead of+ // the post-setup landing. Base-relative so navigate() can resolve it+ // against the router.const target =location.pathname.slice(ROUTER_BASE_CONCAT.length - 1) + location.search;+ const isGenericEntry = target === '/' || target.startsWith(DEFAULT_ROUTE);navigate(- target === '/'+ isGenericEntry? '/onboarding': `/onboarding?next=${encodeURIComponent(target)}`,{ replace: true }diff --git a/apps/web/src/components/app/app-sidebar/sidebar.tsx b/apps/web/src/components/app/app-sidebar/sidebar.tsxindex cf242641ef..70beb11590 100644--- a/apps/web/src/components/app/app-sidebar/sidebar.tsx+++ b/apps/web/src/components/app/app-sidebar/sidebar.tsx@@ -5,6 +5,8 @@ import { ChannelsUnreadWidget } from '@app/features/channel/sidebar/channels-unrimport { CommandState } from '@app/features/command';import { SidebarCreateMenu } from '@app/features/command/sidebar/sidebar-create-menu';import { FavoritesSection } from '@app/features/favorites/sidebar/favorites-section';+import { useGettingStartedEnabled } from '@app/features/getting-started/account-gate';+import { createGettingStartedSidebarVisibility } from '@app/features/getting-started/sidebar-visibility';import { buildDocumentTypeQuery } from '@app/features/next-soup/filters/configs/document-type-query';import { getDocumentsFilterSplit } from '@app/features/next-soup/soup-view/documents-filter-controllers';import {@@ -41,6 +43,7 @@ import { useHasPaidAccess } from '@core/auth';import { useLogout } from '@core/auth/logout';import { ContextMenuContent, MenuItem } from '@core/component/ContextMenu';import { inboxIconProps } from '@core/component/inboxIcon';+import { toast } from '@core/component/Toast/Toast';import { UserIcon } from '@core/component/UserIcon';import {ENABLE_ACTIVITY,@@ -77,12 +80,15 @@ import { AnimatedTaskIcon } from '@icon/wide-task';import { ContextMenu } from '@kobalte/core/context-menu';import CaretRightIcon from '@phosphor/caret-right.svg';import CaretUpIcon from '@phosphor/caret-up.svg';+import CompassIcon from '@phosphor/compass.svg';import DotsThreeIcon from '@phosphor/dots-three.svg';import GearIcon from '@phosphor/gear.svg';import HomeIcon from '@phosphor/house.svg';import MagnifyingGlassIcon from '@phosphor/magnifying-glass.svg';import SignOutIcon from '@phosphor/sign-out.svg';import UsersThreeIcon from '@phosphor/users-three.svg';+import XIcon from '@phosphor/x.svg';+import { isRealNamePart, useOwnUserName } from '@queries/auth/user-name-self';import { useEmailLinksQuery } from '@queries/email/link';import {useJoinTeamMutation,@@ -90,19 +96,17 @@ import {useUserInvitesQuery,} from '@queries/team/invitations';import { useCurrentTeamQuery } from '@queries/team/teams';-import { authServiceClient } from '@service-auth/client';import type { TeamInviteDetails } from '@service-auth/generated/schemas/teamInviteDetails';import { createElementSize } from '@solid-primitives/resize-observer';import { debounce } from '@solid-primitives/scheduled';import { makePersisted } from '@solid-primitives/storage';import { useLocation } from '@solidjs/router';-import { Button, cn, Dropdown, Hotkey, NavRow } from '@ui';+import { Button, cn, Dropdown, Hotkey, NavRow, Tooltip } from '@ui';import {type Component,type ComponentProps,createEffect,createMemo,- createResource,createSignal,For,type JSX,@@ -382,7 +386,10 @@ export const GoToHotkeys = () => {},});- const links = createMemo((): SidebarItem[] => buildSidebarLinks());+ const gettingStartedEnabled = useGettingStartedEnabled();+ const links = createMemo((): SidebarItem[] =>+ buildSidebarLinks(gettingStartedEnabled())+ );const debounceResetHotkeysState = debounce(resetGoToHotkeysState, 2000);const debounceSetHotkeyVisible = debounce(@@ -801,17 +808,14 @@ const SidebarSettingsWidget = (props: SidebarSettingsWidgetProps) => {const email = useEmail();const logout = useLogout();- const [userName] = createResource(async () => {- const response = await authServiceClient.getUserName();- return response.isOk() ? response.value : null;- });+ const userName = useOwnUserName();// Prefer the user's real name (first/last); fall back to their email.const displayName = createMemo(() => {const name = userName();const parts = [name?.first_name, name?.last_name].map((part) => part?.trim())- .filter((part): part is string => Boolean(part) && part !== 'N/A');+ .filter((part): part is string => isRealNamePart(part));return parts.length > 0 ? parts.join(' ') : (email() ?? 'Macro User');});@@ -952,6 +956,15 @@ const DASHBOARD_LINK: SidebarItem = {hotkeyToken: TOKENS.sidebar.goTo.home,};+const GETTING_STARTED_LINK: SidebarItem = {+ id: 'getting-started',+ label: 'Getting Started',+ href: '/getting-started',+ icon: CompassIcon,+ hotkey: 's',+ hotkeyToken: TOKENS.sidebar.goTo.gettingStarted,+};+const ACTIVITY_LINK: SidebarItem = {id: 'activity',label: 'Activity',@@ -962,16 +975,24 @@ const ACTIVITY_LINK: SidebarItem = {};/**- * Assemble the ordered sidebar link list: the static links plus Home and the- * flag-gated Activity, Calls, and CRM entries in their correct positions.+ * Assemble the ordered sidebar link list: the static links plus Home, Getting+ * started, and the flag-gated Activity, Calls, and CRM entries in their+ * correct positions.* Shared by the rendered sidebar (`AppSidebar.visibleLinks`) and the* always-mounted `GoToHotkeys` registrar so their link sets can't drift. Call* from a reactive context — it reads `ENABLE_CALLS()` / `ENABLE_CRM()`.+ * `showGettingStarted` is the account-age gate (`useGettingStartedEnabled`),+ * passed in because this runs outside a component; when false the link is+ * fully absent — row, `g s` hotkey, and command menu entry.* Rendered sections additionally drop `hiddenFromSidebar` entries, which have* hotkeys but no sidebar row.*/-const buildSidebarLinks = (): SidebarItem[] => {- let links: SidebarItem[] = [DASHBOARD_LINK, ...SIDEBAR_LINKS];+const buildSidebarLinks = (showGettingStarted: boolean): SidebarItem[] => {+ let links: SidebarItem[] = [+ DASHBOARD_LINK,+ ...(showGettingStarted ? [GETTING_STARTED_LINK] : []),+ ...SIDEBAR_LINKS,+ ];if (ENABLE_ACTIVITY) {const idx = links.findIndex((link) => link.id === 'inbox');@@ -1056,7 +1077,14 @@ export const AppSidebar = (props: AppSidebarProps) => {enabledOverride: ENABLE_NEW_PRICING_OVERRIDE,});- const allLinks = createMemo((): SidebarItem[] => buildSidebarLinks());+ const gettingStartedEnabled = useGettingStartedEnabled();+ const allLinks = createMemo((): SidebarItem[] =>+ buildSidebarLinks(gettingStartedEnabled())+ );++ // Hides only the rendered row: the g+s hotkey and command menu entry keep+ // working (like `hiddenFromSidebar` links), so the page stays reachable.+ const gettingStartedVisibility = createGettingStartedSidebarVisibility();const openSettingsTab = (tab: SettingsTab) => {if (!isTabAvailable(tab)) return;@@ -1184,6 +1212,23 @@ export const AppSidebar = (props: AppSidebarProps) => {sidebarState={sidebarDisplayState()}hotkeyVisible={goToHotkeyVisible()}onContextMenuOpenChange={handleOverlayDropdownOpenChange}+ removeAction={+ link.id === 'getting-started'+ ? {+ tooltip: 'Remove from sidebar',+ onRemove: () => {+ gettingStartedVisibility.hide();+ // Hiding drops the row only — the go-to hotkey and its+ // command-menu entry stay registered (see buildSidebarLinks),+ // so this stays true.+ toast.success('Removed from sidebar', {+ subtext:+ 'You can always find Getting Started in the command menu.',+ });+ },+ }+ : undefined+ }/>);@@ -1199,7 +1244,10 @@ export const AppSidebar = (props: AppSidebarProps) => {});const topLinks = createMemo(() =>- ['home', 'inbox', 'activity']+ ['home', 'getting-started', 'inbox', 'activity']+ .filter(+ (id) => id !== 'getting-started' || !gettingStartedVisibility.hidden()+ ).map((id) => findLink(id)).filter((link): link is SidebarItem => link !== undefined));@@ -1559,6 +1607,12 @@ interface SidebarLinkProps extends SidebarItem {* Email link's expand chevron.*/trailingWhenActive?: JSX.Element;+ /**+ * Swaps the icon for an X while the row is hovered (expanded sidebar only —+ * in slim mode the icon is the whole row, so the swap would hijack+ * navigation). Clicking the X calls `onRemove` instead of navigating.+ */+ removeAction?: { tooltip: string; onRemove: () => void };}const SidebarLink = (props: SidebarLinkProps) => {@@ -1679,7 +1733,53 @@ const SidebarLink = (props: SidebarLinkProps) => {><Show when={props.icon}><div class="size-5 shrink-0 flex items-center justify-center [&_svg]:size-3.5">- <Dynamic component={props.icon} triggerAnimation={isHovering()} />+ <Show+ when={+ isHovering() && props.sidebarState !== 'slim'+ ? props.removeAction+ : undefined+ }+ fallback={+ <Dynamic+ component={props.icon}+ triggerAnimation={isHovering()}+ />+ }+ >+ {(removeAction) => (+ <Tooltip+ label={removeAction().tooltip}+ as="span"+ placement="top"+ >+ <span+ role="button"+ tabIndex={0}+ aria-label={removeAction().tooltip}+ class="flex items-center justify-center text-ink-muted+ rounded-md hover:bg-failure hover:text-surface p-1"+ onMouseDown={(e) => {+ // The row navigates on mousedown; the X must not.+ e.stopPropagation();+ e.preventDefault();+ }}+ onClick={(e) => {+ e.stopPropagation();+ removeAction().onRemove();+ }}+ onKeyDown={(e) => {+ if (e.key === 'Enter' || e.key === ' ') {+ e.preventDefault();+ e.stopPropagation();+ removeAction().onRemove();+ }+ }}+ >+ <XIcon />+ </span>+ </Tooltip>+ )}+ </Show></div></Show>diff --git a/apps/web/src/components/app/split-layout/componentRegistry.tsx b/apps/web/src/components/app/split-layout/componentRegistry.tsxindex 3b79bdb115..bfd47ac7c0 100644--- a/apps/web/src/components/app/split-layout/componentRegistry.tsx+++ b/apps/web/src/components/app/split-layout/componentRegistry.tsx@@ -1,3 +1,4 @@+import { GettingStarted } from '@app/features/getting-started';import { Home } from '@app/features/home';import { queryStateFrom } from '@app/features/next-soup/filters/filter-store';import type { SetPredicatesInput } from '@app/features/next-soup/filters/filter-store/predicates-store';@@ -8,6 +9,7 @@ import { NonMemberChannelPreview } from '@app/features/next-soup/soup-view/non-mimport { SoupView } from '@app/features/next-soup/soup-view/soup-view';import { SettingsPanelComponentWrapper } from '@app/features/settings/Settings';import { useAnalytics } from '@app/lib/analytics/analytics-context';+import { globalSplitManager } from '@app/signal/splitLayout';import { ChannelCompose } from '@block-channel/component/Compose';import { EmailCompose } from '@block-email/component/compose/Compose';import { ComposeTask } from '@block-md/component/ComposeTask';@@ -32,6 +34,7 @@ import { EmptyStatePanel } from '@ui';import { type Component, type JSXElement, lazy, onMount, Show } from 'solid-js';import type { SplitContent } from './layoutManager';import { useSplitPanelOrThrow } from './layoutUtils';+import { previewEmptyStateForContent } from './previewController';function usePageViewTracking(pageTitle: string) {const analytics = useAnalytics();@@ -144,6 +147,14 @@ registerComponent(}));+registerComponent(+ 'getting-started',+ withAuth(() => {+ usePageViewTracking('getting-started');+ return <GettingStarted />;+ })+);+registerComponent('inbox',withAuth(() => {@@ -384,15 +395,31 @@ registerComponent(registerComponent('loading', () => <LoadingBlock />);// Placeholder a Preview Pair's Viewer opens before its Controller has-// navigated anywhere (see layoutManager engagePreviewMode).+// navigated anywhere (see layoutManager engagePreviewMode). Controllers can+// override the copy via `emptyState` in previewController.ts; resolving it+// from the live pair (rather than params) keeps the override across URL+// restore.registerComponent('preview-empty', () => {const panel = useSplitPanelOrThrow();onMount(() => panel.handle.setDisplayName('Preview'));+ const emptyState = () => {+ const manager = globalSplitManager();+ const controllerId = manager?.controllerOf(panel.handle.id);+ const controllerContent = controllerId+ ? manager?.getSplit(controllerId)?.content()+ : undefined;+ return controllerContent+ ? previewEmptyStateForContent(controllerContent)+ : undefined;+ };return (<EmptyStatePanelgraphic={EmptyStatePreviewIcon}- title="No content selected"- description="Select an item from the connected list to preview it here"+ title={emptyState()?.title ?? 'No content selected'}+ description={+ emptyState()?.description ??+ 'Select an item from the connected list to preview it here'+ }centered/>);diff --git a/apps/web/src/components/app/split-layout/previewController.ts b/apps/web/src/components/app/split-layout/previewController.tsindex 0b94143117..0bcb070473 100644--- a/apps/web/src/components/app/split-layout/previewController.ts+++ b/apps/web/src/components/app/split-layout/previewController.ts@@ -12,11 +12,19 @@ const DEFAULT_PREVIEW_CONTROLLER_WIDTH: PreviewControllerWidth = {preferredPx: 440,};+/** Copy for a controller's empty-Viewer placeholder (`preview-empty`). */+export type PreviewEmptyState = {+ title: string;+ description: string;+};+type PreviewControllerContentConfig = {type: SplitContentType;/** Omit to match every block with this content type. */id?: string;redistributionWidth?: PreviewControllerWidth;+ /** Overrides the generic "No content selected" placeholder copy. */+ emptyState?: PreviewEmptyState;};/** Non-list additions and exact-content overrides for preview controllers. */@@ -25,6 +33,14 @@ const PREVIEW_CONTROLLER_CONTENT_CONFIG: readonly PreviewControllerContentConfig{type: 'project',},+ {+ type: 'component',+ id: 'getting-started',+ emptyState: {+ title: 'Welcome to Macro',+ description: 'Select an item from the list to get started.',+ },+ },{type: 'component',id: LIST_VIEW_ID.channels,@@ -60,6 +76,13 @@ export function isPreviewControllerContent(content: SplitContent): boolean {);}+/** Custom empty-Viewer copy for a controller's content, if configured. */+export function previewEmptyStateForContent(+ content: SplitContent+): PreviewEmptyState | undefined {+ return previewControllerConfig(content)?.emptyState;+}+export function previewControllerWidthForContent(content: SplitContent,viewportWidth?: numberdiff --git a/apps/web/src/features/getting-started/account-gate.ts b/apps/web/src/features/getting-started/account-gate.tsnew file mode 100644index 0000000000..0e91e35be8--- /dev/null+++ b/apps/web/src/features/getting-started/account-gate.ts@@ -0,0 +1,26 @@+import { useUserInfo } from '@core/context/user';+import type { Accessor } from 'solid-js';++/**+ * Accounts created on or after this date get the Getting Started experience.+ * Older accounts never see it — the checklist assumes the fresh-signup+ * starter content (support channel, how-to guide, starter tasks). Accounts+ * that predate creation-time tracking have no `createdAt` at all and are+ * treated as old.+ */+export const GETTING_STARTED_MIN_ACCOUNT_CREATED = new Date(+ '2026-07-28T00:00:00Z'+);++/**+ * Whether the current account is new enough for the Getting Started+ * experience. `false` while user info is still loading.+ */+export function useGettingStartedEnabled(): Accessor<boolean> {+ const userInfo = useUserInfo();+ return () => {+ const createdAt = userInfo()?.createdAt;+ if (!createdAt) return false;+ return new Date(createdAt) >= GETTING_STARTED_MIN_ACCOUNT_CREATED;+ };+}diff --git a/apps/web/src/features/getting-started/agent-examples.ts b/apps/web/src/features/getting-started/agent-examples.tsnew file mode 100644index 0000000000..d96d9a5538--- /dev/null+++ b/apps/web/src/features/getting-started/agent-examples.ts@@ -0,0 +1,54 @@+import { AnimatedFileMdIcon } from '@icon/wide-fileMd';+import { AnimatedTaskIcon } from '@icon/wide-task';+import TagIcon from '@phosphor/tag.svg';+import type { Component } from 'solid-js';++/**+ * One "put the agent to work" example: the row's copy plus the prompt it+ * sends. Kept as plain data — these are edited for wording far more often+ * than the behavior around them, which is identical for every example (start+ * a chat with the prompt; see `getting-started.tsx`).+ */+export type AgentExample = {+ id: string;+ icon: Component<{ class?: string }>;+ title: string;+ description: string;+ prompt: string;+};++/** App links the example prompts ask the agent to include in its reply. */+const MANAGE_TAGS_LINK = 'macro.com/app/settings/tags';+const TASKS_LIST_LINK = 'macro.com/app/component/tasks';++export const AGENT_EXAMPLES: AgentExample[] = [+ {+ id: 'example-organize-inbox',+ icon: TagIcon,+ title: 'Auto-organize my inbox',+ description: 'Categorize and tag your recent email',+ prompt: `Categorize and tag recent emails in my inbox. Link me to ${MANAGE_TAGS_LINK} where I can manage all of my tags.`,+ },+ {+ id: 'example-pull-tasks',+ icon: AnimatedTaskIcon,+ title: 'Pull tasks from inbox',+ description: 'Turn important emails into tasks',+ prompt: `Find my most important recent emails and create tasks from them. Link me to ${TASKS_LIST_LINK} where I can see all of my tasks.`,+ },+ {+ id: 'example-weekly-brief',+ icon: AnimatedFileMdIcon,+ title: 'Build weekly brief',+ description: 'Summarize your week with links to sources',+ prompt:+ 'Review my recent emails, documents, and tasks from the past week. Identify key decisions, open questions, blockers, and next steps, then create a concise weekly briefing document with links to the original sources.',+ },+ {+ id: 'example-auto-tag-tasks',+ icon: TagIcon,+ title: 'Auto-tag my tasks',+ description: 'Keep your task list organized automatically',+ prompt: `Review my open tasks and apply helpful tags to organize them. Link me to ${MANAGE_TAGS_LINK} where I can manage all of my tags.`,+ },+];diff --git a/apps/web/src/features/getting-started/getting-started-rows.tsx b/apps/web/src/features/getting-started/getting-started-rows.tsxnew file mode 100644index 0000000000..b952fd95f4--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-rows.tsx@@ -0,0 +1,81 @@+import ChevronDownIcon from '@phosphor/caret-down.svg';+import CheckCircleIcon from '@phosphor/check-circle.svg';+import { cn, InlineCheckbox } from '@ui';+import { Show } from 'solid-js';+import type {+ GettingStartedAction,+ GettingStartedSection,+} from './getting-started-types';++/**+ * One activating action in the shared home-row style (icon + title ++ * description, full width), with a trailing checkbox that fills once the+ * action completes. Rows stay clickable when complete.+ */+export function ActionRow(props: {+ action: GettingStartedAction;+ complete: boolean;+ onActivate: () => void;+}) {+ return (+ <button+ type="button"+ class="group flex w-full items-center gap-3.5 rounded-xl border border-edge-muted bg-active px-4 py-3 text-left transition-colors hover:bg-hover"+ onClick={props.onActivate}+ >+ <span class="flex size-7 shrink-0 items-center justify-center rounded-lg bg-surface text-ink-muted">+ <props.action.icon class="size-4" />+ </span>+ <div class="min-w-0 flex-1">+ <div class="text-sm font-medium text-ink">{props.action.title}</div>+ <div class="text-xs text-ink-muted">{props.action.description}</div>+ </div>+ <InlineCheckbox checked={props.complete} />+ </button>+ );+}++/**+ * Section header: title, an `x/n completed` counter that becomes a check mark+ * once every action is done, and a chevron collapse toggle (the whole header+ * toggles).+ */+export function SectionHeader(props: {+ section: GettingStartedSection;+ collapsed: boolean;+ completed: number;+ total: number;+ onToggle: () => void;+}) {+ const allComplete = () => props.total > 0 && props.completed >= props.total;+ return (+ <button+ type="button"+ class="group flex w-full items-center justify-between gap-3 px-1 text-left"+ aria-expanded={!props.collapsed}+ onClick={props.onToggle}+ >+ <div class="min-w-0 truncate text-sm font-medium text-ink">+ {props.section.title}+ </div>+ <span class="flex shrink-0 items-center gap-2">+ <Show+ when={allComplete()}+ fallback={+ <span class="text-xs tabular-nums text-ink-extra-muted">+ {props.completed}/{props.total}+ </span>+ }+ >+ <CheckCircleIcon class="size-4 text-accent" />+ </Show>+ <ChevronDownIcon+ class={cn(+ 'size-4 shrink-0 text-ink-extra-muted transition-transform',+ props.collapsed && '-rotate-90'+ )}+ />+ </span>+ </button>+ );+}diff --git a/apps/web/src/features/getting-started/getting-started-state.test.ts b/apps/web/src/features/getting-started/getting-started-state.test.tsnew file mode 100644index 0000000000..e6bbe6207e--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-state.test.ts@@ -0,0 +1,31 @@+import { describe, expect, it, vi } from 'vitest';+import { createGettingStartedState } from './getting-started-state';+import type { GettingStartedStore } from './getting-started-store';++describe('createGettingStartedState', () => {+ it('loads progress eagerly and persists updates for its user', () => {+ const store: GettingStartedStore = {+ load: vi.fn().mockReturnValue({+ completedActionIds: ['set-name'],+ collapsedSectionIds: ['basics'],+ }),+ save: vi.fn(),+ };+ const state = createGettingStartedState('user-1', store);++ expect(state.isPersistedComplete('set-name')).toBe(true);+ expect(state.isCollapsed('basics')).toBe(true);++ state.markCompleted('connect-email');+ expect(store.save).toHaveBeenLastCalledWith('user-1', {+ completedActionIds: ['set-name', 'connect-email'],+ collapsedSectionIds: ['basics'],+ });++ state.toggleSection('basics');+ expect(store.save).toHaveBeenLastCalledWith('user-1', {+ completedActionIds: ['set-name', 'connect-email'],+ collapsedSectionIds: [],+ });+ });+});diff --git a/apps/web/src/features/getting-started/getting-started-state.ts b/apps/web/src/features/getting-started/getting-started-state.tsnew file mode 100644index 0000000000..f7f55f993a--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-state.ts@@ -0,0 +1,71 @@+import { createAssertedContextProvider } from '@core/context/createContext';+import type { ContextProviderProps } from '@solid-primitives/context';+import { createSignal } from 'solid-js';+import {+ type GettingStartedStore,+ localStorageGettingStartedStore,+} from './getting-started-store';++export type GettingStartedState = ReturnType<typeof createGettingStartedState>;++/**+ * User-scoped, reactive Getting Started progress: which actions the user has+ * completed (by click or observed event) and which sections they collapsed.+ * Derived completions (connection state, name set) layer on top in the+ * runtime and are never persisted here.+ */+export function createGettingStartedState(+ userId: string,+ store: GettingStartedStore = localStorageGettingStartedStore+) {+ const snapshot = store.load(userId);+ const [completed, setCompleted] = createSignal<ReadonlySet<string>>(+ new Set(snapshot?.completedActionIds)+ );+ const [collapsed, setCollapsed] = createSignal<ReadonlySet<string>>(+ new Set(snapshot?.collapsedSectionIds)+ );++ const persist = () => {+ store.save(userId, {+ completedActionIds: [...completed()],+ collapsedSectionIds: [...collapsed()],+ });+ };++ const markCompleted = (actionId: string) => {+ if (completed().has(actionId)) return;+ setCompleted((previous) => new Set(previous).add(actionId));+ persist();+ };++ const toggleSection = (sectionId: string) => {+ setCollapsed((previous) => {+ const next = new Set(previous);+ if (next.has(sectionId)) next.delete(sectionId);+ else next.add(sectionId);+ return next;+ });+ persist();+ };++ return {+ isPersistedComplete: (actionId: string) => completed().has(actionId),+ markCompleted,+ isCollapsed: (sectionId: string) => collapsed().has(sectionId),+ toggleSection,+ };+}++type GettingStartedProviderProps = ContextProviderProps & {+ userId: string;+ store?: GettingStartedStore;+};++export const [GettingStartedProvider, useGettingStartedState] =+ createAssertedContextProvider<+ GettingStartedState,+ GettingStartedProviderProps+ >('GettingStartedState', (props) =>+ createGettingStartedState(props.userId, props.store)+ );diff --git a/apps/web/src/features/getting-started/getting-started-store.test.ts b/apps/web/src/features/getting-started/getting-started-store.test.tsnew file mode 100644index 0000000000..56535f7854--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-store.test.ts@@ -0,0 +1,52 @@+import { describe, expect, it } from 'vitest';+import { parseGettingStartedSnapshot } from './getting-started-store';++describe('parseGettingStartedSnapshot', () => {+ it('parses a well-formed snapshot', () => {+ expect(+ parseGettingStartedSnapshot(+ '{"completedActionIds":["set-name"],"collapsedSectionIds":["basics"]}'+ )+ ).toEqual({+ completedActionIds: ['set-name'],+ collapsedSectionIds: ['basics'],+ });+ });++ it('defaults missing fields to empty arrays', () => {+ expect(parseGettingStartedSnapshot('{}')).toEqual({+ completedActionIds: [],+ collapsedSectionIds: [],+ });+ });++ it('drops non-string entries', () => {+ expect(+ parseGettingStartedSnapshot(+ '{"completedActionIds":["set-name",12,null],"collapsedSectionIds":[{}]}'+ )+ ).toEqual({+ completedActionIds: ['set-name'],+ collapsedSectionIds: [],+ });+ });++ it('keeps ids the current config does not know', () => {+ expect(+ parseGettingStartedSnapshot('{"completedActionIds":["renamed-action"]}')+ ).toEqual({+ completedActionIds: ['renamed-action'],+ collapsedSectionIds: [],+ });+ });++ it('returns null for non-object shapes', () => {+ expect(parseGettingStartedSnapshot('["set-name"]')).toBeNull();+ expect(parseGettingStartedSnapshot('"set-name"')).toBeNull();+ expect(parseGettingStartedSnapshot(null)).toBeNull();+ });++ it('returns null for malformed JSON', () => {+ expect(parseGettingStartedSnapshot('{')).toBeNull();+ });+});diff --git a/apps/web/src/features/getting-started/getting-started-store.ts b/apps/web/src/features/getting-started/getting-started-store.tsnew file mode 100644index 0000000000..3fd2c66b4d--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-store.ts@@ -0,0 +1,52 @@+import { createUserScopedStorage } from '@core/util/userScopedStorage';++/** Persisted Getting Started progress. */+export type GettingStartedSnapshot = {+ /** Actions completed by clicking or by an observed event (not derived state). */+ completedActionIds: string[];+ collapsedSectionIds: string[];+};++/** Persistence seam for user-scoped Getting Started progress. */+export interface GettingStartedStore {+ load(userId: string): GettingStartedSnapshot | null;+ save(userId: string, snapshot: GettingStartedSnapshot): void;+}++const storage = createUserScopedStorage('macro:getting-started');++function stringArray(value: unknown): string[] {+ if (!Array.isArray(value)) return [];+ return value.filter((item): item is string => typeof item === 'string');+}++/**+ * Unknown ids are kept: they're inert at render time, and dropping them would+ * erase progress across config renames or a client running older config.+ */+export function parseGettingStartedSnapshot(+ raw: string | null+): GettingStartedSnapshot | null {+ if (raw === null) return null;+ try {+ const parsed: unknown = JSON.parse(raw);+ if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed))+ return null;+ const record = parsed as Record<string, unknown>;+ return {+ completedActionIds: stringArray(record.completedActionIds),+ collapsedSectionIds: stringArray(record.collapsedSectionIds),+ };+ } catch {+ return null;+ }+}++export const localStorageGettingStartedStore: GettingStartedStore = {+ load(userId) {+ return parseGettingStartedSnapshot(storage.read(userId));+ },+ save(userId, snapshot) {+ storage.write(userId, JSON.stringify(snapshot));+ },+};diff --git a/apps/web/src/features/getting-started/getting-started-types.ts b/apps/web/src/features/getting-started/getting-started-types.tsnew file mode 100644index 0000000000..f1534c1f0c--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started-types.ts@@ -0,0 +1,39 @@+import type { Component } from 'solid-js';++/**+ * One checklist row.+ */+export type GettingStartedAction = {+ id: string;+ icon: Component<{ class?: string }>;+ title: string;+ description: string;+ /**+ * Run the action's open flow. Return false (or resolve false) when it did+ * not meaningfully activate (failed flow, already-toasted error).+ */+ onActivate: () => void | boolean | Promise<void | boolean>;+ /**+ * Live completion, read reactively from render (read queries/signals+ * synchronously inside). ORed with the persisted set; never persisted+ * itself, so it stays honest when e.g. a tool is disconnected.+ */+ isComplete?: () => boolean;+ /**+ * Register completion observers (createEffect/on, listeners + onCleanup).+ * Runs once at page setup under the page's reactive owner — never create+ * effects inside onActivate.+ */+ observe?: (markComplete: () => void) => void;+ /*+ * Default completion: with neither `isComplete` nor `observe`, a successful+ * onActivate persists completion — "declare no completion condition and+ * clicking it completes it".+ */+};++export type GettingStartedSection = {+ id: string;+ title: string;+ actions: GettingStartedAction[];+};diff --git a/apps/web/src/features/getting-started/getting-started.tsx b/apps/web/src/features/getting-started/getting-started.tsxnew file mode 100644index 0000000000..328e7b66c4--- /dev/null+++ b/apps/web/src/features/getting-started/getting-started.tsx@@ -0,0 +1,327 @@+import { DOCS_BASE } from '@app/constants/docs-links';+import { HomeBackfillProgress } from '@app/features/home/home-backfill-progress';+import { useSplitLayout } from '@components/app/split-layout/layout';+import type { SplitContent } from '@components/app/split-layout/layoutManager';+import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';+import { useHasPaidAccess } from '@core/auth/license';+import { defaultModelForPlan } from '@core/component/AI/constant';+import { setPendingSendData } from '@core/component/AI/signal/pendingSend';+import { deriveChatName } from '@core/component/AI/util/deriveName';+import { toast } from '@core/component/Toast/Toast';+import {+ type SettingsTab,+ useSettingsState,+} from '@core/constant/SettingsState';+import { useUserId, useUserInfo } from '@core/context/user';+import { isMobile } from '@core/mobile/isMobile';+import { setActiveTabId } from '@core/signal/settingsTab';+import { createChat } from '@core/util/create';+import { AnimatedProfileIcon } from '@icon/wide-profile';+import BookOpenIcon from '@phosphor/book-open.svg';+import PaletteIcon from '@phosphor/palette.svg';+import PlugsIcon from '@phosphor/plugs.svg';+import { useGithubLinkStatusQuery } from '@queries/auth/github-link';+import { isRealNamePart, useOwnUserName } from '@queries/auth/user-name-self';+import { useEmailLinksQuery } from '@queries/email/link';+import { useMcpServersQuery } from '@queries/mcp-servers';+import { useStarterDocsQuery } from '@queries/starter-docs';+import {+ currentThemeId,+ darkModeTheme,+ lightModeTheme,+ themeMode,+} from '@theme/signals/themeSignals';+import { createEffect, For, on, onMount, Show } from 'solid-js';+import { AGENT_EXAMPLES } from './agent-examples';+import { ActionRow, SectionHeader } from './getting-started-rows';+import {+ GettingStartedProvider,+ useGettingStartedState,+} from './getting-started-state';+import type {+ GettingStartedAction,+ GettingStartedSection as GettingStartedSectionConfig,+} from './getting-started-types';++/**+ * Where new users arrive: activating actions in collapsible sections. Acts as+ * a Preview Pair Controller — action results open in the adjacent Viewer.+ */+export function GettingStarted() {+ const userId = useUserId();++ return (+ <Show when={userId()} keyed>+ {(id) => (+ <GettingStartedProvider userId={id}>+ <GettingStartedContent />+ </GettingStartedProvider>+ )}+ </Show>+ );+}++function GettingStartedContent() {+ const panel = useSplitPanelOrThrow();+ const state = useGettingStartedState();+ const { openWithSplit } = useSplitLayout();+ const { openSettingsInSplit } = useSettingsState();++ // Poll: MCP OAuth completes in a popup opened from the Connections panel,+ // and if this window never blurs no focus refetch would ever flip the row+ // (see ConnectorsSection).+ const mcpServers = useMcpServersQuery({+ refetchInterval: 4_000,+ neverSuspend: true,+ });+ const emailLinks = useEmailLinksQuery();+ const githubLink = useGithubLinkStatusQuery();+ const userInfo = useUserInfo();+ const ownUserName = useOwnUserName();+ const starterDocs = useStarterDocsQuery();+ const hasPaidAccess = useHasPaidAccess();++ /**+ * Open content beside the list: re-engage a manually-closed Viewer first so+ * the open lands there instead of replacing this panel, then route through+ * this panel's handle (a Controller-handle open is rewritten into its+ * Viewer). No-ops into a plain open on mobile or when there's no room.+ */+ const openInPreview = (content: SplitContent) => {+ if (+ !isMobile() &&+ !panel.handle.isControllerSplit() &&+ panel.handle.canEngagePreview()+ ) {+ panel.handle.engagePreview();+ }+ openWithSplit(content, { handle: panel.handle });+ };++ const openSettingsTab = (tab: SettingsTab) => {+ setActiveTabId(tab);+ if (isMobile()) {+ // Mobile has no Preview Pair; the docked settings split is the+ // full-screen path there.+ openSettingsInSplit(tab);+ return;+ }+ // Deliberately not openSettings(): on desktop it collapses to solo+ // settings, destroying the Controller/Viewer pair.+ openInPreview({ type: 'component', id: 'settings' });+ };++ const openChatPrompt = async (prompt: string): Promise<boolean> => {+ const result = await createChat(+ { name: deriveChatName(prompt) },+ { source: 'getting-started' }+ );+ if ('error' in result || !result.chatId) {+ toast.failure('Unable to start chat');+ return false;+ }+ // The chat block consumes this on mount and sends immediately. The model+ // must be one this plan may use: a pending send bypasses ChatInput, whose+ // effect would otherwise correct an unavailable model, and the backend+ // rejects premium models for free users with a 403 (surfaced as a+ // paywall, with the send silently dropped).+ setPendingSendData({+ content: prompt,+ attachments: [],+ model: defaultModelForPlan(hasPaidAccess()),+ });+ openInPreview({ type: 'chat', id: result.chatId });+ return true;+ };++ /**+ * The deterministic id of the how-to guide seeded at signup. Undefined+ * while the query is in flight; gated on isSuccess so a render-time read+ * can't suspend the page.+ */+ const howToGuideId = () =>+ starterDocs.isSuccess ? starterDocs.data.howToGuideId : undefined;++ const sections: GettingStartedSectionConfig[] = [+ {+ id: 'connect-tools',+ title: 'Connect your tools',+ actions: [+ {+ id: 'connect-tools',+ icon: PlugsIcon,+ title: 'Connect your tools',+ description: 'Link your inbox, GitHub, Linear, Notion & more',+ onActivate: () => openSettingsTab('Connected'),+ // Any real connection counts: a second inbox (onboarding links the+ // first), the GitHub account link, or any authenticated MCP server.+ isComplete: () =>+ (emailLinks.data?.links.length ?? 0) > 1 ||+ githubLink.data?.status === 'linked' ||+ (mcpServers.data ?? []).some((server) => server.authenticated),+ },+ ],+ },+ {+ id: 'basics',+ title: 'Set up your account',+ actions: [+ {+ id: 'how-to-guide',+ icon: BookOpenIcon,+ title: 'Macro how to guide',+ description: 'Learn about how Macro works',+ // Falls back to the public docs site when the id can't be resolved.+ onActivate: () => {+ const documentId = howToGuideId();+ if (!documentId) {+ window.open(DOCS_BASE, '_blank', 'noopener,noreferrer');+ return;+ }+ openInPreview({ type: 'md', id: documentId });+ },+ },+ {+ id: 'set-name',+ icon: AnimatedProfileIcon,+ title: 'Set your name & profile picture',+ description: 'Introduce yourself in Account settings',+ onActivate: () => openSettingsTab('Account'),+ // The editable first/last name (what Account settings writes); the+ // legacy identity-provider display name also counts.+ isComplete: () =>+ isRealNamePart(ownUserName()?.first_name) ||+ isRealNamePart(ownUserName()?.last_name) ||+ Boolean(userInfo()?.name?.trim()),+ },+ {+ id: 'choose-theme',+ icon: PaletteIcon,+ title: 'Choose your theme',+ description: 'Light, dark, or completely custom',+ onActivate: () => openSettingsTab('Appearance'),+ // Any theme-picker interaction while the page is mounted; defer+ // skips the mount value.+ observe: (markComplete) =>+ createEffect(+ on(+ [currentThemeId, themeMode, lightModeTheme, darkModeTheme],+ markComplete,+ { defer: true }+ )+ ),+ },+ ],+ },+ {+ id: 'agent-examples',+ title: "Put Macro's agent to work",+ actions: AGENT_EXAMPLES.map((example) => ({+ id: example.id,+ icon: example.icon,+ title: example.title,+ description: example.description,+ onActivate: () => openChatPrompt(example.prompt),+ })),+ },+ ];++ // Register per-action completion observers, once, under this component's+ // reactive owner. No persisted-completion guard: the store loads async and+ // markCompleted dedupes.+ for (const action of sections.flatMap((section) => section.actions)) {+ action.observe?.(() => state.markCompleted(action.id));+ }++ const activate = async (action: GettingStartedAction) => {+ const result = await action.onActivate();+ // Default rule: an action declaring no live/observed completion source+ // completes on successful activation.+ if (result !== false && !action.isComplete && !action.observe) {+ state.markCompleted(action.id);+ }+ };++ const isComplete = (action: GettingStartedAction): boolean =>+ (action.isComplete?.() ?? false) || state.isPersistedComplete(action.id);++ const sectionProgress = (section: GettingStartedSectionConfig) => ({+ completed: section.actions.filter(isComplete).length,+ total: section.actions.length,+ });++ onMount(() => {+ panel.handle.setDisplayName('Getting started');+ // Preview is always on for Getting Started (no user toggle): engage+ // whenever this panel isn't itself someone's Viewer. engagePreview+ // no-ops on mobile and when there's no room; action opens re-engage if+ // the Viewer was closed (see openInPreview).+ if (panel.handle.isViewerSplit()) return;+ panel.handle.engagePreview();+ });++ return (+ <main class="relative flex h-full flex-col bg-surface">+ <div class="min-h-0 flex-1 overflow-y-auto">+ <div class="mx-auto flex w-full max-w-3xl flex-col gap-6 px-4 pb-6 pt-6">+ <header class="px-1">+ <h1 class="text-xl font-semibold text-ink">Getting Started</h1>+ <p class="text-sm text-ink-muted">+ A few actions to get the most out of Macro.+ </p>+ </header>+ {/* Renders nothing once no inbox is importing. */}+ <HomeBackfillProgress />+ <For each={sections}>+ {(section) => (+ <GettingStartedSection+ section={section}+ activate={activate}+ isComplete={isComplete}+ sectionProgress={sectionProgress}+ />+ )}+ </For>+ </div>+ </div>+ </main>+ );+}++function GettingStartedSection(props: {+ section: GettingStartedSectionConfig;+ activate: (action: GettingStartedAction) => Promise<void>;+ isComplete: (action: GettingStartedAction) => boolean;+ sectionProgress: (section: GettingStartedSectionConfig) => {+ completed: number;+ total: number;+ };+}) {+ const state = useGettingStartedState();+ const progress = () => props.sectionProgress(props.section);++ return (+ <section>+ <SectionHeader+ section={props.section}+ collapsed={state.isCollapsed(props.section.id)}+ completed={progress().completed}+ total={progress().total}+ onToggle={() => state.toggleSection(props.section.id)}+ />+ <Show when={!state.isCollapsed(props.section.id)}>+ <div class="mt-2 flex flex-col gap-2">+ <For each={props.section.actions}>+ {(action) => (+ <ActionRow+ action={action}+ complete={props.isComplete(action)}+ onActivate={() => void props.activate(action)}+ />+ )}+ </For>+ </div>+ </Show>+ </section>+ );+}diff --git a/apps/web/src/features/getting-started/index.ts b/apps/web/src/features/getting-started/index.tsnew file mode 100644index 0000000000..784cf3feae--- /dev/null+++ b/apps/web/src/features/getting-started/index.ts@@ -0,0 +1 @@+export { GettingStarted } from './getting-started';diff --git a/apps/web/src/features/getting-started/sidebar-visibility.test.ts b/apps/web/src/features/getting-started/sidebar-visibility.test.tsnew file mode 100644index 0000000000..342241ee9f--- /dev/null+++ b/apps/web/src/features/getting-started/sidebar-visibility.test.ts@@ -0,0 +1,74 @@+import { createRoot } from 'solid-js';+import { afterEach, describe, expect, it, vi } from 'vitest';+import {+ createGettingStartedSidebarVisibility,+ type GettingStartedSidebarStore,+ localStorageGettingStartedSidebarStore,+} from './sidebar-visibility';++vi.mock('@core/context/user', () => ({+ useUserId: () => () => 'user-1',+}));++describe('localStorageGettingStartedSidebarStore', () => {+ afterEach(() => {+ localStorage.clear();+ });++ it('loads null when the user never removed the link', async () => {+ await expect(+ localStorageGettingStartedSidebarStore.load('user-1')+ ).resolves.toBeNull();+ });++ it('round-trips the hidden flag', async () => {+ await localStorageGettingStartedSidebarStore.save('user-1', true);+ await expect(+ localStorageGettingStartedSidebarStore.load('user-1')+ ).resolves.toBe(true);+ await localStorageGettingStartedSidebarStore.save('user-1', false);+ await expect(+ localStorageGettingStartedSidebarStore.load('user-1')+ ).resolves.toBe(false);+ });+});++describe('createGettingStartedSidebarVisibility', () => {+ const withVisibility = (store: GettingStartedSidebarStore) =>+ createRoot((dispose) => ({+ visibility: createGettingStartedSidebarVisibility(store),+ dispose,+ }));++ it('starts visible and flips once a stored hidden flag loads', async () => {+ const { visibility, dispose } = withVisibility({+ load: () => Promise.resolve(true),+ save: () => Promise.resolve(),+ });+ expect(visibility.hidden()).toBe(false);+ await vi.waitFor(() => expect(visibility.hidden()).toBe(true));+ dispose();+ });++ it('stays visible when nothing is stored', async () => {+ const { visibility, dispose } = withVisibility({+ load: () => Promise.resolve(null),+ save: () => Promise.resolve(),+ });+ await new Promise((resolve) => setTimeout(resolve));+ expect(visibility.hidden()).toBe(false);+ dispose();+ });++ it('hide applies optimistically before the load resolves and persists', () => {+ const save = vi.fn(() => Promise.resolve());+ const { visibility, dispose } = withVisibility({+ load: () => new Promise<never>(() => {}),+ save,+ });+ visibility.hide();+ expect(visibility.hidden()).toBe(true);+ expect(save).toHaveBeenCalledWith('user-1', true);+ dispose();+ });+});diff --git a/apps/web/src/features/getting-started/sidebar-visibility.ts b/apps/web/src/features/getting-started/sidebar-visibility.tsnew file mode 100644index 0000000000..3e178fc381--- /dev/null+++ b/apps/web/src/features/getting-started/sidebar-visibility.ts@@ -0,0 +1,64 @@+import { useUserId } from '@core/context/user';+import { createUserScopedStorage } from '@core/util/userScopedStorage';+import { createResource, createSignal } from 'solid-js';++/**+ * Persistence seam for the "Getting started" sidebar link's removed flag.+ * Async so a backend-backed implementation can slot in without touching+ * consumers (mirrors `GettingStartedStore`); the default is user-scoped+ * localStorage.+ */+export interface GettingStartedSidebarStore {+ /** The stored flag, or `null` when the user never removed the link. */+ load(userId: string): Promise<boolean | null>;+ save(userId: string, hidden: boolean): Promise<void>;+}++const storage = createUserScopedStorage('macro:getting-started-sidebar-hidden');++export const localStorageGettingStartedSidebarStore: GettingStartedSidebarStore =+ {+ load(userId) {+ const raw = storage.read(userId);+ return Promise.resolve(raw === null ? null : raw === 'true');+ },+ save(userId, hidden) {+ storage.write(userId, String(hidden));+ return Promise.resolve();+ },+ };++/**+ * User-scoped, reactive visibility of the "Getting started" sidebar link.+ * Starts visible and flips once the persisted flag loads; `hide` applies+ * optimistically and persists behind the store seam.+ */+export function createGettingStartedSidebarVisibility(+ store: GettingStartedSidebarStore = localStorageGettingStartedSidebarStore+) {+ const userId = useUserId();+ const [storedHidden] = createResource(userId, async (id) => ({+ userId: id,+ hidden: (await store.load(id)) ?? false,+ }));+ const [optimisticallyHiddenUserId, setOptimisticallyHiddenUserId] =+ createSignal<string>();++ const hidden = () => {+ const id = userId();+ if (!id) return false;+ if (optimisticallyHiddenUserId() === id) return true;++ const stored = storedHidden.latest;+ return stored?.userId === id && stored.hidden;+ };++ const hide = () => {+ const id = userId();+ if (!id || hidden()) return;+ setOptimisticallyHiddenUserId(id);+ void store.save(id, true);+ };++ return { hidden, hide };+}diff --git a/apps/web/src/features/home/home-backfill-progress.tsx b/apps/web/src/features/home/home-backfill-progress.tsxindex 978c766569..3d1913a966 100644--- a/apps/web/src/features/home/home-backfill-progress.tsx+++ b/apps/web/src/features/home/home-backfill-progress.tsx@@ -7,6 +7,13 @@ import { useEmailLinksQuery } from '@queries/email/link';import { SyncStatus } from '@service-email/generated/schemas';import { createMemo, Match, Show, Switch } from 'solid-js';+/**+ * Dev override: flip to `true` to keep the card on screen (with the+ * indeterminate bar) when no inbox is actually importing, for working on its+ * UI. Real progress data still takes over when present. Leave `false`.+ */+const FORCE_SHOW_BACKFILL_PROGRESS = false;+/*** Slim inbox-import line for the home header. Shows a spinner, label, a thin* progress bar, and the count while one or more connected inboxes are@@ -22,6 +29,7 @@ export function HomeBackfillProgress() {);const isImporting = () =>+ FORCE_SHOW_BACKFILL_PROGRESS ||(linksQuery.data?.links ?? []).some((link) => link.sync_status === SyncStatus.SYNCING);diff --git a/apps/web/src/features/home/home-prefs.ts b/apps/web/src/features/home/home-prefs.tsindex d42d293fae..3f38df2597 100644--- a/apps/web/src/features/home/home-prefs.ts+++ b/apps/web/src/features/home/home-prefs.ts@@ -1,10 +1,11 @@import { useUserId } from '@core/context/user';+import { createUserScopedStorage } from '@core/util/userScopedStorage';import { createEffect, createSignal, on } from 'solid-js';/** Dismissible home surfaces. Dismissals persist in localStorage. */export type HomeCard = 'examples' | 'setup';-const STORAGE_KEY = 'macro:home:dismissed';+const storage = createUserScopedStorage('macro:home:dismissed');const HOME_CARDS: readonly HomeCard[] = ['examples', 'setup'];export function parseDismissedCards(raw: string | null): HomeCard[] {@@ -21,27 +22,14 @@ export function parseDismissedCards(raw: string | null): HomeCard[] {}}-function storageKey(userId: string): string {- return `${STORAGE_KEY}:${encodeURIComponent(userId)}`;-}-function load(userId: string | undefined): HomeCard[] {if (!userId) return [];- if (typeof localStorage === 'undefined') return [];- try {- return parseDismissedCards(localStorage.getItem(storageKey(userId)));- } catch {- return [];- }+ return parseDismissedCards(storage.read(userId));}function persist(userId: string | undefined, cards: Set<HomeCard>): void {- if (!userId || typeof localStorage === 'undefined') return;- try {- localStorage.setItem(storageKey(userId), JSON.stringify([...cards]));- } catch {- // Storage may be unavailable or full. The in-memory preference still works.- }+ if (!userId) return;+ storage.write(userId, JSON.stringify([...cards]));}export type HomePreferences = ReturnType<typeof createHomePreferences>;diff --git a/apps/web/src/features/notifications/use-notification-updates.ts b/apps/web/src/features/notifications/use-notification-updates.tsindex 7d2016f4bd..2c62208988 100644--- a/apps/web/src/features/notifications/use-notification-updates.ts+++ b/apps/web/src/features/notifications/use-notification-updates.ts@@ -51,7 +51,10 @@ function refreshEmailThread(notification: UnifiedNotification) {export function handleNotificationUpdate(notification: UnifiedNotification) {match(notification.notification_metadata).with({ tag: 'channel_mention' }, ({ content }) => {- refreshChannel(notification, content.threadId?.toString());+ refreshChannel(+ notification,+ (content.threadId ?? content.messageId)?.toString()+ );}).with({ tag: 'document_mention' }, ({ content }) => {refreshChannel(notification, content.threadId?.toString());diff --git a/apps/web/src/features/settings/Account.tsx b/apps/web/src/features/settings/Account.tsxindex 7e1ac2a4e5..b1f06fcf79 100644--- a/apps/web/src/features/settings/Account.tsx+++ b/apps/web/src/features/settings/Account.tsx@@ -35,6 +35,10 @@ import TrashIcon from '@phosphor/trash.svg';import WarningCircleIcon from '@phosphor/warning-circle.svg';import SignOutIcon from '@phosphor-icons/core/regular/sign-out.svg?component-solid';import IconUpload from '@phosphor-icons/core/regular/upload-simple.svg?component-solid';+import {+ invalidateOwnUserName,+ useOwnUserName,+} from '@queries/auth/user-name-self';import { authServiceClient } from '@service-auth/client';import { invoke } from '@tauri-apps/api/core';import { Button, Dialog, Dropdown, Panel, ToggleSwitch, Tooltip } from '@ui';@@ -124,6 +128,8 @@ function formatBundleUpdateStatus(status: BundleUpdateStatus): string {/*** Save one name field with an optimistic update and rollback on failure.* Returns whether the save succeeded, which drives NameInput's status icon.+ * This panel renders its own value from a local signal, so the invalidation+ * is for everything else reading the name (see invalidateOwnUserName).*/async function saveUserName(value: string,@@ -140,6 +146,7 @@ async function saveUserName(setValue(prev); // rollback on a returned errorreturn false;}+ void invalidateOwnUserName();return true;} catch {setValue(prev); // rollback if the call throws before returning a Result@@ -147,22 +154,6 @@ async function saveUserName(}}-function useUserName() {- const fetchUserName = async () => {- const response = await authServiceClient.getUserName();- return response.isOk() ? response.value : null;- };-- const [userNameResource] = createResource(fetchUserName);-- const userName = createMemo(() => {- if (userNameResource.loading) return undefined;- return userNameResource() || undefined;- });-- return userName;-}-function ProfilePictureRow(props: { userId: string }) {const [profilePictureUrl, profilePictureControls] = useProfilePictureUrl(props.userId@@ -323,7 +314,10 @@ export function Account() {const [showDeleteConfirmModal, setShowDeleteConfirmModal] =createSignal<boolean>(false);- const userName = useUserName();+ // The shared own-name cache entry (the one saveUserName invalidates), so+ // this panel and other readers (e.g. the Getting Started checklist) can't+ // drift.+ const userName = useOwnUserName();const [updatedFirstName, setUpdatedFirstName] = createSignal<string | undefined>(undefined);diff --git a/apps/web/src/features/setup/flow/createFlowFinish.ts b/apps/web/src/features/setup/flow/createFlowFinish.tsindex 46fbf17bcb..b5d6f5a081 100644--- a/apps/web/src/features/setup/flow/createFlowFinish.ts+++ b/apps/web/src/features/setup/flow/createFlowFinish.ts@@ -1,3 +1,4 @@+import { AFTER_SETUP_ROUTE, DEFAULT_ROUTE } from '@app/constants/defaultRoute';import { createOnboardingCheckoutSession } from '@app/features/onboarding/use-onboarding-checkout';import type { PaidPlanTier } from '@app/features/paywall/plans';import { useAnalytics } from '@app/lib/analytics/analytics-context';@@ -14,8 +15,8 @@ import { FLOW_NEXT_STORAGE_KEY, FLOW_STEP_STORAGE_KEY } from './shared';/*** The "leave onboarding" workflow: mark onboarding + the legacy tutorial* complete, then land in the app (the preserved `?next=` deep link, or- * home). Imports never block the exit; auto-import keeps landing rows- * server-side.+ * the Getting Started checklist). Imports never block the exit;+ * auto-import keeps landing rows server-side.*/export function createFlowFinish(options?: {/** Extra analytics context stamped onto `onboarding_v4_completed`. */@@ -41,11 +42,14 @@ export function createFlowFinish(options?: {});};- // Same-app relative paths only.+ // Same-app relative paths only. A `next` at the default route is not a+ // real deep link — fall through to the Getting Started checklist.const sanitizeNext = (value: unknown): string | undefined =>typeof value === 'string' &&value.startsWith('/') &&- !value.startsWith('//')+ !value.startsWith('//') &&+ !value.includes('\\') &&+ !value.startsWith(DEFAULT_ROUTE)? value: undefined;@@ -59,7 +63,7 @@ export function createFlowFinish(options?: {const afterTarget = () =>sanitizeNext(searchParams.next) ??sanitizeNext(sessionStorage.getItem(FLOW_NEXT_STORAGE_KEY)) ??- '/';+ AFTER_SETUP_ROUTE;/*** Mark the flow complete and verify it stuck: NewOnboardingRedirect keysdiff --git a/apps/web/src/lib/constants/defaultRoute.ts b/apps/web/src/lib/constants/defaultRoute.tsindex ebc41cf429..af2467c525 100644--- a/apps/web/src/lib/constants/defaultRoute.ts+++ b/apps/web/src/lib/constants/defaultRoute.ts@@ -1 +1,6 @@export const DEFAULT_ROUTE = '/component/inbox';++/**+ * Where leaving onboarding lands when no deep link was preserved (`?next=`)+ */+export const AFTER_SETUP_ROUTE = '/component/getting-started';diff --git a/apps/web/src/lib/core/auth/logout.ts b/apps/web/src/lib/core/auth/logout.tsindex 3c67f7214d..ee156aed50 100644--- a/apps/web/src/lib/core/auth/logout.ts+++ b/apps/web/src/lib/core/auth/logout.ts@@ -26,6 +26,7 @@ const unauthenticatedUserInfo: UserInfoData = {hasTrialed: false,aiDataConsent: false,referralCode: '',+ createdAt: undefined,};export async function clearLocalAuthSession() {diff --git a/apps/web/src/lib/core/hotkey/tokens.ts b/apps/web/src/lib/core/hotkey/tokens.tsindex 95b43eea24..f69c8d5fe6 100644--- a/apps/web/src/lib/core/hotkey/tokens.ts+++ b/apps/web/src/lib/core/hotkey/tokens.ts@@ -95,6 +95,7 @@ export const TOKENS = {goToLeader: 'sidebar.goToLeader',goTo: {home: 'sidebar.goTo.home',+ gettingStarted: 'sidebar.goTo.gettingStarted',inbox: 'sidebar.goTo.inbox',activity: 'sidebar.goTo.activity',search: 'sidebar.goTo.search',diff --git a/apps/web/src/lib/core/util/userScopedStorage.test.ts b/apps/web/src/lib/core/util/userScopedStorage.test.tsnew file mode 100644index 0000000000..4a31408876--- /dev/null+++ b/apps/web/src/lib/core/util/userScopedStorage.test.ts@@ -0,0 +1,59 @@+import { afterEach, describe, expect, it, vi } from 'vitest';+import { createUserScopedStorage } from './userScopedStorage';++describe('createUserScopedStorage', () => {+ afterEach(() => {+ vi.unstubAllGlobals();+ vi.restoreAllMocks();+ localStorage.clear();+ });++ it('round-trips a value for a user', () => {+ const storage = createUserScopedStorage('macro:test');+ storage.write('user-1', 'value');+ expect(storage.read('user-1')).toBe('value');+ });++ it('returns null when nothing is stored', () => {+ const storage = createUserScopedStorage('macro:test');+ expect(storage.read('user-1')).toBeNull();+ });++ it('scopes values per user', () => {+ const storage = createUserScopedStorage('macro:test');+ storage.write('user-1', 'one');+ storage.write('user-2', 'two');+ expect(storage.read('user-1')).toBe('one');+ expect(storage.read('user-2')).toBe('two');+ });++ it('encodes user ids so delimiter characters cannot collide', () => {+ const storage = createUserScopedStorage('macro:test');+ storage.write('a:b', 'colon');+ storage.write('a%3Ab', 'encoded');+ expect(storage.read('a:b')).toBe('colon');+ });++ it('reads null when storage access throws', () => {+ const storage = createUserScopedStorage('macro:test');+ vi.spyOn(Storage.prototype, 'getItem').mockImplementation(() => {+ throw new Error('blocked');+ });+ expect(storage.read('user-1')).toBeNull();+ });++ it('swallows write failures', () => {+ const storage = createUserScopedStorage('macro:test');+ vi.spyOn(Storage.prototype, 'setItem').mockImplementation(() => {+ throw new Error('quota exceeded');+ });+ expect(() => storage.write('user-1', 'value')).not.toThrow();+ });++ it('degrades to no value when localStorage is unavailable', () => {+ const storage = createUserScopedStorage('macro:test');+ vi.stubGlobal('localStorage', undefined);+ expect(storage.read('user-1')).toBeNull();+ expect(() => storage.write('user-1', 'value')).not.toThrow();+ });+});diff --git a/apps/web/src/lib/core/util/userScopedStorage.ts b/apps/web/src/lib/core/util/userScopedStorage.tsnew file mode 100644index 0000000000..3a040d8a8e--- /dev/null+++ b/apps/web/src/lib/core/util/userScopedStorage.ts@@ -0,0 +1,26 @@+/**+ * Safe, user-scoped localStorage access. Keys are namespaced per user id and+ * every storage failure (unavailable, blocked, full) degrades to "no value" /+ * no-op so in-memory state keeps working.+ */+export function createUserScopedStorage(baseKey: string) {+ const key = (userId: string) => `${baseKey}:${encodeURIComponent(userId)}`;+ return {+ read(userId: string): string | null {+ if (typeof localStorage === 'undefined') return null;+ try {+ return localStorage.getItem(key(userId));+ } catch {+ return null;+ }+ },+ write(userId: string, value: string): void {+ if (typeof localStorage === 'undefined') return;+ try {+ localStorage.setItem(key(userId), value);+ } catch {+ // Storage may be unavailable or full. The in-memory state still works.+ }+ },+ };+}diff --git a/apps/web/src/lib/queries/auth/keys.ts b/apps/web/src/lib/queries/auth/keys.tsindex c29cf1e5ab..c0003636a3 100644--- a/apps/web/src/lib/queries/auth/keys.ts+++ b/apps/web/src/lib/queries/auth/keys.ts@@ -6,5 +6,6 @@ export const authKeys = createQueryKeys('auth', {userName: (userId: string) => ({queryKey: [userId],}),+ userNameSelf: null,userQuota: null,});diff --git a/apps/web/src/lib/queries/auth/user-name-self.ts b/apps/web/src/lib/queries/auth/user-name-self.tsnew file mode 100644index 0000000000..9b3bafc039--- /dev/null+++ b/apps/web/src/lib/queries/auth/user-name-self.ts@@ -0,0 +1,62 @@+import { throwOnErr } from '@core/util/result';+import { queryClient } from '@queries/client';+import { authServiceClient } from '@service-auth/client';+import type { UserName } from '@service-auth/generated/schemas/userName';+import { useQuery } from '@tanstack/solid-query';+import type { Accessor } from 'solid-js';+import { authKeys } from './keys';++const OWN_USER_NAME_STALE_TIME = 15_000;++/**+ * The current user's own editable first/last name — the fields Account+ * settings reads and writes via getUserName/putUserName. Distinct from+ * userInfo().name (the legacy identity-provider display name) and from+ * useUserNamesQuery (other users, batched by macro id).+ */+export function useOwnUserNameQuery() {+ return useQuery(() => ({+ queryKey: authKeys.userNameSelf.queryKey,+ queryFn: async () =>+ throwOnErr(async () => await authServiceClient.getUserName()),+ staleTime: OWN_USER_NAME_STALE_TIME,+ refetchOnWindowFocus: 'always' as const,+ }));+}++/**+ * The user's own name, or undefined until it loads. Prefer this over reading+ * `useOwnUserNameQuery().data` directly: that read suspends the nearest+ * boundary while the query is pending, and can re-suspend after an error+ * (solid-query only takes its non-suspending `.latest` path once `data` is+ * defined). Gating on `isSuccess` — not `isPending`, which is false in the+ * error state — is what makes it safe to call during render.+ *+ * Use `useOwnUserNameQuery` directly only when you need status/error/refetch.+ */+export function useOwnUserName(): Accessor<UserName | undefined> {+ const query = useOwnUserNameQuery();+ return () => (query.isSuccess ? query.data : undefined);+}++/**+ * Call after writing the name (putUserName). The write and every reader live+ * in the same tab, so invalidating here is what flips dependent surfaces —+ * e.g. the Getting Started checklist beside a settings Viewer, which would+ * otherwise have to poll.+ */+export function invalidateOwnUserName() {+ return queryClient.invalidateQueries({+ queryKey: authKeys.userNameSelf.queryKey,+ });+}++/**+ * Whether a stored name part is a real value: non-empty and not the 'N/A'+ * placeholder auth-service uses for unset names (the sidebar filters the+ * same way).+ */+export function isRealNamePart(part: string | null | undefined): boolean {+ const trimmed = part?.trim();+ return Boolean(trimmed) && trimmed !== 'N/A';+}diff --git a/apps/web/src/lib/queries/properties/tags.ts b/apps/web/src/lib/queries/properties/tags.tsindex 276e90164f..008370a40f 100644--- a/apps/web/src/lib/queries/properties/tags.ts+++ b/apps/web/src/lib/queries/properties/tags.ts@@ -32,6 +32,16 @@ export function invalidateTags() {queryClient.invalidateQueries({ queryKey: propertiesKeys.tags.queryKey });}+/**+ * Invalidate the whole properties namespace — tag sets, definitions, options,+ * and cached entity values. For backend-originated bulk changes (signup+ * seeding applies tags and priorities server-side) where per-key invalidation+ * would have to enumerate ids the client doesn't know.+ */+export function invalidateAllProperties() {+ queryClient.invalidateQueries({ queryKey: propertiesKeys._def });+}+function invalidatePropertyOptions(propertyDefinitionId: string) {queryClient.invalidateQueries({queryKey: propertiesKeys.options({ propertyDefinitionId }).queryKey,diff --git a/apps/web/src/lib/queries/starter-docs.ts b/apps/web/src/lib/queries/starter-docs.tsnew file mode 100644index 0000000000..dc2221fc31--- /dev/null+++ b/apps/web/src/lib/queries/starter-docs.ts@@ -0,0 +1,23 @@+import { throwOnErr } from '@core/util/result';+import { storageServiceClient } from '@service-storage/client';+import { useQuery } from '@tanstack/solid-query';++const KEYS = {+ all: ['starterDocs'] as const,+};++/** Starter docs are seeded once at signup and rarely change. */+const STARTER_DOCS_STALE_TIME = 5 * 60 * 1000;++/**+ * Ids of the documents seeded for the user at signup. Resolved server-side —+ * clients should never identify a starter doc by name.+ */+export function useStarterDocsQuery() {+ return useQuery(() => ({+ queryKey: KEYS.all,+ queryFn: async () =>+ throwOnErr(async () => await storageServiceClient.getStarterDocs()),+ staleTime: STARTER_DOCS_STALE_TIME,+ }));+}diff --git a/apps/web/src/lib/queries/sync/SyncProvider.tsx b/apps/web/src/lib/queries/sync/SyncProvider.tsxindex 12aea8dcd7..719fb62834 100644--- a/apps/web/src/lib/queries/sync/SyncProvider.tsx+++ b/apps/web/src/lib/queries/sync/SyncProvider.tsx@@ -6,10 +6,13 @@ import {import { handleCommsTyping } from '@queries/channel/typing';import { invalidateContacts } from '@queries/contacts/contacts';import { handleRefreshEmail } from '@queries/email/sync';+import { invalidateFavorites } from '@queries/favorites/favorites';import {applyNotificationStatusUpdate,notificationStatusUpdatePayloadSchema,} from '@queries/notification/user-notifications';+import { invalidateAllProperties } from '@queries/properties/tags';+import { invalidateAllSoup } from '@queries/soup/normalized-cache';import { handleTaskDuplicateMatchesUpdated } from '@queries/storage/task-duplicates';// Side-effect import: registers the scheduled-action live-update websocket// listener. Must be imported somewhere that always loads on app start — this@@ -90,6 +93,13 @@ export function QuerySyncProvider(props: SyncProviderProps) {.with({ type: 'refresh_email' }, () => {withParsedWebsocketPayload(data.type, data.data, handleRefreshEmail);})+ // Signup seeding is fire-and-forget, so refresh Soup and the provisioned+ // properties and favorites when it finishes.+ .with({ type: 'starter_docs_initialized' }, () => {+ void invalidateFavorites();+ invalidateAllProperties();+ invalidateAllSoup();+ }).with({ type: 'task_duplicate_matches_updated' }, () => {withParsedWebsocketPayload(data.type,diff --git a/apps/web/src/lib/service-clients/service-auth/client.ts b/apps/web/src/lib/service-clients/service-auth/client.tsindex 3c25420712..d41a911940 100644--- a/apps/web/src/lib/service-clients/service-auth/client.ts+++ b/apps/web/src/lib/service-clients/service-auth/client.ts@@ -407,6 +407,7 @@ export const authServiceClient = {hasTrialed: data.hasTrialed,aiDataConsent: data.aiDataConsent,referralCode: data.referralCode,+ createdAt: data.createdAt,}));},diff --git a/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponse.ts b/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponse.tsindex 712df24155..7eed1cf08d 100644--- a/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponse.ts+++ b/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponse.ts@@ -4,12 +4,16 @@* authentication_service* OpenAPI spec version: 0.1.0*/+import type { GetLegacyUserPermissionsResponseCreatedAt } from './getLegacyUserPermissionsResponseCreatedAt';import type { GetLegacyUserPermissionsResponseGroup } from './getLegacyUserPermissionsResponseGroup';import type { GetLegacyUserPermissionsResponseName } from './getLegacyUserPermissionsResponseName';export interface GetLegacyUserPermissionsResponse {/** Whether the user has consented to AI data sharing */aiDataConsent: boolean;+ /** When the account was created. Absent for accounts that predate+creation-time tracking. */+ createdAt?: GetLegacyUserPermissionsResponseCreatedAt;/** The user's email */email: string;group?: GetLegacyUserPermissionsResponseGroup;diff --git a/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponseCreatedAt.ts b/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponseCreatedAt.tsnew file mode 100644index 0000000000..9b67e9c20d--- /dev/null+++ b/apps/web/src/lib/service-clients/service-auth/generated/schemas/getLegacyUserPermissionsResponseCreatedAt.ts@@ -0,0 +1,12 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * authentication_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * When the account was created. Absent for accounts that predate+creation-time tracking.+ */+export type GetLegacyUserPermissionsResponseCreatedAt = string | null;diff --git a/apps/web/src/lib/service-clients/service-auth/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-auth/generated/schemas/index.tsindex 92b4473a6d..c09974de78 100644--- a/apps/web/src/lib/service-clients/service-auth/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-auth/generated/schemas/index.ts@@ -36,6 +36,7 @@ export * from './errorResponse';export * from './generateEmailLinkRequest';export * from './genericSuccessResponse';export * from './getLegacyUserPermissionsResponse';+export * from './getLegacyUserPermissionsResponseCreatedAt';export * from './getLegacyUserPermissionsResponseGroup';export * from './getLegacyUserPermissionsResponseName';export * from './getNamesWithEmailRequestBody';diff --git a/apps/web/src/lib/service-clients/service-auth/openapi.json b/apps/web/src/lib/service-clients/service-auth/openapi.jsonindex 0e7ead316b..99ad3890bb 100644--- a/apps/web/src/lib/service-clients/service-auth/openapi.json+++ b/apps/web/src/lib/service-clients/service-auth/openapi.json@@ -3744,6 +3744,11 @@"type": "boolean","description": "Whether the user has consented to AI data sharing"},+ "createdAt": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "When the account was created. Absent for accounts that predate\ncreation-time tracking."+ },"email": {"type": "string","description": "The user's email"diff --git a/apps/web/src/lib/service-clients/service-storage/client.ts b/apps/web/src/lib/service-clients/service-storage/client.tsindex d271a5b187..032d41440d 100644--- a/apps/web/src/lib/service-clients/service-storage/client.ts+++ b/apps/web/src/lib/service-clients/service-storage/client.ts@@ -1089,6 +1089,17 @@ export const storageServiceClient = {}));},+ /** Ids of the starter documents seeded at signup. */+ async getStarterDocs() {+ return (+ await dssFetch<{+ how_to_guide_id: string;+ }>('/documents/starter_docs')+ ).map((result) => ({+ howToGuideId: result.how_to_guide_id,+ }));+ },+async initializeUserDocuments() {return (await dssFetch<{ success: boolean }>(@@ -2328,6 +2339,15 @@ export const storageServiceClient = {method: 'GET',});},+ async setContactName({+ contactId,+ ...body+ }: { contactId: string } & SetContactNameRequest) {+ return await dssFetch(`/crm/contacts/${contactId}/name`, {+ method: 'PUT',+ body: JSON.stringify(body),+ });+ },async setContactHidden({contactId,hidden,@@ -2340,11 +2360,11 @@ export const storageServiceClient = {body: JSON.stringify({ hidden }),});},- async setContactName({- contactId,+ async setCompanyName({+ companyId,...body- }: { contactId: string } & SetContactNameRequest) {- return await dssFetch(`/crm/contacts/${contactId}/name`, {+ }: { companyId: string } & SetCompanyNameRequest) {+ return await dssFetch(`/crm/companies/${companyId}/name`, {method: 'PUT',body: JSON.stringify(body),});@@ -2361,15 +2381,6 @@ export const storageServiceClient = {body: JSON.stringify({ hidden }),});},- async setCompanyName({- companyId,- ...body- }: { companyId: string } & SetCompanyNameRequest) {- return await dssFetch(`/crm/companies/${companyId}/name`, {- method: 'PUT',- body: JSON.stringify(body),- });- },async setEmailSync({companyId,emailSync,diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.tsindex 84cf4824ef..a3788870ad 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts@@ -1004,6 +1004,7 @@ export * from './soupThreadInfo';export * from './soupThreadInfoLatestReplyAt';export * from './soupThreadReply';export * from './soupThreadReplyEditedAt';+export * from './starterDocumentsResponse';export * from './string';export * from './successResponse';export * from './syncServiceVersionID';diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/starterDocumentsResponse.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/starterDocumentsResponse.tsnew file mode 100644index 0000000000..e5f0352d18--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/starterDocumentsResponse.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * The deterministic starter document ids for the current user.+ */+export interface StarterDocumentsResponse {+ /** Id of the user's "Macro how to guide". */+ how_to_guide_id: string;+}diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.tsindex 75b93e585e..adc2c21073 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts@@ -5072,6 +5072,17 @@ export const getDocumentByTeamSlugResponse = zod.object({error: zod.boolean().describe('Indicates if an error occurred'),});+/**+ * @summary Resolves the current user's starter documents.+ */+export const handlerResponse = zod+ .object({+ how_to_guide_id: zod+ .string()+ .describe('Id of the user\'s \"Macro how to guide\".'),+ })+ .describe('The deterministic starter document ids for the current user.');+/*** Returns document metadata, user access level, and view location.* @summary Handler for `GET /documents/{document_id}`.diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex 6fddcb3b2c..a44f839c81 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -6004,6 +6004,35 @@}}},+ "/documents/starter_docs": {+ "get": {+ "tags": ["document"],+ "summary": "Resolves the current user's starter documents.",+ "operationId": "handler",+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/StarterDocumentsResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GenericErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/documents/{document_id}": {"get": {"tags": ["document"],@@ -21477,6 +21506,17 @@}}},+ "StarterDocumentsResponse": {+ "type": "object",+ "description": "The deterministic starter document ids for the current user.",+ "required": ["how_to_guide_id"],+ "properties": {+ "how_to_guide_id": {+ "type": "string",+ "description": "Id of the user's \"Macro how to guide\"."+ }+ }+ },"String": {"type": "string"},diff --git a/crates/channels/src/outbound/notification_sender.rs b/crates/channels/src/outbound/notification_sender.rsindex 7df30483ea..476f58ac83 100644--- a/crates/channels/src/outbound/notification_sender.rs+++ b/crates/channels/src/outbound/notification_sender.rs@@ -145,8 +145,16 @@ where} => {let channel_id = mention.channel_id;let sender_id = mention.sender.as_user().cloned();- let secondary_notification_entity =- secondary_channel_thread_entity(mention.thread_id);+ // A mention's thread row is keyed by its thread root: the+ // containing thread for a reply, the message itself for a+ // top-level mention. Without the fallback a top-level mention+ // carries no secondary entity, and the inbox's channel-thread+ // query (which matches notifications by secondary entity)+ // can never surface it — the channel row deliberately leaves+ // mentions to thread rows, so the mention would show nowhere.+ let secondary_notification_entity = secondary_channel_thread_entity(Some(+ mention.thread_id.unwrap_or(mention.message_id),+ ));self.ingress.send_notification(SendNotificationRequestBuilder {@@ -171,8 +179,13 @@ where} => {let channel_id = mention.channel_id;let sender_id = mention.sender.as_user().cloned();- let secondary_notification_entity =- secondary_channel_thread_entity(mention.thread_id);+ // Same thread-root fallback as UserMention above: a top-level+ // mention's thread row is keyed by the message itself, so+ // without it the inbox's channel-thread query could never+ // surface the mention.+ let secondary_notification_entity = secondary_channel_thread_entity(Some(+ mention.thread_id.unwrap_or(mention.message_id),+ ));self.ingress.send_notification(SendNotificationRequestBuilder {diff --git a/crates/document_storage_service_client/src/document.rs b/crates/document_storage_service_client/src/document.rsindex 5b26fc92eb..7753342e6b 100644--- a/crates/document_storage_service_client/src/document.rs+++ b/crates/document_storage_service_client/src/document.rs@@ -9,7 +9,8 @@ use model::document::{response::{GetDocumentResponse, LocationResponseData, LocationResponseV3},};use model::document_storage_service_internal::{- GetDocumentsMetadataRequest, GetDocumentsMetadataResponse,+ GetDocumentsMetadataRequest, GetDocumentsMetadataResponse, InitializeStarterDocsResponse,+ StarterDocHowToGuide,};use models_permissions::share_permission::access_level::AccessLevel;use reqwest::StatusCode;@@ -384,11 +385,17 @@ impl DocumentStorageServiceClient {Ok(response_data)}- /// Create the "Macro how to guide" onboarding document for a user and pin- /// it to their sidebar favorites+ /// Create the starter documents for a user — the "Macro how to guide"+ /// plus the starter tasks it links to — and pin the guide to their+ /// sidebar favorites. Returns a reference to the guide document when it+ /// could be resolved, so callers can link to it (e.g. the support+ /// channel welcome message).#[tracing::instrument(skip(self))]- pub async fn initialize_how_to_guide(&self, user_id: &str) -> Result<()> {- let url = format!("{}/internal/documents/initialize_how_to_guide", self.url);+ pub async fn initialize_starter_docs(+ &self,+ user_id: &str,+ ) -> Result<Option<StarterDocHowToGuide>> {+ let url = format!("{}/internal/documents/initialize_starter_docs", self.url);let res = self.client@@ -410,7 +417,8 @@ impl DocumentStorageServiceClient {anyhow::bail!("HTTP {}: {}", status_code, body);}- Ok(())+ let response: InitializeStarterDocsResponse = res.json().await?;+ Ok(response.how_to_guide)}/// Create a documentdiff --git a/crates/macro_db_client/migrations/20260728143113_add_user_created_at.sql b/crates/macro_db_client/migrations/20260728143113_add_user_created_at.sqlnew file mode 100644index 0000000000..2e99885d65--- /dev/null+++ b/crates/macro_db_client/migrations/20260728143113_add_user_created_at.sql@@ -0,0 +1,8 @@+-- Account creation time, used to gate new-user features (e.g. the Getting+-- Started checklist) to accounts created after a cutoff date. Existing rows+-- deliberately stay NULL — they were created before tracking began, and an+-- eager column default would stamp every legacy account with the migration+-- time, making old accounts look brand new. The default is added separately+-- so only rows inserted from now on get a timestamp.+ALTER TABLE "User" ADD COLUMN "createdAt" TIMESTAMPTZ;+ALTER TABLE "User" ALTER COLUMN "createdAt" SET DEFAULT CURRENT_TIMESTAMP;diff --git a/crates/macro_db_client/src/user/get/get_legacy_user_info.rs b/crates/macro_db_client/src/user/get/get_legacy_user_info.rsindex 7c50b9d3ac..77f225294e 100644--- a/crates/macro_db_client/src/user/get/get_legacy_user_info.rs+++ b/crates/macro_db_client/src/user/get/get_legacy_user_info.rs@@ -1,3 +1,4 @@+use chrono::{DateTime, Utc};use macro_user_id::{lowercased::Lowercase, user_id::MacroUserId};use macro_uuid::ShortUuidConverter;@@ -13,6 +14,9 @@ pub struct LegacyUserInfo {pub ai_data_consent: bool,pub has_trialed: bool,pub referral_code: String,+ /// When the account was created. `None` for accounts that predate the+ /// `createdAt` column.+ pub created_at: Option<DateTime<Utc>>,}/// Gets the legacy user info@@ -35,7 +39,8 @@ pub async fn get_legacy_user_info(u."hasChromeExt" as has_chrome_ext,u."aiDataConsent" as ai_data_consent,mu.has_trialed as has_trialed,- u.macro_user_id as "macro_user_id"+ u.macro_user_id as "macro_user_id",+ u."createdAt" as "created_at?"FROM "User" uJOIN "macro_user" mu ON u.macro_user_id = mu.idWHERE u."id" = $1@@ -53,6 +58,7 @@ pub async fn get_legacy_user_info(ai_data_consent: row.ai_data_consent,has_trialed: row.has_trialed,referral_code: converter.from_uuid(&row.macro_user_id),+ created_at: row.created_at,}).fetch_one(db).await?;diff --git a/crates/macro_db_client/src/user/get_user_name.rs b/crates/macro_db_client/src/user/get_user_name.rsindex ce9d7bd0aa..b74fd5c131 100644--- a/crates/macro_db_client/src/user/get_user_name.rs+++ b/crates/macro_db_client/src/user/get_user_name.rs@@ -9,7 +9,7 @@ use non_empty::NonEmpty;#[tracing::instrument(skip(db))]pub async fn get_user_name(db: &sqlx::PgPool, macro_user_id: &str) -> anyhow::Result<UserName> {let macro_user_id = macro_uuid::string_to_uuid(macro_user_id)?;- let name: UserName = sqlx::query!(+ let name: Option<UserName> = sqlx::query!(r#"SELECT macro_user_id, first_name, last_name FROM macro_user_info WHERE macro_user_id = $1"#,@@ -20,10 +20,17 @@ pub async fn get_user_name(db: &sqlx::PgPool, macro_user_id: &str) -> anyhow::Refirst_name: row.first_name,last_name: row.last_name,})- .fetch_one(db)+ .fetch_optional(db).await?;- Ok(name)+ // The row is created lazily by the first name write (put_name upserts),+ // so a user who never set their name has none — that's "no name yet",+ // not an error.+ Ok(name.unwrap_or_else(|| UserName {+ id: macro_user_id.to_string(),+ first_name: None,+ last_name: None,+ }))}#[tracing::instrument(skip(db))]diff --git a/crates/macro_db_client/src/user/get_user_name/tests.rs b/crates/macro_db_client/src/user/get_user_name/tests.rsindex bfae941ac1..771bd560b0 100644--- a/crates/macro_db_client/src/user/get_user_name/tests.rs+++ b/crates/macro_db_client/src/user/get_user_name/tests.rs@@ -174,3 +174,18 @@ async fn uses_macro_names_if_either_first_or_last_present(Ok(())}++#[sqlx::test]+async fn test_get_user_name_without_info_row(pool: Pool<Postgres>) -> anyhow::Result<()> {+ // The macro_user_info row is created lazily by the first name write, so a+ // brand-new user has none — the lookup must report "no name yet", not+ // error.+ let user_id = "00000000-0000-0000-0000-000000000042";++ let name = get_user_name(&pool, user_id).await?;++ assert_eq!(name.id, user_id);+ assert_eq!(name.first_name, None);+ assert_eq!(name.last_name, None);+ Ok(())+}diff --git a/crates/mention_utils/Cargo.toml b/crates/mention_utils/Cargo.tomlindex a26d95d1d3..7a3953d1af 100644--- a/crates/mention_utils/Cargo.toml+++ b/crates/mention_utils/Cargo.toml@@ -5,6 +5,7 @@ publish = falseversion = "0.1.0"[dependencies]+bot_id = { path = "../bot_id" }channel_sender = { path = "../channel_sender" }either = { workspace = true }macro_user_id = { path = "../macro_user_id" }diff --git a/crates/mention_utils/src/serialize.rs b/crates/mention_utils/src/serialize.rsindex 31399235fa..5539aa7d22 100644--- a/crates/mention_utils/src/serialize.rs+++ b/crates/mention_utils/src/serialize.rs@@ -1,3 +1,4 @@+use bot_id::BotId;use macro_user_id::user_id::MacroUserIdStr;use serde::Serialize;@@ -19,3 +20,42 @@ pub fn user_mention(user_id: &MacroUserIdStr<'_>) -> Result<String, serde_json::})?;Ok(format!("<m-user-mention>{payload}</m-user-mention>"))}++/// Serialize a bot as an in-app user mention node. Bot mentions ride the+/// user-mention tag with a `bot|<uuid>` id and the display name in the email+/// field.+pub fn bot_mention(bot_id: BotId, display_name: &str) -> Result<String, serde_json::Error> {+ let storage_id = bot_id.into_storage_id();+ let payload = serde_json::to_string(&UserMention {+ user_id: storage_id.as_ref(),+ email: display_name,+ })?;+ Ok(format!("<m-user-mention>{payload}</m-user-mention>"))+}++#[derive(Serialize)]+#[serde(rename_all = "camelCase")]+struct DocumentMention<'a> {+ document_id: &'a str,+ block_name: &'a str,+ document_name: &'a str,+ block_params: serde_json::Map<String, serde_json::Value>,+ collapsed: bool,+}++/// Serialize a markdown document as an in-app document mention node.+pub fn document_mention(+ document_id: &str,+ document_name: &str,+) -> Result<String, serde_json::Error> {+ let payload = serde_json::to_string(&DocumentMention {+ document_id,+ block_name: "md",+ document_name,+ block_params: serde_json::Map::new(),+ collapsed: false,+ })?;+ Ok(format!(+ "<m-document-mention>{payload}</m-document-mention>"+ ))+}diff --git a/crates/mention_utils/src/serialize/test.rs b/crates/mention_utils/src/serialize/test.rsindex 85cde72390..56fa78fce0 100644--- a/crates/mention_utils/src/serialize/test.rs+++ b/crates/mention_utils/src/serialize/test.rs@@ -11,3 +11,19 @@ fn serializes_user_mention() {"<m-user-mention>{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}</m-user-mention>");}++#[test]+fn serializes_bot_mention() {+ assert_eq!(+ bot_mention(bot_id::MACRO_AI_BOT_ID, bot_id::MACRO_AI_NAME).unwrap(),+ "<m-user-mention>{\"userId\":\"bot|00000000-0000-0000-0000-00000000a1a1\",\"email\":\"Macro\"}</m-user-mention>"+ );+}++#[test]+fn serializes_document_mention() {+ assert_eq!(+ document_mention("6e01a670-0000-0000-0000-00000000f47d", "Macro how to guide").unwrap(),+ "<m-document-mention>{\"documentId\":\"6e01a670-0000-0000-0000-00000000f47d\",\"blockName\":\"md\",\"documentName\":\"Macro how to guide\",\"blockParams\":{},\"collapsed\":false}</m-document-mention>"+ );+}diff --git a/crates/model/src/document_storage_service_internal.rs b/crates/model/src/document_storage_service_internal.rsindex 59d4ccaedd..1045b35151 100644--- a/crates/model/src/document_storage_service_internal.rs+++ b/crates/model/src/document_storage_service_internal.rs@@ -68,3 +68,22 @@ pub struct DocumentMetadata {pub item_owner: MacroUserIdStr<'static>,pub file_type: Option<String>,}++/// Response for the internal starter-docs initialization endpoint.+#[derive(serde::Serialize, serde::Deserialize, Eq, PartialEq, Debug)]+pub struct InitializeStarterDocsResponse {+ /// The user's "Macro how to guide": freshly created, or resolved by name+ /// when the starter set had already been seeded. `None` when the guide+ /// could not be resolved (e.g. a partial seed created only the tasks).+ #[serde(default)]+ pub how_to_guide: Option<StarterDocHowToGuide>,+}++/// Reference to the seeded "Macro how to guide" document.+#[derive(serde::Serialize, serde::Deserialize, Eq, PartialEq, Debug, Clone)]+pub struct StarterDocHowToGuide {+ /// Document id.+ pub document_id: String,+ /// Document display name.+ pub document_name: String,+}diff --git a/crates/workspace-hack/Cargo.toml b/crates/workspace-hack/Cargo.tomlindex f93f94b7bc..a3b482f810 100644--- a/crates/workspace-hack/Cargo.toml+++ b/crates/workspace-hack/Cargo.toml@@ -131,7 +131,7 @@ triomphe = { version = "0.1" }tungstenite = { version = "0.28", features = ["__rustls-tls", "url"] }typenum = { version = "1", default-features = false, features = ["const-generics"] }url = { version = "2", features = ["serde"] }-uuid = { version = "1", features = ["fast-rng", "serde", "v4", "v7"] }+uuid = { version = "1", features = ["fast-rng", "serde", "v4", "v5", "v7"] }zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] }zeroize = { version = "1", features = ["derive"] }@@ -259,7 +259,7 @@ triomphe = { version = "0.1" }tungstenite = { version = "0.28", features = ["__rustls-tls", "url"] }typenum = { version = "1", default-features = false, features = ["const-generics"] }url = { version = "2", features = ["serde"] }-uuid = { version = "1", features = ["fast-rng", "serde", "v4", "v7"] }+uuid = { version = "1", features = ["fast-rng", "serde", "v4", "v5", "v7"] }zerocopy = { version = "0.8", default-features = false, features = ["derive", "simd"] }zeroize = { version = "1", features = ["derive"] }diff --git a/packages/sdk/generated/auth/types.gen.ts b/packages/sdk/generated/auth/types.gen.tsindex acd98af8b8..2410726758 100644--- a/packages/sdk/generated/auth/types.gen.ts+++ b/packages/sdk/generated/auth/types.gen.ts@@ -232,6 +232,11 @@ export type GetLegacyUserPermissionsResponse = {* Whether the user has consented to AI data sharing*/aiDataConsent: boolean;+ /**+ * When the account was created. Absent for accounts that predate+ * creation-time tracking.+ */+ createdAt?: string | null;/*** The user's email*/diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.tsindex e0f163639c..0a4ed6ff14 100644--- a/packages/sdk/generated/storage/index.ts+++ b/packages/sdk/generated/storage/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { type Options, Sdk } from './sdk.gen';-export type { AccessLevel, Activity, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CallActiveResponse, CallFilters, CallRecord, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClientOptions, CloudStorageItemType, Comment, CommentThread, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelResponse, DeleteChannelResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EntityFilters, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActivitiesResponse, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerError, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponse, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InstallSyncData, InteractionReason, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Mentions, NewChannelAttachment, NotificationFilters, Params, ParticipantRole, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessageData, PostMessageError, PostMessageErrors, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, ReactionAction, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SoupApiItem, SoupApiSort, SoupAttachment, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, String, SuccessResponse, SyncServiceVersionId, TagFilterMode, TaskFilters, TeamRole, Thread, ThreadResponse, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscriptSegmentRequest, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, UnthreadedPdfUuidRequest, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserActivitiesResponse, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';+export type { AccessLevel, Activity, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Anchor, AnchorId, AnchorRequest, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelContextMessage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelMessage, ApiChannelMessageKind, ApiChannelMessagesPage, ApiChannelParticipant, ApiChannelWithLatest, ApiCountedReaction, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiMessageAttachment, ApiMessageSender, ApiMessageSenderType, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApiResolvedChannelMessage, ApiThreadInfo, ApiThreadReply, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CallActiveResponse, CallFilters, CallRecord, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelEventAttachment, ChannelFilters, ChannelJoinCodeResponse, ChannelMessage, ChannelMessageAttachmentCreatedMetadata, ChannelMessageAttachmentRemovedMetadata, ChannelMessageDeletedMetadata, ChannelMessageFilters, ChannelMessagePatchedMetadata, ChannelMessagePostedMetadata, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClientOptions, CloudStorageItemType, Comment, CommentThread, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentError, CreateCommentErrors, CreateCommentRequest, CreateCommentResponse, CreateCommentResponse2, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentError, CreateCrmCommentErrors, CreateCrmCommentRequest, CreateCrmCommentResponse, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmComment, CrmCommentEntityType, CrmCommentThread, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmTeamSettingsResponse, CrmThread, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorInfo, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelResponse, DeleteChannelResponses, DeleteCommentData, DeleteCommentError, DeleteCommentErrors, DeleteCommentRequest, DeleteCommentResponse, DeleteCommentResponse2, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentError, DeleteCrmCommentErrors, DeleteCrmCommentResponse, DeleteCrmCommentResponses, DeleteCrmCommentResult, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageError, DeleteMessageErrors, DeleteMessageQuery, DeleteMessageResponse, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteThreadInfo, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditCommentData, EditCommentError, EditCommentErrors, EditCommentRequest, EditCommentResponse, EditCommentResponse2, EditCommentResponses, EditCrmCommentData, EditCrmCommentError, EditCrmCommentErrors, EditCrmCommentRequest, EditCrmCommentResponse, EditCrmCommentResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmptyResponse, EntityFilters, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActivitiesResponse, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesError, GetChannelMessagesErrors, GetChannelMessagesResponse, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsError, GetDocumentCommentsErrors, GetDocumentCommentsResponse, GetDocumentCommentsResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextError, GetMessageWithContextErrors, GetMessageWithContextResponse, GetMessageWithContextResponse2, GetMessageWithContextResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerError, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponse, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetThreadRepliesData, GetThreadRepliesError, GetThreadRepliesErrors, GetThreadRepliesResponse, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InstallSyncData, InteractionReason, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsError, ListCrmCommentsErrors, ListCrmCommentsResponse, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Mentions, NewChannelAttachment, NotificationFilters, Params, ParticipantRole, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageData, PatchMessageError, PatchMessageErrors, PatchMessageRequest, PatchMessageResponse, PatchMessageResponses, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfAnchorRequest, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PdfPlaceableCommentAnchorRequest, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesError, PostChannelMessagesErrors, PostChannelMessagesResponse, PostChannelMessagesResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessageData, PostMessageError, PostMessageErrors, PostMessageRequest, PostMessageResponse, PostMessageResponse2, PostMessageResponses, PostReactionData, PostReactionError, PostReactionErrors, PostReactionRequest, PostReactionResponse, PostReactionResponses, PostSoupAstRequest, PostSoupRequest, PostTypingData, PostTypingError, PostTypingErrors, PostTypingRequest, PostTypingResponse, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, ReactionAction, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageError, ResolveChannelMessageErrors, ResolveChannelMessageResponse, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SoupApiItem, SoupApiSort, SoupAttachment, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, String, SuccessResponse, SyncServiceVersionId, TagFilterMode, TaskFilters, TeamRole, Thread, ThreadResponse, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscriptSegmentRequest, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingAction, UnthreadedPdfUuidRequest, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateOperation, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserActivitiesResponse, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';diff --git a/packages/sdk/generated/storage/sdk.gen.ts b/packages/sdk/generated/storage/sdk.gen.tsindex a72fe7081b..69f51b92b8 100644--- a/packages/sdk/generated/storage/sdk.gen.ts+++ b/packages/sdk/generated/storage/sdk.gen.ts@@ -2,7 +2,7 @@import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';import { client } from './client.gen';-import type { AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentErrors, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentErrors, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentErrors, DeleteCrmCommentResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageErrors, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditCommentData, EditCommentErrors, EditCommentResponses, EditCrmCommentData, EditCrmCommentErrors, EditCrmCommentResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesErrors, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsErrors, GetDocumentCommentsResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextErrors, GetMessageWithContextResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetThreadRepliesData, GetThreadRepliesErrors, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, HealthHandlerData, HealthHandlerResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsErrors, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchMessageData, PatchMessageErrors, PatchMessageResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesErrors, PostChannelMessagesResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PostMessageData, PostMessageErrors, PostMessageResponses, PostReactionData, PostReactionErrors, PostReactionResponses, PostTypingData, PostTypingErrors, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageErrors, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } from './types.gen';+import type { AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCommentData, CreateCommentErrors, CreateCommentResponses, CreateCrmCommentData, CreateCrmCommentErrors, CreateCrmCommentResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelResponses, DeleteCommentData, DeleteCommentErrors, DeleteCommentResponses, DeleteCrmCommentData, DeleteCrmCommentErrors, DeleteCrmCommentResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteMessageData, DeleteMessageErrors, DeleteMessageResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditCommentData, EditCommentErrors, EditCommentResponses, EditCrmCommentData, EditCrmCommentErrors, EditCrmCommentResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelMessagesData, GetChannelMessagesErrors, GetChannelMessagesResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentCommentsData, GetDocumentCommentsErrors, GetDocumentCommentsResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetMessageWithContextData, GetMessageWithContextErrors, GetMessageWithContextResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetRecentActivityHandlerData, GetRecentActivityHandlerErrors, GetRecentActivityHandlerResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetThreadRepliesData, GetThreadRepliesErrors, GetThreadRepliesResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListCrmCommentsData, ListCrmCommentsErrors, ListCrmCommentsResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchMessageData, PatchMessageErrors, PatchMessageResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostChannelMessagesData, PostChannelMessagesErrors, PostChannelMessagesResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PostMessageData, PostMessageErrors, PostMessageResponses, PostReactionData, PostReactionErrors, PostReactionResponses, PostTypingData, PostTypingErrors, PostTypingResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, ResolveChannelMessageData, ResolveChannelMessageErrors, ResolveChannelMessageResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } from './types.gen';export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {/**@@ -1054,6 +1054,13 @@ export class Sdk extends HeyApiClient {return (options.client ?? this.client).get<GetDocumentByTeamSlugResponses, GetDocumentByTeamSlugErrors, ThrowOnError>({ url: '/documents/slug/{slug}', ...options });}+ /**+ * Resolves the current user's starter documents.+ */+ public handler<ThrowOnError extends boolean = false>(options?: Options<HandlerData, ThrowOnError>): RequestResult<HandlerResponses, HandlerErrors, ThrowOnError> {+ return (options?.client ?? this.client).get<HandlerResponses, HandlerErrors, ThrowOnError>({ url: '/documents/starter_docs', ...options });+ }+/*** Handler for `DELETE /documents/{document_id}`.*diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex 825e8ba0f1..b2e551dfab 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -6805,6 +6805,16 @@ export type SoupThreadReply = {updated_at: string;};+/**+ * The deterministic starter document ids for the current user.+ */+export type StarterDocumentsResponse = {+ /**+ * Id of the user's "Macro how to guide".+ */+ how_to_guide_id: string;+};+export type String = string;export type SuccessResponse = {@@ -9648,6 +9658,25 @@ export type GetDocumentByTeamSlugResponses = {export type GetDocumentByTeamSlugResponse = GetDocumentByTeamSlugResponses[keyof GetDocumentByTeamSlugResponses];+export type HandlerData = {+ body?: never;+ path?: never;+ query?: never;+ url: '/documents/starter_docs';+};++export type HandlerErrors = {+ 401: GenericErrorResponse;+};++export type HandlerError = HandlerErrors[keyof HandlerErrors];++export type HandlerResponses = {+ 200: StarterDocumentsResponse;+};++export type HandlerResponse = HandlerResponses[keyof HandlerResponses];+export type DeleteDocumentData = {body?: never;path: {diff --git a/packages/sdk/specs/auth.json b/packages/sdk/specs/auth.jsonindex 0e7ead316b..99ad3890bb 100644--- a/packages/sdk/specs/auth.json+++ b/packages/sdk/specs/auth.json@@ -3744,6 +3744,11 @@"type": "boolean","description": "Whether the user has consented to AI data sharing"},+ "createdAt": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "When the account was created. Absent for accounts that predate\ncreation-time tracking."+ },"email": {"type": "string","description": "The user's email"diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex 6fddcb3b2c..a44f839c81 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -6004,6 +6004,35 @@}}},+ "/documents/starter_docs": {+ "get": {+ "tags": ["document"],+ "summary": "Resolves the current user's starter documents.",+ "operationId": "handler",+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/StarterDocumentsResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/GenericErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/documents/{document_id}": {"get": {"tags": ["document"],@@ -21477,6 +21506,17 @@}}},+ "StarterDocumentsResponse": {+ "type": "object",+ "description": "The deterministic starter document ids for the current user.",+ "required": ["how_to_guide_id"],+ "properties": {+ "how_to_guide_id": {+ "type": "string",+ "description": "Id of the user's \"Macro how to guide\"."+ }+ }+ },"String": {"type": "string"},diff --git a/packages/sdk/src/coverage/skipped.ts b/packages/sdk/src/coverage/skipped.tsindex c51633a72a..1f8bacfe5f 100644--- a/packages/sdk/src/coverage/skipped.ts+++ b/packages/sdk/src/coverage/skipped.ts@@ -253,6 +253,7 @@ export const storageExcluded = ['getRingStatus','getUserDocumentViewLocation','getViewsHandler',+ 'handler','healthHandler','ingestTranscript','initializeUserDocuments',diff --git a/services/authentication_service/Cargo.toml b/services/authentication_service/Cargo.tomlindex 8e7743065e..685aa769e8 100644--- a/services/authentication_service/Cargo.toml+++ b/services/authentication_service/Cargo.toml@@ -41,6 +41,7 @@ aws-sdk-sesv2 = { workspace = true }aws-sdk-sqs = { workspace = true }axum = { workspace = true, features = ["macros"] }base64 = { workspace = true }+bot_id = { path = "../../crates/bot_id" }channels = { path = "../../crates/channels", default-features = false, features = ["outbound",] }diff --git a/services/authentication_service/src/api/user/get_legacy_user_permissions.rs b/services/authentication_service/src/api/user/get_legacy_user_permissions.rsindex e990b94484..2391b02b35 100644--- a/services/authentication_service/src/api/user/get_legacy_user_permissions.rs+++ b/services/authentication_service/src/api/user/get_legacy_user_permissions.rs@@ -36,6 +36,10 @@ pub struct GetLegacyUserPermissionsResponse {ai_data_consent: bool,/// The referral code for the userreferral_code: String,+ /// When the account was created. Absent for accounts that predate+ /// creation-time tracking.+ #[serde(skip_serializing_if = "Option::is_none")]+ created_at: Option<chrono::DateTime<chrono::Utc>>,}#[derive(serde::Serialize, Debug, utoipa::ToSchema)]@@ -143,5 +147,6 @@ pub async fn handler(has_trialed: legacy_user_info.has_trialed,ai_data_consent: legacy_user_info.ai_data_consent,referral_code: legacy_user_info.referral_code,+ created_at: legacy_user_info.created_at,})}diff --git a/services/authentication_service/src/api/webhooks/user/create_user_webhook.rs b/services/authentication_service/src/api/webhooks/user/create_user_webhook.rsindex 562f6a86db..dc970425c0 100644--- a/services/authentication_service/src/api/webhooks/user/create_user_webhook.rs+++ b/services/authentication_service/src/api/webhooks/user/create_user_webhook.rs@@ -28,6 +28,7 @@ use macro_user_id::{user_id::MacroUserIdStr,};use model::authentication::webhooks::{FusionAuthUserWebhook, User as FusionAuthWebhookUser};+use model::document_storage_service_internal::StarterDocHowToGuide;use model_entity::EntityType;use std::collections::HashSet;use teams::domain::team_repo::TeamService;@@ -311,33 +312,6 @@ async fn create_user_webhook(ctx: &ApiContext, req: FusionAuthUserWebhook) -> an}});- // Seed the "Macro how to guide" document and pin it to the new user's- // sidebar favorites. Fire-and-forget with retries — signup must not fail- // if document storage is temporarily unavailable.- tokio::spawn({- let document_storage_service_client = ctx.document_storage_service_client.clone();- let user_id = user_id.clone();- async move {- const MAX_ATTEMPTS: u32 = 3;- const RETRY_DELAY_SECS: u64 = 2;- for attempt in 1..=MAX_ATTEMPTS {- match document_storage_service_client- .initialize_how_to_guide(&user_id)- .await- {- Ok(()) => return,- Err(e) if attempt < MAX_ATTEMPTS => {- tracing::warn!(error=?e, attempt, "failed to initialize how to guide, retrying");- tokio::time::sleep(std::time::Duration::from_secs(RETRY_DELAY_SECS)).await;- }- Err(e) => {- tracing::error!(error=?e, "failed to initialize how to guide after {MAX_ATTEMPTS} attempts");- }- }- }- }- });-// Automatically add the new user to a team whose auto-join domain// matches their email domain. Fire-and-forget: a failed auto-join must// never block user creation.@@ -364,16 +338,25 @@ async fn create_user_webhook(ctx: &ApiContext, req: FusionAuthUserWebhook) -> an}});- // Create a private support channel connecting the new user with the- // Macro support team. Fire-and-forget: a failed channel creation must- // never block user creation.+ // Seed the starter documents (the "Macro how to guide" and the starter+ // tasks it links to, with the guide pinned to the new user's sidebar+ // favorites), then create a private support channel connecting the new+ // user with the Macro support team and post the welcome script — which+ // mentions the guide, so seeding runs first. Fire-and-forget: neither a+ // failed seeding (retried, then skipped) nor a failed channel creation+ // may block user creation.tokio::spawn({+ let document_storage_service_client = ctx.document_storage_service_client.clone();let channel_service = ctx.channel_service.clone();let favorites_service = ctx.favorites_service.clone();let user_id = user_id.clone();let email = email.clone();let support_channel_name = support_channel_name.clone();async move {+ let how_to_guide =+ initialize_starter_docs_with_retries(&document_storage_service_client, &user_id)+ .await;+let owner_id = match MacroUserIdStr::try_from(user_id) {Ok(owner_id) => owner_id,Err(e) => {@@ -427,6 +410,7 @@ async fn create_user_webhook(ctx: &ApiContext, req: FusionAuthUserWebhook) -> anchannel_service.as_ref(),&channel.id,owner_id,+ how_to_guide.as_ref(),).await.inspect_err(|e| {@@ -447,6 +431,29 @@ async fn create_user_webhook(ctx: &ApiContext, req: FusionAuthUserWebhook) -> anOk(())}+/// Seed the starter documents with retries, returning the "Macro how to+/// guide" reference when it could be resolved.+async fn initialize_starter_docs_with_retries(+ client: &document_storage_service_client::DocumentStorageServiceClient,+ user_id: &str,+) -> Option<StarterDocHowToGuide> {+ const MAX_ATTEMPTS: u32 = 3;+ const RETRY_DELAY_SECS: u64 = 2;+ for attempt in 1..=MAX_ATTEMPTS {+ match client.initialize_starter_docs(user_id).await {+ Ok(how_to_guide) => return how_to_guide,+ Err(e) if attempt < MAX_ATTEMPTS => {+ tracing::warn!(error=?e, attempt, "failed to initialize starter docs, retrying");+ tokio::time::sleep(std::time::Duration::from_secs(RETRY_DELAY_SECS)).await;+ }+ Err(e) => {+ tracing::error!(error=?e, "failed to initialize starter docs after {MAX_ATTEMPTS} attempts");+ }+ }+ }+ None+}+/// Initializes the experiments for a provided user#[allow(dead_code)]async fn initialize_user_experiments(diff --git a/services/authentication_service/src/service/user/support_channel_welcome.rs b/services/authentication_service/src/service/user/support_channel_welcome.rsindex 14e727ace8..efc349315d 100644--- a/services/authentication_service/src/service/user/support_channel_welcome.rs+++ b/services/authentication_service/src/service/user/support_channel_welcome.rs@@ -1,11 +1,13 @@use std::future::Future;+use bot_id::{MACRO_AI_BOT_ID, MACRO_AI_NAME};use channels::domain::{models::{PostMessageNotificationPolicy, PostMessageRequest, Sender, SimpleMention},ports::ChannelService,};use macro_user_id::user_id::MacroUserIdStr;-use mention_utils::serialize::user_mention;+use mention_utils::serialize::{bot_mention, document_mention, user_mention};+use model::document_storage_service_internal::StarterDocHowToGuide;use rootcause::{Report, prelude::ResultExt};use uuid::Uuid;@@ -16,15 +18,15 @@ const JACOB_EMAIL: &str = "[email protected]";const JULIA_EMAIL: &str = "[email protected]";const TEO_EMAIL: &str = "[email protected]";-/// The channel operation required to post a new user's welcome message.+/// The channel operation required to post a new user's welcome messages.pub trait SupportChannelMessageGateway: Send + Sync + 'static {- /// Post the initial welcome message.+ /// Post a welcome message, returning the created message id.fn post_message(&self,actor: Sender,channel_id: Uuid,request: PostMessageRequest,- ) -> impl Future<Output = Result<(), Report>> + Send;+ ) -> impl Future<Output = Result<Uuid, Report>> + Send;}impl<T> SupportChannelMessageGateway for T@@ -36,12 +38,13 @@ whereactor: Sender,channel_id: Uuid,request: PostMessageRequest,- ) -> Result<(), Report> {- ChannelService::post_message(self, actor, channel_id, request)+ ) -> Result<Uuid, Report> {+ let response = ChannelService::post_message(self, actor, channel_id, request).await.context("failed to post Macro support welcome message")?;- Ok(())+ Ok(Uuid::parse_str(&response.id)+ .context("posted Macro support welcome message returned an invalid id")?)}}@@ -50,11 +53,15 @@ fn support_user(email: &str) -> Result<MacroUserIdStr<'static>, Report> {.context_with(|| format!("invalid Macro support user email: {email}"))?)}-/// Post Julia's welcome message in a newly created support channel.+/// Post the welcome script in a newly created support channel: Julia's+/// welcome message, a scripted reply from the Macro assistant (posted+/// directly as the bot — the model is never invoked), and Julia's feedback+/// prompt.pub async fn post_support_channel_welcome(gateway: &impl SupportChannelMessageGateway,channel_id: &str,new_user: MacroUserIdStr<'static>,+ how_to_guide: Option<&StarterDocHowToGuide>,) -> Result<(), Report> {let channel_id =Uuid::parse_str(channel_id).context("support channel returned an invalid id")?;@@ -62,26 +69,49 @@ pub async fn post_support_channel_welcome(let julia = support_user(JULIA_EMAIL)?;let teo = support_user(TEO_EMAIL)?;- let content = format!(- "Hey {},\n\-Thanks signing up for Macro, we're excited for you to try it out.\n\-In case you need any help, this is a support channel with {} (the ceo) and {} (the cto).\n\-If you have any feedback or find any bugs let us know here!\n\-Julia",- user_mention(&new_user)?,+ let new_user_mention = user_mention(&new_user)?;+ let macro_mention = bot_mention(MACRO_AI_BOT_ID, MACRO_AI_NAME)?;+ // When the guide could not be seeded the document paragraph keeps its+ // point but drops the example mention.+ let document_example = match how_to_guide {+ Some(guide) => format!(+ ", like this: {}",+ document_mention(&guide.document_id, &guide.document_name)?+ ),+ None => String::new(),+ };++ let welcome = format!(+ "Hey {new_user_mention},\n\+\n\+Welcome to Macro, we're excited for you to try it out.\n\+\n\+This is your own personal support Channel, with {} (ceo) and {} (cto) and me (julia).\n\+\n\+Channels are how you stay in touch with other people on Macro.\n\+\n\+You can @mention people to get their attention. They'll get a separate notification in their inbox (like you'll see for this message).\n\+\n\+You can @mention documents{document_example}. Mentioning a document shares it with the other participants.\n\+\n\+You can even @mention our chat assistant, {macro_mention}. Say hi to {new_user_mention}, {macro_mention}.",user_mention(&jacob)?,user_mention(&teo)?,);- // Keep Jacob and Teo visually mentioned in the welcome copy without notifying them. Julia is- // the sender, so the channel notification policy excludes her automatically.+ // Keep Jacob, Teo, Macro, and the guide visually mentioned without+ // tracking them: tracked mentions would notify Jacob and Teo (and the+ // support team about the guide) on every signup, and a tracked bot+ // mention could trigger a real model reply if bot triggers were ever+ // wired into this service. Julia is the sender, so the channel+ // notification policy excludes her automatically.let mentions = [&new_user].into_iter().map(SimpleMention::user).collect();- gateway+ let welcome_message_id = gateway.post_message(- Sender::new_from_user(julia),+ Sender::new_from_user(julia.clone()),channel_id,PostMessageRequest {- content,+ content: welcome,mentions,thread_id: None,attachments: Vec::new(),@@ -90,5 +120,54 @@ Julia",triggered_by: None,},)- .await+ .await?;++ // The scripted assistant reply, threaded under the welcome message and+ // authored by the Macro bot itself. The new user's mention stays+ // visual-only: they already get the mention notification from the+ // welcome message above.+ let assistant_reply = format!(+ "Hey {new_user_mention}! 👋 Welcome to Macro — great to have you here.\n\+\n\+I'm the built-in assistant. You can @mention me anytime in a channel or chat and I'll help out: summarizing threads, drafting emails, digging through your docs and messages, managing tasks, whatever you need. Just ask.\n\+\n\+Excited for you to dive in."+ );++ gateway+ .post_message(+ Sender::new_from_bot(MACRO_AI_BOT_ID),+ channel_id,+ PostMessageRequest {+ content: assistant_reply,+ mentions: Vec::new(),+ thread_id: Some(welcome_message_id),+ attachments: Vec::new(),+ nonce: None,+ notification_policy: PostMessageNotificationPolicy::Default,+ // Julia's message asks Macro to say hi, so she is the+ // triggering user — the same attribution a real+ // mention-triggered agent reply would carry.+ triggered_by: Some(julia.to_string()),+ },+ )+ .await?;++ gateway+ .post_message(+ Sender::new_from_user(julia),+ channel_id,+ PostMessageRequest {+ content: "If you have any feedback or find any bugs let us know here.".to_string(),+ mentions: Vec::new(),+ thread_id: None,+ attachments: Vec::new(),+ nonce: None,+ notification_policy: PostMessageNotificationPolicy::Default,+ triggered_by: None,+ },+ )+ .await?;++ Ok(())}diff --git a/services/authentication_service/src/service/user/support_channel_welcome/test.rs b/services/authentication_service/src/service/user/support_channel_welcome/test.rsindex 2d72ad87c1..abb1adb74c 100644--- a/services/authentication_service/src/service/user/support_channel_welcome/test.rs+++ b/services/authentication_service/src/service/user/support_channel_welcome/test.rs@@ -4,10 +4,11 @@ use super::*;#[derive(Clone, Default)]struct RecordingGateway {- posted: Arc<Mutex<Option<PostedWelcomeMessage>>>,+ posted: Arc<Mutex<Vec<PostedWelcomeMessage>>>,}struct PostedWelcomeMessage {+ id: Uuid,actor: Sender,channel_id: Uuid,request: PostMessageRequest,@@ -19,13 +20,15 @@ impl SupportChannelMessageGateway for RecordingGateway {actor: Sender,channel_id: Uuid,request: PostMessageRequest,- ) -> Result<(), Report> {- *self.posted.lock().unwrap() = Some(PostedWelcomeMessage {+ ) -> Result<Uuid, Report> {+ let id = Uuid::new_v4();+ self.posted.lock().unwrap().push(PostedWelcomeMessage {+ id,actor,channel_id,request,});- Ok(())+ Ok(id)}}@@ -33,8 +36,54 @@ fn user_id(email: &str) -> MacroUserIdStr<'static> {MacroUserIdStr::try_from_email(email).unwrap()}+fn how_to_guide() -> StarterDocHowToGuide {+ StarterDocHowToGuide {+ document_id: "1af9022e-6d0d-4f9c-8bc4-4b1f9a2f47d0".to_string(),+ document_name: "Macro how to guide".to_string(),+ }+}++const NEW_USER_MENTION: &str = "<m-user-mention>{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}</m-user-mention>";+const MACRO_MENTION: &str = "<m-user-mention>{\"userId\":\"bot|00000000-0000-0000-0000-00000000a1a1\",\"email\":\"Macro\"}</m-user-mention>";++fn expected_welcome(document_example: &str) -> String {+ format!(+ concat!(+ "Hey {new_user},\n",+ "\n",+ "Welcome to Macro, we're excited for you to try it out.\n",+ "\n",+ "This is your own personal support Channel, with <m-user-mention>{{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}}</m-user-mention> (ceo) and <m-user-mention>{{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}}</m-user-mention> (cto) and me (julia).\n",+ "\n",+ "Channels are how you stay in touch with other people on Macro.\n",+ "\n",+ "You can @mention people to get their attention. They'll get a separate notification in their inbox (like you'll see for this message).\n",+ "\n",+ "You can @mention documents{document_example}. Mentioning a document shares it with the other participants.\n",+ "\n",+ "You can even @mention our chat assistant, {macro_bot}. Say hi to {new_user}, {macro_bot}.",+ ),+ new_user = NEW_USER_MENTION,+ macro_bot = MACRO_MENTION,+ document_example = document_example,+ )+}++fn expected_assistant_reply() -> String {+ format!(+ concat!(+ "Hey {new_user}! 👋 Welcome to Macro — great to have you here.\n",+ "\n",+ "I'm the built-in assistant. You can @mention me anytime in a channel or chat and I'll help out: summarizing threads, drafting emails, digging through your docs and messages, managing tasks, whatever you need. Just ask.\n",+ "\n",+ "Excited for you to dive in.",+ ),+ new_user = NEW_USER_MENTION,+ )+}+#[tokio::test]-async fn posts_welcome_as_julia_and_notifies_only_the_new_user() {+async fn posts_the_welcome_script_with_the_guide_mentioned() {let channel_id = Uuid::new_v4();let gateway = RecordingGateway::default();@@ -42,50 +91,102 @@ async fn posts_welcome_as_julia_and_notifies_only_the_new_user() {&gateway,&channel_id.to_string(),user_id("[email protected]"),+ Some(&how_to_guide()),).await.unwrap();let posted = gateway.posted.lock().unwrap();- let posted = posted.as_ref().unwrap();- assert_eq!(posted.actor.as_user(), Some(&user_id("[email protected]")));- assert_eq!(posted.channel_id, channel_id);+ let [welcome, reply, feedback] = posted.as_slice() else {+ panic!(+ "expected exactly three posted messages, got {}",+ posted.len()+ );+ };+ assert!(+ posted+ .iter()+ .all(|message| message.channel_id == channel_id)+ );++ assert_eq!(welcome.actor.as_user(), Some(&user_id("[email protected]")));assert_eq!(- posted.request.content,- concat!(- "Hey <m-user-mention>{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}</m-user-mention>,\n",- "Thanks signing up for Macro, we're excited for you to try it out.\n",- "In case you need any help, this is a support channel with <m-user-mention>{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}</m-user-mention> (the ceo) and <m-user-mention>{\"userId\":\"macro|[email protected]\",\"email\":\"[email protected]\"}</m-user-mention> (the cto).\n",- "If you have any feedback or find any bugs let us know here!\n",- "Julia",+ welcome.request.content,+ expected_welcome(+ ", like this: <m-document-mention>{\"documentId\":\"1af9022e-6d0d-4f9c-8bc4-4b1f9a2f47d0\",\"blockName\":\"md\",\"documentName\":\"Macro how to guide\",\"blockParams\":{},\"collapsed\":false}</m-document-mention>"));assert_eq!(- posted.request.mentions,+ welcome.request.mentions,vec![SimpleMention::user(&user_id("[email protected]"))]);- assert_eq!(posted.request.thread_id, None);- assert!(posted.request.attachments.is_empty());- assert_eq!(posted.request.nonce, None);+ assert_eq!(welcome.request.thread_id, None);+ assert!(welcome.request.attachments.is_empty());+ assert_eq!(welcome.request.nonce, None);assert_eq!(- posted.request.notification_policy,+ welcome.request.notification_policy,PostMessageNotificationPolicy::MentionsOnly);- assert_eq!(posted.request.triggered_by, None);+ assert_eq!(welcome.request.triggered_by, None);++ assert_eq!(reply.actor, Sender::new_from_bot(MACRO_AI_BOT_ID));+ assert_eq!(reply.request.content, expected_assistant_reply());+ assert!(reply.request.mentions.is_empty());+ assert_eq!(reply.request.thread_id, Some(welcome.id));+ assert_eq!(+ reply.request.triggered_by,+ Some("macro|[email protected]".to_string())+ );+ assert_eq!(+ reply.request.notification_policy,+ PostMessageNotificationPolicy::Default+ );++ assert_eq!(feedback.actor.as_user(), Some(&user_id("[email protected]")));+ assert_eq!(+ feedback.request.content,+ "If you have any feedback or find any bugs let us know here."+ );+ assert!(feedback.request.mentions.is_empty());+ assert_eq!(feedback.request.thread_id, None);+ assert_eq!(feedback.request.triggered_by, None);+}++#[tokio::test]+async fn omits_the_document_example_when_the_guide_is_missing() {+ let channel_id = Uuid::new_v4();+ let gateway = RecordingGateway::default();++ post_support_channel_welcome(+ &gateway,+ &channel_id.to_string(),+ user_id("[email protected]"),+ None,+ )+ .await+ .unwrap();++ let posted = gateway.posted.lock().unwrap();+ assert_eq!(posted.len(), 3);+ assert_eq!(posted[0].request.content, expected_welcome(""));}#[tokio::test]async fn rejects_an_invalid_channel_id_without_posting() {let gateway = RecordingGateway::default();- let error =- post_support_channel_welcome(&gateway, "not-a-uuid", user_id("[email protected]"))- .await- .unwrap_err();+ let error = post_support_channel_welcome(+ &gateway,+ "not-a-uuid",+ user_id("[email protected]"),+ None,+ )+ .await+ .unwrap_err();assert_eq!(error.downcast_current_context::<&str>().copied(),Some("support channel returned an invalid id"));- assert!(gateway.posted.lock().unwrap().is_none());+ assert!(gateway.posted.lock().unwrap().is_empty());}diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rsindex 13ce02e84b..26ebd65190 100644--- a/services/document_storage_service/src/api/context.rs+++ b/services/document_storage_service/src/api/context.rs@@ -472,6 +472,9 @@ pub(crate) struct ApiContext {pub documents_state: DocumentsState,pub projects_state: ProjectsState,pub channels_state: DssChannelsState,+ /// Shared channel service, for calling channel domain operations outside+ /// the channels router (starter-doc seeding records mention backlinks).+ pub channel_service: Arc<DssChannelService>,pub bots_state: DssBotsState,pub channel_bot_webhook_state: DssChannelBotWebhookState,pub call_state: DssCallState,diff --git a/services/document_storage_service/src/api/documents/get_starter_docs.rs b/services/document_storage_service/src/api/documents/get_starter_docs.rsnew file mode 100644index 0000000000..924d09b17f--- /dev/null+++ b/services/document_storage_service/src/api/documents/get_starter_docs.rs@@ -0,0 +1,34 @@+use crate::api::context::AuthorizationService;+use crate::api::documents::initialize_starter_docs::{HOW_TO_GUIDE_NAME, starter_doc_id};+use axum::Json;+use macro_authorization::{MacroAuthorizationExtractor, UserOrInternal};+use model::response::GenericErrorResponse;+use utoipa::ToSchema;++/// The deterministic starter document ids for the current user.+#[derive(serde::Serialize, ToSchema)]+pub struct StarterDocumentsResponse {+ /// Id of the user's "Macro how to guide".+ pub how_to_guide_id: String,+}++/// Resolves the current user's starter documents.+#[utoipa::path(+ tag = "document",+ get,+ path = "/documents/starter_docs",+ responses(+ (status = 200, body = StarterDocumentsResponse),+ (status = 401, body = GenericErrorResponse),+ )+)]+#[tracing::instrument(skip(user), fields(user_id=?user.authorization.user.macro_user_id))]+#[axum::debug_handler(state = crate::api::context::ApiContext)]+pub async fn handler(+ user: MacroAuthorizationExtractor<AuthorizationService, UserOrInternal>,+) -> Json<StarterDocumentsResponse> {+ Json(StarterDocumentsResponse {+ how_to_guide_id: starter_doc_id(&user.authorization.user.macro_user_id, HOW_TO_GUIDE_NAME)+ .to_string(),+ })+}diff --git a/services/document_storage_service/src/api/documents/initialize_how_to_guide.rs b/services/document_storage_service/src/api/documents/initialize_how_to_guide.rsdeleted file mode 100644index d28415ea19..0000000000--- a/services/document_storage_service/src/api/documents/initialize_how_to_guide.rs+++ /dev/null@@ -1,93 +0,0 @@-use crate::api::context::{ApiContext, AuthorizationService};-use axum::{- extract::State,- response::{IntoResponse, Json, Response},-};-use documents_hex::domain::create::{- MarkdownSubtype, NewDocumentMetadata, NewMarkdownTextDocument,-};-use entity_access::domain::{models::ViewAccessLevel, ports::EntityAccessService};-use favorites::domain::ports::FavoritesService;-use macro_authorization::{MacroAuthorizationExtractor, UserOrInternal};-use model::response::{ErrorResponse, GenericSuccessResponse};-use model_entity::EntityType;-use reqwest::StatusCode;--const HOW_TO_GUIDE_NAME: &str = "Macro how to guide";-const HOW_TO_GUIDE_TEMPLATE: &str = include_str!("./template/macro_how_to_guide.md");--/// Creates the "Macro how to guide" markdown document for the user and pins it-/// to their sidebar favorites. Called by the authentication service when a new-/// user signs up.-#[tracing::instrument(skip(state, user_context), fields(user_id=?user_context.authorization.user.macro_user_id))]-pub async fn handler(- State(state): State<ApiContext>,- user_context: MacroAuthorizationExtractor<AuthorizationService, UserOrInternal>,-) -> Result<Response, Response> {- tracing::info!("initialize how to guide");-- let created = state- .documents_state- .creator- .create_markdown_text(- user_context.authorization.user.macro_user_id.clone(),- NewMarkdownTextDocument {- metadata: NewDocumentMetadata::builder(HOW_TO_GUIDE_NAME).build(),- markdown: HOW_TO_GUIDE_TEMPLATE.to_string(),- subtype: MarkdownSubtype::Note,- },- )- .await- .map_err(|e| {- tracing::error!(error=?e, "failed to create how to guide document");- (- StatusCode::INTERNAL_SERVER_ERROR,- Json(ErrorResponse {- message: "failed to create how to guide document".into(),- }),- )- .into_response()- })?;-- let receipt = state- .entity_access_service- .generate_entity_access_receipt::<ViewAccessLevel>(- &user_context.authorization.user.macro_user_id,- user_context- .authorization- .user- .user_context- .organization_id- .map(i64::from),- created.document_id(),- EntityType::Document,- )- .await- .map_err(|e| {- tracing::error!(error=?e, "failed to authorize how to guide document favorite");- (- StatusCode::INTERNAL_SERVER_ERROR,- Json(ErrorResponse {- message: "failed to favorite how to guide document".into(),- }),- )- .into_response()- })?;-- state- .favorites_service- .add_favorite(&receipt)- .await- .map_err(|e| {- tracing::error!(error=?e, "failed to favorite how to guide document");- (- StatusCode::INTERNAL_SERVER_ERROR,- Json(ErrorResponse {- message: "failed to favorite how to guide document".into(),- }),- )- .into_response()- })?;-- Ok((StatusCode::OK, Json(GenericSuccessResponse::default())).into_response())-}diff --git a/services/document_storage_service/src/api/documents/initialize_starter_docs.rs b/services/document_storage_service/src/api/documents/initialize_starter_docs.rsnew file mode 100644index 0000000000..0c37477f7c--- /dev/null+++ b/services/document_storage_service/src/api/documents/initialize_starter_docs.rs@@ -0,0 +1,427 @@+use crate::api::context::{ApiContext, AuthorizationService};+use axum::{+ extract::State,+ response::{IntoResponse, Json, Response},+};+use channels::domain::{models::CreateEntityMentionOptions, ports::ChannelService};+use documents_hex::domain::{+ create::{MarkdownSubtype, NewDocumentMetadata, NewMarkdownTextDocument},+ models::DocumentError,+};+use entity_access::domain::{+ models::{EditAccessLevel, ViewAccessLevel},+ ports::EntityAccessService,+};+use favorites::domain::ports::FavoritesService;+use macro_authorization::{MacroAuthorizationExtractor, UserOrInternal};+use macro_user_id::user_id::MacroUserIdStr;+use model::document_storage_service_internal::{+ InitializeStarterDocsResponse, StarterDocHowToGuide,+};+use model::response::GenericResponse;+use model_entity::EntityType;+use models_properties::api::{AddPropertyOptionRequest, AddStringOptionRequest, SetPropertyValue};+use models_properties::service::property_option::PropertyOptionValue;+use properties::{PropertiesService as _, domain::model::TagScope};+use reqwest::StatusCode;+use std::collections::HashSet;+use system_properties::{PriorityOption, SystemPropertyKey};++/// Also the name `get_starter_docs` resolves the guide by, so the two stay in+/// sync from one definition.+pub(in crate::api) const HOW_TO_GUIDE_NAME: &str = "Macro how to guide";+const HOW_TO_GUIDE_TEMPLATE: &str = include_str!("./template/macro_how_to_guide.md");++/// A starter task the templates can mention. Mention tags embed the target's+/// document id and name, which don't exist at authoring time, so templates+/// carry the placeholder strings instead: `id_placeholder` inside+/// `documentId` fields and `name_placeholder` inside `documentName` fields+/// of `<m-document-mention>`/`<m-document-card>` tags. Each user gets+/// deterministic ids substituted at creation time.+struct StarterTask {+ name: &'static str,+ template: &'static str,+ id_placeholder: &'static str,+ name_placeholder: &'static str,+ /// Priority set after creation, so the reading order (High → Low) shows+ /// in the default priority-sorted task list.+ priority: PriorityOption,+}++const STARTER_TASKS: [StarterTask; 3] = [+ StarterTask {+ name: "Intro to tasks",+ template: include_str!("./template/learn_about_tasks.md"),+ id_placeholder: "LEARN_ABOUT_TASKS_ID",+ name_placeholder: "LEARN_ABOUT_TASKS_NAME",+ priority: PriorityOption::High,+ },+ StarterTask {+ name: "Advanced task features",+ template: include_str!("./template/advanced_task_features.md"),+ id_placeholder: "ADVANCED_TASK_FEATURES_ID",+ name_placeholder: "ADVANCED_TASK_FEATURES_NAME",+ priority: PriorityOption::Medium,+ },+ StarterTask {+ name: "How we use tasks at Macro",+ template: include_str!("./template/how_we_use_tasks.md"),+ id_placeholder: "HOW_WE_USE_TASKS_ID",+ name_placeholder: "HOW_WE_USE_TASKS_NAME",+ priority: PriorityOption::Low,+ },+];++/// Gateway push sent once the starter set — the guide favorite included — is+/// fully seeded. Seeding is fire-and-forget from signup, so a fresh account's+/// app is often already open with empty Soup and favorites lists cached; the+/// web client invalidates those lists and provisioned properties on this+/// message.+const STARTER_DOCS_INITIALIZED_MESSAGE_TYPE: &str = "starter_docs_initialized";++/// Label of the personal tag applied to every starter doc.+const DOCS_TAG_LABEL: &str = "docs";+/// Blue from the fixed tag palette (`tagColors.ts` / the properties toolset+/// `TagColor`) — options with colors outside the palette won't render in the+/// tag picker.+const DOCS_TAG_COLOR: &str = "#0091FF";++/// Fixed namespace for deriving deterministic per-user starter-document ids.+const STARTER_DOC_ID_NAMESPACE: uuid::Uuid =+ uuid::Uuid::from_u128(0x3d1c_5f86_9e4b_45d2_a7c8_6b0e_2f9a_1d47);++/// Deterministic id for one of a user's starter documents (UUIDv5 over the+/// user id and document name). Every retry — including a concurrent+/// duplicate webhook delivery — computes the same id, so the primary key+/// dedupes creation instead of a rerun seeding a document twice.+pub(in crate::api) fn starter_doc_id(+ user_id: &MacroUserIdStr<'_>,+ document_name: &str,+) -> uuid::Uuid {+ uuid::Uuid::new_v5(+ &STARTER_DOC_ID_NAMESPACE,+ format!("{}:{document_name}", user_id.as_ref()).as_bytes(),+ )+}++/// Find-or-create the user's personal "docs" tag, returning its+/// `(property_definition_id, option_id)`. Provisions the personal tag set on+/// first use. Tags are matched by label, so a pre-existing "docs" tag (or a+/// rerun that got this far before failing) is reused, never duplicated.+async fn resolve_docs_tag(+ state: &ApiContext,+ user_id: &MacroUserIdStr<'_>,+) -> Option<(uuid::Uuid, uuid::Uuid)> {+ let tag_set = state+ .properties_service+ .ensure_tag_set(user_id, None, TagScope::User)+ .await+ .inspect_err(|e| tracing::error!(error=?e, "failed to provision personal tag set"))+ .ok()?;+ let Some(definition_id) = tag_set.definition.as_ref().map(|definition| definition.id) else {+ tracing::error!("provisioned personal tag set has no definition");+ return None;+ };++ if let Some(existing) = tag_set.options.iter().find(|option| {+ matches!(&option.value, PropertyOptionValue::String(label) if label == DOCS_TAG_LABEL)+ }) {+ return Some((definition_id, existing.id));+ }++ state+ .properties_service+ .add_property_option(+ user_id,+ None,+ definition_id,+ &AddPropertyOptionRequest::SelectString {+ option: AddStringOptionRequest {+ display_order: tag_set.options.len() as i32,+ value: DOCS_TAG_LABEL.to_string(),+ color: Some(DOCS_TAG_COLOR.to_string()),+ },+ },+ )+ .await+ .inspect_err(|e| tracing::error!(error=?e, "failed to create personal docs tag"))+ .ok()+ .map(|option| (definition_id, option.id))+}++fn internal_error(message: &str) -> Response {+ GenericResponse::builder()+ .message(message)+ .is_error(true)+ .send(StatusCode::INTERNAL_SERVER_ERROR)+}++/// Creates the user's starter content — the "Macro how to guide" markdown+/// document plus the starter tasks it links to — records the mention+/// backlinks between them, and pins the guide to the user's sidebar+/// favorites. Called by the authentication service when a new user signs up.+/// Safe to retry: deterministic per-user ids dedupe concurrent duplicate+/// deliveries, and a create conflict means that document was already seeded.+#[tracing::instrument(skip(state, user_context), fields(user_id=?user_context.authorization.user.macro_user_id))]+pub async fn handler(+ State(state): State<ApiContext>,+ user_context: MacroAuthorizationExtractor<AuthorizationService, UserOrInternal>,+) -> Result<Response, Response> {+ tracing::info!("initialize starter docs");++ let user_id = &user_context.authorization.user.macro_user_id;++ // Resolve every starter document's deterministic id up front so the+ // templates can cross-link before any document has been created.+ let task_ids: Vec<String> = STARTER_TASKS+ .iter()+ .map(|task| starter_doc_id(user_id, task.name).to_string())+ .collect();+ let guide_id = starter_doc_id(user_id, HOW_TO_GUIDE_NAME).to_string();++ let fill = |template: &str| {+ let mut filled = template.to_string();+ for (task, id) in STARTER_TASKS.iter().zip(&task_ids) {+ filled = filled+ .replace(task.id_placeholder, id)+ .replace(task.name_placeholder, task.name);+ }+ filled+ };++ // Ids created by THIS call: backlinks and decorations run once, on the+ // call that created the document.+ let mut created_now: HashSet<String> = HashSet::new();++ for (task, id) in STARTER_TASKS.iter().zip(&task_ids) {+ let created = state+ .documents_state+ .creator+ .create_markdown_text(+ user_id.clone(),+ NewMarkdownTextDocument {+ metadata: NewDocumentMetadata::builder(task.name)+ .id(starter_doc_id(user_id, task.name))+ .build(),+ markdown: fill(task.template),+ subtype: MarkdownSubtype::Task {+ property_values: None,+ share_with_team: false,+ team_id: None,+ },+ },+ )+ .await;+ match created {+ Ok(_) => {+ created_now.insert(id.clone());+ }+ Err(DocumentError::Conflict(_)) => {}+ Err(e) => {+ tracing::error!(error=?e, task_name=%task.name, "failed to create starter task");+ return Err(internal_error("failed to create starter task"));+ }+ }+ }++ let created = state+ .documents_state+ .creator+ .create_markdown_text(+ user_id.clone(),+ NewMarkdownTextDocument {+ metadata: NewDocumentMetadata::builder(HOW_TO_GUIDE_NAME)+ .id(starter_doc_id(user_id, HOW_TO_GUIDE_NAME))+ .build(),+ markdown: fill(HOW_TO_GUIDE_TEMPLATE),+ subtype: MarkdownSubtype::Note,+ },+ )+ .await;+ match created {+ Ok(_) => {+ created_now.insert(guide_id.clone());+ }+ Err(DocumentError::Conflict(_)) => {}+ Err(e) => {+ tracing::error!(error=?e, "failed to create how to guide document");+ return Err(internal_error("failed to create how to guide document"));+ }+ }++ // Record mention backlinks (the References panel) for the starter set.+ // The mention graph is derived from the templates themselves: a source+ // template containing a task's id placeholder mentions that task. Only+ // sources created by this call are recorded: `create_entity_mention`+ // does not dedupe, and the call that created a document is the only one+ // that records its backlinks. Best-effort — the mentions live in the+ // document text regardless; a failed row only means a missing+ // References entry.+ let mut mention_pairs: Vec<(String, String)> = Vec::new();+ for (target, target_id) in STARTER_TASKS.iter().zip(&task_ids) {+ if HOW_TO_GUIDE_TEMPLATE.contains(target.id_placeholder) && created_now.contains(&guide_id)+ {+ mention_pairs.push((guide_id.clone(), target_id.clone()));+ }+ for (source, source_id) in STARTER_TASKS.iter().zip(&task_ids) {+ if source_id != target_id+ && source.template.contains(target.id_placeholder)+ && created_now.contains(source_id)+ {+ mention_pairs.push((source_id.clone(), target_id.clone()));+ }+ }+ }+ for (source_id, target_id) in mention_pairs {+ let _ = state+ .channel_service+ .create_entity_mention(CreateEntityMentionOptions {+ source_entity_type: "document".to_string(),+ source_entity_id: source_id.clone(),+ entity_type: "document".to_string(),+ entity_id: target_id.to_string(),+ user_id: Some(user_context.authorization.user.user_context.user_id.clone()),+ })+ .await+ .inspect_err(|e| {+ tracing::error!(+ error=?e,+ source_id=%source_id,+ target_id=%target_id,+ "failed to record starter doc mention backlink"+ );+ });+ }++ // Decorate the documents created by this call: each task's priority,+ // plus the personal "docs" tag. Best-effort like the mention backlinks+ // — a decoration failure on an existing document could never be retried+ // into success, so log and continue instead of failing the request.+ let docs_tag = if created_now.is_empty() {+ None+ } else {+ resolve_docs_tag(&state, user_id).await+ };+ let organization_id = user_context+ .authorization+ .user+ .user_context+ .organization_id+ .map(i64::from);+ let starter_docs = STARTER_TASKS+ .iter()+ .zip(&task_ids)+ .map(|(task, id)| (id.clone(), Some(task.priority)))+ .chain(std::iter::once((guide_id.clone(), None)))+ .filter(|(id, _)| created_now.contains(id));+ for (document_id, priority) in starter_docs {+ // One Edit receipt per doc covers both property writes; the+ // properties service takes its authorization as this typed receipt.+ let receipt = match state+ .entity_access_service+ .generate_entity_access_receipt::<EditAccessLevel>(+ &user_context.authorization.user.macro_user_id,+ organization_id,+ &document_id,+ EntityType::Document,+ )+ .await+ {+ Ok(receipt) => receipt,+ Err(e) => {+ tracing::error!(+ error=?e,+ document_id=%document_id,+ "failed to authorize starter doc decoration"+ );+ continue;+ }+ };++ if let Some(priority) = priority {+ let _ = state+ .properties_service+ .set_entity_property(+ &receipt,+ SystemPropertyKey::PRIORITY_UUID,+ Some(SetPropertyValue::SelectOption {+ option_id: priority.uuid(),+ }),+ )+ .await+ .inspect_err(|e| {+ tracing::error!(+ error=?e,+ document_id=%document_id,+ "failed to set starter task priority"+ );+ });+ }++ if let Some((tag_definition_id, tag_option_id)) = docs_tag {+ let _ = state+ .properties_service+ .add_entity_property_option(&receipt, tag_definition_id, tag_option_id)+ .await+ .inspect_err(|e| {+ tracing::error!(+ error=?e,+ document_id=%document_id,+ "failed to tag starter doc"+ );+ });+ }+ }++ // Runs on every call, not just document creation: `add_favorite` is an+ // upsert, and re-favoriting reconciles a prior attempt that created the+ // guide but failed before the favorite was written.+ let how_to_guide_receipt = state+ .entity_access_service+ .generate_entity_access_receipt::<ViewAccessLevel>(+ user_id,+ organization_id,+ &guide_id,+ EntityType::Document,+ )+ .await+ .map_err(|e| {+ tracing::error!(error=?e, "failed to authorize how to guide document favorite");+ internal_error("failed to favorite how to guide document")+ })?;++ state+ .favorites_service+ .add_favorite(&how_to_guide_receipt)+ .await+ .map_err(|e| {+ tracing::error!(error=?e, "failed to favorite how to guide document");+ internal_error("failed to favorite how to guide document")+ })?;++ // Best-effort: a missed push just means the sidebar catches up on the+ // next favorites refetch instead of live.+ let _ = state+ .conn_gateway_client+ .send_message(+ EntityType::User+ .with_entity_str(user_context.authorization.user.macro_user_id.as_ref()),+ STARTER_DOCS_INITIALIZED_MESSAGE_TYPE.to_string(),+ serde_json::json!({}),+ )+ .await+ .inspect_err(|e| {+ tracing::warn!(error=?e, "failed to push starter docs initialized");+ });++ Ok((+ StatusCode::OK,+ Json(InitializeStarterDocsResponse {+ how_to_guide: Some(StarterDocHowToGuide {+ document_id: guide_id,+ document_name: HOW_TO_GUIDE_NAME.to_string(),+ }),+ }),+ )+ .into_response())+}diff --git a/services/document_storage_service/src/api/documents/mod.rs b/services/document_storage_service/src/api/documents/mod.rsindex 11455850dd..b68aacb48d 100644--- a/services/document_storage_service/src/api/documents/mod.rs+++ b/services/document_storage_service/src/api/documents/mod.rs@@ -20,8 +20,9 @@ pub(in crate::api) mod get_document_version;pub(in crate::api) mod get_document_views;pub(in crate::api) mod get_documents_metadata;pub(in crate::api) mod get_full_pdf_modification_data;+pub(in crate::api) mod get_starter_docs;pub(in crate::api) mod get_user_documents;-pub(in crate::api) mod initialize_how_to_guide;+pub(in crate::api) mod initialize_starter_docs;pub(in crate::api) mod initialize_user_documents;pub(in crate::api) mod job_processing_result;pub(in crate::api) mod list_documents_with_access;@@ -46,6 +47,7 @@ pub fn router(state: ApiContext) -> Router<ApiContext> {permissions_token::router(state.clone()),).route("/", get(get_user_documents::get_user_documents_handler))+ .route("/starter_docs", get(get_starter_docs::handler))// NOTE: POST / (create_document) is now served by the documents hex crate router// NOTE: POST /create_task is now served by the documents hex crate router.route(diff --git a/services/document_storage_service/src/api/documents/template/advanced_task_features.md b/services/document_storage_service/src/api/documents/template/advanced_task_features.mdnew file mode 100644index 0000000000..80d13adffe--- /dev/null+++ b/services/document_storage_service/src/api/documents/template/advanced_task_features.md@@ -0,0 +1,25 @@+# Task creation++In addition to creating a task with `c -> t` or by typing `/task`, you can turn any checkbox list into a list of tasks by selecting the rows and clicking the `Tasks` button. Here, try it below:++- [ ] stop+- [ ] drop+- [ ] roll++Similarly, any Channel message can be turned into a task, by hovering the message and clicking the `Task` button.++# GitHub integration++Macro tasks integrate with GitHub: as you create, review, and merge branches, the task automatically moves to “In Progress,” “In Review,” or “Done,” and the task records which pull request is associated with it.++To connect your GitHub, go to [the Connections page](https://macro.com/app/settings/connections) in Settings.++To associate a task with a branch, simply copy a task's branch name, with its special Macro identifier, and use that as your branch name. There's a button for that under the task title, or press `cmd+k` and search "Copy branch name".++# Macro MCP++[Connect the Macro MCP](https://macro.com/app/settings/mcp-server) to your coding agent to give your agent direct access to your tasks.++# Cloud Agent Integration++In the Info Panel (which lives on the right when there is enough room, or behind the info button in the top-right at narrower width), in the Actions section, you'll find tools for integrating your tasks with outside agents. You can copy the task as a prompt, or even open up a cloud agent with the press of a button.diff --git a/services/document_storage_service/src/api/documents/template/how_we_use_tasks.md b/services/document_storage_service/src/api/documents/template/how_we_use_tasks.mdnew file mode 100644index 0000000000..30781baf9f--- /dev/null+++ b/services/document_storage_service/src/api/documents/template/how_we_use_tasks.md@@ -0,0 +1,19 @@+At Macro we use Macro to manage the development of Macro. Tasks are one of the most important tools for accomplishing that.++For us this process often starts in our Bug Reports channel. Someone reports a bug that they found, and the responsible party creates a task, directly in response to the message—either using the `/task` action in the input, or by pressing the task button in the message hover menu. Doing either of these takes no more than a few seconds.++++Now there is a bidirectional link between the initial report and the task itself, so that no matter where conversation happens, the context never gets lost.++Task creation might also happen in response to a customer support email. A task can be created directly from the email itself.++Other times, tasks will be assigned to you. When a task is assigned to you it shows up in your inbox, alongside channel messages, emails, and PR updates.++Sometimes we'll write up documents describing new features. We can then ask the Macro agent to create tasks based on the document and assign them to people.++++Managing task status happens automatically, using the GitHub integration. As you create, review, and merge branches, the task automatically moves to “In Progress,” “In Review,” or “Done,” and the task records which pull request is associated with it.++The beauty of Macro is that all of the places a conversation about a task might happen—whether it's in the initial report, in the task itself, or on the pull request—all get linked together, automatically, without doing any additional work.diff --git a/services/document_storage_service/src/api/documents/template/learn_about_tasks.md b/services/document_storage_service/src/api/documents/template/learn_about_tasks.mdnew file mode 100644index 0000000000..926d6f86ea--- /dev/null+++ b/services/document_storage_service/src/api/documents/template/learn_about_tasks.md@@ -0,0 +1,13 @@+Tasks are, essentially, *fancy* documents. They carry everything a regular document does, plus:++- **You can *assign* tasks.** If you assign someone a task, a notification appears in their inbox.+- __Tasks have a *status* and a *priority.*__ You'll see these in the pills beneath the task title, as well as anywhere a task is mentioned.+- **Tasks live in the *Tasks View*.** Navigate to Tasks View with `g -> t` to see all your tasks.++Create a task with `c -> t` or by typing `/task`.++Find yourself craving additional properties, like *story points?* You can add them as a custom property, in the info panel.++Learn more: <m-document-mention>{"documentId":"ADVANCED_TASK_FEATURES_ID","blockName":"task","documentName":"ADVANCED_TASK_FEATURES_NAME","blockParams":{},"collapsed":false}</m-document-mention>++Or see: <m-document-mention>{"documentId":"HOW_WE_USE_TASKS_ID","blockName":"task","documentName":"HOW_WE_USE_TASKS_NAME","blockParams":{},"collapsed":false}</m-document-mention>\ No newline at end of filediff --git a/services/document_storage_service/src/api/documents/template/macro_how_to_guide.md b/services/document_storage_service/src/api/documents/template/macro_how_to_guide.mdindex 604a447384..96208f518b 100644--- a/services/document_storage_service/src/api/documents/template/macro_how_to_guide.md+++ b/services/document_storage_service/src/api/documents/template/macro_how_to_guide.md@@ -1,110 +1,97 @@-# Welcome to Macro 👋+# Welcome to Macro!-Macro is one extremely fast, unified interface for all your work — email, messages, tasks, docs, and AI agents, all linked together in one database. This guide walks you through the essentials so you can hit the ground running.+Macro is an extremely fast, unified interface for all your work—email, messages, tasks, docs, and AI agents, all linked together in one database.-> **Tip:** Keep this doc handy — it's pinned to your favorites in the sidebar. For the full documentation, visit [docs.macro.com](https://docs.macro.com).+We've prepared some starter docs to help you get a sense of the power of **Macro**. Press `cmd + k` to take a peek!------## 1. Learn the five shortcuts that matter+Let's walk around together and see what **Macro** can do. As you're reading, try playing around.-Macro is built to be driven from the keyboard. These five will get you 90% of the way:+> **Tip:** We've pinned this doc to your favorites, which appears in the sidebar. For the full documentation, visit [docs.macro.com](https://docs.macro.com).-- `c` — create anything (then `d` for a doc, `t` for a task, `e` for an email, `m` for a channel, `a` for an AI chat)-- `cmd+k` — jump to anything by name-- `/` — search everything in your workspace-- `j` / `k` — move down / up in any list-- `e` — mark done and move on+----The full list lives in the [keyboard shortcuts reference](https://docs.macro.com/keyboard-shortcuts).+# Unified Input-## 2. Connect your email+In **Macro**, anywhere that you can type—whether it's a document, an email, a message—you have access to a host of powerful tools.-Macro is a full email client that syncs with Gmail and Google Workspace — no migration needed. Connect one or more accounts in **Settings**, and every message lands in a single unified inbox. When you compose, you pick which address sends.+For example, you can always type @ to open the **mentions** menu. Go ahead, try it.-+**Type @ here:**-Learn more in the [email docs](https://docs.macro.com/product/email).+Mentions allow you to create **bidirectional links** to any document, contact, channel, etc. Anything inside of Macro can be mentioned.-## 3. Triage from one inbox+For example here is **task** mention: <m-document-mention>{"documentId":"LEARN_ABOUT_TASKS_ID","blockName":"task","documentName":"LEARN_ABOUT_TASKS_NAME","blockParams":{},"collapsed":false}</m-document-mention>. And here is the same mention, rendered as a card:-Press `g` then `i` to open your unified inbox: emails, channel messages, task assignments, doc mentions, and agent results — all in one list.+<m-document-card>{"documentId":"LEARN_ABOUT_TASKS_ID","blockName":"task","documentName":"LEARN_ABOUT_TASKS_NAME","blockParams":{},"previewBox":["100%","400px"],"previewData":null}</m-document-card>-- **Signal** is what needs your attention. **Noise** is everything else (newsletters, promos), filtered by AI.-- Move with `j`/`k`, preview with `space`, open with `enter`, and clear items with `e` to get to inbox zero.+Sometimes mentioning has special powers. For example, if you mention a user in a **message** or in a **document comment**, Macro will notify that user that they've been mentioned.-+> **Tip:** You can see every place that a document has been mentioned in the References sections of the document's info panel.-Learn more in the [inbox docs](https://docs.macro.com/product/inbox).+Other tools available wherever you are typing:-## 4. Write docs (like this one!)+1. `#` to add **tags,** e.g. docs+2. `/` for text formatting and other tools (try typing `/task`)+3. `:` for emojis 🦋-Press `c` then `d` to create a document. Docs are markdown-native and collaborative in real time — multiple people can type on the same line without conflicts.+----- Type `/` to insert blocks: headings, tables, code, images, math, and more.-- Markdown autoformatting just works: `#` for headings, `-` for lists, `[]` for checklists, `>` for quotes.-- Select text to comment; comments with @mentions always notify.-- Full version history with time-travel browsing is built in.+# Learn the five most important shortcuts-+Macro is built to be driven from the keyboard.-Learn more in the [docs documentation](https://docs.macro.com/product/docs).+- `cmd + k` — jump to anything by name+- `c` — create anything (then `d` for a doc, `t` for a task, `e` for an email, `m` for a channel, `a` for an AI chat)+- `/` — search everything in your workspace+- `j` / `k` — move down / up in any list+- `e` — mark done-## 5. Link everything with @mentions+> **Note:** You won't be able to use the single-letter shortcuts if you're currently editing text. Press `escape` first to unfocus the editor, and then try pressing, for example, `c`.-The `@` key is Macro's superpower. In any doc, message, task, or email you can mention people, documents, tasks, files, emails, channels, and dates. Every mention is a **bidirectional link** — you can always trace back who referenced what, from where.+You'll see shortcuts for actions listed in the command menu, in tooltips when you hover buttons, or in the context menu when you right-click on an item. For a full-list of shortcuts, see [keyboard shortcuts reference](https://macro.com/app/settings/shortcuts).-Learn more about [mentions](https://docs.macro.com/concepts/mentions) and [blocks](https://docs.macro.com/concepts/blocks).+----## 6. Collaborate in channels+# Documents-Press `c` then `m` to create a channel — a hub for team conversations with threads, reactions, and rich formatting. Add people by email; even folks without a Macro account get notified. Sharing follows mentions, so permissions take care of themselves.+Press `c` then `d` to create a document. Docs are markdown-native and collaborative in real time — multiple people can type on the same line without conflicts.-+Documents are *public* by default. You can click share in the corner to edit permissions or get yourself a link. Share this with a friend!-Learn more in the [channels docs](https://docs.macro.com/product/channels).+There's a bunch of other fancy stuff documents can do:-## 7. Track work with tasks+- Select text to comment; comments with @mentions always notify+- Markdown auto-formatting: `#` for headings, `[]` for checklists, `>` for quotes.+- Full version history with time-travel browsing+- Type `/` for a bunch of fun nodes. Math? $\int_{you=0}^{you=100}(Macro)dx$-Press `c` then `t` to create a task. Tasks stay simple — status, priority, assignee — and you can turn any message or email into a task by hovering over it. With the [GitHub integration](https://docs.macro.com/integrations/github), tasks move to In Progress, In Review, and Done automatically as branches and pull requests advance.+----+# Triage everything from one inbox-Learn more in the [tasks docs](https://docs.macro.com/product/tasks).+Press `g` then `i` to open your unified **inbox**: emails, channel messages, task assignments, doc mentions, and agent results—all in one list.-## 8. Put agents to work+- **Signal** is what needs your attention. **Noise** is everything else (newsletters, promos), filtered by AI.+- Move with `j`/`k`, preview with `space`, open with `enter`, and mark items as done with `e` to get to inbox zero.-Press `c` then `a` to chat with an agent, or mention **@Macro** in any channel. Agents see your whole workspace — docs, emails, messages, call transcripts — so they can summarize discussions, answer questions, draft documents, and create tasks. You can also schedule **automations** (daily reminders, weekly summaries) that deliver results straight to your inbox.+----+# Connect *all* your email accounts-Learn more in the [agents docs](https://docs.macro.com/product/agents).+Macro is a full email client that syncs with Gmail and Google Workspace—no migration needed. Connect one or more accounts in **Settings**, and every message lands in a single unified inbox. When you compose, you pick which address sends.-## 9. Find anything, instantly+----Press `/` and start typing — Macro searches docs, emails, messages, call transcripts, and file contents in under 50 milliseconds. Use quotes for exact matches, filter by type in the top-right, and preview results with `l`.+# Put agents to work-+Press `c` then `a` to chat with an agent, or mention **@Macro** in any channel. Agents see your whole workspace — docs, emails, messages, call transcripts — so they can summarize discussions, answer questions, draft documents, and create tasks. You can also schedule **automations** (daily reminders, weekly summaries) that deliver results straight to your inbox.-Learn more in the [search docs](https://docs.macro.com/product/search).+----## 10. Work side by side+# SplitsMacro has a built-in window manager:-- `cmd+\` — split your workspace-- `shift+enter` — open anything in a new split+- `\` or `cmd+\` — split your workspace- `shift+h` / `shift+l` — move focus between splits- `shift+esc` — maximize the focused split-------## Where to go next--- [Getting started guide](https://docs.macro.com/getting-started) — the full onboarding walkthrough-- [Switching to Macro](https://docs.macro.com/switch-to-macro) — bring your team over-- [Keyboard shortcuts](https://docs.macro.com/keyboard-shortcuts) — the complete reference-- [FAQ](https://docs.macro.com/faq) — common questions-- [Connect AI clients via MCP](https://docs.macro.com/AI/mcp/overview) — use Macro from Claude and other agents--Welcome aboard — we're glad you're here. 🚀diff --git a/services/document_storage_service/src/api/internal/mod.rs b/services/document_storage_service/src/api/internal/mod.rsindex 8a962a7905..3d3ba747d3 100644--- a/services/document_storage_service/src/api/internal/mod.rs+++ b/services/document_storage_service/src/api/internal/mod.rs@@ -8,7 +8,7 @@ use super::{documents::save_document, history::delete_history};use super::{documents::{get_document, get_document_key, get_document_permissions, get_document_text,- get_full_pdf_modification_data, initialize_how_to_guide, list_documents_with_access,+ get_full_pdf_modification_data, initialize_starter_docs, list_documents_with_access,location,},user::populate_items,@@ -103,8 +103,8 @@ pub fn router(state: ApiContext) -> Router<ApiContext> {),).route(- "/documents/initialize_how_to_guide",- post(initialize_how_to_guide::handler),+ "/documents/initialize_starter_docs",+ post(initialize_starter_docs::handler),).route("/documents/list_with_access",diff --git a/services/document_storage_service/src/api/swagger.rs b/services/document_storage_service/src/api/swagger.rsindex d586a208c5..172aa790ea 100644--- a/services/document_storage_service/src/api/swagger.rs+++ b/services/document_storage_service/src/api/swagger.rs@@ -156,6 +156,7 @@ use utoipa::OpenApi;// documentsdocuments::get_user_documents::get_user_documents_handler,+ documents::get_starter_docs::handler,documents_hex::inbound::axum_router::get_document::get_document_handler,documents_hex::inbound::axum_router::get_document_by_team_slug::get_document_by_team_slug_handler,documents::get_document_version::handler,@@ -384,6 +385,7 @@ use utoipa::OpenApi;EditDocumentResponse, // Edit documentUserDocumentsResponse,GetDocumentsResponse, // Get user documents+ documents::get_starter_docs::StarterDocumentsResponse, // Get starter documentsGetDocumentProcessingResult,GetDocumentProcessingResultResponse, // Document processing resultGetDocumentKeyResponseData,diff --git a/services/document_storage_service/src/main.rs b/services/document_storage_service/src/main.rsindex 58de9a9b6b..4ac36cc461 100644--- a/services/document_storage_service/src/main.rs+++ b/services/document_storage_service/src/main.rs@@ -1084,6 +1084,7 @@ async fn main() -> anyhow::Result<()> {document_permission_jwt_secret: config.document_permission_jwt.as_ref().to_string(),},config: Arc::new(config),+ channel_service: channels_service.clone(),channels_state: ChannelsRouterState::from_arc(channels_service,(*entity_access_service).clone(),diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env.rs b/tooling/xtask/crates/xtask_local/src/local/local_env.rsindex acb5dc1837..776e229476 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env.rs@@ -106,6 +106,16 @@ impl InfraEnv {"OVERRIDE_CONNECTION_GATEWAY_URL".into(),"http://connection-gateway:8080".into(),);+ // Same trap for document storage: the Environment::Local default is+ // http://localhost:8086, the *host* port mapping, which resolves to+ // the calling container. Callers like the authentication service's+ // signup hook (starter docs) then fail with a connection error.+ // `DOCUMENT_STORAGE_SERVICE_URL` (from Doppler) only covers the older+ // call sites that read that var directly, not `macro_service_urls`.+ env.insert(+ "OVERRIDE_DOCUMENT_STORAGE_SERVICE_URL".into(),+ "http://document-storage-service:8080".into(),+ );// Dummy creds: the SDK talks to LocalStack, never real AWS.env.insert("AWS_ACCESS_KEY_ID".into(), "test".into());env.insert("AWS_SECRET_ACCESS_KEY".into(), "test".into());@@ -190,7 +200,6 @@ impl MailEnv {/// container (services, sync, lexical) agrees. `INTERNAL_API_SECRET_KEY` is the/// literal `"local"` to match the FusionAuth webhook's `x-internal-auth-key`.struct ServiceAuthEnv {- service_internal: String,dss_auth: String,doc_perm_jwt: String,internal_call: String,@@ -200,7 +209,6 @@ struct ServiceAuthEnv {impl ServiceAuthEnv {fn for_instance(name: &str) -> Self {ServiceAuthEnv {- service_internal: identity::instance_secret("service-internal", name),dss_auth: identity::instance_secret("dss-auth", name),// Must match sync-service's local DOCUMENT_PERMISSIONS_SECRET// ("local") so locally-minted tokens verify. This is ONLY for local@@ -225,10 +233,12 @@ impl ServiceAuthEnv {"SYNC_SERVICE_AUTH_KEY".into(),identity::INTERNAL_AUTH_KEY.into(),);- env.insert(- "SERVICE_INTERNAL_AUTH_KEY".into(),- self.service_internal.clone(),- );+ // The key the authentication service presents to document storage on+ // internal calls (e.g. seeding starter docs at signup). In dev/prod+ // Doppler points it at the *same* secret as DSS's own auth key+ // (document-storage-service-auth-key-*), so locally the two must be+ // one value or DSS 401s every auth-service internal call.+ env.insert("SERVICE_INTERNAL_AUTH_KEY".into(), self.dss_auth.clone());env.insert("DOCUMENT_STORAGE_SERVICE_AUTH_KEY".into(),self.dss_auth.clone(),diff --git a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rsindex 174b1d6caa..1aeaf8be38 100644--- a/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs+++ b/tooling/xtask/crates/xtask_local/src/local/local_env/test.rs@@ -65,6 +65,39 @@ fn emits_webhook_fifo_queue_override_url() {);}+/// In-network callers must resolve these through the docker alias. The+/// `Environment::Local` defaults are host port mappings, which inside a+/// container point back at the caller itself.+#[test]+fn emits_in_network_service_url_overrides() {+ let env = local_env();+ for (key, expected) in [+ (+ "OVERRIDE_CONNECTION_GATEWAY_URL",+ "http://connection-gateway:8080",+ ),+ (+ "OVERRIDE_DOCUMENT_STORAGE_SERVICE_URL",+ "http://document-storage-service:8080",+ ),+ ] {+ assert_eq!(env.get(key).map(String::as_str), Some(expected));+ }+}++/// The auth service presents `SERVICE_INTERNAL_AUTH_KEY` to document storage,+/// which validates against `DOCUMENT_STORAGE_SERVICE_AUTH_KEY`. Dev/prod point+/// both at one secret; locally they must match too or every auth-service+/// internal call (starter docs seeding at signup) is a 401.+#[test]+fn auth_service_internal_key_matches_dss_auth_key() {+ let env = local_env();+ assert_eq!(+ env.get("SERVICE_INTERNAL_AUTH_KEY"),+ env.get("DOCUMENT_STORAGE_SERVICE_AUTH_KEY"),+ );+}+#[test]fn aws_creds_are_dummy() {let env = local_env();