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
fix(channels): stabilize sidebar interactions and bulk notifications (#9432)
dev-rb30100821d1ec
diff --git a/.agents/rules/web/libraries.md b/.agents/rules/web/libraries.mdindex 6b562c9d09..7e47db1794 100644--- a/.agents/rules/web/libraries.md+++ b/.agents/rules/web/libraries.md@@ -66,9 +66,10 @@ under `services/` throw and validate with zod; elsewhere in `apps/web` and- **FE-44** Dates: `date-fns` (and `@date-fns/tz`) for arithmetic and the house`@core/util/date` / `@core/util/time` helpers; `Intl.DateTimeFormat` forlocale display. No dayjs, luxon, moment, or Temporal.-- **FE-45** Virtualized lists use `virtua`, not `@tanstack/solid-virtual`.- Persisted UI state uses `makePersistedState` (`src/lib/persistence`) with a- zod schema, not raw `localStorage` calls.+- **FE-45** Default virtualized lists to `virtua`; use `@tanstack/solid-virtual`+ for the redesigned Chat sidebar's nested, scroll-aware lists. Persisted UI+ state uses `makePersistedState` (`src/lib/persistence`) with a zod schema,+ not raw `localStorage` calls.- **FE-46** Reuse the house helpers instead of re-implementing them: `deepEqual`(`@core/util/compareUtils`), `structuredClone` for copies, and`@tanstack/pacer` (`AsyncBatcher`, `Queuer`) for request coalescing. `effect`diff --git a/.agents/skills/add-sdk-endpoint/SKILL.md b/.agents/skills/add-sdk-endpoint/SKILL.mdindex b230e482fd..a1c4c75bc4 100644--- a/.agents/skills/add-sdk-endpoint/SKILL.md+++ b/.agents/skills/add-sdk-endpoint/SKILL.md@@ -14,8 +14,9 @@ Every generated endpoint must either have a call site under `src/` or be listed## 0. Find it-Not in `generated/` yet? `bun run sync-specs && bun run generate` (or ask the user to-run `just update-generated` if the Rust spec changed locally — it rebuilds apps/web).+After a local Rust API change, regenerate its web contract from the repository+root with `bun run --cwd apps/web gen-api <service-name>` before running+`bun run sync-specs && bun run generate` here.`just coverage` lists `UNCOVERED <service>.<endpoint>`.diff --git a/.sqlx/query-08b364b38fe87e2ba533537878747ec992207d04198c4e781d7e89bea5b4adce.json b/.sqlx/query-08b364b38fe87e2ba533537878747ec992207d04198c4e781d7e89bea5b4adce.jsonnew file mode 100644index 0000000000..6a8f9112f6--- /dev/null+++ b/.sqlx/query-08b364b38fe87e2ba533537878747ec992207d04198c4e781d7e89bea5b4adce.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "INSERT INTO user_notification_item_unsubscribe (user_id, item_id, item_type, snoozed_until)\n SELECT $1, item_id, item_type, $4\n FROM UNNEST($2::text[], $3::text[]) AS items(item_id, item_type)\n ON CONFLICT (user_id, item_id) DO UPDATE\n SET item_type = EXCLUDED.item_type, snoozed_until = EXCLUDED.snoozed_until",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Text",+ "TextArray",+ "TextArray",+ "Timestamptz"+ ]+ },+ "nullable": []+ },+ "hash": "08b364b38fe87e2ba533537878747ec992207d04198c4e781d7e89bea5b4adce"+}diff --git a/.sqlx/query-3c051a496c4e59b335d59f4a973ea877e79bd5c956ab8f7dd1dd1809ff6f9766.json b/.sqlx/query-3c051a496c4e59b335d59f4a973ea877e79bd5c956ab8f7dd1dd1809ff6f9766.jsonnew file mode 100644index 0000000000..59117296a0--- /dev/null+++ b/.sqlx/query-3c051a496c4e59b335d59f4a973ea877e79bd5c956ab8f7dd1dd1809ff6f9766.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "DELETE FROM user_notification_item_unsubscribe WHERE user_id = $1 AND item_id = ANY($2::text[])",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Text",+ "TextArray"+ ]+ },+ "nullable": []+ },+ "hash": "3c051a496c4e59b335d59f4a973ea877e79bd5c956ab8f7dd1dd1809ff6f9766"+}diff --git a/apps/web/AGENTS.md b/apps/web/AGENTS.mdindex 1fe4da65a3..6df7a9b056 100644--- a/apps/web/AGENTS.md+++ b/apps/web/AGENTS.md@@ -6,6 +6,7 @@- `bun run format`: format changes with biome- `bun run knip`: to check for dead code- Run Linux native cache-plugin tests from the repository root with `nix develop .#tauri-linux --command cargo test --manifest-path apps/web/tauri/Cargo.toml -p graphql_cache_plugin`; the [Tauri platform shell](../../docs/development/running-locally.md) supplies the required desktop libraries.+- Refresh `nix-support/node_modules-hashes.json` for Linux and Darwin when dependency manifests, the lockfile, or dependency patches change.- `bun run lint:oxlint` (repository root): type-aware oxlint. `typescript/no-floating-promises` is an error with no suppressions and `ignoreVoid: false` (FE-13), enforced in `just check` and CI; start detached work with `fireAndForget` from `@core/util/fireAndForget`, not `void`. Plain `oxlint` without `--type-aware` skips that rule silently. The ast-grep rule `ts-no-expression-void` covers `() => void p()`, which the lint can't see.- Email rendering is isolated in `packages/email-renderer` at the repository root. Run `just test-email-rendering` for its Node and Chromium suites. Add fixtures under `packages/email-renderer/tests/fixtures`, run `just test-email-rendering-update`, and review changed images. These are renderer tests, not inbox e2e.- Supported browsers are the `browserslist` in `package.json`. Safari and iOS@@ -599,18 +600,18 @@ resolved session ID; keep the existing `AgentSessionProvider` subscription tofor a notification (Home, Inbox) wait for it to choose a target.- Gate the Chat redesign with `enable-chat-sidebar-sections`; wait for its result, restore the tabbed rail when off, and keep mobile unchanged.Keep the original rail renderer and label dialogs in `components/rail/`; build the redesigned rail and section dialogs in `components/rail/next/`, with shared controller, context, and row primitives outside `next/`.- Default desktop Chat to Favorites, Direct messages, the team's channels, custom sections, then All channels; preserve personal section reordering without changing shared membership or the remaining public/private membership of All channels.- Keep resize and reorder grips keyboard-accessible; overlay reorder grips in the left gutter without shifting section names. Preserve personal section heights/order, compensate resize drags for scrolling, disable stack scroll anchoring only during resizing, and route list navigation through the sectioned renderer's scroll handle.- Cap section heights at measured list content and available pane space; hide resize grips for two or fewer items, default Favorites and DMs to four rows, and default other sections to their maximum height.+ Default desktop Chat to Favorites, Direct messages, the team's channels, custom sections, then All channels; preserve personal section reordering and keep public/private channels in All channels regardless of custom-section assignments.+ Keep resize and reorder grips keyboard-accessible; reveal bare reorder grips only on header hover or keyboard focus, keep them fixed in the left gutter without shifting section names, and include them within the drag highlight. Allow dragging from the whole heading while preserving normal collapse clicks and excluding action buttons. Preserve personal section heights/order, compensate resize drags for scrolling, disable stack scroll anchoring only during resizing, and route list navigation through the sectioned renderer's scroll handle. Scroll keyboard targets immediately without animation, keeping two rows of context on either side, clamped to the viewport.+ Cap section heights at measured list content and available pane space; hide resize grips for two or fewer items and default Favorites and DMs to four rows. Let final All channels fill its content by default, but preserve saved heights and cap it normally when another section follows. Use TanStack Virtual for the redesigned section stack, channel rows, and search results; keep full-height channel rows virtualized against the outer viewport and retain stable keys, focused rows, and drag sources.Mobile retains the recent feed. Keep New channel and New direct message on their separate existing creation flows, independent of the sidebar flag; size the sidebar's New dropdown to its trigger width.Use `--sidebar-gutter` for the outer section, DM, and search containers; shared headings and rows provide their own item padding.Indent section rows by 8px; style empty states like saved views with a padded, bordered surface and secondary actions, without the extra row indentation. Keep unsectioned search results unindented.Reuse shared collapsible section headers and their hidden-caret behavior without leading section icons; keep Shared beside the name before the caret, replacing its badge with a users icon below 256px of section width. Use short, separate tooltips for names and sharing; apply focus backgrounds across the full header row and omit trailing header padding.- Space sections with the stack's 2px flex gap, not header padding; wrap each section's header and content in one drop surface, show blocked drops with a not-allowed cursor and explanation, and keep Gantt's shared drag auto-scroll and wheel scrolling available while dragging.+ Space sections with the stack's 2px flex gap, not header padding; wrap each section's header and content in one drop surface, show blocked drops with a not-allowed cursor and borderless explanation, omit rejection overlays while section data is pending, and keep Gantt's shared drag auto-scroll and wheel scrolling available while dragging.Animate section reorder with the shared layout animation engine; preserve unanimated measurement wrappers, reduced-motion preferences, and cancellation on scrolling. Show a card preview and subdued source while dragging.Name the team-channel section after the current team, falling back to Team channels while its name is unavailable.Keep every joined team channel in the team section regardless of custom-section assignments; use the same complete membership for bulk notification actions.- Keep available channel rows visible during section hydration and refetches; pass server-returned member IDs to `queries/channel/by-ids`, whose single Soup owner selects cached rows and fetches missing records. Keep entity-ID hydration generic in Soup, with channel identities, batching, and unread refreshes in the channel query layer; append per-section skeletons only while unresolved members load.+ Keep available channel rows visible during section hydration and refetches; key virtualized rows by stable IDs so data updates cannot interrupt a click. Pass server-returned member IDs to `queries/channel/by-ids`, whose single Soup owner selects cached rows and fetches missing records. Keep entity-ID hydration generic in Soup, with channel identities, batching, and unread refreshes in the channel query layer; append per-section skeletons only while unresolved members load.Show lock icons for private conversations and visible per-section options; keep empty sections usable as drop targets without an all-sections management menu.Create all section types through New → New section in a wider dialog with Smart in the body and Shared in the footer; keep collapse on the header and style deletion as destructive.Offer Add channels on manual-section headers and empty states; keep the picker scoped to eligible joined channels, explain scope and assignment moves in concise helper text, and leave smart membership rule-driven.@@ -619,7 +620,7 @@ resolved session ID; keep the existing `AgentSessionProvider` subscription toDefault Favorites to Custom order and persist drag reordering through the shared favorites mutation; preserve hidden and non-channel favorite positions, disable dragging under automatic sorts, show an insertion line at the actual destination edge, and keep the original rail unchanged.Share the sliders-icon section menu's Sort, Filter, and actions with a header context menu; use trailing `SingleSelectCheck` marks for sorting, keep the Unread only label left and its switch right, and keep the filter submenu open when toggled.Compose the section click and right-click menus with `ContextMenuContent`, `MenuItem`, `MenuGroup`, and `MenuSeparator`; do not nest padded `Dropdown.Group` elements inside a context-menu surface.- Keep all section mute, unmute, and snooze actions personal to the viewer; use the complete current membership, not filtered or hydrated rows, and never apply the change to later additions. Resolve built-in membership through the complete channel list, preserving sidebar assignment exclusions and participant checks; Favorites targets channel favorites only. Reuse notification mutations and the shared snooze picker, preserving successful writes on partial failure.+ Keep all section mute, unmute, and snooze actions personal to the viewer; use the complete current membership, not filtered or hydrated rows, and never apply the change to later additions. Resolve built-in membership through the complete channel list, including custom-section assignments and preserving participant checks; Favorites targets channel favorites only. Use the bulk item-preference endpoints and shared snooze picker, applying confirmed changes to the cache once and preserving successful chunks on partial failure.Use checkbox items in Add to section to toggle membership within each scope without changing the other scope.Carry team IDs into channel entities and require a matching team for new shared-section assignments; preserve server-authorized membership display while metadata hydrates.- Route supported move, trash, restore, permanent-delete, duplicate, and share-policydiff --git a/apps/web/src/components/drag-drop/create-distance-pointer-sensor.test.ts b/apps/web/src/components/drag-drop/create-distance-pointer-sensor.test.tsindex d26b5fc87e..79605a998c 100644--- a/apps/web/src/components/drag-drop/create-distance-pointer-sensor.test.ts+++ b/apps/web/src/components/drag-drop/create-distance-pointer-sensor.test.ts@@ -56,11 +56,14 @@ vi.mock('@thisbeyond/solid-dnd', () => ({let dispose: (() => void) | undefined;const onCancel = vi.fn();-function setup(distance = 10) {+function setup(+ distance = 10,+ options?: Parameters<typeof createDistancePointerSensor>[2]+) {let sensor!: ReturnType<typeof createDistancePointerSensor>;createRoot((cleanup) => {dispose = cleanup;- sensor = createDistancePointerSensor(distance, onCancel);+ sensor = createDistancePointerSensor(distance, onCancel, options);});const press = (x = 10, y = 20, button = 0) =>mock.press(@@ -108,6 +111,38 @@ describe('distance-only mouse sensor', () => {expect(mock.actions.dragStart).not.toHaveBeenCalled();});+ it('allows a scoped manual activator without adding a global hold-to-drag handler', () => {+ vi.useFakeTimers();+ const { sensor, press, move, up } = setup(8, {+ id: 'section-pointer',+ manual: true,+ });+ expect(mock.actions.addSensor).toHaveBeenCalledWith({+ id: 'section-pointer',+ activators: {},+ });++ press();+ move(100, 100);+ expect(mock.actions.dragStart).not.toHaveBeenCalled();++ sensor.start(+ new MouseEvent('mousedown', { clientX: 10, clientY: 20 }),+ 'section'+ );+ vi.advanceTimersByTime(5000);+ move(18, 20);+ expect(mock.actions.dragStart).not.toHaveBeenCalled();+ move(19, 20);+ expect(mock.actions.sensorStart).toHaveBeenCalledWith('section-pointer', {+ x: 10,+ y: 20,+ });+ expect(mock.actions.dragStart).toHaveBeenCalledWith('section');+ up();+ expect(mock.actions.sensorEnd).toHaveBeenCalledOnce();+ });+it('starts beyond the threshold with the press coordinates and clears selection', () => {const selection = vi.spyOn(window, 'getSelection');const removeAllRanges = vi.fn();diff --git a/apps/web/src/components/drag-drop/create-distance-pointer-sensor.ts b/apps/web/src/components/drag-drop/create-distance-pointer-sensor.tsindex d76a0323c0..7bcf3e5204 100644--- a/apps/web/src/components/drag-drop/create-distance-pointer-sensor.ts+++ b/apps/web/src/components/drag-drop/create-distance-pointer-sensor.ts@@ -4,13 +4,14 @@ import { onCleanup, onMount } from 'solid-js';/** The stock pointer sensor activates after 250ms or 10px. This one has no timer. */export function createDistancePointerSensor(distance: number,- onCancel: () => void+ onCancel: () => void,+ options: { id?: string; manual?: boolean } = {}) {const context = useDragDropContext();if (!context)throw new Error('Distance pointer sensor requires DragDropProvider');const [state, actions] = context;- const id = 'distance-pointer-sensor';+ const id = options.id ?? 'distance-pointer-sensor';let pendingId: string | number | undefined;let origin = { x: 0, y: 0 };let cancelled = false;@@ -22,6 +23,8 @@ export function createDistancePointerSensor(document.removeEventListener('mousemove', move);document.removeEventListener('mouseup', up);document.removeEventListener('selectionchange', clearSelection);+ document.removeEventListener('keydown', cancelOnEscape, true);+ window.removeEventListener('blur', cancelOnBlur);attached = false;pendingId = undefined;cancelled = false;@@ -33,6 +36,10 @@ export function createDistancePointerSensor(attached = true;document.addEventListener('mousemove', move);document.addEventListener('mouseup', up);+ if (options.manual) {+ document.addEventListener('keydown', cancelOnEscape, true);+ window.addEventListener('blur', cancelOnBlur);+ }};const move = (event: MouseEvent) => {if (cancelled) return;@@ -85,10 +92,22 @@ export function createDistancePointerSensor(}return true;};- onMount(() => actions.addSensor({ id, activators: { mousedown: attach } }));+ const cancelOnEscape = (event: KeyboardEvent) => {+ if (event.key !== 'Escape' || !cancel()) return;+ event.preventDefault();+ event.stopPropagation();+ };+ const cancelOnBlur = () => cancel(true);++ onMount(() =>+ actions.addSensor({+ id,+ activators: options.manual ? {} : { mousedown: attach },+ })+ );onCleanup(() => {cancel(true);actions.removeSensor(id);});- return { cancel };+ return { cancel, start: attach };}diff --git a/apps/web/src/features/channels-view/components/rail/ChannelFavoriteRows.test.tsx b/apps/web/src/features/channels-view/components/rail/ChannelFavoriteRows.test.tsxindex c059d2a8ab..674a2a7ce6 100644--- a/apps/web/src/features/channels-view/components/rail/ChannelFavoriteRows.test.tsx+++ b/apps/web/src/features/channels-view/components/rail/ChannelFavoriteRows.test.tsx@@ -18,9 +18,14 @@ import {splitProps,} from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import { clampChannelSectionHeight } from '../../constants';import { ChannelFavoriteRow } from './ChannelFavoriteRows';import { ChannelOption } from './ChannelOption';import { ChannelFavoriteRow as DraggableFavoriteRow } from './next/ChannelFavoriteRow';+import {+ ChannelSectionHeading,+ DraggableChannelSectionHeading,+} from './next/ChannelSectionHeading';import { ResizableRailSection } from './next/ResizableRailSection';import {reorderVisibleFavorites,@@ -47,9 +52,12 @@ const rail = vi.hoisted(() => ({}));const drag = vi.hoisted(() => ({+ activate: vi.fn(),viewer: (): string => 'viewer',starts: [] as Array<- (event: { draggable: { data: Record<string, unknown> } }) => void+ (event: {+ draggable: { id?: string; data: Record<string, unknown> };+ }) => void>,ends: [] as Array<(event: {@@ -70,6 +78,12 @@ vi.mock('@queries/favorites/favorites', () => ({useReorderFavoritesMutation: () => ({ mutateAsync: drag.reorder }),}));vi.mock('@core/context/user', () => ({ useUserId: () => () => drag.viewer() }));+vi.mock('@app/components/drag-drop/create-distance-pointer-sensor', () => ({+ createDistancePointerSensor: () => ({+ start: (_event: MouseEvent, id: string) => drag.activate(id),+ cancel: vi.fn(),+ }),+}));vi.mock('@macro-inc/observability', async (importOriginal) => ({...(await importOriginal<typeof import('@macro-inc/observability')>()),Telemetry: {@@ -94,7 +108,7 @@ vi.mock('@thisbeyond/solid-dnd', () => ({drag.draggables.set(id, data);return {ref() {},- dragActivators: {},+ dragActivators: { onMouseDown: () => drag.activate(id) },isActiveDraggable: false,};},@@ -184,7 +198,13 @@ vi.mock('@app/features/favorites/FavoriteIcon', () => ({vi.mock('@app/util/favorites', () => ({useFavoriteDisplayName: () => () => 'Design',}));-vi.mock('@app/components/view-shell', () => ({+vi.mock('@app/components/view-shell/ViewSidebar', () => ({+ ViewSidebar: { Control: () => null },+}));+vi.mock('@app/components/view-shell', async () => ({+ CollapsibleSection: (+ await import('@app/components/view-shell/CollapsibleSection')+ ).CollapsibleSection,ViewSidebar: {Item: (props: ComponentProps<'div'> & { as?: string; active?: boolean }@@ -197,6 +217,16 @@ vi.mock('@app/components/view-shell', () => ({}));vi.mock('@core/mobile/isTouchDevice', () => ({ isTouchDevice: () => false }));vi.mock('@ui', async () => ({+ Button: (+ props: ComponentProps<'button'> & {+ variant?: string;+ size?: string;+ tooltip?: string;+ }+ ) => {+ const [, rest] = splitProps(props, ['variant', 'size', 'tooltip']);+ return <button {...rest} />;+ },Tooltip: (await import('@ui/components/Tooltip')).Tooltip,cn: (...values: unknown[]) => values.filter(Boolean).join(' '),}));@@ -222,6 +252,7 @@ beforeEach(() => {drag.ends.length = 0;drag.draggables.clear();rail.labels = () => [];+ rail.sectionPreferences = () => ({ sort: 'manual' });rail.sectionOrder = () => [];drag.favorites = [];drag.viewer = () => 'viewer';@@ -233,6 +264,62 @@ beforeEach(() => {});afterEach(cleanup);+describe('section heading dragging', () => {+ it('drags from the name without toggling after a drop or dragging action buttons', () => {+ const toggle = vi.fn();+ const move = vi.fn();+ render(() => (+ <DraggableChannelSectionHeading+ section="channels"+ label="Channels"+ reorder={{+ scope: 'rail:sections',+ dropEdge: () => undefined,+ isDragging: () => false,+ cancel: vi.fn(),+ move,+ }}+ >+ <ChannelSectionHeading+ id="channels-heading"+ label="Channels"+ open+ focused={false}+ unreadCount={0}+ onToggle={toggle}+ >+ <button type="button">Actions</button>+ </ChannelSectionHeading>+ </DraggableChannelSectionHeading>+ ));+ const heading = screen.getByRole('treeitem');++ fireEvent.pointerDown(heading);+ fireEvent.mouseDown(heading);+ expect(drag.activate).toHaveBeenCalledWith('rail:sections:channels');+ fireEvent.click(heading, { detail: 1 });+ expect(toggle).toHaveBeenCalledOnce();++ fireEvent.pointerDown(heading);+ for (const start of drag.starts) {+ start({ draggable: { id: 'rail:sections:channels', data: {} } });+ }+ fireEvent.click(heading, { detail: 1 });+ expect(toggle).toHaveBeenCalledOnce();++ drag.activate.mockClear();+ fireEvent.mouseDown(screen.getByRole('button', { name: 'Actions' }));+ expect(drag.activate).not.toHaveBeenCalled();+ fireEvent.keyDown(+ screen.getByRole('button', { name: 'Reorder Channels' }),+ {+ key: 'ArrowDown',+ }+ );+ expect(move).toHaveBeenCalledWith('channels', 1);+ });+});+describe('channel section drag sources', () => {it('keeps the drag identity current when a virtual row is reused', () => {const [current, setCurrent] = createSignal(channel);@@ -497,6 +584,49 @@ describe('section reordering', () => {});describe('resizable chat sections', () => {+ it('grows the last All channels list to its content while preserving manual heights', () => {+ const [maximum, setMaximum] = createSignal(Number.POSITIVE_INFINITY);+ const [savedHeight, setSavedHeight] = createSignal<number>();+ rail.sectionPreferences = () => ({ sort: 'manual', height: savedHeight() });+ measurements.contentHeight = () => 1360;+ let viewport!: HTMLDivElement;+ render(() => (+ <ResizableRailSection+ section="channels"+ label="All channels"+ open+ maxHeight={maximum()}+ itemCount={40}+ header={<span>Section</span>}+ rootRef={() => {}}+ scrollRef={(element) => {+ viewport = element;+ }}+ >+ Conversations+ </ResizableRailSection>+ ));++ expect(viewport.style.height).toBe('1360px');+ setMaximum(252);+ expect(viewport.style.height).toBe('252px');++ setSavedHeight(180);+ setMaximum(Number.POSITIVE_INFINITY);+ expect(viewport.style.height).toBe('180px');+ setMaximum(252);+ expect(viewport.style.height).toBe('180px');++ setMaximum(Number.POSITIVE_INFINITY);+ setSavedHeight(1100);+ expect(viewport.style.height).toBe('1100px');+ expect(clampChannelSectionHeight(1100)).toBe(1100);+ fireEvent.keyDown(screen.getByRole('separator'), { key: 'ArrowDown' });+ expect(rail.setSectionPreferences).toHaveBeenCalledWith('channels', {+ height: 1120,+ });+ });+it('saves the final zoom-adjusted size and can resize again after collapse cancels a drag', () => {const [open, setOpen] = createSignal(true);render(() => (diff --git a/apps/web/src/features/channels-view/components/rail/ChannelsRail.test.tsx b/apps/web/src/features/channels-view/components/rail/ChannelsRail.test.tsxindex 34fd9c2c66..67ae820071 100644--- a/apps/web/src/features/channels-view/components/rail/ChannelsRail.test.tsx+++ b/apps/web/src/features/channels-view/components/rail/ChannelsRail.test.tsx@@ -11,7 +11,7 @@ import {screen,waitFor,} from '@solidjs/testing-library';-import { getOwner, onCleanup } from 'solid-js';+import { createSignal, getOwner, type JSX, onCleanup } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import type { ChannelsSources } from '../../queries';import type { ChannelRailRow } from './ChannelsRailContext';@@ -21,6 +21,7 @@ vi.mock('@core/context/user', () => ({}));const mocks = vi.hoisted(() => ({fetchChannel: vi.fn<(id: string) => Promise<ChannelEntity>>(),+ bulkPreferences: vi.fn(),favoriteId: undefined as string | undefined,fetchGroupIds:vi.fn<typeof import('../../queries')['fetchChannelGroupIds']>(),@@ -57,6 +58,7 @@ const mocks = vi.hoisted(() => ({listRows: undefined as ChannelRailRow[] | undefined,focusSet: vi.fn(),hotkeys: new Map<string, () => unknown>(),+ realRenderer: false,}));vi.mock('@app/components/list', () => ({createListController: (options: {@@ -93,8 +95,15 @@ vi.mock('@app/components/list', () => ({return {items: { at: (index: number) => items()[index], all: items },+ activate: {+ key: (id: string, activation: { metadata: { event: MouseEvent } }) => {+ const item = items().find((row) => row.id === id);+ if (item) options.onActivate({ item, metadata: activation.metadata });+ },+ },focus: {item: () => mocks.focusedRow,+ key: () => undefined,set: (id: string, options: { reason: string }) => {mocks.focusSet(id, options);const index = items().findIndex((row) => row.id === id);@@ -109,6 +118,13 @@ vi.mock('@app/components/list', () => ({},}));vi.mock('@app/components/view-shell', () => ({+ ViewSidebar: {+ Header: (props: { children: JSX.Element }) => <div>{props.children}</div>,+ Primary: (props: { children: JSX.Element }) => <div>{props.children}</div>,+ CloseButton: () => null,+ Title: (props: { children: JSX.Element }) => <span>{props.children}</span>,+ },+ SearchBar: () => null,useViewControlHotkeys: vi.fn(),useViewTabHotkeys: vi.fn(),}));@@ -156,7 +172,10 @@ vi.mock('@components/app/split-layout/layoutUtils', () => ({vi.mock('@core/component/Toast/Toast', () => ({toast: { failure: mocks.failure, success: mocks.success },}));-vi.mock('@core/constant/featureFlags', () => ({ enableChannelTags: {} }));+vi.mock('@core/constant/featureFlags', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@core/constant/featureFlags')>()),+ enableChannelTags: {},+}));vi.mock('@channel/queries/prefetch-channel-target', () => ({prefetchLatestChannelMessages: mocks.prefetch,}));@@ -189,6 +208,11 @@ vi.mock('@queries/channel/notification-selection', () => ({vi.mock('@queries/channel/selection-by-id', () => ({fetchChannelSelectionById: mocks.fetchChannel,}));+vi.mock('@queries/notification/unsubscribes', () => ({+ useBulkNotificationPreferencesMutation: () => ({+ mutateAsync: mocks.bulkPreferences,+ }),+}));vi.mock('@queries/channel-labels/channel-labels', () => ({useChannelLabelsQuery: () => ({ isSuccess: false }),useCreateChannelLabelMutation: () => ({}),@@ -198,11 +222,13 @@ vi.mock('@queries/channel-labels/channel-labels', () => ({}));vi.mock('@queries/favorites/favorites', () => ({useFavoritesData: () => () => ({ favorites: [] }),+ useReorderFavoritesMutation: () => ({ mutateAsync: vi.fn() }),}));vi.mock('@queries/soup/search', () => ({useSearchSoupQuery: () => ({ isSuccess: false }),}));vi.mock('@thisbeyond/solid-dnd', () => ({+ createDroppable: () => ({ ref: () => {}, isActiveDroppable: false }),useDragDropContext: () => undefined,}));vi.mock('@ui', () => ({ confirmDialog: vi.fn() }));@@ -213,6 +239,12 @@ vi.mock('../../channels-view-context', () => ({expandedGroups: { channels: true, direct_messages: true },collapsedLabels: [],sectionPreferences: {},+ sortBy: {+ channels: 'viewed_at',+ team_channels: 'viewed_at',+ direct_messages: 'viewed_at',+ threads: 'viewed_at',+ },},tab: () => mocks.tab,sectionsEnabled: () => true,@@ -253,10 +285,13 @@ vi.mock('./hooks/useChannelCalls', () => ({ useChannelCalls: () => ({}) }));vi.mock('./hooks/useChannelRailActivity', () => ({useChannelRailActivity: () => ({ unreadChannelIds: () => new Set<string>() }),}));-vi.mock('./next/ExpandedChannelsRail', async () => {+vi.mock('./next/ExpandedChannelsRail', async (importOriginal) => {+ const { ExpandedChannelsRail: RealRenderer } =+ await importOriginal<typeof import('./next/ExpandedChannelsRail')>();const { useChannelsRail } = await import('./ChannelsRailContext');return {- ExpandedChannelsRail: () => {+ ExpandedChannelsRail: (props: Parameters<typeof RealRenderer>[0]) => {+ if (mocks.realRenderer) return <RealRenderer {...props} />;const rail = useChannelsRail();onCleanup(rail.registerBrowseScrollHandle({ scrollToIndex: mocks.scrollBrowse })@@ -273,6 +308,94 @@ vi.mock('./next/ExpandedChannelsRail', async () => {};});+vi.mock('@queries/team/teams', () => ({ useCurrentTeamQuery: () => ({}) }));+vi.mock('@ui/components/Tour', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@ui/components/Tour')>()),+ tourTarget: () => () => {},+}));+vi.mock('./next/ChannelFavoriteRow', () => ({+ ChannelFavoriteRow: () => null,+}));+vi.mock('./next/ChannelSectionEmptyState', () => ({+ ChannelSectionEmptyState: () => null,+}));+vi.mock('./next/ChannelLabelRows', () => ({+ ChannelLabelEmptyState: () => null,+ ChannelLabelRow: () => null,+}));+// Keep the section layout and virtualizer real; isolate unrelated menus and decoration.+vi.mock('./next/ResizableRailSection', () => ({+ ResizableRailSection: (props: {+ header: JSX.Element;+ children: JSX.Element;+ rootRef: (element: HTMLDivElement) => void;+ scrollRef: (element: HTMLDivElement) => void;+ }) => (+ <div ref={props.rootRef}>+ {props.header}+ <div ref={props.scrollRef}>{props.children}</div>+ </div>+ ),+}));+vi.mock('./next/ChannelSectionDropZone', () => ({+ ChannelSectionDropZone: (props: { children: JSX.Element }) => (+ <div>{props.children}</div>+ ),+}));+vi.mock('./next/ChannelSectionHeading', () => ({+ ChannelSectionHeading: () => <div />,+ DraggableChannelSectionHeading: (props: { children: JSX.Element }) => (+ <div>{props.children}</div>+ ),+}));+vi.mock('./next/ChannelSectionMenu', () => ({+ ChannelSectionContextMenu: (props: { children: JSX.Element }) => (+ <div>{props.children}</div>+ ),+ ChannelSectionDropdown: () => null,+}));+vi.mock('./ChannelOption', async () => {+ const { useChannelsRail } = await import('./ChannelsRailContext');+ return {+ ChannelOption: (props: {+ channel: ChannelEntity;+ rowId: ChannelRailRow['id'];+ }) => {+ const rail = useChannelsRail();+ return (+ <button+ type="button"+ onPointerDown={(event) => rail.prefetchRow(props.rowId, event)}+ onClick={(event) => rail.activateRow(props.rowId, event)}+ >+ {props.channel.name}+ </button>+ );+ },+ };+});+vi.mock('@app/components/drag-drop/create-drag-auto-scroll', () => ({+ createDragAutoScroll: () => {},+}));+vi.mock('@app/components/drag-drop/create-layout-animation', () => ({+ createLayoutAnimation: () => ({+ cancel: () => {},+ beginHover: () => () => {},+ }),+}));+vi.mock('@core/util/createScrollTopFade', () => ({+ createScrollTopFade: () => {},+}));+vi.mock('../../live-calls-sidebar', () => ({+ ChannelsLiveCallsSidebar: () => null,+}));+vi.mock('@app/features/slack-import/slack-import-sidebar', () => ({+ SlackImportSidebar: () => null,+}));+vi.mock('../ConversationsCreateMenu', () => ({+ ConversationsCreateMenu: () => null,+}));+import { ChannelsRail } from './ChannelsRail';import { useChannelSectionNotifications } from './hooks/useChannelSectionNotifications';@@ -323,12 +446,36 @@ const mount = () =>beforeEach(() => {vi.clearAllMocks();+ mocks.realRenderer = false;mocks.focusedRow = undefined;mocks.listRows = undefined;mocks.hotkeys.clear();mocks.userId = 'viewer';mocks.source.muteEntity.mockResolvedValue(undefined);mocks.source.unmuteEntity.mockResolvedValue(undefined);+ mocks.bulkPreferences.mockImplementation(+ async (args: {+ items: { item_type: string; item_id: string }[];+ muted: boolean;+ }) => {+ const results = await Promise.allSettled(+ args.items.map((item) => {+ const entity = { type: item.item_type, id: item.item_id };+ return args.muted+ ? mocks.source.muteEntity(entity)+ : mocks.source.unmuteEntity(entity);+ })+ );+ return {+ succeeded: args.items.filter(+ (_, index) => results[index].status === 'fulfilled'+ ),+ failed: args.items.filter(+ (_, index) => results[index].status === 'rejected'+ ),+ };+ }+ );mocks.fetchGroupIds.mockReset();mocks.fetchGroupIds.mockResolvedValue(['one', 'unloaded']);mocks.row = channel;@@ -338,7 +485,12 @@ beforeEach(() => {mocks.select.mockReturnValue(true);mocks.hydrate.mockReturnValue(hydrated);});-afterEach(cleanup);+afterEach(() => {+ cleanup();+ vi.unstubAllGlobals();+ vi.useRealTimers();+ vi.restoreAllMocks();+});it('delegates keyboard scrolling to the sectioned renderer instead of global indexes', () => {mount();@@ -346,6 +498,98 @@ it('delegates keyboard scrolling to the sectioned renderer instead of global indexpect(mocks.scrollBrowse).toHaveBeenCalledExactlyOnceWith(0, undefined);});+it('keeps a pressed channel row attached through a live data refresh and activates once', async () => {+ mocks.realRenderer = true;+ vi.spyOn(HTMLElement.prototype, 'offsetParent', 'get').mockImplementation(+ function (this: HTMLElement) {+ return this.parentElement;+ }+ );+ vi.spyOn(HTMLElement.prototype, 'offsetHeight', 'get').mockImplementation(+ function (this: HTMLElement) {+ return this.hasAttribute('data-index') ? 34 : 200;+ }+ );+ vi.spyOn(HTMLElement.prototype, 'offsetWidth', 'get').mockReturnValue(300);+ const observers: Array<{+ callback: ResizeObserverCallback;+ targets: Element[];+ }> = [];+ vi.stubGlobal(+ 'ResizeObserver',+ class {+ targets: Element[] = [];+ constructor(readonly callback: ResizeObserverCallback) {+ observers.push(this);+ }+ observe(target: Element) {+ this.targets.push(target);+ }+ unobserve(target: Element) {+ this.targets = this.targets.filter((item) => item !== target);+ }+ disconnect() {+ this.targets = [];+ }+ }+ );+ mocks.selected = undefined;+ const [channels, setChannels] = createSignal([channel]);+ const liveSources: ChannelsSources = {+ ...sources,+ channels: { ...source, items: channels },+ direct_messages: { ...source, items: () => [] },+ };+ const { container } = render(() => (+ <ChannelsRail+ sources={liveSources}+ searchQuery=""+ onSearchQueryChange={() => {}}+ searchOpen={false}+ onSearchOpenChange={() => {}}+ />+ ));+ for (let pass = 0; pass < 3; pass++) {+ await Promise.resolve();+ for (const observer of observers) {+ if (observer.targets.length === 0) continue;+ observer.callback(+ observer.targets.map((target) => ({+ target,+ contentRect: new DOMRect(+ 0,+ 0,+ 300,+ target.hasAttribute('data-index') ? 34 : 200+ ),+ borderBoxSize: [+ {+ inlineSize: 300,+ blockSize: target.hasAttribute('data-index') ? 34 : 200,+ },+ ],+ contentBoxSize: [],+ devicePixelContentBoxSize: [],+ })),+ observer as unknown as ResizeObserver+ );+ }+ }+ const row = screen.getByRole('button', { name: 'One' });+ fireEvent.pointerDown(row, { pointerType: 'mouse', button: 0 });+ setChannels([{ ...channel, name: 'One updated' }]);++ expect(screen.getByRole('button', { name: 'One updated' })).toBe(row);+ expect(container.contains(row)).toBe(true);+ fireEvent.pointerUp(row, { pointerType: 'mouse', button: 0 });+ fireEvent.click(row);+ expect(mocks.select).toHaveBeenCalledExactlyOnceWith({+ type: 'channel',+ id: 'one',+ target: undefined,+ });+});+describe('section heading navigation', () => {it.each([['label:first', ']', 'label:second'],@@ -715,6 +959,25 @@ describe('section notification actions', () => {return actions;};+ it('submits all section members through one bulk operation', async () => {+ const current = {+ ...label,+ channelIds: Array.from({ length: 16 }, (_, index) => `channel-${index}`),+ };+ const actions = mountActions(() => [current]);+ await actions.muteSection('label:section', true);++ expect(mocks.bulkPreferences).toHaveBeenCalledExactlyOnceWith({+ actorId: 'viewer',+ items: current.channelIds.map((item_id) => ({+ item_type: 'channel',+ item_id,+ })),+ muted: true,+ });+ expect(actions.sectionNotificationsDisabled('label:section')).toBe(false);+ });+it('uses the complete current membership instead of loaded rows or a stale snapshot', async () => {let current = label;const actions = mountActions(() => [current]);@@ -887,7 +1150,7 @@ describe('section notification actions', () => {expect(mocks.fetchGroupIds).toHaveBeenCalledExactlyOnceWith(section,- section === 'channels' ? label.channelIds : [],+ [],expect.any(AbortSignal));expect(mocks.source.unmuteEntity.mock.calls).toEqual([diff --git a/apps/web/src/features/channels-view/components/rail/ChannelsRail.tsx b/apps/web/src/features/channels-view/components/rail/ChannelsRail.tsxindex f2f9653229..e10b1b6f0a 100644--- a/apps/web/src/features/channels-view/components/rail/ChannelsRail.tsx+++ b/apps/web/src/features/channels-view/components/rail/ChannelsRail.tsx@@ -55,7 +55,6 @@ import {Show,startTransition,} from 'solid-js';-import type { VirtualizerHandle } from 'virtua/solid';import { useChannelsView } from '../../channels-view-context';import {canAssignChannel,@@ -296,7 +295,7 @@ export function ChannelsRail(props: ChannelsRailProps) {const [listRoot, setListRoot] = createSignal<HTMLDivElement>();const [virtualizers, setVirtualizers] = createSignal<- Partial<Record<ChannelsSourceScope, VirtualizerHandle>>+ Partial<Record<ChannelsSourceScope, ListScrollHandle>>>({});const [browseScrollHandle, setBrowseScrollHandle] =createSignal<ListScrollHandle>();@@ -380,6 +379,12 @@ export function ChannelsRail(props: ChannelsRailProps) {Boolean(labelsQuery.data) &&(!sectionsEnabled() ||(!personalLabelsQuery.isPending && Boolean(personalLabelsQuery.data)));+ const labelsFailed = () =>+ channelTagsEnabled() &&+ !labelsAvailable() &&+ !labelsQuery.isPending &&+ (!sectionsEnabled() || !personalLabelsQuery.isPending) &&+ (labelsQuery.isError || (sectionsEnabled() && personalLabelsQuery.isError));const labelsUnavailableReason = () => {if (labelsAvailable()) return '';if (@@ -1203,7 +1208,7 @@ export function ChannelsRail(props: ChannelsRailProps) {const registerVirtualizer = (scope: ChannelsSourceScope,- handle: VirtualizerHandle+ handle: ListScrollHandle) => {setVirtualizers((current) => ({ ...current, [scope]: handle }));@@ -1236,12 +1241,12 @@ export function ChannelsRail(props: ChannelsRailProps) {labels,labelsAvailable,labelsUnavailableReason,+ labelsFailed,retryLabels: async () => {- await labelsQuery.refetch();-- if (sectionsEnabled()) {- await personalLabelsQuery.refetch();- }+ await Promise.all([+ labelsQuery.refetch(),+ ...(sectionsEnabled() ? [personalLabelsQuery.refetch()] : []),+ ]);},retryReferencedChannels: nextReferencedChannels.retry,isLabelOpen,diff --git a/apps/web/src/features/channels-view/components/rail/ChannelsRailContext.ts b/apps/web/src/features/channels-view/components/rail/ChannelsRailContext.tsindex 8ff1ab60f2..8e52698f73 100644--- a/apps/web/src/features/channels-view/components/rail/ChannelsRailContext.ts+++ b/apps/web/src/features/channels-view/components/rail/ChannelsRailContext.ts@@ -6,7 +6,6 @@ import type { ChannelLabel } from '@service-storage/generated/schemas/channelLabimport type { Favorite } from '@service-storage/generated/schemas/favorite';import type { ContextProviderProps } from '@solid-primitives/context';import type { Accessor } from 'solid-js';-import type { VirtualizerHandle } from 'virtua/solid';import type { ChannelsSourceScope, ChannelsSources } from '../../queries';import type {ChannelListSort,@@ -157,6 +156,7 @@ export type ChannelsRailContext = {labelsAvailable: Accessor<boolean>;/** Why labels are unavailable, for the create menu and refused drops. */labelsUnavailableReason: Accessor<string>;+ labelsFailed: Accessor<boolean>;retryLabels: () => Promise<void>;/** Retry unresolved channels referenced by section membership or favorites. */retryReferencedChannels: () => Promise<void>;@@ -215,7 +215,7 @@ export type ChannelsRailContext = {registerBrowseScrollHandle: (handle: ListScrollHandle) => () => void;registerVirtualizer: (scope: ChannelsSourceScope,- handle: VirtualizerHandle+ handle: ListScrollHandle) => () => void;channelActivity: ChannelRailActivity;};diff --git a/apps/web/src/features/channels-view/components/rail/build-channel-rail-rows.test.ts b/apps/web/src/features/channels-view/components/rail/build-channel-rail-rows.test.tsindex 77ac5c6ff3..282488f002 100644--- a/apps/web/src/features/channels-view/components/rail/build-channel-rail-rows.test.ts+++ b/apps/web/src/features/channels-view/components/rail/build-channel-rail-rows.test.ts@@ -570,6 +570,61 @@ it.each([true, false])(});+it.each([true, false])(+ 'keeps assigned public and private channels in All channels when custom sections are open=%s',+ (open) => {+ const publicChannel = channel('public', 'Public', 'public');+ const privateChannel = channel('private', 'Private', 'private');+ const channels = [publicChannel, privateChannel];+ const channelsById = new Map(channels.map((item) => [item.id, item]));+ const sections = buildSectionedChannelRows({+ labels: [+ { ...label('manual', 'Manual', ['public']), teamId: undefined },+ {+ ...label('smart', 'Smart', ['private']),+ teamId: undefined,+ rule: { attribute: 'name', contains: 'Private' },+ },+ ],+ channels,+ channelsById,+ isLabelOpen: () => open,+ });+ const rows = buildSectionedRailRows(+ 'browse',+ {+ favorites: true,+ direct_messages: true,+ team_channels: true,+ channels: true,+ },+ {+ favorites: [],+ direct_messages: [],+ team_channels: [],+ channels,+ recents: [],+ threads: [],+ },+ sections+ );+ const grouped = groupChannelRailSections(rows);++ expect(grouped.get('channels')?.rows.map((row) => row.id)).toEqual([+ 'channel:public',+ 'channel:private',+ 'status:channels',+ ]);+ expect(grouped.get('label:manual')?.rows.map((row) => row.id)).toEqual(+ open ? ['channel:public:label:manual'] : []+ );+ expect(grouped.get('label:smart')?.rows.map((row) => row.id)).toEqual(+ open ? ['channel:private:label:smart'] : []+ );+ expect(new Set(rows.map((row) => row.id)).size).toBe(rows.length);+ }+);+it('keeps section membership and navigation together after reordering with stale or duplicate keys', () => {const rows = buildSectionedRailRows('browse',diff --git a/apps/web/src/features/channels-view/components/rail/hooks/useChannelSectionNotifications.ts b/apps/web/src/features/channels-view/components/rail/hooks/useChannelSectionNotifications.tsindex 55d5fb836c..b124ff869c 100644--- a/apps/web/src/features/channels-view/components/rail/hooks/useChannelSectionNotifications.ts+++ b/apps/web/src/features/channels-view/components/rail/hooks/useChannelSectionNotifications.ts@@ -1,9 +1,9 @@import { t } from '@app/lib/i18n';-import { useGlobalNotificationSource } from '@components/app/GlobalAppState';import { toast } from '@core/component/Toast/Toast';import { useUserId } from '@core/context/user';import { Telemetry } from '@macro-inc/observability';import { openSnoozeNotifications } from '@notifications/SnoozeNotificationsDialog';+import { useBulkNotificationPreferencesMutation } from '@queries/notification/unsubscribes';import type { ChannelLabel } from '@service-storage/generated/schemas/channelLabel';import type { Favorite } from '@service-storage/generated/schemas/favorite';import { type Accessor, createSignal, type Owner, onCleanup } from 'solid-js';@@ -22,7 +22,7 @@ export function useChannelSectionNotifications(options: SectionNotificationOptions) {const userId = useUserId();- const notificationSource = useGlobalNotificationSource();+ const notificationPreferences = useBulkNotificationPreferencesMutation();const [pending, setPending] = createSignal<{ actorId: string }>();const requests = new Set<AbortController>();let disposed = false;@@ -82,14 +82,8 @@ export function useChannelSectionNotifications(section === 'team_channels' ||section === 'direct_messages') {- // Only All channels excludes custom-section assignments.- const excludedIds =- section === 'channels'- ? options.labels().flatMap((label) => label.channelIds)- : [];-return Telemetry.span('channels.section.members', () =>- fetchChannelGroupIds(section, excludedIds, signal)+ fetchChannelGroupIds(section, [], signal));}@@ -143,23 +137,16 @@ export function useChannelSectionNotifications(}const muted = action === 'mute';- const results = await Promise.allSettled(- channelIds.map((id) =>- span.span('channels.section.notification.update', async (child) => {- child.setAttr('channel.id', id);-- if (muted) {- await notificationSource.muteEntity({ type: 'channel', id });- } else {- await notificationSource.unmuteEntity({ type: 'channel', id });- }- })- )- );- const failed = results.filter(- (result) => result.status === 'rejected'- ).length;- const succeeded = results.length - failed;+ const result = await notificationPreferences.mutateAsync({+ actorId,+ items: channelIds.map((id) => ({+ item_type: 'channel',+ item_id: id,+ })),+ muted,+ });+ const failed = result.failed.length;+ const succeeded = result.succeeded.length;span.setAttr('notification.failed_count', failed);@@ -177,7 +164,7 @@ export function useChannelSectionNotifications(muted? 'entityActions.toastMutedSome': 'entityActions.toastUnmutedSome',- { succeeded, count: results.length, failed }+ { succeeded, count: channelIds.length, failed }));return;diff --git a/apps/web/src/features/channels-view/components/rail/next/ChannelLabelRows.tsx b/apps/web/src/features/channels-view/components/rail/next/ChannelLabelRows.tsxindex 77b7ba5c48..39ac0f8955 100644--- a/apps/web/src/features/channels-view/components/rail/next/ChannelLabelRows.tsx+++ b/apps/web/src/features/channels-view/components/rail/next/ChannelLabelRows.tsx@@ -19,7 +19,7 @@ import UsersIcon from '@icon/system/regular/users.svg';import { ContextMenu } from '@kobalte/core/context-menu';import type { ChannelLabel } from '@service-storage/generated/schemas/channelLabel';import { Badge, Button, Tooltip } from '@ui';-import { For, type JSX, Show } from 'solid-js';+import { For, Show } from 'solid-js';import {canAssignChannel,canLabelChannel,@@ -35,10 +35,7 @@ import {} from './ChannelSectionMenu';/** A custom section with the same heading and controls as built-in sections. */-export function ChannelLabelRow(props: {- label: ChannelLabel;- dragHandle?: JSX.Element;-}) {+export function ChannelLabelRow(props: { label: ChannelLabel }) {const rail = useChannelsRail();const state = useChannelRailLabelState(() => props.label);@@ -61,7 +58,6 @@ export function ChannelLabelRow(props: {focused={state().focused}unreadCount={state().unreadCount}onToggle={() => rail.activateRow(rowKeyForLabel(props.label.id))}- dragHandle={props.dragHandle}badge={<Show when={props.label.teamId}><Tooltipdiff --git a/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.test.ts b/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.test.tsnew file mode 100644index 0000000000..9779f95f14--- /dev/null+++ b/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.test.ts@@ -0,0 +1,374 @@+import { cleanup, render } from '@solidjs/testing-library';+import { createComponent, createSignal } from 'solid-js';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';+import {+ ChannelRailVirtualizer,+ type ChannelRailVirtualizerHandle,+ scrollChannelRailTargetIntoView,+} from './ChannelRailVirtualizer';++const observers = new Set<MeasuredResizeObserver>();+let viewportHeight = 200;++class MeasuredResizeObserver implements ResizeObserver {+ readonly targets = new Set<Element>();++ constructor(readonly callback: ResizeObserverCallback) {+ observers.add(this);+ }++ observe(target: Element) {+ this.targets.add(target);+ }++ unobserve(target: Element) {+ this.targets.delete(target);+ }++ disconnect() {+ this.targets.clear();+ observers.delete(this);+ }+}++function measure(height: number) {+ viewportHeight = height;+ for (const observer of [...observers]) {+ const entries = [...observer.targets].map((target) => {+ const blockSize = target.hasAttribute('data-viewport') ? height : 32;+ const size = [{ inlineSize: 300, blockSize }];+ return {+ target,+ contentRect: new DOMRect(0, 0, 300, blockSize),+ borderBoxSize: size,+ contentBoxSize: size,+ devicePixelContentBoxSize: size,+ };+ });+ if (entries.length) observer.callback(entries, observer);+ }+}++beforeEach(() => {+ viewportHeight = 200;+ vi.useFakeTimers();+ vi.stubGlobal('ResizeObserver', MeasuredResizeObserver);+ vi.spyOn(HTMLElement.prototype, 'offsetHeight', 'get').mockImplementation(+ function (this: HTMLElement) {+ return this.hasAttribute('data-viewport') ? 200 : 32;+ }+ );+ vi.spyOn(HTMLElement.prototype, 'offsetWidth', 'get').mockReturnValue(300);+});++afterEach(() => {+ cleanup();+ observers.clear();+ vi.useRealTimers();+ vi.unstubAllGlobals();+ vi.restoreAllMocks();+});++function mount(scrollTop: number, initialMargin = 0, scrollPadding = 0) {+ const viewport = document.createElement('div');+ viewport.setAttribute('data-viewport', '');+ document.body.append(viewport);+ viewport.scrollTop = scrollTop;+ const [margin, setMargin] = createSignal(initialMargin);+ const [keys, setKeys] = createSignal(+ Array.from({ length: 100 }, (_, index) => `row-${index}`)+ );+ const [retained, setRetained] = createSignal<number[]>([]);+ const [scrollRoot, setScrollRoot] = createSignal(viewport);+ let handle: ChannelRailVirtualizerHandle | undefined;+ const onRangeChange = vi.fn();+ const scrollTo = vi.fn((options: ScrollToOptions) => {+ viewport.scrollTop = options.top ?? 0;+ viewport.dispatchEvent(new Event('scroll'));+ });+ Object.defineProperties(viewport, {+ clientHeight: { get: () => viewportHeight, configurable: true },+ scrollHeight: { get: () => 3200 + margin() },+ scrollTo: { value: scrollTo },+ });+ const result = render(+ () =>+ createComponent(ChannelRailVirtualizer<string>, {+ get keys() {+ return keys();+ },+ get scrollRoot() {+ return scrollRoot();+ },+ estimateSize: 32,+ overscan: 0,+ get scrollMargin() {+ return margin();+ },+ scrollPadding,+ get keepMounted() {+ return retained();+ },+ onRangeChange,+ ref: (value) => {+ handle = value;+ },+ children: (id) => {+ const row = document.createElement('button');+ row.textContent = id;+ return row;+ },+ }),+ { container: viewport }+ );+ return {+ ...result,+ viewport,+ scrollTo,+ setMargin,+ setKeys,+ setRetained,+ setScrollRoot,+ onRangeChange,+ handle: () => handle,+ };+}++describe('channel rail virtualizer', () => {+ it('starts at an existing scroll offset without blocking pointer input', () => {+ const view = mount(640);+ measure(200);+ expect(view.queryByText('row-0')).toBeNull();+ expect(view.getByText('row-20')).toBeTruthy();+ expect(+ view.viewport.querySelector('[style*="pointer-events: none"]')+ ).toBeNull();+ });++ it('notifies pagination when scrolling unchanged rows near the end', () => {+ const view = mount(0);+ measure(200);+ view.onRangeChange.mockClear();++ view.viewport.scrollTop = 2900;+ view.viewport.dispatchEvent(new Event('scroll'));++ expect(view.onRangeChange).toHaveBeenCalled();+ expect(view.handle()?.scrollMetrics()).toEqual({+ size: 3200,+ offset: 2900,+ viewport: 200,+ });+ });++ it('updates its range when preceding content changes height without scrolling', () => {+ const view = mount(640);+ measure(200);+ expect(view.getByText('row-20')).toBeTruthy();++ view.setMargin(320);++ expect(view.getByText('row-10')).toBeTruthy();+ expect(view.queryByText('row-20')).toBeNull();+ });++ it('includes preceding content in nearest keyboard scrolling', async () => {+ const view = mount(500, 500);+ measure(600);+ view.handle()?.scrollToIndex(25, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.viewport.scrollTop).toBe(732);+ });++ it('immediately reveals two context rows above and below the focused row', async () => {+ const view = mount(320, 0, 64);+ measure(200);++ view.handle()?.scrollToIndex(15, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.scrollTo).toHaveBeenCalledWith({+ top: 376,+ behavior: 'auto',+ });++ view.handle()?.scrollToIndex(10, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.viewport.scrollTop).toBe(256);+ });++ it('keeps a row still when it already has enough surrounding context', async () => {+ const view = mount(320, 0, 64);+ measure(200);++ view.handle()?.scrollToIndex(13, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.viewport.scrollTop).toBe(320);+ });++ it('includes preceding sections in padded scrolling', async () => {+ const view = mount(500, 500, 64);+ measure(600);++ view.handle()?.scrollToIndex(25, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.viewport.scrollTop).toBe(796);+ });++ it('reduces context padding so small viewports can show the focused row', async () => {+ const view = mount(320, 0, 64);+ measure(64);++ view.handle()?.scrollToIndex(15, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);+ expect(view.viewport.scrollTop).toBe(464);+ });++ it('immediately follows rapid changes to the keyboard target', () => {+ const view = mount(320, 0, 64);+ measure(200);+ view.scrollTo.mockClear();++ view.handle()?.scrollToIndex(15, { align: 'nearest' });+ expect(view.viewport.scrollTop).toBe(376);+ view.handle()?.scrollToIndex(40, { align: 'nearest' });+ expect(view.viewport.scrollTop).toBe(1176);+ view.handle()?.scrollToIndex(10, { align: 'nearest' });++ expect(view.scrollTo).toHaveBeenLastCalledWith({+ top: 256,+ behavior: 'auto',+ });+ expect(view.viewport.scrollTop).toBe(256);+ });++ it('preserves row elements through refreshed keys and reordering', () => {+ const view = mount(0);+ measure(200);+ const row = view.getByText('row-0');+ const keys = Array.from({ length: 100 }, (_, index) => `row-${index}`);++ view.setKeys([...keys]);+ expect(view.getByText('row-0')).toBe(row);++ view.setKeys([keys[1], keys[0], ...keys.slice(2)]);+ expect(view.getByText('row-0')).toBe(row);+ });++ it('retains focused or dragged rows outside the viewport', () => {+ const view = mount(0);+ measure(200);+ expect(view.queryByText('row-80')).toBeNull();++ view.setRetained([80]);+ const row = view.getByText('row-80');+ view.viewport.scrollTop = 1600;+ view.viewport.dispatchEvent(new Event('scroll'));++ expect(view.getByText('row-80')).toBe(row);+ expect(view.queryByText('row-0')).toBeNull();+ });++ it('uses the new scroll root offset when switching between nested and outer scrolling', () => {+ const view = mount(0);+ measure(200);+ const outer = document.createElement('div');+ outer.setAttribute('data-viewport', '');+ outer.scrollTop = 640;+ document.body.append(outer);+ outer.append(view.viewport);++ view.setScrollRoot(outer);+ measure(200);++ expect(view.queryByText('row-0')).toBeNull();+ expect(view.getByText('row-20')).toBeTruthy();+ outer.remove();+ });+});++describe('channel rail target scrolling', () => {+ it('reveals a bottom row even when its section is taller than the sidebar', () => {+ const container = document.createElement('div');+ const row = document.createElement('div');+ Object.defineProperties(container, {+ clientHeight: { value: 300 },+ offsetHeight: { value: 300 },+ });+ container.scrollTop = 100;+ container.scrollTo = vi.fn();+ vi.spyOn(container, 'getBoundingClientRect').mockReturnValue(+ new DOMRect(0, 0, 300, 300)+ );+ vi.spyOn(row, 'getBoundingClientRect').mockReturnValue(+ new DOMRect(0, 368, 300, 32)+ );++ scrollChannelRailTargetIntoView(container, row, 64);++ expect(container.scrollTo).toHaveBeenCalledWith({+ top: 264,+ behavior: 'instant',+ });+ });++ it('uses the row position after a pending inner scroll', async () => {+ const inner = mount(0, 0, 64);+ measure(500);+ const nextOffset = inner+ .handle()+ ?.getScrollOffsetForIndex(30, { align: 'nearest' });+ expect(nextOffset).toBe(556);+ if (nextOffset === undefined) throw new Error('Missing target offset');+ const container = document.createElement('div');+ const row = document.createElement('div');+ Object.defineProperties(container, {+ clientHeight: { value: 300 },+ offsetHeight: { value: 300 },+ });+ container.scrollTo = vi.fn();+ vi.spyOn(container, 'getBoundingClientRect').mockReturnValue(+ new DOMRect(0, 0, 300, 300)+ );+ vi.spyOn(row, 'getBoundingClientRect').mockReturnValue(+ new DOMRect(0, 960, 300, 32)+ );++ scrollChannelRailTargetIntoView(container, row, 64, -nextOffset);+ inner.handle()?.scrollToIndex(30, { align: 'nearest' });+ await vi.advanceTimersByTimeAsync(200);++ expect(container.scrollTo).toHaveBeenCalledWith({+ top: 200,+ behavior: 'instant',+ });+ expect(inner.viewport.scrollTop).toBe(556);+ });++ it('keeps an already visible heading in place after a distant target', () => {+ const container = document.createElement('div');+ const heading = document.createElement('div');+ Object.defineProperties(container, {+ clientHeight: { value: 300 },+ offsetHeight: { value: 300 },+ });+ container.scrollTo = vi.fn();+ vi.spyOn(container, 'getBoundingClientRect').mockReturnValue(+ new DOMRect(0, 0, 300, 300)+ );+ const bounds = vi.spyOn(heading, 'getBoundingClientRect');+ bounds.mockReturnValue(new DOMRect(0, 700, 300, 32));+ scrollChannelRailTargetIntoView(container, heading, 64);+ expect(container.scrollTo).toHaveBeenLastCalledWith({+ top: 496,+ behavior: 'instant',+ });++ bounds.mockReturnValue(new DOMRect(0, 100, 300, 32));+ scrollChannelRailTargetIntoView(container, heading, 64);++ expect(container.scrollTo).toHaveBeenLastCalledWith({+ top: 0,+ behavior: 'instant',+ });+ });+});diff --git a/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.tsx b/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.tsxnew file mode 100644index 0000000000..d985a714df--- /dev/null+++ b/apps/web/src/features/channels-view/components/rail/next/ChannelRailVirtualizer.tsx@@ -0,0 +1,242 @@+import type { ListScrollHandle } from '@app/components/list';+import { onElementConnect } from '@core/util/onElementConnect';+import { Key } from '@solid-primitives/keyed';+import { createResizeObserver } from '@solid-primitives/resize-observer';+import {+ createVirtualizer,+ defaultRangeExtractor,+ type Range,+} from '@tanstack/solid-virtual';+import {+ createEffect,+ createSignal,+ type JSX,+ on,+ onCleanup,+ onMount,+ Show,+ untrack,+} from 'solid-js';++export type ChannelRailVirtualizerHandle = ListScrollHandle & {+ visibleRange: () => { startIndex: number; endIndex: number } | undefined;+ scrollMetrics: () => { size: number; offset: number; viewport: number };+ getScrollOffsetForIndex: (+ ...args: Parameters<ListScrollHandle['scrollToIndex']>+ ) => number | undefined;+};++export function scrollChannelRailTargetIntoView(+ container: HTMLElement,+ target: HTMLElement,+ padding: number,+ targetShift = 0+) {+ const bounds = target.getBoundingClientRect();+ const viewport = container.getBoundingClientRect();+ const scale = viewport.height / container.offsetHeight || 1;+ const top = (bounds.top - viewport.top) / scale + targetShift;+ const bottom = (bounds.bottom - viewport.top) / scale + targetShift;+ const gap = Math.min(+ padding,+ Math.max(0, (container.clientHeight - bounds.height / scale) / 2)+ );++ let offset = 0;+ if (top < gap) {+ offset = top - gap;+ } else if (bottom > container.clientHeight - gap) {+ offset = bottom - container.clientHeight + gap;+ }++ container.scrollTo({+ top: container.scrollTop + offset,+ behavior: 'instant',+ });+}+type ChannelRailVirtualizerProps<K extends string> = {+ keys: readonly K[];+ scrollRoot: HTMLDivElement | undefined;+ scrollMargin?: number;+ scrollPadding?: number;+ estimateSize: number;+ overscan?: number;+ keepMounted?: readonly number[];+ ref?: (handle: ChannelRailVirtualizerHandle | undefined) => void;+ onRangeChange?: () => void;+ children: (key: K) => JSX.Element;+};++function VirtualRows<K extends string>(+ props: ChannelRailVirtualizerProps<K> & { scrollRoot: HTMLDivElement }+) {+ const [viewportHeight, setViewportHeight] = createSignal(+ props.scrollRoot.clientHeight+ );+ createResizeObserver(+ () => props.scrollRoot,+ () => setViewportHeight(props.scrollRoot.clientHeight)+ );+ const scrollPadding = () =>+ Math.min(+ props.scrollPadding ?? 0,+ Math.max(0, (viewportHeight() - props.estimateSize) / 2)+ );++ const virtualizer = createVirtualizer<HTMLDivElement, HTMLDivElement>({+ get count() {+ return props.keys.length;+ },+ get getItemKey() {+ const keys = props.keys;+ return (index: number) => keys[index];+ },+ getScrollElement: () => props.scrollRoot,+ estimateSize: () => props.estimateSize,+ initialOffset: () => props.scrollRoot.scrollTop,+ get scrollMargin() {+ return props.scrollMargin ?? 0;+ },+ get scrollPaddingStart() {+ return scrollPadding();+ },+ get scrollPaddingEnd() {+ return scrollPadding();+ },+ get overscan() {+ return props.overscan ?? 6;+ },+ get rangeExtractor() {+ const retained = props.keepMounted ?? [];+ return (range: Range) => {+ const indexes = new Set(defaultRangeExtractor(range));++ for (const index of retained) {+ if (index >= 0 && index < range.count) indexes.add(index);+ }++ return [...indexes].sort((a, b) => a - b);+ };+ },+ });++ const handle: ChannelRailVirtualizerHandle = {+ scrollToIndex: (index, options) => {+ const align = options?.align;++ virtualizer.scrollToIndex(index, {+ align: !align || align === 'nearest' ? 'auto' : align,+ behavior: 'auto',+ });+ },+ getScrollOffsetForIndex: (index, options) => {+ const align = options?.align;+ return virtualizer.getOffsetForIndex(+ index,+ !align || align === 'nearest' ? 'auto' : align+ )?.[0];+ },+ visibleRange: () => {+ virtualizer.getVirtualItems();+ return virtualizer.range ?? undefined;+ },+ scrollMetrics: () => ({+ size: virtualizer.getTotalSize(),+ offset: props.scrollRoot.scrollTop,+ viewport: props.scrollRoot.clientHeight,+ }),+ };++ onMount(() => {+ props.ref?.(handle);+ props.onRangeChange?.();+ });++ onCleanup(() => props.ref?.(undefined));++ createEffect(+ on(+ [+ () => virtualizer.getVirtualItems().map((row) => row.index),+ () => virtualizer.getTotalSize(),+ ],+ () => props.onRangeChange?.()+ )+ );++ return (+ <div+ class="relative w-full"+ style={{ height: `${virtualizer.getTotalSize()}px` }}+ >+ <Key each={virtualizer.getVirtualItems()} by="key">+ {(row) => {+ const key = untrack(() => props.keys[row().index]);+ let element: HTMLDivElement | undefined;++ createEffect(+ on(+ () => row().index,+ (index) => {+ if (!element) return;++ element.dataset.index = String(index);+ virtualizer.measureElement(element);+ }+ )+ );++ onCleanup(() => virtualizer.measureElement(null));++ return (+ <div+ ref={(node) => {+ element = node;+ }}+ data-index={row().index}+ class="absolute left-0 w-full"+ style={{+ top: `${row().start - (props.scrollMargin ?? 0)}px`,+ }}+ >+ {props.children(key)}+ </div>+ );+ }}+ </Key>+ </div>+ );+}++/** Observe only connected scroll roots, including roots attached after Suspense. */+export function ChannelRailVirtualizer<K extends string>(+ props: ChannelRailVirtualizerProps<K>+) {+ const [connectedRoot, setConnectedRoot] = createSignal<HTMLDivElement>();++ createEffect(+ on(+ () => props.scrollRoot,+ (root) => {+ setConnectedRoot(undefined);++ if (!root) return;++ let active = true;+ onCleanup(() => {+ active = false;+ });++ onElementConnect(root, () => {+ if (active) setConnectedRoot(root);+ });+ }+ )+ );++ return (+ <Show when={connectedRoot()} keyed>+ {(root) => <VirtualRows {...props} scrollRoot={root} />}+ </Show>+ );+}diff --git a/apps/web/src/features/channels-view/components/rail/next/ChannelSectionDropZone.tsx b/apps/web/src/features/channels-view/components/rail/next/ChannelSectionDropZone.tsxindex a12525bce2..e4b135521d 100644--- a/apps/web/src/features/channels-view/components/rail/next/ChannelSectionDropZone.tsx+++ b/apps/web/src/features/channels-view/components/rail/next/ChannelSectionDropZone.tsx@@ -43,7 +43,7 @@ export function ChannelSectionDropZone(props: {}if (!rail.labelsAvailable()) {- return rail.labelsUnavailableReason();+ return rail.labelsFailed() ? rail.labelsUnavailableReason() : undefined;}const reason = channelSectionDropError({@@ -116,7 +116,7 @@ export function ChannelSectionDropZone(props: {{(reason) => (<divrole="status"- class="pointer-events-none absolute inset-0 z-20 flex items-center justify-center gap-2 rounded-lg bg-surface/90 px-3 py-2 text-xs text-ink-muted ring-1 ring-inset ring-edge-muted"+ class="pointer-events-none absolute inset-0 z-20 flex items-center justify-center gap-2 rounded-lg bg-surface/90 px-3 py-2 text-xs text-ink-muted"><ProhibitIcon class="size-4 shrink-0" /><span>{reason()}</span>diff --git a/apps/web/src/features/channels-view/components/rail/next/ChannelSectionHeading.tsx b/apps/web/src/features/channels-view/components/rail/next/ChannelSectionHeading.tsxindex 76879de575..d7fa26bf7d 100644--- a/apps/web/src/features/channels-view/components/rail/next/ChannelSectionHeading.tsx+++ b/apps/web/src/features/channels-view/components/rail/next/ChannelSectionHeading.tsx@@ -1,7 +1,8 @@+import { createDistancePointerSensor } from '@app/components/drag-drop/create-distance-pointer-sensor';import { CollapsibleSection } from '@app/components/view-shell';import { t } from '@app/lib/i18n';import DotsSixVerticalIcon from '@icon/system/regular/dots-six-vertical.svg';-import { createDraggable } from '@thisbeyond/solid-dnd';+import { createDraggable, useDragDropContext } from '@thisbeyond/solid-dnd';import { Button, cn, Tooltip } from '@ui';import { type JSX, Show } from 'solid-js';import type { ChannelSectionKey } from '../../../types';@@ -17,7 +18,6 @@ export function ChannelSectionHeading(props: {unreadCount: number;onToggle: () => void;badge?: JSX.Element;- dragHandle?: JSX.Element;children?: JSX.Element;}) {return (@@ -28,7 +28,6 @@ export function ChannelSectionHeading(props: {props.focused && 'bg-hover text-ink')}>- {props.dragHandle}<CollapsibleSection.Triggerid={props.id}role="treeitem"@@ -48,19 +47,26 @@ export function ChannelSectionHeading(props: {<span class="text-xs text-accent">{props.unreadCount}</span></Show></CollapsibleSection.Trigger>- <div class="flex shrink-0 items-center">{props.children}</div>+ <div+ class="flex shrink-0 items-center"+ onMouseDown={(event) => event.stopPropagation()}+ >+ {props.children}+ </div></CollapsibleSection.Header></CollapsibleSection.Root>);}-/** Keep disclosure clicks separate from section dragging and keyboard reordering. */-export function ChannelSectionDragHandle(props: {+/** Drag from the heading or its grip without toggling disclosure after a drop. */+export function DraggableChannelSectionHeading(props: {section: ChannelSectionKey;label: string;reorder: ReturnType<typeof useSectionReorder>;+ children: JSX.Element;}) {- const draggable = createDraggable(`${props.reorder.scope}:${props.section}`, {+ const dragId = `${props.reorder.scope}:${props.section}`;+ const draggable = createDraggable(dragId, {dragType: 'channel-section',dndScope: props.reorder.scope,section: props.section,@@ -80,28 +86,61 @@ export function ChannelSectionDragHandle(props: {),});+ const pointer = createDistancePointerSensor(8, props.reorder.cancel, {+ id: `${dragId}:pointer`,+ manual: true,+ });+ const [, actions] = useDragDropContext() ?? [];+ let didDrag = false;++ actions?.onDragStart(({ draggable: source }) => {+ if (source.id === dragId) {+ didDrag = true;+ }+ });++ const preventToggleAfterDrag = (event: MouseEvent) => {+ if (!didDrag || event.detail === 0) {+ return;+ }++ event.preventDefault();+ event.stopPropagation();+ };+return (- <Button+ <divref={draggable.ref}- {...draggable.dragActivators}- variant="ghost"- size="icon-xs"- class="absolute -left-(--sidebar-gutter) top-1 z-10 cursor-grab opacity-0 group-hover/rail-section:opacity-100 focus-visible:opacity-100 active:cursor-grabbing"- aria-label={t('channelSections.reorderSection', { name: props.label })}- tooltip={t('channelSections.reorderSectionHint')}- onClick={(event: MouseEvent) => event.stopPropagation()}- onKeyDown={(event: KeyboardEvent) => {- if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {- return;- }-- event.preventDefault();- event.stopPropagation();- event.stopImmediatePropagation();- props.reorder.move(props.section, event.key === 'ArrowUp' ? -1 : 1);+ class="group/section-heading relative cursor-grab active:cursor-grabbing"+ onMouseDown={(event) => pointer.start(event, dragId)}+ onPointerDown={() => {+ didDrag = false;}}+ on:click={{ capture: true, handleEvent: preventToggleAfterDrag }}>- <DotsSixVerticalIcon class="size-3 -translate-x-1" />- </Button>+ <Button+ variant="ghost"+ appearance="bare"+ size="icon-xs"+ data-icon-motion="none"+ class="absolute -left-(--sidebar-gutter) top-1 z-10 cursor-grab opacity-0 group-hover/section-heading:opacity-100 focus-visible:opacity-100 active:cursor-grabbing"+ aria-label={t('channelSections.reorderSection', { name: props.label })}+ tooltip={t('channelSections.reorderSectionHint')}+ onClick={(event: MouseEvent) => event.stopPropagation()}+ onKeyDown={(event: KeyboardEvent) => {+ if (event.key !== 'ArrowUp' && event.key !== 'ArrowDown') {+ return;+ }++ event.preventDefault();+ event.stopPropagation();+ event.stopImmediatePropagation();+ props.reorder.move(props.section, event.key === 'ArrowUp' ? -1 : 1);+ }}+ >+ <DotsSixVerticalIcon class="-ml-2 size-3" />+ </Button>+ {props.children}+ </div>);}diff --git a/apps/web/src/features/channels-view/components/rail/next/ExpandedChannelsRail.tsx b/apps/web/src/features/channels-view/components/rail/next/ExpandedChannelsRail.tsxindex bdfbcd133b..8bf78e2437 100644--- a/apps/web/src/features/channels-view/components/rail/next/ExpandedChannelsRail.tsx+++ b/apps/web/src/features/channels-view/components/rail/next/ExpandedChannelsRail.tsx@@ -1,8 +1,10 @@import { createDragAutoScroll } from '@app/components/drag-drop/create-drag-auto-scroll';import { createLayoutAnimation } from '@app/components/drag-drop/create-layout-animation';+import type { ListScrollHandle } from '@app/components/list';import { SearchBar, ViewSidebar } from '@app/components/view-shell';import { SlackImportSidebar } from '@app/features/slack-import/slack-import-sidebar';import { t } from '@app/lib/i18n';+import { useUserId } from '@core/context/user';import { createScrollTopFade } from '@core/util/createScrollTopFade';import { fireAndForget } from '@core/util/fireAndForget';import type { ChannelEntity } from '@entity';@@ -17,16 +19,15 @@ import {createEffect,createMemo,createSignal,- For,- type JSX,Match,on,onCleanup,+ onMount,Show,Switch,} from 'solid-js';-import { Virtualizer, type VirtualizerHandle } from 'virtua/solid';import {+ CHANNEL_SECTION_MAX_HEIGHT,CHANNEL_SECTION_MIN_HEIGHT,CHANNEL_SECTION_ROW_HEIGHT,} from '../../../constants';@@ -47,18 +48,22 @@ import {RailListLoading,RailListLoadingMore,} from '../ChannelsRailSection';-import { useChannelRailVirtualizer } from '../hooks/useChannelRailState';import {type ChannelRailSectionRows,groupChannelRailSections,} from './build-channel-rail-rows';import { ChannelFavoriteRow } from './ChannelFavoriteRow';import { ChannelLabelEmptyState, ChannelLabelRow } from './ChannelLabelRows';+import {+ ChannelRailVirtualizer,+ type ChannelRailVirtualizerHandle,+ scrollChannelRailTargetIntoView,+} from './ChannelRailVirtualizer';import { ChannelSectionDropZone } from './ChannelSectionDropZone';import { ChannelSectionEmptyState } from './ChannelSectionEmptyState';import {- ChannelSectionDragHandle,ChannelSectionHeading,+ DraggableChannelSectionHeading,} from './ChannelSectionHeading';import {ChannelSectionContextMenu,@@ -134,7 +139,7 @@ function ExpandedHeader(props: { search: ChannelRailSearch }) {/></div></ViewSidebar.Primary>- <Show when={rail.channelTagsEnabled() && !rail.labelsAvailable()}>+ <Show when={rail.labelsFailed()}><divclass="flex items-center gap-2 px-3 text-xs text-ink-muted"role="status"@@ -153,10 +158,7 @@ function ExpandedHeader(props: { search: ChannelRailSearch }) {);}-function SectionHeading(props: {- group: 'favorites' | ChannelsGroup;- dragHandle?: JSX.Element;-}) {+function SectionHeading(props: { group: 'favorites' | ChannelsGroup }) {const rail = useChannelsRail();const team = useCurrentTeamQuery(() => props.group === 'team_channels');const title = () => {@@ -192,7 +194,6 @@ function SectionHeading(props: {open={open()}focused={rail.list.focus.key() === key()}unreadCount={unreadCount()}- dragHandle={props.dragHandle}onToggle={() => rail.toggleGroup(props.group)}><ChannelSectionDropdown section={props.group} label={title()} />@@ -247,7 +248,6 @@ function SectionStatus(props: { group: ChannelsGroup }) {function BrowseRow(props: {row: ChannelRailRow;favoriteReorder: ReturnType<typeof useFavoriteReorder>;- dragHandle?: JSX.Element;}) {const rail = useChannelsRail();@@ -257,14 +257,13 @@ function BrowseRow(props: {'pl-2':props.row.kind === 'favorite' ||props.row.kind === 'conversation' ||+ props.row.kind === 'status' ||props.row.kind === 'reference-status',}}><Switch><Match when={props.row.kind === 'section' ? props.row : undefined}>- {(row) => (- <SectionHeading group={row().group} dragHandle={props.dragHandle} />- )}+ {(row) => <SectionHeading group={row().group} />}</Match><Match when={props.row.kind === 'status' ? props.row : undefined}>{(row) => <SectionStatus group={row().group} />}@@ -284,12 +283,7 @@ function BrowseRow(props: {)}</Match><Match when={props.row.kind === 'label' ? props.row : undefined}>- {(row) => (- <ChannelLabelRow- label={row().label}- dragHandle={props.dragHandle}- />- )}+ {(row) => <ChannelLabelRow label={row().label} />}</Match><Match when={props.row.kind === 'favorite' ? props.row : undefined}>{(row) => (@@ -317,13 +311,22 @@ function BrowseRow(props: {type SectionHandle = {layout?: HTMLDivElement;root?: HTMLDivElement;- virtualizer?: VirtualizerHandle;+ virtualizer?: ChannelRailVirtualizerHandle;+ viewport?: HTMLDivElement;+ outerScroll?: boolean;};function BrowseSection(props: {sectionKey: ChannelSectionKey;section: ChannelRailSectionRows;maxHeight: number;+ outerScrollRoot: HTMLDivElement | undefined;+ layoutVersion: number;+ sectionOrder: readonly ChannelSectionKey[];+ scrollVersion: number;+ savedScrollTop: number;+ onReady: () => void;+ onPointerDown: () => void;favoriteReorder: ReturnType<typeof useFavoriteReorder>;sectionReorder: ReturnType<typeof useSectionReorder>;register: (key: ChannelSectionKey, handle: SectionHandle) => () => void;@@ -331,8 +334,17 @@ function BrowseSection(props: {const rail = useChannelsRail();const handle: SectionHandle = {};const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();- const [virtualizer, setVirtualizer] = createSignal<VirtualizerHandle>();+ const [virtualizer, setVirtualizer] =+ createSignal<ChannelRailVirtualizerHandle>();const size = createElementSize(scrollRoot);+ const [resizing, setResizing] = createSignal(false);+ const [startMargin, setStartMargin] = createSignal(0);+ const outerScroll = () =>+ props.maxHeight === Number.POSITIVE_INFINITY &&+ rail.sectionPreferences(props.sectionKey).height === undefined &&+ !resizing();+ const rowsScrollRoot = () =>+ outerScroll() ? props.outerScrollRoot : scrollRoot();const droppable = createDroppable(`${props.sectionReorder.scope}:${props.sectionKey}`,{@@ -343,7 +355,45 @@ function BrowseSection(props: {);onCleanup(props.register(props.sectionKey, handle));+ onMount(() => {+ const viewport = scrollRoot();+ if (viewport && !outerScroll()) viewport.scrollTop = props.savedScrollTop;+ props.onReady();+ });++ createEffect(+ on(+ [+ scrollRoot,+ outerScroll,+ () => props.layoutVersion,+ () => props.sectionOrder,+ () => size.height,+ ],+ () => {+ if (!outerScroll()) return;+ const frame = requestAnimationFrame(() => {+ let element: HTMLElement | undefined = scrollRoot();+ let offset = 0;+ while (element && element !== props.outerScrollRoot) {+ offset += element.offsetTop;+ element =+ element.offsetParent instanceof HTMLElement+ ? element.offsetParent+ : undefined;+ }+ setStartMargin(offset);+ });+ onCleanup(() => cancelAnimationFrame(frame));+ }+ )+ );+ // Stable row IDs preserve in-flight pointer gestures during live updates.+ const rowsById = createMemo(+ () => new Map(props.section.rows.map((row) => [row.id, row]))+ );+ const rowIds = () => [...rowsById().keys()];const heading = () => props.section.heading;const customLabel = () => {const row = heading();@@ -387,8 +437,18 @@ function BrowseSection(props: {: t('channelSections.emptySection');};- const focusIndex = () =>- props.section.rows.findIndex((row) => row.id === rail.list.focus.key());+ const [dragState] = useDragDropContext() ?? [];+ const keepRows = createMemo(() => {+ const source = dragState?.active.draggable?.data;+ return props.section.rows.flatMap((row, index) => {+ if (row.id === rail.list.focus.key()) return [index];+ if (row.kind === 'conversation' && row.channel.id === source?.channelId)+ return [index];+ if (row.kind === 'favorite' && row.id === source?.favoriteKey)+ return [index];+ return [];+ });+ });const loadVisibleSections = () => {const current = virtualizer();@@ -396,13 +456,18 @@ function BrowseSection(props: {return;}- const first = current.findItemIndex(- Math.max(0, current.scrollOffset - 100)- );- const last = current.findItemIndex(- current.scrollOffset + current.viewportSize + 150- );+ const viewport = scrollRoot();+ const outer = props.outerScrollRoot;+ if (!viewport || !outer) return;+ const bounds = viewport.getBoundingClientRect();+ const visible = outer.getBoundingClientRect();+ if (bounds.bottom <= visible.top || bounds.top >= visible.bottom) return;+ const range = current.visibleRange();+ if (!range) return;++ const first = Math.max(0, range.startIndex - 3);+ const last = range.endIndex + 5;for (const row of props.section.rows.slice(first, last + 1)) {if (row.kind !== 'status') {continue;@@ -417,14 +482,23 @@ function BrowseSection(props: {};createEffect(- on([() => props.section.rows, open, virtualizer, () => size.height], () => {- if (!open()) {- return;- }+ on(+ [+ () => props.section.rows,+ open,+ virtualizer,+ () => size.height,+ () => props.scrollVersion,+ ],+ () => {+ if (!open()) {+ return;+ }- const frame = requestAnimationFrame(loadVisibleSections);- onCleanup(() => cancelAnimationFrame(frame));- })+ const frame = requestAnimationFrame(loadVisibleSections);+ onCleanup(() => cancelAnimationFrame(frame));+ }+ ));const content = (@@ -436,12 +510,14 @@ function BrowseSection(props: {dropEdge={props.sectionReorder.dropEdge(props.sectionKey)}dragging={props.sectionReorder.isDragging(props.sectionKey)}itemCount={itemCount()}+ onResizingChange={setResizing}rootRef={(element) => {handle.root = element;droppable.ref(element);}}scrollRef={(element) => {setScrollRoot(element);+ handle.viewport = element;const row = heading();@@ -450,17 +526,13 @@ function BrowseSection(props: {}}}header={- <BrowseRow- row={heading()}- favoriteReorder={props.favoriteReorder}- dragHandle={- <ChannelSectionDragHandle- section={props.sectionKey}- label={label()}- reorder={props.sectionReorder}- />- }- />+ <DraggableChannelSectionHeading+ section={props.sectionKey}+ label={label()}+ reorder={props.sectionReorder}+ >+ <BrowseRow row={heading()} favoriteReorder={props.favoriteReorder} />+ </DraggableChannelSectionHeading>}><Show@@ -478,29 +550,40 @@ function BrowseSection(props: {</Show>}>- <Virtualizer+ <ChannelRailVirtualizerref={(current) => {handle.virtualizer = current;+ handle.outerScroll = outerScroll();setVirtualizer(current);+ if (current) props.onReady();}}- data={props.section.rows}- scrollRef={scrollRoot()}- itemSize={CHANNEL_SECTION_ROW_HEIGHT}- bufferSize={200}- keepMounted={focusIndex() >= 0 ? [focusIndex()] : undefined}- onScroll={loadVisibleSections}+ keys={rowIds()}+ scrollRoot={rowsScrollRoot()}+ scrollMargin={outerScroll() ? startMargin() : 0}+ scrollPadding={CHANNEL_SECTION_ROW_HEIGHT * 2}+ estimateSize={CHANNEL_SECTION_ROW_HEIGHT}+ keepMounted={keepRows()}+ onRangeChange={loadVisibleSections}>- {(row) => (- <BrowseRow row={row} favoriteReorder={props.favoriteReorder} />+ {(id) => (+ <Show when={rowsById().get(id)}>+ {(row) => (+ <BrowseRow+ row={row()}+ favoriteReorder={props.favoriteReorder}+ />+ )}+ </Show>)}- </Virtualizer>+ </ChannelRailVirtualizer></Show></ResizableRailSection>);return (<div- class="min-w-0 shrink-0"+ class="min-w-0 shrink-0 pb-0.5"+ on:pointerdown={{ capture: true, handleEvent: props.onPointerDown }}ref={(element) => {handle.layout = element;}}@@ -515,11 +598,48 @@ function BrowseSection(props: {function ExpandedBrowse() {const rail = useChannelsRail();const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();+ const [stackContent, setStackContent] = createSignal<HTMLDivElement>();+ const [scrollVersion, setScrollVersion] = createSignal(0);+ const [handlesVersion, setHandlesVersion] = createSignal(0);+ const [gestureSection, setGestureSection] = createSignal<ChannelSectionKey>();+ const [pendingScroll, setPendingScroll] = createSignal<{+ section: ChannelSectionKey;+ rowId: string;+ options: Parameters<ListScrollHandle['scrollToIndex']>[1];+ actorId: string | undefined;+ }>();+ const userId = useUserId();const scrollSize = createElementSize(scrollRoot);+ const stackSize = createElementSize(stackContent);+ const scrollOffsets = new Map<ChannelSectionKey, number>();const sections = createMemo(() =>groupChannelRailSections(rail.list.items.all()));const keys = createMemo(() => [...sections().keys()]);+ const rowSections = createMemo(() => {+ const lookup = new Map<string, ChannelSectionKey>();+ for (const [key, section] of sections()) {+ lookup.set(section.heading.id, key);+ for (const row of section.rows) lookup.set(row.id, key);+ }+ return lookup;+ });+ const maximumHeight = (key: ChannelSectionKey) => {+ const paneHeight = Math.min(+ CHANNEL_SECTION_MAX_HEIGHT,+ Math.max(CHANNEL_SECTION_MIN_HEIGHT, (scrollSize.height ?? 300) - 48)+ );++ if (key !== 'channels') {+ return paneHeight;+ }++ if (keys().at(-1) === key) {+ return Number.POSITIVE_INFINITY;+ }++ return Math.max(paneHeight, rail.sectionPreferences(key).height ?? 0);+ };const handles = new Map<ChannelSectionKey, SectionHandle>();const motion = createLayoutAnimation({viewport: scrollRoot,@@ -542,6 +662,57 @@ function ExpandedBrowse() {}});const [dragState, dragActions] = useDragDropContext() ?? [];+ const sidebarDragActive = () => {+ const scope = dragState?.active.draggable?.data.dndScope;+ return (+ scope === rail.railId ||+ scope === sectionReorder.scope ||+ scope === `${rail.railId}:favorites`+ );+ };+ const keepSections = createMemo(() => {+ if (sidebarDragActive()) return keys().map((_, index) => index);+ const retained = new Set([+ rowSections().get(rail.list.focus.key() ?? ''),+ gestureSection(),+ pendingScroll()?.section,+ ]);+ return keys().flatMap((key, index) => (retained.has(key) ? [index] : []));+ });+ let releaseFrame: number | undefined;+ const releaseGesture = () => {+ if (releaseFrame !== undefined) cancelAnimationFrame(releaseFrame);+ releaseFrame = requestAnimationFrame(() => setGestureSection(undefined));+ };+ window.addEventListener('pointerup', releaseGesture, true);+ window.addEventListener('pointercancel', releaseGesture, true);+ window.addEventListener('blur', releaseGesture);+ onCleanup(() => {+ window.removeEventListener('pointerup', releaseGesture, true);+ window.removeEventListener('pointercancel', releaseGesture, true);+ window.removeEventListener('blur', releaseGesture);+ if (releaseFrame !== undefined) cancelAnimationFrame(releaseFrame);+ });+ createEffect(+ on(+ userId,+ () => {+ scrollOffsets.clear();+ setPendingScroll(undefined);+ setGestureSection(undefined);+ },+ { defer: true }+ )+ );+ createEffect(+ on([sidebarDragActive, handlesVersion], () => {+ if (!sidebarDragActive()) return;+ const frame = requestAnimationFrame(() =>+ dragActions?.detectCollisions()+ );+ onCleanup(() => cancelAnimationFrame(frame));+ })+ );createDragAutoScroll({getViewport: () => {const scope = dragState?.active.draggable?.data.dndScope;@@ -559,6 +730,7 @@ function ExpandedBrowse() {// Wheel scrolling changes nested drop target positions during a drag too.const updateDropTarget = () => {+ setScrollVersion((version) => version + 1);if (dragState?.active.draggable) {dragActions?.detectCollisions();}@@ -574,11 +746,14 @@ function ExpandedBrowse() {createScrollTopFade(scrollRoot);+ const ready = () => setHandlesVersion((version) => version + 1);const register = (key: ChannelSectionKey, handle: SectionHandle) => {handles.set(key, handle);-return () => {if (handles.get(key) === handle) {+ if (handle.viewport && !handle.outerScroll) {+ scrollOffsets.set(key, handle.viewport.scrollTop);+ }handles.delete(key);}};@@ -588,45 +763,70 @@ function ExpandedBrowse() {rail.registerBrowseScrollHandle({scrollToIndex: (index, options) => {const row = rail.list.items.at(index);+ const section = row && rowSections().get(row.id);+ if (!row || !section) return;++ setPendingScroll({+ section,+ rowId: row.id,+ options,+ actorId: userId(),+ });+ },+ })+ );- if (!row) {- return;- }-- for (const [key, section] of sections()) {- const localIndex = section.rows.findIndex(- (item) => item.id === row.id+ createEffect(+ on([pendingScroll, handlesVersion], () => {+ const request = pendingScroll();+ if (!request) return;+ if (request.actorId !== userId()) {+ setPendingScroll(undefined);+ return;+ }+ const section = sections().get(request.section);+ const handle = handles.get(request.section);+ if (!section || !handle?.root) return;+ const localIndex = section.rows.findIndex(+ (row) => row.id === request.rowId+ );+ if (localIndex >= 0 && !handle.virtualizer) return;++ const frame = requestAnimationFrame(() => {+ if (pendingScroll() !== request) return;+ const currentIndex =+ sections()+ .get(request.section)+ ?.rows.findIndex((row) => row.id === request.rowId) ?? -1;+ const container = scrollRoot();+ const target = document.getElementById(+ domIdForRow(rail.railId, request.rowId)+ );+ if (container && target && (!handle.outerScroll || currentIndex < 0)) {+ const nextOffset =+ currentIndex >= 0+ ? handle.virtualizer?.getScrollOffsetForIndex(+ currentIndex,+ request.options+ )+ : undefined;+ const targetShift =+ nextOffset === undefined+ ? 0+ : (handle.viewport?.scrollTop ?? 0) - nextOffset;+ scrollChannelRailTargetIntoView(+ container,+ target,+ CHANNEL_SECTION_ROW_HEIGHT * 2,+ targetShift);-- if (section.heading.id !== row.id && localIndex < 0) {- continue;- }-- const handle = handles.get(key);-- if (!handle) {- return;- }-- if (localIndex >= 0) {- handle.virtualizer?.scrollToIndex(localIndex, options);- }-- const container = scrollRoot();- if (container && handle.root) {- const bounds = handle.root.getBoundingClientRect();- const viewport = container.getBoundingClientRect();-- if (bounds.top < viewport.top) {- container.scrollTop += bounds.top - viewport.top;- } else if (bounds.bottom > viewport.bottom) {- container.scrollTop += bounds.bottom - viewport.bottom;- }- }-- return;}- },+ if (currentIndex >= 0) {+ handle.virtualizer?.scrollToIndex(currentIndex, request.options);+ }+ setPendingScroll(undefined);+ });+ onCleanup(() => cancelAnimationFrame(frame));}));@@ -634,36 +834,82 @@ function ExpandedBrowse() {<div class="flex min-h-0 flex-1 flex-col"><divref={setScrollRoot}- class="scrollbar-hidden flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-(--sidebar-gutter) [&:has([data-resizing])]:[overflow-anchor:none]"+ class="scrollbar-hidden relative min-h-0 flex-1 overflow-y-auto px-(--sidebar-gutter) [&:has([data-resizing])]:[overflow-anchor:none]"on:scroll={{ capture: true, handleEvent: updateDropTarget }}>- <For each={keys()}>- {(key) => (- <Show when={sections().get(key)}>- {(section) => (- <BrowseSection- sectionKey={key}- section={section()}- maxHeight={Math.max(- CHANNEL_SECTION_MIN_HEIGHT,- (scrollSize.height ?? 300) - 48- )}- favoriteReorder={favoriteReorder}- sectionReorder={sectionReorder}- register={register}- />- )}- </Show>- )}- </For>+ <div ref={setStackContent}>+ <ChannelRailVirtualizer+ scrollRoot={scrollRoot()}+ keys={keys()}+ estimateSize={200}+ keepMounted={keepSections()}+ overscan={3}+ >+ {(key) => (+ <Show when={sections().get(key)}>+ {(section) => (+ <BrowseSection+ sectionKey={key}+ section={section()}+ maxHeight={maximumHeight(key)}+ outerScrollRoot={scrollRoot()}+ layoutVersion={stackSize.height ?? 0}+ sectionOrder={keys()}+ scrollVersion={scrollVersion()}+ savedScrollTop={scrollOffsets.get(key) ?? 0}+ onReady={ready}+ onPointerDown={() => setGestureSection(key)}+ favoriteReorder={favoriteReorder}+ sectionReorder={sectionReorder}+ register={register}+ />+ )}+ </Show>+ )}+ </ChannelRailVirtualizer>+ </div></div></div>);}function ExpandedSearchResults(props: { search: ChannelRailSearch }) {+ const rail = useChannelsRail();const [scrollRoot, setScrollRoot] = createSignal<HTMLDivElement>();- const pagination = useChannelRailVirtualizer(() => 'search');+ let virtualizer: ChannelRailVirtualizerHandle | undefined;+ let unregister: (() => void) | undefined;++ onCleanup(() => unregister?.());++ const channelsById = createMemo(+ () =>+ new Map(props.search.results().map((channel) => [channel.id, channel]))+ );++ const keepMounted = () => {+ const row = rail.list.focus.item();+ if (row?.kind !== 'conversation') return [];++ const index = props.search+ .results()+ .findIndex(({ id }) => id === row.channel.id);+ return index >= 0 ? [index] : [];+ };++ const loadMoreNearEnd = () => {+ const metrics = virtualizer?.scrollMetrics();+ const source = rail.sources.search;++ if (+ metrics &&+ metrics.size - metrics.offset - metrics.viewport < 300 &&+ source.hasMore() &&+ !source.isFetching() &&+ !source.error()+ ) {+ fireAndForget(source.loadMore(), 'channels-view');+ }+ };createScrollTopFade(scrollRoot);@@ -680,15 +926,26 @@ function ExpandedSearchResults(props: { search: ChannelRailSearch }) {<Show when={props.search.error()}><RailListError retry={props.search.retry} /></Show>- <Virtualizer- ref={pagination.registerVirtualizer}- data={props.search.results()}- scrollRef={scrollRoot()}- itemSize={CHANNEL_SECTION_ROW_HEIGHT}- onScroll={pagination.loadMoreNearEnd}+ <ChannelRailVirtualizer+ ref={(current) => {+ unregister?.();+ unregister = undefined;+ virtualizer = current;+ if (current) unregister = rail.registerVirtualizer('search', current);+ }}+ keys={[...channelsById().keys()]}+ scrollRoot={scrollRoot()}+ scrollPadding={CHANNEL_SECTION_ROW_HEIGHT * 2}+ estimateSize={CHANNEL_SECTION_ROW_HEIGHT}+ keepMounted={keepMounted()}+ onRangeChange={loadMoreNearEnd}>- {(channel) => <ChannelOption channel={channel} />}- </Virtualizer>+ {(id) => (+ <Show when={channelsById().get(id)}>+ {(channel) => <ChannelOption channel={channel()} />}+ </Show>+ )}+ </ChannelRailVirtualizer><Showwhen={!props.search.isLoading() &&diff --git a/apps/web/src/features/channels-view/components/rail/next/ResizableRailSection.tsx b/apps/web/src/features/channels-view/components/rail/next/ResizableRailSection.tsxindex 7e5330870f..365f295d79 100644--- a/apps/web/src/features/channels-view/components/rail/next/ResizableRailSection.tsx+++ b/apps/web/src/features/channels-view/components/rail/next/ResizableRailSection.tsx@@ -4,7 +4,6 @@ import { createElementSize } from '@solid-primitives/resize-observer';import { cn, Tooltip } from '@ui';import { createMemo, createSignal, type JSX, onCleanup, Show } from 'solid-js';import {- CHANNEL_SECTION_MAX_HEIGHT,CHANNEL_SECTION_MIN_HEIGHT,CHANNEL_SECTION_MIN_ITEMS,CHANNEL_SECTION_ROW_HEIGHT,@@ -22,6 +21,7 @@ export function ResizableRailSection(props: {itemCount: number;dropEdge?: 'top' | 'bottom';dragging?: boolean;+ onResizingChange?: (resizing: boolean) => void;header: JSX.Element;children: JSX.Element;rootRef: (element: HTMLDivElement) => void;@@ -37,7 +37,6 @@ export function ResizableRailSection(props: {const maximum = () =>Math.min(- CHANNEL_SECTION_MAX_HEIGHT,props.maxHeight,contentSize.height && contentSize.height > 0? contentSize.height@@ -114,18 +113,24 @@ export function ResizableRailSection(props: {}setPreview(undefined);+ props.onResizingChange?.(false);};return (<divref={props.rootRef}class={cn(- '@container/rail-section group/rail-section relative min-w-0 shrink-0',- props.dragging &&- 'rounded-lg bg-surface opacity-40 ring-1 ring-edge-muted'+ '@container/rail-section group/rail-section relative isolate min-w-0 shrink-0',+ props.dragging && 'opacity-40')}data-resizing={preview() !== undefined ? '' : undefined}>+ <Show when={props.dragging}>+ <div+ aria-hidden="true"+ class="pointer-events-none absolute inset-y-0 -left-(--sidebar-gutter) right-0 -z-10 rounded-lg bg-surface ring-1 ring-edge-muted"+ />+ </Show><Show when={props.dropEdge}>{(edge) => (<div@@ -156,6 +161,7 @@ export function ResizableRailSection(props: {onCleanup(() => {drag = undefined;setPreview(undefined);+ props.onResizingChange?.(false);});return (@@ -191,6 +197,7 @@ export function ResizableRailSection(props: {handle: event.currentTarget,};setPreview(element.offsetHeight);+ props.onResizingChange?.(true);event.currentTarget.setPointerCapture(event.pointerId);}}onPointerMove={(event) => {diff --git a/apps/web/src/features/channels-view/components/rail/next/build-channel-rail-rows.ts b/apps/web/src/features/channels-view/components/rail/next/build-channel-rail-rows.tsindex 2d39f40cee..e07f8007b8 100644--- a/apps/web/src/features/channels-view/components/rail/next/build-channel-rail-rows.ts+++ b/apps/web/src/features/channels-view/components/rail/next/build-channel-rail-rows.ts@@ -272,24 +272,8 @@ export function buildChannelRailRows(});}- const labelledIds = new Set(- channelSectionRows.flatMap((row) =>- row.kind === 'conversation' && row.labelId ? [row.channel.id] : []- )- );- // Membership still hides channels when their section is collapsed.- for (const row of channelSectionRows) {- if (row.kind === 'label') {- for (const id of row.label.channelIds) {- labelledIds.add(id);- }- }- }-for (const group of ['team_channels', 'channels'] as const) {- const channels = items[group].filter(- (channel) => group === 'team_channels' || !labelledIds.has(channel.id)- );+ const channels = items[group];if (group === 'channels' && channels.length === 0) {continue;diff --git a/apps/web/src/features/channels-view/components/rail/next/useSectionReorder.ts b/apps/web/src/features/channels-view/components/rail/next/useSectionReorder.tsindex 2c718e7d2c..c55c68c01c 100644--- a/apps/web/src/features/channels-view/components/rail/next/useSectionReorder.ts+++ b/apps/web/src/features/channels-view/components/rail/next/useSectionReorder.ts@@ -95,5 +95,9 @@ export function useSectionReorder(state?.active.draggable?.data.dndScope === scope &&state.active.draggable.data.section === key;- return { scope, dropEdge, move, isDragging };+ const cancel = () => {+ dragAccount = undefined;+ };++ return { scope, dropEdge, move, isDragging, cancel };}diff --git a/apps/web/src/features/channels-view/constants.ts b/apps/web/src/features/channels-view/constants.tsindex cceb876cd0..70ee735b47 100644--- a/apps/web/src/features/channels-view/constants.ts+++ b/apps/web/src/features/channels-view/constants.ts@@ -13,12 +13,7 @@ export const CHANNEL_SECTION_MAX_HEIGHT = 800;export function clampChannelSectionHeight(height: number): number {if (!Number.isFinite(height)) return CHANNEL_SECTION_MAX_HEIGHT;- return Math.round(- Math.min(- CHANNEL_SECTION_MAX_HEIGHT,- Math.max(CHANNEL_SECTION_MIN_HEIGHT, height)- )- );+ return Math.round(Math.max(CHANNEL_SECTION_MIN_HEIGHT, height));}export const CHANNELS_DEFAULT_SORT_BY = {diff --git a/apps/web/src/features/channels-view/core/smart-tags.test.ts b/apps/web/src/features/channels-view/core/smart-tags.test.tsindex 3eae8dbbde..aeef970747 100644--- a/apps/web/src/features/channels-view/core/smart-tags.test.ts+++ b/apps/web/src/features/channels-view/core/smart-tags.test.ts@@ -131,6 +131,27 @@ describe('smart tag matching', () => {expect(result[0].channelCount).toBe(2);});+ it('matches current-team channels before the shared membership snapshot refreshes', () => {+ const result = resolveChannelLabelMemberships(+ [{ ...label('shared', ['unknown-team']), teamId: 'team' }],+ [+ { ...channel('new', 'SUPPORT queue'), teamId: 'team' },+ { ...channel('renamed', 'Support'), teamId: 'team' },+ { ...channel('other-team', 'Support'), teamId: 'other-team' },+ {+ ...channel('unjoined', 'Support'),+ teamId: 'team',+ isParticipant: false,+ },+ channel('unknown-team', 'Support'),+ channel('unconfirmed', 'Support'),+ ]+ );++ expect(result[0].channelIds).toEqual(['new', 'renamed', 'unknown-team']);+ expect(result[0].channelCount).toBe(3);+ });+it('matches private channels in personal sections without adding them to shared sections', () => {const result = resolveChannelLabelMemberships([label('personal', []), { ...label('shared', []), teamId: 'team' }],diff --git a/apps/web/src/features/channels-view/core/smart-tags.ts b/apps/web/src/features/channels-view/core/smart-tags.tsindex 6d81cf5bfe..0abdb1d30b 100644--- a/apps/web/src/features/channels-view/core/smart-tags.ts+++ b/apps/web/src/features/channels-view/core/smart-tags.ts@@ -41,18 +41,32 @@ export function resolveChannelLabelMemberships((label.channelIds.length - channelIds.length),};}- // Channel entities have no team ID. Shared-label matches must come from- // the server so a matching name cannot add another team's channel.+ // Known team IDs allow live matches before the membership snapshot refreshes.+ // Keep server authorization as the baseline when team metadata is missing.const serverIds = new Set(label.channelIds);const channelIds = [...new Set([...label.channelIds.filter((id) => !loadedIds.has(id)),...channels- .filter(- (channel) =>- (!label.teamId || serverIds.has(channel.id)) &&- channelMatchesSmartTag(channel, rule, label)- )+ .filter((channel) => {+ if (!channelMatchesSmartTag(channel, rule, label)) {+ return false;+ }++ if (!label.teamId) {+ return true;+ }++ if (channel.isParticipant === false) {+ return false;+ }++ if (channel.teamId) {+ return channel.teamId === label.teamId;+ }++ return serverIds.has(channel.id);+ }).map((channel) => channel.id),]),];diff --git a/apps/web/src/features/notifications/SnoozeNotificationsDialog.tsx b/apps/web/src/features/notifications/SnoozeNotificationsDialog.tsxindex 0772c718d6..b4322ffd03 100644--- a/apps/web/src/features/notifications/SnoozeNotificationsDialog.tsx+++ b/apps/web/src/features/notifications/SnoozeNotificationsDialog.tsx@@ -1,8 +1,9 @@import { toast } from '@core/component/Toast/Toast';+import { useUserId } from '@core/context/user';import { useDateSearch } from '@core/util/dateSearch/useDateSearch';import { fireAndForget } from '@core/util/fireAndForget';import { Telemetry } from '@macro-inc/observability';-import { useMuteItemMutation } from '@queries/notification/unsubscribes';+import { useBulkNotificationPreferencesMutation } from '@queries/notification/unsubscribes';import type { UserUnsubscribe } from '@service-notification/generated/schemas/userUnsubscribe';import {type ManagedDialogProps,@@ -21,7 +22,9 @@ import { createSnoozeController } from './primitives/create-snooze-controller';function SnoozeNotificationsDialog(props: ManagedDialogProps & { items: UserUnsubscribe[] }) {- const mutation = useMuteItemMutation();+ const userId = useUserId();+ const actorId = userId();+ const mutation = useBulkNotificationPreferencesMutation();const [query, setQuery] = createSignal('');const dates = useDateSearch({ query, defaultTime: { hours: 9, minutes: 0 } });const options = (): SnoozeOption[] => {@@ -50,9 +53,20 @@ function SnoozeNotificationsDialog(};const controller = createSnoozeController({items: props.items,- saveItem: (item, until) =>- mutation.mutateAsync({ ...item, snoozed_until: until }),+ saveItems: async (items, until) => {+ if (!actorId || actorId !== userId()) {+ return [...items];+ }+ const result = await mutation.mutateAsync({+ actorId,+ items,+ muted: true,+ snoozedUntil: until,+ });+ return result.failed;+ },onSaved: (until, count) => {+ if (actorId !== userId()) return;props.onOpenChange(false);toast.success(`Snoozed ${count} ${count === 1 ? 'item' : 'items'} until ${formatSnoozeDeadline(until)}`diff --git a/apps/web/src/features/notifications/primitives/create-snooze-controller.ts b/apps/web/src/features/notifications/primitives/create-snooze-controller.tsindex afa978d46b..5d9b8ab6e4 100644--- a/apps/web/src/features/notifications/primitives/create-snooze-controller.ts+++ b/apps/web/src/features/notifications/primitives/create-snooze-controller.ts@@ -1,9 +1,13 @@+import { catchToResult } from '@core/util/result';import { createSignal } from 'solid-js';/** Keep failures in the picker so a rejected write can be retried. */export function createSnoozeController<Item>(options: {items: readonly Item[];- saveItem: (item: Item, until: string) => Promise<void>;+ saveItems: (+ items: readonly Item[],+ until: string+ ) => Promise<readonly Item[]>;onSaved: (until: string, count: number) => void;now?: () => number;}) {@@ -24,12 +28,12 @@ export function createSnoozeController<Item>(options: {setError(undefined);const deadline = until.toISOString();const items = remainingItems();- const results = await Promise.allSettled(- items.map(async (item) => options.saveItem(item, deadline))- );- setRemainingItems(- items.filter((_, index) => results[index].status === 'rejected')+ const result = await catchToResult(() =>+ options.saveItems(items, deadline));+ if (result.isOk()) {+ setRemainingItems(result.value);+ }setPending(false);if (remainingCount()) {const saved = options.items.length - remainingCount();diff --git a/apps/web/src/features/notifications/tests/snooze-controller.test.ts b/apps/web/src/features/notifications/tests/snooze-controller.test.tsindex 90d504a118..4aff876da5 100644--- a/apps/web/src/features/notifications/tests/snooze-controller.test.ts+++ b/apps/web/src/features/notifications/tests/snooze-controller.test.ts@@ -8,7 +8,7 @@ describe('snoozing notifications', () => {const controller = createRoot(() =>createSnoozeController({items: ['one'],- saveItem: save,+ saveItems: save,onSaved: vi.fn(),now: () => 1000,})@@ -23,12 +23,12 @@ describe('snoozing notifications', () => {const save = vi.fn().mockRejectedValueOnce(new Error('offline'))- .mockResolvedValueOnce(undefined);+ .mockResolvedValueOnce([]);const onSaved = vi.fn();const controller = createRoot(() =>createSnoozeController({items: ['one'],- saveItem: save,+ saveItems: save,onSaved,now: () => 0,})@@ -43,17 +43,17 @@ describe('snoozing notifications', () => {});it('ignores repeated submissions while a write is pending', async () => {- let finish!: () => void;+ let finish!: (failed: readonly string[]) => void;const save = vi.fn(() =>- new Promise<void>((resolve) => {+ new Promise<readonly string[]>((resolve) => {finish = resolve;}));const controller = createRoot(() =>createSnoozeController({items: ['one'],- saveItem: save,+ saveItems: save,onSaved: vi.fn(),now: () => 0,})@@ -61,24 +61,29 @@ describe('snoozing notifications', () => {const first = controller.submit(new Date(1000));await controller.submit(new Date(2000));expect(save).toHaveBeenCalledTimes(1);- finish();+ finish([]);await first;expect(controller.pending()).toBe(false);});it('reports partial success and retries only unsaved items at the new deadline', async () => {const saved = new Map<string, string>();- const saveItem = vi.fn(async (item: string, until: string) => {- if (item === 'two' && until === '1970-01-01T00:00:01.000Z') {- throw new Error('offline');+ const saveItems = vi.fn(async (items: readonly string[], until: string) => {+ const failed: string[] = [];+ for (const item of items) {+ if (item === 'two' && until === '1970-01-01T00:00:01.000Z') {+ failed.push(item);+ } else {+ saved.set(item, until);+ }}- saved.set(item, until);+ return failed;});const onSaved = vi.fn();const controller = createRoot(() =>createSnoozeController({items: ['one', 'two'],- saveItem,+ saveItems,onSaved,now: () => 0,})@@ -92,13 +97,17 @@ describe('snoozing notifications', () => {expect(saved.size).toBe(1);await controller.submit(new Date(2000));- expect(saveItem).toHaveBeenCalledTimes(3);+ expect(saveItems).toHaveBeenCalledTimes(2);+ expect(saveItems).toHaveBeenLastCalledWith(+ ['two'],+ '1970-01-01T00:00:02.000Z'+ );expect(saved.get('one')).toBe('1970-01-01T00:00:01.000Z');expect(saved.get('two')).toBe('1970-01-01T00:00:02.000Z');expect(controller.error()).toBeUndefined();expect(controller.remainingCount()).toBe(0);expect(onSaved).toHaveBeenCalledWith('1970-01-01T00:00:02.000Z', 1);await controller.submit(new Date(3000));- expect(saveItem).toHaveBeenCalledTimes(3);+ expect(saveItems).toHaveBeenCalledTimes(2);});});diff --git a/apps/web/src/features/settings/SnoozeMobileDialog.test.tsx b/apps/web/src/features/settings/SnoozeMobileDialog.test.tsxindex dff2945a3c..b974abd9fc 100644--- a/apps/web/src/features/settings/SnoozeMobileDialog.test.tsx+++ b/apps/web/src/features/settings/SnoozeMobileDialog.test.tsx@@ -12,11 +12,14 @@ import { ImperativeDialogHost } from '@ui/components/ImperativeDialog';import { createSignal, getOwner } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-const save = vi.hoisted(() => vi.fn(async () => {}));+const save = vi.hoisted(() => vi.fn(async () => ({ failed: [] })));vi.mock('@core/mobile/isMobile', () => ({ isMobile: () => true }));vi.mock('@core/mobile/virtualKeyboard', () => ({virtualKeyboardVisible: () => false,}));+vi.mock('@core/context/user', () => ({+ useUserId: () => () => 'macro|[email protected]',+}));vi.mock('@core/component/Toast/Toast', () => ({toast: { success: vi.fn() },}));@@ -24,7 +27,7 @@ vi.mock('@core/util/dateSearch/useDateSearch', () => ({useDateSearch: () => () => [],}));vi.mock('@queries/notification/unsubscribes', () => ({- useMuteItemMutation: () => ({ mutateAsync: save }),+ useBulkNotificationPreferencesMutation: () => ({ mutateAsync: save }),}));beforeEach(() => {diff --git a/apps/web/src/lib/i18n/locales/en/channel-sections.ts b/apps/web/src/lib/i18n/locales/en/channel-sections.tsindex 3aade5c8bd..546a953665 100644--- a/apps/web/src/lib/i18n/locales/en/channel-sections.ts+++ b/apps/web/src/lib/i18n/locales/en/channel-sections.ts@@ -36,7 +36,7 @@ export default {markLabelReadFailed: 'Failed to mark channel label as read',muteAllChannels: 'Mute all channels',unmuteAllChannels: 'Unmute all channels',- snoozeAllChannels: 'Snooze all channels…',+ snoozeAllChannels: 'Snooze all channels',notificationsFailed:'Could not update section notifications. Please try again.',deleteForEveryone: 'Delete for everyone',@@ -49,7 +49,7 @@ export default {resizeSection: 'Resize {{name}}',resizeSectionHint: 'Drag to resize. Double-click to reset.',reorderSection: 'Reorder {{name}}',- reorderSectionHint: 'Drag to reorder. Use arrow keys to move up or down.',+ reorderSectionHint: 'Drag to reorder.',expandAllSections: 'Expand all sections',collapseAllSections: 'Collapse all sections',loading: 'Loading sections…',diff --git a/apps/web/src/lib/queries/channel-labels/channel-labels.test.tsx b/apps/web/src/lib/queries/channel-labels/channel-labels.test.tsxindex 66eac22a98..2d991e22e2 100644--- a/apps/web/src/lib/queries/channel-labels/channel-labels.test.tsx+++ b/apps/web/src/lib/queries/channel-labels/channel-labels.test.tsx@@ -3,7 +3,11 @@ import type { ChannelLabelScopeSelection } from '@service-storage/generated/scheimport type { ChannelLabelsList } from '@service-storage/generated/schemas/channelLabelsList';import type { SmartTagPreview } from '@service-storage/generated/schemas/smartTagPreview';import { cleanup, render, waitFor } from '@solidjs/testing-library';-import { type QueryClient, QueryClientProvider } from '@tanstack/solid-query';+import {+ focusManager,+ type QueryClient,+ QueryClientProvider,+} from '@tanstack/solid-query';import { type Ok, ok } from 'neverthrow';import { createSignal } from 'solid-js';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';@@ -80,6 +84,7 @@ beforeEach(() => {afterEach(() => {cleanup();client.clear();+ focusManager.setFocused(undefined);});describe('channel tag query rollout', () => {@@ -163,6 +168,65 @@ describe('channel tag query rollout', () => {).toEqual(labels);});+ it('inherits bounded retries for transient section failures and retains cached labels', async () => {+ mocks.enabled = () => true;+ client.setDefaultOptions({ queries: { retry: 1, retryDelay: 0 } });+ client.setQueryData(+ channelLabelKeys.list('personal', 'viewer').queryKey,+ labels+ );+ mocks.list.mockRejectedValueOnce(new Error('Network unavailable'));+ mocks.list.mockResolvedValueOnce(ok(labels));+ let data!: ReturnType<typeof useChannelLabelsData>;+ let query!: ReturnType<typeof useChannelLabelsQuery>;+ const Probe = () => {+ data = useChannelLabelsData('personal');+ query = useChannelLabelsQuery('personal');+ return null;+ };+ render(() => (+ <QueryClientProvider client={client}>+ <Probe />+ </QueryClientProvider>+ ));++ expect(data()).toEqual(labels.labels);+ await client.invalidateQueries({+ queryKey: channelLabelKeys.list('personal', 'viewer').queryKey,+ });++ expect(mocks.list).toHaveBeenCalledTimes(2);+ expect(query.isError).toBe(false);+ expect(data()).toEqual(labels.labels);+ });++ it('recovers an initial section failure when the app regains focus', async () => {+ mocks.enabled = () => true;+ client.setDefaultOptions({+ queries: { retry: false, refetchOnWindowFocus: false },+ });+ mocks.list.mockRejectedValueOnce(new Error('Network unavailable'));+ mocks.list.mockResolvedValueOnce(ok(labels));+ let query!: ReturnType<typeof useChannelLabelsQuery>;+ const Probe = () => {+ query = useChannelLabelsQuery('personal');+ return null;+ };+ render(() => (+ <QueryClientProvider client={client}>+ <Probe />+ </QueryClientProvider>+ ));+ await waitFor(() => expect(query.isError).toBe(true));++ focusManager.setFocused(false);+ focusManager.setFocused(true);++ await waitFor(() => expect(query.isSuccess).toBe(true));+ expect(query.data?.labels).toEqual(labels.labels);+ expect(mocks.list).toHaveBeenCalledTimes(2);+ });+it('keeps personal and team list caches independent', async () => {mocks.enabled = () => true;const Probe = () => {diff --git a/apps/web/src/lib/queries/channel-labels/channel-labels.ts b/apps/web/src/lib/queries/channel-labels/channel-labels.tsindex 0a629e3b8f..88084082d5 100644--- a/apps/web/src/lib/queries/channel-labels/channel-labels.ts+++ b/apps/web/src/lib/queries/channel-labels/channel-labels.ts@@ -29,9 +29,10 @@ function channelLabelsQueryOptions(queryFn: () =>throwOnErr(() => storageServiceClient.channelLabels.list(scope)),staleTime: 30_000,+ refetchOnWindowFocus: true,refetchInterval: (query) =>query.state.data?.labels.some((label) => label.rule) ? 30_000 : false,- retry: false,+ reconcile: 'id',});}diff --git a/apps/web/src/lib/queries/notification/tests/unsubscribes.test.tsx b/apps/web/src/lib/queries/notification/tests/unsubscribes.test.tsxindex 072b402dae..982baf743b 100644--- a/apps/web/src/lib/queries/notification/tests/unsubscribes.test.tsx+++ b/apps/web/src/lib/queries/notification/tests/unsubscribes.test.tsx@@ -4,20 +4,25 @@ import {onlineManager,QueryClientProvider,} from '@tanstack/solid-query';-import { ok } from 'neverthrow';-import { afterEach, describe, expect, it, vi } from 'vitest';+import { err, ok } from 'neverthrow';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { queryClient } from '../../client';import { notificationKeys } from '../keys';import {+ useBulkNotificationPreferencesMutation,useMutedEntitiesQuery,useMuteItemMutation,useUnmuteItemMutation,} from '../unsubscribes';+const user = vi.hoisted(() => ({ id: 'viewer' }));+vi.mock('@core/context/user', () => ({ useUserId: () => () => user.id }));const client = vi.hoisted(() => ({unsubscribeItem: vi.fn(),removeUnsubscribeItem: vi.fn(),getUnsubscribes: vi.fn(),+ unsubscribeItems: vi.fn(),+ removeUnsubscribeItems: vi.fn(),}));vi.mock('@service-notification/client', () => ({notificationServiceClient: client,@@ -38,9 +43,11 @@ const key = notificationKeys.unsubscribes.queryKey;function setup() {let mute!: ReturnType<typeof useMuteItemMutation>;let unmute!: ReturnType<typeof useUnmuteItemMutation>;+ let bulk!: ReturnType<typeof useBulkNotificationPreferencesMutation>;function Test() {mute = useMuteItemMutation();unmute = useUnmuteItemMutation();+ bulk = useBulkNotificationPreferencesMutation();return null;}render(() => (@@ -49,9 +56,14 @@ function setup() {</QueryClientProvider>));queryClient.setQueryData(key, [original]);- return { mute, unmute };+ return { mute, unmute, bulk };}+beforeEach(() => {+ user.id = 'viewer';+ client.unsubscribeItems.mockReset().mockResolvedValue(ok({}));+ client.removeUnsubscribeItems.mockReset().mockResolvedValue(ok({}));+});afterEach(() => {cleanup();queryClient.clear();@@ -167,3 +179,112 @@ describe('offline mute writes', () => {});});++describe('bulk notification preferences', () => {+ it('sends one snooze request and updates the cache once after confirmation', async () => {+ const { bulk } = setup();+ const write = vi.spyOn(queryClient, 'setQueryData');+ const until = '2030-10-01T09:00:00.000Z';+ const items = [item, { item_type: 'channel', item_id: 'two' }];+ const result = await bulk.mutateAsync({+ actorId: 'viewer',+ items,+ muted: true,+ snoozedUntil: until,+ });++ expect(client.unsubscribeItems).toHaveBeenCalledExactlyOnceWith(+ items,+ until+ );+ expect(write).toHaveBeenCalledOnce();+ expect(result.failed).toEqual([]);+ expect(queryClient.getQueryData(key)).toEqual(+ items.map((entry) => ({+ ...entry,+ snoozed_until: until,+ }))+ );+ write.mockRestore();+ });++ it('keeps confirmed chunks and returns only the failed chunk for retry', async () => {+ const { bulk } = setup();+ const items = Array.from({ length: 501 }, (_, index) => ({+ item_type: 'channel',+ item_id: `channel-${index}`,+ }));+ client.unsubscribeItems.mockResolvedValueOnce(ok({}));+ client.unsubscribeItems.mockResolvedValueOnce(+ err([{ message: 'Offline', code: 'FETCH_ERROR' }])+ );+ const result = await bulk.mutateAsync({+ actorId: 'viewer',+ items,+ muted: true,+ });++ expect(client.unsubscribeItems).toHaveBeenCalledTimes(2);+ expect(+ client.unsubscribeItems.mock.calls.map(([batch]) => batch.length)+ ).toEqual([500, 1]);+ expect(result.succeeded).toHaveLength(500);+ expect(result.failed).toEqual([items[500]]);+ expect(queryClient.getQueryData(key)).toEqual([+ original,+ ...items+ .slice(0, 500)+ .map((entry) => ({ ...entry, snoozed_until: null })),+ ]);+ });++ it('preserves unrelated preferences added while a bulk request is pending', async () => {+ const { bulk } = setup();+ let finish!: (result: unknown) => void;+ client.removeUnsubscribeItems.mockImplementationOnce(+ () =>+ new Promise((resolve) => {+ finish = resolve;+ })+ );+ const pending = bulk.mutateAsync({+ actorId: 'viewer',+ items: [item],+ muted: false,+ });+ await waitFor(() =>+ expect(client.removeUnsubscribeItems).toHaveBeenCalledOnce()+ );+ const unrelated = { item_id: 'unrelated', item_type: 'channel' };+ queryClient.setQueryData(key, [original, unrelated]);+ finish(ok({}));+ await pending;++ expect(queryClient.getQueryData(key)).toEqual([unrelated]);+ });++ it('stops later chunks and ignores late cache updates after an account change', async () => {+ const { bulk } = setup();+ const items = Array.from({ length: 501 }, (_, index) => ({+ item_type: 'channel',+ item_id: `channel-${index}`,+ }));+ let finish!: (result: unknown) => void;+ client.unsubscribeItems.mockImplementationOnce(+ () =>+ new Promise((resolve) => {+ finish = resolve;+ })+ );+ const pending = bulk.mutateAsync({ actorId: 'viewer', items, muted: true });+ await waitFor(() => expect(client.unsubscribeItems).toHaveBeenCalledOnce());+ user.id = 'another-viewer';+ const current = [{ item_id: 'current', item_type: 'channel' }];+ queryClient.setQueryData(key, current);+ finish(ok({}));+ await pending;++ expect(client.unsubscribeItems).toHaveBeenCalledOnce();+ expect(queryClient.getQueryData(key)).toEqual(current);+ });+});diff --git a/apps/web/src/lib/queries/notification/unsubscribes.ts b/apps/web/src/lib/queries/notification/unsubscribes.tsindex 1a22154d98..62b4024b70 100644--- a/apps/web/src/lib/queries/notification/unsubscribes.ts+++ b/apps/web/src/lib/queries/notification/unsubscribes.ts@@ -1,5 +1,6 @@+import { useUserId } from '@core/context/user';import { fireAndForget } from '@core/util/fireAndForget';-import { throwOnErr } from '@core/util/result';+import { catchToResult, throwOnErr } from '@core/util/result';import { notificationServiceClient } from '@service-notification/client';import type { UserUnsubscribe } from '@service-notification/generated/schemas/userUnsubscribe';import { useMutation, useQuery } from '@tanstack/solid-query';@@ -7,16 +8,19 @@ import type { Accessor } from 'solid-js';import { queryClient } from '../client';import { notificationKeys } from './keys';+function muteItemKey(item: UserUnsubscribe): string {+ let type = item.item_type;+ if (type === 'email' || type === 'thread') {+ type = 'email_thread';+ } else if (type === 'foreign') {+ type = 'foreign_entity';+ }++ return `${type}:${item.item_id}`;+}+function sameMuteItem(left: UserUnsubscribe, right: UserUnsubscribe): boolean {- const normalize = (type: string) => {- if (type === 'email') return 'email_thread';- if (type === 'foreign') return 'foreign_entity';- return type;- };- return (- left.item_id === right.item_id &&- normalize(left.item_type) === normalize(right.item_type)- );+ return muteItemKey(left) === muteItemKey(right);}async function fetchUnsubscribes() {@@ -56,6 +60,11 @@ function invalidateUnsubscribes() {const MUTE_ITEM_MUTATION_KEY = ['notification', 'mute-item'] as const;const UNMUTE_ITEM_MUTATION_KEY = ['notification', 'unmute-item'] as const;+const BULK_PREFERENCE_MUTATION_KEY = [+ 'notification',+ 'bulk-preferences',+] as const;+const BULK_PREFERENCE_LIMIT = 500;// A paused mutation lives only in memory and replays in parallel on reconnect,// so an offline mute must fail and roll back instead of waiting.const MUTE_NETWORK_MODE = 'always';@@ -92,7 +101,8 @@ function removeUnsubscribe(item: UserUnsubscribe) {function invalidateUnsubscribesWhenIdle() {const pending =queryClient.isMutating({ mutationKey: MUTE_ITEM_MUTATION_KEY }) +- queryClient.isMutating({ mutationKey: UNMUTE_ITEM_MUTATION_KEY });+ queryClient.isMutating({ mutationKey: UNMUTE_ITEM_MUTATION_KEY }) ++ queryClient.isMutating({ mutationKey: BULK_PREFERENCE_MUTATION_KEY });if (pending > 1) return;return invalidateUnsubscribes();}@@ -159,3 +169,93 @@ export function useUnmuteItemMutation() {},}));}++export type BulkNotificationPreferenceArgs = {+ actorId: string;+ items: readonly UserUnsubscribe[];+ muted: boolean;+ snoozedUntil?: string;+};++/** Confirm bulk writes before updating the cache once; retain failed items for retry. */+export function useBulkNotificationPreferencesMutation() {+ const userId = useUserId();+ return useMutation(() => ({+ mutationKey: BULK_PREFERENCE_MUTATION_KEY,+ networkMode: MUTE_NETWORK_MODE,+ mutationFn: async (args: BulkNotificationPreferenceArgs) => {+ if (args.actorId !== userId())+ throw new Error('The account has changed.');++ const items = [+ ...new Map(+ args.items.map((item) => [muteItemKey(item), item])+ ).values(),+ ];+ const succeeded: UserUnsubscribe[] = [];+ const failed: UserUnsubscribe[] = [];++ for (+ let offset = 0;+ offset < items.length;+ offset += BULK_PREFERENCE_LIMIT+ ) {+ if (args.actorId !== userId()) {+ failed.push(...items.slice(offset));+ break;+ }++ const batch = items.slice(offset, offset + BULK_PREFERENCE_LIMIT);+ const result = await catchToResult(() =>+ throwOnErr(() =>+ args.muted+ ? notificationServiceClient.unsubscribeItems(+ batch,+ args.snoozedUntil+ )+ : notificationServiceClient.removeUnsubscribeItems(batch)+ )+ );++ if (result.isErr()) {+ failed.push(...batch);+ } else {+ succeeded.push(...batch);+ }+ }++ return { succeeded, failed };+ },+ onMutate: async () => {+ await cancelUnsubscribesFetch();+ },+ onSuccess: async (result, args) => {+ if (args.actorId !== userId() || result.succeeded.length === 0) return;+ await cancelUnsubscribesFetch();+ if (args.actorId !== userId()) return;++ const keys = new Set(result.succeeded.map(muteItemKey));+ updateUnsubscribes((previous) => {+ const retained = previous.filter(+ (item) => !keys.has(muteItemKey(item))+ );+ if (!args.muted) return retained;++ return retained.concat(+ result.succeeded.map((item) => ({+ ...item,+ snoozed_until: args.snoozedUntil ?? null,+ }))+ );+ });+ },+ onSettled: (_data, _error, args) => {+ if (args.actorId === userId()) {+ fireAndForget(+ invalidateUnsubscribesWhenIdle(),+ 'notification-unsubscribes'+ );+ }+ },+ }));+}diff --git a/apps/web/src/lib/service-clients/service-notification/client.test.ts b/apps/web/src/lib/service-clients/service-notification/client.test.tsindex d79f83969c..5f03ae85a8 100644--- a/apps/web/src/lib/service-clients/service-notification/client.test.ts+++ b/apps/web/src/lib/service-clients/service-notification/client.test.ts@@ -45,3 +45,58 @@ describe('notification list state query parameters', () => {});});});++describe('bulk notification preferences', () => {+ it.each(['unsubscribeItems', 'removeUnsubscribeItems'] as const)(+ '%s returns a typed error without sending a partially valid batch',+ async (method) => {+ const result = await notificationServiceClient[method]([+ { item_id: 'valid', item_type: 'channel' },+ { item_id: 'invalid', item_type: 'unsupported' },+ ]);++ expect(result.isErr()).toBe(true);+ if (result.isErr()) {+ expect(result.error).toEqual([+ {+ code: 'INVALID_ITEM_TYPE',+ message: 'Unsupported notification item type.',+ arg: 'item_type',+ },+ ]);+ }+ expect(fetchMock).not.toHaveBeenCalled();+ }+ );++ it.each([+ ['unsubscribeItems', 'POST'],+ ['removeUnsubscribeItems', 'DELETE'],+ ] as const)(+ '%s preserves supported types and normalizes aliases',+ async (method, httpMethod) => {+ const result = await notificationServiceClient[method]([+ { item_id: 'channel', item_type: 'channel' },+ { item_id: 'email', item_type: 'email' },+ { item_id: 'thread', item_type: 'thread' },+ { item_id: 'foreign', item_type: 'foreign' },+ ]);++ expect(result.isOk()).toBe(true);+ expect(fetchMock).toHaveBeenCalledWith(+ 'http://localhost/notifications/unsubscribe/items',+ {+ method: httpMethod,+ body: JSON.stringify({+ items: [+ { item_id: 'channel', item_type: 'channel' },+ { item_id: 'email', item_type: 'email_thread' },+ { item_id: 'thread', item_type: 'email_thread' },+ { item_id: 'foreign', item_type: 'foreign_entity' },+ ],+ }),+ }+ );+ }+ );+});diff --git a/apps/web/src/lib/service-clients/service-notification/client.ts b/apps/web/src/lib/service-clients/service-notification/client.tsindex 301522b8c2..db7f8503e8 100644--- a/apps/web/src/lib/service-clients/service-notification/client.ts+++ b/apps/web/src/lib/service-clients/service-notification/client.ts@@ -5,15 +5,19 @@ import {} from '@core/util/fetchWithToken';import type { ObjectLike, ResultError } from '@core/util/result';import type { SafeFetchInit } from '@core/util/safeFetch';-import type { Result } from 'neverthrow';+import { err, ok, type Result } from 'neverthrow';import { z } from 'zod';import type {BulkGetByEventItemIdsRequest,+ BulkItem,+ BulkRemoveItemsRequest,+ BulkSetItemsRequest,GetAllUserNotificationsResponse,NotificationState,} from './generated/schemas';import type { ApiUserNotification } from './generated/schemas/apiUserNotification';import type { DeviceRequest } from './generated/schemas/deviceRequest';+import { EntityType } from './generated/schemas/entityType';import type { GetNotificationTypePreferencesResponse } from './generated/schemas/getNotificationTypePreferencesResponse';import type { NotificationBulkRequest } from './generated/schemas/notificationBulkRequest';import type { UserUnsubscribe } from './generated/schemas/userUnsubscribe';@@ -26,6 +30,40 @@ const _NOTIFICATION_WEBSOCKET_EVENT = 'notification';type WithEventItemId = { event_item_id: string };type WithItem = { item_id: string; item_type: string };+const notificationEntityType = z.enum(EntityType);++function notificationPreferenceItems(+ items: readonly UserUnsubscribe[]+): Result<BulkItem[], ResultError<'INVALID_ITEM_TYPE'>[]> {+ const validatedItems: BulkItem[] = [];+ for (const item of items) {+ let itemType = item.item_type;+ if (itemType === 'email' || itemType === 'thread') {+ itemType = 'email_thread';+ } else if (itemType === 'foreign') {+ itemType = 'foreign_entity';+ }++ const parsedType = notificationEntityType.safeParse(itemType);+ if (!parsedType.success) {+ return err([+ {+ code: 'INVALID_ITEM_TYPE',+ message: 'Unsupported notification item type.',+ arg: 'item_type',+ },+ ]);+ }++ validatedItems.push({+ item_id: item.item_id,+ item_type: parsedType.data,+ });+ }++ return ok(validatedItems);+}+function notificationFetch(url: string,init?: SafeFetchInit@@ -236,6 +274,34 @@ export const notificationServiceClient = {})).map((result) => ({ data: result }));},+ async unsubscribeItems(+ items: readonly UserUnsubscribe[],+ snoozedUntil?: string+ ) {+ const validatedItems = notificationPreferenceItems(items);+ if (validatedItems.isErr()) return err(validatedItems.error);++ const body: BulkSetItemsRequest = {+ items: validatedItems.value,+ snoozed_until: snoozedUntil,+ };+ return notificationFetch<{}>('/unsubscribe/items', {+ method: 'POST',+ body: JSON.stringify(body),+ });+ },+ async removeUnsubscribeItems(items: readonly UserUnsubscribe[]) {+ const validatedItems = notificationPreferenceItems(items);+ if (validatedItems.isErr()) return err(validatedItems.error);++ const body: BulkRemoveItemsRequest = {+ items: validatedItems.value,+ };+ return notificationFetch<{}>('/unsubscribe/items', {+ method: 'DELETE',+ body: JSON.stringify(body),+ });+ },async unsubscribeItem(args: WithItem & { snoozed_until?: string | null }) {const query = args.snoozed_until? `?snoozed_until=${encodeURIComponent(args.snoozed_until)}`diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkItem.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkItem.tsnew file mode 100644index 0000000000..e07f9a8e1f--- /dev/null+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkItem.ts@@ -0,0 +1,12 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * notification_service+ * OpenAPI spec version: 0.1.0+ */+import type { EntityType } from './entityType';++export interface BulkItem {+ item_id: string;+ item_type: EntityType;+}diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkRemoveItemsRequest.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkRemoveItemsRequest.tsnew file mode 100644index 0000000000..3e432736d0--- /dev/null+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkRemoveItemsRequest.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * notification_service+ * OpenAPI spec version: 0.1.0+ */+import type { BulkItem } from './bulkItem';++export interface BulkRemoveItemsRequest {+ items: BulkItem[];+}diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequest.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequest.tsnew file mode 100644index 0000000000..c605d5c234--- /dev/null+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequest.ts@@ -0,0 +1,14 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * notification_service+ * OpenAPI spec version: 0.1.0+ */+import type { BulkItem } from './bulkItem';+import type { BulkSetItemsRequestSnoozedUntil } from './bulkSetItemsRequestSnoozedUntil';++export interface BulkSetItemsRequest {+ items: BulkItem[];+ /** A future resume time. Omit to mute indefinitely. */+ snoozed_until?: BulkSetItemsRequestSnoozedUntil;+}diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequestSnoozedUntil.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequestSnoozedUntil.tsnew file mode 100644index 0000000000..322834f824--- /dev/null+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/bulkSetItemsRequestSnoozedUntil.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * notification_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * A future resume time. Omit to mute indefinitely.+ */+export type BulkSetItemsRequestSnoozedUntil = string | null;diff --git a/apps/web/src/lib/service-clients/service-notification/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-notification/generated/schemas/index.tsindex e34a32f2d1..e03d430cb6 100644--- a/apps/web/src/lib/service-clients/service-notification/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-notification/generated/schemas/index.ts@@ -28,6 +28,10 @@ export * from './apiUserNotificationAllOfSenderId';export * from './apiUserNotificationAllOfViewedAt';export * from './bulkGetByEventItemIdsRequest';export * from './bulkGetTypedNotificationsByEventItemIdsParams';+export * from './bulkItem';+export * from './bulkRemoveItemsRequest';+export * from './bulkSetItemsRequest';+export * from './bulkSetItemsRequestSnoozedUntil';export * from './calendarEventJoinRequestMetadata';export * from './calendarEventReminderMetadata';export * from './calendarEventReminderMetadataEndsAt';diff --git a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts b/apps/web/src/lib/service-clients/service-notification/generated/zod.tsindex da233148c3..1981e8fda4 100644--- a/apps/web/src/lib/service-clients/service-notification/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-notification/generated/zod.ts@@ -124,6 +124,100 @@ export const removeUnsubscribeItemResponse = zod'Empty response is required due to custom fetch forcing `response.json()`');+/**+ * @summary Atomically mute or snooze items for the authenticated user.+ */+export const unsubscribeItemsBody = zod.object({+ items: zod.array(+ zod.object({+ item_id: zod.string(),+ item_type: zod+ .enum([+ 'user',+ 'chat',+ 'channel',+ 'channel_message',+ 'document',+ 'project',+ 'email_thread',+ 'calendar_event',+ 'team',+ 'call',+ 'foreign_entity',+ 'static_file',+ 'crm_company',+ 'crm_contact',+ 'crm_pipeline',+ 'reminder',+ 'skill',+ 'agent_session',+ 'scheduled_action',+ 'initiative',+ 'database',+ 'database_row',+ 'form',+ 'external_chat',+ ])+ .describe('The type of an entity in Macro'),+ })+ ),+ snoozed_until: zod.iso+ .datetime({})+ .nullish()+ .describe('A future resume time. Omit to mute indefinitely.'),+});++export const unsubscribeItemsResponse = zod+ .object({})+ .describe(+ 'Empty response is required due to custom fetch forcing `response.json()`'+ );++/**+ * @summary Atomically resume delivery for the authenticated user's items.+ */+export const removeUnsubscribeItemsBody = zod.object({+ items: zod.array(+ zod.object({+ item_id: zod.string(),+ item_type: zod+ .enum([+ 'user',+ 'chat',+ 'channel',+ 'channel_message',+ 'document',+ 'project',+ 'email_thread',+ 'calendar_event',+ 'team',+ 'call',+ 'foreign_entity',+ 'static_file',+ 'crm_company',+ 'crm_contact',+ 'crm_pipeline',+ 'reminder',+ 'skill',+ 'agent_session',+ 'scheduled_action',+ 'initiative',+ 'database',+ 'database_row',+ 'form',+ 'external_chat',+ ])+ .describe('The type of an entity in Macro'),+ })+ ),+});++export const removeUnsubscribeItemsResponse = zod+ .object({})+ .describe(+ 'Empty response is required due to custom fetch forcing `response.json()`'+ );+/*** @summary Unsubscribes user from all notifications.*/diff --git a/apps/web/src/lib/service-clients/service-notification/openapi.json b/apps/web/src/lib/service-clients/service-notification/openapi.jsonindex dc855daaba..5536b23ac1 100644--- a/apps/web/src/lib/service-clients/service-notification/openapi.json+++ b/apps/web/src/lib/service-clients/service-notification/openapi.json@@ -242,6 +242,122 @@}}},+ "/unsubscribe/items": {+ "post": {+ "tags": ["unsubscribe::items"],+ "summary": "Atomically mute or snooze items for the authenticated user.",+ "operationId": "unsubscribe_items",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkSetItemsRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/EmptyResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "delete": {+ "tags": ["unsubscribe::items"],+ "summary": "Atomically resume delivery for the authenticated user's items.",+ "operationId": "remove_unsubscribe_items",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkRemoveItemsRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/EmptyResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/unsubscribe/mute": {"post": {"tags": ["unsubscribe::unsubscribe_all"],@@ -1294,6 +1410,47 @@}}},+ "BulkItem": {+ "type": "object",+ "required": ["item_type", "item_id"],+ "properties": {+ "item_id": {+ "type": "string"+ },+ "item_type": {+ "$ref": "#/components/schemas/EntityType"+ }+ }+ },+ "BulkRemoveItemsRequest": {+ "type": "object",+ "required": ["items"],+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/BulkItem"+ }+ }+ }+ },+ "BulkSetItemsRequest": {+ "type": "object",+ "required": ["items"],+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/BulkItem"+ }+ },+ "snoozed_until": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "A future resume time. Omit to mute indefinitely."+ }+ }+ },"CalendarEventJoinRequestMetadata": {"type": "object","description": "A channel member who sees a calendar event only through a channel share\nasked the person who shared it to add them as a guest. Sent to the sharer,\nwith the requester as sender.",diff --git a/crates/agent_code_mode/src/domain/operations.json b/crates/agent_code_mode/src/domain/operations.jsonindex 1ce62938f7..1abfbf856f 100644--- a/crates/agent_code_mode/src/domain/operations.json+++ b/crates/agent_code_mode/src/domain/operations.json@@ -301,6 +301,8 @@"notification.unsubscribeEmail": "Unsubscribe Email","notification.removeUnsubscribeItem": "Remove Unsubscribe Item","notification.unsubscribeItem": "Unsubscribe Item",+ "notification.removeUnsubscribeItems": "Remove Unsubscribe Items",+ "notification.unsubscribeItems": "Unsubscribe Items","notification.removeUnsubscribeAll": "Remove Unsubscribe All","notification.unsubscribeAll": "Unsubscribe All","notification.listTypedNotifications": "List Typed Notifications",diff --git a/crates/code_execution/src/outbound/deno/sdk.mjs b/crates/code_execution/src/outbound/deno/sdk.mjsindex 60fdc7fccb..4e582733f4 100644--- a/crates/code_execution/src/outbound/deno/sdk.mjs+++ b/crates/code_execution/src/outbound/deno/sdk.mjs@@ -34,7 +34,7 @@ async function cO($,O,j){if(!Number.isInteger(O)||O<1)throw RangeError(`concurre`);U=y.pop()??"";for(let a of y){let i=a.split(``),F=[],v;for(let R of i)if(R.startsWith("data:"))F.push(R.replace(/^data:\s*/,""));else if(R.startsWith("event:"))v=R.replace(/^event:\s*/,"");else if(R.startsWith("id:"))J=R.replace(/^id:\s*/,"");else if(R.startsWith("retry:")){let m=Number.parseInt(R.replace(/^retry:\s*/,""),10);if(!Number.isNaN(m))V=m}let M,h=!1;if(F.length){let R=F.join(`-`);try{M=JSON.parse(R),h=!0}catch{M=R}}if(h){if(S)await S(M);if(x)M=await x(M)}if(j?.({data:M,event:v,id:J,retry:V}),F.length)yield M}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var gS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},yS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},vS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},J0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Y)=>encodeURIComponent(Y))).join(yS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=gS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return fO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},fO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},V0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Y=[];Object.entries(S).forEach(([G,J])=>{Y=[...Y,G,$?J:encodeURIComponent(J)]});let L=Y.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=vS(x),X=Object.entries(S).map(([Y,L])=>fO({allowReserved:$,name:x==="deepObject"?`${j}[${Y}]`:Y,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var hS=/\{[^{}]+\}/g,mS=({path:$,url:O})=>{let j=O,x=O.match(hS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Y=$[Z];if(Y===void 0||Y===null)continue;if(Array.isArray(Y)){j=j.replace(S,J0({explode:K,name:Z,style:X,value:Y}));continue}if(typeof Y==="object"){j=j.replace(S,V0({explode:K,name:Z,style:X,value:Y,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${fO({name:Z,value:Y})}`);continue}let L=encodeURIComponent(X==="label"?`.${Y}`:Y);j=j.replace(S,L)}return j},R6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=mS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function L1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var D6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var _6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var M6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Y=J0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Y)S.push(Y)}else if(typeof Z==="object"){let Y=V0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Y)S.push(Y)}else{let Y=fO({allowReserved:X.allowReserved,name:K,value:Z});if(Y)S.push(Y)}}return S.join("&")}},C6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},uS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function P6($){for(let O of $.security??[]){if(uS($,O.name))continue;let j=await D6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var N1=($)=>R6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:M6($.querySerializer),url:$.url}),U1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=B0($.headers,O.headers),j},cS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},B0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?cS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class W0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var A6=()=>({error:new W0,request:new W0,response:new W0}),dS=M6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),lS={"Content-Type":"application/json"},Kj=($={})=>({..._6,headers:lS,parseAs:"auto",querySerializer:dS,...$});var z1=($={})=>{let O=U1(Kj(),$),j=()=>({...O}),x=(G)=>{return O=U1(O,G),j()},S=A6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:B0(O.headers,G.headers),serializedBody:void 0};if(J.security)await P6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=N1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:L1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let A=V.fetch;W=await A(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?C6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Y=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return T6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:L1(I),url:z})};return{buildUrl:(G)=>N1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Y("CONNECT"),delete:Y("DELETE"),get:Y("GET"),head:Y("HEAD"),options:Y("OPTIONS"),patch:Y("PATCH"),post:Y("POST"),put:Y("PUT"),trace:Y("TRACE")},trace:X("TRACE")}};var F6=z1(Kj());class E6{client;constructor($){this.client=$?.client??F6}}class q6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class L0 extends E6{static __registry=new q6;constructor($){super($);L0.__registry.set(this,$?.key)}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getUnsubscribes($){return($?.client??this.client).get({url:"/unsubscribe",...$})}unsubscribeEmail($){return($?.client??this.client).post({url:"/unsubscribe/email",...$})}removeUnsubscribeItem($){return($.client??this.client).delete({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}unsubscribeItem($){return($.client??this.client).post({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}removeUnsubscribeAll($){return($?.client??this.client).delete({url:"/unsubscribe/mute",...$})}unsubscribeAll($){return($?.client??this.client).post({url:"/unsubscribe/mute",...$})}listTypedNotifications($){return($?.client??this.client).get({url:"/v1/user_notifications",...$})}bulkGetTypedNotificationsByEventItemIds($){return($.client??this.client).post({url:"/v1/user_notifications/item/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}getTypedNotificationsByEventItemId($){return($.client??this.client).get({url:"/v1/user_notifications/item/{event_item_id}",...$})}getNotificationTypePreferences($){return($?.client??this.client).get({url:"/v1/user_notifications/preferences",...$})}disableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/disable",...$})}enableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/enable",...$})}getTypedNotificationById($){return($.client??this.client).get({url:"/v1/user_notifications/{notification_id}",...$})}bulkDeleteUserNotificationsV2($){return($.client??this.client).delete({url:"/v2/user_notifications/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsDone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/done",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsSeen($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/seen",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsUndone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/undone",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserNotificationV2($){return($.client??this.client).delete({url:"/v2/user_notifications/{notification_id}",...$})}}function w6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Y,url:L,...G}){let J,I=Y??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let A=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)A.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:A,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,`+`);try{M=JSON.parse(R),h=!0}catch{M=R}}if(h){if(S)await S(M);if(x)M=await x(M)}if(j?.({data:M,event:v,id:J,retry:V}),F.length)yield M}}}finally{H.removeEventListener("abort",g),T.releaseLock()}break}catch(D){if(O?.(D),Z!==void 0&&B>=Z)break;let _=Math.min(V*2**(B-1),X??30000);await I(_)}}}()}}var gS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},yS=($)=>{switch($){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},vS=($)=>{switch($){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},J0=({allowReserved:$,explode:O,name:j,style:x,value:S})=>{if(!O){let X=($?S:S.map((Y)=>encodeURIComponent(Y))).join(yS(x));switch(x){case"label":return`.${X}`;case"matrix":return`;${j}=${X}`;case"simple":return X;default:return`${j}=${X}`}}let K=gS(x),Z=S.map((X)=>{if(x==="label"||x==="simple")return $?X:encodeURIComponent(X);return fO({allowReserved:$,name:j,value:X})}).join(K);return x==="label"||x==="matrix"?K+Z:Z},fO=({allowReserved:$,name:O,value:j})=>{if(j===void 0||j===null)return"";if(typeof j==="object")throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${O}=${$?j:encodeURIComponent(j)}`},V0=({allowReserved:$,explode:O,name:j,style:x,value:S,valueOnly:K})=>{if(S instanceof Date)return K?S.toISOString():`${j}=${S.toISOString()}`;if(x!=="deepObject"&&!O){let Y=[];Object.entries(S).forEach(([G,J])=>{Y=[...Y,G,$?J:encodeURIComponent(J)]});let L=Y.join(",");switch(x){case"form":return`${j}=${L}`;case"label":return`.${L}`;case"matrix":return`;${j}=${L}`;default:return L}}let Z=vS(x),X=Object.entries(S).map(([Y,L])=>fO({allowReserved:$,name:x==="deepObject"?`${j}[${Y}]`:Y,value:L})).join(Z);return x==="label"||x==="matrix"?Z+X:X};var hS=/\{[^{}]+\}/g,mS=({path:$,url:O})=>{let j=O,x=O.match(hS);if(x)for(let S of x){let K=!1,Z=S.substring(1,S.length-1),X="simple";if(Z.endsWith("*"))K=!0,Z=Z.substring(0,Z.length-1);if(Z.startsWith("."))Z=Z.substring(1),X="label";else if(Z.startsWith(";"))Z=Z.substring(1),X="matrix";let Y=$[Z];if(Y===void 0||Y===null)continue;if(Array.isArray(Y)){j=j.replace(S,J0({explode:K,name:Z,style:X,value:Y}));continue}if(typeof Y==="object"){j=j.replace(S,V0({explode:K,name:Z,style:X,value:Y,valueOnly:!0}));continue}if(X==="matrix"){j=j.replace(S,`;${fO({name:Z,value:Y})}`);continue}let L=encodeURIComponent(X==="label"?`.${Y}`:Y);j=j.replace(S,L)}return j},R6=({baseUrl:$,path:O,query:j,querySerializer:x,url:S})=>{let K=S.startsWith("/")?S:`/${S}`,Z=($??"")+K;if(O)Z=mS({path:O,url:Z});let X=j?x(j):"";if(X.startsWith("?"))X=X.substring(1);if(X)Z+=`?${X}`;return Z};function L1($){let O=$.body!==void 0;if(O&&$.bodySerializer){if("serializedBody"in $)return $.serializedBody!==void 0&&$.serializedBody!==""?$.serializedBody:null;return $.body!==""?$.body:null}if(O)return $.body;return}var D6=async($,O)=>{let j=typeof O==="function"?await O($):O;if(!j)return;if($.scheme==="bearer")return`Bearer ${j}`;if($.scheme==="basic")return`Basic ${btoa(j)}`;return j};var _6={bodySerializer:($)=>JSON.stringify($,(O,j)=>typeof j==="bigint"?j.toString():j)};var M6=({parameters:$={},...O}={})=>{return(x)=>{let S=[];if(x&&typeof x==="object")for(let K in x){let Z=x[K];if(Z===void 0||Z===null)continue;let X=$[K]||O;if(Array.isArray(Z)){let Y=J0({allowReserved:X.allowReserved,explode:!0,name:K,style:"form",value:Z,...X.array});if(Y)S.push(Y)}else if(typeof Z==="object"){let Y=V0({allowReserved:X.allowReserved,explode:!0,name:K,style:"deepObject",value:Z,...X.object});if(Y)S.push(Y)}else{let Y=fO({allowReserved:X.allowReserved,name:K,value:Z});if(Y)S.push(Y)}}return S.join("&")}},C6=($)=>{if(!$)return"stream";let O=$.split(";")[0]?.trim();if(!O)return;if(O.startsWith("application/json")||O.endsWith("+json"))return"json";if(O==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some((j)=>O.startsWith(j)))return"blob";if(O.startsWith("text/"))return"text";return},uS=($,O)=>{if(!O)return!1;if($.headers.has(O)||$.query?.[O]||$.headers.get("Cookie")?.includes(`${O}=`))return!0;return!1};async function P6($){for(let O of $.security??[]){if(uS($,O.name))continue;let j=await D6(O,$.auth);if(!j)continue;let x=O.name??"Authorization";switch(O.in){case"query":if(!$.query)$.query={};$.query[x]=j;break;case"cookie":$.headers.append("Cookie",`${x}=${j}`);break;case"header":default:$.headers.set(x,j);break}}}var N1=($)=>R6({baseUrl:$.baseUrl,path:$.path,query:$.query,querySerializer:typeof $.querySerializer==="function"?$.querySerializer:M6($.querySerializer),url:$.url}),U1=($,O)=>{let j={...$,...O};if(j.baseUrl?.endsWith("/"))j.baseUrl=j.baseUrl.substring(0,j.baseUrl.length-1);return j.headers=B0($.headers,O.headers),j},cS=($)=>{let O=[];return $.forEach((j,x)=>{O.push([x,j])}),O},B0=(...$)=>{let O=new Headers;for(let j of $){if(!j)continue;let x=j instanceof Headers?cS(j):Object.entries(j);for(let[S,K]of x)if(K===null)O.delete(S);else if(Array.isArray(K))for(let Z of K)O.append(S,Z);else if(K!==void 0)O.set(S,typeof K==="object"?JSON.stringify(K):K)}return O};class W0{fns=[];clear(){this.fns=[]}eject($){let O=this.getInterceptorIndex($);if(this.fns[O])this.fns[O]=null}exists($){let O=this.getInterceptorIndex($);return Boolean(this.fns[O])}getInterceptorIndex($){if(typeof $==="number")return this.fns[$]?$:-1;return this.fns.indexOf($)}update($,O){let j=this.getInterceptorIndex($);if(this.fns[j])return this.fns[j]=O,$;return!1}use($){return this.fns.push($),this.fns.length-1}}var A6=()=>({error:new W0,request:new W0,response:new W0}),dS=M6({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),lS={"Content-Type":"application/json"},Kj=($={})=>({..._6,headers:lS,parseAs:"auto",querySerializer:dS,...$});var z1=($={})=>{let O=U1(Kj(),$),j=()=>({...O}),x=(G)=>{return O=U1(O,G),j()},S=A6(),K=async(G)=>{let J={...O,...G,fetch:G.fetch??O.fetch??globalThis.fetch,headers:B0(O.headers,G.headers),serializedBody:void 0};if(J.security)await P6(J);if(J.requestValidator)await J.requestValidator(J);if(J.body!==void 0&&J.bodySerializer)J.serializedBody=J.bodySerializer(J.body);if(J.body===void 0||J.serializedBody==="")J.headers.delete("Content-Type");let I=J,z=N1(I);return{opts:I,url:z}},Z=async(G)=>{let J=G.throwOnError??O.throwOnError,I=G.responseStyle??O.responseStyle,z,W;try{let{opts:V,url:B}=await K(G),H={redirect:"follow",...V,body:L1(V)};z=new Request(B,H);for(let N of S.request.fns)if(N)z=await N(z,V);let A=V.fetch;W=await A(z);for(let N of S.response.fns)if(N)W=await N(W,z,V);let D={request:z,response:W};if(W.ok){let N=(V.parseAs==="auto"?C6(W.headers.get("Content-Type")):V.parseAs)??"json";if(W.status===204||W.headers.get("Content-Length")==="0"){let U;switch(N){case"arrayBuffer":case"blob":case"text":U=await W[N]();break;case"formData":U=new FormData;break;case"stream":U=W.body;break;case"json":default:U={};break}return V.responseStyle==="data"?U:{data:U,...D}}let T;switch(N){case"arrayBuffer":case"blob":case"formData":case"text":T=await W[N]();break;case"json":{let U=await W.text();T=U?JSON.parse(U):{};break}case"stream":return V.responseStyle==="data"?W.body:{data:W.body,...D}}if(N==="json"){if(V.responseValidator)await V.responseValidator(T);if(V.responseTransformer)T=await V.responseTransformer(T)}return V.responseStyle==="data"?T:{data:T,...D}}let _=await W.text(),q;try{q=JSON.parse(_)}catch{}throw q??_}catch(V){let B=V;for(let H of S.error.fns)if(H)B=await H(B,W,z,G);if(B=B||{},J)throw B;return I==="data"?void 0:{error:B,request:z,response:W}}},X=(G)=>(J)=>Z({...J,method:G}),Y=(G)=>async(J)=>{let{opts:I,url:z}=await K(J);return T6({...I,body:I.body,method:G,onRequest:async(W,V)=>{let B=new Request(W,V);for(let H of S.request.fns)if(H)B=await H(B,I);return B},serializedBody:L1(I),url:z})};return{buildUrl:(G)=>N1({...O,...G}),connect:X("CONNECT"),delete:X("DELETE"),get:X("GET"),getConfig:j,head:X("HEAD"),interceptors:S,options:X("OPTIONS"),patch:X("PATCH"),post:X("POST"),put:X("PUT"),request:Z,setConfig:x,sse:{connect:Y("CONNECT"),delete:Y("DELETE"),get:Y("GET"),head:Y("HEAD"),options:Y("OPTIONS"),patch:Y("PATCH"),post:Y("POST"),put:Y("PUT"),trace:Y("TRACE")},trace:X("TRACE")}};var F6=z1(Kj());class E6{client;constructor($){this.client=$?.client??F6}}class q6{defaultKey="default";instances=new Map;get($){let O=this.instances.get($??this.defaultKey);if(!O)throw Error('No SDK client found. Create one with "new Sdk()" to fix this error.');return O}set($,O){this.instances.set(O??this.defaultKey,$)}}class L0 extends E6{static __registry=new q6;constructor($){super($);L0.__registry.set(this,$?.key)}healthHandler($){return($?.client??this.client).get({url:"/health",...$})}getUnsubscribes($){return($?.client??this.client).get({url:"/unsubscribe",...$})}unsubscribeEmail($){return($?.client??this.client).post({url:"/unsubscribe/email",...$})}removeUnsubscribeItem($){return($.client??this.client).delete({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}unsubscribeItem($){return($.client??this.client).post({url:"/unsubscribe/item/{item_type}/{item_id}",...$})}removeUnsubscribeItems($){return($.client??this.client).delete({url:"/unsubscribe/items",...$,headers:{"Content-Type":"application/json",...$.headers}})}unsubscribeItems($){return($.client??this.client).post({url:"/unsubscribe/items",...$,headers:{"Content-Type":"application/json",...$.headers}})}removeUnsubscribeAll($){return($?.client??this.client).delete({url:"/unsubscribe/mute",...$})}unsubscribeAll($){return($?.client??this.client).post({url:"/unsubscribe/mute",...$})}listTypedNotifications($){return($?.client??this.client).get({url:"/v1/user_notifications",...$})}bulkGetTypedNotificationsByEventItemIds($){return($.client??this.client).post({url:"/v1/user_notifications/item/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}getTypedNotificationsByEventItemId($){return($.client??this.client).get({url:"/v1/user_notifications/item/{event_item_id}",...$})}getNotificationTypePreferences($){return($?.client??this.client).get({url:"/v1/user_notifications/preferences",...$})}disableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/disable",...$})}enableNotificationType($){return($.client??this.client).put({url:"/v1/user_notifications/preferences/{notification_event_type}/enable",...$})}getTypedNotificationById($){return($.client??this.client).get({url:"/v1/user_notifications/{notification_id}",...$})}bulkDeleteUserNotificationsV2($){return($.client??this.client).delete({url:"/v2/user_notifications/bulk",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsDone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/done",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsSeen($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/seen",...$,headers:{"Content-Type":"application/json",...$.headers}})}bulkMarkNotificationsUndone($){return($.client??this.client).patch({url:"/v2/user_notifications/bulk/undone",...$,headers:{"Content-Type":"application/json",...$.headers}})}deleteUserNotificationV2($){return($.client??this.client).delete({url:"/v2/user_notifications/{notification_id}",...$})}}function w6({onRequest:$,onSseError:O,onSseEvent:j,responseTransformer:x,responseValidator:S,sseDefaultRetryDelay:K,sseMaxRetryAttempts:Z,sseMaxRetryDelay:X,sseSleepFn:Y,url:L,...G}){let J,I=Y??((V)=>new Promise((B)=>setTimeout(B,V)));return{stream:async function*(){let V=K??3000,B=0,H=G.signal??new AbortController().signal;while(!0){if(H.aborted)break;B++;let A=G.headers instanceof Headers?G.headers:new Headers(G.headers);if(J!==void 0)A.set("Last-Event-ID",J);try{let D={redirect:"follow",...G,body:G.serializedBody,headers:A,signal:H},_=new Request(L,D);if($)_=await $(L,D);let N=await(G.fetch??globalThis.fetch)(_);if(!N.ok)throw Error(`SSE failed: ${N.status} ${N.statusText}`);if(!N.body)throw Error("No body in SSE response");let T=N.body.pipeThrough(new TextDecoderStream).getReader(),U="",g=()=>{try{T.cancel()}catch{}};H.addEventListener("abort",g);try{while(!0){let{done:r,value:p}=await T.read();if(r)break;U+=p,U=U.replace(/\r\n?/g,``);let y=U.split(``);U=y.pop()??"";for(let a of y){let i=a.split(`diff --git a/crates/notification/AGENTS.md b/crates/notification/AGENTS.mdindex d693da4d71..8b9762a255 100644--- a/crates/notification/AGENTS.md+++ b/crates/notification/AGENTS.md@@ -27,7 +27,7 @@ through the same service.`SignedUnsubscribeLinks` signs `domain/models/signing.rs` unsubscribeplaceholders per recipient), `repository.rs`(owned Postgres queries), `withdrawal.rs` (durable suppression),- `item_preferences.rs` (snooze/mute).+ `item_preferences.rs` (owner-scoped single and atomic bulk snooze/mute).- `outbound/notification_consumer/health.rs`: periodic per-instance Kafkabacklog and telemetry-health logs; offsets stay uncommitted.- `domain/retention.rs` + `outbound/retention.rs`: bounded 30-day cleanup.diff --git a/crates/notification/src/domain/item_preferences.rs b/crates/notification/src/domain/item_preferences.rsindex 127883f431..f0334bb6e2 100644--- a/crates/notification/src/domain/item_preferences.rs+++ b/crates/notification/src/domain/item_preferences.rs@@ -2,9 +2,9 @@use chrono::{DateTime, Utc};use macro_user_id::user_id::MacroUserIdStr;-use model_entity::Entity;+use model_entity::{Entity, EntityType};use rootcause::Report;-use std::future::Future;+use std::{collections::HashMap, future::Future};/// An item whose notifications are muted, indefinitely or until a deadline.#[derive(Debug, Clone)]@@ -29,6 +29,19 @@ pub trait ItemNotificationPreferenceRepository: Send + Sync {entity: Entity<'_>,until: Option<DateTime<Utc>>,) -> impl Future<Output = Result<(), Report>> + Send;+ /// Atomically replace this user's preferences for all items.+ fn set_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ until: Option<DateTime<Utc>>,+ ) -> impl Future<Output = Result<(), Report>> + Send;+ /// Atomically resume notifications for all items belonging to this user.+ fn remove_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ ) -> impl Future<Output = Result<(), Report>> + Send;/// Resume notifications for this user's item.fn remove(&self,@@ -43,6 +56,12 @@ pub enum ItemNotificationPreferenceError {/// Snoozes must end in the future.#[error("Choose a snooze time in the future")]InvalidDeadline,+ /// Requests contain at most 500 items.+ #[error("Too many notification preference items (maximum 500)")]+ TooManyItems,+ /// An item ID cannot refer to different entity types in one request.+ #[error("Conflicting entity types for the same item ID")]+ ConflictingTypes,/// Persistence failed.#[error("Could not update notification preference: {0}")]Repository(Report),@@ -85,6 +104,68 @@ impl<R: ItemNotificationPreferenceRepository> ItemNotificationPreferenceService<.map_err(ItemNotificationPreferenceError::Repository)}+ /// Atomically mute or snooze items for the authenticated user.+ #[tracing::instrument(skip_all, fields(item_count = entities.len()), err)]+ pub async fn set_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: Vec<Entity<'static>>,+ until: Option<DateTime<Utc>>,+ now: DateTime<Utc>,+ ) -> Result<(), ItemNotificationPreferenceError> {+ if until.is_some_and(|deadline| deadline <= now) {+ return Err(ItemNotificationPreferenceError::InvalidDeadline);+ }++ let entities = Self::validate_bulk(entities)?;++ self.repository+ .set_bulk(user, &entities, until)+ .await+ .map_err(ItemNotificationPreferenceError::Repository)+ }++ /// Atomically resume delivery for the authenticated user's items.+ #[tracing::instrument(skip_all, fields(item_count = entities.len()), err)]+ pub async fn remove_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: Vec<Entity<'static>>,+ ) -> Result<(), ItemNotificationPreferenceError> {+ let entities = Self::validate_bulk(entities)?;++ self.repository+ .remove_bulk(user, &entities)+ .await+ .map_err(ItemNotificationPreferenceError::Repository)+ }++ fn validate_bulk(+ entities: Vec<Entity<'static>>,+ ) -> Result<Vec<Entity<'static>>, ItemNotificationPreferenceError> {+ if entities.len() > 500 {+ return Err(ItemNotificationPreferenceError::TooManyItems);+ }++ let mut seen: HashMap<String, EntityType> = HashMap::new();+ let mut unique = Vec::with_capacity(entities.len());++ for entity in entities {+ match seen.get(entity.entity_id.as_ref()) {+ Some(entity_type) if *entity_type != entity.entity_type => {+ return Err(ItemNotificationPreferenceError::ConflictingTypes);+ }+ Some(_) => continue,+ None => {+ seen.insert(entity.entity_id.to_string(), entity.entity_type);+ unique.push(entity);+ }+ }+ }++ Ok(unique)+ }+/// Resume delivery without modifying existing notifications or read state.pub async fn remove(&self, user: MacroUserIdStr<'_>, entity: Entity<'_>) -> Result<(), Report> {self.repository.remove(user, entity).awaitdiff --git a/crates/notification/src/domain/item_preferences/test.rs b/crates/notification/src/domain/item_preferences/test.rsindex 019e254369..474015214e 100644--- a/crates/notification/src/domain/item_preferences/test.rs+++ b/crates/notification/src/domain/item_preferences/test.rs@@ -6,6 +6,8 @@ use std::sync::Mutex;#[derive(Default)]struct FakeRepository {writes: Mutex<Vec<(String, Option<DateTime<Utc>>)>>,+ bulk: Mutex<Vec<(String, Vec<String>, Option<DateTime<Utc>>)>>,+ removals: Mutex<Vec<(String, Vec<String>)>>,}impl ItemNotificationPreferenceRepository for FakeRepository {@@ -21,6 +23,30 @@ impl ItemNotificationPreferenceRepository for FakeRepository {self.writes.lock().unwrap().push((user.to_string(), until));Ok(())}+ async fn set_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ until: Option<DateTime<Utc>>,+ ) -> Result<(), Report> {+ self.bulk.lock().unwrap().push((+ user.to_string(),+ entities.iter().map(|e| e.entity_id.to_string()).collect(),+ until,+ ));+ Ok(())+ }+ async fn remove_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ ) -> Result<(), Report> {+ self.removals.lock().unwrap().push((+ user.to_string(),+ entities.iter().map(|e| e.entity_id.to_string()).collect(),+ ));+ Ok(())+ }async fn remove(&self, _: MacroUserIdStr<'_>, _: Entity<'_>) -> Result<(), Report> {Ok(())}@@ -66,3 +92,68 @@ async fn only_future_deadlines_are_saved_for_the_authenticated_user() {assert!(writes[0].1.is_some());assert!(writes[1].1.is_none());}++#[tokio::test]+async fn bulk_validates_before_writing_and_deduplicates() {+ let service = ItemNotificationPreferenceService::new(FakeRepository::default());+ let owner = || MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap();+ let now = Utc::now();+ let items = || {+ vec![+ EntityType::Channel.with_entity_string("same".to_owned()),+ EntityType::Channel.with_entity_string("same".to_owned()),+ EntityType::Document.with_entity_string("other".to_owned()),+ ]+ };+ assert!(matches!(+ service.set_bulk(owner(), items(), Some(now), now).await,+ Err(ItemNotificationPreferenceError::InvalidDeadline)+ ));+ assert!(matches!(+ service+ .remove_bulk(+ owner(),+ vec![EntityType::Channel.with_entity_string("id".to_owned()); 501]+ )+ .await,+ Err(ItemNotificationPreferenceError::TooManyItems)+ ));+ assert!(matches!(+ service+ .set_bulk(+ owner(),+ vec![+ EntityType::Channel.with_entity_string("same".to_owned()),+ EntityType::Document.with_entity_string("same".to_owned()),+ ],+ None,+ now+ )+ .await,+ Err(ItemNotificationPreferenceError::ConflictingTypes)+ ));+ assert!(service.repository.bulk.lock().unwrap().is_empty());+ assert!(service.repository.removals.lock().unwrap().is_empty());+ let future = now + Duration::hours(1);+ service+ .set_bulk(owner(), items(), Some(future), now)+ .await+ .unwrap();+ service.set_bulk(owner(), items(), None, now).await.unwrap();+ service.remove_bulk(owner(), items()).await.unwrap();+ let writes = service.repository.bulk.lock().unwrap();+ assert_eq!(writes.len(), 2);+ assert_eq!(+ writes[0],+ (+ "macro|[email protected]".to_owned(),+ vec!["same".to_owned(), "other".to_owned()],+ Some(future)+ )+ );+ assert_eq!(writes[1].2, None);+ assert_eq!(+ service.repository.removals.lock().unwrap()[0].1,+ vec!["same", "other"]+ );+}diff --git a/crates/notification/src/inbound/ai_tool/mute_notifications.rs b/crates/notification/src/inbound/ai_tool/mute_notifications.rsindex 1e8fa05962..5b5934fc92 100644--- a/crates/notification/src/inbound/ai_tool/mute_notifications.rs+++ b/crates/notification/src/inbound/ai_tool/mute_notifications.rs@@ -153,6 +153,10 @@ whereItemNotificationPreferenceError::InvalidDeadline => {invalid("snoozeUntil must be in the future")}+ error @ (ItemNotificationPreferenceError::TooManyItems+ | ItemNotificationPreferenceError::ConflictingTypes) => {+ invalid(&error.to_string())+ }error @ ItemNotificationPreferenceError::Repository(_) => ToolCallError {description: "failed to update notification preferences".to_string(),internal_error: anyhow::anyhow!("{error}"),diff --git a/crates/notification/src/inbound/ai_tool/mute_notifications/test.rs b/crates/notification/src/inbound/ai_tool/mute_notifications/test.rsindex 306c6e7330..f4d7fba38e 100644--- a/crates/notification/src/inbound/ai_tool/mute_notifications/test.rs+++ b/crates/notification/src/inbound/ai_tool/mute_notifications/test.rs@@ -41,6 +41,27 @@ impl ItemNotificationPreferenceRepository for RecordingRepository {.push((user.to_string(), entity.entity_id.to_string()));Ok(())}+ async fn set_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ until: Option<DateTime<Utc>>,+ ) -> Result<(), Report> {+ for entity in entities {+ self.set(user.clone(), entity.clone(), until).await?;+ }+ Ok(())+ }+ async fn remove_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ ) -> Result<(), Report> {+ for entity in entities {+ self.remove(user.clone(), entity.clone()).await?;+ }+ Ok(())+ }}fn context() -> (diff --git a/crates/notification/src/outbound/item_preferences.rs b/crates/notification/src/outbound/item_preferences.rsindex 3418482187..3e20c668f5 100644--- a/crates/notification/src/outbound/item_preferences.rs+++ b/crates/notification/src/outbound/item_preferences.rs@@ -69,6 +69,49 @@ impl ItemNotificationPreferenceRepository for PgItemNotificationPreferenceReposiOk(())}+ async fn set_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ until: Option<DateTime<Utc>>,+ ) -> Result<(), Report> {+ let ids: Vec<String> = entities+ .iter()+ .map(|entity| entity.entity_id.to_string())+ .collect();+ let types: Vec<String> = entities+ .iter()+ .map(|entity| entity.entity_type.to_string())+ .collect();++ sqlx::query!(+ r#"INSERT INTO user_notification_item_unsubscribe (user_id, item_id, item_type, snoozed_until)+ SELECT $1, item_id, item_type, $4+ FROM UNNEST($2::text[], $3::text[]) AS items(item_id, item_type)+ ON CONFLICT (user_id, item_id) DO UPDATE+ SET item_type = EXCLUDED.item_type, snoozed_until = EXCLUDED.snoozed_until"#,+ user.as_ref(), &ids, &types, until+ ).execute(&self.0).await?;+ Ok(())+ }++ async fn remove_bulk(+ &self,+ user: MacroUserIdStr<'_>,+ entities: &[Entity<'_>],+ ) -> Result<(), Report> {+ let ids: Vec<String> = entities+ .iter()+ .map(|entity| entity.entity_id.to_string())+ .collect();++ sqlx::query!(+ "DELETE FROM user_notification_item_unsubscribe WHERE user_id = $1 AND item_id = ANY($2::text[])",+ user.as_ref(), &ids+ ).execute(&self.0).await?;+ Ok(())+ }+async fn remove(&self, user: MacroUserIdStr<'_>, entity: Entity<'_>) -> Result<(), Report> {sqlx::query!("DELETE FROM user_notification_item_unsubscribe WHERE user_id = $1 AND item_id = $2",diff --git a/crates/notification/src/outbound/item_preferences/test.rs b/crates/notification/src/outbound/item_preferences/test.rsindex 41e31e23ad..ee4079dc2c 100644--- a/crates/notification/src/outbound/item_preferences/test.rs+++ b/crates/notification/src/outbound/item_preferences/test.rs@@ -93,3 +93,60 @@ async fn snooze_expiry_replacement_and_owner_isolation(pool: PgPool) {assert!(repo.list(user("alice")).await.unwrap().is_empty());assert_eq!(repo.list(user("bob")).await.unwrap().len(), 1);}++#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]+async fn bulk_updates_and_removals_are_atomic_and_owner_scoped(pool: PgPool) {+ let repo = PgItemNotificationPreferenceRepository(pool);+ let first = EntityType::Channel.with_entity_string("first".to_owned());+ let second = EntityType::Document.with_entity_string("second".to_owned());+ let future = Utc::now() + Duration::hours(1);+ repo.set_bulk(+ user("alice"),+ &[first.clone(), second.clone()],+ Some(future),+ )+ .await+ .unwrap();+ repo.set_bulk(user("bob"), &[first.clone()], None)+ .await+ .unwrap();+ assert_eq!(repo.list(user("alice")).await.unwrap().len(), 2);+ assert_eq!(repo.list(user("bob")).await.unwrap().len(), 1);++ // A database constraint fails on the second row, rolling back the first update.+ sqlx::query!("ALTER TABLE user_notification_item_unsubscribe ADD CONSTRAINT reject_bulk_item CHECK (item_id <> 'reject')")+ .execute(&repo.0).await.unwrap();+ let invalid = EntityType::Document.with_entity_string("reject".to_owned());+ assert!(+ repo.set_bulk(user("alice"), &[first.clone(), invalid], None)+ .await+ .is_err()+ );+ assert_eq!(+ repo.list(user("alice"))+ .await+ .unwrap()+ .iter()+ .find(|item| item.entity.entity_id.as_ref() == "first")+ .unwrap()+ .snoozed_until+ .map(|deadline| deadline.timestamp_micros()),+ Some(future.timestamp_micros())+ );++ repo.set_bulk(user("alice"), &[first.clone(), second.clone()], None)+ .await+ .unwrap();+ assert!(+ repo.list(user("alice"))+ .await+ .unwrap()+ .iter()+ .all(|item| item.snoozed_until.is_none())+ );+ repo.remove_bulk(user("alice"), &[first, second])+ .await+ .unwrap();+ assert!(repo.list(user("alice")).await.unwrap().is_empty());+ assert_eq!(repo.list(user("bob")).await.unwrap().len(), 1);+}diff --git a/docs/agent-guide/channels.md b/docs/agent-guide/channels.mdindex 52fc786e42..2a82311d4a 100644--- a/docs/agent-guide/channels.md+++ b/docs/agent-guide/channels.md@@ -999,10 +999,10 @@ or Threads view tabs. The default order is Favorites, Direct messages, theteam's channels, custom sections, then **All channels**. The team heading is**[Team name] channels**, with **Team channels** as the fallback while the nameis unavailable. The team section always shows joined team channels, including-channels assigned to manual or smart custom sections. All channels is the renamed-remaining-public/private list: its membership is unchanged, so it excludes team-channels and channels assigned to custom sections. Each custom section is a-top-level heading, independent of the Team channels disclosure. Empty sections+channels assigned to manual or smart custom sections. All channels shows joined+public/private channels, including custom-section members; it excludes team+channels and DMs. Each custom section is a top-level heading, independent of the+Team channels disclosure. Empty sectionsuse padded, bordered cards like saved views, with a subtle background and secondaryactions; empty Favorites explains how to add a favorite. Private conversationsuse a lock icon in the sidebar and mobile feed, including favorited private@@ -1010,7 +1010,8 @@ conversations.All section headers use the shared collapsible-section styling without leadingicons or top padding; the section stack supplies a compact 2px flex gap.Custom-section drop zones and highlights cover both the header and its content, including the-empty state.+empty state. Rejected drops show a borderless explanation; pending section data+keeps drops disabled without covering the section with a loading message.Section, DM, and search containers use the 8px outer sidebar gutter; headingsand rows add their own item padding so headings align with the Chat title.Rows are indented by 8px under every section, including Favorites, custom@@ -1023,12 +1024,22 @@ explain the name and sharing, without overlapping native title hints. Personalsections have no scope icon or badge. Header focus backgrounds fill the entire header row, including itstrailing controls, with no extra right padding.-The sidebar scrolls through all sections. Each expanded section has its own-virtualized, scrollable list. Lists with more than two items have a resize grip;-drag it to choose a height between two rows (68px) and the end of the list,-capped by the available pane space. Shorter lists fit their content and have no+The sidebar uses TanStack Virtual for the section stack, each expanded channel+list, and search results. Rows retain stable identities through live refreshes;+focused and dragged rows remain mounted when they leave the visible range.+Keyboard navigation scrolls immediately, without animation, only when the+highlighted row enters the viewport's two-row context margin, leaving neighboring+rows visible above and below. The margin shrinks in short sections.+Section jumps also reveal the heading with surrounding context.+Capped sections scroll independently. When All channels is last and has no saved+height, it grows to show its full list while rows remain virtualized against the+outer sidebar scroll. Moving another section below it restores the normal height+cap. A manually saved All channels height takes precedence in either position.+Lists with more than two items have a resize grip; drag it to choose a height+between two rows (68px) and the end of the list, capped by the section's maximum. Shorter lists fit their content and have noresize grip. Favorites and Direct messages default to four visible rows;-other sections default to their maximum height. Focus the grip and use Up/Down+other sections default to their maximum height within the pane, except the+unresized final All channels section. Focus the grip and use Up/Downto resize by 20px (100px with Shift), or double-click to restore the default.Section heights persist as personal preferences alongside sorting and sidebarwidth. Heights adapt to filtered content and smaller panes without discarding@@ -1036,9 +1047,14 @@ the saved preference. Search covers channels and DMs regardless of sectionplacement and restores the selected row in its section when closed. Mobileretains the recent-conversation feed below.-Use the drag grip in the left gutter before the section name to reorder sections,-or focus the grip and use Up/Down. The grip does not shift the header's text or-controls. An insertion line shows the destination. Section order is a personal+Drag a section heading, its name, or the grip in the left gutter to reorder+sections, or focus the grip and use Up/Down. Pointer dragging starts only after+more than 8px of movement, never from holding still. A normal heading click still+toggles the section; releasing a drag does not. Add and menu buttons never start+a drag. The bare grip appears only on header hover or keyboard focus and stays+fixed when pressed, without its own button background. The drag highlight includes+both the grip and section name without shifting the header's text or controls.+An insertion line shows the destination. Section order is a personalpreference, including for shared sections, and survives reloads. The draggedsection appears as a card preview while its source is subdued. Other sectionsanimate into their new positions on drop or keyboard reorder, except with reduced@@ -1052,14 +1068,22 @@ per batch supplies cached channel data and fetches only missing records usingSoup's generic explicit-entity hydration. Channel batching and unread refreshesstay in the channel query layer; the sidebar does not coordinate separate cacheand network queries.-Each expanded section appends skeleton rows while its remaining channels load.+Each expanded section appends skeleton rows while its remaining channels load,+using the same row indentation and icon/text columns as loaded channels.A failed fetch keeps available rows and replaces that section's loading feedbackwith Retry. Loading sections must not briefly show an empty-state hint.Collapsing a section hides its loading feedback without changing membership orstopping shared channel hydration.--Favorites open the same channel detail as ordinary rows. Shift-clicking a-favorite, channel, or DM opens it in a new split. Rejected navigation and failed+The header does not show a Loading sections/Retry strip during normal loading.+Section reads use the shared bounded retry policy, retry on focus, and preserve+cached sections during a refetch. A failed initial load retains a compact error+and Retry action. Until section metadata is available, New section explains its+unavailable state in the creation menu; ordinary conversations remain usable.++Favorites open the same channel detail as ordinary rows. A single click opens a+row even when channel data refreshes between pressing and releasing the pointer;+section and search lists retain row identity through those updates. Shift-clicking+a favorite, channel, or DM opens it in a new split. Rejected navigation and failedhydration must not mark notifications read. Context menus retain Mark Read,Open in new split, Unfavorite, notification controls, and Copy Link.@@ -1120,18 +1144,22 @@ Deleting a section does not delete its conversations or change channel access.Every desktop section menu, including **Favorites**, **All channels**,**[team name] channels**, and **Direct messages**, offers **Mute all channels**,-**Unmute all channels**, and **Snooze all channels…**. These update only your+**Unmute all channels**, and **Snooze all channels**. These update only yournotifications, including for shared sections. Each action uses the section'scomplete current membership, including filtered-out and unloaded channels;channels added later do not inherit the change. Built-in lists resolve all pages-before applying an action and never include unjoined channels. The team section-includes custom-section members; only All channels excludes those assignments.+before applying an action and never include unjoined channels. Both the team+section and All channels include their custom-section members.Favorites targets only channel favorites, not documents or other favorite types.Snooze uses the usualduration/date picker and resumes notifications at the chosen time. A partialfailure keeps successful updates and reports the failures; snooze retries only-failed channels. Empty or unavailable custom sections and empty Favorites disable-these actions. Mobile remains unchanged.+failed channels. Mute, unmute, and snooze submit up to 500 item preferences in+one atomic backend request, rather than one request per channel. Larger selections+use sequential requests. The frontend applies confirmed changes in one cache+update, preserving unrelated preferences and successful requests if another fails.+Empty or unavailable custom sections and empty Favorites disable these actions.+Mobile remains unchanged.Use a channel's Add to section menu to change the personal or shared assignment.Each section uses a checkbox: checking moves the channel into that section,@@ -1141,6 +1169,10 @@ and shared assignments remain independent.Choose smart grouping in the section dialog for automatic name matching.Smart sections match channel names literally and without regard to capitalization. They preserve ordinary section permissions and are not manualdrop targets. Channels can appear in multiple matching smart sections.+Loaded same-team channels join matching shared smart sections immediately,+including after a rename; they do not wait for the next section refresh. If a+channel's team metadata is missing, only an existing server-authorized match is+retained. Channels from another team never become new local matches.Hovering an incompatible item over a section shows a not-allowed cursor and anexplanation over the section, including automatic membership, shared-scoperestrictions, and channels already in the section. Returning a channel to itsdiff --git a/packages/sdk-docs/reference/generated/notification/types.gen/README.md b/packages/sdk-docs/reference/generated/notification/types.gen/README.mdindex c51e7bf308..f47c6c1614 100644--- a/packages/sdk-docs/reference/generated/notification/types.gen/README.md+++ b/packages/sdk-docs/reference/generated/notification/types.gen/README.md@@ -19,6 +19,7 @@- [BulkGetTypedNotificationsByEventItemIdsErrors](type-aliases/BulkGetTypedNotificationsByEventItemIdsErrors.md)- [BulkGetTypedNotificationsByEventItemIdsResponse](type-aliases/BulkGetTypedNotificationsByEventItemIdsResponse.md)- [BulkGetTypedNotificationsByEventItemIdsResponses](type-aliases/BulkGetTypedNotificationsByEventItemIdsResponses.md)+- [BulkItem](type-aliases/BulkItem.md)- [BulkMarkNotificationsDoneData](type-aliases/BulkMarkNotificationsDoneData.md)- [BulkMarkNotificationsDoneError](type-aliases/BulkMarkNotificationsDoneError.md)- [BulkMarkNotificationsDoneErrors](type-aliases/BulkMarkNotificationsDoneErrors.md)@@ -31,6 +32,8 @@- [BulkMarkNotificationsUndoneError](type-aliases/BulkMarkNotificationsUndoneError.md)- [BulkMarkNotificationsUndoneErrors](type-aliases/BulkMarkNotificationsUndoneErrors.md)- [BulkMarkNotificationsUndoneResponses](type-aliases/BulkMarkNotificationsUndoneResponses.md)+- [BulkRemoveItemsRequest](type-aliases/BulkRemoveItemsRequest.md)+- [BulkSetItemsRequest](type-aliases/BulkSetItemsRequest.md)- [CalendarEventJoinRequestMetadata](type-aliases/CalendarEventJoinRequestMetadata.md)- [CalendarEventReminderMetadata](type-aliases/CalendarEventReminderMetadata.md)- [CallStartedMetadata](type-aliases/CallStartedMetadata.md)@@ -143,6 +146,11 @@- [RemoveUnsubscribeItemErrors](type-aliases/RemoveUnsubscribeItemErrors.md)- [RemoveUnsubscribeItemResponse](type-aliases/RemoveUnsubscribeItemResponse.md)- [RemoveUnsubscribeItemResponses](type-aliases/RemoveUnsubscribeItemResponses.md)+- [RemoveUnsubscribeItemsData](type-aliases/RemoveUnsubscribeItemsData.md)+- [RemoveUnsubscribeItemsError](type-aliases/RemoveUnsubscribeItemsError.md)+- [RemoveUnsubscribeItemsErrors](type-aliases/RemoveUnsubscribeItemsErrors.md)+- [RemoveUnsubscribeItemsResponse](type-aliases/RemoveUnsubscribeItemsResponse.md)+- [RemoveUnsubscribeItemsResponses](type-aliases/RemoveUnsubscribeItemsResponses.md)- [RepliedToDocumentCommentThreadMetadata](type-aliases/RepliedToDocumentCommentThreadMetadata.md)- [RequestedAccessLevel](type-aliases/RequestedAccessLevel.md)- [RoutineRunFinishedMetadata](type-aliases/RoutineRunFinishedMetadata.md)@@ -164,4 +172,9 @@- [UnsubscribeItemPathParams](type-aliases/UnsubscribeItemPathParams.md)- [UnsubscribeItemResponse](type-aliases/UnsubscribeItemResponse.md)- [UnsubscribeItemResponses](type-aliases/UnsubscribeItemResponses.md)+- [UnsubscribeItemsData](type-aliases/UnsubscribeItemsData.md)+- [UnsubscribeItemsError](type-aliases/UnsubscribeItemsError.md)+- [UnsubscribeItemsErrors](type-aliases/UnsubscribeItemsErrors.md)+- [UnsubscribeItemsResponse](type-aliases/UnsubscribeItemsResponse.md)+- [UnsubscribeItemsResponses](type-aliases/UnsubscribeItemsResponses.md)- [UserUnsubscribe](type-aliases/UserUnsubscribe.md)diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkItem.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkItem.mdnew file mode 100644index 0000000000..d930620202--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkItem.md@@ -0,0 +1,10 @@+# Type Alias: BulkItem++> **BulkItem** = \{ `item_id`: `string`; `item_type`: [`EntityType`](EntityType.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-item_id"></a> `item_id` | `string` |+| <a id="property-item_type"></a> `item_type` | [`EntityType`](EntityType.md) |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkRemoveItemsRequest.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkRemoveItemsRequest.mdnew file mode 100644index 0000000000..b8c5d23d19--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkRemoveItemsRequest.md@@ -0,0 +1,9 @@+# Type Alias: BulkRemoveItemsRequest++> **BulkRemoveItemsRequest** = \{ `items`: [`BulkItem`](BulkItem.md)[]; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-items"></a> `items` | [`BulkItem`](BulkItem.md)[] |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkSetItemsRequest.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkSetItemsRequest.mdnew file mode 100644index 0000000000..55448530fe--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/BulkSetItemsRequest.md@@ -0,0 +1,10 @@+# Type Alias: BulkSetItemsRequest++> **BulkSetItemsRequest** = \{ `items`: [`BulkItem`](BulkItem.md)[]; `snoozed_until?`: `string` \| `null`; \}++## Properties++| Property | Type | Description |+| ------ | ------ | ------ |+| <a id="property-items"></a> `items` | [`BulkItem`](BulkItem.md)[] | - |+| <a id="property-snoozed_until"></a> `snoozed_until?` | `string` \| `null` | A future resume time. Omit to mute indefinitely. |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsData.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsData.mdnew file mode 100644index 0000000000..299af4f197--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsData.md@@ -0,0 +1,12 @@+# Type Alias: RemoveUnsubscribeItemsData++> **RemoveUnsubscribeItemsData** = \{ `body`: [`BulkRemoveItemsRequest`](BulkRemoveItemsRequest.md); `path?`: `never`; `query?`: `never`; `url`: `"/unsubscribe/items"`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-body"></a> `body` | [`BulkRemoveItemsRequest`](BulkRemoveItemsRequest.md) |+| <a id="property-path"></a> `path?` | `never` |+| <a id="property-query"></a> `query?` | `never` |+| <a id="property-url"></a> `url` | `"/unsubscribe/items"` |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsError.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsError.mdnew file mode 100644index 0000000000..2fb160dec2--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsError.md@@ -0,0 +1,3 @@+# Type Alias: RemoveUnsubscribeItemsError++> **RemoveUnsubscribeItemsError** = [`RemoveUnsubscribeItemsErrors`](RemoveUnsubscribeItemsErrors.md)\[keyof [`RemoveUnsubscribeItemsErrors`](RemoveUnsubscribeItemsErrors.md)\]diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsErrors.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsErrors.mdnew file mode 100644index 0000000000..fddcdc75e2--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsErrors.md@@ -0,0 +1,11 @@+# Type Alias: RemoveUnsubscribeItemsErrors++> **RemoveUnsubscribeItemsErrors** = \{ `400`: [`ErrorResponse`](ErrorResponse.md); `401`: [`ErrorResponse`](ErrorResponse.md); `500`: [`ErrorResponse`](ErrorResponse.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-400"></a> `400` | [`ErrorResponse`](ErrorResponse.md) |+| <a id="property-401"></a> `401` | [`ErrorResponse`](ErrorResponse.md) |+| <a id="property-500"></a> `500` | [`ErrorResponse`](ErrorResponse.md) |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponse.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponse.mdnew file mode 100644index 0000000000..3b4287540e--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponse.md@@ -0,0 +1,3 @@+# Type Alias: RemoveUnsubscribeItemsResponse++> **RemoveUnsubscribeItemsResponse** = [`RemoveUnsubscribeItemsResponses`](RemoveUnsubscribeItemsResponses.md)\[keyof [`RemoveUnsubscribeItemsResponses`](RemoveUnsubscribeItemsResponses.md)\]diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponses.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponses.mdnew file mode 100644index 0000000000..80cb3e8e7b--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/RemoveUnsubscribeItemsResponses.md@@ -0,0 +1,9 @@+# Type Alias: RemoveUnsubscribeItemsResponses++> **RemoveUnsubscribeItemsResponses** = \{ `200`: [`EmptyResponse`](EmptyResponse.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-200"></a> `200` | [`EmptyResponse`](EmptyResponse.md) |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsData.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsData.mdnew file mode 100644index 0000000000..983b9289e2--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsData.md@@ -0,0 +1,12 @@+# Type Alias: UnsubscribeItemsData++> **UnsubscribeItemsData** = \{ `body`: [`BulkSetItemsRequest`](BulkSetItemsRequest.md); `path?`: `never`; `query?`: `never`; `url`: `"/unsubscribe/items"`; \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-body"></a> `body` | [`BulkSetItemsRequest`](BulkSetItemsRequest.md) |+| <a id="property-path"></a> `path?` | `never` |+| <a id="property-query"></a> `query?` | `never` |+| <a id="property-url"></a> `url` | `"/unsubscribe/items"` |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsError.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsError.mdnew file mode 100644index 0000000000..ff56ac4241--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsError.md@@ -0,0 +1,3 @@+# Type Alias: UnsubscribeItemsError++> **UnsubscribeItemsError** = [`UnsubscribeItemsErrors`](UnsubscribeItemsErrors.md)\[keyof [`UnsubscribeItemsErrors`](UnsubscribeItemsErrors.md)\]diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsErrors.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsErrors.mdnew file mode 100644index 0000000000..5cee49812a--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsErrors.md@@ -0,0 +1,11 @@+# Type Alias: UnsubscribeItemsErrors++> **UnsubscribeItemsErrors** = \{ `400`: [`ErrorResponse`](ErrorResponse.md); `401`: [`ErrorResponse`](ErrorResponse.md); `500`: [`ErrorResponse`](ErrorResponse.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-400"></a> `400` | [`ErrorResponse`](ErrorResponse.md) |+| <a id="property-401"></a> `401` | [`ErrorResponse`](ErrorResponse.md) |+| <a id="property-500"></a> `500` | [`ErrorResponse`](ErrorResponse.md) |diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponse.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponse.mdnew file mode 100644index 0000000000..cf2cb80361--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponse.md@@ -0,0 +1,3 @@+# Type Alias: UnsubscribeItemsResponse++> **UnsubscribeItemsResponse** = [`UnsubscribeItemsResponses`](UnsubscribeItemsResponses.md)\[keyof [`UnsubscribeItemsResponses`](UnsubscribeItemsResponses.md)\]diff --git a/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponses.md b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponses.mdnew file mode 100644index 0000000000..800f50d616--- /dev/null+++ b/packages/sdk-docs/reference/generated/notification/types.gen/type-aliases/UnsubscribeItemsResponses.md@@ -0,0 +1,9 @@+# Type Alias: UnsubscribeItemsResponses++> **UnsubscribeItemsResponses** = \{ `200`: [`EmptyResponse`](EmptyResponse.md); \}++## Properties++| Property | Type |+| ------ | ------ |+| <a id="property-200"></a> `200` | [`EmptyResponse`](EmptyResponse.md) |diff --git a/packages/sdk/AGENTS.md b/packages/sdk/AGENTS.mdindex 2973cc7594..3286885755 100644--- a/packages/sdk/AGENTS.md+++ b/packages/sdk/AGENTS.md@@ -34,6 +34,7 @@ enforced by the ordinary backend APIs.- Keep handwritten behavior in `src/`; never edit `generated/` or `specs/`.- Keep WhatsApp pairing, passkeys, connection setup/disconnect and rollout configuration out of the handwritten public SDK; operate on accounts linked in the app, with personal bearer sessions for account/access controls. External chat sends/uploads accept the connection owner's session or own API token; bots never send.+- Keep notification mute, unmute, and snooze endpoints, including bulk item preferences, in the app-only coverage exclusions.- Keep `external-chat/` provider-neutral; provider-specific reads (WhatsApp community chats) branch on `provider` with an exhaustive match.- Use existing entity handles for reads and mutations. Follow the[SDK rule](../../.agents/rules/sdk.md) and `add-sdk-endpoint` skill.@@ -76,6 +77,8 @@ the existing gateway prefixes.in step.- Regenerate Rust OpenAPI and web service clients before `bun run sync-specs &&bun run generate`; do not copy deployed schemas over a local API change.+- Run `bun run generate` to regenerate SDK clients and normalize whitespace-only+ lines; do not hand-edit generated output to satisfy whitespace checks.- Regenerate `../sdk-docs/reference` after SDK source or generated type changes;run that package's checks because web CI verifies the reference is current.Also run `bun packages/code-mode-sdk/scripts/generate.ts` from the root anddiff --git a/packages/sdk/generated/agent-harness/sdk.gen.ts b/packages/sdk/generated/agent-harness/sdk.gen.tsindex fe37d7732d..020fa89e35 100644--- a/packages/sdk/generated/agent-harness/sdk.gen.ts+++ b/packages/sdk/generated/agent-harness/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,14 +56,14 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Read which triggers archive the caller's sessions by default.*/public getAgentAutoArchivePreferences<ThrowOnError extends boolean = false>(options?: Options<GetAgentAutoArchivePreferencesData, ThrowOnError>): RequestResult<GetAgentAutoArchivePreferencesResponses, GetAgentAutoArchivePreferencesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetAgentAutoArchivePreferencesResponses, GetAgentAutoArchivePreferencesErrors, ThrowOnError>({ url: '/agent-auto-archive-preferences', ...options });}-+/*** Replace which triggers archive the caller's sessions by default.*/@@ -77,7 +77,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Probe one provider's ACP session configuration without persisting a session.*/@@ -92,14 +92,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read what the caller's new coding sessions are told to do beyond their assignment.*/public getAgentCodingPreferences<ThrowOnError extends boolean = false>(options?: Options<GetAgentCodingPreferencesData, ThrowOnError>): RequestResult<GetAgentCodingPreferencesResponses, GetAgentCodingPreferencesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetAgentCodingPreferencesResponses, GetAgentCodingPreferencesErrors, ThrowOnError>({ url: '/agent-coding-preferences', ...options });}-+/*** Replace the caller's coding preferences.*/@@ -113,7 +113,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** The agent conversations in a channel the caller may see. Ordinary channels* and other people's conversations list none.@@ -125,7 +125,7 @@ export class Sdk extends HeyApiClient {...options});}-+/*** Start a fresh agent context, retaining the channel transcript.*/@@ -140,7 +140,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Explicitly retry a failed message in the conversation's current session.*/@@ -155,7 +155,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Choose whether a composer prompt goes to a chat or a coding agent.*/@@ -170,7 +170,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Probe one provider's model catalog without creating an agent session.*/@@ -185,7 +185,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the GitHub repositories the caller can select for a coding session.*/@@ -196,7 +196,7 @@ export class Sdk extends HeyApiClient {...options});}-+/*** List the branches on one repository the caller can start a session from.*/@@ -207,14 +207,14 @@ export class Sdk extends HeyApiClient {...options});}-+/*** Read the caller's default sandbox size for new `@coder` sessions.*/public getAgentSandboxSize<ThrowOnError extends boolean = false>(options?: Options<GetAgentSandboxSizeData, ThrowOnError>): RequestResult<GetAgentSandboxSizeResponses, GetAgentSandboxSizeErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetAgentSandboxSizeResponses, GetAgentSandboxSizeErrors, ThrowOnError>({ url: '/agent-sandbox-size', ...options });}-+/*** Set the caller's default sandbox size for the next `@coder` mention.*/@@ -228,7 +228,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Open an agent session served by an external runtime.*@@ -248,7 +248,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the sessions associated with a pull request that the caller can view.*/@@ -262,7 +262,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the sessions associated with each of up to 100 pull requests that the caller can view,* with the thread each session was started from.@@ -277,7 +277,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Preview a batch of agent sessions for rendering chips.*@@ -296,7 +296,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Prepare MCP connections without sending a prompt or creating a visible list row.*/@@ -310,14 +310,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete an agent session and its live resources.*/public deleteAgentSession<ThrowOnError extends boolean = false>(options: Options<DeleteAgentSessionData, ThrowOnError>): RequestResult<DeleteAgentSessionResponses, DeleteAgentSessionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteAgentSessionResponses, DeleteAgentSessionErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}', ...options });}-+/*** Get an agent session by id.*@@ -329,7 +329,7 @@ export class Sdk extends HeyApiClient {public getAgentSession<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionData, ThrowOnError>): RequestResult<GetAgentSessionResponses, GetAgentSessionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionResponses, GetAgentSessionErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}', ...options });}-+/*** Continue the session now that its owner connected an app it asked for.*@@ -346,7 +346,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Archive or unarchive an agent session.*/@@ -360,14 +360,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read a session's auto-archive settings and whether a trigger archived it.*/public getAgentSessionAutoArchive<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionAutoArchiveData, ThrowOnError>): RequestResult<GetAgentSessionAutoArchiveResponses, GetAgentSessionAutoArchiveErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionAutoArchiveResponses, GetAgentSessionAutoArchiveErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/auto-archive', ...options });}-+/*** Replace a session's own auto-archive choices. Owner only.*/@@ -381,7 +381,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** The latest captured changes of an agent session: the changed files with* statuses and line counts, and how the latest capture attempt went.@@ -389,14 +389,14 @@ export class Sdk extends HeyApiClient {public getAgentSessionChanges<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionChangesData, ThrowOnError>): RequestResult<GetAgentSessionChangesResponses, GetAgentSessionChangesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionChangesResponses, GetAgentSessionChangesErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/changes', ...options });}-+/*** The unified diff behind the session's latest changeset.*/public getAgentSessionChangesPatch<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionChangesPatchData, ThrowOnError>): RequestResult<GetAgentSessionChangesPatchResponses, GetAgentSessionChangesPatchErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionChangesPatchResponses, GetAgentSessionChangesPatchErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/changes/patch', ...options });}-+/*** Capture the session's changes again now. Answers at once with the state* as it stands; the capture runs on and viewers are told when it lands.@@ -404,21 +404,21 @@ export class Sdk extends HeyApiClient {public refreshAgentSessionChanges<ThrowOnError extends boolean = false>(options: Options<RefreshAgentSessionChangesData, ThrowOnError>): RequestResult<RefreshAgentSessionChangesResponses, RefreshAgentSessionChangesErrors, ThrowOnError> {return (options.client ?? this.client).post<RefreshAgentSessionChangesResponses, RefreshAgentSessionChangesErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/changes/refresh', ...options });}-+/*** Fetch one execution only after the caller has obtained view access to its session.*/public getCodeExecution<ThrowOnError extends boolean = false>(options: Options<GetCodeExecutionData, ThrowOnError>): RequestResult<GetCodeExecutionResponses, GetCodeExecutionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetCodeExecutionResponses, GetCodeExecutionErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/code-executions/{execution_id}', ...options });}-+/*** List blocks created during an execution, including interrupted executions.*/public listExecutionReviews<ThrowOnError extends boolean = false>(options: Options<ListExecutionReviewsData, ThrowOnError>): RequestResult<ListExecutionReviewsResponses, ListExecutionReviewsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListExecutionReviewsResponses, ListExecutionReviewsErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/code-executions/{execution_id}/reviews', ...options });}-+/*** Perform a control operation on a live agent session.*@@ -439,7 +439,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** The raw protocol log of one agent session.*@@ -453,7 +453,7 @@ export class Sdk extends HeyApiClient {public getAgentSessionLog<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionLogData, ThrowOnError>): RequestResult<GetAgentSessionLogResponses, GetAgentSessionLogErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionLogResponses, GetAgentSessionLogErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/log', ...options });}-+/*** One agent session's history folded into renderable messages: the same* fold the web client runs over [`get_agent_session_log_handler`]'s frames.@@ -464,7 +464,7 @@ export class Sdk extends HeyApiClient {public getAgentSessionFoldedLog<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionFoldedLogData, ThrowOnError>): RequestResult<GetAgentSessionFoldedLogResponses, GetAgentSessionFoldedLogErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionFoldedLogResponses, GetAgentSessionFoldedLogErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/log/folded', ...options });}-+/*** Rename an agent session.*/@@ -478,14 +478,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read sharing settings for a session the caller can view.*/public getAgentSessionPermissions<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionPermissionsData, ThrowOnError>): RequestResult<GetAgentSessionPermissionsResponses, GetAgentSessionPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionPermissionsResponses, GetAgentSessionPermissionsErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/permissions', ...options });}-+/*** Update link, channel, or team sharing after owner authorization.*/@@ -499,7 +499,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Unlink a pull request a person linked to a session the caller can edit. The pull request* the session's agent opened stays linked.@@ -507,14 +507,14 @@ export class Sdk extends HeyApiClient {public unlinkAgentSessionPullRequest<ThrowOnError extends boolean = false>(options: Options<UnlinkAgentSessionPullRequestData, ThrowOnError>): RequestResult<UnlinkAgentSessionPullRequestResponses, UnlinkAgentSessionPullRequestErrors, ThrowOnError> {return (options.client ?? this.client).delete<UnlinkAgentSessionPullRequestResponses, UnlinkAgentSessionPullRequestErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/pull-requests', ...options });}-+/*** List the pull requests associated with a session the caller can view.*/public listAgentSessionPullRequests<ThrowOnError extends boolean = false>(options: Options<ListAgentSessionPullRequestsData, ThrowOnError>): RequestResult<ListAgentSessionPullRequestsResponses, ListAgentSessionPullRequestsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListAgentSessionPullRequestsResponses, ListAgentSessionPullRequestsErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/pull-requests', ...options });}-+/*** Link a pull request to a session the caller can edit.*/@@ -528,14 +528,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** The actions waiting to dispatch in this session, oldest first.*/public getAgentSessionQueue<ThrowOnError extends boolean = false>(options: Options<GetAgentSessionQueueData, ThrowOnError>): RequestResult<GetAgentSessionQueueResponses, GetAgentSessionQueueErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentSessionQueueResponses, GetAgentSessionQueueErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/queue', ...options });}-+/*** Remove a queued action before it dispatches. There is no un-sending: an* action that already went out answers 404.@@ -543,7 +543,7 @@ export class Sdk extends HeyApiClient {public removeQueuedAction<ThrowOnError extends boolean = false>(options: Options<RemoveQueuedActionData, ThrowOnError>): RequestResult<RemoveQueuedActionResponses, RemoveQueuedActionErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveQueuedActionResponses, RemoveQueuedActionErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/queue/{action_id}', ...options });}-+/*** Replace a queued prompt's text before it dispatches.*/@@ -557,7 +557,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Run a queued action next. Moves it ahead of the rest of the queue and* cancels the turn in flight, so this entry dispatches when that turn ends.@@ -565,7 +565,7 @@ export class Sdk extends HeyApiClient {public steerQueuedAction<ThrowOnError extends boolean = false>(options: Options<SteerQueuedActionData, ThrowOnError>): RequestResult<SteerQueuedActionResponses, SteerQueuedActionErrors, ThrowOnError> {return (options.client ?? this.client).post<SteerQueuedActionResponses, SteerQueuedActionErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/queue/{action_id}/steer', ...options });}-+/*** Persist a review without keeping the agent turn blocked.*/@@ -579,14 +579,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read a persisted interactive block.*/public getSessionReview<ThrowOnError extends boolean = false>(options: Options<GetSessionReviewData, ThrowOnError>): RequestResult<GetSessionReviewResponses, GetSessionReviewErrors, ThrowOnError> {return (options.client ?? this.client).get<GetSessionReviewResponses, GetSessionReviewErrors, ThrowOnError>({ url: '/agent-sessions/{session_id}/reviews/{review_id}', ...options });}-+/*** Save edits or atomically claim the exact draft revision the user submitted.*/@@ -600,7 +600,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Resize this session's sandbox and remember the size as the owner's default.*/@@ -614,7 +614,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Answer a tool call the agent made in a turn somebody other than the* session's owner prompted. Approve and deny are the owner's; cancel is@@ -630,7 +630,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Present a view in the session: a review with nothing saved.*/@@ -644,7 +644,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Classify a draft for the authenticated user.*/@@ -658,7 +658,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Extract editable fields for the authenticated user.*/diff --git a/packages/sdk/generated/auth/sdk.gen.ts b/packages/sdk/generated/auth/sdk.gen.tsindex 50ac4eafe4..e28112f5e9 100644--- a/packages/sdk/generated/auth/sdk.gen.ts+++ b/packages/sdk/generated/auth/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,7 +56,7 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Forgets the agent's API key. Does not revoke it at the provider; succeeds* when there was none.@@ -64,14 +64,14 @@ export class Sdk extends HeyApiClient {public deleteAgentApiKey<ThrowOnError extends boolean = false>(options: Options<DeleteAgentApiKeyData, ThrowOnError>): RequestResult<DeleteAgentApiKeyResponses, DeleteAgentApiKeyErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteAgentApiKeyResponses, DeleteAgentApiKeyErrors, ThrowOnError>({ url: '/agents/{agent_id}/api-key', ...options });}-+/*** The agent's API key, if it has one, and whether its plan allows one.*/public getAgentApiKey<ThrowOnError extends boolean = false>(options: Options<GetAgentApiKeyData, ThrowOnError>): RequestResult<GetAgentApiKeyResponses, GetAgentApiKeyErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAgentApiKeyResponses, GetAgentApiKeyErrors, ThrowOnError>({ url: '/agents/{agent_id}/api-key', ...options });}-+/*** Registers or replaces the agent's API key, for its model's provider.* Only in-memory agents on an Anthropic or OpenAI model, on a paid plan.@@ -86,7 +86,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Turn automatic credit reloads on with the given* thresholds, or off. Payer only. Enabling settles right away, so a balance@@ -102,7 +102,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Start a Stripe Checkout for a credit pack. Payer only.*/@@ -116,7 +116,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Buy a credit pack now, charged to the payer's card on file. Any paid team* member may buy, within the team's monthly credit limit.@@ -131,7 +131,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Retired direct-usage opt-in. Enabling is rejected; disabling remains supported.*/@@ -145,7 +145,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** The plan catalog, credit packs, overage cap bounds, and automatic reload* defaults and bounds.@@ -153,7 +153,7 @@ export class Sdk extends HeyApiClient {public getAiBillingPlans<ThrowOnError extends boolean = false>(options?: Options<GetAiBillingPlansData, ThrowOnError>): RequestResult<GetAiBillingPlansResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<GetAiBillingPlansResponses, unknown, ThrowOnError>({ url: '/ai-billing/plans', ...options });}-+/*** The caller's current-period AI usage, credits, and overage settings.*@@ -163,15 +163,15 @@ export class Sdk extends HeyApiClient {public getAiBillingSummary<ThrowOnError extends boolean = false>(options?: Options<GetAiBillingSummaryData, ThrowOnError>): RequestResult<GetAiBillingSummaryResponses, GetAiBillingSummaryErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetAiBillingSummaryResponses, GetAiBillingSummaryErrors, ThrowOnError>({ url: '/ai-billing/summary', ...options });}-+public disconnectCodex<ThrowOnError extends boolean = false>(options?: Options<DisconnectCodexData, ThrowOnError>): RequestResult<DisconnectCodexResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).delete<DisconnectCodexResponses, unknown, ThrowOnError>({ url: '/codex', ...options });}-+public getCodexConnection<ThrowOnError extends boolean = false>(options?: Options<GetCodexConnectionData, ThrowOnError>): RequestResult<GetCodexConnectionResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<GetCodexConnectionResponses, unknown, ThrowOnError>({ url: '/codex', ...options });}-+public configureCodex<ThrowOnError extends boolean = false>(options: Options<ConfigureCodexData, ThrowOnError>): RequestResult<ConfigureCodexResponses, unknown, ThrowOnError> {return (options.client ?? this.client).put<ConfigureCodexResponses, unknown, ThrowOnError>({url: '/codex/config',@@ -182,23 +182,23 @@ export class Sdk extends HeyApiClient {}});}-+public listCodexEnvironments<ThrowOnError extends boolean = false>(options?: Options<ListCodexEnvironmentsData, ThrowOnError>): RequestResult<ListCodexEnvironmentsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<ListCodexEnvironmentsResponses, unknown, ThrowOnError>({ url: '/codex/environments', ...options });}-+public startCodexLogin<ThrowOnError extends boolean = false>(options?: Options<StartCodexLoginData, ThrowOnError>): RequestResult<StartCodexLoginResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).post<StartCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login', ...options });}-+public cancelCodexLogin<ThrowOnError extends boolean = false>(options: Options<CancelCodexLoginData, ThrowOnError>): RequestResult<CancelCodexLoginResponses, unknown, ThrowOnError> {return (options.client ?? this.client).delete<CancelCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login/{attempt_id}', ...options });}-+public pollCodexLogin<ThrowOnError extends boolean = false>(options: Options<PollCodexLoginData, ThrowOnError>): RequestResult<PollCodexLoginResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<PollCodexLoginResponses, unknown, ThrowOnError>({ url: '/codex/login/{attempt_id}', ...options });}-+/*** Forgets the caller's Cursor API key.*@@ -212,7 +212,7 @@ export class Sdk extends HeyApiClient {public deleteCursorApiKey<ThrowOnError extends boolean = false>(options?: Options<DeleteCursorApiKeyData, ThrowOnError>): RequestResult<DeleteCursorApiKeyResponses, DeleteCursorApiKeyErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteCursorApiKeyResponses, DeleteCursorApiKeyErrors, ThrowOnError>({ url: '/cursor-api-key', ...options });}-+/*** Whether the caller has a Cursor API key registered.*@@ -222,7 +222,7 @@ export class Sdk extends HeyApiClient {public getCursorApiKey<ThrowOnError extends boolean = false>(options?: Options<GetCursorApiKeyData, ThrowOnError>): RequestResult<GetCursorApiKeyResponses, GetCursorApiKeyErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetCursorApiKeyResponses, GetCursorApiKeyErrors, ThrowOnError>({ url: '/cursor-api-key', ...options });}-+/*** Registers or replaces the caller's Cursor API key.*@@ -241,7 +241,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Choose the model this user's `@cursor` sessions start on.*@@ -261,7 +261,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the models the caller's Cursor account offers.*@@ -274,14 +274,14 @@ export class Sdk extends HeyApiClient {public listCursorModels<ThrowOnError extends boolean = false>(options?: Options<ListCursorModelsData, ThrowOnError>): RequestResult<ListCursorModelsResponses, ListCursorModelsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListCursorModelsResponses, ListCursorModelsErrors, ThrowOnError>({ url: '/cursor-api-key/models', ...options });}-+/*** Verifies the user's primary email for FusionAuth*/public verifyFusionauthUserEmail<ThrowOnError extends boolean = false>(options: Options<VerifyFusionauthUserEmailData, ThrowOnError>): RequestResult<VerifyFusionauthUserEmailResponses, VerifyFusionauthUserEmailErrors, ThrowOnError> {return (options.client ?? this.client).get<VerifyFusionauthUserEmailResponses, VerifyFusionauthUserEmailErrors, ThrowOnError>({ url: '/email/fusionauth/verify/{verification_id}', ...options });}-+/*** Resend the user's primary email verification for FusionAuth*/@@ -295,7 +295,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Generates an email link for the user to verify their email address.*/@@ -309,14 +309,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Verifies the user's email for a user profile*/public verifyEmailLink<ThrowOnError extends boolean = false>(options: Options<VerifyEmailLinkData, ThrowOnError>): RequestResult<VerifyEmailLinkResponses, VerifyEmailLinkErrors, ThrowOnError> {return (options.client ?? this.client).get<VerifyEmailLinkResponses, VerifyEmailLinkErrors, ThrowOnError>({ url: '/email/verify/{verification_id}', ...options });}-+/*** Converts a GitHub pull request to a draft, or marks it ready for review,* as the authenticated user with their own GitHub grant.@@ -331,7 +331,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Enriches GitHub pull request references with live GitHub data for the authenticated user.*/@@ -345,7 +345,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Merges a GitHub pull request as the authenticated user, with their own* GitHub grant. GitHub applies the user's permissions and the repository's@@ -361,7 +361,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Reads whether each GitHub pull request merges cleanly into its base, as* the authenticated user sees it. Pull requests the user cannot see are@@ -377,7 +377,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Closes a GitHub pull request, or reopens it, as the authenticated user* with their own GitHub grant.@@ -392,14 +392,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Lists invite links, newest first. Macro staff only.*/public listGtmInviteLinks<ThrowOnError extends boolean = false>(options?: Options<ListGtmInviteLinksData, ThrowOnError>): RequestResult<ListGtmInviteLinksResponses, ListGtmInviteLinksErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListGtmInviteLinksResponses, ListGtmInviteLinksErrors, ThrowOnError>({ url: '/gtm-invite/links', ...options });}-+/*** Creates an invite link. Macro staff only.*/@@ -413,14 +413,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Revokes an invite link nobody has signed up through. Macro staff only.*/public revokeGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<RevokeGtmInviteLinkData, ThrowOnError>): RequestResult<RevokeGtmInviteLinkResponses, RevokeGtmInviteLinkErrors, ThrowOnError> {return (options.client ?? this.client).delete<RevokeGtmInviteLinkResponses, RevokeGtmInviteLinkErrors, ThrowOnError>({ url: '/gtm-invite/links/{id}', ...options });}-+/*** The promotion the signed-in user's account holds from an invite link, if* they redeemed one and have not started a paid subscription yet.@@ -428,7 +428,7 @@ export class Sdk extends HeyApiClient {public getGtmInviteOffer<ThrowOnError extends boolean = false>(options?: Options<GetGtmInviteOfferData, ThrowOnError>): RequestResult<GetGtmInviteOfferResponses, GetGtmInviteOfferErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetGtmInviteOfferResponses, GetGtmInviteOfferErrors, ThrowOnError>({ url: '/gtm-invite/offer', ...options });}-+/*** Resolves an invite link for the public welcome page and counts the open.*@@ -438,7 +438,7 @@ export class Sdk extends HeyApiClient {public resolveGtmInviteLink<ThrowOnError extends boolean = false>(options: Options<ResolveGtmInviteLinkData, ThrowOnError>): RequestResult<ResolveGtmInviteLinkResponses, ResolveGtmInviteLinkErrors, ThrowOnError> {return (options.client ?? this.client).get<ResolveGtmInviteLinkResponses, ResolveGtmInviteLinkErrors, ThrowOnError>({ url: '/gtm-invite/public/{token}', ...options });}-+/*** Attributes the signed-in user's account to the invite link they opened and* grants them its offer. Idempotent for the same account.@@ -453,14 +453,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Generates a macro-api-token using the user's macro-access-token* You can either have your access token in the cookies or in the request@@ -471,7 +471,7 @@ export class Sdk extends HeyApiClient {public macroApiToken<ThrowOnError extends boolean = false>(options: Options<MacroApiTokenData, ThrowOnError>): RequestResult<MacroApiTokenResponses, MacroApiTokenErrors, ThrowOnError> {return (options.client ?? this.client).get<MacroApiTokenResponses, MacroApiTokenErrors, ThrowOnError>({ url: '/jwt/macro_api_token', ...options });}-+/*** Refreshes a JWT token* You can either have your access token and refresh token in the cookies or in the request@@ -483,60 +483,60 @@ export class Sdk extends HeyApiClient {public refresh<ThrowOnError extends boolean = false>(options?: Options<RefreshData, ThrowOnError>): RequestResult<RefreshResponses, RefreshErrors, ThrowOnError> {return (options?.client ?? this.client).post<RefreshResponses, RefreshErrors, ThrowOnError>({ url: '/jwt/refresh', ...options });}-+/*** Initiates a link for a user*/public createInProgressLink<ThrowOnError extends boolean = false>(options?: Options<CreateInProgressLinkData, ThrowOnError>): RequestResult<CreateInProgressLinkResponses, CreateInProgressLinkErrors, ThrowOnError> {return (options?.client ?? this.client).post<CreateInProgressLinkResponses, CreateInProgressLinkErrors, ThrowOnError>({ url: '/link', ...options });}-+public emailConnectionProviders<ThrowOnError extends boolean = false>(options?: Options<EmailConnectionProvidersData, ThrowOnError>): RequestResult<EmailConnectionProvidersResponses, EmailConnectionProvidersErrors, ThrowOnError> {return (options?.client ?? this.client).get<EmailConnectionProvidersResponses, EmailConnectionProvidersErrors, ThrowOnError>({ url: '/link/email/providers', ...options });}-+/*** Deletes a github link for a user*/public deleteGithubLink<ThrowOnError extends boolean = false>(options?: Options<DeleteGithubLinkData, ThrowOnError>): RequestResult<DeleteGithubLinkResponses, DeleteGithubLinkErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteGithubLinkResponses, DeleteGithubLinkErrors, ThrowOnError>({ url: '/link/github', ...options });}-+/*** Initiates a link for a user*/public initGithubLink<ThrowOnError extends boolean = false>(options: Options<InitGithubLinkData, ThrowOnError>): RequestResult<InitGithubLinkResponses, InitGithubLinkErrors, ThrowOnError> {return (options.client ?? this.client).post<InitGithubLinkResponses, InitGithubLinkErrors, ThrowOnError>({ url: '/link/github', ...options });}-+/*** Checks whether the authenticated user's GitHub link token is valid.*/public checkGithubLinkStatus<ThrowOnError extends boolean = false>(options?: Options<CheckGithubLinkStatusData, ThrowOnError>): RequestResult<CheckGithubLinkStatusResponses, CheckGithubLinkStatusErrors, ThrowOnError> {return (options?.client ?? this.client).get<CheckGithubLinkStatusResponses, CheckGithubLinkStatusErrors, ThrowOnError>({ url: '/link/github/status', ...options });}-+/*** Initiates a Gmail link for a user*/public initGmailLink<ThrowOnError extends boolean = false>(options: Options<InitGmailLinkData, ThrowOnError>): RequestResult<InitGmailLinkResponses, InitGmailLinkErrors, ThrowOnError> {return (options.client ?? this.client).post<InitGmailLinkResponses, InitGmailLinkErrors, ThrowOnError>({ url: '/link/gmail', ...options });}-+/*** Checks whether the authenticated user's gmail link is valid.*/public checkGmailLinkStatus<ThrowOnError extends boolean = false>(options?: Options<CheckGmailLinkStatusData, ThrowOnError>): RequestResult<CheckGmailLinkStatusResponses, CheckGmailLinkStatusErrors, ThrowOnError> {return (options?.client ?? this.client).get<CheckGmailLinkStatusResponses, CheckGmailLinkStatusErrors, ThrowOnError>({ url: '/link/gmail/status', ...options });}-+/*** Initiates a Microsoft Outlook account link for an authenticated user.*/public initOutlookLink<ThrowOnError extends boolean = false>(options?: Options<InitOutlookLinkData, ThrowOnError>): RequestResult<InitOutlookLinkResponses, InitOutlookLinkErrors, ThrowOnError> {return (options?.client ?? this.client).post<InitOutlookLinkResponses, InitOutlookLinkErrors, ThrowOnError>({ url: '/link/outlook', ...options });}-+/*** Completes the apple login flow*/@@ -550,7 +550,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Performs a password login*/@@ -564,7 +564,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Initiates a passwordless login*/@@ -578,21 +578,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Initiates an SSO login*/public ssoLogin<ThrowOnError extends boolean = false>(options: Options<SsoLoginData, ThrowOnError>): RequestResult<SsoLoginResponses, SsoLoginErrors, ThrowOnError> {return (options.client ?? this.client).get<SsoLoginResponses, SsoLoginErrors, ThrowOnError>({ url: '/login/sso', ...options });}-+/*** Initiates a passwordless login*/public logout<ThrowOnError extends boolean = false>(options?: Options<LogoutData, ThrowOnError>): RequestResult<LogoutResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).post<LogoutResponses, unknown, ThrowOnError>({ url: '/logout', ...options });}-+/*** Creates a merge request used to verify the user's email address in order to merge their* accounts.@@ -609,14 +609,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Verifies the merge request*/public verifyMergeRequest<ThrowOnError extends boolean = false>(options: Options<VerifyMergeRequestData, ThrowOnError>): RequestResult<VerifyMergeRequestResponses, VerifyMergeRequestErrors, ThrowOnError> {return (options.client ?? this.client).get<VerifyMergeRequestResponses, VerifyMergeRequestErrors, ThrowOnError>({ url: '/merge/verify/{code}', ...options });}-+/*** Emails a mobile lead a link to continue onboarding on desktop and enrolls* them in the Loops welcome sequence. No-ops if the address was already@@ -632,42 +632,42 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handles oauth redirect*/public passwordlessCallback<ThrowOnError extends boolean = false>(options: Options<PasswordlessCallbackData, ThrowOnError>): RequestResult<PasswordlessCallbackResponses, PasswordlessCallbackErrors, ThrowOnError> {return (options.client ?? this.client).get<PasswordlessCallbackResponses, PasswordlessCallbackErrors, ThrowOnError>({ url: '/oauth/passwordless/{code}', ...options });}-+/*** Handles oauth redirect*/public oauthRedirect<ThrowOnError extends boolean = false>(options?: Options<OauthRedirectData, ThrowOnError>): RequestResult<OauthRedirectResponses, OauthRedirectErrors, ThrowOnError> {return (options?.client ?? this.client).get<OauthRedirectResponses, OauthRedirectErrors, ThrowOnError>({ url: '/oauth/redirect', ...options });}-+/*** Custom OAuth2 callback*/public oauth2Callback<ThrowOnError extends boolean = false>(options: Options<Oauth2CallbackData, ThrowOnError>): RequestResult<Oauth2CallbackResponses, Oauth2CallbackErrors, ThrowOnError> {return (options.client ?? this.client).get<Oauth2CallbackResponses, Oauth2CallbackErrors, ThrowOnError>({ url: '/oauth2/{provider}/callback', ...options });}-+/*** Gets all permissions*/public getPermissions<ThrowOnError extends boolean = false>(options?: Options<GetPermissionsData, ThrowOnError>): RequestResult<GetPermissionsResponses, GetPermissionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetPermissionsResponses, GetPermissionsErrors, ThrowOnError>({ url: '/permissions', ...options });}-+/*** Gets a list of the users permissions*/public getUserPermissions<ThrowOnError extends boolean = false>(options?: Options<GetUserPermissionsData, ThrowOnError>): RequestResult<GetUserPermissionsResponses, GetUserPermissionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserPermissionsResponses, GetUserPermissionsErrors, ThrowOnError>({ url: '/permissions/me', ...options });}-+/*** Handler for `GET /referral-code`.*@@ -676,7 +676,7 @@ export class Sdk extends HeyApiClient {public getReferralCode<ThrowOnError extends boolean = false>(options?: Options<GetReferralCodeData, ThrowOnError>): RequestResult<GetReferralCodeResponses, GetReferralCodeErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetReferralCodeResponses, GetReferralCodeErrors, ThrowOnError>({ url: '/referral/code', ...options });}-+/*** Handler for `POST /referral/send`.*@@ -692,21 +692,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Refreshes a JWT token*/public sessionCreation<ThrowOnError extends boolean = false>(options?: Options<SessionCreationData, ThrowOnError>): RequestResult<SessionCreationResponses, SessionCreationErrors, ThrowOnError> {return (options?.client ?? this.client).post<SessionCreationResponses, SessionCreationErrors, ThrowOnError>({ url: '/session', ...options });}-+/*** Performs a login via session code*/public sessionLogin<ThrowOnError extends boolean = false>(options: Options<SessionLoginData, ThrowOnError>): RequestResult<SessionLoginResponses, SessionLoginErrors, ThrowOnError> {return (options.client ?? this.client).get<SessionLoginResponses, SessionLoginErrors, ThrowOnError>({ url: '/session/login/{session_code}', ...options });}-+/*** The status every user sees. Public: the banner shows wherever the app* runs, signed in or not.@@ -714,7 +714,7 @@ export class Sdk extends HeyApiClient {public getSystemStatus<ThrowOnError extends boolean = false>(options?: Options<GetSystemStatusData, ThrowOnError>): RequestResult<GetSystemStatusResponses, GetSystemStatusErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetSystemStatusResponses, GetSystemStatusErrors, ThrowOnError>({ url: '/system-status', ...options });}-+/*** Sets the status every user sees and pushes it to every open app. Macro* staff only.@@ -740,14 +740,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Recent status updates, newest first, with who set each. Macro staff only.*/public listSystemStatusHistory<ThrowOnError extends boolean = false>(options?: Options<ListSystemStatusHistoryData, ThrowOnError>): RequestResult<ListSystemStatusHistoryResponses, ListSystemStatusHistoryErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListSystemStatusHistoryResponses, ListSystemStatusHistoryErrors, ThrowOnError>({ url: '/system-status/history', ...options });}-+/*** Deletes a team.* This will update all team members roles and cancel your subscription for the team.@@ -756,14 +756,14 @@ export class Sdk extends HeyApiClient {public deleteTeam<ThrowOnError extends boolean = false>(options?: Options<DeleteTeamData, ThrowOnError>): RequestResult<DeleteTeamResponses, DeleteTeamErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteTeamResponses, DeleteTeamErrors, ThrowOnError>({ url: '/team', ...options });}-+/*** Gets a team by ID.*/public getTeam<ThrowOnError extends boolean = false>(options?: Options<GetTeamData, ThrowOnError>): RequestResult<GetTeamResponses, GetTeamErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetTeamResponses, GetTeamErrors, ThrowOnError>({ url: '/team', ...options });}-+/*** Updates a team.*/@@ -777,7 +777,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a new team.*/@@ -791,7 +791,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Toggles automatic domain joining for the team. When the team has no* auto-join domain, sets it to the team owner's email domain — rejected@@ -803,7 +803,7 @@ export class Sdk extends HeyApiClient {public toggleTeamAutoJoinDomain<ThrowOnError extends boolean = false>(options?: Options<ToggleTeamAutoJoinDomainData, ThrowOnError>): RequestResult<ToggleTeamAutoJoinDomainResponses, ToggleTeamAutoJoinDomainErrors, ThrowOnError> {return (options?.client ?? this.client).post<ToggleTeamAutoJoinDomainResponses, ToggleTeamAutoJoinDomainErrors, ThrowOnError>({ url: '/team/auto-join-domain/toggle', ...options });}-+/*** Enables or disables CRM for the team. On enable with `backfill`* (the default), kicks off a best-effort backfill that enqueues a@@ -825,7 +825,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Emails the caller's contacts on the team's auto-join domain that the team* exists, so they can sign up and join. Contacts already on Macro, on the@@ -836,7 +836,7 @@ export class Sdk extends HeyApiClient {public sendTeamDomainNotice<ThrowOnError extends boolean = false>(options?: Options<SendTeamDomainNoticeData, ThrowOnError>): RequestResult<SendTeamDomainNoticeResponses, SendTeamDomainNoticeErrors, ThrowOnError> {return (options?.client ?? this.client).post<SendTeamDomainNoticeResponses, SendTeamDomainNoticeErrors, ThrowOnError>({ url: '/team/domain-notice', ...options });}-+/*** Invites a user to a team.*/@@ -850,14 +850,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Turns off the team's invite link. Requires a team admin or owner.*/public deleteTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<DeleteTeamInviteLinkData, ThrowOnError>): RequestResult<DeleteTeamInviteLinkResponses, DeleteTeamInviteLinkErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteTeamInviteLinkResponses, DeleteTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });}-+/*** Gets the team's invite link. Anyone who may invite people to the team may* see it.@@ -865,7 +865,7 @@ export class Sdk extends HeyApiClient {public getTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<GetTeamInviteLinkData, ThrowOnError>): RequestResult<GetTeamInviteLinkResponses, GetTeamInviteLinkErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetTeamInviteLinkResponses, GetTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });}-+/*** Creates the team's invite link, replacing any existing one. Anyone who may* invite people may create the first link; replacing one requires a team@@ -874,7 +874,7 @@ export class Sdk extends HeyApiClient {public createTeamInviteLink<ThrowOnError extends boolean = false>(options?: Options<CreateTeamInviteLinkData, ThrowOnError>): RequestResult<CreateTeamInviteLinkResponses, CreateTeamInviteLinkErrors, ThrowOnError> {return (options?.client ?? this.client).post<CreateTeamInviteLinkResponses, CreateTeamInviteLinkErrors, ThrowOnError>({ url: '/team/invite-link', ...options });}-+/*** Joins the team an invite link belongs to.*/@@ -888,7 +888,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the team an invite link joins, so the user can see it before joining.*/@@ -902,35 +902,35 @@ export class Sdk extends HeyApiClient {}});}-+/*** Deletes a team invite from a team.*/public deleteTeamInviteHandler<ThrowOnError extends boolean = false>(options: Options<DeleteTeamInviteHandlerData, ThrowOnError>): RequestResult<DeleteTeamInviteHandlerResponses, DeleteTeamInviteHandlerErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteTeamInviteHandlerResponses, DeleteTeamInviteHandlerErrors, ThrowOnError>({ url: '/team/invite/{team_invite_id}', ...options });}-+/*** Gets all invites for a team.*/public getTeamInvites<ThrowOnError extends boolean = false>(options?: Options<GetTeamInvitesData, ThrowOnError>): RequestResult<GetTeamInvitesResponses, GetTeamInvitesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetTeamInvitesResponses, GetTeamInvitesErrors, ThrowOnError>({ url: '/team/invites', ...options });}-+/*** Rejects an invitation to join a team.*/public rejectInvitation<ThrowOnError extends boolean = false>(options: Options<RejectInvitationData, ThrowOnError>): RequestResult<RejectInvitationResponses, RejectInvitationErrors, ThrowOnError> {return (options.client ?? this.client).delete<RejectInvitationResponses, RejectInvitationErrors, ThrowOnError>({ url: '/team/join/{team_invite_id}', ...options });}-+/*** Joins a team by accepting an invite.*/public joinTeam<ThrowOnError extends boolean = false>(options: Options<JoinTeamData, ThrowOnError>): RequestResult<JoinTeamResponses, JoinTeamErrors, ThrowOnError> {return (options.client ?? this.client).get<JoinTeamResponses, JoinTeamErrors, ThrowOnError>({ url: '/team/join/{team_invite_id}', ...options });}-+/*** Moves one team member's seat between paid plans.*@@ -948,7 +948,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Toggles whether non-admin members may invite users to the team. Teams* start with this on (any member can invite); turning it off restricts@@ -958,28 +958,28 @@ export class Sdk extends HeyApiClient {public toggleTeamNonAdminInvites<ThrowOnError extends boolean = false>(options?: Options<ToggleTeamNonAdminInvitesData, ThrowOnError>): RequestResult<ToggleTeamNonAdminInvitesResponses, ToggleTeamNonAdminInvitesErrors, ThrowOnError> {return (options?.client ?? this.client).post<ToggleTeamNonAdminInvitesResponses, ToggleTeamNonAdminInvitesErrors, ThrowOnError>({ url: '/team/non-admin-invites/toggle', ...options });}-+/*** Removes a user from a team.*/public removeUserFromTeam<ThrowOnError extends boolean = false>(options: Options<RemoveUserFromTeamData, ThrowOnError>): RequestResult<RemoveUserFromTeamResponses, RemoveUserFromTeamErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveUserFromTeamResponses, RemoveUserFromTeamErrors, ThrowOnError>({ url: '/team/remove/{remove_user_id}', ...options });}-+/*** Gets all teams for the authenticated user.*/public getUserTeams<ThrowOnError extends boolean = false>(options?: Options<GetUserTeamsData, ThrowOnError>): RequestResult<GetUserTeamsResponses, GetUserTeamsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserTeamsResponses, GetUserTeamsErrors, ThrowOnError>({ url: '/team/user', ...options });}-+/*** Gets all of a user's invitations.*/public getUserInvites<ThrowOnError extends boolean = false>(options?: Options<GetUserInvitesData, ThrowOnError>): RequestResult<GetUserInvitesResponses, GetUserInvitesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserInvitesResponses, GetUserInvitesErrors, ThrowOnError>({ url: '/team/user/invites', ...options });}-+/*** Retrieves user names in bulk*/@@ -993,7 +993,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets names for passed user profile ids, falling back to the requesting user's email contact names*/@@ -1007,7 +1007,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Updates the user's group.*/@@ -1021,14 +1021,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get the caller's interface language.*/public getUserLanguage<ThrowOnError extends boolean = false>(options?: Options<GetUserLanguageData, ThrowOnError>): RequestResult<GetUserLanguageResponses, GetUserLanguageErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserLanguageResponses, GetUserLanguageErrors, ThrowOnError>({ url: '/user/language', ...options });}-+/*** Set the caller's interface language, or clear it to follow their team's,* else their browser's.@@ -1043,7 +1043,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the calling user's info which matches what was given in the **deprecated*** getUserPermissions query in our graphql api.@@ -1053,42 +1053,42 @@ export class Sdk extends HeyApiClient {public getLegacyUserPermissions<ThrowOnError extends boolean = false>(options?: Options<GetLegacyUserPermissionsData, ThrowOnError>): RequestResult<GetLegacyUserPermissionsResponses, GetLegacyUserPermissionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetLegacyUserPermissionsResponses, GetLegacyUserPermissionsErrors, ThrowOnError>({ url: '/user/legacy_user_permissions', ...options });}-+/*** Returns whether or not a given idp link exists for a user*/public getUserLinkExists<ThrowOnError extends boolean = false>(options: Options<GetUserLinkExistsData, ThrowOnError>): RequestResult<GetUserLinkExistsResponses, GetUserLinkExistsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetUserLinkExistsResponses, GetUserLinkExistsErrors, ThrowOnError>({ url: '/user/link_exists', ...options });}-+/*** Deletes the user who calls this endpoint*/public deleteUser<ThrowOnError extends boolean = false>(options?: Options<DeleteUserData, ThrowOnError>): RequestResult<DeleteUserResponses, DeleteUserErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteUserResponses, DeleteUserErrors, ThrowOnError>({ url: '/user/me', ...options });}-+/*** Gets the calling user's info*/public getUserInfo<ThrowOnError extends boolean = false>(options?: Options<GetUserInfoData, ThrowOnError>): RequestResult<GetUserInfoResponses, GetUserInfoErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserInfoResponses, GetUserInfoErrors, ThrowOnError>({ url: '/user/me', ...options });}-+/*** Retrieves the name of a particular user.*/public getUserName<ThrowOnError extends boolean = false>(options?: Options<GetUserNameData, ThrowOnError>): RequestResult<GetUserNameResponses, GetUserNameErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserNameResponses, GetUserNameErrors, ThrowOnError>({ url: '/user/name', ...options });}-+/*** Sets the name of a particular user*/public putUserName<ThrowOnError extends boolean = false>(options?: Options<PutUserNameData, ThrowOnError>): RequestResult<PutUserNameResponses, PutUserNameErrors, ThrowOnError> {return (options?.client ?? this.client).put<PutUserNameResponses, PutUserNameErrors, ThrowOnError>({ url: '/user/name', ...options });}-+/*** Updates the user's onboarding.*/@@ -1102,7 +1102,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Retrieves the users organization if present.* Returns NO_CONTENT if the user is a not part of an organization.@@ -1110,14 +1110,14 @@ export class Sdk extends HeyApiClient {public getUserOrganization<ThrowOnError extends boolean = false>(options?: Options<GetUserOrganizationData, ThrowOnError>): RequestResult<GetUserOrganizationResponses, GetUserOrganizationErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserOrganizationResponses, GetUserOrganizationErrors, ThrowOnError>({ url: '/user/organization', ...options });}-+/*** Sets the profile picture URL for a particular user*/public putProfilePicture<ThrowOnError extends boolean = false>(options: Options<PutProfilePictureData, ThrowOnError>): RequestResult<PutProfilePictureResponses, PutProfilePictureErrors, ThrowOnError> {return (options.client ?? this.client).put<PutProfilePictureResponses, PutProfilePictureErrors, ThrowOnError>({ url: '/user/profile_picture', ...options });}-+/*** Retrieves profile picture URLs for a list of users*/@@ -1131,7 +1131,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Retrieves the users quota.* Returns NO_CONTENT if the user is a premium user with no quota.@@ -1139,7 +1139,7 @@ export class Sdk extends HeyApiClient {public getUserQuota<ThrowOnError extends boolean = false>(options?: Options<GetUserQuotaData, ThrowOnError>): RequestResult<GetUserQuotaResponses, GetUserQuotaErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUserQuotaResponses, GetUserQuotaErrors, ThrowOnError>({ url: '/user/quota', ...options });}-+/*** Creates a Stripe checkout session for the user to subscribe.*/@@ -1153,14 +1153,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read subscription state for the authenticated user's seat.*/public getSubscriptionStatus<ThrowOnError extends boolean = false>(options?: Options<GetSubscriptionStatusData, ThrowOnError>): RequestResult<GetSubscriptionStatusResponses, GetSubscriptionStatusErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetSubscriptionStatusResponses, GetSubscriptionStatusErrors, ThrowOnError>({ url: '/user/stripe/plan', ...options });}-+/*** Changes the caller's paid plan. Upgrades are prorated immediately;* downgrades retain the active plan until renewal. Selecting the active plan@@ -1176,7 +1176,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a Stripe billing portal session.*/@@ -1190,14 +1190,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read the caller's eligibility; checkout revalidates before granting a trial.*/public getTrialEligibility<ThrowOnError extends boolean = false>(options?: Options<GetTrialEligibilityData, ThrowOnError>): RequestResult<GetTrialEligibilityResponses, GetTrialEligibilityErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetTrialEligibilityResponses, GetTrialEligibilityErrors, ThrowOnError>({ url: '/user/stripe/trial_eligibility', ...options });}-+/*** Updates the user's tutorialComplete flag.*/diff --git a/packages/sdk/generated/calendar/sdk.gen.ts b/packages/sdk/generated/calendar/sdk.gen.tsindex b4910ef8ad..2a21d37954 100644--- a/packages/sdk/generated/calendar/sdk.gen.ts+++ b/packages/sdk/generated/calendar/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,14 +56,14 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** List calendars and their personal-availability inclusion.*/public getAvailabilityCalendars<ThrowOnError extends boolean = false>(options?: Options<GetAvailabilityCalendarsData, ThrowOnError>): RequestResult<GetAvailabilityCalendarsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<GetAvailabilityCalendarsResponses, unknown, ThrowOnError>({ url: '/availability-calendars', ...options });}-+/*** Change which source calendars normally occupy this user's time.*/@@ -77,14 +77,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the requester's visible calendars for pickers and filters.*/public listCalendars<ThrowOnError extends boolean = false>(options?: Options<ListCalendarsData, ThrowOnError>): RequestResult<ListCalendarsResponses, ListCalendarsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListCalendarsResponses, ListCalendarsErrors, ThrowOnError>({ url: '/calendars', ...options });}-+/*** Create a calendar event and return its synced entity.*/@@ -98,14 +98,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a calendar event at its provider.*/public deleteCalendarEvent<ThrowOnError extends boolean = false>(options: Options<DeleteCalendarEventData, ThrowOnError>): RequestResult<DeleteCalendarEventResponses, DeleteCalendarEventErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteCalendarEventResponses, DeleteCalendarEventErrors, ThrowOnError>({ url: '/events/{event_id}', ...options });}-+/*** Update fields of a calendar event and return its synced entity.*/@@ -119,7 +119,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Add a snapshot of an event shared with one of the requester's channels to* one of their Google calendars and return the synced snapshot. The@@ -139,7 +139,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Add guests to a calendar event without touching anyone already invited,* and return its synced entity. The organizer, and guests the organizer lets@@ -155,14 +155,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Resolve an authorized event's provider link for Outlook-only actions.*/public calendarEventProviderUrl<ThrowOnError extends boolean = false>(options: Options<CalendarEventProviderUrlData, ThrowOnError>): RequestResult<CalendarEventProviderUrlResponses, CalendarEventProviderUrlErrors, ThrowOnError> {return (options.client ?? this.client).get<CalendarEventProviderUrlResponses, CalendarEventProviderUrlErrors, ThrowOnError>({ url: '/events/{event_id}/provider-url', ...options });}-+/*** Read and persist an organizer-only preview, without sending invitations.*/@@ -176,7 +176,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Set the requester's RSVP on a calendar event and return its synced entity.*/@@ -190,14 +190,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Answer a request to join an event the requester can change and return* where it now stands. Accepting adds the guest through the invite path; an@@ -213,35 +213,35 @@ export class Sdk extends HeyApiClient {}});}-+/*** Discard a preview only if no confirmation has been recorded.*/public discardCalendarReplacement<ThrowOnError extends boolean = false>(options: Options<DiscardCalendarReplacementData, ThrowOnError>): RequestResult<DiscardCalendarReplacementResponses, DiscardCalendarReplacementErrors, ThrowOnError> {return (options.client ?? this.client).delete<DiscardCalendarReplacementResponses, DiscardCalendarReplacementErrors, ThrowOnError>({ url: '/replacements/{operation_id}', ...options });}-+/*** Read saved progress without performing a provider mutation.*/public calendarReplacementStatus<ThrowOnError extends boolean = false>(options: Options<CalendarReplacementStatusData, ThrowOnError>): RequestResult<CalendarReplacementStatusResponses, CalendarReplacementStatusErrors, ThrowOnError> {return (options.client ?? this.client).get<CalendarReplacementStatusResponses, CalendarReplacementStatusErrors, ThrowOnError>({ url: '/replacements/{operation_id}', ...options });}-+/*** Explicitly confirm the saved preview, or resume the same confirmed operation.*/public confirmCalendarReplacement<ThrowOnError extends boolean = false>(options: Options<ConfirmCalendarReplacementData, ThrowOnError>): RequestResult<ConfirmCalendarReplacementResponses, ConfirmCalendarReplacementErrors, ThrowOnError> {return (options.client ?? this.client).post<ConfirmCalendarReplacementResponses, ConfirmCalendarReplacementErrors, ThrowOnError>({ url: '/replacements/{operation_id}/confirm', ...options });}-+/*** Read the authenticated user's sharing choice.*/public getTeamSharing<ThrowOnError extends boolean = false>(options?: Options<GetTeamSharingData, ThrowOnError>): RequestResult<GetTeamSharingResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<GetTeamSharingResponses, unknown, ThrowOnError>({ url: '/team-sharing', ...options });}-+/*** Set the authenticated user's sharing choice.*/diff --git a/packages/sdk/generated/cognition/sdk.gen.ts b/packages/sdk/generated/cognition/sdk.gen.tsindex 56741ee27f..cbd89fc3c9 100644--- a/packages/sdk/generated/cognition/sdk.gen.ts+++ b/packages/sdk/generated/cognition/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,7 +56,7 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Set the pricing for a model and recompute its recorded rows. Admin only.*/@@ -70,7 +70,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Query recorded AI usage. Admin only.*/@@ -84,7 +84,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets or creates an ai projection and the requesting user's instance,* triggering (or awaiting) materialization when needed.@@ -99,18 +99,18 @@ export class Sdk extends HeyApiClient {}});}-+public getChatsForAttachmentHandler<ThrowOnError extends boolean = false>(options: Options<GetChatsForAttachmentHandlerData, ThrowOnError>): RequestResult<GetChatsForAttachmentHandlerResponses, GetChatsForAttachmentHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChatsForAttachmentHandlerResponses, GetChatsForAttachmentHandlerErrors, ThrowOnError>({ url: '/attachments/{attachment_id}/chats', ...options });}-+/*** Soft-delete a chat.*/public deleteChat<ThrowOnError extends boolean = false>(options: Options<DeleteChatData, ThrowOnError>): RequestResult<DeleteChatResponses, DeleteChatErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteChatResponses, DeleteChatErrors, ThrowOnError>({ url: '/chat/{chat_id}', ...options });}-+/*** Patch a chat's name, project, or share permissions.*/@@ -124,14 +124,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Permanently delete a chat and all associated data.*/public permanentlyDeleteChat<ThrowOnError extends boolean = false>(options: Options<PermanentlyDeleteChatData, ThrowOnError>): RequestResult<PermanentlyDeleteChatResponses, PermanentlyDeleteChatErrors, ThrowOnError> {return (options.client ?? this.client).delete<PermanentlyDeleteChatResponses, PermanentlyDeleteChatErrors, ThrowOnError>({ url: '/chat/{chat_id}/permanent', ...options });}-+/*** Create a new chat.*/@@ -145,14 +145,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Retrieves chat history for a specific chat ID*/public getChatHistoryHandler<ThrowOnError extends boolean = false>(options: Options<GetChatHistoryHandlerData, ThrowOnError>): RequestResult<GetChatHistoryHandlerResponses, GetChatHistoryHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChatHistoryHandlerResponses, GetChatHistoryHandlerErrors, ThrowOnError>({ url: '/chats/history/{chat_id}', ...options });}-+/*** Retrieves chat history for multiple message IDs*/@@ -166,35 +166,35 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get a chat by ID with messages and web citations.*/public getChat<ThrowOnError extends boolean = false>(options: Options<GetChatData, ThrowOnError>): RequestResult<GetChatResponses, GetChatErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChatResponses, GetChatErrors, ThrowOnError>({ url: '/chats/{chat_id}', ...options });}-+/*** Copy a chat and its messages into a new chat.*/public copyChat<ThrowOnError extends boolean = false>(options: Options<CopyChatData, ThrowOnError>): RequestResult<CopyChatResponses, CopyChatErrors, ThrowOnError> {return (options.client ?? this.client).post<CopyChatResponses, CopyChatErrors, ThrowOnError>({ url: '/chats/{chat_id}/copy', ...options });}-+/*** Get the share permissions for a chat.*/public getChatPermissions<ThrowOnError extends boolean = false>(options: Options<GetChatPermissionsData, ThrowOnError>): RequestResult<GetChatPermissionsResponses, GetChatPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChatPermissionsResponses, GetChatPermissionsErrors, ThrowOnError>({ url: '/chats/{chat_id}/permissions', ...options });}-+/*** Revert a soft-deleted chat.*/public revertDeleteChat<ThrowOnError extends boolean = false>(options: Options<RevertDeleteChatData, ThrowOnError>): RequestResult<RevertDeleteChatResponses, RevertDeleteChatErrors, ThrowOnError> {return (options.client ?? this.client).put<RevertDeleteChatResponses, RevertDeleteChatErrors, ThrowOnError>({ url: '/chats/{chat_id}/revert_delete', ...options });}-+/*** Execute a pending tool call, optionally with updated arguments.*/@@ -208,7 +208,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Reject a pending tool call.*/@@ -222,7 +222,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Update a tool response.*/@@ -236,7 +236,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Update a tool call's arguments after validation.*/@@ -250,11 +250,11 @@ export class Sdk extends HeyApiClient {}});}-+public getCitationHandler<ThrowOnError extends boolean = false>(options: Options<GetCitationHandlerData, ThrowOnError>): RequestResult<GetCitationHandlerResponses, GetCitationHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetCitationHandlerResponses, GetCitationHandlerErrors, ThrowOnError>({ url: '/citations/{id}', ...options });}-+public generateDatabaseQuery<ThrowOnError extends boolean = false>(options: Options<GenerateDatabaseQueryData, ThrowOnError>): RequestResult<GenerateDatabaseQueryResponses, GenerateDatabaseQueryErrors, ThrowOnError> {return (options.client ?? this.client).post<GenerateDatabaseQueryResponses, GenerateDatabaseQueryErrors, ThrowOnError>({url: '/database-query',@@ -265,7 +265,7 @@ export class Sdk extends HeyApiClient {}});}-+public decisions<ThrowOnError extends boolean = false>(options: Options<DecisionsData, ThrowOnError>): RequestResult<DecisionsResponses, DecisionsErrors, ThrowOnError> {return (options.client ?? this.client).post<DecisionsResponses, DecisionsErrors, ThrowOnError>({url: '/decisions',@@ -276,14 +276,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Generate an image with Nano Banana and store it as a static file owned by* the caller. Charged to the acting user's AI allowance.@@ -298,14 +298,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Where the user's Notion workspace import stands.*/public notionReportHandler<ThrowOnError extends boolean = false>(options?: Options<NotionReportHandlerData, ThrowOnError>): RequestResult<NotionReportHandlerResponses, NotionReportHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<NotionReportHandlerResponses, NotionReportHandlerErrors, ThrowOnError>({ url: '/import/notion', ...options });}-+/*** Stop planning or writing the user's Notion import. Objects already* imported stay.@@ -313,7 +313,7 @@ export class Sdk extends HeyApiClient {public cancelNotionHandler<ThrowOnError extends boolean = false>(options?: Options<CancelNotionHandlerData, ThrowOnError>): RequestResult<CancelNotionHandlerResponses, CancelNotionHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).post<CancelNotionHandlerResponses, CancelNotionHandlerErrors, ThrowOnError>({ url: '/import/notion/cancel', ...options });}-+/*** Accept staged imports (starts import jobs) and/or discard staged rows.*/@@ -327,14 +327,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Discover candidates for user selection. Only Slack supports discovery.*/public discoverHandler<ThrowOnError extends boolean = false>(options: Options<DiscoverHandlerData, ThrowOnError>): RequestResult<DiscoverHandlerResponses, DiscoverHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<DiscoverHandlerResponses, DiscoverHandlerErrors, ThrowOnError>({ url: '/import/runs/{source}/discover', ...options });}-+/*** Get the authenticated user's import state: discovery runs plus visible* ledger rows.@@ -342,35 +342,35 @@ export class Sdk extends HeyApiClient {public getStateHandler<ThrowOnError extends boolean = false>(options?: Options<GetStateHandlerData, ThrowOnError>): RequestResult<GetStateHandlerResponses, GetStateHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetStateHandlerResponses, GetStateHandlerErrors, ThrowOnError>({ url: '/import/state', ...options });}-+/*** Report progress for one reviewed workspace source.*/public workspaceReportHandler<ThrowOnError extends boolean = false>(options: Options<WorkspaceReportHandlerData, ThrowOnError>): RequestResult<WorkspaceReportHandlerResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<WorkspaceReportHandlerResponses, unknown, ThrowOnError>({ url: '/import/workspaces/{source}', ...options });}-+/*** Cancel this source's plan or write, keeping completed entities.*/public cancelWorkspaceHandler<ThrowOnError extends boolean = false>(options: Options<CancelWorkspaceHandlerData, ThrowOnError>): RequestResult<CancelWorkspaceHandlerResponses, unknown, ThrowOnError> {return (options.client ?? this.client).post<CancelWorkspaceHandlerResponses, unknown, ThrowOnError>({ url: '/import/workspaces/{source}/cancel', ...options });}-+/*** Delete an MCP server by URL.*/public deleteMcpServer<ThrowOnError extends boolean = false>(options: Options<DeleteMcpServerData, ThrowOnError>): RequestResult<DeleteMcpServerResponses, DeleteMcpServerErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteMcpServerResponses, DeleteMcpServerErrors, ThrowOnError>({ url: '/mcp/servers', ...options });}-+/*** List all MCP servers configured for the authenticated user.*/public listMcpServers<ThrowOnError extends boolean = false>(options?: Options<ListMcpServersData, ThrowOnError>): RequestResult<ListMcpServersResponses, ListMcpServersErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListMcpServersResponses, ListMcpServersErrors, ThrowOnError>({ url: '/mcp/servers', ...options });}-+/*** Add a new MCP server for the authenticated user. A URL the user already* has is returned as stored, keeping its credentials.@@ -385,7 +385,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Update an existing MCP server's name or enabled status.*/@@ -399,7 +399,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** OAuth callback endpoint — receives code and state, or an error, from the* authorization server.@@ -407,14 +407,14 @@ export class Sdk extends HeyApiClient {public mcpAuthCallback<ThrowOnError extends boolean = false>(options?: Options<McpAuthCallbackData, ThrowOnError>): RequestResult<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError> {return (options?.client ?? this.client).get<McpAuthCallbackResponses, McpAuthCallbackErrors, ThrowOnError>({ url: '/mcp/servers/auth/callback', ...options });}-+/*** Return Macro's public OAuth Client ID Metadata Document.*/public mcpOauthClientMetadata<ThrowOnError extends boolean = false>(options?: Options<McpOauthClientMetadataData, ThrowOnError>): RequestResult<McpOauthClientMetadataResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<McpOauthClientMetadataResponses, unknown, ThrowOnError>({ url: '/mcp/servers/auth/client-metadata', ...options });}-+/*** Start the OAuth authorization flow for an MCP server.*/@@ -428,7 +428,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get the authenticated user's latest memory.*@@ -438,14 +438,14 @@ export class Sdk extends HeyApiClient {public getMemoryHandler<ThrowOnError extends boolean = false>(options?: Options<GetMemoryHandlerData, ThrowOnError>): RequestResult<GetMemoryHandlerResponses, GetMemoryHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetMemoryHandlerResponses, GetMemoryHandlerErrors, ThrowOnError>({ url: '/memory', ...options });}-+/*** Get the authenticated user's onboarding state.*/public getStateHandler2<ThrowOnError extends boolean = false>(options?: Options<GetStateHandler2Data, ThrowOnError>): RequestResult<GetStateHandler2Responses, GetStateHandler2Errors, ThrowOnError> {return (options?.client ?? this.client).get<GetStateHandler2Responses, GetStateHandler2Errors, ThrowOnError>({ url: '/onboarding', ...options });}-+/*** Complete (or skip) onboarding. Unreserved leftover onboarding-staged* import candidates are deleted.@@ -460,14 +460,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the sidebar prompts the authenticated user dismissed on any device.*/public dismissedPromptsHandler<ThrowOnError extends boolean = false>(options?: Options<DismissedPromptsHandlerData, ThrowOnError>): RequestResult<DismissedPromptsHandlerResponses, DismissedPromptsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<DismissedPromptsHandlerResponses, DismissedPromptsHandlerErrors, ThrowOnError>({ url: '/onboarding/prompts', ...options });}-+/*** Dismiss one sidebar prompt for the authenticated user, on every device.* Idempotent.@@ -475,7 +475,7 @@ export class Sdk extends HeyApiClient {public dismissPromptHandler<ThrowOnError extends boolean = false>(options: Options<DismissPromptHandlerData, ThrowOnError>): RequestResult<DismissPromptHandlerResponses, DismissPromptHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<DismissPromptHandlerResponses, DismissPromptHandlerErrors, ThrowOnError>({ url: '/onboarding/prompts/{prompt_id}/dismiss', ...options });}-+/*** Browse or search the catalog of connectable apps.*@@ -484,7 +484,7 @@ export class Sdk extends HeyApiClient {public browsePipedreamMcpCatalog<ThrowOnError extends boolean = false>(options?: Options<BrowsePipedreamMcpCatalogData, ThrowOnError>): RequestResult<BrowsePipedreamMcpCatalogResponses, BrowsePipedreamMcpCatalogErrors, ThrowOnError> {return (options?.client ?? this.client).get<BrowsePipedreamMcpCatalogResponses, BrowsePipedreamMcpCatalogErrors, ThrowOnError>({ url: '/pipedream/mcp/catalog', ...options });}-+/*** Register a connected account reported by the Pipedream Connect UI.*@@ -502,7 +502,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Record an app the user connected through Macro Connect.*@@ -519,21 +519,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Disconnect an app, revoking its Pipedream account.*/public deletePipedreamMcpConnection<ThrowOnError extends boolean = false>(options: Options<DeletePipedreamMcpConnectionData, ThrowOnError>): RequestResult<DeletePipedreamMcpConnectionResponses, DeletePipedreamMcpConnectionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeletePipedreamMcpConnectionResponses, DeletePipedreamMcpConnectionErrors, ThrowOnError>({ url: '/pipedream/mcp/connections', ...options });}-+/*** List the MCP apps connected by the authenticated user.*/public listPipedreamMcpConnections<ThrowOnError extends boolean = false>(options?: Options<ListPipedreamMcpConnectionsData, ThrowOnError>): RequestResult<ListPipedreamMcpConnectionsResponses, ListPipedreamMcpConnectionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListPipedreamMcpConnectionsResponses, ListPipedreamMcpConnectionsErrors, ThrowOnError>({ url: '/pipedream/mcp/connections', ...options });}-+/*** Rename or enable/disable a connected app.*/@@ -547,7 +547,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the catalog apps that connect through their own MCP server.*@@ -557,7 +557,7 @@ export class Sdk extends HeyApiClient {public listPipedreamMcpOverlays<ThrowOnError extends boolean = false>(options?: Options<ListPipedreamMcpOverlaysData, ThrowOnError>): RequestResult<ListPipedreamMcpOverlaysResponses, ListPipedreamMcpOverlaysErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListPipedreamMcpOverlaysResponses, ListPipedreamMcpOverlaysErrors, ThrowOnError>({ url: '/pipedream/mcp/overlays', ...options });}-+/*** Register an account a Connect flow created but the Connect UI never* reported.@@ -576,7 +576,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Start a connect flow for the authenticated user.*@@ -596,7 +596,7 @@ export class Sdk extends HeyApiClient {}});}-+public getBatchPreview<ThrowOnError extends boolean = false>(options: Options<GetBatchPreviewData, ThrowOnError>): RequestResult<GetBatchPreviewResponses, GetBatchPreviewErrors, ThrowOnError> {return (options.client ?? this.client).post<GetBatchPreviewResponses, GetBatchPreviewErrors, ThrowOnError>({url: '/preview',@@ -607,7 +607,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Send a new chat message and stream the AI response.*@@ -624,7 +624,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Stop an in-flight AI chat stream.*@@ -642,7 +642,7 @@ export class Sdk extends HeyApiClient {}});}-+public structuredCompletion<ThrowOnError extends boolean = false>(options: Options<StructuredCompletionData, ThrowOnError>): RequestResult<StructuredCompletionResponses, StructuredCompletionErrors, ThrowOnError> {return (options.client ?? this.client).post<StructuredCompletionResponses, StructuredCompletionErrors, ThrowOnError>({url: '/structured-completion',diff --git a/packages/sdk/generated/connection/sdk.gen.ts b/packages/sdk/generated/connection/sdk.gen.tsindex 8d50c4d095..b65e5cb3ef 100644--- a/packages/sdk/generated/connection/sdk.gen.ts+++ b/packages/sdk/generated/connection/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,7 +56,7 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+public batchSendMessageHandler<ThrowOnError extends boolean = false>(options: Options<BatchSendMessageHandlerData, ThrowOnError>): RequestResult<BatchSendMessageHandlerResponses, BatchSendMessageHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<BatchSendMessageHandlerResponses, BatchSendMessageHandlerErrors, ThrowOnError>({security: [{ name: 'x-internal-auth-key', type: 'apiKey' }],@@ -68,7 +68,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Sends a message to every open connection on every instance. Delivery is* best-effort and asynchronous, so there are no receipts.@@ -84,7 +84,7 @@ export class Sdk extends HeyApiClient {}});}-+public sendMessageHandler<ThrowOnError extends boolean = false>(options: Options<SendMessageHandlerData, ThrowOnError>): RequestResult<SendMessageHandlerResponses, SendMessageHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<SendMessageHandlerResponses, SendMessageHandlerErrors, ThrowOnError>({security: [{ name: 'x-internal-auth-key', type: 'apiKey' }],@@ -96,7 +96,7 @@ export class Sdk extends HeyApiClient {}});}-+public getEntityHandler<ThrowOnError extends boolean = false>(options: Options<GetEntityHandlerData, ThrowOnError>): RequestResult<GetEntityHandlerResponses, GetEntityHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetEntityHandlerResponses, GetEntityHandlerErrors, ThrowOnError>({security: [{ name: 'x-internal-auth-key', type: 'apiKey' }],diff --git a/packages/sdk/generated/contacts/sdk.gen.ts b/packages/sdk/generated/contacts/sdk.gen.tsindex 24ed2a3fe9..a6dd1d1735 100644--- a/packages/sdk/generated/contacts/sdk.gen.ts+++ b/packages/sdk/generated/contacts/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,14 +56,14 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** GET /contacts handler.*/public getContacts<ThrowOnError extends boolean = false>(options?: Options<GetContactsData, ThrowOnError>): RequestResult<GetContactsResponses, GetContactsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetContactsResponses, GetContactsErrors, ThrowOnError>({ url: '/contacts', ...options });}-+/*** POST /contacts handler.*/diff --git a/packages/sdk/generated/email/sdk.gen.ts b/packages/sdk/generated/email/sdk.gen.tsindex fc106e3ebf..f525416209 100644--- a/packages/sdk/generated/email/sdk.gen.ts+++ b/packages/sdk/generated/email/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,21 +56,21 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Get an attachment by ID.*/public getAttachment<ThrowOnError extends boolean = false>(options: Options<GetAttachmentData, ThrowOnError>): RequestResult<GetAttachmentResponses, GetAttachmentErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAttachmentResponses, GetAttachmentErrors, ThrowOnError>({ url: '/email/attachments/{id}', ...options });}-+/*** Get the Macro document id for an email attachment, uploading it if it doesn't already exist.*/public getAttachmentDocumentId<ThrowOnError extends boolean = false>(options: Options<GetAttachmentDocumentIdData, ThrowOnError>): RequestResult<GetAttachmentDocumentIdResponses, GetAttachmentDocumentIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAttachmentDocumentIdResponses, GetAttachmentDocumentIdErrors, ThrowOnError>({ url: '/email/attachments/{id}/document_id', ...options });}-+/*** Cancel a backfill job.*/@@ -84,7 +84,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List all backfill jobs for the authenticated user, across every link they* own. Scoped by the user's fusionauth id from the request context rather than@@ -93,21 +93,21 @@ export class Sdk extends HeyApiClient {public listBackfillGmail<ThrowOnError extends boolean = false>(options?: Options<ListBackfillGmailData, ThrowOnError>): RequestResult<ListBackfillGmailResponses, ListBackfillGmailErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListBackfillGmailResponses, ListBackfillGmailErrors, ThrowOnError>({ url: '/email/backfill/gmail', ...options });}-+/*** Get any active backfill job for the user.*/public getBackfillGmailActive<ThrowOnError extends boolean = false>(options?: Options<GetBackfillGmailActiveData, ThrowOnError>): RequestResult<GetBackfillGmailActiveResponses, GetBackfillGmailActiveErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetBackfillGmailActiveResponses, GetBackfillGmailActiveErrors, ThrowOnError>({ url: '/email/backfill/gmail/active', ...options });}-+/*** Get a backfill job.*/public getBackfillGmail<ThrowOnError extends boolean = false>(options: Options<GetBackfillGmailData, ThrowOnError>): RequestResult<GetBackfillGmailResponses, GetBackfillGmailErrors, ThrowOnError> {return (options.client ?? this.client).get<GetBackfillGmailResponses, GetBackfillGmailErrors, ThrowOnError>({ url: '/email/backfill/gmail/{id}', ...options });}-+/*** Email one of the viewer's events to people the organizer's guest list* does not name, from the inbox that holds the viewer's copy, with the@@ -129,14 +129,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List all contacts belonging to the user, grouped by link.*/public listContacts<ThrowOnError extends boolean = false>(options?: Options<ListContactsData, ThrowOnError>): RequestResult<ListContactsResponses, ListContactsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListContactsResponses, ListContactsErrors, ThrowOnError>({ url: '/email/contacts', ...options });}-+/*** Durably block a sender in the selected inbox.*/@@ -150,14 +150,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List all blocked senders for the authenticated user.*/public listBlockedSenders<ThrowOnError extends boolean = false>(options?: Options<ListBlockedSendersData, ThrowOnError>): RequestResult<ListBlockedSendersResponses, ListBlockedSendersErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListBlockedSendersResponses, ListBlockedSendersErrors, ThrowOnError>({ url: '/email/contacts/blocked', ...options });}-+/*** Durably remove Macro-managed sender blocking in the selected inbox.*/@@ -171,11 +171,11 @@ export class Sdk extends HeyApiClient {}});}-+public recoverDraftTransfer<ThrowOnError extends boolean = false>(options: Options<RecoverDraftTransferData, ThrowOnError>): RequestResult<RecoverDraftTransferResponses, RecoverDraftTransferErrors, ThrowOnError> {return (options.client ?? this.client).post<RecoverDraftTransferResponses, RecoverDraftTransferErrors, ThrowOnError>({ url: '/email/draft-transfers/{id}/recover', ...options });}-+/*** Create a draft.*/@@ -189,14 +189,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List scheduled drafts.*/public getScheduledMessages<ThrowOnError extends boolean = false>(options?: Options<GetScheduledMessagesData, ThrowOnError>): RequestResult<GetScheduledMessagesResponses, GetScheduledMessagesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetScheduledMessagesResponses, GetScheduledMessagesErrors, ThrowOnError>({ url: '/email/drafts/scheduled', ...options });}-+/*** Schedule or update a scheduled draft.*/@@ -210,21 +210,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Remove the scheduled send from a draft, including immediate-send undo.*/public deleteScheduledDraft<ThrowOnError extends boolean = false>(options: Options<DeleteScheduledDraftData, ThrowOnError>): RequestResult<DeleteScheduledDraftResponses, DeleteScheduledDraftErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteScheduledDraftResponses, DeleteScheduledDraftErrors, ThrowOnError>({ url: '/email/drafts/scheduled/{message_id}', ...options });}-+/*** Delete a draft.*/public deleteDraft<ThrowOnError extends boolean = false>(options: Options<DeleteDraftData, ThrowOnError>): RequestResult<DeleteDraftResponses, DeleteDraftErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteDraftResponses, DeleteDraftErrors, ThrowOnError>({ url: '/email/drafts/{id}', ...options });}-+/*** Add an attachment to a draft.*/@@ -238,21 +238,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Remove an attachment from a draft.*/public removeDraftAttachment<ThrowOnError extends boolean = false>(options: Options<RemoveDraftAttachmentData, ThrowOnError>): RequestResult<RemoveDraftAttachmentResponses, RemoveDraftAttachmentErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveDraftAttachmentResponses, RemoveDraftAttachmentErrors, ThrowOnError>({ url: '/email/drafts/{id}/attachments/{attachment_id}', ...options });}-+/*** Confirm an uploaded attachment before it becomes part of a sendable draft.*/public completeDraftAttachment<ThrowOnError extends boolean = false>(options: Options<CompleteDraftAttachmentData, ThrowOnError>): RequestResult<CompleteDraftAttachmentResponses, CompleteDraftAttachmentErrors, ThrowOnError> {return (options.client ?? this.client).post<CompleteDraftAttachmentResponses, CompleteDraftAttachmentErrors, ThrowOnError>({ url: '/email/drafts/{id}/attachments/{attachment_id}/complete', ...options });}-+/*** Add a forwarded attachment to a draft.*/@@ -266,21 +266,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Remove a forwarded attachment from a draft.*/public removeForwardedAttachment<ThrowOnError extends boolean = false>(options: Options<RemoveForwardedAttachmentData, ThrowOnError>): RequestResult<RemoveForwardedAttachmentResponses, RemoveForwardedAttachmentErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveForwardedAttachmentResponses, RemoveForwardedAttachmentErrors, ThrowOnError>({ url: '/email/drafts/{id}/forwarded-attachments/{attachment_id}', ...options });}-+/*** The same provider-neutral state returned on fully hydrated email messages.*/public messageOperationStatus<ThrowOnError extends boolean = false>(options: Options<MessageOperationStatusData, ThrowOnError>): RequestResult<MessageOperationStatusResponses, MessageOperationStatusErrors, ThrowOnError> {return (options.client ?? this.client).get<MessageOperationStatusResponses, MessageOperationStatusErrors, ThrowOnError>({ url: '/email/drafts/{id}/operation', ...options });}-+/*** Resolve an observed draft conflict or uncertain provider operation.*/@@ -294,7 +294,7 @@ export class Sdk extends HeyApiClient {}});}-+public transferDraft<ThrowOnError extends boolean = false>(options: Options<TransferDraftData, ThrowOnError>): RequestResult<TransferDraftResponses, TransferDraftErrors, ThrowOnError> {return (options.client ?? this.client).post<TransferDraftResponses, TransferDraftErrors, ThrowOnError>({url: '/email/drafts/{id}/transfer',@@ -305,14 +305,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List all email filters for the current user.*/public listEmailFilters<ThrowOnError extends boolean = false>(options?: Options<ListEmailFiltersData, ThrowOnError>): RequestResult<ListEmailFiltersResponses, ListEmailFiltersErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListEmailFiltersResponses, ListEmailFiltersErrors, ThrowOnError>({ url: '/email/filters', ...options });}-+/*** Create or update an email filter.*/@@ -326,28 +326,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete an email filter by ID.*/public deleteEmailFilter<ThrowOnError extends boolean = false>(options: Options<DeleteEmailFilterData, ThrowOnError>): RequestResult<DeleteEmailFilterResponses, DeleteEmailFilterErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteEmailFilterResponses, DeleteEmailFilterErrors, ThrowOnError>({ url: '/email/filters/{id}', ...options });}-+/*** Initialize email functionality for the user. Populates initial threads and enables inbox syncing.*/public initUser<ThrowOnError extends boolean = false>(options?: Options<InitUserData, ThrowOnError>): RequestResult<InitUserResponses, InitUserErrors, ThrowOnError> {return (options?.client ?? this.client).post<InitUserResponses, InitUserErrors, ThrowOnError>({ url: '/email/init', ...options });}-+/*** List all labels for the user's email link.*/public listLabels<ThrowOnError extends boolean = false>(options?: Options<ListLabelsData, ThrowOnError>): RequestResult<ListLabelsResponses, ListLabelsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListLabelsResponses, ListLabelsErrors, ThrowOnError>({ url: '/email/labels', ...options });}-+/*** Create a label.*/@@ -361,21 +361,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a label.*/public deleteLabel<ThrowOnError extends boolean = false>(options: Options<DeleteLabelData, ThrowOnError>): RequestResult<DeleteLabelResponses, DeleteLabelErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteLabelResponses, DeleteLabelErrors, ThrowOnError>({ url: '/email/labels/{id}', ...options });}-+/*** List all links belonging to the user.*/public listLinks<ThrowOnError extends boolean = false>(options?: Options<ListLinksData, ThrowOnError>): RequestResult<ListLinksResponses, ListLinksErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListLinksResponses, ListLinksErrors, ThrowOnError>({ url: '/email/links', ...options });}-+/*** Probes the live auth state of each of the caller's inboxes (owned and delegated)* against the auth service and records the result on each link. A grant that died@@ -391,7 +391,7 @@ export class Sdk extends HeyApiClient {public healthCheckLinks<ThrowOnError extends boolean = false>(options?: Options<HealthCheckLinksData, ThrowOnError>): RequestResult<HealthCheckLinksResponses, HealthCheckLinksErrors, ThrowOnError> {return (options?.client ?? this.client).post<HealthCheckLinksResponses, HealthCheckLinksErrors, ThrowOnError>({ url: '/email/links/health-check', ...options });}-+/*** Removes a linked inbox.*@@ -402,7 +402,7 @@ export class Sdk extends HeyApiClient {public deleteLink<ThrowOnError extends boolean = false>(options: Options<DeleteLinkData, ThrowOnError>): RequestResult<DeleteLinkResponses, DeleteLinkErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteLinkResponses, DeleteLinkErrors, ThrowOnError>({ url: '/email/links/{link_id}', ...options });}-+/*** Turns calendar off for a connected inbox.*@@ -417,7 +417,7 @@ export class Sdk extends HeyApiClient {public disableLinkCalendar<ThrowOnError extends boolean = false>(options: Options<DisableLinkCalendarData, ThrowOnError>): RequestResult<DisableLinkCalendarResponses, DisableLinkCalendarErrors, ThrowOnError> {return (options.client ?? this.client).delete<DisableLinkCalendarResponses, DisableLinkCalendarErrors, ThrowOnError>({ url: '/email/links/{link_id}/calendar', ...options });}-+/*** Re-syncs a linked inbox by enqueuing a fresh backfill.*@@ -427,7 +427,7 @@ export class Sdk extends HeyApiClient {public resyncLink<ThrowOnError extends boolean = false>(options: Options<ResyncLinkData, ThrowOnError>): RequestResult<ResyncLinkResponses, ResyncLinkErrors, ThrowOnError> {return (options.client ?? this.client).post<ResyncLinkResponses, ResyncLinkErrors, ThrowOnError>({ url: '/email/links/{link_id}/resync', ...options });}-+/*** Send a message.*/@@ -441,7 +441,7 @@ export class Sdk extends HeyApiClient {}});}-+public getMessagesBatch<ThrowOnError extends boolean = false>(options: Options<GetMessagesBatchData, ThrowOnError>): RequestResult<GetMessagesBatchResponses, GetMessagesBatchErrors, ThrowOnError> {return (options.client ?? this.client).post<GetMessagesBatchResponses, GetMessagesBatchErrors, ThrowOnError>({url: '/email/messages/batch',@@ -452,7 +452,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Add or remove a label from a batch of messages*/@@ -466,18 +466,18 @@ export class Sdk extends HeyApiClient {}});}-+public getMessage<ThrowOnError extends boolean = false>(options: Options<GetMessageData, ThrowOnError>): RequestResult<GetMessageResponses, GetMessageErrors, ThrowOnError> {return (options.client ?? this.client).get<GetMessageResponses, GetMessageErrors, ThrowOnError>({ url: '/email/messages/{id}', ...options });}-+/*** Download a message's original source as an `.eml` file.*/public getMessageEml<ThrowOnError extends boolean = false>(options: Options<GetMessageEmlData, ThrowOnError>): RequestResult<GetMessageEmlResponses, GetMessageEmlErrors, ThrowOnError> {return (options.client ?? this.client).get<GetMessageEmlResponses, GetMessageEmlErrors, ThrowOnError>({ url: '/email/messages/{id}/eml', ...options });}-+/*** Patch user settings.*/@@ -491,14 +491,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Accepted label and sender-policy changes awaiting provider confirmation.*/public mailboxSettingsOperations<ThrowOnError extends boolean = false>(options?: Options<MailboxSettingsOperationsData, ThrowOnError>): RequestResult<MailboxSettingsOperationsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<MailboxSettingsOperationsResponses, unknown, ThrowOnError>({ url: '/email/settings/operations', ...options });}-+/*** Disables inbox syncing for the selected inbox.*@@ -511,7 +511,7 @@ export class Sdk extends HeyApiClient {public disableSync<ThrowOnError extends boolean = false>(options?: Options<DisableSyncData, ThrowOnError>): RequestResult<DisableSyncResponses, DisableSyncErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DisableSyncResponses, DisableSyncErrors, ThrowOnError>({ url: '/email/sync', ...options });}-+/*** Change the archived status of up to 100 threads, sending one provider* write per inbox. A thread that can't change is reported, not fatal.@@ -526,14 +526,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get paginated thread previews with cursor-based pagination.*/public previewsInboxCursor<ThrowOnError extends boolean = false>(options: Options<PreviewsInboxCursorData, ThrowOnError>): RequestResult<PreviewsInboxCursorResponses, PreviewsInboxCursorErrors, ThrowOnError> {return (options.client ?? this.client).get<PreviewsInboxCursorResponses, PreviewsInboxCursorErrors, ThrowOnError>({ url: '/email/threads/previews/cursor/{view}', ...options });}-+/*** Change the archived status of a thread.*/@@ -547,7 +547,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Add or remove a label from all messages in a thread.*/@@ -561,25 +561,25 @@ export class Sdk extends HeyApiClient {}});}-+public getThreadMessagesHandler<ThrowOnError extends boolean = false>(options: Options<GetThreadMessagesHandlerData, ThrowOnError>): RequestResult<GetThreadMessagesHandlerResponses, GetThreadMessagesHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetThreadMessagesHandlerResponses, GetThreadMessagesHandlerErrors, ThrowOnError>({ url: '/email/threads/{id}/messages', ...options });}-+/*** Fetch the latest organization action outcomes without provider-specific status strings.*/public threadOperations<ThrowOnError extends boolean = false>(options: Options<ThreadOperationsData, ThrowOnError>): RequestResult<ThreadOperationsResponses, ThreadOperationsErrors, ThrowOnError> {return (options.client ?? this.client).get<ThreadOperationsResponses, ThreadOperationsErrors, ThrowOnError>({ url: '/email/threads/{id}/operations', ...options });}-+/*** Called by FE when the user has seen a thread.*/public threadSeen<ThrowOnError extends boolean = false>(options: Options<ThreadSeenData, ThrowOnError>): RequestResult<ThreadSeenResponses, ThreadSeenErrors, ThrowOnError> {return (options.client ?? this.client).post<ThreadSeenResponses, ThreadSeenErrors, ThrowOnError>({ url: '/email/threads/{id}/seen', ...options });}-+/*** Set mailbox state without client-side provider label lookup.*/@@ -593,18 +593,18 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get a thread with paginated messages.*/public getThread<ThrowOnError extends boolean = false>(options: Options<GetThreadData, ThrowOnError>): RequestResult<GetThreadResponses, GetThreadErrors, ThrowOnError> {return (options.client ?? this.client).get<GetThreadResponses, GetThreadErrors, ThrowOnError>({ url: '/email/threads/{thread_id}', ...options });}-+public getThreadCalendarInvitations<ThrowOnError extends boolean = false>(options: Options<GetThreadCalendarInvitationsData, ThrowOnError>): RequestResult<GetThreadCalendarInvitationsResponses, GetThreadCalendarInvitationsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetThreadCalendarInvitationsResponses, GetThreadCalendarInvitationsErrors, ThrowOnError>({ url: '/email/threads/{thread_id}/calendar-invitations', ...options });}-+/*** Add a shared event saved from one of the thread's messages to one of the* viewer's Google calendars, the way Add to calendar adds a channel-shared@@ -623,7 +623,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Update the project assignment for a thread.*/@@ -637,18 +637,18 @@ export class Sdk extends HeyApiClient {}});}-+public getThreadReadReceipts<ThrowOnError extends boolean = false>(options: Options<GetThreadReadReceiptsData, ThrowOnError>): RequestResult<GetThreadReadReceiptsResponses, GetThreadReadReceiptsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetThreadReadReceiptsResponses, GetThreadReadReceiptsErrors, ThrowOnError>({ url: '/email/threads/{thread_id}/read-receipts', ...options });}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Every request gets the same uncacheable pixel so the response reveals nothing* about the token, and each open reaches the server.diff --git a/packages/sdk/generated/notification/index.ts b/packages/sdk/generated/notification/index.tsindex a588cb2e70..2a544968a8 100644--- a/packages/sdk/generated/notification/index.ts+++ b/packages/sdk/generated/notification/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { type Options, Sdk } from './sdk.gen';-export type { AgentSessionMentionedMetadata, AgentSessionNotificationRef, AgentSessionOriginParent, AgentSessionSettledMetadata, AgentSessionWaitingForInputMetadata, AiResponseMetadata, ApiUserNotification, BulkDeleteUserNotificationsV2Data, BulkDeleteUserNotificationsV2Error, BulkDeleteUserNotificationsV2Errors, BulkDeleteUserNotificationsV2Responses, BulkGetByEventItemIdsRequest, BulkGetTypedNotificationsByEventItemIdsData, BulkGetTypedNotificationsByEventItemIdsError, BulkGetTypedNotificationsByEventItemIdsErrors, BulkGetTypedNotificationsByEventItemIdsResponse, BulkGetTypedNotificationsByEventItemIdsResponses, BulkMarkNotificationsDoneData, BulkMarkNotificationsDoneError, BulkMarkNotificationsDoneErrors, BulkMarkNotificationsDoneResponses, BulkMarkNotificationsSeenData, BulkMarkNotificationsSeenError, BulkMarkNotificationsSeenErrors, BulkMarkNotificationsSeenResponses, BulkMarkNotificationsUndoneData, BulkMarkNotificationsUndoneError, BulkMarkNotificationsUndoneErrors, BulkMarkNotificationsUndoneResponses, CalendarEventJoinRequestMetadata, CalendarEventReminderMetadata, CallStartedMetadata, ChannelInviteMetadata, ChannelMentionMetadata, ChannelMessageReactionMetadata, ChannelMessageSendMetadata, ChannelReplyMetadata, ChannelType, ClientOptions, CommentedOnDocumentMetadata, CommentRef, CommonChannelMetadata, ConnGatewayNotificationPayload, CreateNotification, CrmDiscussionMetadata, CrmDiscussionReason, DeleteUserNotificationV2Data, DeleteUserNotificationV2Error, DeleteUserNotificationV2Errors, DeleteUserNotificationV2Responses, DeviceRequest, DeviceType, DisableNotificationTypeData, DisableNotificationTypeError, DisableNotificationTypeErrors, DisableNotificationTypeResponses, DocumentMentionMetadata, EmptyResponse, EnableNotificationTypeData, EnableNotificationTypeError, EnableNotificationTypeErrors, EnableNotificationTypeResponses, Entity, EntityAccessGrantedMetadata, EntityAccessRequestedMetadata, EntityType, ErrorResponse, ExternalChatMessageMetadata, ExternalChatProvider, GetAllUserNotificationsResponse, GetNotificationTypePreferencesData, GetNotificationTypePreferencesError, GetNotificationTypePreferencesErrors, GetNotificationTypePreferencesResponse, GetNotificationTypePreferencesResponse2, GetNotificationTypePreferencesResponses, GetTypedNotificationByIdData, GetTypedNotificationByIdError, GetTypedNotificationByIdErrors, GetTypedNotificationByIdResponse, GetTypedNotificationByIdResponses, GetTypedNotificationsByEventItemIdData, GetTypedNotificationsByEventItemIdError, GetTypedNotificationsByEventItemIdErrors, GetTypedNotificationsByEventItemIdResponse, GetTypedNotificationsByEventItemIdResponses, GetUnsubscribesData, GetUnsubscribesError, GetUnsubscribesErrors, GetUnsubscribesResponse, GetUnsubscribesResponses, GithubPrCheckRun, GithubPrCheckRunState, GithubPrComment, GithubPrCommentKind, GithubPrEventAction, GithubPrEventStatus, GithubPrMention, GithubPrMentionLocation, GithubPrNotificationCommon, GithubPrReview, GithubPrReviewState, GithubPrStatusChanged, GithubReviewRequested, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, InboxReauthRequiredMetadata, InitiativeDiscussionMetadata, InitiativeDiscussionReason, InviteePlan, InviteToTeamMetadata, ItemSharedMetadata, ListTypedNotificationsData, ListTypedNotificationsError, ListTypedNotificationsErrors, ListTypedNotificationsResponse, ListTypedNotificationsResponses, MacroUserIdStr, MentionedInDocumentCommentMetadata, NewEmailMetadata, NotifEvent, NotificationBulkRequest, NotificationDocumentSubType, NotificationServiceApiVersion, NotificationState, NotificationTypeName, PushNotificationData, PushNotificationNavigation, RealtimeNotifTaggedContentValue, ReminderMetadata, RemoveUnsubscribeAllData, RemoveUnsubscribeAllError, RemoveUnsubscribeAllErrors, RemoveUnsubscribeAllResponse, RemoveUnsubscribeAllResponses, RemoveUnsubscribeItemData, RemoveUnsubscribeItemError, RemoveUnsubscribeItemErrors, RemoveUnsubscribeItemResponse, RemoveUnsubscribeItemResponses, RepliedToDocumentCommentThreadMetadata, RequestedAccessLevel, RoutineRunFinishedMetadata, RoutineRunOutcome, TaskAssignedMetadata, UnsubscribeAllData, UnsubscribeAllError, UnsubscribeAllErrors, UnsubscribeAllResponse, UnsubscribeAllResponses, UnsubscribeEmailData, UnsubscribeEmailError, UnsubscribeEmailErrors, UnsubscribeEmailResponse, UnsubscribeEmailResponses, UnsubscribeItemData, UnsubscribeItemError, UnsubscribeItemErrors, UnsubscribeItemPathParams, UnsubscribeItemResponse, UnsubscribeItemResponses, UserUnsubscribe } from './types.gen';+export type { AgentSessionMentionedMetadata, AgentSessionNotificationRef, AgentSessionOriginParent, AgentSessionSettledMetadata, AgentSessionWaitingForInputMetadata, AiResponseMetadata, ApiUserNotification, BulkDeleteUserNotificationsV2Data, BulkDeleteUserNotificationsV2Error, BulkDeleteUserNotificationsV2Errors, BulkDeleteUserNotificationsV2Responses, BulkGetByEventItemIdsRequest, BulkGetTypedNotificationsByEventItemIdsData, BulkGetTypedNotificationsByEventItemIdsError, BulkGetTypedNotificationsByEventItemIdsErrors, BulkGetTypedNotificationsByEventItemIdsResponse, BulkGetTypedNotificationsByEventItemIdsResponses, BulkItem, BulkMarkNotificationsDoneData, BulkMarkNotificationsDoneError, BulkMarkNotificationsDoneErrors, BulkMarkNotificationsDoneResponses, BulkMarkNotificationsSeenData, BulkMarkNotificationsSeenError, BulkMarkNotificationsSeenErrors, BulkMarkNotificationsSeenResponses, BulkMarkNotificationsUndoneData, BulkMarkNotificationsUndoneError, BulkMarkNotificationsUndoneErrors, BulkMarkNotificationsUndoneResponses, BulkRemoveItemsRequest, BulkSetItemsRequest, CalendarEventJoinRequestMetadata, CalendarEventReminderMetadata, CallStartedMetadata, ChannelInviteMetadata, ChannelMentionMetadata, ChannelMessageReactionMetadata, ChannelMessageSendMetadata, ChannelReplyMetadata, ChannelType, ClientOptions, CommentedOnDocumentMetadata, CommentRef, CommonChannelMetadata, ConnGatewayNotificationPayload, CreateNotification, CrmDiscussionMetadata, CrmDiscussionReason, DeleteUserNotificationV2Data, DeleteUserNotificationV2Error, DeleteUserNotificationV2Errors, DeleteUserNotificationV2Responses, DeviceRequest, DeviceType, DisableNotificationTypeData, DisableNotificationTypeError, DisableNotificationTypeErrors, DisableNotificationTypeResponses, DocumentMentionMetadata, EmptyResponse, EnableNotificationTypeData, EnableNotificationTypeError, EnableNotificationTypeErrors, EnableNotificationTypeResponses, Entity, EntityAccessGrantedMetadata, EntityAccessRequestedMetadata, EntityType, ErrorResponse, ExternalChatMessageMetadata, ExternalChatProvider, GetAllUserNotificationsResponse, GetNotificationTypePreferencesData, GetNotificationTypePreferencesError, GetNotificationTypePreferencesErrors, GetNotificationTypePreferencesResponse, GetNotificationTypePreferencesResponse2, GetNotificationTypePreferencesResponses, GetTypedNotificationByIdData, GetTypedNotificationByIdError, GetTypedNotificationByIdErrors, GetTypedNotificationByIdResponse, GetTypedNotificationByIdResponses, GetTypedNotificationsByEventItemIdData, GetTypedNotificationsByEventItemIdError, GetTypedNotificationsByEventItemIdErrors, GetTypedNotificationsByEventItemIdResponse, GetTypedNotificationsByEventItemIdResponses, GetUnsubscribesData, GetUnsubscribesError, GetUnsubscribesErrors, GetUnsubscribesResponse, GetUnsubscribesResponses, GithubPrCheckRun, GithubPrCheckRunState, GithubPrComment, GithubPrCommentKind, GithubPrEventAction, GithubPrEventStatus, GithubPrMention, GithubPrMentionLocation, GithubPrNotificationCommon, GithubPrReview, GithubPrReviewState, GithubPrStatusChanged, GithubReviewRequested, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, InboxReauthRequiredMetadata, InitiativeDiscussionMetadata, InitiativeDiscussionReason, InviteePlan, InviteToTeamMetadata, ItemSharedMetadata, ListTypedNotificationsData, ListTypedNotificationsError, ListTypedNotificationsErrors, ListTypedNotificationsResponse, ListTypedNotificationsResponses, MacroUserIdStr, MentionedInDocumentCommentMetadata, NewEmailMetadata, NotifEvent, NotificationBulkRequest, NotificationDocumentSubType, NotificationServiceApiVersion, NotificationState, NotificationTypeName, PushNotificationData, PushNotificationNavigation, RealtimeNotifTaggedContentValue, ReminderMetadata, RemoveUnsubscribeAllData, RemoveUnsubscribeAllError, RemoveUnsubscribeAllErrors, RemoveUnsubscribeAllResponse, RemoveUnsubscribeAllResponses, RemoveUnsubscribeItemData, RemoveUnsubscribeItemError, RemoveUnsubscribeItemErrors, RemoveUnsubscribeItemResponse, RemoveUnsubscribeItemResponses, RemoveUnsubscribeItemsData, RemoveUnsubscribeItemsError, RemoveUnsubscribeItemsErrors, RemoveUnsubscribeItemsResponse, RemoveUnsubscribeItemsResponses, RepliedToDocumentCommentThreadMetadata, RequestedAccessLevel, RoutineRunFinishedMetadata, RoutineRunOutcome, TaskAssignedMetadata, UnsubscribeAllData, UnsubscribeAllError, UnsubscribeAllErrors, UnsubscribeAllResponse, UnsubscribeAllResponses, UnsubscribeEmailData, UnsubscribeEmailError, UnsubscribeEmailErrors, UnsubscribeEmailResponse, UnsubscribeEmailResponses, UnsubscribeItemData, UnsubscribeItemError, UnsubscribeItemErrors, UnsubscribeItemPathParams, UnsubscribeItemResponse, UnsubscribeItemResponses, UnsubscribeItemsData, UnsubscribeItemsError, UnsubscribeItemsErrors, UnsubscribeItemsResponse, UnsubscribeItemsResponses, UserUnsubscribe } from './types.gen';diff --git a/packages/sdk/generated/notification/sdk.gen.ts b/packages/sdk/generated/notification/sdk.gen.tsindex 63d8b11069..2aa67f23b1 100644--- a/packages/sdk/generated/notification/sdk.gen.ts+++ b/packages/sdk/generated/notification/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 { BulkDeleteUserNotificationsV2Data, BulkDeleteUserNotificationsV2Errors, BulkDeleteUserNotificationsV2Responses, BulkGetTypedNotificationsByEventItemIdsData, BulkGetTypedNotificationsByEventItemIdsErrors, BulkGetTypedNotificationsByEventItemIdsResponses, BulkMarkNotificationsDoneData, BulkMarkNotificationsDoneErrors, BulkMarkNotificationsDoneResponses, BulkMarkNotificationsSeenData, BulkMarkNotificationsSeenErrors, BulkMarkNotificationsSeenResponses, BulkMarkNotificationsUndoneData, BulkMarkNotificationsUndoneErrors, BulkMarkNotificationsUndoneResponses, DeleteUserNotificationV2Data, DeleteUserNotificationV2Errors, DeleteUserNotificationV2Responses, DisableNotificationTypeData, DisableNotificationTypeErrors, DisableNotificationTypeResponses, EnableNotificationTypeData, EnableNotificationTypeErrors, EnableNotificationTypeResponses, GetNotificationTypePreferencesData, GetNotificationTypePreferencesErrors, GetNotificationTypePreferencesResponses, GetTypedNotificationByIdData, GetTypedNotificationByIdErrors, GetTypedNotificationByIdResponses, GetTypedNotificationsByEventItemIdData, GetTypedNotificationsByEventItemIdErrors, GetTypedNotificationsByEventItemIdResponses, GetUnsubscribesData, GetUnsubscribesErrors, GetUnsubscribesResponses, HealthHandlerData, HealthHandlerResponses, ListTypedNotificationsData, ListTypedNotificationsErrors, ListTypedNotificationsResponses, RemoveUnsubscribeAllData, RemoveUnsubscribeAllErrors, RemoveUnsubscribeAllResponses, RemoveUnsubscribeItemData, RemoveUnsubscribeItemErrors, RemoveUnsubscribeItemResponses, UnsubscribeAllData, UnsubscribeAllErrors, UnsubscribeAllResponses, UnsubscribeEmailData, UnsubscribeEmailErrors, UnsubscribeEmailResponses, UnsubscribeItemData, UnsubscribeItemErrors, UnsubscribeItemResponses } from './types.gen';+import type { BulkDeleteUserNotificationsV2Data, BulkDeleteUserNotificationsV2Errors, BulkDeleteUserNotificationsV2Responses, BulkGetTypedNotificationsByEventItemIdsData, BulkGetTypedNotificationsByEventItemIdsErrors, BulkGetTypedNotificationsByEventItemIdsResponses, BulkMarkNotificationsDoneData, BulkMarkNotificationsDoneErrors, BulkMarkNotificationsDoneResponses, BulkMarkNotificationsSeenData, BulkMarkNotificationsSeenErrors, BulkMarkNotificationsSeenResponses, BulkMarkNotificationsUndoneData, BulkMarkNotificationsUndoneErrors, BulkMarkNotificationsUndoneResponses, DeleteUserNotificationV2Data, DeleteUserNotificationV2Errors, DeleteUserNotificationV2Responses, DisableNotificationTypeData, DisableNotificationTypeErrors, DisableNotificationTypeResponses, EnableNotificationTypeData, EnableNotificationTypeErrors, EnableNotificationTypeResponses, GetNotificationTypePreferencesData, GetNotificationTypePreferencesErrors, GetNotificationTypePreferencesResponses, GetTypedNotificationByIdData, GetTypedNotificationByIdErrors, GetTypedNotificationByIdResponses, GetTypedNotificationsByEventItemIdData, GetTypedNotificationsByEventItemIdErrors, GetTypedNotificationsByEventItemIdResponses, GetUnsubscribesData, GetUnsubscribesErrors, GetUnsubscribesResponses, HealthHandlerData, HealthHandlerResponses, ListTypedNotificationsData, ListTypedNotificationsErrors, ListTypedNotificationsResponses, RemoveUnsubscribeAllData, RemoveUnsubscribeAllErrors, RemoveUnsubscribeAllResponses, RemoveUnsubscribeItemData, RemoveUnsubscribeItemErrors, RemoveUnsubscribeItemResponses, RemoveUnsubscribeItemsData, RemoveUnsubscribeItemsErrors, RemoveUnsubscribeItemsResponses, UnsubscribeAllData, UnsubscribeAllErrors, UnsubscribeAllResponses, UnsubscribeEmailData, UnsubscribeEmailErrors, UnsubscribeEmailResponses, UnsubscribeItemData, UnsubscribeItemErrors, UnsubscribeItemResponses, UnsubscribeItemsData, UnsubscribeItemsErrors, UnsubscribeItemsResponses } from './types.gen';export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {/**@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,42 +56,70 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Gets the users unsubscribe items.*/public getUnsubscribes<ThrowOnError extends boolean = false>(options?: Options<GetUnsubscribesData, ThrowOnError>): RequestResult<GetUnsubscribesResponses, GetUnsubscribesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetUnsubscribesResponses, GetUnsubscribesErrors, ThrowOnError>({ url: '/unsubscribe', ...options });}-+/*** Unsubscribes a user from receiving emails*/public unsubscribeEmail<ThrowOnError extends boolean = false>(options?: Options<UnsubscribeEmailData, ThrowOnError>): RequestResult<UnsubscribeEmailResponses, UnsubscribeEmailErrors, ThrowOnError> {return (options?.client ?? this.client).post<UnsubscribeEmailResponses, UnsubscribeEmailErrors, ThrowOnError>({ url: '/unsubscribe/email', ...options });}-+/*** Removes a unsubscribe item for a user.*/public removeUnsubscribeItem<ThrowOnError extends boolean = false>(options: Options<RemoveUnsubscribeItemData, ThrowOnError>): RequestResult<RemoveUnsubscribeItemResponses, RemoveUnsubscribeItemErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveUnsubscribeItemResponses, RemoveUnsubscribeItemErrors, ThrowOnError>({ url: '/unsubscribe/item/{item_type}/{item_id}', ...options });}-+/*** Unsubscribes a user from a given item for notifications.*/public unsubscribeItem<ThrowOnError extends boolean = false>(options: Options<UnsubscribeItemData, ThrowOnError>): RequestResult<UnsubscribeItemResponses, UnsubscribeItemErrors, ThrowOnError> {return (options.client ?? this.client).post<UnsubscribeItemResponses, UnsubscribeItemErrors, ThrowOnError>({ url: '/unsubscribe/item/{item_type}/{item_id}', ...options });}-++ /**+ * Atomically resume delivery for the authenticated user's items.+ */+ public removeUnsubscribeItems<ThrowOnError extends boolean = false>(options: Options<RemoveUnsubscribeItemsData, ThrowOnError>): RequestResult<RemoveUnsubscribeItemsResponses, RemoveUnsubscribeItemsErrors, ThrowOnError> {+ return (options.client ?? this.client).delete<RemoveUnsubscribeItemsResponses, RemoveUnsubscribeItemsErrors, ThrowOnError>({+ url: '/unsubscribe/items',+ ...options,+ headers: {+ 'Content-Type': 'application/json',+ ...options.headers+ }+ });+ }++ /**+ * Atomically mute or snooze items for the authenticated user.+ */+ public unsubscribeItems<ThrowOnError extends boolean = false>(options: Options<UnsubscribeItemsData, ThrowOnError>): RequestResult<UnsubscribeItemsResponses, UnsubscribeItemsErrors, ThrowOnError> {+ return (options.client ?? this.client).post<UnsubscribeItemsResponses, UnsubscribeItemsErrors, ThrowOnError>({+ url: '/unsubscribe/items',+ ...options,+ headers: {+ 'Content-Type': 'application/json',+ ...options.headers+ }+ });+ }+/*** Unmutes all notifications.* Existing notifications that were muted manually will remain muted.@@ -99,14 +127,14 @@ export class Sdk extends HeyApiClient {public removeUnsubscribeAll<ThrowOnError extends boolean = false>(options?: Options<RemoveUnsubscribeAllData, ThrowOnError>): RequestResult<RemoveUnsubscribeAllResponses, RemoveUnsubscribeAllErrors, ThrowOnError> {return (options?.client ?? this.client).delete<RemoveUnsubscribeAllResponses, RemoveUnsubscribeAllErrors, ThrowOnError>({ url: '/unsubscribe/mute', ...options });}-+/*** Unsubscribes user from all notifications.*/public unsubscribeAll<ThrowOnError extends boolean = false>(options?: Options<UnsubscribeAllData, ThrowOnError>): RequestResult<UnsubscribeAllResponses, UnsubscribeAllErrors, ThrowOnError> {return (options?.client ?? this.client).post<UnsubscribeAllResponses, UnsubscribeAllErrors, ThrowOnError>({ url: '/unsubscribe/mute', ...options });}-+/*** Wrapper handler that calls the inner generic list handler with `serde_json::Value`,* then converts each row to [`UserNotificationRow<NotifEvent>`].@@ -116,7 +144,7 @@ export class Sdk extends HeyApiClient {public listTypedNotifications<ThrowOnError extends boolean = false>(options?: Options<ListTypedNotificationsData, ThrowOnError>): RequestResult<ListTypedNotificationsResponses, ListTypedNotificationsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListTypedNotificationsResponses, ListTypedNotificationsErrors, ThrowOnError>({ url: '/v1/user_notifications', ...options });}-+/*** Wrapper handler that calls the inner generic bulk-get handler with `serde_json::Value`,* then converts each row to [`UserNotificationRow<NotifEvent>`].@@ -133,42 +161,42 @@ export class Sdk extends HeyApiClient {}});}-+/*** Typed wrapper for getting notifications by a single event item ID.*/public getTypedNotificationsByEventItemId<ThrowOnError extends boolean = false>(options: Options<GetTypedNotificationsByEventItemIdData, ThrowOnError>): RequestResult<GetTypedNotificationsByEventItemIdResponses, GetTypedNotificationsByEventItemIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetTypedNotificationsByEventItemIdResponses, GetTypedNotificationsByEventItemIdErrors, ThrowOnError>({ url: '/v1/user_notifications/item/{event_item_id}', ...options });}-+/*** Get the notification types that the user has disabled.*/public getNotificationTypePreferences<ThrowOnError extends boolean = false>(options?: Options<GetNotificationTypePreferencesData, ThrowOnError>): RequestResult<GetNotificationTypePreferencesResponses, GetNotificationTypePreferencesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetNotificationTypePreferencesResponses, GetNotificationTypePreferencesErrors, ThrowOnError>({ url: '/v1/user_notifications/preferences', ...options });}-+/*** Disable a notification type for the authenticated user.*/public disableNotificationType<ThrowOnError extends boolean = false>(options: Options<DisableNotificationTypeData, ThrowOnError>): RequestResult<DisableNotificationTypeResponses, DisableNotificationTypeErrors, ThrowOnError> {return (options.client ?? this.client).put<DisableNotificationTypeResponses, DisableNotificationTypeErrors, ThrowOnError>({ url: '/v1/user_notifications/preferences/{notification_event_type}/disable', ...options });}-+/*** Re-enable a notification type for the authenticated user.*/public enableNotificationType<ThrowOnError extends boolean = false>(options: Options<EnableNotificationTypeData, ThrowOnError>): RequestResult<EnableNotificationTypeResponses, EnableNotificationTypeErrors, ThrowOnError> {return (options.client ?? this.client).put<EnableNotificationTypeResponses, EnableNotificationTypeErrors, ThrowOnError>({ url: '/v1/user_notifications/preferences/{notification_event_type}/enable', ...options });}-+/*** Typed wrapper for getting a single notification by ID.*/public getTypedNotificationById<ThrowOnError extends boolean = false>(options: Options<GetTypedNotificationByIdData, ThrowOnError>): RequestResult<GetTypedNotificationByIdResponses, GetTypedNotificationByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetTypedNotificationByIdResponses, GetTypedNotificationByIdErrors, ThrowOnError>({ url: '/v1/user_notifications/{notification_id}', ...options });}-+/*** Soft-delete multiple user notifications.*/@@ -182,7 +210,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Mark notifications as done.*/@@ -196,7 +224,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Mark notifications as seen.*/@@ -210,7 +238,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Mark notifications as not done.*/@@ -224,7 +252,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Soft-delete a single user notification.*/diff --git a/packages/sdk/generated/notification/types.gen.ts b/packages/sdk/generated/notification/types.gen.tsindex e69fc1af1e..c0b8b1e64b 100644--- a/packages/sdk/generated/notification/types.gen.ts+++ b/packages/sdk/generated/notification/types.gen.ts@@ -175,6 +175,23 @@ export type BulkGetByEventItemIdsRequest = {eventItemIds: Array<string>;};+export type BulkItem = {+ item_id: string;+ item_type: EntityType;+};++export type BulkRemoveItemsRequest = {+ items: Array<BulkItem>;+};++export type BulkSetItemsRequest = {+ items: Array<BulkItem>;+ /**+ * A future resume time. Omit to mute indefinitely.+ */+ snoozed_until?: string | null;+};+/*** A channel member who sees a calendar event only through a channel share* asked the person who shared it to add them as a guest. Sent to the sharer,@@ -1659,6 +1676,48 @@ export type UnsubscribeItemResponses = {export type UnsubscribeItemResponse = UnsubscribeItemResponses[keyof UnsubscribeItemResponses];+export type RemoveUnsubscribeItemsData = {+ body: BulkRemoveItemsRequest;+ path?: never;+ query?: never;+ url: '/unsubscribe/items';+};++export type RemoveUnsubscribeItemsErrors = {+ 400: ErrorResponse;+ 401: ErrorResponse;+ 500: ErrorResponse;+};++export type RemoveUnsubscribeItemsError = RemoveUnsubscribeItemsErrors[keyof RemoveUnsubscribeItemsErrors];++export type RemoveUnsubscribeItemsResponses = {+ 200: EmptyResponse;+};++export type RemoveUnsubscribeItemsResponse = RemoveUnsubscribeItemsResponses[keyof RemoveUnsubscribeItemsResponses];++export type UnsubscribeItemsData = {+ body: BulkSetItemsRequest;+ path?: never;+ query?: never;+ url: '/unsubscribe/items';+};++export type UnsubscribeItemsErrors = {+ 400: ErrorResponse;+ 401: ErrorResponse;+ 500: ErrorResponse;+};++export type UnsubscribeItemsError = UnsubscribeItemsErrors[keyof UnsubscribeItemsErrors];++export type UnsubscribeItemsResponses = {+ 200: EmptyResponse;+};++export type UnsubscribeItemsResponse = UnsubscribeItemsResponses[keyof UnsubscribeItemsResponses];+export type RemoveUnsubscribeAllData = {body?: never;path?: never;diff --git a/packages/sdk/generated/properties/sdk.gen.ts b/packages/sdk/generated/properties/sdk.gen.tsindex 8ec16563ee..2812fba422 100644--- a/packages/sdk/generated/properties/sdk.gen.ts+++ b/packages/sdk/generated/properties/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,14 +56,14 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** List property definitions with flexible filtering*/public listProperties<ThrowOnError extends boolean = false>(options: Options<ListPropertiesData, ThrowOnError>): RequestResult<ListPropertiesResponses, ListPropertiesErrors, ThrowOnError> {return (options.client ?? this.client).get<ListPropertiesResponses, ListPropertiesErrors, ThrowOnError>({ url: '/properties/definitions', ...options });}-+/*** Create a new property definition*/@@ -77,28 +77,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a property definition*/public deletePropertyDefinition<ThrowOnError extends boolean = false>(options: Options<DeletePropertyDefinitionData, ThrowOnError>): RequestResult<DeletePropertyDefinitionResponses, DeletePropertyDefinitionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeletePropertyDefinitionResponses, DeletePropertyDefinitionErrors, ThrowOnError>({ url: '/properties/definitions/{definition_id}', ...options });}-+/*** Get a property definition by ID*/public getPropertyDefinition<ThrowOnError extends boolean = false>(options: Options<GetPropertyDefinitionData, ThrowOnError>): RequestResult<GetPropertyDefinitionResponses, GetPropertyDefinitionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetPropertyDefinitionResponses, GetPropertyDefinitionErrors, ThrowOnError>({ url: '/properties/definitions/{definition_id}', ...options });}-+/*** Get all options for a property (for dropdowns)*/public getPropertyOptions<ThrowOnError extends boolean = false>(options: Options<GetPropertyOptionsData, ThrowOnError>): RequestResult<GetPropertyOptionsResponses, GetPropertyOptionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetPropertyOptionsResponses, GetPropertyOptionsErrors, ThrowOnError>({ url: '/properties/definitions/{definition_id}/options', ...options });}-+/*** Add a new option to a property dropdown*/@@ -112,14 +112,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a property option*/public deletePropertyOption<ThrowOnError extends boolean = false>(options: Options<DeletePropertyOptionData, ThrowOnError>): RequestResult<DeletePropertyOptionResponses, DeletePropertyOptionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeletePropertyOptionResponses, DeletePropertyOptionErrors, ThrowOnError>({ url: '/properties/definitions/{definition_id}/options/{option_id}', ...options });}-+/*** Update a property option in place (rename / recolor / reorder).*@@ -135,7 +135,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get properties for multiple entities in bulk (public endpoint with user auth)*@@ -152,14 +152,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get all properties for an entity*/public getEntityProperties<ThrowOnError extends boolean = false>(options: Options<GetEntityPropertiesData, ThrowOnError>): RequestResult<GetEntityPropertiesResponses, GetEntityPropertiesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetEntityPropertiesResponses, GetEntityPropertiesErrors, ThrowOnError>({ url: '/properties/entities/{entity_type}/{entity_id}', ...options });}-+/*** Apply a complete tag-picker selection across an entity's multi-select* properties in one request.@@ -180,7 +180,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Set or update a property value for an entity, or attach a property without a value*/@@ -194,7 +194,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Remove a single option from an entity's multi-select property value.*@@ -205,7 +205,7 @@ export class Sdk extends HeyApiClient {public removeEntityPropertyOption<ThrowOnError extends boolean = false>(options: Options<RemoveEntityPropertyOptionData, ThrowOnError>): RequestResult<RemoveEntityPropertyOptionResponses, RemoveEntityPropertyOptionErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveEntityPropertyOptionResponses, RemoveEntityPropertyOptionErrors, ThrowOnError>({ url: '/properties/entities/{entity_type}/{entity_id}/{property_id}/options/{option_id}', ...options });}-+/*** Add a single option to an entity's multi-select property value.*@@ -217,14 +217,14 @@ export class Sdk extends HeyApiClient {public addEntityPropertyOption<ThrowOnError extends boolean = false>(options: Options<AddEntityPropertyOptionData, ThrowOnError>): RequestResult<AddEntityPropertyOptionResponses, AddEntityPropertyOptionErrors, ThrowOnError> {return (options.client ?? this.client).post<AddEntityPropertyOptionResponses, AddEntityPropertyOptionErrors, ThrowOnError>({ url: '/properties/entities/{entity_type}/{entity_id}/{property_id}/options/{option_id}', ...options });}-+/*** Remove a specific entity property by its ID*/public deleteEntityProperty<ThrowOnError extends boolean = false>(options: Options<DeleteEntityPropertyData, ThrowOnError>): RequestResult<DeleteEntityPropertyResponses, DeleteEntityPropertyErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteEntityPropertyResponses, DeleteEntityPropertyErrors, ThrowOnError>({ url: '/properties/entity_properties/{entity_property_id}', ...options });}-+/*** Apply one shared option delta (add / remove option ids on a single* multi-select property) to many entities in one request — e.g. tag a set of@@ -247,7 +247,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's tag sets: their personal set, plus their team's set when on a team.* Pure read - a scope with no provisioned definition yet returns an empty set.@@ -255,7 +255,7 @@ export class Sdk extends HeyApiClient {public listTags<ThrowOnError extends boolean = false>(options?: Options<ListTagsData, ThrowOnError>): RequestResult<ListTagsResponses, ListTagsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListTagsResponses, ListTagsErrors, ThrowOnError>({ url: '/properties/tags', ...options });}-+/*** Provision (get-or-create) the caller's tag set for a scope and return it. Called when* the caller creates their first label for that scope, so the read path stays side-effect free.@@ -270,7 +270,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Replace one of the caller's personal labels with an existing team label.*@@ -289,7 +289,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Share one of the caller's personal labels with their team.*diff --git a/packages/sdk/generated/scheduled-action/sdk.gen.ts b/packages/sdk/generated/scheduled-action/sdk.gen.tsindex 547583af02..b91b1d03c0 100644--- a/packages/sdk/generated/scheduled-action/sdk.gen.ts+++ b/packages/sdk/generated/scheduled-action/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,15 +56,15 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+public scheduledActionHealth<ThrowOnError extends boolean = false>(options?: Options<ScheduledActionHealthData, ThrowOnError>): RequestResult<ScheduledActionHealthResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<ScheduledActionHealthResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+public listScheduledActions<ThrowOnError extends boolean = false>(options?: Options<ListScheduledActionsData, ThrowOnError>): RequestResult<ListScheduledActionsResponses, ListScheduledActionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListScheduledActionsResponses, ListScheduledActionsErrors, ThrowOnError>({ url: '/scheduled-actions', ...options });}-+public createScheduledAction<ThrowOnError extends boolean = false>(options: Options<CreateScheduledActionData, ThrowOnError>): RequestResult<CreateScheduledActionResponses, CreateScheduledActionErrors, ThrowOnError> {return (options.client ?? this.client).post<CreateScheduledActionResponses, CreateScheduledActionErrors, ThrowOnError>({url: '/scheduled-actions',@@ -75,15 +75,15 @@ export class Sdk extends HeyApiClient {}});}-+public deleteScheduledAction<ThrowOnError extends boolean = false>(options: Options<DeleteScheduledActionData, ThrowOnError>): RequestResult<DeleteScheduledActionResponses, DeleteScheduledActionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteScheduledActionResponses, DeleteScheduledActionErrors, ThrowOnError>({ url: '/scheduled-actions/{id}', ...options });}-+public getScheduledAction<ThrowOnError extends boolean = false>(options: Options<GetScheduledActionData, ThrowOnError>): RequestResult<GetScheduledActionResponses, GetScheduledActionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetScheduledActionResponses, GetScheduledActionErrors, ThrowOnError>({ url: '/scheduled-actions/{id}', ...options });}-+public updateScheduledAction<ThrowOnError extends boolean = false>(options: Options<UpdateScheduledActionData, ThrowOnError>): RequestResult<UpdateScheduledActionResponses, UpdateScheduledActionErrors, ThrowOnError> {return (options.client ?? this.client).put<UpdateScheduledActionResponses, UpdateScheduledActionErrors, ThrowOnError>({url: '/scheduled-actions/{id}',@@ -94,7 +94,7 @@ export class Sdk extends HeyApiClient {}});}-+public setScheduledActionEnabled<ThrowOnError extends boolean = false>(options: Options<SetScheduledActionEnabledData, ThrowOnError>): RequestResult<SetScheduledActionEnabledResponses, SetScheduledActionEnabledErrors, ThrowOnError> {return (options.client ?? this.client).put<SetScheduledActionEnabledResponses, SetScheduledActionEnabledErrors, ThrowOnError>({url: '/scheduled-actions/{id}/enabled',@@ -105,23 +105,23 @@ export class Sdk extends HeyApiClient {}});}-+public executeScheduledActionNow<ThrowOnError extends boolean = false>(options: Options<ExecuteScheduledActionNowData, ThrowOnError>): RequestResult<ExecuteScheduledActionNowResponses, ExecuteScheduledActionNowErrors, ThrowOnError> {return (options.client ?? this.client).post<ExecuteScheduledActionNowResponses, ExecuteScheduledActionNowErrors, ThrowOnError>({ url: '/scheduled-actions/{id}/execute', ...options });}-+public listScheduledActionHistory<ThrowOnError extends boolean = false>(options: Options<ListScheduledActionHistoryData, ThrowOnError>): RequestResult<ListScheduledActionHistoryResponses, ListScheduledActionHistoryErrors, ThrowOnError> {return (options.client ?? this.client).get<ListScheduledActionHistoryResponses, ListScheduledActionHistoryErrors, ThrowOnError>({ url: '/scheduled-actions/{id}/history', ...options });}-+public unshareScheduledActionTemplate<ThrowOnError extends boolean = false>(options: Options<UnshareScheduledActionTemplateData, ThrowOnError>): RequestResult<UnshareScheduledActionTemplateResponses, UnshareScheduledActionTemplateErrors, ThrowOnError> {return (options.client ?? this.client).delete<UnshareScheduledActionTemplateResponses, UnshareScheduledActionTemplateErrors, ThrowOnError>({ url: '/scheduled-actions/{id}/template', ...options });}-+public getScheduledActionTemplate<ThrowOnError extends boolean = false>(options: Options<GetScheduledActionTemplateData, ThrowOnError>): RequestResult<GetScheduledActionTemplateResponses, GetScheduledActionTemplateErrors, ThrowOnError> {return (options.client ?? this.client).get<GetScheduledActionTemplateResponses, GetScheduledActionTemplateErrors, ThrowOnError>({ url: '/scheduled-actions/{id}/template', ...options });}-+public shareScheduledActionTemplate<ThrowOnError extends boolean = false>(options: Options<ShareScheduledActionTemplateData, ThrowOnError>): RequestResult<ShareScheduledActionTemplateResponses, ShareScheduledActionTemplateErrors, ThrowOnError> {return (options.client ?? this.client).put<ShareScheduledActionTemplateResponses, ShareScheduledActionTemplateErrors, ThrowOnError>({url: '/scheduled-actions/{id}/template',@@ -132,7 +132,7 @@ export class Sdk extends HeyApiClient {}});}-+public activateScheduledActionTemplate<ThrowOnError extends boolean = false>(options: Options<ActivateScheduledActionTemplateData, ThrowOnError>): RequestResult<ActivateScheduledActionTemplateResponses, ActivateScheduledActionTemplateErrors, ThrowOnError> {return (options.client ?? this.client).post<ActivateScheduledActionTemplateResponses, ActivateScheduledActionTemplateErrors, ThrowOnError>({url: '/scheduled-actions/{id}/template/activate',diff --git a/packages/sdk/generated/search/sdk.gen.ts b/packages/sdk/generated/search/sdk.gen.tsindex 67a2d7643e..773cb16bb8 100644--- a/packages/sdk/generated/search/sdk.gen.ts+++ b/packages/sdk/generated/search/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,7 +56,7 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Perform a search through all items*/@@ -70,7 +70,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Perform a search through all items.* This is a simple search where we do not group your results by entity id.diff --git a/packages/sdk/generated/static-files/sdk.gen.ts b/packages/sdk/generated/static-files/sdk.gen.tsindex 4335bb0593..770f479236 100644--- a/packages/sdk/generated/static-files/sdk.gen.ts+++ b/packages/sdk/generated/static-files/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,7 +56,7 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+public putPresignedUrl<ThrowOnError extends boolean = false>(options: Options<PutPresignedUrlData, ThrowOnError>): RequestResult<PutPresignedUrlResponses, PutPresignedUrlErrors, ThrowOnError> {return (options.client ?? this.client).put<PutPresignedUrlResponses, PutPresignedUrlErrors, ThrowOnError>({url: '/api/file',@@ -67,7 +67,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Bulk delete files.*/@@ -81,15 +81,15 @@ export class Sdk extends HeyApiClient {}});}-+public handleGetMetadata<ThrowOnError extends boolean = false>(options: Options<HandleGetMetadataData, ThrowOnError>): RequestResult<HandleGetMetadataResponses, HandleGetMetadataErrors, ThrowOnError> {return (options.client ?? this.client).get<HandleGetMetadataResponses, HandleGetMetadataErrors, ThrowOnError>({ url: '/api/file/metadata/{file_id}', ...options });}-+public handleDeleteFile<ThrowOnError extends boolean = false>(options: Options<HandleDeleteFileData, ThrowOnError>): RequestResult<HandleDeleteFileResponses, HandleDeleteFileErrors, ThrowOnError> {return (options.client ?? this.client).delete<HandleDeleteFileResponses, HandleDeleteFileErrors, ThrowOnError>({ url: '/api/file/{file_id}', ...options });}-+public getFileDocumentation<ThrowOnError extends boolean = false>(options: Options<GetFileDocumentationData, ThrowOnError>): RequestResult<GetFileDocumentationResponses, GetFileDocumentationErrors, ThrowOnError> {return (options.client ?? this.client).get<GetFileDocumentationResponses, GetFileDocumentationErrors, ThrowOnError>({ url: '/file/{file_id}', ...options });}diff --git a/packages/sdk/generated/storage/sdk.gen.ts b/packages/sdk/generated/storage/sdk.gen.tsindex 9b41aff6c4..801912539a 100644--- a/packages/sdk/generated/storage/sdk.gen.ts+++ b/packages/sdk/generated/storage/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,14 +56,14 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+/*** Handler for `GET /agents`.*/public listAgents<ThrowOnError extends boolean = false>(options?: Options<ListAgentsData, ThrowOnError>): RequestResult<ListAgentsResponses, ListAgentsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListAgentsResponses, ListAgentsErrors, ThrowOnError>({ url: '/agents', ...options });}-+/*** Handler for `POST /agents`.*/@@ -77,7 +77,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `PUT /agents/{agent_id}`.*/@@ -91,7 +91,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Deletes a highlight and any attached discussion under the annotation policy.*/@@ -105,7 +105,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Edits a single anchor for a document*/@@ -119,14 +119,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets a set of comment anchors for a document*/public getDocumentAnchors<ThrowOnError extends boolean = false>(options: Options<GetDocumentAnchorsData, ThrowOnError>): RequestResult<GetDocumentAnchorsResponses, GetDocumentAnchorsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentAnchorsResponses, GetDocumentAnchorsErrors, ThrowOnError>({ url: '/annotations/anchors/document/{document_id}', ...options });}-+/*** Creates an unthreaded anchor for a document* Attach a discussion through the shared message API.@@ -141,14 +141,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /bots/me`.*/public getSelfBot<ThrowOnError extends boolean = false>(options?: Options<GetSelfBotData, ThrowOnError>): RequestResult<GetSelfBotResponses, GetSelfBotErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetSelfBotResponses, GetSelfBotErrors, ThrowOnError>({ url: '/bots/me', ...options });}-+/*** Handler for `GET /bots/profiles`.*@@ -159,28 +159,28 @@ export class Sdk extends HeyApiClient {public getBotOwnerProfiles<ThrowOnError extends boolean = false>(options?: Options<GetBotOwnerProfilesData, ThrowOnError>): RequestResult<GetBotOwnerProfilesResponses, GetBotOwnerProfilesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetBotOwnerProfilesResponses, GetBotOwnerProfilesErrors, ThrowOnError>({ url: '/bots/profiles', ...options });}-+/*** Handler for `GET /bots/{bot_id}/channels`.*/public listBotChannels<ThrowOnError extends boolean = false>(options: Options<ListBotChannelsData, ThrowOnError>): RequestResult<ListBotChannelsResponses, ListBotChannelsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListBotChannelsResponses, ListBotChannelsErrors, ThrowOnError>({ url: '/bots/{bot_id}/channels', ...options });}-+/*** Handler for `DELETE /bots/{bot_id}/channels/{channel_id}`.*/public removeBotFromChannelByBot<ThrowOnError extends boolean = false>(options: Options<RemoveBotFromChannelByBotData, ThrowOnError>): RequestResult<RemoveBotFromChannelByBotResponses, RemoveBotFromChannelByBotErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveBotFromChannelByBotResponses, RemoveBotFromChannelByBotErrors, ThrowOnError>({ url: '/bots/{bot_id}/channels/{channel_id}', ...options });}-+/*** Return calendar occurrences visible to the authenticated requester.*/public listOccurrences<ThrowOnError extends boolean = false>(options: Options<ListOccurrencesData, ThrowOnError>): RequestResult<ListOccurrencesResponses, ListOccurrencesErrors, ThrowOnError> {return (options.client ?? this.client).get<ListOccurrencesResponses, ListOccurrencesErrors, ThrowOnError>({ url: '/calendar-events', ...options });}-+/*** Resolve mentioned calendar events to the requester's own projections.*/@@ -194,21 +194,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Query authorized projections in a bounded viewport.*/public listTeamCalendar<ThrowOnError extends boolean = false>(options: Options<ListTeamCalendarData, ThrowOnError>): RequestResult<ListTeamCalendarResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ListTeamCalendarResponses, unknown, ThrowOnError>({ url: '/calendar-events/team', ...options });}-+/*** Return teammates' out-of-office occurrences in the requested viewport.*/public listTeamOutOfOffice<ThrowOnError extends boolean = false>(options: Options<ListTeamOutOfOfficeData, ThrowOnError>): RequestResult<ListTeamOutOfOfficeResponses, ListTeamOutOfOfficeErrors, ThrowOnError> {return (options.client ?? this.client).get<ListTeamOutOfOfficeResponses, ListTeamOutOfOfficeErrors, ThrowOnError>({ url: '/calendar-events/team-out-of-office', ...options });}-+/*** Export an event the requester can see — their own, or one shared with a* channel they belong to — as an iCalendar file named after its title.@@ -216,14 +216,14 @@ export class Sdk extends HeyApiClient {public eventIcs<ThrowOnError extends boolean = false>(options: Options<EventIcsData, ThrowOnError>): RequestResult<EventIcsResponses, EventIcsErrors, ThrowOnError> {return (options.client ?? this.client).get<EventIcsResponses, EventIcsErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/ics', ...options });}-+/*** List pending requests to join an event the requester can change.*/public listJoinRequests<ThrowOnError extends boolean = false>(options: Options<ListJoinRequestsData, ThrowOnError>): RequestResult<ListJoinRequestsResponses, ListJoinRequestsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListJoinRequestsResponses, ListJoinRequestsErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/join-requests', ...options });}-+/*** Ask the person who shared an event with one of the requester's channels* to add them as a guest. Asking again while the request is pending or@@ -233,7 +233,7 @@ export class Sdk extends HeyApiClient {public requestToJoin<ThrowOnError extends boolean = false>(options: Options<RequestToJoinData, ThrowOnError>): RequestResult<RequestToJoinResponses, RequestToJoinErrors, ThrowOnError> {return (options.client ?? this.client).post<RequestToJoinResponses, RequestToJoinErrors, ThrowOnError>({ url: '/calendar-events/{event_id}/join-requests', ...options });}-+/*** Handler for `GET /call/active`.*@@ -244,14 +244,14 @@ export class Sdk extends HeyApiClient {public getActiveCalls<ThrowOnError extends boolean = false>(options?: Options<GetActiveCallsData, ThrowOnError>): RequestResult<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetActiveCallsResponses, GetActiveCallsErrors, ThrowOnError>({ url: '/call/active', ...options });}-+/*** Read the live call discussion as a verified guest.*/public guestCallChatRead<ThrowOnError extends boolean = false>(options: Options<GuestCallChatReadData, ThrowOnError>): RequestResult<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError> {return (options.client ?? this.client).get<GuestCallChatReadResponses, GuestCallChatReadErrors, ThrowOnError>({ url: '/call/guest-chat/{call_id}', ...options });}-+/*** Append text to the same saved discussion used by account participants.*/@@ -265,14 +265,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handle `GET /call/join/{token}` through the call domain service.*/public meetingLookup<ThrowOnError extends boolean = false>(options: Options<MeetingLookupData, ThrowOnError>): RequestResult<MeetingLookupResponses, MeetingLookupErrors, ThrowOnError> {return (options.client ?? this.client).get<MeetingLookupResponses, MeetingLookupErrors, ThrowOnError>({ url: '/call/join/{token}', ...options });}-+/*** Handle `POST /call/join/{token}` through the call domain service.*/@@ -286,28 +286,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handle `POST /call/join/{token}/leave` through the call domain service.*/public meetingLeave<ThrowOnError extends boolean = false>(options: Options<MeetingLeaveData, ThrowOnError>): RequestResult<MeetingLeaveResponses, MeetingLeaveErrors, ThrowOnError> {return (options.client ?? this.client).post<MeetingLeaveResponses, MeetingLeaveErrors, ThrowOnError>({ url: '/call/join/{token}/leave', ...options });}-+/*** Read a standalone meeting preview without admitting a guest to the room.*/public meetingGuestParticipants<ThrowOnError extends boolean = false>(options: Options<MeetingGuestParticipantsData, ThrowOnError>): RequestResult<MeetingGuestParticipantsResponses, MeetingGuestParticipantsErrors, ThrowOnError> {return (options.client ?? this.client).get<MeetingGuestParticipantsResponses, MeetingGuestParticipantsErrors, ThrowOnError>({ url: '/call/join/{token}/participants', ...options });}-+/*** Handle `GET /call/meetings` through the call domain service.*/public meetingList<ThrowOnError extends boolean = false>(options?: Options<MeetingListData, ThrowOnError>): RequestResult<MeetingListResponses, MeetingListErrors, ThrowOnError> {return (options?.client ?? this.client).get<MeetingListResponses, MeetingListErrors, ThrowOnError>({ url: '/call/meetings', ...options });}-+/*** Handle `POST /call/meetings` through the call domain service.*/@@ -321,21 +321,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the authenticated actor's active quick calls.*/public meetingListActive<ThrowOnError extends boolean = false>(options?: Options<MeetingListActiveData, ThrowOnError>): RequestResult<MeetingListActiveResponses, MeetingListActiveErrors, ThrowOnError> {return (options?.client ?? this.client).get<MeetingListActiveResponses, MeetingListActiveErrors, ThrowOnError>({ url: '/call/meetings/active', ...options });}-+/*** Read the authenticated caller's invitation capability without exposing the creator.*/public meetingInvitePermissions<ThrowOnError extends boolean = false>(options: Options<MeetingInvitePermissionsData, ThrowOnError>): RequestResult<MeetingInvitePermissionsResponses, MeetingInvitePermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<MeetingInvitePermissionsResponses, MeetingInvitePermissionsErrors, ThrowOnError>({ url: '/call/meetings/invite/{token}', ...options });}-+/*** Queue an owner-authorized guest invitation email.*/@@ -349,7 +349,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Ring registered teammates selected by the standalone meeting owner.*/@@ -363,42 +363,42 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handle `POST /call/meetings/join/{token}` through the call domain service.*/public meetingJoin<ThrowOnError extends boolean = false>(options: Options<MeetingJoinData, ThrowOnError>): RequestResult<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError> {return (options.client ?? this.client).post<MeetingJoinResponses, MeetingJoinErrors, ThrowOnError>({ url: '/call/meetings/join/{token}', ...options });}-+/*** Read the participant preview for an authenticated invitation holder.*/public meetingParticipants<ThrowOnError extends boolean = false>(options: Options<MeetingParticipantsData, ThrowOnError>): RequestResult<MeetingParticipantsResponses, MeetingParticipantsErrors, ThrowOnError> {return (options.client ?? this.client).get<MeetingParticipantsResponses, MeetingParticipantsErrors, ThrowOnError>({ url: '/call/meetings/join/{token}/participants', ...options });}-+/*** Reserve a room while the authenticated caller configures a new call.*/public meetingPrepare<ThrowOnError extends boolean = false>(options?: Options<MeetingPrepareData, ThrowOnError>): RequestResult<MeetingPrepareResponses, MeetingPrepareErrors, ThrowOnError> {return (options?.client ?? this.client).post<MeetingPrepareResponses, MeetingPrepareErrors, ThrowOnError>({ url: '/call/meetings/prepare', ...options });}-+/*** Cancel an unused room; the domain owns ownership and activation checks.*/public meetingCancelPreparation<ThrowOnError extends boolean = false>(options: Options<MeetingCancelPreparationData, ThrowOnError>): RequestResult<MeetingCancelPreparationResponses, MeetingCancelPreparationErrors, ThrowOnError> {return (options.client ?? this.client).delete<MeetingCancelPreparationResponses, MeetingCancelPreparationErrors, ThrowOnError>({ url: '/call/meetings/prepare/{preparation_id}', ...options });}-+/*** Handle `DELETE /call/meetings/{meeting_id}` through the call domain service.*/public meetingCancel<ThrowOnError extends boolean = false>(options: Options<MeetingCancelData, ThrowOnError>): RequestResult<MeetingCancelResponses, MeetingCancelErrors, ThrowOnError> {return (options.client ?? this.client).delete<MeetingCancelResponses, MeetingCancelErrors, ThrowOnError>({ url: '/call/meetings/{meeting_id}', ...options });}-+/*** Handle owner-authorized meeting title and schedule edits.*/@@ -412,7 +412,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /call/record/preview`.*@@ -431,7 +431,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `DELETE /call/record/{call_id}`.*@@ -441,7 +441,7 @@ export class Sdk extends HeyApiClient {public deleteCallRecord<ThrowOnError extends boolean = false>(options: Options<DeleteCallRecordData, ThrowOnError>): RequestResult<DeleteCallRecordResponses, DeleteCallRecordErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteCallRecordResponses, DeleteCallRecordErrors, ThrowOnError>({ url: '/call/record/{call_id}', ...options });}-+/*** Handler for `GET /call/record/{call_id}`.*@@ -452,7 +452,7 @@ export class Sdk extends HeyApiClient {public getCallRecord<ThrowOnError extends boolean = false>(options: Options<GetCallRecordData, ThrowOnError>): RequestResult<GetCallRecordResponses, GetCallRecordErrors, ThrowOnError> {return (options.client ?? this.client).get<GetCallRecordResponses, GetCallRecordErrors, ThrowOnError>({ url: '/call/record/{call_id}', ...options });}-+/*** Handler for `PATCH /call/record/{call_id}`.*@@ -472,7 +472,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /call/record/{call_id}/decline`.*@@ -484,14 +484,14 @@ export class Sdk extends HeyApiClient {public declineCall<ThrowOnError extends boolean = false>(options: Options<DeclineCallData, ThrowOnError>): RequestResult<DeclineCallResponses, DeclineCallErrors, ThrowOnError> {return (options.client ?? this.client).post<DeclineCallResponses, DeclineCallErrors, ThrowOnError>({ url: '/call/record/{call_id}/decline', ...options });}-+/*** Handle `POST /call/record/{call_id}/link` through the call domain service.*/public meetingShare<ThrowOnError extends boolean = false>(options: Options<MeetingShareData, ThrowOnError>): RequestResult<MeetingShareResponses, MeetingShareErrors, ThrowOnError> {return (options.client ?? this.client).post<MeetingShareResponses, MeetingShareErrors, ThrowOnError>({ url: '/call/record/{call_id}/link', ...options });}-+/*** Handler for `POST /call/record/{call_id}/share-with-team/toggle`.*@@ -503,7 +503,7 @@ export class Sdk extends HeyApiClient {public toggleShareWithTeam<ThrowOnError extends boolean = false>(options: Options<ToggleShareWithTeamData, ThrowOnError>): RequestResult<ToggleShareWithTeamResponses, ToggleShareWithTeamErrors, ThrowOnError> {return (options.client ?? this.client).post<ToggleShareWithTeamResponses, ToggleShareWithTeamErrors, ThrowOnError>({ url: '/call/record/{call_id}/share-with-team/toggle', ...options });}-+/*** Handler for `PATCH /call/record/{call_id}/transcript`.*@@ -521,7 +521,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /call/ring-status/{call_id}`.*@@ -536,7 +536,7 @@ export class Sdk extends HeyApiClient {public getRingStatus<ThrowOnError extends boolean = false>(options: Options<GetRingStatusData, ThrowOnError>): RequestResult<GetRingStatusResponses, GetRingStatusErrors, ThrowOnError> {return (options.client ?? this.client).get<GetRingStatusResponses, GetRingStatusErrors, ThrowOnError>({ url: '/call/ring-status/{call_id}', ...options });}-+/*** Handler for `POST /call/ring-status/{call_id}/decline`.*@@ -549,7 +549,7 @@ export class Sdk extends HeyApiClient {public declineRing<ThrowOnError extends boolean = false>(options: Options<DeclineRingData, ThrowOnError>): RequestResult<DeclineRingResponses, DeclineRingErrors, ThrowOnError> {return (options.client ?? this.client).post<DeclineRingResponses, DeclineRingErrors, ThrowOnError>({ url: '/call/ring-status/{call_id}/decline', ...options });}-+/*** Handler for `POST /call/webhook`.*@@ -560,14 +560,14 @@ export class Sdk extends HeyApiClient {public callWebhook<ThrowOnError extends boolean = false>(options?: Options<CallWebhookData, ThrowOnError>): RequestResult<CallWebhookResponses, CallWebhookErrors, ThrowOnError> {return (options?.client ?? this.client).post<CallWebhookResponses, CallWebhookErrors, ThrowOnError>({ url: '/call/webhook', ...options });}-+/*** Handler for `DELETE /call/{channel_id}`.*/public leaveOrEndCall<ThrowOnError extends boolean = false>(options: Options<LeaveOrEndCallData, ThrowOnError>): RequestResult<LeaveOrEndCallResponses, LeaveOrEndCallErrors, ThrowOnError> {return (options.client ?? this.client).delete<LeaveOrEndCallResponses, LeaveOrEndCallErrors, ThrowOnError>({ url: '/call/{channel_id}', ...options });}-+/*** Handler for `GET /call/{channel_id}`.*@@ -577,7 +577,7 @@ export class Sdk extends HeyApiClient {public getOrCreateCall<ThrowOnError extends boolean = false>(options: Options<GetOrCreateCallData, ThrowOnError>): RequestResult<GetOrCreateCallResponses, GetOrCreateCallErrors, ThrowOnError> {return (options.client ?? this.client).get<GetOrCreateCallResponses, GetOrCreateCallErrors, ThrowOnError>({ url: '/call/{channel_id}', ...options });}-+/*** Handler for `GET /call/{channel_id}/active`.*@@ -586,7 +586,7 @@ export class Sdk extends HeyApiClient {public checkActiveCall<ThrowOnError extends boolean = false>(options: Options<CheckActiveCallData, ThrowOnError>): RequestResult<CheckActiveCallResponses, CheckActiveCallErrors, ThrowOnError> {return (options.client ?? this.client).get<CheckActiveCallResponses, CheckActiveCallErrors, ThrowOnError>({ url: '/call/{channel_id}/active', ...options });}-+/*** Handler for `POST /call/{channel_id}/transcript`.*@@ -604,14 +604,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's shared or private labels.*/public listChannelLabels<ThrowOnError extends boolean = false>(options?: Options<ListChannelLabelsData, ThrowOnError>): RequestResult<ListChannelLabelsResponses, ListChannelLabelsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListChannelLabelsResponses, ListChannelLabelsErrors, ThrowOnError>({ url: '/channel-labels', ...options });}-+/*** Create a label for the caller's authorized scope.*/@@ -625,7 +625,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Move a channel into a label of the caller's authorized scope, or out of any label.*/@@ -639,7 +639,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Preview visible channels matched by a smart tag, without creating it.*/@@ -653,14 +653,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a label of the caller's authorized scope. Its channels return to the plain list.*/public deleteChannelLabel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelLabelData, ThrowOnError>): RequestResult<DeleteChannelLabelResponses, DeleteChannelLabelErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteChannelLabelResponses, DeleteChannelLabelErrors, ThrowOnError>({ url: '/channel-labels/{label_id}', ...options });}-+/*** Rename a label of the caller's authorized scope.*/@@ -674,7 +674,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /channels`.*/@@ -688,14 +688,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /channels/activity`.*/public getActivity<ThrowOnError extends boolean = false>(options?: Options<GetActivityData, ThrowOnError>): RequestResult<GetActivityResponses, GetActivityErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetActivityResponses, GetActivityErrors, ThrowOnError>({ url: '/channels/activity', ...options });}-+/*** Handler for `POST /channels/activity`.*/@@ -709,14 +709,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /channels/attachments/{entity_type}/{entity_id}/references`.*/public getAttachmentReferences<ThrowOnError extends boolean = false>(options: Options<GetAttachmentReferencesData, ThrowOnError>): RequestResult<GetAttachmentReferencesResponses, GetAttachmentReferencesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetAttachmentReferencesResponses, GetAttachmentReferencesErrors, ThrowOnError>({ url: '/channels/attachments/{entity_type}/{entity_id}/references', ...options });}-+/*** Handler for `POST /channels/get_or_create_dm`.*/@@ -730,7 +730,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /channels/get_or_create_private`.*/@@ -744,14 +744,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /channels/join/{join_code}`.*/public joinChannelByCode<ThrowOnError extends boolean = false>(options: Options<JoinChannelByCodeData, ThrowOnError>): RequestResult<JoinChannelByCodeResponses, JoinChannelByCodeErrors, ThrowOnError> {return (options.client ?? this.client).post<JoinChannelByCodeResponses, JoinChannelByCodeErrors, ThrowOnError>({ url: '/channels/join/{join_code}', ...options });}-+/*** Handler for `POST /channels/mentions`.*/@@ -765,14 +765,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `DELETE /channels/mentions/{mention_id}`.*/public deleteEntityMention<ThrowOnError extends boolean = false>(options: Options<DeleteEntityMentionData, ThrowOnError>): RequestResult<DeleteEntityMentionResponses, DeleteEntityMentionErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteEntityMentionResponses, DeleteEntityMentionErrors, ThrowOnError>({ url: '/channels/mentions/{mention_id}', ...options });}-+/*** Handler for `POST /channels/preview`.*/@@ -786,21 +786,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `DELETE /channels/{channel_id}`.*/public deleteChannel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}', ...options });}-+/*** Handler for `GET /channels/{channel_id}`.*/public getChannel<ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChannelResponses, GetChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}', ...options });}-+/*** Handler for `PATCH /channels/{channel_id}`.*/@@ -814,14 +814,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /channels/{channel_id}/attachments`.*/public getChannelAttachments<ThrowOnError extends boolean = false>(options: Options<GetChannelAttachmentsData, ThrowOnError>): RequestResult<GetChannelAttachmentsResponses, GetChannelAttachmentsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChannelAttachmentsResponses, GetChannelAttachmentsErrors, ThrowOnError>({ url: '/channels/{channel_id}/attachments', ...options });}-+/*** Handler for `POST /channels/{channel_id}/bots/scoped`.*/@@ -835,28 +835,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /channels/{channel_id}/join`.*/public joinChannel<ThrowOnError extends boolean = false>(options: Options<JoinChannelData, ThrowOnError>): RequestResult<JoinChannelResponses, JoinChannelErrors, ThrowOnError> {return (options.client ?? this.client).post<JoinChannelResponses, JoinChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}/join', ...options });}-+/*** Handler for `GET /channels/{channel_id}/join-link`.*/public getChannelJoinLink<ThrowOnError extends boolean = false>(options: Options<GetChannelJoinLinkData, ThrowOnError>): RequestResult<GetChannelJoinLinkResponses, GetChannelJoinLinkErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChannelJoinLinkResponses, GetChannelJoinLinkErrors, ThrowOnError>({ url: '/channels/{channel_id}/join-link', ...options });}-+/*** Handler for `POST /channels/{channel_id}/leave`.*/public leaveChannel<ThrowOnError extends boolean = false>(options: Options<LeaveChannelData, ThrowOnError>): RequestResult<LeaveChannelResponses, LeaveChannelErrors, ThrowOnError> {return (options.client ?? this.client).post<LeaveChannelResponses, LeaveChannelErrors, ThrowOnError>({ url: '/channels/{channel_id}/leave', ...options });}-+/*** Handler for `DELETE /channels/{channel_id}/participants`.*/@@ -870,14 +870,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /channels/{channel_id}/participants`.*/public getChannelParticipants<ThrowOnError extends boolean = false>(options: Options<GetChannelParticipantsData, ThrowOnError>): RequestResult<GetChannelParticipantsResponses, GetChannelParticipantsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetChannelParticipantsResponses, GetChannelParticipantsErrors, ThrowOnError>({ url: '/channels/{channel_id}/participants', ...options });}-+/*** Handler for `POST /channels/{channel_id}/participants`.*/@@ -891,7 +891,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Set a channel or group chat profile picture. Requires channel participation.*/@@ -905,7 +905,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /channels/{channel_id}/webhook`.*/@@ -919,21 +919,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Soft-delete a collab surface.*/public deleteCollabSurface<ThrowOnError extends boolean = false>(options: Options<DeleteCollabSurfaceData, ThrowOnError>): RequestResult<DeleteCollabSurfaceResponses, DeleteCollabSurfaceErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteCollabSurfaceResponses, DeleteCollabSurfaceErrors, ThrowOnError>({ url: '/collab_surfaces/{id}', ...options });}-+/*** Fetch a collab surface.*/public getCollabSurface<ThrowOnError extends boolean = false>(options: Options<GetCollabSurfaceData, ThrowOnError>): RequestResult<GetCollabSurfaceResponses, GetCollabSurfaceErrors, ThrowOnError> {return (options.client ?? this.client).get<GetCollabSurfaceResponses, GetCollabSurfaceErrors, ThrowOnError>({ url: '/collab_surfaces/{id}', ...options });}-+/*** Idempotently ensure a collab surface exists (load-or-create).*@@ -952,21 +952,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Mint a sync-service connection token for a surface.*/public createCollabSurfaceToken<ThrowOnError extends boolean = false>(options: Options<CreateCollabSurfaceTokenData, ThrowOnError>): RequestResult<CreateCollabSurfaceTokenResponses, CreateCollabSurfaceTokenErrors, ThrowOnError> {return (options.client ?? this.client).post<CreateCollabSurfaceTokenResponses, CreateCollabSurfaceTokenErrors, ThrowOnError>({ url: '/collab_surfaces/{id}/token', ...options });}-+/*** Handle channel list requests for `GET /comms/channels`.*/public getChannels<ThrowOnError extends boolean = false>(options?: Options<GetChannelsData, ThrowOnError>): RequestResult<GetChannelsResponses, GetChannelsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetChannelsResponses, GetChannelsErrors, ThrowOnError>({ url: '/comms/channels', ...options });}-+/*** List the domains the caller's team keeps out of email sync,* alphabetically. Any team member may read.@@ -1009,7 +1009,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Fetch a single CRM company by id, hydrated with its domains, the* primary domain's directory display metadata (name + description),@@ -1022,7 +1022,7 @@ export class Sdk extends HeyApiClient {public getCompany<ThrowOnError extends boolean = false>(options: Options<GetCompanyData, ThrowOnError>): RequestResult<GetCompanyResponses, GetCompanyErrors, ThrowOnError> {return (options.client ?? this.client).get<GetCompanyResponses, GetCompanyErrors, ThrowOnError>({ url: '/crm/companies/{company_id}', ...options });}-+/*** List the contacts of a CRM company. Access is enforced by* [`CrmCompanyAccessLevelExtractor`]: the user must be on the team that@@ -1033,7 +1033,7 @@ export class Sdk extends HeyApiClient {public listCompanyContacts<ThrowOnError extends boolean = false>(options: Options<ListCompanyContactsData, ThrowOnError>): RequestResult<ListCompanyContactsResponses, ListCompanyContactsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListCompanyContactsResponses, ListCompanyContactsErrors, ThrowOnError>({ url: '/crm/companies/{company_id}/contacts', ...options });}-+/*** Manually create a contact under a CRM company. Access is enforced by* [`CrmCompanyAccessLevelExtractor`]: the caller must be on the team@@ -1052,7 +1052,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Toggle `email_sync` on a CRM company. Purely a visibility flag —* it gates whether team members can see each other's emails with@@ -1068,7 +1068,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Toggle `hidden` on a CRM company. Hiding also disables* `email_sync` and soft-hides every contact under the company.@@ -1086,7 +1086,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Rename a CRM company. Access is enforced by* [`CrmCompanyAccessLevelExtractor`]: the caller must be on the team@@ -1104,7 +1104,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Search the caller's team's CRM contacts by email or name. Any team member* may search visible contacts; admin/owner callers also match hidden@@ -1113,7 +1113,7 @@ export class Sdk extends HeyApiClient {public searchContacts<ThrowOnError extends boolean = false>(options?: Options<SearchContactsData, ThrowOnError>): RequestResult<SearchContactsResponses, SearchContactsErrors, ThrowOnError> {return (options?.client ?? this.client).get<SearchContactsResponses, SearchContactsErrors, ThrowOnError>({ url: '/crm/contacts', ...options });}-+/*** Manually create a contact without a company for the caller's team.* Any team member may create one. The team must not already have a@@ -1141,7 +1141,7 @@ export class Sdk extends HeyApiClient {public getContactByEmail<ThrowOnError extends boolean = false>(options: Options<GetContactByEmailData, ThrowOnError>): RequestResult<GetContactByEmailResponses, GetContactByEmailErrors, ThrowOnError> {return (options.client ?? this.client).get<GetContactByEmailResponses, GetContactByEmailErrors, ThrowOnError>({ url: '/crm/contacts/by-email', ...options });}-+/*** Fetch a single CRM contact by id. Access is enforced by* [`CrmContactAccessLevelExtractor`]: the user must be on the team that@@ -1152,7 +1152,7 @@ export class Sdk extends HeyApiClient {public getContact<ThrowOnError extends boolean = false>(options: Options<GetContactData, ThrowOnError>): RequestResult<GetContactResponses, GetContactErrors, ThrowOnError> {return (options.client ?? this.client).get<GetContactResponses, GetContactErrors, ThrowOnError>({ url: '/crm/contacts/{contact_id}', ...options });}-+/*** Toggle `hidden` on a CRM contact. Hiding is a display-only opt-out* scoped to the team that owns the contact's company.@@ -1167,7 +1167,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Rename a CRM contact. Access is enforced by* [`CrmContactAccessLevelExtractor`]: the caller must be on the team@@ -1185,14 +1185,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's live pipelines in their CRM.*/public listCrmPipelines<ThrowOnError extends boolean = false>(options?: Options<ListCrmPipelinesData, ThrowOnError>): RequestResult<ListCrmPipelinesResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<ListCrmPipelinesResponses, unknown, ThrowOnError>({ url: '/crm/pipelines', ...options });}-+/*** Create a private or team-shared pipeline.*/@@ -1206,14 +1206,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read one pipeline by its entity identity.*/public getCrmPipeline<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineData, ThrowOnError>): RequestResult<GetCrmPipelineResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<GetCrmPipelineResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}', ...options });}-+/*** Rename a pipeline.*/@@ -1227,7 +1227,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Edit pipeline schema or records with the common typed operations.*/@@ -1241,14 +1241,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read the owner, team grant and channel recipients of a pipeline the caller can edit.*/public getCrmPipelinePermissions<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelinePermissionsData, ThrowOnError>): RequestResult<GetCrmPipelinePermissionsResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<GetCrmPipelinePermissionsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/permissions', ...options });}-+/*** Share a pipeline the caller can edit with channels, or change or remove* their access. Team access changes through `/sharing`; there is no share link.@@ -1263,14 +1263,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read pipeline records through pipeline access.*/public getCrmPipelineRows<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineRowsData, ThrowOnError>): RequestResult<GetCrmPipelineRowsResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<GetCrmPipelineRowsResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/rows', ...options });}-+/*** Query rows through pipeline access using the shared view protocol.*/@@ -1284,7 +1284,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Update sharing.*/@@ -1298,14 +1298,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read the host-owned table schema.*/public getCrmPipelineTable<ThrowOnError extends boolean = false>(options: Options<GetCrmPipelineTableData, ThrowOnError>): RequestResult<GetCrmPipelineTableResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<GetCrmPipelineTableResponses, unknown, ThrowOnError>({ url: '/crm/pipelines/{id}/table', ...options });}-+/*** Trash or restore a pipeline.*/@@ -1319,7 +1319,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read the caller's team CRM configuration. Any team member may read;* teams without a settings row get the defaults.@@ -1327,7 +1327,7 @@ export class Sdk extends HeyApiClient {public getCrmTeamSettings<ThrowOnError extends boolean = false>(options?: Options<GetCrmTeamSettingsData, ThrowOnError>): RequestResult<GetCrmTeamSettingsResponses, GetCrmTeamSettingsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetCrmTeamSettingsResponses, GetCrmTeamSettingsErrors, ThrowOnError>({ url: '/crm/settings', ...options });}-+/*** Partially update the caller's team CRM configuration. Any team* member may update the views fields (`team_views`,@@ -1346,14 +1346,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Reset the team's deal stages to the defaults; gated like `PUT /crm/stages`.*/public resetCrmTeamStages<ThrowOnError extends boolean = false>(options?: Options<ResetCrmTeamStagesData, ThrowOnError>): RequestResult<ResetCrmTeamStagesResponses, ResetCrmTeamStagesErrors, ThrowOnError> {return (options?.client ?? this.client).delete<ResetCrmTeamStagesResponses, ResetCrmTeamStagesErrors, ThrowOnError>({ url: '/crm/stages', ...options });}-+/*** Replace the team's deal stages; requires `edit_stages_role` (403 otherwise).*/@@ -1367,14 +1367,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's databases.*/public listDatabases<ThrowOnError extends boolean = false>(options?: Options<ListDatabasesData, ThrowOnError>): RequestResult<ListDatabasesResponses, ListDatabasesErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListDatabasesResponses, ListDatabasesErrors, ThrowOnError>({ url: '/databases', ...options });}-+/*** Create a database owned by the caller; its first table, "Table 1", holds a* "Name" text column.@@ -1389,7 +1389,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Save an immutable query. Editing a question saves a new one.*/@@ -1403,14 +1403,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** A saved query's definition, for its creator or a viewer of its database.*/public getDatabaseQuery<ThrowOnError extends boolean = false>(options: Options<GetDatabaseQueryData, ThrowOnError>): RequestResult<GetDatabaseQueryResponses, GetDatabaseQueryErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabaseQueryResponses, GetDatabaseQueryErrors, ThrowOnError>({ url: '/databases/queries/{query_id}', ...options });}-+/*** Run one statement as the authenticated user. The viewer's catalog authorizes reads;* the SQL domain service obtains an edit receipt for every written database.@@ -1425,14 +1425,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Create a small example once for the authenticated user, if they have no databases.*/public ensureStarterHandler<ThrowOnError extends boolean = false>(options?: Options<EnsureStarterHandlerData, ThrowOnError>): RequestResult<EnsureStarterHandlerResponses, EnsureStarterHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).post<EnsureStarterHandlerResponses, EnsureStarterHandlerErrors, ThrowOnError>({ url: '/databases/starter', ...options });}-+/*** Insert rows through a webhook. The body is a JSON object, one row, or* an array of up to 100 objects, one row each. Keys name columns by name@@ -1450,14 +1450,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Schema detail of one database.*/public getDatabase<ThrowOnError extends boolean = false>(options: Options<GetDatabaseData, ThrowOnError>): RequestResult<GetDatabaseResponses, GetDatabaseErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabaseResponses, GetDatabaseErrors, ThrowOnError>({ url: '/databases/{id}', ...options });}-+/*** Tell a database's other viewers where the caller is.*/@@ -1471,7 +1471,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Undo one of your own committed changes: its inverse applies as a new,* journaled batch, under the table's lock, guarded against what others@@ -1483,7 +1483,7 @@ export class Sdk extends HeyApiClient {public undoDatabaseChange<ThrowOnError extends boolean = false>(options: Options<UndoDatabaseChangeData, ThrowOnError>): RequestResult<UndoDatabaseChangeResponses, UndoDatabaseChangeErrors, ThrowOnError> {return (options.client ?? this.client).post<UndoDatabaseChangeResponses, UndoDatabaseChangeErrors, ThrowOnError>({ url: '/databases/{id}/changes/{change}/undo', ...options });}-+/*** Copy a database, with its tables, columns, views and rows, into a new one* the caller owns. Its sharing, forms, webhooks and history stay behind.@@ -1498,7 +1498,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Import a new table and every row atomically; retries carry the same request ID.*/@@ -1512,7 +1512,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Apply a batch of typed ops, the one write surface of a database: add,* rename, remove and order tables and columns, change a column's type, add@@ -1533,7 +1533,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read recipients and the team share for a database owned by the caller.* Link sharing is always `null`: databases do not support it.@@ -1541,7 +1541,7 @@ export class Sdk extends HeyApiClient {public getDatabasePermissions<ThrowOnError extends boolean = false>(options: Options<GetDatabasePermissionsData, ThrowOnError>): RequestResult<GetDatabasePermissionsResponses, GetDatabasePermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabasePermissionsResponses, GetDatabasePermissionsErrors, ThrowOnError>({ url: '/databases/{id}/permissions', ...options });}-+/*** Update channel recipients and the team share after proving database* ownership. Turning on link sharing is refused; ownership cannot be@@ -1558,7 +1558,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** What changed in a table since a version, from the change journal: the* rows that changed, each once as it stands now (`insert`, `update` or@@ -1569,7 +1569,7 @@ export class Sdk extends HeyApiClient {public getDatabaseTableChanges<ThrowOnError extends boolean = false>(options: Options<GetDatabaseTableChangesData, ThrowOnError>): RequestResult<GetDatabaseTableChangesResponses, GetDatabaseTableChangesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabaseTableChangesResponses, GetDatabaseTableChangesErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/changes', ...options });}-+/*** What changing one column to each type of the type menu would do to its* values: safe, checked (with how many values would not convert and a few@@ -1578,7 +1578,7 @@ export class Sdk extends HeyApiClient {public listDatabaseColumnCasts<ThrowOnError extends boolean = false>(options: Options<ListDatabaseColumnCastsData, ThrowOnError>): RequestResult<ListDatabaseColumnCastsResponses, ListDatabaseColumnCastsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListDatabaseColumnCastsResponses, ListDatabaseColumnCastsErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/columns/{column_id}/casts', ...options });}-+/*** What one column's values become under another type: the values that* convert, with the options they need, for a new column of that type beside@@ -1596,7 +1596,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Settle a new empty text column's type.*/@@ -1610,7 +1610,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** A row's history, from the change journal: every committed change that* touched it, newest first, with who made it, when, and the values of the@@ -1620,7 +1620,7 @@ export class Sdk extends HeyApiClient {public getDatabaseRowHistory<ThrowOnError extends boolean = false>(options: Options<GetDatabaseRowHistoryData, ThrowOnError>): RequestResult<GetDatabaseRowHistoryResponses, GetDatabaseRowHistoryErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabaseRowHistoryResponses, GetDatabaseRowHistoryErrors, ThrowOnError>({ url: '/databases/{id}/tables/{table_id}/rows/{row_id}/history', ...options });}-+/*** Where a board's cards sit, for drawing it: the views come with the* database's detail, their cards' places from here.@@ -1628,14 +1628,14 @@ export class Sdk extends HeyApiClient {public getDatabaseViewPositions<ThrowOnError extends boolean = false>(options: Options<GetDatabaseViewPositionsData, ThrowOnError>): RequestResult<GetDatabaseViewPositionsResponses, GetDatabaseViewPositionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDatabaseViewPositionsResponses, GetDatabaseViewPositionsErrors, ThrowOnError>({ url: '/databases/{id}/views/{view_id}/positions', ...options });}-+/*** The database's webhooks.*/public listDatabaseWebhooks<ThrowOnError extends boolean = false>(options: Options<ListDatabaseWebhooksData, ThrowOnError>): RequestResult<ListDatabaseWebhooksResponses, ListDatabaseWebhooksErrors, ThrowOnError> {return (options.client ?? this.client).get<ListDatabaseWebhooksResponses, ListDatabaseWebhooksErrors, ThrowOnError>({ url: '/databases/{id}/webhooks', ...options });}-+/*** Create a webhook: a secret URL whose calls insert rows into one of the* database's tables, writing with the creator's access.@@ -1650,14 +1650,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a webhook; its URL stops working.*/public deleteDatabaseWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteDatabaseWebhookData, ThrowOnError>): RequestResult<DeleteDatabaseWebhookResponses, DeleteDatabaseWebhookErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteDatabaseWebhookResponses, DeleteDatabaseWebhookErrors, ThrowOnError>({ url: '/databases/{id}/webhooks/{webhook_id}', ...options });}-+/*** Transcribe a transient recording with OpenAI Whisper.*@@ -1675,14 +1675,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the users documents to populate their recent document list*/public getUserDocumentsHandler<ThrowOnError extends boolean = false>(options: Options<GetUserDocumentsHandlerData, ThrowOnError>): RequestResult<GetUserDocumentsHandlerResponses, GetUserDocumentsHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetUserDocumentsHandlerResponses, GetUserDocumentsHandlerErrors, ThrowOnError>({ url: '/documents', ...options });}-+/*** Handler for `POST /documents`.*@@ -1699,7 +1699,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates and initializes a Canvas in one backend-owned lifecycle.*/@@ -1713,7 +1713,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates and initializes a markdown document in one backend-owned lifecycle.*/@@ -1727,7 +1727,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a skill document with initialized markdown content in one* backend-owned lifecycle. Skills are markdown documents containing@@ -1744,7 +1744,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a snippet document with initialized markdown content in one* backend-owned lifecycle. Snippets are created personal; team sharing is@@ -1760,7 +1760,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a task document with properties and initialized markdown content in* one backend-owned lifecycle.@@ -1775,7 +1775,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /documents/github_prs/tasks`.*@@ -1792,18 +1792,18 @@ export class Sdk extends HeyApiClient {}});}-+public initializeUserDocuments<ThrowOnError extends boolean = false>(options?: Options<InitializeUserDocumentsData, ThrowOnError>): RequestResult<InitializeUserDocumentsResponses, InitializeUserDocumentsErrors, ThrowOnError> {return (options?.client ?? this.client).post<InitializeUserDocumentsResponses, InitializeUserDocumentsErrors, ThrowOnError>({ url: '/documents/initialize_user_documents', ...options });}-+/*** Gets a list of all the user's documents so they are able to be searched on*/public getDocumentListHandler<ThrowOnError extends boolean = false>(options?: Options<GetDocumentListHandlerData, ThrowOnError>): RequestResult<GetDocumentListHandlerResponses, GetDocumentListHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetDocumentListHandlerResponses, GetDocumentListHandlerErrors, ThrowOnError>({ url: '/documents/list', ...options });}-+/*** Validates the provided document permissions token*/@@ -1817,14 +1817,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Generates a document permissions token for a provided document id*/public getDocumentPermissionsToken<ThrowOnError extends boolean = false>(options: Options<GetDocumentPermissionsTokenData, ThrowOnError>): RequestResult<GetDocumentPermissionsTokenResponses, GetDocumentPermissionsTokenErrors, ThrowOnError> {return (options.client ?? this.client).post<GetDocumentPermissionsTokenResponses, GetDocumentPermissionsTokenErrors, ThrowOnError>({ url: '/documents/permissions_token/{document_id}', ...options });}-+/*** Takes the docx document bom parts and generates presigned urls to upload* any new content@@ -1841,7 +1841,7 @@ export class Sdk extends HeyApiClient {}});}-+public getBatchPreviewHandler<ThrowOnError extends boolean = false>(options: Options<GetBatchPreviewHandlerData, ThrowOnError>): RequestResult<GetBatchPreviewHandlerResponses, GetBatchPreviewHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<GetBatchPreviewHandlerResponses, GetBatchPreviewHandlerErrors, ThrowOnError>({url: '/documents/preview',@@ -1852,7 +1852,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /documents/similarity_search`.*@@ -1869,7 +1869,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /documents/slug/{slug}`.*@@ -1878,14 +1878,14 @@ export class Sdk extends HeyApiClient {public getDocumentByTeamSlug<ThrowOnError extends boolean = false>(options: Options<GetDocumentByTeamSlugData, ThrowOnError>): RequestResult<GetDocumentByTeamSlugResponses, GetDocumentByTeamSlugErrors, ThrowOnError> {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 });}-+/*** Lists the built-in system skills. System skills are static, code-defined* AI instructions (see the `system_skills` crate); they surface in the@@ -1895,7 +1895,7 @@ export class Sdk extends HeyApiClient {public getSystemSkillsHandler<ThrowOnError extends boolean = false>(options?: Options<GetSystemSkillsHandlerData, ThrowOnError>): RequestResult<GetSystemSkillsHandlerResponses, GetSystemSkillsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetSystemSkillsHandlerResponses, GetSystemSkillsHandlerErrors, ThrowOnError>({ url: '/documents/system_skills', ...options });}-+/*** Handler for `DELETE /documents/{document_id}`.*@@ -1904,7 +1904,7 @@ export class Sdk extends HeyApiClient {public deleteDocument<ThrowOnError extends boolean = false>(options: Options<DeleteDocumentData, ThrowOnError>): RequestResult<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteDocumentResponses, DeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}', ...options });}-+/*** Handler for `GET /documents/{document_id}`.*@@ -1913,7 +1913,7 @@ export class Sdk extends HeyApiClient {public getDocument<ThrowOnError extends boolean = false>(options: Options<GetDocumentData, ThrowOnError>): RequestResult<GetDocumentResponses, GetDocumentErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentResponses, GetDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}', ...options });}-+/*** Handler for `PATCH /documents/{document_id}`.*@@ -1931,7 +1931,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Creates a new version of a document*/@@ -1945,7 +1945,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /documents/{document_id}/branch_name`.*@@ -1955,7 +1955,7 @@ export class Sdk extends HeyApiClient {public getDocumentBranchName<ThrowOnError extends boolean = false>(options: Options<GetDocumentBranchNameData, ThrowOnError>): RequestResult<GetDocumentBranchNameResponses, GetDocumentBranchNameErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentBranchNameResponses, GetDocumentBranchNameErrors, ThrowOnError>({ url: '/documents/{document_id}/branch_name', ...options });}-+/*** Handler for `POST /documents/{document_id}/copy`.*@@ -1972,7 +1972,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Generates a presigned url to download the raw content of the document* For files with modification layers, they will not be applied in the downloaded file.@@ -1980,7 +1980,7 @@ export class Sdk extends HeyApiClient {public exportDocument<ThrowOnError extends boolean = false>(options: Options<ExportDocumentData, ThrowOnError>): RequestResult<ExportDocumentResponses, ExportDocumentErrors, ThrowOnError> {return (options.client ?? this.client).get<ExportDocumentResponses, ExportDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/export', ...options });}-+/*** Handler for `GET /documents/{document_id}/github_prs`.*@@ -1990,14 +1990,14 @@ export class Sdk extends HeyApiClient {public getDocumentGithubPullRequests<ThrowOnError extends boolean = false>(options: Options<GetDocumentGithubPullRequestsData, ThrowOnError>): RequestResult<GetDocumentGithubPullRequestsResponses, GetDocumentGithubPullRequestsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentGithubPullRequestsResponses, GetDocumentGithubPullRequestsErrors, ThrowOnError>({ url: '/documents/{document_id}/github_prs', ...options });}-+/*** Gets the presigned url(s) for the document. aka location*/public getLocationHandler<ThrowOnError extends boolean = false>(options: Options<GetLocationHandlerData, ThrowOnError>): RequestResult<GetLocationHandlerResponses, GetLocationHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetLocationHandlerResponses, GetLocationHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/location', ...options });}-+/*** Handler for `GET /documents/{document_id}/location_v3`.*@@ -2006,35 +2006,35 @@ export class Sdk extends HeyApiClient {public getDocumentLocationV3<ThrowOnError extends boolean = false>(options: Options<GetDocumentLocationV3Data, ThrowOnError>): RequestResult<GetDocumentLocationV3Responses, GetDocumentLocationV3Errors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentLocationV3Responses, GetDocumentLocationV3Errors, ThrowOnError>({ url: '/documents/{document_id}/location_v3', ...options });}-+/*** Permanently deletes a document.*/public permanentlyDeleteDocument<ThrowOnError extends boolean = false>(options: Options<PermanentlyDeleteDocumentData, ThrowOnError>): RequestResult<PermanentlyDeleteDocumentResponses, PermanentlyDeleteDocumentErrors, ThrowOnError> {return (options.client ?? this.client).delete<PermanentlyDeleteDocumentResponses, PermanentlyDeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/permanent', ...options });}-+/*** Fetches the document pdf processing result for a given document id*/public getDocumentProcessingResult<ThrowOnError extends boolean = false>(options: Options<GetDocumentProcessingResultData, ThrowOnError>): RequestResult<GetDocumentProcessingResultResponses, GetDocumentProcessingResultErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentProcessingResultResponses, GetDocumentProcessingResultErrors, ThrowOnError>({ url: '/documents/{document_id}/processing', ...options });}-+/*** Fetches the document processing result for a given document id and job id*/public jobProcessingResultHandler<ThrowOnError extends boolean = false>(options: Options<JobProcessingResultHandlerData, ThrowOnError>): RequestResult<JobProcessingResultHandlerResponses, JobProcessingResultHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<JobProcessingResultHandlerResponses, JobProcessingResultHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/processing/{job_id}', ...options });}-+/*** Deletes a specific document*/public revertDeleteDocument<ThrowOnError extends boolean = false>(options: Options<RevertDeleteDocumentData, ThrowOnError>): RequestResult<RevertDeleteDocumentResponses, RevertDeleteDocumentErrors, ThrowOnError> {return (options.client ?? this.client).put<RevertDeleteDocumentResponses, RevertDeleteDocumentErrors, ThrowOnError>({ url: '/documents/{document_id}/revert_delete', ...options });}-+/*** Handler for `GET /documents/{document_id}/short_id`.*@@ -2043,7 +2043,7 @@ export class Sdk extends HeyApiClient {public getDocumentShortId<ThrowOnError extends boolean = false>(options: Options<GetDocumentShortIdData, ThrowOnError>): RequestResult<GetDocumentShortIdResponses, GetDocumentShortIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentShortIdResponses, GetDocumentShortIdErrors, ThrowOnError>({ url: '/documents/{document_id}/short_id', ...options });}-+/*** For any file that isn't PDF or DOCX, use this endpoint for saving.* This endpoint will allow you to save the document by providing the file content as part of a multipart request. Use key 'file' along with the file bytes.@@ -2052,7 +2052,7 @@ export class Sdk extends HeyApiClient {public simpleSave<ThrowOnError extends boolean = false>(options: Options<SimpleSaveData, ThrowOnError>): RequestResult<SimpleSaveResponses, SimpleSaveErrors, ThrowOnError> {return (options.client ?? this.client).put<SimpleSaveResponses, SimpleSaveErrors, ThrowOnError>({ url: '/documents/{document_id}/simple_save', ...options });}-+/*** Gets the team-share state of a document. The team is resolved from the* document owner's team membership; `teamId` is omitted when the owner does@@ -2061,7 +2061,7 @@ export class Sdk extends HeyApiClient {public getDocumentTeamShare<ThrowOnError extends boolean = false>(options: Options<GetDocumentTeamShareData, ThrowOnError>): RequestResult<GetDocumentTeamShareResponses, GetDocumentTeamShareErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentTeamShareResponses, GetDocumentTeamShareErrors, ThrowOnError>({ url: '/documents/{document_id}/team_share', ...options });}-+/*** Sets explicit team sharing. Requires a verified acting identity matching* the persisted document owner, not merely effective Edit or Owner access.@@ -2078,42 +2078,42 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read current Markdown or extracted file text with the document's view receipt.*/public getDocumentTextContent<ThrowOnError extends boolean = false>(options: Options<GetDocumentTextContentData, ThrowOnError>): RequestResult<GetDocumentTextContentResponses, GetDocumentTextContentErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentTextContentResponses, GetDocumentTextContentErrors, ThrowOnError>({ url: '/documents/{document_id}/text-content', ...options });}-+/*** Gets the list of users who have viewed a given document*/public getDocumentViewsHandler<ThrowOnError extends boolean = false>(options: Options<GetDocumentViewsHandlerData, ThrowOnError>): RequestResult<GetDocumentViewsHandlerResponses, GetDocumentViewsHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentViewsHandlerResponses, GetDocumentViewsHandlerErrors, ThrowOnError>({ url: '/documents/{document_id}/views', ...options });}-+/*** Gets a particular document by its id*/public getDocumentVersion<ThrowOnError extends boolean = false>(options: Options<GetDocumentVersionData, ThrowOnError>): RequestResult<GetDocumentVersionResponses, GetDocumentVersionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentVersionResponses, GetDocumentVersionErrors, ThrowOnError>({ url: '/documents/{document_id}/{document_version_id}', ...options });}-+/*** State access request state through the domain service.*/public accessRequestsState<ThrowOnError extends boolean = false>(options: Options<AccessRequestsStateData, ThrowOnError>): RequestResult<AccessRequestsStateResponses, AccessRequestsStateErrors, ThrowOnError> {return (options.client ?? this.client).get<AccessRequestsStateResponses, AccessRequestsStateErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/access-requests', ...options });}-+/*** Cancel access request state through the domain service.*/public accessRequestsCancel<ThrowOnError extends boolean = false>(options: Options<AccessRequestsCancelData, ThrowOnError>): RequestResult<AccessRequestsCancelResponses, AccessRequestsCancelErrors, ThrowOnError> {return (options.client ?? this.client).delete<AccessRequestsCancelResponses, AccessRequestsCancelErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/access-requests/mine', ...options });}-+/*** Submit access request state through the domain service.*/@@ -2127,7 +2127,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Resolve access request state through the domain service.*/@@ -2141,21 +2141,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Direct access request state through the domain service.*/public accessRequestsDirect<ThrowOnError extends boolean = false>(options: Options<AccessRequestsDirectData, ThrowOnError>): RequestResult<AccessRequestsDirectResponses, AccessRequestsDirectErrors, ThrowOnError> {return (options.client ?? this.client).get<AccessRequestsDirectResponses, AccessRequestsDirectErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/direct-access', ...options });}-+/*** Remove direct access request state through the domain service.*/public accessRequestsRemoveDirect<ThrowOnError extends boolean = false>(options: Options<AccessRequestsRemoveDirectData, ThrowOnError>): RequestResult<AccessRequestsRemoveDirectResponses, AccessRequestsRemoveDirectErrors, ThrowOnError> {return (options.client ?? this.client).delete<AccessRequestsRemoveDirectResponses, AccessRequestsRemoveDirectErrors, ThrowOnError>({ url: '/entities/{entity_type}/{entity_id}/direct-access/{user_id}', ...options });}-+/*** Set direct access request state through the domain service.*/@@ -2169,21 +2169,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Get the current user's permission for a given entity.*/public getEntityPermission<ThrowOnError extends boolean = false>(options: Options<GetEntityPermissionData, ThrowOnError>): RequestResult<GetEntityPermissionResponses, GetEntityPermissionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetEntityPermissionResponses, GetEntityPermissionErrors, ThrowOnError>({ url: '/entity/{entity_type}/{entity_id}/permissions', ...options });}-+/*** List external chats the caller can view, including without a provider account.*/public externalChats<ThrowOnError extends boolean = false>(options?: Options<ExternalChatsData, ThrowOnError>): RequestResult<ExternalChatsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<ExternalChatsResponses, unknown, ThrowOnError>({ url: '/external-chats', ...options });}-+/*** Add one of the caller's provider chats as their own external chat.*/@@ -2197,21 +2197,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Stop syncing the chat, locally. Owner only, in their own session.*/public externalChatRemove<ThrowOnError extends boolean = false>(options: Options<ExternalChatRemoveData, ThrowOnError>): RequestResult<ExternalChatRemoveResponses, unknown, ThrowOnError> {return (options.client ?? this.client).delete<ExternalChatRemoveResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}', ...options });}-+/*** An external chat the caller can read.*/public externalChat<ThrowOnError extends boolean = false>(options: Options<ExternalChatData, ThrowOnError>): RequestResult<ExternalChatResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ExternalChatResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}', ...options });}-+/*** Stage one attachment for a later media send in this chat.*/@@ -2226,7 +2226,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** The caller's send progress for intents or messages.*/@@ -2240,14 +2240,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Newest-first timeline through ordinary view access.*/public externalChatMessages<ThrowOnError extends boolean = false>(options: Options<ExternalChatMessagesData, ThrowOnError>): RequestResult<ExternalChatMessagesResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ExternalChatMessagesResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/messages', ...options });}-+/*** Attachment states of messages, by message id (at most 100).*/@@ -2261,21 +2261,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** One message of the timeline, as the timeline shows it.*/public externalChatMessage<ThrowOnError extends boolean = false>(options: Options<ExternalChatMessageData, ThrowOnError>): RequestResult<ExternalChatMessageResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ExternalChatMessageResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/messages/{message_id}', ...options });}-+/*** Generic Share dialog policy.*/public externalChatPermissions<ThrowOnError extends boolean = false>(options: Options<ExternalChatPermissionsData, ThrowOnError>): RequestResult<ExternalChatPermissionsResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ExternalChatPermissionsResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/permissions', ...options });}-+/*** The owner, in their own session, updates link, team and channel sharing.*/@@ -2289,7 +2289,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Advance this viewer's read position.*/@@ -2303,14 +2303,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Caller-owned pending, failed and uncertain sends.*/public externalChatSends<ThrowOnError extends boolean = false>(options: Options<ExternalChatSendsData, ThrowOnError>): RequestResult<ExternalChatSendsResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<ExternalChatSendsResponses, unknown, ThrowOnError>({ url: '/external-chats/{chat_id}/sends', ...options });}-+/*** Send to the chat from the caller's own provider account (one request per second per user).*/@@ -2324,14 +2324,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's favorites.*/public listFavorites<ThrowOnError extends boolean = false>(options?: Options<ListFavoritesData, ThrowOnError>): RequestResult<ListFavoritesResponses, ListFavoritesErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListFavoritesResponses, ListFavoritesErrors, ThrowOnError>({ url: '/favorites', ...options });}-+/*** Favorite an entity in the caller's collection.*/@@ -2345,7 +2345,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Persist a manual order for the caller's favorites.*/@@ -2359,14 +2359,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Remove a favorite by entity.*/public removeFavoriteByEntity<ThrowOnError extends boolean = false>(options: Options<RemoveFavoriteByEntityData, ThrowOnError>): RequestResult<RemoveFavoriteByEntityResponses, RemoveFavoriteByEntityErrors, ThrowOnError> {return (options.client ?? this.client).delete<RemoveFavoriteByEntityResponses, RemoveFavoriteByEntityErrors, ThrowOnError>({ url: '/favorites/{entity_type}/{entity_id}', ...options });}-+/*** Get a visible foreign entity by the identifier its source system assigned.*@@ -2382,14 +2382,14 @@ export class Sdk extends HeyApiClient {public getForeignEntityBySource<ThrowOnError extends boolean = false>(options: Options<GetForeignEntityBySourceData, ThrowOnError>): RequestResult<GetForeignEntityBySourceResponses, GetForeignEntityBySourceErrors, ThrowOnError> {return (options.client ?? this.client).get<GetForeignEntityBySourceResponses, GetForeignEntityBySourceErrors, ThrowOnError>({ url: '/foreign_entity/by_source/{source}/{foreign_entity_id}', ...options });}-+/*** Get a visible foreign entity by its internal ID.*/public getForeignEntity<ThrowOnError extends boolean = false>(options: Options<GetForeignEntityData, ThrowOnError>): RequestResult<GetForeignEntityResponses, GetForeignEntityErrors, ThrowOnError> {return (options.client ?? this.client).get<GetForeignEntityResponses, GetForeignEntityErrors, ThrowOnError>({ url: '/foreign_entity/{id}', ...options });}-+/*** The live forms over a database the caller can see, for the grid's chip* and the delete-table confirmation.@@ -2397,7 +2397,7 @@ export class Sdk extends HeyApiClient {public listForms<ThrowOnError extends boolean = false>(options: Options<ListFormsData, ThrowOnError>): RequestResult<ListFormsResponses, ListFormsErrors, ThrowOnError> {return (options.client ?? this.client).get<ListFormsResponses, ListFormsErrors, ThrowOnError>({ url: '/forms', ...options });}-+/*** Create a form owned by the caller: over a new database named like it, or* over an existing table of a database the caller owns. Database Edit is@@ -2414,7 +2414,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Every live form the caller holds a grant on, newest first, with their* level: what Drive and Quick Access list. Public forms reached only by@@ -2423,7 +2423,7 @@ export class Sdk extends HeyApiClient {public listAccessibleForms<ThrowOnError extends boolean = false>(options?: Options<ListAccessibleFormsData, ThrowOnError>): RequestResult<ListAccessibleFormsResponses, ListAccessibleFormsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListAccessibleFormsResponses, ListAccessibleFormsErrors, ThrowOnError>({ url: '/forms/accessible', ...options });}-+/*** A form with its layout, each question joined with its column's title,* type and options. Never rows. Readable by anyone when the form is public.@@ -2431,7 +2431,7 @@ export class Sdk extends HeyApiClient {public getForm<ThrowOnError extends boolean = false>(options: Options<GetFormData, ThrowOnError>): RequestResult<GetFormResponses, GetFormErrors, ThrowOnError> {return (options.client ?? this.client).get<GetFormResponses, GetFormErrors, ThrowOnError>({ url: '/forms/{id}', ...options });}-+/*** Change a form's facts. The description and confirmation message take* edit; who responds, open or closed, the closing time and tallies take@@ -2447,7 +2447,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Open the editor-only collaborative layout, or publish its latest valid* revision. Content stays in the existing collaboration surface.@@ -2455,7 +2455,7 @@ export class Sdk extends HeyApiClient {public collaborateForm<ThrowOnError extends boolean = false>(options: Options<CollaborateFormData, ThrowOnError>): RequestResult<CollaborateFormResponses, CollaborateFormErrors, ThrowOnError> {return (options.client ?? this.client).post<CollaborateFormResponses, CollaborateFormErrors, ThrowOnError>({ url: '/forms/{id}/collaboration', ...options });}-+/*** Save a validated replacement in the shared layout and report publication.* A 200 response with `publicationError` means the draft is saved, while@@ -2471,7 +2471,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** A form's recipients, for its owner. Link and team sharing are always* `null`: a form's public audience is its own setting.@@ -2479,7 +2479,7 @@ export class Sdk extends HeyApiClient {public getFormPermissions<ThrowOnError extends boolean = false>(options: Options<GetFormPermissionsData, ThrowOnError>): RequestResult<GetFormPermissionsResponses, GetFormPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetFormPermissionsResponses, GetFormPermissionsErrors, ThrowOnError>({ url: '/forms/{id}/permissions', ...options });}-+/*** Change a form's channel recipients, for its owner. Turning on link or* team sharing is refused.@@ -2494,7 +2494,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Respond to a form. A gate that stops the response answers `stopped` and* writes nothing to the table. A public form takes anonymous responses.@@ -2509,14 +2509,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** The signed-in caller's own response, with the row's current cells.*/public getMyFormResponse<ThrowOnError extends boolean = false>(options: Options<GetMyFormResponseData, ThrowOnError>): RequestResult<GetMyFormResponseResponses, GetMyFormResponseErrors, ThrowOnError> {return (options.client ?? this.client).get<GetMyFormResponseResponses, GetMyFormResponseErrors, ThrowOnError>({ url: '/forms/{id}/responses/mine', ...options });}-+/*** Replace the signed-in caller's answers while the form is open. A gate* that stops the edit leaves the saved response as it was.@@ -2531,14 +2531,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Response counts for the form's editors.*/public getFormResponseSummary<ThrowOnError extends boolean = false>(options: Options<GetFormResponseSummaryData, ThrowOnError>): RequestResult<GetFormResponseSummaryResponses, GetFormResponseSummaryErrors, ThrowOnError> {return (options.client ?? this.client).get<GetFormResponseSummaryResponses, GetFormResponseSummaryErrors, ThrowOnError>({ url: '/forms/{id}/responses/summary', ...options });}-+/*** Option counts of the form's choice questions: for respondents when the* owner shows them, for editors always.@@ -2546,35 +2546,35 @@ export class Sdk extends HeyApiClient {public getFormTally<ThrowOnError extends boolean = false>(options: Options<GetFormTallyData, ThrowOnError>): RequestResult<GetFormTallyResponses, GetFormTallyErrors, ThrowOnError> {return (options.client ?? this.client).get<GetFormTallyResponses, GetFormTallyErrors, ThrowOnError>({ url: '/forms/{id}/tally', ...options });}-+/*** Redirects an authenticated user to the github sync app installation page.*/public installSync<ThrowOnError extends boolean = false>(options?: Options<InstallSyncData, ThrowOnError>): RequestResult<unknown, InstallSyncErrors, ThrowOnError> {return (options?.client ?? this.client).get<unknown, InstallSyncErrors, ThrowOnError>({ url: '/github/install-sync', ...options });}-+/*** List the repositories and authors among the GitHub pull requests visible to the caller.*/public getGithubPullRequestFacets<ThrowOnError extends boolean = false>(options?: Options<GetGithubPullRequestFacetsData, ThrowOnError>): RequestResult<GetGithubPullRequestFacetsResponses, GetGithubPullRequestFacetsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetGithubPullRequestFacetsResponses, GetGithubPullRequestFacetsErrors, ThrowOnError>({ url: '/github_pull_requests/facets', ...options });}-+/*** Get the pull request behind a foreign entity record the caller can view.*/public getGithubPullRequest<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestData, ThrowOnError>): RequestResult<GetGithubPullRequestResponses, GetGithubPullRequestErrors, ThrowOnError> {return (options.client ?? this.client).get<GetGithubPullRequestResponses, GetGithubPullRequestErrors, ThrowOnError>({ url: '/github_pull_requests/{id}', ...options });}-+/*** Get the changes of the pull request behind a foreign entity record the caller can view.*/public getGithubPullRequestChanges<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestChangesData, ThrowOnError>): RequestResult<GetGithubPullRequestChangesResponses, GetGithubPullRequestChangesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetGithubPullRequestChangesResponses, GetGithubPullRequestChangesErrors, ThrowOnError>({ url: '/github_pull_requests/{id}/changes', ...options });}-+/*** Get the patch of changes of the pull request behind a foreign entity record the caller can* view.@@ -2582,7 +2582,7 @@ export class Sdk extends HeyApiClient {public getGithubPullRequestChangesPatch<ThrowOnError extends boolean = false>(options: Options<GetGithubPullRequestChangesPatchData, ThrowOnError>): RequestResult<GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesPatchErrors, ThrowOnError> {return (options.client ?? this.client).get<GetGithubPullRequestChangesPatchResponses, GetGithubPullRequestChangesPatchErrors, ThrowOnError>({ url: '/github_pull_requests/{id}/changes/patch', ...options });}-+/*** Handler for `POST /harness-pairings`.*@@ -2600,14 +2600,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /harness-pairings/{code}`.*/public getHarnessPairing<ThrowOnError extends boolean = false>(options: Options<GetHarnessPairingData, ThrowOnError>): RequestResult<GetHarnessPairingResponses, GetHarnessPairingErrors, ThrowOnError> {return (options.client ?? this.client).get<GetHarnessPairingResponses, GetHarnessPairingErrors, ThrowOnError>({ url: '/harness-pairings/{code}', ...options });}-+/*** Handler for `POST /harness-pairings/{code}/approve`.*/@@ -2621,7 +2621,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `POST /harness-pairings/{pairing_id}/claim`.*@@ -2639,14 +2639,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Handler for `GET /harnesses`.*/public listHarnesses<ThrowOnError extends boolean = false>(options?: Options<ListHarnessesData, ThrowOnError>): RequestResult<ListHarnessesResponses, ListHarnessesErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListHarnessesResponses, ListHarnessesErrors, ThrowOnError>({ url: '/harnesses', ...options });}-+/*** Handler for `DELETE /harnesses/me`.*@@ -2655,70 +2655,70 @@ export class Sdk extends HeyApiClient {public deleteSelfHarness<ThrowOnError extends boolean = false>(options?: Options<DeleteSelfHarnessData, ThrowOnError>): RequestResult<DeleteSelfHarnessResponses, DeleteSelfHarnessErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteSelfHarnessResponses, DeleteSelfHarnessErrors, ThrowOnError>({ url: '/harnesses/me', ...options });}-+/*** Handler for `GET /harnesses/me`.*/public getSelfHarness<ThrowOnError extends boolean = false>(options?: Options<GetSelfHarnessData, ThrowOnError>): RequestResult<GetSelfHarnessResponses, GetSelfHarnessErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetSelfHarnessResponses, GetSelfHarnessErrors, ThrowOnError>({ url: '/harnesses/me', ...options });}-+/*** Handler for `GET /harnesses/me/agents`.*/public listHarnessAgents<ThrowOnError extends boolean = false>(options?: Options<ListHarnessAgentsData, ThrowOnError>): RequestResult<ListHarnessAgentsResponses, ListHarnessAgentsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListHarnessAgentsResponses, ListHarnessAgentsErrors, ThrowOnError>({ url: '/harnesses/me/agents', ...options });}-+/*** Handler for `GET /harnesses/me/sessions`.*/public listHarnessSessions<ThrowOnError extends boolean = false>(options?: Options<ListHarnessSessionsData, ThrowOnError>): RequestResult<ListHarnessSessionsResponses, ListHarnessSessionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListHarnessSessionsResponses, ListHarnessSessionsErrors, ThrowOnError>({ url: '/harnesses/me/sessions', ...options });}-+/*** Handler for `DELETE /harnesses/{harness_id}`.*/public deleteHarness<ThrowOnError extends boolean = false>(options: Options<DeleteHarnessData, ThrowOnError>): RequestResult<DeleteHarnessResponses, DeleteHarnessErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteHarnessResponses, DeleteHarnessErrors, ThrowOnError>({ url: '/harnesses/{harness_id}', ...options });}-+/*** Health check*/public healthHandler<ThrowOnError extends boolean = false>(options?: Options<HealthHandlerData, ThrowOnError>): RequestResult<HealthHandlerResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<HealthHandlerResponses, unknown, ThrowOnError>({ url: '/health', ...options });}-+/*** Gets the users history*/public getHistoryHandler<ThrowOnError extends boolean = false>(options?: Options<GetHistoryHandlerData, ThrowOnError>): RequestResult<GetHistoryHandlerResponses, GetHistoryHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetHistoryHandlerResponses, GetHistoryHandlerErrors, ThrowOnError>({ url: '/history', ...options });}-+/*** Deletes an item from the user's history*/public deleteHistoryHandler<ThrowOnError extends boolean = false>(options: Options<DeleteHistoryHandlerData, ThrowOnError>): RequestResult<DeleteHistoryHandlerResponses, DeleteHistoryHandlerErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteHistoryHandlerResponses, DeleteHistoryHandlerErrors, ThrowOnError>({ url: '/history/{item_type}/{item_id}', ...options });}-+/*** Upserts an item into the user's history and performs other necessary tracking actions*/public upsertHistoryHandler<ThrowOnError extends boolean = false>(options: Options<UpsertHistoryHandlerData, ThrowOnError>): RequestResult<UpsertHistoryHandlerResponses, UpsertHistoryHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<UpsertHistoryHandlerResponses, UpsertHistoryHandlerErrors, ThrowOnError>({ url: '/history/{item_type}/{item_id}', ...options });}-+/*** List initiatives the caller can view.*/public listInitiatives<ThrowOnError extends boolean = false>(options?: Options<ListInitiativesData, ThrowOnError>): RequestResult<ListInitiativesResponses, ListInitiativesErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListInitiativesResponses, ListInitiativesErrors, ThrowOnError>({ url: '/initiatives', ...options });}-+/*** Create an initiative owned by the caller.*/@@ -2732,21 +2732,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete the initiative the caller owns.*/public deleteInitiative<ThrowOnError extends boolean = false>(options: Options<DeleteInitiativeData, ThrowOnError>): RequestResult<DeleteInitiativeResponses, DeleteInitiativeErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteInitiativeResponses, DeleteInitiativeErrors, ThrowOnError>({ url: '/initiatives/{initiative_id}', ...options });}-+/*** Fetch one initiative the caller can view.*/public getInitiative<ThrowOnError extends boolean = false>(options: Options<GetInitiativeData, ThrowOnError>): RequestResult<GetInitiativeResponses, GetInitiativeErrors, ThrowOnError> {return (options.client ?? this.client).get<GetInitiativeResponses, GetInitiativeErrors, ThrowOnError>({ url: '/initiatives/{initiative_id}', ...options });}-+/*** Update fields the caller can edit.*/@@ -2760,28 +2760,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the instructions document for the current user*/public getInstructionsHandler<ThrowOnError extends boolean = false>(options?: Options<GetInstructionsHandlerData, ThrowOnError>): RequestResult<GetInstructionsHandlerResponses, GetInstructionsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetInstructionsHandlerResponses, GetInstructionsHandlerErrors, ThrowOnError>({ url: '/instructions', ...options });}-+/*** Creates an instructions document for the current user*/public createInstructionsHandler<ThrowOnError extends boolean = false>(options?: Options<CreateInstructionsHandlerData, ThrowOnError>): RequestResult<CreateInstructionsHandlerResponses, CreateInstructionsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).post<CreateInstructionsHandlerResponses, CreateInstructionsHandlerErrors, ThrowOnError>({ url: '/instructions', ...options });}-+/*** Gets the items the user has access to*/public getItemsSoup<ThrowOnError extends boolean = false>(options?: Options<GetItemsSoupData, ThrowOnError>): RequestResult<GetItemsSoupResponses, GetItemsSoupErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetItemsSoupResponses, GetItemsSoupErrors, ThrowOnError>({ url: '/items/soup', ...options });}-+/*** Gets the items the user has access to*/@@ -2795,7 +2795,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the items the user has access to using AST filters*/@@ -2809,7 +2809,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the items grouped by the specified field using AST filters.*/@@ -2823,14 +2823,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read a bounded timeline with lazy thread previews.*/public messageTimeline<ThrowOnError extends boolean = false>(options: Options<MessageTimelineData, ThrowOnError>): RequestResult<MessageTimelineResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<MessageTimelineResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}', ...options });}-+/*** Create a root message or reply.*/@@ -2844,21 +2844,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Tombstone one message; deleting a discussion's root deletes the discussion.*/public entityMessageDeleteMessage<ThrowOnError extends boolean = false>(options: Options<EntityMessageDeleteMessageData, ThrowOnError>): RequestResult<EntityMessageDeleteMessageResponses, unknown, ThrowOnError> {return (options.client ?? this.client).delete<EntityMessageDeleteMessageResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/items/{id}', ...options });}-+/*** Resolve a message within its parent.*/public entityMessageGetMessage<ThrowOnError extends boolean = false>(options: Options<EntityMessageGetMessageData, ThrowOnError>): RequestResult<EntityMessageGetMessageResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<EntityMessageGetMessageResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/items/{id}', ...options });}-+/*** Edit an owned message.*/@@ -2872,7 +2872,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Change the caller's reaction.*/@@ -2886,28 +2886,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Resolve an old link under current parent permissions.*/public entityMessageLegacy<ThrowOnError extends boolean = false>(options: Options<EntityMessageLegacyData, ThrowOnError>): RequestResult<EntityMessageLegacyResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<EntityMessageLegacyResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/legacy/{legacy_id}', ...options });}-+/*** Explicitly remove a discussion.*/public entityMessageDeleteThread<ThrowOnError extends boolean = false>(options: Options<EntityMessageDeleteThreadData, ThrowOnError>): RequestResult<EntityMessageDeleteThreadResponses, unknown, ThrowOnError> {return (options.client ?? this.client).delete<EntityMessageDeleteThreadResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/threads/{id}', ...options });}-+/*** Open a specific discussion from a link or annotation.*/public entityMessageGetThread<ThrowOnError extends boolean = false>(options: Options<EntityMessageGetThreadData, ThrowOnError>): RequestResult<EntityMessageGetThreadResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<EntityMessageGetThreadResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/threads/{id}', ...options });}-+/*** Update a discussion's lifecycle and placement.*/@@ -2921,14 +2921,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read a bounded window of messages and the parent's activity, ordered by the server.*/public messageTimelineEntries<ThrowOnError extends boolean = false>(options: Options<MessageTimelineEntriesData, ThrowOnError>): RequestResult<MessageTimelineEntriesResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<MessageTimelineEntriesResponses, unknown, ThrowOnError>({ url: '/messages/{parent_type}/{parent_id}/timeline', ...options });}-+/*** Broadcast typing within an authorized discussion.*/@@ -2942,14 +2942,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the users pinned items*/public getPinsHandler<ThrowOnError extends boolean = false>(options?: Options<GetPinsHandlerData, ThrowOnError>): RequestResult<GetPinsHandlerResponses, GetPinsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetPinsHandlerResponses, GetPinsHandlerErrors, ThrowOnError>({ url: '/pins', ...options });}-+/*** Saves the updated order of the pins for the user*/@@ -2963,7 +2963,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Deletes the pin for the user*/@@ -2977,7 +2977,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Pins the item for the user*/@@ -2991,14 +2991,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List projects visible to the authenticated user.*/public getProjectsHandler<ThrowOnError extends boolean = false>(options?: Options<GetProjectsHandlerData, ThrowOnError>): RequestResult<GetProjectsHandlerResponses, GetProjectsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetProjectsHandlerResponses, GetProjectsHandlerErrors, ThrowOnError>({ url: '/projects', ...options });}-+/*** Create a project, optionally beneath an existing project.*/@@ -3012,14 +3012,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List pending root projects owned by the authenticated user.*/public getPendingProjectsHandler<ThrowOnError extends boolean = false>(options?: Options<GetPendingProjectsHandlerData, ThrowOnError>): RequestResult<GetPendingProjectsHandlerResponses, GetPendingProjectsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetPendingProjectsHandlerResponses, GetPendingProjectsHandlerErrors, ThrowOnError>({ url: '/projects/pending', ...options });}-+/*** Get previews for a batch of project IDs.*/@@ -3033,7 +3033,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Upload a folder tree and create its upload destinations.*/@@ -3047,7 +3047,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Create a request for extracting an uploaded folder archive.*/@@ -3061,77 +3061,77 @@ export class Sdk extends HeyApiClient {}});}-+/*** Soft-delete a project and all of its children.*/public deleteProjectHandler<ThrowOnError extends boolean = false>(options: Options<DeleteProjectHandlerData, ThrowOnError>): RequestResult<DeleteProjectHandlerResponses, DeleteProjectHandlerErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteProjectHandlerResponses, DeleteProjectHandlerErrors, ThrowOnError>({ url: '/projects/{id}', ...options });}-+/*** Get project metadata.*/public getProjectHandler<ThrowOnError extends boolean = false>(options: Options<GetProjectHandlerData, ThrowOnError>): RequestResult<GetProjectHandlerResponses, GetProjectHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetProjectHandlerResponses, GetProjectHandlerErrors, ThrowOnError>({ url: '/projects/{id}', ...options });}-+/*** Get the caller's project access level.*/public getProjectUserAccessLevel<ThrowOnError extends boolean = false>(options: Options<GetProjectUserAccessLevelData, ThrowOnError>): RequestResult<GetProjectUserAccessLevelResponses, GetProjectUserAccessLevelErrors, ThrowOnError> {return (options.client ?? this.client).get<GetProjectUserAccessLevelResponses, GetProjectUserAccessLevelErrors, ThrowOnError>({ url: '/projects/{id}/access_level', ...options });}-+/*** Get a project's immediate children.*/public getProjectContentHandler<ThrowOnError extends boolean = false>(options: Options<GetProjectContentHandlerData, ThrowOnError>): RequestResult<GetProjectContentHandlerResponses, GetProjectContentHandlerErrors, ThrowOnError> {return (options.client ?? this.client).get<GetProjectContentHandlerResponses, GetProjectContentHandlerErrors, ThrowOnError>({ url: '/projects/{id}/content', ...options });}-+/*** Permanently delete a soft-deleted project and all of its children.*/public permanentlyDeleteProject<ThrowOnError extends boolean = false>(options: Options<PermanentlyDeleteProjectData, ThrowOnError>): RequestResult<PermanentlyDeleteProjectResponses, PermanentlyDeleteProjectErrors, ThrowOnError> {return (options.client ?? this.client).delete<PermanentlyDeleteProjectResponses, PermanentlyDeleteProjectErrors, ThrowOnError>({ url: '/projects/{id}/permanent', ...options });}-+/*** Get a project's share permissions.*/public getProjectPermissionsV2<ThrowOnError extends boolean = false>(options: Options<GetProjectPermissionsV2Data, ThrowOnError>): RequestResult<GetProjectPermissionsV2Responses, GetProjectPermissionsV2Errors, ThrowOnError> {return (options.client ?? this.client).get<GetProjectPermissionsV2Responses, GetProjectPermissionsV2Errors, ThrowOnError>({ url: '/projects/{id}/permissions', ...options });}-+/*** Restore a soft-deleted project and its children.*/public revertDeleteProject<ThrowOnError extends boolean = false>(options: Options<RevertDeleteProjectData, ThrowOnError>): RequestResult<RevertDeleteProjectResponses, RevertDeleteProjectErrors, ThrowOnError> {return (options.client ?? this.client).put<RevertDeleteProjectResponses, RevertDeleteProjectErrors, ThrowOnError>({ url: '/projects/{id}/revert_delete', ...options });}-+/*** Gets the users recently deleted items.*/public recentlyDeleted<ThrowOnError extends boolean = false>(options?: Options<RecentlyDeletedData, ThrowOnError>): RequestResult<RecentlyDeletedResponses, RecentlyDeletedErrors, ThrowOnError> {return (options?.client ?? this.client).get<RecentlyDeletedResponses, RecentlyDeletedErrors, ThrowOnError>({ url: '/recents/deleted', ...options });}-+/*** List original email threads with caller-private reminder work.*/public listEmailReminders<ThrowOnError extends boolean = false>(options?: Options<ListEmailRemindersData, ThrowOnError>): RequestResult<ListEmailRemindersResponses, ListEmailRemindersErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListEmailRemindersResponses, ListEmailRemindersErrors, ThrowOnError>({ url: '/reminders/email/collection', ...options });}-+/*** Read an email follow-up and reconcile inbound reply cancellation.*/public getEmailFollowup<ThrowOnError extends boolean = false>(options: Options<GetEmailFollowupData, ThrowOnError>): RequestResult<GetEmailFollowupResponses, GetEmailFollowupErrors, ThrowOnError> {return (options.client ?? this.client).get<GetEmailFollowupResponses, GetEmailFollowupErrors, ThrowOnError>({ url: '/reminders/email/{thread_id}', ...options });}-+/*** Schedule, edit or remove one email follow-up as an idempotent operation.*/@@ -3145,11 +3145,11 @@ export class Sdk extends HeyApiClient {}});}-+public getViewsHandler<ThrowOnError extends boolean = false>(options?: Options<GetViewsHandlerData, ThrowOnError>): RequestResult<GetViewsHandlerResponses, GetViewsHandlerErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetViewsHandlerResponses, GetViewsHandlerErrors, ThrowOnError>({ url: '/saved_views', ...options });}-+public createViewHandler<ThrowOnError extends boolean = false>(options: Options<CreateViewHandlerData, ThrowOnError>): RequestResult<CreateViewHandlerResponses, CreateViewHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<CreateViewHandlerResponses, CreateViewHandlerErrors, ThrowOnError>({url: '/saved_views',@@ -3160,7 +3160,7 @@ export class Sdk extends HeyApiClient {}});}-+public excludeDefaultViewHandler<ThrowOnError extends boolean = false>(options: Options<ExcludeDefaultViewHandlerData, ThrowOnError>): RequestResult<ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewHandlerErrors, ThrowOnError> {return (options.client ?? this.client).post<ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewHandlerErrors, ThrowOnError>({url: '/saved_views/exclude_default',@@ -3171,11 +3171,11 @@ export class Sdk extends HeyApiClient {}});}-+public deleteViewHandler<ThrowOnError extends boolean = false>(options: Options<DeleteViewHandlerData, ThrowOnError>): RequestResult<DeleteViewHandlerResponses, DeleteViewHandlerErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteViewHandlerResponses, DeleteViewHandlerErrors, ThrowOnError>({ url: '/saved_views/{saved_view_id}', ...options });}-+public patchViewHandler<ThrowOnError extends boolean = false>(options: Options<PatchViewHandlerData, ThrowOnError>): RequestResult<PatchViewHandlerResponses, PatchViewHandlerErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchViewHandlerResponses, PatchViewHandlerErrors, ThrowOnError>({url: '/saved_views/{saved_view_id}',@@ -3186,14 +3186,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List this administrator's team receipts, effective server limits and source binding.*/public listSlackImports<ThrowOnError extends boolean = false>(options?: Options<ListSlackImportsData, ThrowOnError>): RequestResult<ListSlackImportsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<ListSlackImportsResponses, unknown, ThrowOnError>({ url: '/slack/imports', ...options });}-+/*** Create or replay a job using a scoped idempotency token and full selected metadata.* Missing creation timestamps and unknown message counts are represented as null.@@ -3208,28 +3208,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Read sanitized progress; foreign jobs are indistinguishable from missing jobs.*/public getSlackImport<ThrowOnError extends boolean = false>(options: Options<GetSlackImportData, ThrowOnError>): RequestResult<GetSlackImportResponses, GetSlackImportErrors, ThrowOnError> {return (options.client ?? this.client).get<GetSlackImportResponses, GetSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}', ...options });}-+/*** Stop unclaimed work. Active leases may settle; cancellation does not roll back history.*/public cancelSlackImport<ThrowOnError extends boolean = false>(options: Options<CancelSlackImportData, ThrowOnError>): RequestResult<CancelSlackImportResponses, CancelSlackImportErrors, ThrowOnError> {return (options.client ?? this.client).post<CancelSlackImportResponses, CancelSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}/cancel', ...options });}-+/*** Close registration idempotently; never-ready conversations are skipped, not queued work.*/public finalizeSlackImport<ThrowOnError extends boolean = false>(options: Options<FinalizeSlackImportData, ThrowOnError>): RequestResult<FinalizeSlackImportResponses, FinalizeSlackImportErrors, ThrowOnError> {return (options.client ?? this.client).post<FinalizeSlackImportResponses, FinalizeSlackImportErrors, ThrowOnError>({ url: '/slack/imports/{job_id}/finalize', ...options });}-+/*** Issue short-lived, checksum/length-bound, create-only PUT grants. Do not log or persist URLs.* Retry a PUT returning 412 by completing/verifying the existing object, not overwriting it.@@ -3244,7 +3244,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Verify storage checksums and lengths for registered objects. A seal fixes the ENTIRE* descriptor set (contiguous indices, sizes and hashes), not just this completion batch.@@ -3261,7 +3261,7 @@ export class Sdk extends HeyApiClient {}});}-+public bulkWakeupSyncServiceDocuments<ThrowOnError extends boolean = false>(options: Options<BulkWakeupSyncServiceDocumentsData, ThrowOnError>): RequestResult<BulkWakeupSyncServiceDocumentsResponses, BulkWakeupSyncServiceDocumentsErrors, ThrowOnError> {return (options.client ?? this.client).post<BulkWakeupSyncServiceDocumentsResponses, BulkWakeupSyncServiceDocumentsErrors, ThrowOnError>({url: '/sync_service/wakeup',@@ -3272,7 +3272,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Edits the share permissions of a thread.*/@@ -3286,14 +3286,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** List the caller's API keys.*/public listUserApiKeys<ThrowOnError extends boolean = false>(options?: Options<ListUserApiKeysData, ThrowOnError>): RequestResult<ListUserApiKeysResponses, ListUserApiKeysErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListUserApiKeysResponses, ListUserApiKeysErrors, ThrowOnError>({ url: '/user-api-keys', ...options });}-+/*** Mint a new API key for the caller.*/@@ -3307,28 +3307,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete one of the caller's API keys.*/public deleteUserApiKey<ThrowOnError extends boolean = false>(options: Options<DeleteUserApiKeyData, ThrowOnError>): RequestResult<DeleteUserApiKeyResponses, DeleteUserApiKeyErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteUserApiKeyResponses, DeleteUserApiKeyErrors, ThrowOnError>({ url: '/user-api-keys/{id}', ...options });}-+/*** Deletes a document location for the user*/public deleteUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<DeleteUserDocumentViewLocationData, ThrowOnError>): RequestResult<DeleteUserDocumentViewLocationResponses, DeleteUserDocumentViewLocationErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteUserDocumentViewLocationResponses, DeleteUserDocumentViewLocationErrors, ThrowOnError>({ url: '/user_document_view_location/{document_id}', ...options });}-+/*** Gets a UserPdfDocumentLocation entry*/public getUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<GetUserDocumentViewLocationData, ThrowOnError>): RequestResult<GetUserDocumentViewLocationResponses, GetUserDocumentViewLocationErrors, ThrowOnError> {return (options.client ?? this.client).get<GetUserDocumentViewLocationResponses, GetUserDocumentViewLocationErrors, ThrowOnError>({ url: '/user_document_view_location/{document_id}', ...options });}-+public upsertUserDocumentViewLocation<ThrowOnError extends boolean = false>(options: Options<UpsertUserDocumentViewLocationData, ThrowOnError>): RequestResult<UpsertUserDocumentViewLocationResponses, UpsertUserDocumentViewLocationErrors, ThrowOnError> {return (options.client ?? this.client).post<UpsertUserDocumentViewLocationResponses, UpsertUserDocumentViewLocationErrors, ThrowOnError>({url: '/user_document_view_location/{document_id}',@@ -3339,14 +3339,14 @@ export class Sdk extends HeyApiClient {}});}-+/*** Gets the current documents share permissions*/public getDocumentPermissionsV2<ThrowOnError extends boolean = false>(options: Options<GetDocumentPermissionsV2Data, ThrowOnError>): RequestResult<GetDocumentPermissionsV2Responses, GetDocumentPermissionsV2Errors, ThrowOnError> {return (options.client ?? this.client).get<GetDocumentPermissionsV2Responses, GetDocumentPermissionsV2Errors, ThrowOnError>({ url: '/v2/documents/{document_id}/permissions', ...options });}-+/*** Edit project metadata and sharing settings.*/@@ -3360,21 +3360,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Stream matching broker events to the caller over Server-Sent Events.*/public streamEvents<ThrowOnError extends boolean = false>(options: Options<StreamEventsData, ThrowOnError, StreamEventsResponse>): Promise<ServerSentEventsResult<StreamEventsResponses>> {return (options.client ?? this.client).sse.get<StreamEventsResponses, StreamEventsErrors, ThrowOnError>({ url: '/webhook/events/stream', ...options });}-+/*** List the caller's webhooks.*/public listWebhooks<ThrowOnError extends boolean = false>(options?: Options<ListWebhooksData, ThrowOnError>): RequestResult<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError> {return (options?.client ?? this.client).get<ListWebhooksResponses, ListWebhooksErrors, ThrowOnError>({ url: '/webhook/webhooks', ...options });}-+/*** Create a webhook.*/@@ -3388,21 +3388,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Delete a webhook.*/public deleteWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteWebhookData, ThrowOnError>): RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}', ...options });}-+/*** Get a webhook.*/public getWebhook<ThrowOnError extends boolean = false>(options: Options<GetWebhookData, ThrowOnError>): RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError> {return (options.client ?? this.client).get<GetWebhookResponses, GetWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}', ...options });}-+/*** Patch a webhook.*/@@ -3416,21 +3416,21 @@ export class Sdk extends HeyApiClient {}});}-+/*** Validate a webhook endpoint.*/public validateWebhook<ThrowOnError extends boolean = false>(options: Options<ValidateWebhookData, ThrowOnError>): RequestResult<ValidateWebhookResponses, ValidateWebhookErrors, ThrowOnError> {return (options.client ?? this.client).post<ValidateWebhookResponses, ValidateWebhookErrors, ThrowOnError>({ url: '/webhook/webhooks/{webhook_id}/validate', ...options });}-+/*** The caller's own account.*/public whatsappAccount<ThrowOnError extends boolean = false>(options?: Options<WhatsappAccountData, ThrowOnError>): RequestResult<WhatsappAccountResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<WhatsappAccountResponses, unknown, ThrowOnError>({ url: '/whatsapp/account', ...options });}-+/*** The caller's WhatsApp chat list (groups and direct chats), newest* activity first, with what can be added to Macro.@@ -3438,7 +3438,7 @@ export class Sdk extends HeyApiClient {public whatsappChats<ThrowOnError extends boolean = false>(options?: Options<WhatsappChatsData, ThrowOnError>): RequestResult<WhatsappChatsResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).get<WhatsappChatsResponses, unknown, ThrowOnError>({ url: '/whatsapp/chats', ...options });}-+/*** Start or resume the caller's pairing transaction.*/@@ -3452,7 +3452,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** End the caller's observation consent.*/@@ -3466,7 +3466,7 @@ export class Sdk extends HeyApiClient {}});}-+/*** Import earlier messages of the caller's chats that wait for their phone* (`backfill.state` `waiting_for_phone`). WhatsApp must be open on the phone.@@ -3474,7 +3474,7 @@ export class Sdk extends HeyApiClient {public whatsappImportHistory<ThrowOnError extends boolean = false>(options?: Options<WhatsappImportHistoryData, ThrowOnError>): RequestResult<WhatsappImportHistoryResponses, unknown, ThrowOnError> {return (options?.client ?? this.client).post<WhatsappImportHistoryResponses, unknown, ThrowOnError>({ url: '/whatsapp/history-import', ...options });}-+/*** Ask whether a phone number has a WhatsApp account, to start a direct chat* with it; poll the lookup until it is no longer `pending`. Found numbers@@ -3490,28 +3490,28 @@ export class Sdk extends HeyApiClient {}});}-+/*** Poll the caller's phone-number lookup.*/public whatsappLookup<ThrowOnError extends boolean = false>(options: Options<WhatsappLookupData, ThrowOnError>): RequestResult<WhatsappLookupResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<WhatsappLookupResponses, unknown, ThrowOnError>({ url: '/whatsapp/lookups/{id}', ...options });}-+/*** Cancel the caller's pairing transaction.*/public whatsappCancelPairing<ThrowOnError extends boolean = false>(options: Options<WhatsappCancelPairingData, ThrowOnError>): RequestResult<WhatsappCancelPairingResponses, unknown, ThrowOnError> {return (options.client ?? this.client).delete<WhatsappCancelPairingResponses, unknown, ThrowOnError>({ url: '/whatsapp/pairing/{id}', ...options });}-+/*** Poll the caller's pairing transaction, including its current QR code.*/public whatsappPairing<ThrowOnError extends boolean = false>(options: Options<WhatsappPairingData, ThrowOnError>): RequestResult<WhatsappPairingResponses, unknown, ThrowOnError> {return (options.client ?? this.client).get<WhatsappPairingResponses, unknown, ThrowOnError>({ url: '/whatsapp/pairing/{id}', ...options });}-+/*** Forward the owner's WebAuthn assertion to the pairing replica.*/diff --git a/packages/sdk/generated/unfurl/sdk.gen.ts b/packages/sdk/generated/unfurl/sdk.gen.tsindex beec08bcc9..2a148ed535 100644--- a/packages/sdk/generated/unfurl/sdk.gen.ts+++ b/packages/sdk/generated/unfurl/sdk.gen.ts@@ -20,7 +20,7 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extendsclass HeyApiClient {protected client: Client;-+constructor(args?: {client?: Client;}) {@@ -30,9 +30,9 @@ class HeyApiClient {class HeyApiRegistry<T> {private readonly defaultKey = 'default';-+private readonly instances: Map<string, T> = new Map();-+get(key?: string): T {const instance = this.instances.get(key ?? this.defaultKey);if (!instance) {@@ -40,7 +40,7 @@ class HeyApiRegistry<T> {}return instance;}-+set(value: T, key?: string): void {this.instances.set(key ?? this.defaultKey, value);}@@ -48,7 +48,7 @@ class HeyApiRegistry<T> {export class Sdk extends HeyApiClient {public static readonly __registry: HeyApiRegistry<Sdk> = new HeyApiRegistry<Sdk>();-+constructor(args?: {client?: Client;key?: string;@@ -56,11 +56,11 @@ export class Sdk extends HeyApiClient {super(args);Sdk.__registry.set(this, args?.key);}-+public proxyRequestHandler<ThrowOnError extends boolean = false>(options: Options<ProxyRequestHandlerData, ThrowOnError>): RequestResult<unknown, unknown, ThrowOnError> {return (options.client ?? this.client).get<unknown, unknown, ThrowOnError>({ url: '/proxy', ...options });}-+/*** Unfurl the URL passed via the `url` query parameter and return its* extracted metadata (title, description, image, favicon).@@ -73,7 +73,7 @@ export class Sdk extends HeyApiClient {public getUnfurl<ThrowOnError extends boolean = false>(options: Options<GetUnfurlData, ThrowOnError>): RequestResult<GetUnfurlResponses, GetUnfurlErrors, ThrowOnError> {return (options.client ?? this.client).get<GetUnfurlResponses, GetUnfurlErrors, ThrowOnError>({ url: '/unfurl', ...options });}-+public getUnfurlBulk<ThrowOnError extends boolean = false>(options: Options<GetUnfurlBulkData, ThrowOnError>): RequestResult<GetUnfurlBulkResponses, GetUnfurlBulkErrors, ThrowOnError> {return (options.client ?? this.client).post<GetUnfurlBulkResponses, GetUnfurlBulkErrors, ThrowOnError>({url: '/unfurl/bulk',diff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 3108db3d08..b1fa10a8d2 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -31,7 +31,7 @@"webhook": "bun scripts/webhook.ts","validate-webhook": "bun scripts/validate-webhook.ts","coverage": "bun src/coverage/check.ts",- "generate": "openapi-ts",+ "generate": "bun scripts/generate.ts","build:js": "bun scripts/build.ts","build:types": "tsc -p tsconfig.build.json","build": "bun run build:js && bun run build:types",diff --git a/packages/sdk/scripts/generate.ts b/packages/sdk/scripts/generate.tsnew file mode 100644index 0000000000..99946d1f32--- /dev/null+++ b/packages/sdk/scripts/generate.ts@@ -0,0 +1,19 @@+import { createClient } from '@hey-api/openapi-ts';+import config from '../openapi-ts.config';++const clients = await createClient(await config);++if (clients.length === 0) {+ throw new Error('SDK generation failed: no clients were generated.');+}++// Keep generated blank lines consistent with repository whitespace checks.+for await (const path of new Bun.Glob('generated/**/*.ts').scan()) {+ const file = Bun.file(path);+ const content = await file.text();+ const normalized = content.replace(/^[\t ]+$/gm, '');++ if (normalized !== content) {+ await Bun.write(file, normalized);+ }+}diff --git a/packages/sdk/specs/notification.json b/packages/sdk/specs/notification.jsonindex dc855daaba..5536b23ac1 100644--- a/packages/sdk/specs/notification.json+++ b/packages/sdk/specs/notification.json@@ -242,6 +242,122 @@}}},+ "/unsubscribe/items": {+ "post": {+ "tags": ["unsubscribe::items"],+ "summary": "Atomically mute or snooze items for the authenticated user.",+ "operationId": "unsubscribe_items",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkSetItemsRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/EmptyResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ },+ "delete": {+ "tags": ["unsubscribe::items"],+ "summary": "Atomically resume delivery for the authenticated user's items.",+ "operationId": "remove_unsubscribe_items",+ "requestBody": {+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/BulkRemoveItemsRequest"+ }+ }+ },+ "required": true+ },+ "responses": {+ "200": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/EmptyResponse"+ }+ }+ }+ },+ "400": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "401": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ },+ "500": {+ "description": "",+ "content": {+ "application/json": {+ "schema": {+ "$ref": "#/components/schemas/ErrorResponse"+ }+ }+ }+ }+ }+ }+ },"/unsubscribe/mute": {"post": {"tags": ["unsubscribe::unsubscribe_all"],@@ -1294,6 +1410,47 @@}}},+ "BulkItem": {+ "type": "object",+ "required": ["item_type", "item_id"],+ "properties": {+ "item_id": {+ "type": "string"+ },+ "item_type": {+ "$ref": "#/components/schemas/EntityType"+ }+ }+ },+ "BulkRemoveItemsRequest": {+ "type": "object",+ "required": ["items"],+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/BulkItem"+ }+ }+ }+ },+ "BulkSetItemsRequest": {+ "type": "object",+ "required": ["items"],+ "properties": {+ "items": {+ "type": "array",+ "items": {+ "$ref": "#/components/schemas/BulkItem"+ }+ },+ "snoozed_until": {+ "type": ["string", "null"],+ "format": "date-time",+ "description": "A future resume time. Omit to mute indefinitely."+ }+ }+ },"CalendarEventJoinRequestMetadata": {"type": "object","description": "A channel member who sees a calendar event only through a channel share\nasked the person who shared it to add them as a guest. Sent to the sharer,\nwith the requester as sender.",diff --git a/packages/sdk/src/coverage/skipped.ts b/packages/sdk/src/coverage/skipped.tsindex 6fa5fbba64..a749d24b7e 100644--- a/packages/sdk/src/coverage/skipped.ts+++ b/packages/sdk/src/coverage/skipped.ts@@ -258,9 +258,11 @@ export const notificationExcluded = ['healthHandler','removeUnsubscribeAll','removeUnsubscribeItem',+ 'removeUnsubscribeItems','unsubscribeAll','unsubscribeEmail','unsubscribeItem',+ 'unsubscribeItems',] as const satisfies readonly (keyof NotificationSdk)[];export const notificationBacklog =diff --git a/services/notification_service/AGENTS.md b/services/notification_service/AGENTS.mdindex 01c6caf71f..b0068c10b3 100644--- a/services/notification_service/AGENTS.md+++ b/services/notification_service/AGENTS.md@@ -14,7 +14,7 @@ worker that sends email/mobile-push/websocket notifications.(`EmailAdapter`, `MobilePushAdapter`, `WebSocketGatewayAdapter`,`Kafka*RealtimePublisher`, `RedisRateLimitAdapter`) from `crates/notification`.- `src/api.rs` + `src/api/context.rs`: HTTP routes — `user_notification.rs`- (list/read), `unsubscribe.rs`, `health.rs`.+ (list/read), `unsubscribe.rs` (single and atomic bulk item mute/snooze), `health.rs`.- `src/model/notification.rs`: service-local request/response shapes.- Push payload schemas come from `notification::domain::models::apple`; keep thefrontend push validators generated from those same OpenAPI components.@@ -31,7 +31,7 @@ worker that sends email/mobile-push/websocket notifications.## Recipes- Add a notification HTTP route: `src/api/user_notification.rs` (or a new- module) → `src/api.rs` → `src/openapi.rs`.+ module) → `src/api.rs` → `src/api/swagger.rs`.- Add a new egress channel: implement the port in `crates/notification`(`outbound/`) → wire the adapter in `src/main.rs`.diff --git a/services/notification_service/src/api/swagger.rs b/services/notification_service/src/api/swagger.rsindex e0565c37ab..0535d4857d 100644--- a/services/notification_service/src/api/swagger.rs+++ b/services/notification_service/src/api/swagger.rs@@ -55,6 +55,8 @@ use crate::{/// /unsubscribeunsubscribe::get_unsubscribes::handler,unsubscribe::unsubscribe_item::handler,+ unsubscribe::items::unsubscribe_items,+ unsubscribe::items::remove_unsubscribe_items,unsubscribe::remove_unsubscribe_item::handler,unsubscribe::unsubscribe_email::handler,unsubscribe::remove_unsubscribe_all::handler,@@ -68,6 +70,9 @@ use crate::{CreateNotification,notification_crate::domain::models::device::DeviceRequest,UnsubscribeItemPathParams,+ unsubscribe::items::BulkItem,+ unsubscribe::items::BulkSetItemsRequest,+ unsubscribe::items::BulkRemoveItemsRequest,UserUnsubscribe,DeviceType,PushNotificationData,diff --git a/services/notification_service/src/api/unsubscribe.rs b/services/notification_service/src/api/unsubscribe.rsindex e720e7f01f..2cf73aa49a 100644--- a/services/notification_service/src/api/unsubscribe.rs+++ b/services/notification_service/src/api/unsubscribe.rs@@ -7,6 +7,7 @@ use tower::ServiceBuilder;use crate::api::context::ApiContext;pub(in crate::api) mod get_unsubscribes;+pub(in crate::api) mod items;pub(in crate::api) mod remove_unsubscribe_all;pub(in crate::api) mod remove_unsubscribe_item;pub(in crate::api) mod unsubscribe_all;@@ -16,6 +17,10 @@ pub(in crate::api) mod unsubscribe_item;pub fn router() -> Router<ApiContext> {Router::new().route("/email", get(unsubscribe_email::handler))+ .route(+ "/items",+ post(items::unsubscribe_items).delete(items::remove_unsubscribe_items),+ ).route("/", get(get_unsubscribes::handler)).route("/item/{item_type}/{item_id}",diff --git a/services/notification_service/src/api/unsubscribe/items.rs b/services/notification_service/src/api/unsubscribe/items.rsnew file mode 100644index 0000000000..3393b558f2--- /dev/null+++ b/services/notification_service/src/api/unsubscribe/items.rs@@ -0,0 +1,124 @@+//! Atomic changes to the authenticated user's item notification preferences.++use axum::{+ Json,+ extract::State,+ http::StatusCode,+ response::{IntoResponse, Response},+};+use macro_authorization::{MacroAuthorizationExtractor, UserOrInternal};+use model::response::{EmptyResponse, ErrorResponse};+use model_entity::EntityType;+use notification::domain::item_preferences::ItemNotificationPreferenceError;+use serde::Deserialize;+use utoipa::ToSchema;++use crate::api::context::{ApiContext, AuthorizationService};++#[derive(Deserialize, ToSchema)]+pub struct BulkItem {+ #[serde(deserialize_with = "super::unsubscribe_item::deserialize_item_type")]+ pub item_type: EntityType,+ pub item_id: String,+}++#[derive(Deserialize, ToSchema)]+pub struct BulkSetItemsRequest {+ pub items: Vec<BulkItem>,+ /// A future resume time. Omit to mute indefinitely.+ pub snoozed_until: Option<chrono::DateTime<chrono::Utc>>,+}++#[derive(Deserialize, ToSchema)]+pub struct BulkRemoveItemsRequest {+ pub items: Vec<BulkItem>,+}++fn error_response(error: ItemNotificationPreferenceError) -> Response {+ match error {+ ItemNotificationPreferenceError::Repository(error) => {+ tracing::error!(?error, "unable to update notification preferences");+ (+ StatusCode::INTERNAL_SERVER_ERROR,+ Json(ErrorResponse {+ message: "unable to update notification preferences".into(),+ }),+ )+ .into_response()+ }+ error => (+ StatusCode::BAD_REQUEST,+ Json(ErrorResponse {+ message: error.to_string().into(),+ }),+ )+ .into_response(),+ }+}++/// Atomically mute or snooze items for the authenticated user.+#[utoipa::path(+ post,+ operation_id = "unsubscribe_items",+ path = "/unsubscribe/items",+ request_body = BulkSetItemsRequest,+ responses(+ (status = 200, body = EmptyResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]+#[tracing::instrument(skip(ctx, user, request))]+pub async fn unsubscribe_items(+ State(ctx): State<ApiContext>,+ user: MacroAuthorizationExtractor<AuthorizationService, UserOrInternal>,+ Json(request): Json<BulkSetItemsRequest>,+) -> Result<Response, Response> {+ let entities = request+ .items+ .into_iter()+ .map(|item| item.item_type.with_entity_string(item.item_id))+ .collect();+ ctx.item_preferences+ .set_bulk(+ user.authorization.user.macro_user_id,+ entities,+ request.snoozed_until,+ chrono::Utc::now(),+ )+ .await+ .map_err(error_response)?;+ Ok((StatusCode::OK, Json(EmptyResponse {})).into_response())+}++/// Atomically resume delivery for the authenticated user's items.+#[utoipa::path(+ delete,+ operation_id = "remove_unsubscribe_items",+ path = "/unsubscribe/items",+ request_body = BulkRemoveItemsRequest,+ responses(+ (status = 200, body = EmptyResponse),+ (status = 400, body = ErrorResponse),+ (status = 401, body = ErrorResponse),+ (status = 500, body = ErrorResponse),+ )+)]+#[tracing::instrument(skip(ctx, user, request))]+pub async fn remove_unsubscribe_items(+ State(ctx): State<ApiContext>,+ user: MacroAuthorizationExtractor<AuthorizationService, UserOrInternal>,+ Json(request): Json<BulkRemoveItemsRequest>,+) -> Result<Response, Response> {+ let entities = request+ .items+ .into_iter()+ .map(|item| item.item_type.with_entity_string(item.item_id))+ .collect();+ ctx.item_preferences+ .remove_bulk(user.authorization.user.macro_user_id, entities)+ .await+ .map_err(error_response)?;+ Ok((StatusCode::OK, Json(EmptyResponse {})).into_response())+}diff --git a/services/notification_service/src/api/unsubscribe/unsubscribe_item.rs b/services/notification_service/src/api/unsubscribe/unsubscribe_item.rsindex d48ea4be04..15a026d1ea 100644--- a/services/notification_service/src/api/unsubscribe/unsubscribe_item.rs+++ b/services/notification_service/src/api/unsubscribe/unsubscribe_item.rs@@ -20,7 +20,7 @@ pub struct UnsubscribeItemPathParams {pub item_id: String,}-fn deserialize_item_type<'de, D: serde::Deserializer<'de>>(+pub(super) fn deserialize_item_type<'de, D: serde::Deserializer<'de>>(deserializer: D,) -> Result<EntityType, D::Error> {let value = String::deserialize(deserializer)?;