Skip to content

armgit / macro

Public Imported from GitHub
0

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

feat(home): build the Signal work feed on the server (#7821)

teoa654a19fe096
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index 04ba532df0..3bf7e1f83e 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -3546,6 +3546,7 @@
"crates/graphql_scheduled_action",
"crates/graphql_soup",
"crates/graphql_soup_filter_input",
+ "crates/graphql_work_feed",
"crates/harness_id",
"crates/harness_token",
"crates/initiative",
@@ -3629,6 +3630,7 @@
"crates/teams",
"crates/unfurl",
"crates/user_quota",
+ "crates/work_feed",
"crates/workspace-hack",
"services/scheduled_action"
],
@@ -4752,6 +4754,7 @@
"crates/graphql_scheduled_action",
"crates/graphql_soup",
"crates/graphql_soup_filter_input",
+ "crates/graphql_work_feed",
"crates/harness_id",
"crates/harness_token",
"crates/harnesses",
@@ -4865,6 +4868,7 @@
"crates/user_quota",
"crates/webhook",
"crates/webhook_signature",
+ "crates/work_feed",
"crates/workspace-hack",
"services/document_storage_service",
"services/scheduled_action"
@@ -7760,6 +7764,151 @@
"crates/remote_env_var",
"crates/workspace-hack"
],
+ "graphql_work_feed": [
+ "crates/activity",
+ "crates/agent",
+ "crates/agent_changes",
+ "crates/agent_runtime_protocol",
+ "crates/agent_session",
+ "crates/ai_billing",
+ "crates/ai_engine",
+ "crates/ai_toolset",
+ "crates/ai_usage",
+ "crates/analytics_client",
+ "crates/attachment",
+ "crates/authentication_service_client",
+ "crates/bot_id",
+ "crates/bot_token",
+ "crates/bots",
+ "crates/broadcast",
+ "crates/calendar_events",
+ "crates/call",
+ "crates/channel_sender",
+ "crates/channels",
+ "crates/chat",
+ "crates/comms_db_client",
+ "crates/connection",
+ "crates/connection_gateway_client",
+ "crates/connection_gateway_models",
+ "crates/contacts",
+ "crates/cowlike",
+ "crates/crm",
+ "crates/database_env_vars",
+ "crates/database_sql",
+ "crates/databases",
+ "crates/document_sub_type",
+ "crates/documents",
+ "crates/dynamodb_client",
+ "crates/email",
+ "crates/email_utils",
+ "crates/embedding",
+ "crates/entity_access",
+ "crates/entity_access_db_utils",
+ "crates/entity_access_management",
+ "crates/entity_mutation",
+ "crates/entity_registry/entity_registry",
+ "crates/entity_registry/entity_registry_db_utils",
+ "crates/entity_registry/shared_entity_registry",
+ "crates/favorites",
+ "crates/fig_engine",
+ "crates/filter_ast",
+ "crates/folds/agent_fold",
+ "crates/foreign_entity",
+ "crates/frecency",
+ "crates/genai_telemetry",
+ "crates/generic_email_domains",
+ "crates/git_patch",
+ "crates/github_pull_requests",
+ "crates/google_token",
+ "crates/graphql_common",
+ "crates/graphql_email",
+ "crates/graphql_notification",
+ "crates/graphql_permission",
+ "crates/graphql_soup",
+ "crates/graphql_soup_filter_input",
+ "crates/graphql_work_feed",
+ "crates/harness_id",
+ "crates/harness_token",
+ "crates/initiative",
+ "crates/invite_email",
+ "crates/ip_extractor",
+ "crates/item_filter_index",
+ "crates/item_filters",
+ "crates/kafka_util",
+ "crates/last_online_tracker",
+ "crates/lexical_client",
+ "crates/macro_auth",
+ "crates/macro_authorization",
+ "crates/macro_aws_config",
+ "crates/macro_db_client",
+ "crates/macro_entrypoint",
+ "crates/macro_env",
+ "crates/macro_env_var",
+ "crates/macro_event_broker",
+ "crates/macro_event_topics",
+ "crates/macro_service_urls",
+ "crates/macro_sha_count_client",
+ "crates/macro_sync_service_jwt",
+ "crates/macro_tower_layers",
+ "crates/macro_user_id",
+ "crates/macro_uuid",
+ "crates/maybe_send",
+ "crates/mention_utils",
+ "crates/messages",
+ "crates/model",
+ "crates/model-entity",
+ "crates/model-error-response",
+ "crates/model_file_type",
+ "crates/model_notifications",
+ "crates/model_owner",
+ "crates/model_user",
+ "crates/models_ai_projection",
+ "crates/models_bulk_upload",
+ "crates/models_databases",
+ "crates/models_dcs",
+ "crates/models_email",
+ "crates/models_entity_access_management",
+ "crates/models_grouping",
+ "crates/models_opensearch",
+ "crates/models_pagination",
+ "crates/models_permissions",
+ "crates/models_properties",
+ "crates/models_sfs",
+ "crates/models_soup",
+ "crates/models_team",
+ "crates/non_empty",
+ "crates/notification",
+ "crates/notification_state",
+ "crates/pptx_engine",
+ "crates/predicate_index",
+ "crates/projects",
+ "crates/prompt",
+ "crates/properties",
+ "crates/psd_engine",
+ "crates/rate_limit",
+ "crates/readonly_pool",
+ "crates/remote_env_var",
+ "crates/roles_and_permissions",
+ "crates/s3_key",
+ "crates/secretsmanager_client",
+ "crates/share_permission_db_utils",
+ "crates/soup",
+ "crates/soup_filter_projection",
+ "crates/soup_realtime",
+ "crates/sqs_client",
+ "crates/sqs_worker",
+ "crates/static_file_service_client",
+ "crates/sync_service",
+ "crates/sync_service_client",
+ "crates/system_properties",
+ "crates/system_skills",
+ "crates/task_dedup",
+ "crates/teams",
+ "crates/unfurl",
+ "crates/user_quota",
+ "crates/work_feed",
+ "crates/workspace-hack"
+ ],
"gtm_invite": [
"crates/bot_id",
"crates/bot_token",
@@ -13035,6 +13184,141 @@
"crates/webhook_signature",
"crates/workspace-hack"
],
+ "work_feed": [
+ "crates/activity",
+ "crates/agent",
+ "crates/agent_changes",
+ "crates/agent_runtime_protocol",
+ "crates/agent_session",
+ "crates/ai_billing",
+ "crates/ai_engine",
+ "crates/ai_toolset",
+ "crates/ai_usage",
+ "crates/analytics_client",
+ "crates/attachment",
+ "crates/authentication_service_client",
+ "crates/bot_id",
+ "crates/bot_token",
+ "crates/bots",
+ "crates/broadcast",
+ "crates/calendar_events",
+ "crates/call",
+ "crates/channel_sender",
+ "crates/channels",
+ "crates/chat",
+ "crates/comms_db_client",
+ "crates/connection",
+ "crates/connection_gateway_client",
+ "crates/connection_gateway_models",
+ "crates/contacts",
+ "crates/cowlike",
+ "crates/crm",
+ "crates/database_env_vars",
+ "crates/database_sql",
+ "crates/databases",
+ "crates/document_sub_type",
+ "crates/documents",
+ "crates/dynamodb_client",
+ "crates/email",
+ "crates/email_utils",
+ "crates/embedding",
+ "crates/entity_access",
+ "crates/entity_access_db_utils",
+ "crates/entity_access_management",
+ "crates/entity_mutation",
+ "crates/entity_registry/entity_registry",
+ "crates/entity_registry/entity_registry_db_utils",
+ "crates/entity_registry/shared_entity_registry",
+ "crates/favorites",
+ "crates/fig_engine",
+ "crates/filter_ast",
+ "crates/folds/agent_fold",
+ "crates/foreign_entity",
+ "crates/frecency",
+ "crates/genai_telemetry",
+ "crates/generic_email_domains",
+ "crates/git_patch",
+ "crates/github_pull_requests",
+ "crates/google_token",
+ "crates/harness_id",
+ "crates/harness_token",
+ "crates/initiative",
+ "crates/invite_email",
+ "crates/ip_extractor",
+ "crates/item_filters",
+ "crates/kafka_util",
+ "crates/last_online_tracker",
+ "crates/lexical_client",
+ "crates/macro_auth",
+ "crates/macro_authorization",
+ "crates/macro_aws_config",
+ "crates/macro_db_client",
+ "crates/macro_entrypoint",
+ "crates/macro_env",
+ "crates/macro_env_var",
+ "crates/macro_event_broker",
+ "crates/macro_event_topics",
+ "crates/macro_service_urls",
+ "crates/macro_sha_count_client",
+ "crates/macro_sync_service_jwt",
+ "crates/macro_tower_layers",
+ "crates/macro_user_id",
+ "crates/macro_uuid",
+ "crates/maybe_send",
+ "crates/mention_utils",
+ "crates/messages",
+ "crates/model",
+ "crates/model-entity",
+ "crates/model-error-response",
+ "crates/model_file_type",
+ "crates/model_notifications",
+ "crates/model_owner",
+ "crates/model_user",
+ "crates/models_ai_projection",
+ "crates/models_bulk_upload",
+ "crates/models_databases",
+ "crates/models_dcs",
+ "crates/models_email",
+ "crates/models_entity_access_management",
+ "crates/models_grouping",
+ "crates/models_opensearch",
+ "crates/models_pagination",
+ "crates/models_permissions",
+ "crates/models_properties",
+ "crates/models_sfs",
+ "crates/models_soup",
+ "crates/models_team",
+ "crates/non_empty",
+ "crates/notification",
+ "crates/notification_state",
+ "crates/pptx_engine",
+ "crates/projects",
+ "crates/prompt",
+ "crates/properties",
+ "crates/psd_engine",
+ "crates/rate_limit",
+ "crates/readonly_pool",
+ "crates/remote_env_var",
+ "crates/roles_and_permissions",
+ "crates/s3_key",
+ "crates/secretsmanager_client",
+ "crates/share_permission_db_utils",
+ "crates/soup",
+ "crates/soup_realtime",
+ "crates/sqs_client",
+ "crates/sqs_worker",
+ "crates/static_file_service_client",
+ "crates/sync_service",
+ "crates/sync_service_client",
+ "crates/system_properties",
+ "crates/system_skills",
+ "crates/task_dedup",
+ "crates/teams",
+ "crates/unfurl",
+ "crates/user_quota",
+ "crates/work_feed",
+ "crates/workspace-hack"
+ ],
"worker-rs-otel": [
"crates/worker-rs-otel"
],
diff --git a/Cargo.lock b/Cargo.lock
index acff885bf0..c75f273101 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4491,6 +4491,7 @@ dependencies = [
"graphql_properties",
"graphql_scheduled_action",
"graphql_soup",
+ "graphql_work_feed",
"macro_authorization",
"macro_user_id",
"model-entity",
@@ -4512,6 +4513,7 @@ dependencies = [
"tokio",
"tracing",
"uuid",
+ "work_feed",
"workspace-hack",
]
@@ -6358,6 +6360,7 @@ dependencies = [
"utoipa-swagger-ui",
"uuid",
"webhook",
+ "work_feed",
"workspace-hack",
"zip 2.4.2",
]
@@ -8827,6 +8830,32 @@ dependencies = [
"uuid",
]
+[[package]]
+name = "graphql_work_feed"
+version = "0.1.0"
+dependencies = [
+ "async-graphql",
+ "async-stream",
+ "chrono",
+ "entity_access",
+ "futures",
+ "graphql_common",
+ "graphql_notification",
+ "graphql_soup",
+ "macro_user_id",
+ "model-entity",
+ "model_notifications",
+ "notification",
+ "rootcause",
+ "serde_json",
+ "soup",
+ "tokio",
+ "tracing",
+ "uuid",
+ "work_feed",
+ "workspace-hack",
+]
+
[[package]]
name = "group"
version = "0.13.0"
@@ -21474,6 +21503,37 @@ dependencies = [
"primefield",
]
+[[package]]
+name = "work_feed"
+version = "0.1.0"
+dependencies = [
+ "activity",
+ "base64 0.22.1",
+ "chrono",
+ "cowlike",
+ "document_sub_type",
+ "email",
+ "entity_access",
+ "filter_ast",
+ "futures",
+ "item_filters",
+ "macro_user_id",
+ "model-entity",
+ "model_notifications",
+ "models_soup",
+ "notification",
+ "rootcause",
+ "serde",
+ "serde_json",
+ "soup",
+ "soup_realtime",
+ "thiserror 2.0.18",
+ "tokio",
+ "tracing",
+ "uuid",
+ "workspace-hack",
+]
+
[[package]]
name = "worker"
version = "0.8.1"
diff --git a/Cargo.toml b/Cargo.toml
index 1cdf6c0e55..91bd98e84d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -71,6 +71,7 @@ members = [
"crates/graphql_scheduled_action",
"crates/graphql_soup",
"crates/graphql_soup_filter_input",
+ "crates/graphql_work_feed",
"crates/gtm_invite",
"crates/harness_id",
"crates/harness_token",
@@ -116,6 +117,7 @@ members = [
"crates/unfurl",
"crates/user_api_key",
"crates/webhook_signature",
+ "crates/work_feed",
"crates/worker-rs-otel",
"crates/workspace-hack",
"services/agent_harness_service",
diff --git a/apps/web/src/features/home/components/HomeList.tsx b/apps/web/src/features/home/components/HomeList.tsx
index 23ef207885..4f23a1a661 100644
--- a/apps/web/src/features/home/components/HomeList.tsx
+++ b/apps/web/src/features/home/components/HomeList.tsx
@@ -138,7 +138,9 @@ export function HomeList(props: HomeListProps) {
});
});
- const { buildActionGroups } = createSoupEntityActions();
+ const { buildActionGroups } = createSoupEntityActions({
+ markDoneDelegate: source.markDoneDelegate,
+ });
const entityActionViewContext = () =>
resolveEntityActionViewContext({
activeListView: panel.handle.content().id,
@@ -380,6 +382,7 @@ export function HomeList(props: HomeListProps) {
splitHandle: panel.handle,
createActionNavigationHandler,
condition: panel.isPanelActive,
+ markDoneDelegate: source.markDoneDelegate,
});
function actionGroupsFor(row: HomeActionRow) {
@@ -627,6 +630,7 @@ export function HomeList(props: HomeListProps) {
list={actionState}
selectedEntities={selectedEntities}
viewContext={entityActionViewContext()}
+ markDoneDelegate={source.markDoneDelegate}
onOpenChange={(open) => {
if (!open) return;
focusActionRow({
diff --git a/apps/web/src/features/home/queries/home-admission.ts b/apps/web/src/features/home/queries/home-admission.ts
new file mode 100644
index 0000000000..5a7394b63b
--- /dev/null
+++ b/apps/web/src/features/home/queries/home-admission.ts
@@ -0,0 +1,62 @@
+import { testFacets } from '@app/features/soup';
+import type { FacetSelection } from '@app/features/soup/filters/facets/types';
+import type { EntityData, WithNotification } from '@entity';
+import { HOME_FACETS, type HomeFacetContext } from '../home-facets';
+
+/** Rows a Home list shows under its facets, and which rows the read facet
+ * has admitted in the current admission scope. */
+export type HomeAdmission = {
+ readScope: string;
+ admittedIds: Set<string>;
+ items: WithNotification<EntityData>[];
+};
+
+export const emptyHomeAdmission = (): HomeAdmission => ({
+ readScope: '',
+ admittedIds: new Set<string>(),
+ items: [],
+});
+
+/**
+ * Apply Home's facets. Rows stay admitted after they transition from unread
+ * to read, so opening a row under the Unread filter does not yank it away;
+ * changing the tab or read filter starts a new admission scope.
+ */
+export function admitHomeEntities(
+ previous: HomeAdmission,
+ input: {
+ entities: WithNotification<EntityData>[];
+ tab: string;
+ facets: FacetSelection;
+ facetContext: HomeFacetContext;
+ }
+): HomeAdmission {
+ const activeReadFacets = input.facets.read ?? [];
+ const readScope = `${input.tab}:${activeReadFacets.join(',')}`;
+ const admittedIds =
+ previous.readScope === readScope
+ ? new Set(previous.admittedIds)
+ : new Set<string>();
+
+ if (activeReadFacets.length === 0) {
+ for (const entity of input.entities) admittedIds.add(entity.id);
+ } else {
+ const readSelection = { read: activeReadFacets };
+ for (const entity of input.entities) {
+ if (testFacets(readSelection, HOME_FACETS, entity, input.facetContext)) {
+ admittedIds.add(entity.id);
+ }
+ }
+ }
+
+ const selection = { ...input.facets, read: [] };
+ return {
+ readScope,
+ admittedIds,
+ items: input.entities.filter(
+ (entity) =>
+ admittedIds.has(entity.id) &&
+ testFacets(selection, HOME_FACETS, entity, input.facetContext)
+ ),
+ };
+}
diff --git a/apps/web/src/features/home/queries/use-home-query.test.ts b/apps/web/src/features/home/queries/use-home-query.test.ts
index 69f133a737..4fc489a320 100644
--- a/apps/web/src/features/home/queries/use-home-query.test.ts
+++ b/apps/web/src/features/home/queries/use-home-query.test.ts
@@ -30,8 +30,40 @@ vi.mock('@entity', async () => ({
...(await import('@entity/utils/company-properties')),
}));
vi.mock('@notifications', async () => await import('@notifications/types'));
+const flags = vi.hoisted(() => ({ graphqlSoup: false }));
vi.mock('@app/lib/analytics/posthog', () => ({
- useFeatureFlag: () => () => ({ enabled: true }),
+ useFeatureFlag: (flag: { key: string }) => () => ({
+ enabled: flag.key === 'enable-graphql-soup' ? flags.graphqlSoup : true,
+ }),
+}));
+const workFeedSource = vi.hoisted(() => ({
+ enabled: undefined as (() => boolean) | undefined,
+ items: () => [] as unknown[],
+ delegate: { canComplete: () => undefined, prepare: () => undefined },
+}));
+vi.mock('../work-feed/home-work-feed', () => ({
+ useWorkFeedHomeDataSource: (
+ _state: unknown,
+ options: { enabled: () => boolean }
+ ) => {
+ workFeedSource.enabled = options.enabled;
+ return {
+ items: () => workFeedSource.items(),
+ isLoading: () => false,
+ isFetching: () => false,
+ isLoadingMore: () => false,
+ hasMore: () => false,
+ error: () => undefined,
+ warning: () => undefined,
+ loadMore: async () => {},
+ refresh: async () => {},
+ markDoneDelegate: () => workFeedSource.delegate,
+ };
+ },
+}));
+const touch = vi.hoisted(() => ({ device: false }));
+vi.mock('@core/mobile/isTouchDevice', () => ({
+ isTouchDevice: () => touch.device,
}));
vi.mock('@components/app/GlobalAppState', () => ({
useGlobalNotificationSource: () => ({ notificationsByEntity: () => ({}) }),
@@ -147,6 +179,8 @@ describe('Home data source', () => {
beforeEach(() => {
vi.clearAllMocks();
vi.setSystemTime(new Date(2026, 8, 10, 12));
+ flags.graphqlSoup = false;
+ touch.device = false;
});
afterEach(() => {
dispose?.();
@@ -474,3 +508,57 @@ describe('Home data source', () => {
expect(ids(source)).toEqual(['agent']);
});
});
+
+describe('Home work feed', () => {
+ beforeEach(() => {
+ vi.clearAllMocks();
+ vi.setSystemTime(new Date(2026, 8, 10, 12));
+ flags.graphqlSoup = true;
+ touch.device = false;
+ workFeedSource.items = () => [
+ {
+ kind: 'entity',
+ id: 'work-feed-row',
+ entity: { type: 'document', id: 'from-work-feed' },
+ },
+ ];
+ });
+ afterEach(() => {
+ dispose?.();
+ vi.useRealTimers();
+ });
+
+ it('reads desktop Signal from the work feed and delegates done to it', () => {
+ const notifications = makeQuery([email('from-soup', 9)], false);
+ const activity = makeQuery([], false);
+ const { source } = mount(notifications, activity);
+
+ expect(workFeedSource.enabled?.()).toBe(true);
+ expect(ids(source)).toEqual(['from-work-feed']);
+ expect(source.markDoneDelegate()).toBe(workFeedSource.delegate);
+ });
+
+ it('keeps Noise and search on the Soup sources', () => {
+ const notifications = makeQuery([email('from-soup', 9)], false);
+ const activity = makeQuery([], false);
+ const { source, setState } = mount(notifications, activity);
+
+ setState('tab', 'noise');
+ expect(workFeedSource.enabled?.()).toBe(false);
+ expect(source.markDoneDelegate()).toBeUndefined();
+
+ setState('tab', 'signal');
+ setState('search', 'plan');
+ expect(workFeedSource.enabled?.()).toBe(false);
+ });
+
+ it('keeps touch devices on the notification feed', () => {
+ touch.device = true;
+ const notifications = makeQuery([email('from-soup', 9)], false);
+ const activity = makeQuery([], false);
+ const { source } = mount(notifications, activity);
+
+ expect(workFeedSource.enabled?.()).toBe(false);
+ expect(ids(source)).toEqual(['from-soup']);
+ });
+});
diff --git a/apps/web/src/features/home/queries/use-home-query.ts b/apps/web/src/features/home/queries/use-home-query.ts
index 9dab531986..b8e704d2a2 100644
--- a/apps/web/src/features/home/queries/use-home-query.ts
+++ b/apps/web/src/features/home/queries/use-home-query.ts
@@ -1,11 +1,11 @@
import type { ListDataSource } from '@app/components/list';
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
import {
buildFlatSoupRows,
buildGroupedSoupRows,
createSearchState,
createSoupRowStore,
type SoupRow,
- testFacets,
useSearchContext,
} from '@app/features/soup';
import {
@@ -16,6 +16,7 @@ import { useFeatureFlag } from '@app/lib/analytics/posthog';
import { useGlobalNotificationSource } from '@components/app/GlobalAppState';
import {
enableCalendarUi,
+ enableGraphqlSoup,
enableInboxNotifiedSort,
enableSnippets,
enableSupportedSoupForeignEntities,
@@ -35,14 +36,26 @@ import {
useSoupAstItemsQuery,
} from '@queries/soup/items';
import { startOfDay, subWeeks } from 'date-fns';
-import { createMemo, createSignal, onCleanup, onMount } from 'solid-js';
+import {
+ type Accessor,
+ createMemo,
+ createSignal,
+ onCleanup,
+ onMount,
+} from 'solid-js';
import { match } from 'ts-pattern';
import {
noiseFilter,
signalFilter,
} from '../../next-soup/filters/inbox-filters';
-import { HOME_FACETS, type HomeFacetContext } from '../home-facets';
+import type { HomeFacetContext } from '../home-facets';
import type { HomeTab, HomeViewState } from '../types';
+import { useWorkFeedHomeDataSource } from '../work-feed/home-work-feed';
+import {
+ admitHomeEntities,
+ emptyHomeAdmission,
+ type HomeAdmission,
+} from './home-admission';
import { homeClock, homeTimestamp } from './home-date-buckets';
import { soupItemMatchesHomeTab } from './home-item-filter';
import { getHomePagination } from './home-pagination';
@@ -120,7 +133,8 @@ function homeTabInsertFilter(tab: HomeTab): SoupApiItemFilter {
/** Shared feed membership for the Home list and its sidebar unread indicator. */
export function useHomeEntitiesQuery(
- state: Pick<HomeDataSourceInput, 'tab' | 'facets'>
+ state: Pick<HomeDataSourceInput, 'tab' | 'facets'>,
+ options: { enabled?: () => boolean } = {}
) {
const notificationSource = useGlobalNotificationSource();
const userId = useUserId();
@@ -155,7 +169,7 @@ export function useHomeEntitiesQuery(
// tab's cached query keeps gating cache inserts by its own membership.
const tab = viewContext().tab;
return {
- enabled: true,
+ enabled: options.enabled?.() ?? true,
showSupportedForeignEntities: foreignEntities().enabled,
meta: {
insertFilter: homeTabInsertFilter(tab),
@@ -208,14 +222,59 @@ export function useHomeEntitiesQuery(
};
}
-export function useHomeDataSource(state: HomeDataSourceInput): HomeDataSource {
+export type HomeListDataSource = HomeDataSource & {
+ /** Set when Home's rows complete as work feed items. */
+ markDoneDelegate: Accessor<MarkDoneDelegate | undefined>;
+};
+
+/**
+ * Home's list. Desktop Signal reads the server work feed wherever GraphQL
+ * Soup is on, since the feed's live changes ride its websocket and cache;
+ * every other view (Noise, touch devices, search) merges Soup, notification
+ * and recent-activity sources on the client.
+ */
+export function useHomeDataSource(
+ state: HomeDataSourceInput
+): HomeListDataSource {
+ const graphqlSoup = useFeatureFlag(enableGraphqlSoup);
+ const usesWorkFeed = () =>
+ graphqlSoup().enabled &&
+ state.tab === 'signal' &&
+ !isTouchDevice() &&
+ !state.search.trim();
+
+ const soup = useSoupHomeDataSource(state, {
+ enabled: () => !usesWorkFeed(),
+ });
+ const workFeed = useWorkFeedHomeDataSource(state, { enabled: usesWorkFeed });
+ const active = (): HomeDataSource => (usesWorkFeed() ? workFeed : soup);
+
+ return {
+ items: () => active().items(),
+ isLoading: () => active().isLoading(),
+ isFetching: () => active().isFetching(),
+ error: () => active().error(),
+ warning: () => active().warning(),
+ hasMore: () => active().hasMore(),
+ isLoadingMore: () => active().isLoadingMore(),
+ loadMore: () => active().loadMore(),
+ refresh: () => active().refresh(),
+ markDoneDelegate: () =>
+ usesWorkFeed() ? workFeed.markDoneDelegate() : undefined,
+ };
+}
+
+function useSoupHomeDataSource(
+ state: HomeDataSourceInput,
+ options: { enabled: () => boolean }
+): HomeDataSource {
const {
query,
viewContext,
filterEntities,
attachNotifications,
transformEntities,
- } = useHomeEntitiesQuery(state);
+ } = useHomeEntitiesQuery(state, options);
const [now, setNow] = createSignal(homeClock());
onMount(() => {
@@ -226,7 +285,8 @@ export function useHomeDataSource(state: HomeDataSourceInput): HomeDataSource {
// Only desktop Home merges the viewer's own recents into Signal; touch
// devices keep Signal a pure notification feed, like the legacy
// Notifications view.
- const mergeRecents = () => state.tab === 'signal' && !isTouchDevice();
+ const mergeRecents = () =>
+ options.enabled() && state.tab === 'signal' && !isTouchDevice();
// Activity's hydrated own-touch projection includes sent mail and chats even
// when they have no outstanding notifications. Its endpoint rejects email
@@ -316,58 +376,23 @@ export function useHomeDataSource(state: HomeDataSourceInput): HomeDataSource {
);
});
- // Keep rows admitted after they transition from unread to read. Changing the
- // tab or read filter starts a new admission scope.
- const entities = createMemo<{
- readScope: string;
- admittedIds: Set<string>;
- items: WithNotification<EntityData>[];
- }>(
- (previous) => {
- const context = viewContext();
- const transformed = transformHomeEntities(
+ const entities = createMemo<HomeAdmission>((previous) => {
+ const context = viewContext();
+ const cutoff = homePagination()?.cutoff ?? -Infinity;
+ return admitHomeEntities(previous, {
+ entities: transformHomeEntities(
rawEntities(),
search.isSearching() ? rawEntities() : recentEntities()
- ).filter((entity) => {
- const cutoff = homePagination()?.cutoff ?? -Infinity;
- return (
+ ).filter(
+ (entity) =>
cutoff === -Infinity ||
(homeTimestamp(entity.sortTs) ?? -Infinity) > cutoff
- );
- });
- const activeReadFacets = context.facets.read ?? [];
- const readScope = `${context.tab}:${activeReadFacets.join(',')}`;
- const admittedIds =
- previous.readScope === readScope
- ? new Set(previous.admittedIds)
- : new Set<string>();
-
- if (activeReadFacets.length === 0) {
- for (const entity of transformed) admittedIds.add(entity.id);
- } else {
- const readSelection = { read: activeReadFacets };
- for (const entity of transformed) {
- if (
- testFacets(readSelection, HOME_FACETS, entity, context.facetContext)
- ) {
- admittedIds.add(entity.id);
- }
- }
- }
-
- const selection = { ...context.facets, read: [] };
- return {
- readScope,
- admittedIds,
- items: transformed.filter(
- (entity) =>
- admittedIds.has(entity.id) &&
- testFacets(selection, HOME_FACETS, entity, context.facetContext)
- ),
- };
- },
- { readScope: '', admittedIds: new Set<string>(), items: [] }
- );
+ ),
+ tab: context.tab,
+ facets: context.facets,
+ facetContext: context.facetContext,
+ });
+ }, emptyHomeAdmission());
const usesServiceSearch = search.usesServiceSearch;
const hasNoTypes = () =>
diff --git a/apps/web/src/features/home/work-feed/core/work-feed.test.ts b/apps/web/src/features/home/work-feed/core/work-feed.test.ts
new file mode 100644
index 0000000000..e972ef4c85
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/core/work-feed.test.ts
@@ -0,0 +1,61 @@
+import { describe, expect, it } from 'vitest';
+import {
+ markWorkFeedDone,
+ settleWorkFeedDone,
+ unmarkWorkFeedDone,
+ type WorkFeedEntry,
+ withoutDoneWorkFeedEntries,
+} from './work-feed';
+
+function entry(
+ itemId: string,
+ sortAt: number,
+ revision = `rev-${itemId}`
+): WorkFeedEntry {
+ return {
+ itemId,
+ revision,
+ sortAt,
+ state: 'unseen',
+ primaryReason: 'attention',
+ hasAttention: true,
+ hasOwnWork: false,
+ entity: { type: 'document', id: itemId } as WorkFeedEntry['entity'],
+ };
+}
+
+const ids = (entries: WorkFeedEntry[]) => entries.map((e) => e.itemId);
+
+describe('work feed done', () => {
+ it('hides an item while the feed shows the acknowledged revision', () => {
+ const done = markWorkFeedDone(new Map(), [
+ { itemId: 'a', revision: 'rev-a' },
+ ]);
+ expect(ids(withoutDoneWorkFeedEntries([entry('a', 5)], done))).toEqual([]);
+ // A reason that arrived after the done brings it back.
+ expect(
+ ids(withoutDoneWorkFeedEntries([entry('a', 6, 'rev-a-2')], done))
+ ).toEqual(['a']);
+ expect(
+ ids(
+ withoutDoneWorkFeedEntries(
+ [entry('a', 5)],
+ unmarkWorkFeedDone(done, ['a'])
+ )
+ )
+ ).toEqual(['a']);
+ });
+
+ it('forgets items a fresh read settled', () => {
+ const done = markWorkFeedDone(new Map(), [
+ { itemId: 'gone', revision: 'rev-gone' },
+ { itemId: 'newer', revision: 'rev-newer' },
+ { itemId: 'pending', revision: 'rev-pending' },
+ ]);
+ const settled = settleWorkFeedDone(done, [
+ entry('newer', 9, 'rev-newer-2'),
+ entry('pending', 4),
+ ]);
+ expect([...settled.keys()]).toEqual(['pending']);
+ });
+});
diff --git a/apps/web/src/features/home/work-feed/core/work-feed.ts b/apps/web/src/features/home/work-feed/core/work-feed.ts
new file mode 100644
index 0000000000..d1b00c1a5c
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/core/work-feed.ts
@@ -0,0 +1,109 @@
+import type { EntityWithRawNotifications } from '@app/features/soup/entity-notifications';
+import type { DateValue } from '@core/util/date';
+import type { EntityData } from '@entity';
+
+/** Which reasons admit items to a work feed. */
+export type WorkFeedMode = 'work' | 'attention';
+
+/** Item kinds a work feed can be narrowed to. */
+export type WorkFeedItemType =
+ | 'document'
+ | 'chat'
+ | 'project'
+ | 'email'
+ | 'channel'
+ | 'channel_thread'
+ | 'calendar_event'
+ | 'pull_request'
+ | 'agent_session';
+
+/** Which items one feed shows. Pages, live updates and undo share it. */
+export type WorkFeedScope = {
+ mode: WorkFeedMode;
+ /** Empty means every kind. */
+ types: WorkFeedItemType[];
+ includeSnippets: boolean;
+};
+
+export type WorkFeedItemState = 'unseen' | 'seen' | 'done';
+
+/** One item placed in a feed, decoded into the app's entity vocabulary. */
+export type WorkFeedEntry = {
+ /** Stable per-viewer item id: `<entity type>:<entity id>`. */
+ itemId: string;
+ /** Opaque token of the reasons this entry shows; done acknowledges it. */
+ revision: string;
+ /** Feed placement, epoch milliseconds. */
+ sortAt: number;
+ state: WorkFeedItemState;
+ primaryReason: 'own_work' | 'attention';
+ /** The item has outstanding notifications, which done acknowledges. */
+ hasAttention: boolean;
+ /** The viewer worked on the item; done leaves that reason in place. */
+ hasOwnWork: boolean;
+ /**
+ * The row entity with the item's scoped notifications attached raw, so
+ * readers apply local seen/done overrides the way Home rows always have.
+ */
+ entity: EntityWithRawNotifications<EntityData> & {
+ notificationDisplayCutoff?: DateValue | null;
+ };
+};
+
+/**
+ * Items the viewer marked done, with the revision they acknowledged. They
+ * stay hidden while a loaded entry still shows that revision, until the
+ * live change that removes them lands; a newer reason shows them again.
+ */
+export type WorkFeedDone = ReadonlyMap<string, string>;
+
+/** The loaded entries without the ones hidden as done. */
+export function withoutDoneWorkFeedEntries(
+ entries: readonly WorkFeedEntry[],
+ done: WorkFeedDone
+): WorkFeedEntry[] {
+ return entries.filter((entry) => done.get(entry.itemId) !== entry.revision);
+}
+
+/** Hide items as done at the revision each acknowledged. */
+export function markWorkFeedDone(
+ done: WorkFeedDone,
+ items: readonly { itemId: string; revision: string }[]
+): WorkFeedDone {
+ const next = new Map(done);
+ for (const item of items) next.set(item.itemId, item.revision);
+ return next;
+}
+
+/** Show items again after an undone or failed done. */
+export function unmarkWorkFeedDone(
+ done: WorkFeedDone,
+ itemIds: readonly string[]
+): WorkFeedDone {
+ const next = new Map(done);
+ for (const itemId of itemIds) next.delete(itemId);
+ return next;
+}
+
+/**
+ * Forget done items a fresh read settled: the feed no longer holds them, or
+ * holds them with newer reasons. Only items still shown at the acknowledged
+ * revision stay hidden.
+ */
+export function settleWorkFeedDone(
+ done: WorkFeedDone,
+ entries: readonly WorkFeedEntry[]
+): WorkFeedDone {
+ if (done.size === 0) return done;
+ const next = new Map<string, string>();
+ for (const entry of entries) {
+ if (done.get(entry.itemId) === entry.revision) {
+ next.set(entry.itemId, entry.revision);
+ }
+ }
+ return next;
+}
+
+/** The key Home rows and actions use to find an entity's work feed item. */
+export const workFeedEntityKey = (entity: Pick<EntityData, 'type' | 'id'>) =>
+ `${entity.type}:${entity.id}`;
diff --git a/apps/web/src/features/home/work-feed/home-scope.test.ts b/apps/web/src/features/home/work-feed/home-scope.test.ts
new file mode 100644
index 0000000000..724b4a171d
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/home-scope.test.ts
@@ -0,0 +1,39 @@
+import { describe, expect, it } from 'vitest';
+import { homeWorkFeedScope } from './home-scope';
+
+const everything = { calendar: true, foreignEntities: true, snippets: false };
+
+describe('homeWorkFeedScope', () => {
+ it('asks for every kind when no type filter is selected', () => {
+ expect(homeWorkFeedScope(undefined, everything)).toEqual({
+ mode: 'work',
+ types: [],
+ includeSnippets: false,
+ });
+ });
+
+ it('leaves out kinds this client cannot show', () => {
+ const scope = homeWorkFeedScope([], {
+ calendar: false,
+ foreignEntities: false,
+ snippets: true,
+ });
+ expect(scope?.types).not.toContain('calendar_event');
+ expect(scope?.types).not.toContain('pull_request');
+ expect(scope?.types).toContain('channel_thread');
+ expect(scope?.includeSnippets).toBe(true);
+ });
+
+ it('maps type filters to item kinds', () => {
+ expect(homeWorkFeedScope(['tasks', 'channels'], everything)?.types).toEqual(
+ ['document', 'channel', 'channel_thread']
+ );
+ });
+
+ it('has no scope when the filters leave nothing to show', () => {
+ expect(homeWorkFeedScope(['none'], everything)).toBeUndefined();
+ expect(
+ homeWorkFeedScope(['calendar'], { ...everything, calendar: false })
+ ).toBeUndefined();
+ });
+});
diff --git a/apps/web/src/features/home/work-feed/home-scope.ts b/apps/web/src/features/home/work-feed/home-scope.ts
new file mode 100644
index 0000000000..3a6ed684a3
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/home-scope.ts
@@ -0,0 +1,66 @@
+import type { HomeTypeFilter } from '../types';
+import type { WorkFeedItemType, WorkFeedScope } from './core/work-feed';
+
+/** Item kinds each Home type filter selects. Documents and tasks share the
+ * document kind; the client-side facet tells them apart. */
+const ITEM_TYPES: Record<HomeTypeFilter, WorkFeedItemType[]> = {
+ documents: ['document'],
+ tasks: ['document'],
+ email: ['email'],
+ channels: ['channel', 'channel_thread'],
+ chats: ['chat'],
+ agents: ['agent_session'],
+ projects: ['project'],
+ github: ['pull_request'],
+ calendar: ['calendar_event'],
+};
+
+const ALL_ITEM_TYPES: WorkFeedItemType[] = [
+ 'document',
+ 'chat',
+ 'project',
+ 'email',
+ 'channel',
+ 'channel_thread',
+ 'calendar_event',
+ 'pull_request',
+ 'agent_session',
+];
+
+export type HomeWorkFeedCapabilities = {
+ calendar: boolean;
+ foreignEntities: boolean;
+ snippets: boolean;
+};
+
+const isHomeTypeFilter = (value: string): value is HomeTypeFilter =>
+ value in ITEM_TYPES;
+
+/**
+ * The work feed scope for desktop Home Signal: outstanding attention plus
+ * recent own work, narrowed by the selected type filters and the kinds this
+ * client can show. Returns `undefined` when nothing can match.
+ */
+export function homeWorkFeedScope(
+ typeFilters: readonly string[] | undefined,
+ capabilities: HomeWorkFeedCapabilities
+): WorkFeedScope | undefined {
+ const selected = (typeFilters ?? []).filter(isHomeTypeFilter);
+ if ((typeFilters?.length ?? 0) > 0 && selected.length === 0) return undefined;
+ const requested =
+ selected.length === 0
+ ? ALL_ITEM_TYPES
+ : selected.flatMap((t) => ITEM_TYPES[t]);
+ const types = [...new Set(requested)].filter(
+ (type) =>
+ (type !== 'calendar_event' || capabilities.calendar) &&
+ (type !== 'pull_request' || capabilities.foreignEntities)
+ );
+ if (types.length === 0) return undefined;
+ return {
+ mode: 'work',
+ // Every kind is the server's default; send the narrowed list only.
+ types: types.length === ALL_ITEM_TYPES.length ? [] : types,
+ includeSnippets: capabilities.snippets,
+ };
+}
diff --git a/apps/web/src/features/home/work-feed/home-work-feed.ts b/apps/web/src/features/home/work-feed/home-work-feed.ts
new file mode 100644
index 0000000000..11c908a946
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/home-work-feed.ts
@@ -0,0 +1,153 @@
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
+import {
+ buildFlatSoupRows,
+ buildGroupedSoupRows,
+ createSoupRowStore,
+} from '@app/features/soup';
+import { withEntityNotifications } from '@app/features/soup/entity-notifications';
+import { useFeatureFlag } from '@app/lib/analytics/posthog';
+import { useGlobalNotificationSource } from '@components/app/GlobalAppState';
+import {
+ enableCalendarUi,
+ enableSnippets,
+ enableSupportedSoupForeignEntities,
+ isFeatureEnabled,
+} from '@core/constant/featureFlags';
+import { revalidateNotificationReaders } from '@queries/notification/revalidation';
+import {
+ getGraphqlCacheHost,
+ getGraphqlSoupClient,
+ subscribeGraphqlSoupReconnected,
+} from '@service-storage/graphql-soup';
+import {
+ type Accessor,
+ createMemo,
+ createSignal,
+ onCleanup,
+ onMount,
+} from 'solid-js';
+import type { HomeFacetContext } from '../home-facets';
+import {
+ admitHomeEntities,
+ emptyHomeAdmission,
+ type HomeAdmission,
+} from '../queries/home-admission';
+import { homeClock } from '../queries/home-date-buckets';
+import { groupHomeEntitiesByDate } from '../queries/home-results';
+import type {
+ HomeDataSource,
+ HomeDataSourceItem,
+} from '../queries/use-home-query';
+import type { HomeViewState } from '../types';
+import type { WorkFeedScope } from './core/work-feed';
+import { homeWorkFeedScope } from './home-scope';
+import { createWorkFeed } from './primitives/work-feed';
+
+/** Scope sent when the type filters leave nothing to show; never fetched. */
+const EMPTY_SCOPE: WorkFeedScope = {
+ mode: 'work',
+ types: [],
+ includeSnippets: false,
+};
+
+export type WorkFeedHomeDataSource = HomeDataSource & {
+ /** Completes Home rows as work feed items. */
+ markDoneDelegate: Accessor<MarkDoneDelegate | undefined>;
+};
+
+/**
+ * Desktop Home Signal backed by the server work feed: one cursor over
+ * attention and own work, server-stacked notifications, live changes
+ * written into the cached pages, and item-level done. Facets narrow server-side by type; the read
+ * filter keeps Home's admission behavior client-side.
+ */
+export function useWorkFeedHomeDataSource(
+ state: Pick<HomeViewState, 'tab' | 'groupBy' | 'facets'>,
+ options: { enabled: Accessor<boolean> }
+): WorkFeedHomeDataSource {
+ const notificationSource = useGlobalNotificationSource();
+ const foreignEntities = useFeatureFlag(enableSupportedSoupForeignEntities);
+
+ const scope = createMemo(() =>
+ homeWorkFeedScope(state.facets.type, {
+ calendar: isFeatureEnabled(enableCalendarUi),
+ foreignEntities: foreignEntities().enabled,
+ snippets: isFeatureEnabled(enableSnippets),
+ })
+ );
+ const hasScope = () => scope() !== undefined;
+ const enabled = () => options.enabled() && hasScope();
+
+ const feed = createWorkFeed({
+ client: () => getGraphqlSoupClient(),
+ cacheHost: getGraphqlCacheHost,
+ scope: () => scope() ?? EMPTY_SCOPE,
+ enabled,
+ onReconnected: subscribeGraphqlSoupReconnected,
+ revalidateNotifications: revalidateNotificationReaders,
+ });
+
+ const [now, setNow] = createSignal(homeClock());
+ onMount(() => {
+ const timer = setInterval(() => setNow(homeClock()), 30_000);
+ onCleanup(() => clearInterval(timer));
+ });
+
+ const facetContext = (): HomeFacetContext => ({ notificationSource });
+ const entities = createMemo<HomeAdmission>(
+ (previous) =>
+ admitHomeEntities(previous, {
+ // The server scoped each row's notifications to its item; the
+ // shared source still layers local seen/done overrides on top.
+ entities: enabled()
+ ? feed
+ .entries()
+ .map((entry) =>
+ withEntityNotifications(entry.entity, notificationSource)
+ )
+ : [],
+ tab: state.tab,
+ facets: state.facets,
+ facetContext: facetContext(),
+ }),
+ emptyHomeAdmission()
+ );
+
+ const builtItems = createMemo<HomeDataSourceItem[]>(() =>
+ state.groupBy === 'date'
+ ? buildGroupedSoupRows(
+ groupHomeEntitiesByDate(entities().items, new Date(now()))
+ )
+ : buildFlatSoupRows(entities().items)
+ );
+ const items = createSoupRowStore(builtItems);
+
+ const hasMore = () =>
+ enabled() && feed.query.hasNextPage && !feed.query.error;
+
+ return {
+ items,
+ isLoading: () =>
+ enabled() && feed.query.isLoading && entities().items.length === 0,
+ isFetching: () => enabled() && feed.query.isFetching,
+ isLoadingMore: () => enabled() && feed.query.isFetchingNextPage,
+ hasMore,
+ error: () =>
+ enabled() && entities().items.length === 0 && !hasMore()
+ ? (feed.query.error ?? undefined)
+ : undefined,
+ warning: () =>
+ enabled() && feed.query.error && entities().items.length > 0
+ ? 'Home could not be refreshed.'
+ : undefined,
+ loadMore: async () => {
+ if (!hasMore()) return;
+ await feed.query.fetchNextPage();
+ },
+ refresh: async () => {
+ if (!enabled()) return;
+ await feed.refetch();
+ },
+ markDoneDelegate: () => (enabled() ? feed.markDone : undefined),
+ };
+}
diff --git a/apps/web/src/features/home/work-feed/primitives/work-feed.test.ts b/apps/web/src/features/home/work-feed/primitives/work-feed.test.ts
new file mode 100644
index 0000000000..0aa12bd409
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/primitives/work-feed.test.ts
@@ -0,0 +1,339 @@
+import type { EntityData } from '@entity';
+import { createRoot } from 'solid-js';
+import { afterEach, describe, expect, it, vi } from 'vitest';
+import type { WorkFeedScope } from '../core/work-feed';
+import { createFakeWorkFeedClient } from '../tests/fake-client';
+import {
+ documentEntry,
+ invalidatedPatch,
+ removedPatch,
+ upsertedPatch,
+ workFeedPage,
+} from '../tests/wire';
+import { createWorkFeed, WORK_FEED_RESUBSCRIBE_DELAY_MS } from './work-feed';
+
+// Row mapping imports allBlocks, which loads every block module; one of them
+// opens a websocket that jsdom rejects after the test ends.
+vi.mock('@core/constant/allBlocks', () => ({
+ blockNameToDefaultFile: () => 'Untitled',
+ itemToSafeName: (item: { name?: string }) => item.name ?? 'Untitled',
+}));
+
+const disposals: Array<() => void> = [];
+afterEach(() => {
+ for (const dispose of disposals.splice(0)) dispose();
+ vi.useRealTimers();
+});
+
+const settle = () => new Promise<void>((resolve) => setTimeout(resolve, 0));
+
+const SCOPE: WorkFeedScope = {
+ mode: 'work',
+ types: [],
+ includeSnippets: false,
+};
+
+const docA = documentEntry({
+ docId: 'doc-a',
+ sortAt: '2026-02-01T10:09:00Z',
+ attentionAt: '2026-02-01T10:09:00Z',
+ stacks: [[{ id: 'n-a', createdAt: '2026-02-01T10:09:00Z' }]],
+});
+const docB = documentEntry({
+ docId: 'doc-b',
+ sortAt: '2026-02-01T10:05:00Z',
+ primaryReason: 'OWN_WORK',
+ touchedAt: '2026-02-01T10:05:00Z',
+});
+
+function setup(
+ mutationData: Record<string, unknown> = {},
+ options: { cache?: boolean } = {}
+) {
+ const fake = createFakeWorkFeedClient(mutationData);
+ const revalidateNotifications = vi.fn(async () => {});
+ let feed!: ReturnType<typeof createWorkFeed>;
+ const dispose = createRoot((rootDispose) => {
+ feed = createWorkFeed({
+ client: () => fake.client,
+ cacheHost: () => (options.cache === false ? undefined : fake.host),
+ scope: () => SCOPE,
+ enabled: () => true,
+ revalidateNotifications,
+ });
+ return rootDispose;
+ });
+ disposals.push(dispose);
+ const itemIds = () => feed.entries().map((entry) => entry.itemId);
+ return { fake, feed, itemIds, revalidateNotifications };
+}
+
+const entityOf = (docId: string) =>
+ ({ type: 'document', id: docId }) as EntityData;
+
+const NETWORK_ONLY = 'network-only';
+const WIRE_SCOPE = { mode: 'WORK', types: [], includeSnippets: false };
+/** Let timers at zero and the cache's promise chains run out. */
+const flush = async () => {
+ for (let i = 0; i < 5; i++) await vi.advanceTimersByTimeAsync(0);
+};
+
+const docC = documentEntry({
+ docId: 'doc-c',
+ sortAt: '2026-02-01T10:07:00Z',
+ attentionAt: '2026-02-01T10:07:00Z',
+});
+
+describe('createWorkFeed', () => {
+ it('writes live changes into the cached pages without a read', async () => {
+ vi.useFakeTimers();
+ const { fake, itemIds } = setup();
+ await flush();
+
+ expect(fake.queries[0].variables).toEqual({
+ input: { scope: WIRE_SCOPE, limit: 50, cursor: null },
+ });
+ expect(fake.subscriptions[0].variables).toEqual({ scope: WIRE_SCOPE });
+
+ fake.queries[0].resolve(workFeedPage([docA, docB]));
+ await flush();
+ expect(itemIds()).toEqual(['document:doc-a', 'document:doc-b']);
+
+ const reads = fake.queries.length;
+ fake.subscriptions[0].next({
+ workFeedUpdates: [upsertedPatch(docC), removedPatch('document:doc-a')],
+ });
+ await flush();
+
+ expect(fake.queries).toHaveLength(reads);
+ expect(fake.writes).toHaveLength(1);
+ expect(itemIds()).toEqual(['document:doc-c', 'document:doc-b']);
+ });
+
+ it('writes changes only after a page read in flight lands', async () => {
+ vi.useFakeTimers();
+ const { fake, feed, itemIds } = setup();
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA]));
+ await flush();
+
+ void feed.refetch();
+ await flush();
+ const read = fake.queries.at(-1);
+ expect(read?.context.requestPolicy).toBe(NETWORK_ONLY);
+
+ fake.subscriptions[0].next({ workFeedUpdates: [upsertedPatch(docC)] });
+ await flush();
+ expect(fake.writes).toHaveLength(0);
+
+ read?.resolve(workFeedPage([docA, docB]));
+ await flush();
+ expect(fake.writes).toHaveLength(1);
+ expect(itemIds()).toEqual([
+ 'document:doc-a',
+ 'document:doc-c',
+ 'document:doc-b',
+ ]);
+ });
+
+ it('reads the feed again when the server invalidates it', async () => {
+ vi.useFakeTimers();
+ const { fake } = setup();
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA]));
+ await flush();
+ const reads = fake.queries.length;
+
+ fake.subscriptions[0].next({ workFeedUpdates: [invalidatedPatch()] });
+ await flush();
+
+ expect(fake.queries).toHaveLength(reads + 1);
+ expect(fake.queries.at(-1)?.context.requestPolicy).toBe(NETWORK_ONLY);
+ expect(fake.writes).toHaveLength(0);
+ });
+
+ it('reads the feed again when there is no cache to write to', async () => {
+ vi.useFakeTimers();
+ const { fake } = setup({}, { cache: false });
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA]));
+ await flush();
+ const reads = fake.queries.length;
+
+ fake.subscriptions[0].next({ workFeedUpdates: [upsertedPatch(docC)] });
+ await flush();
+
+ expect(fake.queries).toHaveLength(reads + 1);
+ expect(fake.queries.at(-1)?.context.requestPolicy).toBe(NETWORK_ONLY);
+ });
+
+ it('marks rows done as feed items and undoes exactly that', async () => {
+ vi.useFakeTimers();
+ const { fake, feed, itemIds, revalidateNotifications } = setup({
+ MarkWorkFeedItemsDone: {
+ markWorkFeedItemsDone: {
+ itemIds: ['document:doc-a'],
+ undoToken: 'undo-1',
+ },
+ },
+ UndoWorkFeedItemsDone: {
+ undoWorkFeedItemsDone: { patches: [upsertedPatch(docA)] },
+ },
+ });
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA, docB]));
+ await flush();
+
+ expect(feed.markDone.prepare([entityOf('not-in-feed')])).toBeUndefined();
+ const prepared = feed.markDone.prepare([entityOf('doc-a')]);
+ if (!prepared) throw new Error('doc-a is a feed row');
+
+ const show = prepared.hide();
+ expect(itemIds()).toEqual(['document:doc-b']);
+
+ const reads = fake.queries.length;
+ const { undo } = await prepared.commit();
+ expect(fake.mutations[0]).toEqual({
+ name: 'MarkWorkFeedItemsDone',
+ variables: {
+ input: { items: [{ id: 'document:doc-a', revision: 'rev-doc-a' }] },
+ },
+ });
+ expect(revalidateNotifications).toHaveBeenCalledTimes(1);
+
+ // The server's removal arrives on the stream; the done needs no read.
+ fake.subscriptions[0].next({
+ workFeedUpdates: [removedPatch('document:doc-a')],
+ });
+ await flush();
+ expect(fake.queries).toHaveLength(reads);
+ expect(itemIds()).toEqual(['document:doc-b']);
+
+ show();
+ await undo();
+ await flush();
+ expect(fake.mutations[1]).toEqual({
+ name: 'UndoWorkFeedItemsDone',
+ variables: { input: { undoToken: 'undo-1', scope: WIRE_SCOPE } },
+ });
+ // The restored place lands with the undo, not with a read.
+ expect(fake.queries).toHaveLength(reads);
+ expect(itemIds()).toEqual(['document:doc-a', 'document:doc-b']);
+ });
+
+ it('keeps a done row hidden through a stale change, not a newer reason', async () => {
+ vi.useFakeTimers();
+ const { fake, feed, itemIds } = setup();
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA, docB]));
+ await flush();
+
+ feed.markDone.prepare([entityOf('doc-a')])?.hide();
+ expect(itemIds()).toEqual(['document:doc-b']);
+
+ // A change computed before the done still carries its revision.
+ fake.subscriptions[0].next({ workFeedUpdates: [upsertedPatch(docA)] });
+ await flush();
+ expect(itemIds()).toEqual(['document:doc-b']);
+
+ const reply = documentEntry({
+ docId: 'doc-a',
+ sortAt: '2026-02-01T10:30:00Z',
+ attentionAt: '2026-02-01T10:30:00Z',
+ revision: 'rev-doc-a-2',
+ });
+ fake.subscriptions[0].next({ workFeedUpdates: [upsertedPatch(reply)] });
+ await flush();
+ expect(itemIds()).toEqual(['document:doc-a', 'document:doc-b']);
+ });
+
+ it('shows a done row reopened with the reasons it acknowledged', async () => {
+ vi.useFakeTimers();
+ const { fake, feed, itemIds } = setup();
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA, docB]));
+ await flush();
+
+ feed.markDone.prepare([entityOf('doc-a')])?.hide();
+ fake.subscriptions[0].next({
+ workFeedUpdates: [removedPatch('document:doc-a')],
+ });
+ await flush();
+ expect(itemIds()).toEqual(['document:doc-b']);
+
+ // Marked not done elsewhere: the same notifications are back.
+ fake.subscriptions[0].next({ workFeedUpdates: [upsertedPatch(docA)] });
+ await flush();
+ expect(itemIds()).toEqual(['document:doc-a', 'document:doc-b']);
+ });
+
+ it('resubscribes and reads again after the live stream ends', async () => {
+ vi.useFakeTimers();
+ const { fake } = setup();
+ await flush();
+ fake.queries[0].resolve(workFeedPage([docA]));
+ await flush();
+
+ fake.subscriptions[0].fail('work feed subscription ended');
+ await vi.advanceTimersByTimeAsync(WORK_FEED_RESUBSCRIBE_DELAY_MS - 1);
+ expect(fake.subscriptions).toHaveLength(1);
+
+ const reads = fake.queries.length;
+ await vi.advanceTimersByTimeAsync(1);
+ await flush();
+ expect(fake.subscriptions).toHaveLength(2);
+ expect(fake.queries).toHaveLength(reads + 1);
+ expect(fake.queries.at(-1)?.context.requestPolicy).toBe(NETWORK_ONLY);
+ });
+});
+
+describe('createWorkFeed done on own work', () => {
+ const mixed = documentEntry({
+ docId: 'mixed',
+ sortAt: '2026-02-01T10:20:00Z',
+ primaryReason: 'OWN_WORK',
+ attentionAt: '2026-02-01T10:02:00Z',
+ touchedAt: '2026-02-01T10:20:00Z',
+ stacks: [[{ id: 'n-mixed', createdAt: '2026-02-01T10:02:00Z' }]],
+ });
+
+ it('completes only rows with attention and keeps rows with own work', async () => {
+ const { fake, feed, itemIds } = setup({
+ MarkWorkFeedItemsDone: {
+ markWorkFeedItemsDone: {
+ itemIds: ['document:mixed'],
+ undoToken: 'undo-mixed',
+ },
+ },
+ });
+ await settle();
+ fake.queries[0].resolve(workFeedPage([mixed, docA, docB]));
+ await settle();
+
+ // docB is own work alone: nothing to complete.
+ expect(feed.markDone.canComplete(entityOf('doc-b'))).toBe(false);
+ expect(feed.markDone.prepare([entityOf('doc-b')])).toBeUndefined();
+ expect(feed.markDone.canComplete(entityOf('mixed'))).toBe(true);
+ expect(feed.markDone.canComplete(entityOf('elsewhere'))).toBeUndefined();
+
+ const prepared = feed.markDone.prepare([
+ entityOf('mixed'),
+ entityOf('doc-a'),
+ entityOf('doc-b'),
+ ]);
+ if (!prepared) throw new Error('mixed and doc-a have attention');
+ prepared.hide();
+ // doc-a leaves; the row the viewer also worked on stays.
+ expect(itemIds()).toEqual(['document:mixed', 'document:doc-b']);
+
+ await prepared.commit();
+ expect(fake.mutations[0].variables).toEqual({
+ input: {
+ items: [
+ { id: 'document:mixed', revision: 'rev-mixed' },
+ { id: 'document:doc-a', revision: 'rev-doc-a' },
+ ],
+ },
+ });
+ });
+});
diff --git a/apps/web/src/features/home/work-feed/primitives/work-feed.ts b/apps/web/src/features/home/work-feed/primitives/work-feed.ts
new file mode 100644
index 0000000000..e00949f818
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/primitives/work-feed.ts
@@ -0,0 +1,273 @@
+import type {
+ MarkDoneDelegate,
+ PreparedMarkDone,
+} from '@app/features/next-soup/actions/mark-done-delegate';
+import type { EntityData } from '@entity';
+import type { CacheHost } from '@graphql-cache/host/types';
+import { setDoneOverride } from '@notifications/notification-source';
+import type { WorkFeedPatchFieldsFragment } from '@service-storage/graphql/generated/graphql';
+import type { Client } from '@urql/core';
+import {
+ type Accessor,
+ createEffect,
+ createMemo,
+ createSignal,
+ on,
+ onCleanup,
+} from 'solid-js';
+import {
+ markWorkFeedDone,
+ settleWorkFeedDone,
+ unmarkWorkFeedDone,
+ type WorkFeedDone,
+ type WorkFeedEntry,
+ type WorkFeedScope,
+ withoutDoneWorkFeedEntries,
+ workFeedEntityKey,
+} from '../core/work-feed';
+import { writeWorkFeedPatches } from '../queries/work-feed-cache';
+import {
+ markWorkFeedItemsDone,
+ undoWorkFeedItemsDone,
+} from '../queries/work-feed-mutations';
+import {
+ createWorkFeedQuery,
+ workFeedPageVariables,
+} from '../queries/work-feed-query';
+import { subscribeToWorkFeedUpdates } from '../queries/work-feed-updates';
+
+/** First delay before following a feed again after its live stream ended. */
+export const WORK_FEED_RESUBSCRIBE_DELAY_MS = 3_000;
+/** Longest delay between attempts while the live stream keeps failing. */
+export const WORK_FEED_MAX_RESUBSCRIBE_DELAY_MS = 60_000;
+
+export type WorkFeedOptions = {
+ client: Accessor<Client>;
+ /** The normalized cache holding the feed's pages, when it is available. */
+ cacheHost: Accessor<Pick<CacheHost, 'readQuery' | 'writeQuery'> | undefined>;
+ scope: Accessor<WorkFeedScope>;
+ enabled: Accessor<boolean>;
+ /** Subscribes to transport reconnects, after which changes may be missed. */
+ onReconnected?: (listener: () => void) => () => void;
+ /** Reconciles other notification readers after a done or undo commits. */
+ revalidateNotifications?: (client: Client) => Promise<void>;
+};
+
+/** Raw notification ids an entry's row shows, for local done overrides. */
+function notificationIds(entry: WorkFeedEntry): string[] {
+ const notifications = entry.entity.notifications;
+ const list =
+ typeof notifications === 'function' ? notifications() : notifications;
+ return (list ?? []).map((notification) => notification.id);
+}
+
+/**
+ * One live work feed. The server sends each change already placed in the
+ * feed, and the change is written into the cached pages, so the paged query
+ * shows it without a network read. The feed reads again only when changes
+ * may have been missed. Its `markDone` delegate completes rows as feed
+ * items, hiding them until their removal arrives, with undo.
+ */
+export function createWorkFeed(options: WorkFeedOptions) {
+ const query = createWorkFeedQuery(options);
+ const [done, setDone] = createSignal<WorkFeedDone>(new Map());
+ const loaded = () => query.data?.entries ?? [];
+
+ // A read requested while one runs is followed by one more.
+ let refetching = false;
+ let refetchAgain = false;
+ const refetch = async () => {
+ if (refetching) {
+ refetchAgain = true;
+ return;
+ }
+ refetching = true;
+ try {
+ do {
+ refetchAgain = false;
+ await query.refetch({ requestPolicy: 'network-only' });
+ setDone((current) => settleWorkFeedDone(current, loaded()));
+ } while (refetchAgain);
+ } catch (error) {
+ console.warn('Work feed refresh failed', error);
+ } finally {
+ refetching = false;
+ }
+ };
+
+ // Batches are written in arrival order, and only between page reads, so a
+ // read that started before a batch cannot land over it.
+ let pending: WorkFeedPatchFieldsFragment[] = [];
+ let writing = false;
+ const writePending = async () => {
+ if (writing || pending.length === 0 || query.isFetching) return;
+ const host = options.cacheHost();
+ const batch = pending;
+ pending = [];
+ // Without the cache there are no pages to place changes in.
+ if (!host) {
+ void refetch();
+ return;
+ }
+ writing = true;
+ try {
+ const pages = query.data?.cursors ?? [];
+ const placed = await writeWorkFeedPatches(
+ host,
+ pages.map((cursor) => workFeedPageVariables(options.scope(), cursor)),
+ batch,
+ query.hasNextPage
+ );
+ if (!placed) void refetch();
+ } catch (error) {
+ console.warn('Work feed update failed', error);
+ void refetch();
+ } finally {
+ writing = false;
+ void writePending();
+ }
+ };
+ createEffect(
+ on(
+ () => query.isFetching,
+ (fetching) => {
+ if (!fetching) void writePending();
+ }
+ )
+ );
+
+ const applyPatches = (patches: readonly WorkFeedPatchFieldsFragment[]) => {
+ // A done item that left the feed and returns with the reasons it
+ // acknowledged was reopened, so it shows again; while it is still
+ // loaded, the same revision is a change computed before the done.
+ const present = new Set(loaded().map((entry) => entry.itemId));
+ const reopened = patches.flatMap((patch) => {
+ if (patch.__typename !== 'WorkFeedEntryUpserted') return [];
+ const { item, revision } = patch.entry;
+ const acknowledged = done().get(item.id);
+ return acknowledged !== undefined &&
+ (acknowledged !== revision || !present.has(item.id))
+ ? [item.id]
+ : [];
+ });
+ if (reopened.length > 0) {
+ setDone((current) => unmarkWorkFeedDone(current, reopened));
+ }
+ pending.push(...patches);
+ void writePending();
+ };
+
+ // The live stream is an external system: follow it while the feed is
+ // enabled, and again with each new client or scope.
+ createEffect(() => {
+ if (!options.enabled()) return;
+ const client = options.client();
+ const scope = options.scope();
+ let disposed = false;
+ let retry: ReturnType<typeof setTimeout> | undefined;
+ let delay = WORK_FEED_RESUBSCRIBE_DELAY_MS;
+ let unsubscribe = () => {};
+ const follow = () => {
+ unsubscribe = subscribeToWorkFeedUpdates(client, scope, {
+ patches: (patches) => {
+ delay = WORK_FEED_RESUBSCRIBE_DELAY_MS;
+ applyPatches(patches);
+ },
+ interrupted: () => {
+ if (disposed) return;
+ retry = setTimeout(() => {
+ if (disposed) return;
+ follow();
+ // Changes made while the stream was down are only in a read.
+ void refetch();
+ }, delay);
+ delay = Math.min(delay * 2, WORK_FEED_MAX_RESUBSCRIBE_DELAY_MS);
+ },
+ });
+ };
+ follow();
+ const stopReconnects = options.onReconnected?.(() => void refetch());
+ onCleanup(() => {
+ disposed = true;
+ pending = [];
+ if (retry !== undefined) clearTimeout(retry);
+ unsubscribe();
+ stopReconnects?.();
+ });
+ });
+
+ const entries = createMemo(() =>
+ withoutDoneWorkFeedEntries(loaded(), done())
+ );
+ const entriesByEntity = createMemo(
+ () =>
+ new Map(
+ entries().map((entry) => [workFeedEntityKey(entry.entity), entry])
+ )
+ );
+
+ const canComplete = (entity: EntityData) =>
+ entriesByEntity().get(workFeedEntityKey(entity))?.hasAttention;
+
+ const prepare = (
+ entities: readonly EntityData[]
+ ): PreparedMarkDone | undefined => {
+ const targets: WorkFeedEntry[] = [];
+ for (const entity of entities) {
+ const entry = entriesByEntity().get(workFeedEntityKey(entity));
+ if (!entry) return undefined;
+ // Own work alone has nothing to acknowledge.
+ if (entry.hasAttention) targets.push(entry);
+ }
+ if (targets.length === 0) return undefined;
+ const items = targets.map(({ itemId, revision }) => ({ itemId, revision }));
+ // Done leaves own work in place: those rows stay, turning read, and move
+ // to their own-work time when the server's change arrives.
+ const leaving = targets
+ .filter((entry) => !entry.hasOwnWork)
+ .map(({ itemId, revision }) => ({ itemId, revision }));
+ const client = options.client();
+ const scope = options.scope();
+ return {
+ hide: () => {
+ setDone((current) => markWorkFeedDone(current, leaving));
+ // Rows that stay read as done, and readers of the shared
+ // notification source drop these notifications too.
+ const restoreNotifications = setDoneOverride(
+ targets.flatMap(notificationIds),
+ true
+ );
+ return () => {
+ restoreNotifications();
+ setDone((current) =>
+ unmarkWorkFeedDone(
+ current,
+ leaving.map((item) => item.itemId)
+ )
+ );
+ };
+ },
+ // The server publishes the done to every session's live stream,
+ // which removes or moves the rows; no read is needed.
+ commit: async () => {
+ const { undoToken } = await markWorkFeedItemsDone(client, items);
+ void options.revalidateNotifications?.(client);
+ return {
+ undo: async () => {
+ const patches = await undoWorkFeedItemsDone(
+ client,
+ undoToken,
+ scope
+ );
+ void options.revalidateNotifications?.(client);
+ // The restored places land now rather than with the stream.
+ applyPatches(patches);
+ },
+ };
+ },
+ };
+ };
+ const markDone: MarkDoneDelegate = { canComplete, prepare };
+
+ return { query, entries, refetch, markDone };
+}
diff --git a/apps/web/src/features/home/work-feed/queries/decode.test.ts b/apps/web/src/features/home/work-feed/queries/decode.test.ts
new file mode 100644
index 0000000000..e53b1f5f78
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/decode.test.ts
@@ -0,0 +1,82 @@
+import { describe, expect, it, vi } from 'vitest';
+import { documentEntry } from '../tests/wire';
+import { decodeWorkFeedEntry, encodeWorkFeedScope } from './decode';
+
+// Row mapping imports allBlocks, which loads every block module; one of them
+// opens a websocket that jsdom rejects after the test ends.
+vi.mock('@core/constant/allBlocks', () => ({
+ blockNameToDefaultFile: () => 'Untitled',
+ itemToSafeName: (item: { name?: string }) => item.name ?? 'Untitled',
+}));
+
+describe('decodeWorkFeedEntry', () => {
+ it('decodes an attention entry with its stacked notifications', () => {
+ const decoded = decodeWorkFeedEntry(
+ documentEntry({
+ docId: 'doc-1',
+ sortAt: '2026-02-01T10:09:00Z',
+ attentionAt: '2026-02-01T10:09:00Z',
+ stacks: [
+ [{ id: 'n-2', createdAt: '2026-02-01T10:09:00Z' }],
+ [{ id: 'n-1', createdAt: '2026-02-01T10:05:00Z', state: 'SEEN' }],
+ ],
+ })
+ );
+
+ expect(decoded?.itemId).toBe('document:doc-1');
+ expect(decoded?.sortAt).toBe(Date.parse('2026-02-01T10:09:00Z'));
+ expect(decoded?.state).toBe('unseen');
+ expect(decoded?.primaryReason).toBe('attention');
+ expect(decoded?.hasAttention).toBe(true);
+ expect(decoded?.hasOwnWork).toBe(false);
+ const entity = decoded?.entity;
+ expect(entity?.type).toBe('document');
+ expect(entity?.id).toBe('doc-1');
+ expect(entity?.sortTs).toBe('2026-02-01T10:09:00Z');
+ expect(entity?.notificationDisplayCutoff).toBe('2026-02-01T10:09:00Z');
+ const notifications = Array.isArray(entity?.notifications)
+ ? entity.notifications
+ : [];
+ expect(notifications.map((n) => n.id)).toEqual(['n-2', 'n-1']);
+ expect(notifications[0].notification_metadata.tag).toBe(
+ 'commented_on_document'
+ );
+ expect(notifications[1].state).toBe('seen');
+ });
+
+ it('keeps an older comment label off a row whose own work is newer', () => {
+ const decoded = decodeWorkFeedEntry(
+ documentEntry({
+ docId: 'doc-1',
+ sortAt: '2026-02-01T10:30:00Z',
+ primaryReason: 'OWN_WORK',
+ attentionAt: '2026-02-01T10:05:00Z',
+ touchedAt: '2026-02-01T10:30:00Z',
+ stacks: [[{ id: 'n-1', createdAt: '2026-02-01T10:05:00Z' }]],
+ })
+ );
+ expect(decoded?.primaryReason).toBe('own_work');
+ expect(decoded?.hasAttention).toBe(true);
+ expect(decoded?.hasOwnWork).toBe(true);
+ expect(decoded?.entity.notificationDisplayCutoff).toBe(
+ '2026-02-01T10:30:00Z'
+ );
+ expect(decoded?.entity.touchedAt).toBe('2026-02-01T10:30:00Z');
+ });
+});
+
+describe('encodeWorkFeedScope', () => {
+ it('encodes mode and kinds for the wire', () => {
+ expect(
+ encodeWorkFeedScope({
+ mode: 'attention',
+ types: ['channel_thread', 'pull_request'],
+ includeSnippets: true,
+ })
+ ).toEqual({
+ mode: 'ATTENTION',
+ types: ['CHANNEL_THREAD', 'PULL_REQUEST'],
+ includeSnippets: true,
+ });
+ });
+});
diff --git a/apps/web/src/features/home/work-feed/queries/decode.ts b/apps/web/src/features/home/work-feed/queries/decode.ts
new file mode 100644
index 0000000000..cdaf574018
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/decode.ts
@@ -0,0 +1,123 @@
+import type { UnifiedNotification } from '@notifications/types';
+import {
+ isDisplayableSoupItem,
+ mapApiSoupItemToEntity,
+} from '@queries/soup/transform-utils';
+import type {
+ WorkFeedItemState as GraphqlWorkFeedItemState,
+ WorkFeedItemType as GraphqlWorkFeedItemType,
+ WorkFeedEntryFieldsFragment,
+ WorkFeedScopeInput,
+} from '@service-storage/graphql/generated/graphql';
+import {
+ type GraphqlSoupItem,
+ mapGraphqlNotification,
+ mapGraphqlSoupItem,
+} from '@service-storage/graphql-soup';
+import { match } from 'ts-pattern';
+import type {
+ WorkFeedEntry,
+ WorkFeedItemState,
+ WorkFeedItemType,
+ WorkFeedScope,
+} from '../core/work-feed';
+
+const decodeState = (state: GraphqlWorkFeedItemState): WorkFeedItemState =>
+ match(state)
+ .with('UNSEEN', () => 'unseen' as const)
+ .with('SEEN', () => 'seen' as const)
+ .with('DONE', () => 'done' as const)
+ .exhaustive();
+
+const toTimestamp = (value: string | null | undefined) =>
+ value ? new Date(value).getTime() : undefined;
+
+/** Every notification the item's stacks carry, newest first, once each. */
+function stackNotifications(
+ item: WorkFeedEntryFieldsFragment['item']
+): UnifiedNotification[] {
+ const seen = new Set<string>();
+ const notifications: UnifiedNotification[] = [];
+ for (const stack of item.stacks) {
+ for (const notification of stack.notifications) {
+ if (seen.has(notification.id)) continue;
+ seen.add(notification.id);
+ notifications.push(mapGraphqlNotification(notification));
+ }
+ }
+ return notifications.sort(
+ (a, b) =>
+ (toTimestamp(b.created_at) ?? 0) - (toTimestamp(a.created_at) ?? 0)
+ );
+}
+
+/**
+ * Decode one GraphQL entry into a Home row entity. The entity carries the
+ * item's own scoped notifications — a channel row never borrows its threads'
+ * — and Home's timestamps: `sortTs` places the row, `notifiedAt` and
+ * `touchedAt` are its two reasons.
+ */
+export function decodeWorkFeedEntry(
+ entry: WorkFeedEntryFieldsFragment
+): WorkFeedEntry | null {
+ const { item } = entry;
+ const notifications = stackNotifications(item);
+ // The stacks replace the entity's own notification edge, which would
+ // read every notification of a channel, including its threads'.
+ const soupItem = mapGraphqlSoupItem({
+ ...item.entity,
+ notifications: [],
+ } as GraphqlSoupItem);
+ if (!soupItem || !isDisplayableSoupItem(soupItem)) return null;
+
+ const sortAt = toTimestamp(entry.sortAt);
+ if (sortAt === undefined) return null;
+ const entity = mapApiSoupItemToEntity({
+ ...soupItem,
+ notified_at: item.attentionAt,
+ touched_at: entry.touchedAt,
+ });
+ const primaryReason =
+ entry.primaryReason === 'ATTENTION' ? 'attention' : 'own_work';
+
+ return {
+ itemId: item.id,
+ revision: entry.revision,
+ sortAt,
+ state: decodeState(item.state),
+ primaryReason,
+ hasAttention: item.attentionAt !== null,
+ hasOwnWork: entry.touchedAt !== null,
+ entity: {
+ ...entity,
+ notifications,
+ sortTs: entry.sortAt,
+ // A row presents the newest attention only while it is the primary
+ // reason; newer own work keeps an older comment's label off the row.
+ notificationDisplayCutoff:
+ primaryReason === 'attention' ? item.attentionAt : entry.touchedAt,
+ },
+ };
+}
+
+const toGraphqlItemType = (type: WorkFeedItemType): GraphqlWorkFeedItemType =>
+ match(type)
+ .with('document', () => 'DOCUMENT' as const)
+ .with('chat', () => 'CHAT' as const)
+ .with('project', () => 'PROJECT' as const)
+ .with('email', () => 'EMAIL' as const)
+ .with('channel', () => 'CHANNEL' as const)
+ .with('channel_thread', () => 'CHANNEL_THREAD' as const)
+ .with('calendar_event', () => 'CALENDAR_EVENT' as const)
+ .with('pull_request', () => 'PULL_REQUEST' as const)
+ .with('agent_session', () => 'AGENT_SESSION' as const)
+ .exhaustive();
+
+/** Encode a feed scope for the wire. */
+export function encodeWorkFeedScope(scope: WorkFeedScope): WorkFeedScopeInput {
+ return {
+ mode: scope.mode === 'work' ? 'WORK' : 'ATTENTION',
+ types: scope.types.map(toGraphqlItemType),
+ includeSnippets: scope.includeSnippets,
+ };
+}
diff --git a/apps/web/src/features/home/work-feed/queries/work-feed-cache.test.ts b/apps/web/src/features/home/work-feed/queries/work-feed-cache.test.ts
new file mode 100644
index 0000000000..4b99144dc6
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/work-feed-cache.test.ts
@@ -0,0 +1,136 @@
+import type { WorkFeedEntryFieldsFragment } from '@service-storage/graphql/generated/graphql';
+import { describe, expect, it } from 'vitest';
+import { createFakeWorkFeedClient } from '../tests/fake-client';
+import {
+ documentEntry,
+ invalidatedPatch,
+ removedPatch,
+ upsertedPatch,
+ workFeedPage,
+} from '../tests/wire';
+import {
+ compareWorkFeedEntries,
+ placeWorkFeedPatches,
+ writeWorkFeedPatches,
+} from './work-feed-cache';
+
+const at = (docId: string, minute: number) =>
+ documentEntry({
+ docId,
+ sortAt: `2026-02-01T10:${String(minute).padStart(2, '0')}:00Z`,
+ });
+
+const ids = (pages: WorkFeedEntryFieldsFragment[][] | undefined) =>
+ pages?.map((page) => page.map((entry) => entry.item.id.split(':')[1]));
+
+describe('compareWorkFeedEntries', () => {
+ it('orders newest first, then by entity id descending', () => {
+ const sorted = [
+ documentEntry({ docId: 'a', sortAt: '2026-02-01T10:00:00.000001Z' }),
+ documentEntry({ docId: 'b', sortAt: '2026-02-01T10:00:00Z' }),
+ documentEntry({ docId: 'c', sortAt: '2026-02-01T10:00:00Z' }),
+ documentEntry({ docId: 'd', sortAt: '2026-02-01T10:00:00.000002Z' }),
+ ].sort(compareWorkFeedEntries);
+ expect(sorted.map((entry) => entry.item.id)).toEqual([
+ 'document:d',
+ 'document:a',
+ 'document:c',
+ 'document:b',
+ ]);
+ });
+});
+
+describe('placeWorkFeedPatches', () => {
+ const pages = [
+ [at('p1-a', 50), at('p1-b', 40)],
+ [at('p2-a', 30), at('p2-b', 20)],
+ ];
+
+ it('removes an item from whichever page holds it', () => {
+ expect(
+ ids(placeWorkFeedPatches(pages, [removedPatch('document:p2-a')], true))
+ ).toEqual([['p1-a', 'p1-b'], ['p2-b']]);
+ });
+
+ it('places a new entry at its time and moves an existing one', () => {
+ const placed = placeWorkFeedPatches(
+ pages,
+ [upsertedPatch(at('new', 45)), upsertedPatch(at('p2-b', 55))],
+ true
+ );
+ expect(ids(placed)).toEqual([['p2-b', 'p1-a', 'new', 'p1-b'], ['p2-a']]);
+ });
+
+ it('leaves an entry older than every loaded row to its page', () => {
+ expect(
+ ids(placeWorkFeedPatches(pages, [upsertedPatch(at('old', 10))], true))
+ ).toEqual([
+ ['p1-a', 'p1-b'],
+ ['p2-a', 'p2-b'],
+ ]);
+ expect(
+ ids(placeWorkFeedPatches(pages, [upsertedPatch(at('old', 10))], false))
+ ).toEqual([
+ ['p1-a', 'p1-b'],
+ ['p2-a', 'p2-b', 'old'],
+ ]);
+ });
+
+ it('drops an entry that moved below the loaded rows', () => {
+ expect(
+ ids(placeWorkFeedPatches(pages, [upsertedPatch(at('p1-a', 10))], true))
+ ).toEqual([['p1-b'], ['p2-a', 'p2-b']]);
+ });
+
+ it('gives up on an invalidated batch', () => {
+ expect(
+ placeWorkFeedPatches(
+ pages,
+ [upsertedPatch(at('new', 45)), invalidatedPatch()],
+ true
+ )
+ ).toBeUndefined();
+ });
+});
+
+describe('writeWorkFeedPatches', () => {
+ const firstPage = { input: { cursor: null } };
+ const secondPage = { input: { cursor: 'cursor-2' } };
+
+ it('writes only the cached pages the batch changed', async () => {
+ const fake = createFakeWorkFeedClient();
+ for (const variables of [firstPage, secondPage]) {
+ fake.client.executeQuery({ variables } as never);
+ }
+ fake.queries[0].resolve(workFeedPage([at('a', 50)], 'cursor-2'));
+ fake.queries[1].resolve(workFeedPage([at('b', 30)]));
+
+ const placed = await writeWorkFeedPatches(
+ fake.host,
+ [firstPage, secondPage],
+ [upsertedPatch(at('new', 40))],
+ false
+ );
+
+ expect(placed).toBe(true);
+ // Older than the first page's last row, it belongs to the second page.
+ expect(fake.writes).toHaveLength(1);
+ expect(fake.writes[0].variables).toEqual(secondPage);
+ expect(fake.writes[0].data).toEqual(
+ workFeedPage([at('new', 40), at('b', 30)])
+ );
+ });
+
+ it('asks for a read when a page is not cached', async () => {
+ const fake = createFakeWorkFeedClient();
+ expect(
+ await writeWorkFeedPatches(
+ fake.host,
+ [firstPage],
+ [upsertedPatch(at('new', 40))],
+ false
+ )
+ ).toBe(false);
+ expect(fake.writes).toHaveLength(0);
+ });
+});
diff --git a/apps/web/src/features/home/work-feed/queries/work-feed-cache.ts b/apps/web/src/features/home/work-feed/queries/work-feed-cache.ts
new file mode 100644
index 0000000000..73a7dd5bbc
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/work-feed-cache.ts
@@ -0,0 +1,125 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import {
+ WorkFeedDocument,
+ type WorkFeedEntryFieldsFragment,
+ type WorkFeedPatchFieldsFragment,
+ type WorkFeedQuery,
+ type WorkFeedQueryVariables,
+} from '@service-storage/graphql/generated/graphql';
+import { stringifyDocument } from '@urql/core';
+
+type Entry = WorkFeedEntryFieldsFragment;
+
+const workFeedQuery = stringifyDocument(WorkFeedDocument);
+
+/** Sub-millisecond digits of an RFC 3339 time, which `Date.parse` drops. */
+function subMillis(time: string): number {
+ const fraction = /\.(\d+)/.exec(time)?.[1] ?? '';
+ return Number(fraction.padEnd(9, '0').slice(3, 9));
+}
+
+/** `<entity type>:<entity id>` item ids end in the server's tiebreaker. */
+const entityIdOf = (itemId: string) => itemId.slice(itemId.indexOf(':') + 1);
+
+/** The server's feed order: newest `sortAt` first, then entity id descending. */
+export function compareWorkFeedEntries(a: Entry, b: Entry): number {
+ const millis = Date.parse(b.sortAt) - Date.parse(a.sortAt);
+ if (millis !== 0) return millis;
+ const sub = subMillis(b.sortAt) - subMillis(a.sortAt);
+ if (sub !== 0) return sub;
+ const left = entityIdOf(a.item.id);
+ const right = entityIdOf(b.item.id);
+ return left < right ? 1 : left > right ? -1 : 0;
+}
+
+/** Insert an entry before the first loaded row it sorts ahead of. */
+function insertEntry(pages: Entry[][], entry: Entry, hasMore: boolean) {
+ for (const page of pages) {
+ const index = page.findIndex(
+ (row) => compareWorkFeedEntries(entry, row) < 0
+ );
+ if (index !== -1) {
+ page.splice(index, 0, entry);
+ return;
+ }
+ }
+ // Older than every loaded row: it arrives with its page while more remain.
+ if (!hasMore) pages.at(-1)?.push(entry);
+}
+
+/**
+ * Apply one server batch to a feed's loaded pages, in order. A removed item
+ * leaves whichever page holds it; an upserted entry moves to its place in
+ * the server's order. Keyset cursors are positions in that order, so a row
+ * inserted into one page leaves no gap before the next. Returns undefined
+ * when the batch invalidates the feed.
+ */
+export function placeWorkFeedPatches(
+ pages: readonly (readonly Entry[])[],
+ patches: readonly WorkFeedPatchFieldsFragment[],
+ hasMore: boolean
+): Entry[][] | undefined {
+ let next = pages.map((page) => [...page]);
+ for (const patch of patches) {
+ if (patch.__typename === 'WorkFeedInvalidated') return undefined;
+ const itemId =
+ patch.__typename === 'WorkFeedEntryRemoved'
+ ? patch.itemId
+ : patch.entry.item.id;
+ next = next.map((page) => page.filter((row) => row.item.id !== itemId));
+ if (patch.__typename === 'WorkFeedEntryUpserted') {
+ insertEntry(next, patch.entry, hasMore);
+ }
+ }
+ return next;
+}
+
+const sameEntries = (a: readonly Entry[], b: readonly Entry[]) =>
+ a.length === b.length && a.every((entry, index) => entry === b[index]);
+
+/**
+ * Write one server batch into a feed's cached pages, so every query reading
+ * them updates without a network read. Resolves false when the batch cannot
+ * be placed — an invalidation, or a page the cache no longer holds — and the
+ * feed must be read again.
+ */
+export async function writeWorkFeedPatches(
+ host: Pick<CacheHost, 'readQuery' | 'writeQuery'>,
+ pageVariables: readonly WorkFeedQueryVariables[],
+ patches: readonly WorkFeedPatchFieldsFragment[],
+ hasMore: boolean
+): Promise<boolean> {
+ if (pageVariables.length === 0) return false;
+ const pages: WorkFeedQuery[] = [];
+ for (const variables of pageVariables) {
+ const read = await host.readQuery({
+ query: workFeedQuery,
+ operationName: 'WorkFeed',
+ variables,
+ priority: 'user-visible',
+ });
+ if (read.kind !== 'hit') return false;
+ // The generated document defines the normalized cache result's shape.
+ pages.push(read.data as WorkFeedQuery);
+ }
+ const placed = placeWorkFeedPatches(
+ pages.map((page) => page.user.workFeed.entries),
+ patches,
+ hasMore
+ );
+ if (!placed) return false;
+ for (const [index, entries] of placed.entries()) {
+ const page = pages[index];
+ if (sameEntries(entries, page.user.workFeed.entries)) continue;
+ await host.writeQuery({
+ query: workFeedQuery,
+ operationName: 'WorkFeed',
+ variables: pageVariables[index],
+ data: {
+ ...page,
+ user: { ...page.user, workFeed: { ...page.user.workFeed, entries } },
+ } satisfies WorkFeedQuery,
+ });
+ }
+ return true;
+}
diff --git a/apps/web/src/features/home/work-feed/queries/work-feed-mutations.ts b/apps/web/src/features/home/work-feed/queries/work-feed-mutations.ts
new file mode 100644
index 0000000000..89877ae61a
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/work-feed-mutations.ts
@@ -0,0 +1,51 @@
+import {
+ MarkWorkFeedItemsDoneDocument,
+ UndoWorkFeedItemsDoneDocument,
+ type WorkFeedPatchFieldsFragment,
+} from '@service-storage/graphql/generated/graphql';
+import type { Client } from '@urql/core';
+import type { WorkFeedScope } from '../core/work-feed';
+import { encodeWorkFeedScope } from './decode';
+
+/** The reasons a viewer observed on one item, as done acknowledges them. */
+export type WorkFeedDoneItem = { itemId: string; revision: string };
+
+/** Mark items done; resolves to the token that reverses exactly this done. */
+export async function markWorkFeedItemsDone(
+ client: Client,
+ items: readonly WorkFeedDoneItem[]
+): Promise<{ undoToken: string }> {
+ const result = await client
+ .mutation(MarkWorkFeedItemsDoneDocument, {
+ input: {
+ items: items.map((item) => ({
+ id: item.itemId,
+ revision: item.revision,
+ })),
+ },
+ })
+ .toPromise();
+ const payload = result.data?.markWorkFeedItemsDone;
+ if (result.error || !payload) {
+ throw result.error ?? new Error('Marking work feed items done failed');
+ }
+ return { undoToken: payload.undoToken };
+}
+
+/** Reverse one done; resolves to the restored items' places in `scope`. */
+export async function undoWorkFeedItemsDone(
+ client: Client,
+ undoToken: string,
+ scope: WorkFeedScope
+): Promise<WorkFeedPatchFieldsFragment[]> {
+ const result = await client
+ .mutation(UndoWorkFeedItemsDoneDocument, {
+ input: { undoToken, scope: encodeWorkFeedScope(scope) },
+ })
+ .toPromise();
+ const payload = result.data?.undoWorkFeedItemsDone;
+ if (result.error || !payload) {
+ throw result.error ?? new Error('Undoing work feed done failed');
+ }
+ return payload.patches;
+}
diff --git a/apps/web/src/features/home/work-feed/queries/work-feed-query.ts b/apps/web/src/features/home/work-feed/queries/work-feed-query.ts
new file mode 100644
index 0000000000..a806192ee8
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/work-feed-query.ts
@@ -0,0 +1,72 @@
+import { createUrqlInfiniteQuery } from '@app/lib/urql-solid/create-urql-infinite-query';
+import {
+ WorkFeedDocument,
+ type WorkFeedQuery,
+ type WorkFeedQueryVariables,
+} from '@service-storage/graphql/generated/graphql';
+import type { Client } from '@urql/core';
+import type { Accessor } from 'solid-js';
+import type { WorkFeedEntry, WorkFeedScope } from '../core/work-feed';
+import { decodeWorkFeedEntry, encodeWorkFeedScope } from './decode';
+
+/** Entries fetched per feed page. */
+export const WORK_FEED_PAGE_LIMIT = 50;
+
+const isEntry = (entry: WorkFeedEntry | null): entry is WorkFeedEntry =>
+ entry !== null;
+
+/** The variables of the feed page that starts at `cursor`. */
+export const workFeedPageVariables = (
+ scope: WorkFeedScope,
+ cursor: string | null
+): WorkFeedQueryVariables => ({
+ input: {
+ scope: encodeWorkFeedScope(scope),
+ limit: WORK_FEED_PAGE_LIMIT,
+ cursor,
+ },
+});
+
+/** The loaded feed: its decoded rows and the cursor of each page. */
+export type WorkFeedPages = {
+ entries: WorkFeedEntry[];
+ cursors: (string | null)[];
+};
+
+/**
+ * Infinite query over one work feed, newest first. Pages chase the server's
+ * opaque keyset cursor until it comes back null; the server merges
+ * attention and own work, so one cursor covers both.
+ */
+export function createWorkFeedQuery(options: {
+ client: Accessor<Client>;
+ scope: Accessor<WorkFeedScope>;
+ enabled: Accessor<boolean>;
+}) {
+ return createUrqlInfiniteQuery<
+ WorkFeedQuery,
+ WorkFeedQueryVariables,
+ string | null,
+ WorkFeedPages
+ >(() => {
+ const scope = options.scope();
+ return {
+ query: WorkFeedDocument,
+ client: options.client(),
+ initialPageParam: null,
+ variables: (cursor) => workFeedPageVariables(scope, cursor),
+ getNextPageParam: (lastPage) =>
+ lastPage.user.workFeed.nextCursor ?? undefined,
+ enabled: options.enabled(),
+ requestPolicy: 'cache-and-network',
+ keepPreviousData: true,
+ select: ({ pages, pageParams }) => ({
+ entries: pages
+ .flatMap((page) => page.user.workFeed.entries)
+ .map(decodeWorkFeedEntry)
+ .filter(isEntry),
+ cursors: [...pageParams],
+ }),
+ };
+ });
+}
diff --git a/apps/web/src/features/home/work-feed/queries/work-feed-updates.ts b/apps/web/src/features/home/work-feed/queries/work-feed-updates.ts
new file mode 100644
index 0000000000..10acd9f8f6
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/queries/work-feed-updates.ts
@@ -0,0 +1,50 @@
+import {
+ type WorkFeedPatchFieldsFragment,
+ WorkFeedUpdatesDocument,
+ type WorkFeedUpdatesSubscription,
+ type WorkFeedUpdatesSubscriptionVariables,
+} from '@service-storage/graphql/generated/graphql';
+import type { Client } from '@urql/core';
+import { pipe, subscribe } from 'wonka';
+import type { WorkFeedScope } from '../core/work-feed';
+import { encodeWorkFeedScope } from './decode';
+
+export type WorkFeedUpdatesHandlers = {
+ /** One server batch, to apply together. */
+ patches: (patches: WorkFeedPatchFieldsFragment[]) => void;
+ /** The stream errored or ended: changes may be missed until resubscribed. */
+ interrupted: () => void;
+};
+
+/** Follow one feed's live changes; returns the unsubscribe function. */
+export function subscribeToWorkFeedUpdates(
+ client: Client,
+ scope: WorkFeedScope,
+ handlers: WorkFeedUpdatesHandlers
+): () => void {
+ let ended = false;
+ const end = () => {
+ if (ended) return;
+ ended = true;
+ handlers.interrupted();
+ };
+ const { unsubscribe } = pipe(
+ client.subscription<
+ WorkFeedUpdatesSubscription,
+ WorkFeedUpdatesSubscriptionVariables
+ >(WorkFeedUpdatesDocument, { scope: encodeWorkFeedScope(scope) }),
+ subscribe((result) => {
+ if (result.error) {
+ end();
+ return;
+ }
+ const patches = result.data?.workFeedUpdates;
+ if (!patches || patches.length === 0) return;
+ handlers.patches(patches);
+ })
+ );
+ return () => {
+ ended = true;
+ unsubscribe();
+ };
+}
diff --git a/apps/web/src/features/home/work-feed/tests/fake-client.ts b/apps/web/src/features/home/work-feed/tests/fake-client.ts
new file mode 100644
index 0000000000..650c2014cf
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/tests/fake-client.ts
@@ -0,0 +1,127 @@
+import type { CacheHost } from '@graphql-cache/host/types';
+import {
+ type AnyVariables,
+ type Client,
+ CombinedError,
+ type GraphQLRequest,
+ type Operation,
+ type OperationContext,
+ type OperationResult,
+} from '@urql/core';
+import { makeSubject } from 'wonka';
+
+function operationName(query: unknown): string {
+ const doc = query as {
+ definitions?: Array<{ kind: string; name?: { value: string } }>;
+ };
+ const op = doc.definitions?.find((d) => d.kind === 'OperationDefinition');
+ return op?.name?.value ?? 'anonymous';
+}
+
+export type FakeQuery = {
+ variables: Record<string, unknown>;
+ context: Partial<OperationContext>;
+ resolve(data: unknown): void;
+};
+
+export type FakeSubscription = {
+ variables: Record<string, unknown>;
+ next(data: unknown): void;
+ fail(message: string): void;
+};
+
+export type FakeMutation = {
+ name: string;
+ variables: Record<string, unknown>;
+};
+
+export type FakeCacheWrite = {
+ variables: Record<string, unknown>;
+ data: unknown;
+};
+
+const variablesKey = (variables: unknown) => JSON.stringify(variables ?? {});
+
+/**
+ * A urql client for the work feed: queries stay pending until answered,
+ * subscriptions are driven by the test, and mutations answer from
+ * `mutationData` keyed by operation name. Its `host` stands in for the
+ * normalized cache: reads answer with each page's latest data, and a write
+ * re-emits the page to its query the way a cache reread does.
+ */
+export function createFakeWorkFeedClient(
+ mutationData: Record<string, unknown> = {}
+) {
+ const queries: FakeQuery[] = [];
+ const subscriptions: FakeSubscription[] = [];
+ const mutations: FakeMutation[] = [];
+ const writes: FakeCacheWrite[] = [];
+ const cached = new Map<string, unknown>();
+
+ const executeQuery = <D, V extends AnyVariables>(
+ request: GraphQLRequest<D, V>,
+ context: Partial<OperationContext> = {}
+ ) => {
+ const subject = makeSubject<OperationResult<D, V>>();
+ const operation = { kind: 'query', context } as Operation<D, V>;
+ const variables = (request.variables ?? {}) as Record<string, unknown>;
+ queries.push({
+ variables,
+ context,
+ resolve: (data) => {
+ cached.set(variablesKey(variables), data);
+ subject.next({ operation, data } as OperationResult<D, V>);
+ },
+ });
+ return subject.source;
+ };
+
+ const subscription = (query: unknown, variables: Record<string, unknown>) => {
+ const subject = makeSubject<OperationResult>();
+ const operation = { kind: 'subscription' } as Operation;
+ subscriptions.push({
+ variables,
+ next: (data) => subject.next({ operation, data } as OperationResult),
+ fail: (message) =>
+ subject.next({
+ operation,
+ error: new CombinedError({ graphQLErrors: [message] }),
+ } as OperationResult),
+ });
+ void query;
+ return subject.source;
+ };
+
+ const mutation = (query: unknown, variables: Record<string, unknown>) => {
+ const name = operationName(query);
+ mutations.push({ name, variables });
+ return {
+ toPromise: async () => ({ data: mutationData[name] }),
+ };
+ };
+
+ const host = {
+ readQuery: async (args: { variables?: Record<string, unknown> }) => {
+ const key = variablesKey(args.variables);
+ return cached.has(key)
+ ? { kind: 'hit' as const, data: cached.get(key) }
+ : { kind: 'miss' as const };
+ },
+ writeQuery: async (args: {
+ variables?: Record<string, unknown>;
+ data: unknown;
+ }) => {
+ const variables = args.variables ?? {};
+ writes.push({ variables, data: args.data });
+ const key = variablesKey(variables);
+ queries
+ .filter((query) => variablesKey(query.variables) === key)
+ .at(-1)
+ ?.resolve(args.data);
+ return {};
+ },
+ } as unknown as Pick<CacheHost, 'readQuery' | 'writeQuery'>;
+
+ const client = { executeQuery, subscription, mutation } as unknown as Client;
+ return { client, host, queries, subscriptions, mutations, writes };
+}
diff --git a/apps/web/src/features/home/work-feed/tests/wire.ts b/apps/web/src/features/home/work-feed/tests/wire.ts
new file mode 100644
index 0000000000..2ad001573f
--- /dev/null
+++ b/apps/web/src/features/home/work-feed/tests/wire.ts
@@ -0,0 +1,129 @@
+import type {
+ WorkFeedEntryFieldsFragment,
+ WorkFeedPatchFieldsFragment,
+} from '@service-storage/graphql/generated/graphql';
+
+type NotificationFixture = {
+ id: string;
+ createdAt: string;
+ state?: 'UNSEEN' | 'SEEN' | 'DONE';
+};
+
+type EntryFixture = {
+ docId: string;
+ sortAt: string;
+ revision?: string;
+ primaryReason?: 'ATTENTION' | 'OWN_WORK';
+ attentionAt?: string | null;
+ touchedAt?: string | null;
+ state?: 'UNSEEN' | 'SEEN' | 'DONE';
+ stacks?: NotificationFixture[][];
+};
+
+/** A comment notification as the GraphQL fragments select it. */
+export function commentNotification(
+ docId: string,
+ notification: NotificationFixture
+) {
+ return {
+ id: notification.id,
+ eventType: 'commented_on_document',
+ entityType: 'DOCUMENT',
+ entityId: docId,
+ sent: true,
+ state: notification.state ?? 'UNSEEN',
+ createdAt: notification.createdAt,
+ viewedAt: null,
+ updatedAt: notification.createdAt,
+ senderId: 'macro|[email protected]',
+ metadata: {
+ __typename: 'GraphqlCommentedOnDocumentMetadata',
+ commentedOnDocumentDocumentName: 'Plan',
+ commentedOnDocumentOwner: 'macro|[email protected]',
+ commentedOnDocumentFileType: 'md',
+ commentedOnDocumentSubType: null,
+ commentedOnDocumentCommentId: notification.id,
+ commentedOnDocumentThreadId: notification.id,
+ commentedOnDocumentText: 'looks good',
+ commentedOnDocumentSenderProfilePictureUrl: null,
+ },
+ };
+}
+
+/** A document work feed entry as the `WorkFeedEntryFields` fragment selects it. */
+export function documentEntry(
+ fixture: EntryFixture
+): WorkFeedEntryFieldsFragment {
+ return {
+ sortAt: fixture.sortAt,
+ touchedAt: fixture.touchedAt ?? null,
+ revision: fixture.revision ?? `rev-${fixture.docId}`,
+ primaryReason: fixture.primaryReason ?? 'ATTENTION',
+ primaryStackIndex: fixture.primaryReason === 'OWN_WORK' ? null : 0,
+ item: {
+ id: `document:${fixture.docId}`,
+ state: fixture.state ?? 'UNSEEN',
+ attentionAt: fixture.attentionAt ?? null,
+ unseenCount: 0,
+ entity: {
+ __typename: 'GraphqlSoupDocument',
+ id: fixture.docId,
+ entityType: 'DOCUMENT',
+ displayName: 'Plan',
+ documentName: 'Plan',
+ ownerId: 'macro|[email protected]',
+ fileType: 'md',
+ projectId: null,
+ createdAt: '2026-01-01T00:00:00Z',
+ updatedAt: '2026-01-01T00:00:00Z',
+ viewedAt: null,
+ deletedAt: null,
+ subType: null,
+ isFavorited: false,
+ frecencyScore: null,
+ cacheProjection: null,
+ properties: [],
+ },
+ stacks: (fixture.stacks ?? []).map((notifications) => ({
+ kind: 'COMMENTS',
+ threadId: null,
+ latestAt: notifications[0]?.createdAt ?? fixture.sortAt,
+ unseen: notifications.some((n) => (n.state ?? 'UNSEEN') === 'UNSEEN'),
+ count: notifications.length,
+ notifications: notifications.map((n) =>
+ commentNotification(fixture.docId, n)
+ ),
+ })),
+ },
+ } as unknown as WorkFeedEntryFieldsFragment;
+}
+
+export function upsertedPatch(entry: WorkFeedEntryFieldsFragment) {
+ return {
+ __typename: 'WorkFeedEntryUpserted',
+ entry,
+ } as WorkFeedPatchFieldsFragment;
+}
+
+export function removedPatch(itemId: string) {
+ return {
+ __typename: 'WorkFeedEntryRemoved',
+ itemId,
+ } as WorkFeedPatchFieldsFragment;
+}
+
+export function invalidatedPatch() {
+ return {
+ __typename: 'WorkFeedInvalidated',
+ refresh: true,
+ } as WorkFeedPatchFieldsFragment;
+}
+
+export function workFeedPage(
+ entries: WorkFeedEntryFieldsFragment[],
+ nextCursor: string | null = null
+) {
+ return {
+ user: { id: 'macro|[email protected]', workFeed: { entries, nextCursor } },
+ };
+}
diff --git a/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts b/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
index 5ab2fa7015..3d9f5d77df 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
@@ -3,6 +3,7 @@ import type { NotificationSource } from '@notifications';
import { createRoot } from 'solid-js';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { SoupState } from '../create-soup-state';
+import type { MarkDoneDelegate, PreparedMarkDone } from './mark-done-delegate';
import {
type DoneWriteArgs,
reportDoneWriteOutcomes,
@@ -41,6 +42,8 @@ const mocks = vi.hoisted(() => ({
settle: vi.fn(),
releaseGraphql: vi.fn(),
})),
+ delegatedOptionsFactory: vi.fn(),
+ delegatedMutateAsync: vi.fn(async (_variables: unknown) => {}),
}));
vi.mock('@components/app/split-layout/layoutUtils', () => ({
@@ -77,6 +80,10 @@ vi.mock('./graphql-done-optimism', () => ({
vi.mock('@queries/undo', () => ({
useMutationUndoContext: () => ({ pushUndo: mocks.pushUndo }),
+ useUndoableMutation: (optionsFactory: () => unknown) => {
+ mocks.delegatedOptionsFactory.mockImplementation(optionsFactory);
+ return { mutateAsync: mocks.delegatedMutateAsync };
+ },
}));
vi.mock('@tanstack/solid-query', () => ({
useMutation: (optionsFactory: () => unknown) => {
@@ -153,10 +160,11 @@ function createSoup() {
return { soup, focusSet };
}
-function createAction() {
+function createAction(delegate?: MarkDoneDelegate) {
return createRoot((dispose) => ({
action: makeMarkDoneAction({
notificationSource: () => notificationSource,
+ delegate: delegate ? () => delegate : undefined,
}),
dispose,
}));
@@ -531,3 +539,116 @@ describe('makeMarkDoneAction', () => {
dispose();
});
});
+
+describe('makeMarkDoneAction with a delegating list', () => {
+ beforeEach(() => {
+ mocks.mutateAsync.mockReset();
+ mocks.delegatedMutateAsync.mockReset();
+ mocks.resolveMarkEntitiesDoneVariables.mockClear();
+ });
+
+ function preparedDone() {
+ const show = vi.fn();
+ const undo = vi.fn(async () => {});
+ const prepared: PreparedMarkDone = {
+ hide: vi.fn(() => show),
+ commit: vi.fn(async () => ({ undo })),
+ };
+ return { prepared, show, undo };
+ }
+
+ it('completes delegated rows through the delegate', async () => {
+ const { prepared } = preparedDone();
+ const delegate = {
+ canComplete: () => true,
+ prepare: vi.fn(() => prepared),
+ };
+ const { action, dispose } = createAction(delegate);
+
+ await action.execute([currentEntity]);
+
+ expect(delegate.prepare).toHaveBeenCalledWith([currentEntity]);
+ expect(mocks.delegatedMutateAsync).toHaveBeenCalledWith(
+ expect.objectContaining({ entities: [currentEntity], prepared })
+ );
+ expect(mocks.mutateAsync).not.toHaveBeenCalled();
+ expect(mocks.resolveMarkEntitiesDoneVariables).not.toHaveBeenCalled();
+ dispose();
+ });
+
+ it('falls back to the entity path for rows the delegate does not own', async () => {
+ const { action, dispose } = createAction({
+ canComplete: () => undefined,
+ prepare: () => undefined,
+ });
+
+ await action.execute([currentEntity]);
+
+ expect(mocks.delegatedMutateAsync).not.toHaveBeenCalled();
+ expect(mocks.mutateAsync).toHaveBeenCalledOnce();
+ dispose();
+ });
+
+ it('hides, commits, undoes and redoes through the prepared done', async () => {
+ const { prepared, show, undo } = preparedDone();
+ const { dispose } = createAction({
+ canComplete: () => true,
+ prepare: () => prepared,
+ });
+ const options = mocks.delegatedOptionsFactory() as {
+ onMutate: (input: unknown) => { show: () => void };
+ mutationFn: (input: unknown) => Promise<void>;
+ onError: (error: Error, input: unknown, context: unknown) => void;
+ undoFn: (input: unknown, context: unknown) => Promise<void>;
+ redoFn: (input: unknown, context: unknown) => Promise<void>;
+ };
+ const variables = { entities: [currentEntity], prepared, undo: {} };
+
+ const context = options.onMutate(variables);
+ expect(prepared.hide).toHaveBeenCalledOnce();
+
+ await options.mutationFn(variables);
+ expect(prepared.commit).toHaveBeenCalledOnce();
+
+ await options.undoFn(variables, context);
+ expect(show).toHaveBeenCalledOnce();
+ expect(undo).toHaveBeenCalledOnce();
+
+ await options.redoFn(variables, context);
+ expect(prepared.hide).toHaveBeenCalledTimes(2);
+ expect(prepared.commit).toHaveBeenCalledTimes(2);
+
+ options.onError(new Error('down'), variables, context);
+ expect(show).toHaveBeenCalledTimes(2);
+ dispose();
+ });
+});
+
+describe('makeMarkDoneAction rows with nothing to acknowledge', () => {
+ beforeEach(() => {
+ mocks.mutateAsync.mockReset();
+ mocks.delegatedMutateAsync.mockReset();
+ });
+
+ it('offers no done on a delegated row with only own work', async () => {
+ const prepare = vi.fn();
+ const ownWork = { type: 'document', id: 'own-work' } as EntityData;
+ const delegate: MarkDoneDelegate = {
+ canComplete: (entity) => entity.id !== 'own-work',
+ prepare,
+ };
+ const { action, dispose } = createAction(delegate);
+
+ expect(action.canExecute(ownWork)).toBe(false);
+ expect(action.canExecute(currentEntity)).toBe(true);
+
+ await action.execute([ownWork]);
+ expect(prepare).not.toHaveBeenCalled();
+ expect(mocks.mutateAsync).not.toHaveBeenCalled();
+
+ // In a mixed selection only the completable row is sent.
+ await action.execute([ownWork, currentEntity]);
+ expect(prepare).toHaveBeenCalledWith([currentEntity]);
+ dispose();
+ });
+});
diff --git a/apps/web/src/features/next-soup/actions/make-mark-done-action.ts b/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
index 1420da235a..ba9e978675 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
@@ -21,7 +21,11 @@ import {
type NotificationEntityRef,
toNotificationEntityRef,
} from '@queries/notification/entity-mutations';
-import { type UndoHandle, useMutationUndoContext } from '@queries/undo';
+import {
+ type UndoHandle,
+ useMutationUndoContext,
+ useUndoableMutation,
+} from '@queries/undo';
import { useMutation } from '@tanstack/solid-query';
import type {
EntityActionListState,
@@ -32,6 +36,7 @@ import {
type DoneEntityKey,
doneEntityKey,
} from './graphql-done-operation';
+import type { MarkDoneDelegate, PreparedMarkDone } from './mark-done-delegate';
// Valid list views where the mark done should be allowed to run
const VALID_MARK_DONE_LIST_VIEWS: `${ListView}-${string}`[] = [
@@ -56,8 +61,7 @@ export const canExecuteMarkDoneOnView = (view: ListView, tabId: string) => {
/** Already-done emails coexist with actionable rows in unified
* collections, so mark-done skips them rather than acknowledging twice. */
-const isMarkDoneTarget = (e: EntityData) =>
- !(e.type === 'email' && e.done === true);
+const isDoneEmail = (e: EntityData) => e.type === 'email' && e.done === true;
type MakeMarkDoneOptions = {
userId?: () => string | undefined;
@@ -65,6 +69,8 @@ type MakeMarkDoneOptions = {
/** When provided, undo entries pushed by this action are dropped from
* the undo stack when the group is disposed. */
hotkeyGroup?: HotkeyGroup;
+ /** A list that completes its own rows; its rows skip the entity path. */
+ delegate?: () => MarkDoneDelegate | undefined;
};
type MarkDoneVariables = {
@@ -103,6 +109,66 @@ type MarkDoneExecuteWithSoupOpts = MarkDoneExecuteOpts & {
nextEntityId?: string;
};
+type ToastVariables = Pick<
+ MarkDoneVariables,
+ 'entities' | 'restoreFocus' | 'silent' | 'onUndoHandle' | 'navigateBack'
+>;
+
+type DelegatedMarkDoneVariables = ToastVariables & {
+ prepared: PreparedMarkDone;
+ /** Reverses the latest commit; replaced by each redo. */
+ undo: { current?: () => Promise<void> };
+};
+
+/** Shows rows a delegated done hid; replaced by each redo. */
+type DelegatedMarkDoneContext = { show: () => void };
+
+/** The "Marked as done" toast with Undo for a delegated done, and focus
+ * restoration on undo. */
+function delegatedDoneUndoLifecycle(
+ handle: UndoHandle,
+ variables: ToastVariables
+) {
+ variables.onUndoHandle?.(handle);
+ const firstEntityId = variables.entities[0]?.id;
+ const count = variables.entities.length;
+ const message =
+ count > 1 ? `Marked ${count} items as done` : 'Marked as done';
+ let toastId: number | undefined;
+
+ const showToast = () => {
+ if (variables.silent) return;
+ toastId = toast.success(message, {
+ actions: [
+ {
+ label: 'Undo',
+ icon: ArrowCounterClockwise,
+ onClick: () => {
+ void handle.undo({
+ onError: () => toast.failure('Failed to undo'),
+ });
+ },
+ },
+ ],
+ duration: 3_000,
+ stack: true,
+ hideOnMobile: true,
+ });
+ };
+
+ showToast();
+
+ return {
+ onUndone: () => {
+ if (toastId !== undefined) toast.dismiss(toastId);
+ variables.restoreFocus?.();
+ void restoreSoupFocus(firstEntityId);
+ variables.navigateBack?.();
+ },
+ onRedone: showToast,
+ };
+}
+
type PendingDoneUndo = {
requested: boolean;
result: Promise<boolean>;
@@ -144,6 +210,9 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
const { notificationSource, hotkeyGroup } = options;
const { pushUndo } = useMutationUndoContext();
+ // A delegating list's rows with nothing to acknowledge are skipped too.
+ const isMarkDoneTarget = (entity: EntityData) =>
+ !isDoneEmail(entity) && options.delegate?.()?.canComplete(entity) !== false;
const registerUndo = (
variables: MarkDoneVariables,
@@ -329,7 +398,46 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
})
);
+ // Rows of a delegating list complete as that list's items: hidden at
+ // once, committed and undone through the delegate.
+ const delegatedMutation = useUndoableMutation<
+ void,
+ Error,
+ DelegatedMarkDoneVariables,
+ DelegatedMarkDoneContext
+ >(() => ({
+ hotkeyGroup,
+ onMutate: (variables) => ({ show: variables.prepared.hide() }),
+ mutationFn: async (variables) => {
+ const { undo } = await variables.prepared.commit();
+ variables.undo.current = undo;
+ },
+ onError: (_err, _variables, context) => {
+ context?.show();
+ toast.failure('Failed to mark as done');
+ },
+ undoFn: async (variables, context) => {
+ context?.show();
+ await variables.undo.current?.();
+ },
+ redoFn: async (variables, context) => {
+ const show = variables.prepared.hide();
+ if (context) context.show = show;
+ try {
+ const { undo } = await variables.prepared.commit();
+ variables.undo.current = undo;
+ } catch (err) {
+ show();
+ throw err;
+ }
+ },
+ undoLabel: 'Mark Done',
+ onPushed: delegatedDoneUndoLifecycle,
+ }));
+
const canExecute = (entity: EntityData): boolean => {
+ const delegated = options.delegate?.()?.canComplete(entity);
+ if (delegated !== undefined) return delegated;
if (entity.type === 'channel_message') {
return false;
}
@@ -375,6 +483,20 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
: eligible;
if (targets.length === 0) return;
+ const prepared = options.delegate?.()?.prepare(targets);
+ if (prepared) {
+ await delegatedMutation.mutateAsync({
+ entities: targets,
+ prepared,
+ undo: {},
+ restoreFocus,
+ silent: opts?.silent,
+ onUndoHandle: opts?.onUndoHandle,
+ navigateBack: opts?.navigateBack,
+ });
+ return;
+ }
+
const source = notificationSource();
const scopeChannelNotifications = scopeChannelNotificationsToEntity();
const resolved = resolveMarkEntitiesDoneVariables({
diff --git a/apps/web/src/features/next-soup/actions/mark-done-delegate.ts b/apps/web/src/features/next-soup/actions/mark-done-delegate.ts
new file mode 100644
index 0000000000..7c9c737fa8
--- /dev/null
+++ b/apps/web/src/features/next-soup/actions/mark-done-delegate.ts
@@ -0,0 +1,27 @@
+import type { EntityData } from '@entity';
+
+/**
+ * A list that completes its own rows. Home's work feed marks items done as
+ * feed items — acknowledging the notifications each row showed, scoped to
+ * that row (a channel without its threads) — rather than per entity.
+ */
+export type MarkDoneDelegate = {
+ /**
+ * Whether one of the delegate's rows can be completed, or undefined when
+ * the entity is not one of its rows. A row with nothing to acknowledge,
+ * such as the viewer's own recent work, cannot.
+ */
+ canComplete: (entity: EntityData) => boolean | undefined;
+ /**
+ * Prepare completing `entities`, or return undefined when any of them is
+ * not one of the delegate's rows; the entity path then runs instead.
+ */
+ prepare: (entities: readonly EntityData[]) => PreparedMarkDone | undefined;
+};
+
+export type PreparedMarkDone = {
+ /** Hide the rows now; returns a function that shows them again. */
+ hide: () => () => void;
+ /** Complete the rows; resolves to the function that reverses exactly this. */
+ commit: () => Promise<{ undo: () => Promise<void> }>;
+};
diff --git a/apps/web/src/features/next-soup/actions/use-entity-action-hotkeys.ts b/apps/web/src/features/next-soup/actions/use-entity-action-hotkeys.ts
index b6aa2abac0..27db2915fd 100644
--- a/apps/web/src/features/next-soup/actions/use-entity-action-hotkeys.ts
+++ b/apps/web/src/features/next-soup/actions/use-entity-action-hotkeys.ts
@@ -36,6 +36,7 @@ import {
makeSetCompanyPropertyAction,
makeShareAction,
} from './index';
+import type { MarkDoneDelegate } from './mark-done-delegate';
type UseEntityActionHotkeysOptions = {
scopeId: string;
@@ -51,6 +52,8 @@ type UseEntityActionHotkeysOptions = {
condition?: () => boolean;
/** Home previews reserve Delete/Backspace for the open editor. */
enableDeleteHotkey?: boolean;
+ /** A list that completes its own rows, such as Home's work feed. */
+ markDoneDelegate?: () => MarkDoneDelegate | undefined;
};
export const useEntityActionHotkeys = (
@@ -75,6 +78,7 @@ export const useEntityActionHotkeys = (
userId: () => userId(),
notificationSource: () => notificationSource,
hotkeyGroup: group,
+ delegate: options.markDoneDelegate,
});
const markNotDone = makeMarkNotDoneAction({
diff --git a/apps/web/src/features/soup/SoupEntityActionsMenu.test.tsx b/apps/web/src/features/soup/SoupEntityActionsMenu.test.tsx
index 03bff89fd0..66cac8159c 100644
--- a/apps/web/src/features/soup/SoupEntityActionsMenu.test.tsx
+++ b/apps/web/src/features/soup/SoupEntityActionsMenu.test.tsx
@@ -2,6 +2,7 @@ import type {
EntityActionListState,
EntityActionViewContext,
} from '@app/features/next-soup/actions';
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
import { cleanup, render } from '@solidjs/testing-library';
import { type JSX, Show } from 'solid-js';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
@@ -13,6 +14,9 @@ type TestGroup = {
const actions = vi.hoisted(() => ({
groups: [] as TestGroup[],
+ options: undefined as
+ | { markDoneDelegate?: () => MarkDoneDelegate | undefined }
+ | undefined,
}));
vi.mock('@components/app/split-layout/layoutUtils', () => ({
@@ -21,9 +25,10 @@ vi.mock('@components/app/split-layout/layoutUtils', () => ({
}),
}));
vi.mock('./createSoupEntityActions', () => ({
- createSoupEntityActions: () => ({
- buildActionGroups: () => actions.groups,
- }),
+ createSoupEntityActions: (options?: typeof actions.options) => {
+ actions.options = options;
+ return { buildActionGroups: () => actions.groups };
+ },
viewedProjectIdFromContent: () => undefined,
}));
vi.mock('@core/component/ContextMenu', () => ({
@@ -55,6 +60,26 @@ const renderMenu = (extraItems?: () => JSX.Element) =>
beforeEach(() => {
actions.groups = [group('Favorite'), group('Delete')];
+ actions.options = undefined;
+});
+
+describe('SoupEntityActionsMenu mark done', () => {
+ it('completes rows through the list that owns them', () => {
+ const delegate = {
+ canComplete: () => true,
+ prepare: () => undefined,
+ } satisfies MarkDoneDelegate;
+ render(() => (
+ <SoupEntityActionsMenu
+ entities={[]}
+ list={{} as EntityActionListState}
+ viewContext={viewContext}
+ markDoneDelegate={() => delegate}
+ />
+ ));
+
+ expect(actions.options?.markDoneDelegate?.()).toBe(delegate);
+ });
});
afterEach(cleanup);
diff --git a/apps/web/src/features/soup/SoupEntityActionsMenu.tsx b/apps/web/src/features/soup/SoupEntityActionsMenu.tsx
index 9fc2958b99..570801e512 100644
--- a/apps/web/src/features/soup/SoupEntityActionsMenu.tsx
+++ b/apps/web/src/features/soup/SoupEntityActionsMenu.tsx
@@ -2,6 +2,7 @@ import type {
EntityActionListState,
EntityActionViewContext,
} from '@app/features/next-soup/actions';
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
import { useSplitPanelOrThrow } from '@components/app/split-layout/layoutUtils';
import { MenuItem, MenuSeparator } from '@core/component/ContextMenu';
import type { EntityData } from '@entity';
@@ -20,11 +21,15 @@ interface SoupEntityActionsMenuProps {
onSetProject?: () => void;
/** Host-specific items shown after the entity actions. */
extraItems?: JSX.Element;
+ /** A list that completes its own rows, such as Home's work feed. */
+ markDoneDelegate?: () => MarkDoneDelegate | undefined;
}
export const SoupEntityActionsMenu = (props: SoupEntityActionsMenuProps) => {
const panel = useSplitPanelOrThrow();
- const { buildActionGroups } = createSoupEntityActions();
+ const { buildActionGroups } = createSoupEntityActions({
+ markDoneDelegate: () => props.markDoneDelegate?.(),
+ });
// Resolved rather than tested as JSX: a host whose items render nothing
// (label rows behind a flag, say) still passes a truthy element, and
// separating on that alone leaves a divider under the last action.
diff --git a/apps/web/src/features/soup/SoupEntityContextMenu.tsx b/apps/web/src/features/soup/SoupEntityContextMenu.tsx
index 3c3ec794da..0826d2c310 100644
--- a/apps/web/src/features/soup/SoupEntityContextMenu.tsx
+++ b/apps/web/src/features/soup/SoupEntityContextMenu.tsx
@@ -2,6 +2,7 @@ import type {
EntityActionListState,
EntityActionViewContext,
} from '@app/features/next-soup/actions';
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
import {
ContextMenuContent,
ContextMenuTrigger,
@@ -42,6 +43,8 @@ interface SoupEntityContextMenuProps {
* them. Desktop only: the mobile long-press drawer shows the actions alone.
*/
extraItems?: JSX.Element;
+ /** A list that completes its own rows, such as Home's work feed. Desktop only. */
+ markDoneDelegate?: () => MarkDoneDelegate | undefined;
}
export const SoupEntityContextMenu: FlowComponent<
@@ -102,6 +105,7 @@ export const SoupEntityContextMenu: FlowComponent<
onSetProject={pickers.openProjectPicker}
onEditTags={pickers.openTagPicker()}
extraItems={props.extraItems}
+ markDoneDelegate={props.markDoneDelegate}
/>
</ContextMenuContent>
</Show>
diff --git a/apps/web/src/features/soup/createSoupEntityActions.ts b/apps/web/src/features/soup/createSoupEntityActions.ts
index 08ba119194..814418b064 100644
--- a/apps/web/src/features/soup/createSoupEntityActions.ts
+++ b/apps/web/src/features/soup/createSoupEntityActions.ts
@@ -24,6 +24,7 @@ import {
makeRenameAction,
makeShareAction,
} from '@app/features/next-soup/actions';
+import type { MarkDoneDelegate } from '@app/features/next-soup/actions/mark-done-delegate';
import {
markCalendarNotificationSeenOnOpen,
openEntityInSplitFromUnifiedList,
@@ -89,7 +90,12 @@ export const viewedProjectIdFromContent = (content: {
? content.id
: undefined;
-export function createSoupEntityActions(): {
+export function createSoupEntityActions(
+ options: {
+ /** A list that completes its own rows, such as Home's work feed. */
+ markDoneDelegate?: () => MarkDoneDelegate | undefined;
+ } = {}
+): {
buildActionGroups: BuildActionGroups;
isFavorited: (entity: EntityData) => boolean;
} {
@@ -102,6 +108,7 @@ export function createSoupEntityActions(): {
const markDone = makeMarkDoneAction({
userId: () => userId(),
notificationSource: () => notificationSource,
+ delegate: options.markDoneDelegate,
});
const markNotDone = makeMarkNotDoneAction({
diff --git a/apps/web/src/lib/queries/mutation-coverage.test.ts b/apps/web/src/lib/queries/mutation-coverage.test.ts
index 6d5f1ba8c8..d182315096 100644
--- a/apps/web/src/lib/queries/mutation-coverage.test.ts
+++ b/apps/web/src/lib/queries/mutation-coverage.test.ts
@@ -22,6 +22,8 @@ const policies = {
UpdateCalendarEvent: 'custom: event and occurrence edits',
DeleteCalendarEvent: 'custom: event and occurrence removal',
RespondToCalendarEvent: 'custom: attendee response',
+ MarkWorkFeedItemsDone:
+ 'custom: feed rows stay hidden until the server removes them',
CreateInitiative: 'authoritative: server assigns the project ID',
DeleteInitiative:
'authoritative: boolean response; membership refresh after success',
@@ -37,6 +39,8 @@ const policies = {
RecordChannelActivity: 'authoritative: server event identity and timestamps',
UpdateNotificationsForEntity:
'authoritative: exact affected notification IDs required for undo',
+ UndoWorkFeedItemsDone:
+ 'authoritative: the server returns the restored feed entries',
MoveEntities: 'inactive: UI uses other transports',
UpdateEntitySharePolicies: 'inactive: UI uses other transports',
TrashEntities: 'inactive: UI uses other transports',
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
index 8151538ed1..80142797d3 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
@@ -1600,6 +1600,12 @@ export type MarkEmailThreadUnreadInput = {
threadId: string | number;
};
+/** Input for marking work feed items done. */
+export type MarkWorkFeedItemsDoneInput = {
+ /** The items to complete, at most 200. */
+ items: Array<WorkFeedDoneItemInput>;
+};
+
/** One entity move in a batch. */
export type MoveEntityInput = {
/** Entity to move. */
@@ -1819,6 +1825,14 @@ export type TimedEventTimeInput = {
timeZone?: string | null | undefined;
};
+/** Input for undoing one mark-done. */
+export type UndoWorkFeedItemsDoneInput = {
+ /** The feed the restored items are placed in. */
+ scope?: WorkFeedScopeInput | null | undefined;
+ /** The `undoToken` the mark-done returned. */
+ undoToken: string;
+};
+
/** Patch an event; omitted fields are left untouched. */
export type UpdateCalendarEventInput = {
/** Replacement attendee list. */
@@ -1907,6 +1921,113 @@ export type UpdateNotificationsInput = {
operation: NotificationUpdateOperation;
};
+/** One item to mark done. */
+export type WorkFeedDoneItemInput = {
+ /** The item's id. */
+ id: string | number;
+ /**
+ * The entry's `revision` the caller observed. Reasons newer than it
+ * stay active. Omit to acknowledge everything current.
+ */
+ revision?: string | null | undefined;
+};
+
+/** Page request for the viewer's work feed. */
+export type WorkFeedInput = {
+ /**
+ * Opaque cursor from the previous page's `nextCursor`; absent for the
+ * first page. Send it with the same scope.
+ */
+ cursor?: string | null | undefined;
+ /** Page size; defaults to 50, capped at 100. */
+ limit?: number | null | undefined;
+ /** Which items the feed shows. */
+ scope?: WorkFeedScopeInput | null | undefined;
+};
+
+/** An item's state for its viewer. */
+export type WorkFeedItemState =
+ /** Every notification the viewer observed was completed. */
+ | 'DONE'
+ /** Every active reason has been seen. */
+ | 'SEEN'
+ /** At least one active reason is unseen. */
+ | 'UNSEEN';
+
+/** The kinds of item a work feed can be narrowed to. */
+export type WorkFeedItemType =
+ /** Agent sessions. */
+ | 'AGENT_SESSION'
+ /** Calendar reminders. */
+ | 'CALENDAR_EVENT'
+ /** Channel activity outside a dedicated thread item. */
+ | 'CHANNEL'
+ /** One channel thread. */
+ | 'CHANNEL_THREAD'
+ /** AI chats. */
+ | 'CHAT'
+ /** Documents and tasks. */
+ | 'DOCUMENT'
+ /** Email threads. */
+ | 'EMAIL'
+ /** Projects. */
+ | 'PROJECT'
+ /** GitHub pull requests. */
+ | 'PULL_REQUEST';
+
+/** Which reasons admit items to a work feed. */
+export type WorkFeedMode =
+ /** Outstanding attention only. */
+ | 'ATTENTION'
+ /** Outstanding attention plus the viewer's recent own work. */
+ | 'WORK';
+
+/** Why an entry is presented the way it is in its feed. */
+export type WorkFeedPrimaryReason =
+ /**
+ * Incoming attention is the newest reason: present and open the
+ * primary stack.
+ */
+ | 'ATTENTION'
+ /** The viewer's own work is the newest reason: open the entity. */
+ | 'OWN_WORK';
+
+/**
+ * Which items a work feed shows. Pages, subscriptions and undo for one feed
+ * send the same scope.
+ */
+export type WorkFeedScopeInput = {
+ /** Whether snippet documents are included. Defaults to false. */
+ includeSnippets?: boolean | null | undefined;
+ /** Which reasons admit items. Defaults to `WORK`. */
+ mode?: WorkFeedMode | null | undefined;
+ /** Item kinds to include; omitted or empty means every kind. */
+ types?: Array<WorkFeedItemType> | null | undefined;
+};
+
+/** How one stack groups its notifications. */
+export type WorkFeedStackKind =
+ /** One root mention in a channel whose thread has no replies yet. */
+ | 'CHANNEL_MENTION'
+ /** New root messages in a channel. */
+ | 'CHANNEL_MESSAGES'
+ /** Reactions to the viewer's channel messages. */
+ | 'CHANNEL_REACTIONS'
+ /** Replies, thread mentions and the absorbed root of one channel thread. */
+ | 'CHANNEL_THREAD'
+ /** Standalone root comments on a document. */
+ | 'COMMENTS'
+ /** A standalone mention in a document comment. */
+ | 'COMMENT_MENTION'
+ /** Several comments, replies or mentions in one document comment thread. */
+ | 'COMMENT_THREAD'
+ /** One discussion thread on a project, company or contact. */
+ | 'DISCUSSION'
+ /** Mentions of a document in channels. */
+ | 'DOCUMENT_MENTIONS'
+ /** Any other single event. */
+ | 'EVENT';
+
export type ActivityUpdatesSubscriptionVariables = Exact<{ [key: string]: never; }>;
@@ -16095,6 +16216,726 @@ export type SoupNotificationsEntityFieldsFragment =
| SoupNotificationsEntityFields_GraphqlSoupProject_Fragment
;
+export type WorkFeedEntryFieldsFragment = { sortAt: string, touchedAt: string | null, revision: string, primaryReason: WorkFeedPrimaryReason, primaryStackIndex: number | null, item: { id: string, state: WorkFeedItemState, attentionAt: string | null, unseenCount: number, entity:
+ | { __typename: 'GraphqlSoupAgentSession', isArchived: boolean, ownerId: string, botId: string, harness: string, repoUrl: string | null, repoBranch: string | null, pullRequestUrl: string | null, workingBranch: string | null, pullRequestState: GraphqlAgentPullRequestState | null, pullRequestId: string | null, turnState: string | null, threadId: string | null, status: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, sessionName: string, bot: { id: string, name: string, avatarUrl: string | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCalendarEvent', time: unknown, conferenceUrl: string | null, isReadOnly: boolean, ownerId: string, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, calendarEventTitle: string, calendarEventStatus: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCall', channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, callChannelId: string | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, guests: Array<{ id: string, displayName: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupChannel', channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, isParticipant: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
+ | { __typename: 'GraphqlSoupChannelMessage', channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupChat', model: string | null, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmContact', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, companyId: string, companyName: string, email: string, hidden: boolean, firstInteraction: string, lastInteraction: string, createdAt: string, updatedAt: string, viewedAt: string | null, contactTeamId: string, crmContactName: string | null }
+ | { __typename: 'GraphqlSoupDatabaseRow', tableId: string, databaseId: string, position: string, ownerId: string, creatorId: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, documentName: string, subType:
+ | { __typename: 'GraphqlInitiativeDescriptionSubType' }
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string, latestInboundMessageTs: string | null, reminderReturnedAt: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, isSignal: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, emailName: string | null, mailDraftState: { baseline: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null }, drafts: Array<{ id: string, macroDraft: boolean, facts: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null } }> } | null, mailAllPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailDraftPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailSentPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ __typename: 'GraphqlSoupEmailLabel', id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, metadata: { ownerId: string | null, createdAt: string | null, updatedAt: string | null, viewedAt: string | null }, viewerPermission:
+ | { __typename: 'GraphqlAccessLevelPermission', accessLevel: GraphqlEntityAccessLevel }
+ | { __typename: 'GraphqlChannelRolePermission' }
+ | { __typename: 'GraphqlChannelViewOnlyPermission' }
+ | { __typename: 'GraphqlTeamRolePermission' }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ , stacks: Array<{ kind: WorkFeedStackKind, threadId: string | null, latestAt: string, unseen: boolean, count: number, notifications: Array<{ __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageReactionMetadata', channelMessageReactionMessageId: string, channelMessageReactionThreadId: string | null, channelMessageReactionMessageContent: string, channelMessageReactionEmoji: string, channelMessageReactionChannelType: GraphqlNotificationChannelType, channelMessageReactionChannelName: string, channelMessageReactionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlCrmDiscussionMetadata', crmDiscussionRecordName: string, crmDiscussionReason: GraphqlCrmDiscussionReason, crmDiscussionMessageId: string, crmDiscussionThreadId: string, crmDiscussionText: string, crmDiscussionSenderDisplayName: string | null, crmDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInitiativeDiscussionMetadata', initiativeDiscussionProjectName: string, initiativeDiscussionOwner: string, initiativeDiscussionReason: GraphqlInitiativeDiscussionReason, initiativeDiscussionMessageId: string, initiativeDiscussionThreadId: string, initiativeDiscussionText: string, initiativeDiscussionSenderDisplayName: string | null, initiativeDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string, reminderScheduledFor: string | null }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }> } };
+
+type WorkFeedPatchFields_WorkFeedEntryRemoved_Fragment = { __typename: 'WorkFeedEntryRemoved', itemId: string };
+
+type WorkFeedPatchFields_WorkFeedEntryUpserted_Fragment = { __typename: 'WorkFeedEntryUpserted', entry: { sortAt: string, touchedAt: string | null, revision: string, primaryReason: WorkFeedPrimaryReason, primaryStackIndex: number | null, item: { id: string, state: WorkFeedItemState, attentionAt: string | null, unseenCount: number, entity:
+ | { __typename: 'GraphqlSoupAgentSession', isArchived: boolean, ownerId: string, botId: string, harness: string, repoUrl: string | null, repoBranch: string | null, pullRequestUrl: string | null, workingBranch: string | null, pullRequestState: GraphqlAgentPullRequestState | null, pullRequestId: string | null, turnState: string | null, threadId: string | null, status: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, sessionName: string, bot: { id: string, name: string, avatarUrl: string | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCalendarEvent', time: unknown, conferenceUrl: string | null, isReadOnly: boolean, ownerId: string, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, calendarEventTitle: string, calendarEventStatus: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCall', channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, callChannelId: string | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, guests: Array<{ id: string, displayName: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupChannel', channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, isParticipant: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
+ | { __typename: 'GraphqlSoupChannelMessage', channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupChat', model: string | null, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmContact', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, companyId: string, companyName: string, email: string, hidden: boolean, firstInteraction: string, lastInteraction: string, createdAt: string, updatedAt: string, viewedAt: string | null, contactTeamId: string, crmContactName: string | null }
+ | { __typename: 'GraphqlSoupDatabaseRow', tableId: string, databaseId: string, position: string, ownerId: string, creatorId: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, documentName: string, subType:
+ | { __typename: 'GraphqlInitiativeDescriptionSubType' }
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string, latestInboundMessageTs: string | null, reminderReturnedAt: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, isSignal: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, emailName: string | null, mailDraftState: { baseline: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null }, drafts: Array<{ id: string, macroDraft: boolean, facts: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null } }> } | null, mailAllPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailDraftPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailSentPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ __typename: 'GraphqlSoupEmailLabel', id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, metadata: { ownerId: string | null, createdAt: string | null, updatedAt: string | null, viewedAt: string | null }, viewerPermission:
+ | { __typename: 'GraphqlAccessLevelPermission', accessLevel: GraphqlEntityAccessLevel }
+ | { __typename: 'GraphqlChannelRolePermission' }
+ | { __typename: 'GraphqlChannelViewOnlyPermission' }
+ | { __typename: 'GraphqlTeamRolePermission' }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ , stacks: Array<{ kind: WorkFeedStackKind, threadId: string | null, latestAt: string, unseen: boolean, count: number, notifications: Array<{ __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageReactionMetadata', channelMessageReactionMessageId: string, channelMessageReactionThreadId: string | null, channelMessageReactionMessageContent: string, channelMessageReactionEmoji: string, channelMessageReactionChannelType: GraphqlNotificationChannelType, channelMessageReactionChannelName: string, channelMessageReactionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlCrmDiscussionMetadata', crmDiscussionRecordName: string, crmDiscussionReason: GraphqlCrmDiscussionReason, crmDiscussionMessageId: string, crmDiscussionThreadId: string, crmDiscussionText: string, crmDiscussionSenderDisplayName: string | null, crmDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInitiativeDiscussionMetadata', initiativeDiscussionProjectName: string, initiativeDiscussionOwner: string, initiativeDiscussionReason: GraphqlInitiativeDiscussionReason, initiativeDiscussionMessageId: string, initiativeDiscussionThreadId: string, initiativeDiscussionText: string, initiativeDiscussionSenderDisplayName: string | null, initiativeDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string, reminderScheduledFor: string | null }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }> } } };
+
+type WorkFeedPatchFields_WorkFeedInvalidated_Fragment = { __typename: 'WorkFeedInvalidated', refresh: boolean };
+
+export type WorkFeedPatchFieldsFragment =
+ | WorkFeedPatchFields_WorkFeedEntryRemoved_Fragment
+ | WorkFeedPatchFields_WorkFeedEntryUpserted_Fragment
+ | WorkFeedPatchFields_WorkFeedInvalidated_Fragment
+;
+
+export type WorkFeedQueryVariables = Exact<{
+ input?: WorkFeedInput | null | undefined;
+}>;
+
+
+export type WorkFeedQuery = { user: { id: string, workFeed: { nextCursor: string | null, entries: Array<{ sortAt: string, touchedAt: string | null, revision: string, primaryReason: WorkFeedPrimaryReason, primaryStackIndex: number | null, item: { id: string, state: WorkFeedItemState, attentionAt: string | null, unseenCount: number, entity:
+ | { __typename: 'GraphqlSoupAgentSession', isArchived: boolean, ownerId: string, botId: string, harness: string, repoUrl: string | null, repoBranch: string | null, pullRequestUrl: string | null, workingBranch: string | null, pullRequestState: GraphqlAgentPullRequestState | null, pullRequestId: string | null, turnState: string | null, threadId: string | null, status: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, sessionName: string, bot: { id: string, name: string, avatarUrl: string | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCalendarEvent', time: unknown, conferenceUrl: string | null, isReadOnly: boolean, ownerId: string, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, calendarEventTitle: string, calendarEventStatus: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCall', channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, callChannelId: string | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, guests: Array<{ id: string, displayName: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupChannel', channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, isParticipant: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
+ | { __typename: 'GraphqlSoupChannelMessage', channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupChat', model: string | null, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmContact', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, companyId: string, companyName: string, email: string, hidden: boolean, firstInteraction: string, lastInteraction: string, createdAt: string, updatedAt: string, viewedAt: string | null, contactTeamId: string, crmContactName: string | null }
+ | { __typename: 'GraphqlSoupDatabaseRow', tableId: string, databaseId: string, position: string, ownerId: string, creatorId: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, documentName: string, subType:
+ | { __typename: 'GraphqlInitiativeDescriptionSubType' }
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string, latestInboundMessageTs: string | null, reminderReturnedAt: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, isSignal: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, emailName: string | null, mailDraftState: { baseline: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null }, drafts: Array<{ id: string, macroDraft: boolean, facts: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null } }> } | null, mailAllPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailDraftPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailSentPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ __typename: 'GraphqlSoupEmailLabel', id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, metadata: { ownerId: string | null, createdAt: string | null, updatedAt: string | null, viewedAt: string | null }, viewerPermission:
+ | { __typename: 'GraphqlAccessLevelPermission', accessLevel: GraphqlEntityAccessLevel }
+ | { __typename: 'GraphqlChannelRolePermission' }
+ | { __typename: 'GraphqlChannelViewOnlyPermission' }
+ | { __typename: 'GraphqlTeamRolePermission' }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ , stacks: Array<{ kind: WorkFeedStackKind, threadId: string | null, latestAt: string, unseen: boolean, count: number, notifications: Array<{ __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageReactionMetadata', channelMessageReactionMessageId: string, channelMessageReactionThreadId: string | null, channelMessageReactionMessageContent: string, channelMessageReactionEmoji: string, channelMessageReactionChannelType: GraphqlNotificationChannelType, channelMessageReactionChannelName: string, channelMessageReactionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlCrmDiscussionMetadata', crmDiscussionRecordName: string, crmDiscussionReason: GraphqlCrmDiscussionReason, crmDiscussionMessageId: string, crmDiscussionThreadId: string, crmDiscussionText: string, crmDiscussionSenderDisplayName: string | null, crmDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInitiativeDiscussionMetadata', initiativeDiscussionProjectName: string, initiativeDiscussionOwner: string, initiativeDiscussionReason: GraphqlInitiativeDiscussionReason, initiativeDiscussionMessageId: string, initiativeDiscussionThreadId: string, initiativeDiscussionText: string, initiativeDiscussionSenderDisplayName: string | null, initiativeDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string, reminderScheduledFor: string | null }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }> } }> } } };
+
+export type MarkWorkFeedItemsDoneMutationVariables = Exact<{
+ input: MarkWorkFeedItemsDoneInput;
+}>;
+
+
+export type MarkWorkFeedItemsDoneMutation = { markWorkFeedItemsDone: { itemIds: Array<string>, undoToken: string } };
+
+export type UndoWorkFeedItemsDoneMutationVariables = Exact<{
+ input: UndoWorkFeedItemsDoneInput;
+}>;
+
+
+export type UndoWorkFeedItemsDoneMutation = { undoWorkFeedItemsDone: { patches: Array<
+ | { __typename: 'WorkFeedEntryRemoved', itemId: string }
+ | { __typename: 'WorkFeedEntryUpserted', entry: { sortAt: string, touchedAt: string | null, revision: string, primaryReason: WorkFeedPrimaryReason, primaryStackIndex: number | null, item: { id: string, state: WorkFeedItemState, attentionAt: string | null, unseenCount: number, entity:
+ | { __typename: 'GraphqlSoupAgentSession', isArchived: boolean, ownerId: string, botId: string, harness: string, repoUrl: string | null, repoBranch: string | null, pullRequestUrl: string | null, workingBranch: string | null, pullRequestState: GraphqlAgentPullRequestState | null, pullRequestId: string | null, turnState: string | null, threadId: string | null, status: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, sessionName: string, bot: { id: string, name: string, avatarUrl: string | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCalendarEvent', time: unknown, conferenceUrl: string | null, isReadOnly: boolean, ownerId: string, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, calendarEventTitle: string, calendarEventStatus: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCall', channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, callChannelId: string | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, guests: Array<{ id: string, displayName: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupChannel', channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, isParticipant: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
+ | { __typename: 'GraphqlSoupChannelMessage', channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupChat', model: string | null, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmContact', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, companyId: string, companyName: string, email: string, hidden: boolean, firstInteraction: string, lastInteraction: string, createdAt: string, updatedAt: string, viewedAt: string | null, contactTeamId: string, crmContactName: string | null }
+ | { __typename: 'GraphqlSoupDatabaseRow', tableId: string, databaseId: string, position: string, ownerId: string, creatorId: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, documentName: string, subType:
+ | { __typename: 'GraphqlInitiativeDescriptionSubType' }
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string, latestInboundMessageTs: string | null, reminderReturnedAt: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, isSignal: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, emailName: string | null, mailDraftState: { baseline: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null }, drafts: Array<{ id: string, macroDraft: boolean, facts: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null } }> } | null, mailAllPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailDraftPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailSentPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ __typename: 'GraphqlSoupEmailLabel', id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, metadata: { ownerId: string | null, createdAt: string | null, updatedAt: string | null, viewedAt: string | null }, viewerPermission:
+ | { __typename: 'GraphqlAccessLevelPermission', accessLevel: GraphqlEntityAccessLevel }
+ | { __typename: 'GraphqlChannelRolePermission' }
+ | { __typename: 'GraphqlChannelViewOnlyPermission' }
+ | { __typename: 'GraphqlTeamRolePermission' }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ , stacks: Array<{ kind: WorkFeedStackKind, threadId: string | null, latestAt: string, unseen: boolean, count: number, notifications: Array<{ __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageReactionMetadata', channelMessageReactionMessageId: string, channelMessageReactionThreadId: string | null, channelMessageReactionMessageContent: string, channelMessageReactionEmoji: string, channelMessageReactionChannelType: GraphqlNotificationChannelType, channelMessageReactionChannelName: string, channelMessageReactionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlCrmDiscussionMetadata', crmDiscussionRecordName: string, crmDiscussionReason: GraphqlCrmDiscussionReason, crmDiscussionMessageId: string, crmDiscussionThreadId: string, crmDiscussionText: string, crmDiscussionSenderDisplayName: string | null, crmDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInitiativeDiscussionMetadata', initiativeDiscussionProjectName: string, initiativeDiscussionOwner: string, initiativeDiscussionReason: GraphqlInitiativeDiscussionReason, initiativeDiscussionMessageId: string, initiativeDiscussionThreadId: string, initiativeDiscussionText: string, initiativeDiscussionSenderDisplayName: string | null, initiativeDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string, reminderScheduledFor: string | null }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }> } } }
+ | { __typename: 'WorkFeedInvalidated', refresh: boolean }
+ > } };
+
+export type WorkFeedUpdatesSubscriptionVariables = Exact<{
+ scope?: WorkFeedScopeInput | null | undefined;
+}>;
+
+
+export type WorkFeedUpdatesSubscription = { workFeedUpdates: Array<
+ | { __typename: 'WorkFeedEntryRemoved', itemId: string }
+ | { __typename: 'WorkFeedEntryUpserted', entry: { sortAt: string, touchedAt: string | null, revision: string, primaryReason: WorkFeedPrimaryReason, primaryStackIndex: number | null, item: { id: string, state: WorkFeedItemState, attentionAt: string | null, unseenCount: number, entity:
+ | { __typename: 'GraphqlSoupAgentSession', isArchived: boolean, ownerId: string, botId: string, harness: string, repoUrl: string | null, repoBranch: string | null, pullRequestUrl: string | null, workingBranch: string | null, pullRequestState: GraphqlAgentPullRequestState | null, pullRequestId: string | null, turnState: string | null, threadId: string | null, status: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, sessionName: string, bot: { id: string, name: string, avatarUrl: string | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCalendarEvent', time: unknown, conferenceUrl: string | null, isReadOnly: boolean, ownerId: string, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, calendarEventTitle: string, calendarEventStatus: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCall', channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, callChannelId: string | null, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, guests: Array<{ id: string, displayName: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupChannel', channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, isParticipant: boolean, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { messageId: string, channelId: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
+ | { __typename: 'GraphqlSoupChannelMessage', channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupChat', model: string | null, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmCompany', description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupCrmContact', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, companyId: string, companyName: string, email: string, hidden: boolean, firstInteraction: string, lastInteraction: string, createdAt: string, updatedAt: string, viewedAt: string | null, contactTeamId: string, crmContactName: string | null }
+ | { __typename: 'GraphqlSoupDatabaseRow', tableId: string, databaseId: string, position: string, ownerId: string, creatorId: string | null, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupDocument', ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, documentName: string, subType:
+ | { __typename: 'GraphqlInitiativeDescriptionSubType' }
+ | { __typename: 'GraphqlSkillSubType' }
+ | { __typename: 'GraphqlSnippetSubType' }
+ | { __typename: 'GraphqlTaskSubType', isCompleted: boolean }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupEmailThread', providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string, latestInboundMessageTs: string | null, reminderReturnedAt: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, isSignal: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, emailName: string | null, mailDraftState: { baseline: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null }, drafts: Array<{ id: string, macroDraft: boolean, facts: { messageCount: number, inboxVisible: boolean, isRead: boolean, isSignal: boolean, hasCalendarAttachment: boolean, latestInboundMessageTs: string | null, latestNonSpamMessageTs: string | null, latestOutboundMessageTs: string | null, previewTs: string | null, preview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null } }> } | null, mailAllPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailDraftPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, mailSentPreview: { id: string, subject: string | null, snippet: string | null, isDraft: boolean, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null } | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ __typename: 'GraphqlSoupEmailLabel', id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupForeignEntity', foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, sourceMetadata: unknown, createdAt: string, updatedAt: string, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean }
+ | { __typename: 'GraphqlSoupInitiative', cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, metadata: { ownerId: string | null, createdAt: string | null, updatedAt: string | null, viewedAt: string | null }, viewerPermission:
+ | { __typename: 'GraphqlAccessLevelPermission', accessLevel: GraphqlEntityAccessLevel }
+ | { __typename: 'GraphqlChannelRolePermission' }
+ | { __typename: 'GraphqlChannelViewOnlyPermission' }
+ | { __typename: 'GraphqlTeamRolePermission' }
+ | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ | { __typename: 'GraphqlSoupProject', ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, cacheProjection: string | null, frecencyScore: number | null, id: string, entityType: GraphqlSoupEntityType, displayName: string | null, isFavorited: boolean, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }> }
+ , stacks: Array<{ kind: WorkFeedStackKind, threadId: string | null, latestAt: string, unseen: boolean, count: number, notifications: Array<{ __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, state: NotificationState, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata:
+ | { __typename: 'GraphqlAgentSessionMentionedMetadata', agentSessionMentionedMentionedBy: string | null, agentSessionMentionedActionId: string, agentSessionMentionedSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionSettledMetadata', agentSessionSettledTurn: number, agentSessionSettledActor: string | null, agentSessionSettledStopReason: string, agentSessionSettledExcerpt: string | null, agentSessionSettledSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAgentSessionWaitingForInputMetadata', agentSessionWaitingForInputTurn: number, agentSessionWaitingForInputQuestion: string, agentSessionWaitingForInputSession: { sessionId: string, sessionName: string, botId: string, botName: string, channelId: string | null, threadId: string | null, announcementMessageId: string | null } }
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionHasAttachments: boolean, channelMentionSenderDisplayName: string | null, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null, channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionThreadId: string | null, channelMentionChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelMessageReactionMetadata', channelMessageReactionMessageId: string, channelMessageReactionThreadId: string | null, channelMessageReactionMessageContent: string, channelMessageReactionEmoji: string, channelMessageReactionChannelType: GraphqlNotificationChannelType, channelMessageReactionChannelName: string, channelMessageReactionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendMessageContent: string, channelMessageSendHasAttachments: boolean, channelMessageSendSenderDisplayName: string | null, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null, channelMessageSendSender: string | null, channelMessageSendMessageId: string, channelMessageSendChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyHasAttachments: boolean, channelReplySenderDisplayName: string | null, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null, channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplyMessageContent: string, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: string, commentedOnDocumentThreadId: string, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null, commentedOnDocumentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlCrmDiscussionMetadata', crmDiscussionRecordName: string, crmDiscussionReason: GraphqlCrmDiscussionReason, crmDiscussionMessageId: string, crmDiscussionThreadId: string, crmDiscussionText: string, crmDiscussionSenderDisplayName: string | null, crmDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInitiativeDiscussionMetadata', initiativeDiscussionProjectName: string, initiativeDiscussionOwner: string, initiativeDiscussionReason: GraphqlInitiativeDiscussionReason, initiativeDiscussionMessageId: string, initiativeDiscussionThreadId: string, initiativeDiscussionText: string, initiativeDiscussionSenderDisplayName: string | null, initiativeDiscussionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: string, mentionedInDocumentCommentThreadId: string, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null, mentionedInDocumentCommentSenderDisplayName: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string, reminderScheduledFor: string | null }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: string, repliedToDocumentCommentThreadThreadId: string, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null, repliedToDocumentCommentThreadSenderDisplayName: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }> }> } } }
+ | { __typename: 'WorkFeedInvalidated', refresh: boolean }
+ > };
+
export const ActivityEventFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<ActivityEventFieldsFragment, unknown>;
export const EntityActivityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityActivityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<EntityActivityFieldsFragment, unknown>;
export const CalendarFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CalendarFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendar"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"isWritable"}},{"kind":"Field","name":{"kind":"Name","value":"isSubscription"}},{"kind":"Field","name":{"kind":"Name","value":"syncError"}},{"kind":"Field","name":{"kind":"Name","value":"defaultReminders"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"method"}},{"kind":"Field","name":{"kind":"Name","value":"minutes"}}]}}]}}]} as unknown as DocumentNode<CalendarFieldsFragment, unknown>;
@@ -16148,6 +16989,8 @@ export const MailItemFieldsFragmentDoc = {"kind":"Document","definitions":[{"kin
export const SoupEntityCoreFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<SoupEntityCoreFieldsFragment, unknown>;
export const MailAccountFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailAccountFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEmailLink"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"needsReauth"}},{"kind":"Field","name":{"kind":"Name","value":"draftIsSignal"}},{"kind":"Field","name":{"kind":"Name","value":"settings"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"signature"}},{"kind":"Field","name":{"kind":"Name","value":"signatureOnRepliesForwards"}}]}}]}}]} as unknown as DocumentNode<MailAccountFieldsFragment, unknown>;
export const SoupNotificationsEntityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationsEntityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<SoupNotificationsEntityFieldsFragment, unknown>;
+export const WorkFeedEntryFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedEntryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sortAt"}},{"kind":"Field","name":{"kind":"Name","value":"touchedAt"}},{"kind":"Field","name":{"kind":"Name","value":"revision"}},{"kind":"Field","name":{"kind":"Name","value":"primaryReason"}},{"kind":"Field","name":{"kind":"Name","value":"primaryStackIndex"}},{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"attentionAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseenCount"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"latestAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseen"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftAggregateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftAggregate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageCount"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"hasCalendarAttachment"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestNonSpamMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestOutboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"previewTs"}},{"kind":"Field","name":{"kind":"Name","value":"preview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftState"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"baseline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"drafts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroDraft"}},{"kind":"Field","name":{"kind":"Name","value":"facts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlCrmContactFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmContact"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"contactTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"companyId"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","alias":{"kind":"Name","value":"crmContactName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"firstInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"lastInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDatabaseRow"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tableId"}},{"kind":"Field","name":{"kind":"Name","value":"databaseId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"creatorId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"reminderReturnedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftState"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftStateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isParticipant"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callChannelId"},"name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GraphqlCrmContactFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<WorkFeedEntryFieldsFragment, unknown>;
+export const WorkFeedPatchFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryUpserted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entry"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedEntryFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"itemId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedInvalidated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refresh"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftAggregateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftAggregate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageCount"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"hasCalendarAttachment"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestNonSpamMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestOutboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"previewTs"}},{"kind":"Field","name":{"kind":"Name","value":"preview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftState"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"baseline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"drafts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroDraft"}},{"kind":"Field","name":{"kind":"Name","value":"facts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlCrmContactFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmContact"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"contactTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"companyId"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","alias":{"kind":"Name","value":"crmContactName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"firstInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"lastInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDatabaseRow"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tableId"}},{"kind":"Field","name":{"kind":"Name","value":"databaseId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"creatorId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"reminderReturnedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftState"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftStateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isParticipant"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callChannelId"},"name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GraphqlCrmContactFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedEntryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sortAt"}},{"kind":"Field","name":{"kind":"Name","value":"touchedAt"}},{"kind":"Field","name":{"kind":"Name","value":"revision"}},{"kind":"Field","name":{"kind":"Name","value":"primaryReason"}},{"kind":"Field","name":{"kind":"Name","value":"primaryStackIndex"}},{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"attentionAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseenCount"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"latestAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseen"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}}]} as unknown as DocumentNode<WorkFeedPatchFieldsFragment, unknown>;
export const ActivityUpdatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"ActivityUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activityUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityInvalidation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refresh"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<ActivityUpdatesSubscription, ActivityUpdatesSubscriptionVariables>;
export const MyActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ActivityFeedInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActivityEventFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityEventFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actorId"}},{"kind":"Field","name":{"kind":"Name","value":"subjectId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"occurredAt"}},{"kind":"Field","name":{"kind":"Name","value":"action"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityPropertyChanged"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"property"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantAdded"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityParticipantRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"participant"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityCallStarted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"callId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlActivityUnknownAction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tag"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]} as unknown as DocumentNode<MyActivityQuery, MyActivityQueryVariables>;
export const MyActivityOverviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyActivityOverview"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ActivityOverviewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activityOverview"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","name":{"kind":"Name","value":"total"}},{"kind":"Field","name":{"kind":"Name","value":"days"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"date"}},{"kind":"Field","name":{"kind":"Name","value":"count"}}]}},{"kind":"Field","name":{"kind":"Name","value":"topEntities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"count"}}]}}]}}]}}]}}]} as unknown as DocumentNode<MyActivityOverviewQuery, MyActivityOverviewQueryVariables>;
@@ -16218,4 +17061,8 @@ export const SoupSharedMailBackfillDocument = {"kind":"Document","definitions":[
export const MailAccountsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MailAccounts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"emailLinks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailAccountFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailAccountFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEmailLink"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroId"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"}},{"kind":"Field","name":{"kind":"Name","value":"photoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isPrimary"}},{"kind":"Field","name":{"kind":"Name","value":"needsReauth"}},{"kind":"Field","name":{"kind":"Name","value":"draftIsSignal"}},{"kind":"Field","name":{"kind":"Name","value":"settings"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"signature"}},{"kind":"Field","name":{"kind":"Name","value":"signatureOnRepliesForwards"}}]}}]}}]} as unknown as DocumentNode<MailAccountsQuery, MailAccountsQueryVariables>;
export const UpdateEntityPropertyOptionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateEntityPropertyOptions"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateEntityPropertyOptionsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateEntityPropertyOptions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}}]} as unknown as DocumentNode<UpdateEntityPropertyOptionsMutation, UpdateEntityPropertyOptionsMutationVariables>;
export const SoupNotificationsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SoupNotifications"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SoupInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"soup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationsEntityFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationsEntityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]} as unknown as DocumentNode<SoupNotificationsQuery, SoupNotificationsQueryVariables>;
+export const WorkFeedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkFeed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workFeed"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedEntryFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftAggregateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftAggregate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageCount"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"hasCalendarAttachment"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestNonSpamMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestOutboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"previewTs"}},{"kind":"Field","name":{"kind":"Name","value":"preview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftState"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"baseline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"drafts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroDraft"}},{"kind":"Field","name":{"kind":"Name","value":"facts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlCrmContactFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmContact"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"contactTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"companyId"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","alias":{"kind":"Name","value":"crmContactName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"firstInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"lastInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDatabaseRow"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tableId"}},{"kind":"Field","name":{"kind":"Name","value":"databaseId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"creatorId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"reminderReturnedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftState"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftStateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isParticipant"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callChannelId"},"name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GraphqlCrmContactFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedEntryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sortAt"}},{"kind":"Field","name":{"kind":"Name","value":"touchedAt"}},{"kind":"Field","name":{"kind":"Name","value":"revision"}},{"kind":"Field","name":{"kind":"Name","value":"primaryReason"}},{"kind":"Field","name":{"kind":"Name","value":"primaryStackIndex"}},{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"attentionAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseenCount"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"latestAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseen"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}}]} as unknown as DocumentNode<WorkFeedQuery, WorkFeedQueryVariables>;
+export const MarkWorkFeedItemsDoneDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"MarkWorkFeedItemsDone"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"MarkWorkFeedItemsDoneInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"markWorkFeedItemsDone"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"itemIds"}},{"kind":"Field","name":{"kind":"Name","value":"undoToken"}}]}}]}}]} as unknown as DocumentNode<MarkWorkFeedItemsDoneMutation, MarkWorkFeedItemsDoneMutationVariables>;
+export const UndoWorkFeedItemsDoneDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UndoWorkFeedItemsDone"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UndoWorkFeedItemsDoneInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"undoWorkFeedItemsDone"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"patches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedPatchFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftAggregateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftAggregate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageCount"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"hasCalendarAttachment"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestNonSpamMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestOutboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"previewTs"}},{"kind":"Field","name":{"kind":"Name","value":"preview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftState"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"baseline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"drafts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroDraft"}},{"kind":"Field","name":{"kind":"Name","value":"facts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlCrmContactFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmContact"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"contactTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"companyId"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","alias":{"kind":"Name","value":"crmContactName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"firstInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"lastInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDatabaseRow"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tableId"}},{"kind":"Field","name":{"kind":"Name","value":"databaseId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"creatorId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"reminderReturnedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftState"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftStateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isParticipant"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callChannelId"},"name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GraphqlCrmContactFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedEntryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sortAt"}},{"kind":"Field","name":{"kind":"Name","value":"touchedAt"}},{"kind":"Field","name":{"kind":"Name","value":"revision"}},{"kind":"Field","name":{"kind":"Name","value":"primaryReason"}},{"kind":"Field","name":{"kind":"Name","value":"primaryStackIndex"}},{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"attentionAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseenCount"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"latestAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseen"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryUpserted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entry"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedEntryFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"itemId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedInvalidated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refresh"}}]}}]}}]} as unknown as DocumentNode<UndoWorkFeedItemsDoneMutation, UndoWorkFeedItemsDoneMutationVariables>;
+export const WorkFeedUpdatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"WorkFeedUpdates"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"scope"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedScopeInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workFeedUpdates"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"scope"},"value":{"kind":"Variable","name":{"kind":"Name","value":"scope"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedPatchFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityIdentityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyValueFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlBooleanPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"boolValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNumberPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"numberValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlStringPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"stringValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDatePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"dateValue"},"name":{"kind":"Name","value":"value"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSelectOptionPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"optionIds"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityReferencePropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"references"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"specificMessageId"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlLinkPropertyValue"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"urls"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPropertyFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlProperty"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"propertyDefinitionId"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"dataType"}},{"kind":"Field","name":{"kind":"Name","value":"isMultiSelect"}},{"kind":"Field","name":{"kind":"Name","value":"specificEntityType"}},{"kind":"Field","name":{"kind":"Name","value":"isSystem"}},{"kind":"Field","name":{"kind":"Name","value":"isMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"value"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyValueFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MailPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailPreviewMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftAggregateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftAggregate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageCount"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"hasCalendarAttachment"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestNonSpamMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"latestOutboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"previewTs"}},{"kind":"Field","name":{"kind":"Name","value":"preview"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraftStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMailDraftState"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"baseline"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"drafts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"macroDraft"}},{"kind":"Field","name":{"kind":"Name","value":"facts"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftAggregateFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessagePreview"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mentions"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"GraphqlCrmContactFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmContact"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"contactTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"companyId"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","alias":{"kind":"Name","value":"crmContactName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"firstInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"lastInteraction"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupItemPreviewFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"cacheProjection"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}]},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityIdentityFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupAgentSession"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"sessionName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isArchived"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"harness"}},{"kind":"Field","name":{"kind":"Name","value":"repoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"repoBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestUrl"}},{"kind":"Field","name":{"kind":"Name","value":"workingBranch"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestState"}},{"kind":"Field","name":{"kind":"Name","value":"pullRequestId"}},{"kind":"Field","name":{"kind":"Name","value":"turnState"}},{"kind":"Field","name":{"kind":"Name","value":"bot"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatarUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDatabaseRow"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"tableId"}},{"kind":"Field","name":{"kind":"Name","value":"databaseId"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"creatorId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupInitiative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewerPermission"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAccessLevelPermission"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accessLevel"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"subType"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskSubType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isCompleted"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"model"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"isPersistent"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"projectName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"parentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"deletedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"providerId"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"inboxVisible"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"latestInboundMessageTs"}},{"kind":"Field","name":{"kind":"Name","value":"reminderReturnedAt"}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftState"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraftStateFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailAllPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailDraftPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mailSentPreview"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"cacheOnly"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MailPreviewFields"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"emailName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"snippet"}},{"kind":"Field","name":{"kind":"Name","value":"senderEmail"}},{"kind":"Field","name":{"kind":"Name","value":"senderName"}},{"kind":"Field","name":{"kind":"Name","value":"senderPhotoUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isRead"}},{"kind":"Field","name":{"kind":"Name","value":"isDraft"}},{"kind":"Field","name":{"kind":"Name","value":"isImportant"}},{"kind":"Field","name":{"kind":"Name","value":"isSignal"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"sortTs"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"sfsPhotoUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"messageId"}},{"kind":"Field","name":{"kind":"Name","value":"providerAttachmentId"}},{"kind":"Field","name":{"kind":"Name","value":"filename"}},{"kind":"Field","name":{"kind":"Name","value":"mimeType"}},{"kind":"Field","name":{"kind":"Name","value":"sizeBytes"}},{"kind":"Field","name":{"kind":"Name","value":"contentId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"labels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"linkId"}},{"kind":"Field","name":{"kind":"Name","value":"providerLabelId"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"messageListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"labelListVisibility"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"organizationId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"interactedAt"}},{"kind":"Field","name":{"kind":"Name","value":"isParticipant"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"latestNonThreadMessage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupChannelMessageFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"effectiveUpdatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replyCount"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callChannelId"},"name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"channelName"}},{"kind":"Field","name":{"kind":"Name","value":"createdBy"}},{"kind":"Field","name":{"kind":"Name","value":"customName"}},{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"startedAt"}},{"kind":"Field","name":{"kind":"Name","value":"endedAt"}},{"kind":"Field","name":{"kind":"Name","value":"durationMs"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"attended"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","name":{"kind":"Name","value":"joinedAt"}},{"kind":"Field","name":{"kind":"Name","value":"leftAt"}}]}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"GraphqlCrmContactFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmCompanyName"},"name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"emailSync"}},{"kind":"Field","name":{"kind":"Name","value":"hidden"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"domains"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","name":{"kind":"Name","value":"foreignEntitySource"}},{"kind":"Field","name":{"kind":"Name","value":"storedForId"}},{"kind":"Field","name":{"kind":"Name","value":"storedForAuthEntity"}},{"kind":"Field","name":{"kind":"Name","value":"sourceMetadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCalendarEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"conferenceUrl"}},{"kind":"Field","name":{"kind":"Name","value":"isReadOnly"}},{"kind":"Field","name":{"kind":"Name","value":"ownerId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationStateFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sent"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"senderId"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlDocumentMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"documentMentionDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"documentMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMentionedInDocumentCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentMentionId"},"name":{"kind":"Name","value":"mentionId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"mentionedInDocumentCommentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlRepliedToDocumentCommentThreadMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"repliedToDocumentCommentThreadSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCommentedOnDocumentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentDocumentName"},"name":{"kind":"Name","value":"documentName"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentFileType"},"name":{"kind":"Name","value":"fileType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentCommentId"},"name":{"kind":"Name","value":"commentId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"commentedOnDocumentSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInitiativeDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionProjectName"},"name":{"kind":"Name","value":"projectName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"initiativeDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCrmDiscussionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionRecordName"},"name":{"kind":"Name","value":"recordName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionReason"},"name":{"kind":"Name","value":"reason"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionText"},"name":{"kind":"Name","value":"text"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"crmDiscussionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelInviteMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelInviteInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelInviteSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageReactionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionEmoji"},"name":{"kind":"Name","value":"emoji"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageReactionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyUserId"},"name":{"kind":"Name","value":"userId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyThreadParentSenderId"},"name":{"kind":"Name","value":"threadParentSenderId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelType"},"name":{"kind":"Name","value":"channelType"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCallStartedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"callStartedChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"callStartedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNewEmailMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"newEmailSender"},"name":{"kind":"Name","value":"sender"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailToEmail"},"name":{"kind":"Name","value":"toEmail"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSubject"},"name":{"kind":"Name","value":"subject"}},{"kind":"Field","alias":{"kind":"Name","value":"newEmailSnippet"},"name":{"kind":"Name","value":"snippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInboxReauthRequiredMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inboxReauthRequiredEmailAddress"},"name":{"kind":"Name","value":"emailAddress"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlInviteToTeamMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamName"},"name":{"kind":"Name","value":"teamName"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamId"},"name":{"kind":"Name","value":"teamId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamTeamInviteId"},"name":{"kind":"Name","value":"teamInviteId"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamInvitedBy"},"name":{"kind":"Name","value":"invitedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamRole"},"name":{"kind":"Name","value":"role"}},{"kind":"Field","alias":{"kind":"Name","value":"inviteToTeamSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlTaskAssignedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskId"},"name":{"kind":"Name","value":"taskId"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedTaskName"},"name":{"kind":"Name","value":"taskName"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSubType"},"name":{"kind":"Name","value":"subType"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedAssignedBy"},"name":{"kind":"Name","value":"assignedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"taskAssignedSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderReminderId"},"name":{"kind":"Name","value":"reminderId"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","alias":{"kind":"Name","value":"reminderScheduledFor"},"name":{"kind":"Name","value":"scheduledFor"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCalendarEventReminderMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEventId"},"name":{"kind":"Name","value":"eventId"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderOccurrenceKey"},"name":{"kind":"Name","value":"occurrenceKey"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartsAt"},"name":{"kind":"Name","value":"startsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderEndsAt"},"name":{"kind":"Name","value":"endsAt"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderStartDate"},"name":{"kind":"Name","value":"startDate"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderTimeZone"},"name":{"kind":"Name","value":"timeZone"}},{"kind":"Field","alias":{"kind":"Name","value":"calendarEventReminderMinutesBefore"},"name":{"kind":"Name","value":"minutesBefore"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAiResponseMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"aiResponseSummary"},"name":{"kind":"Name","value":"summary"}},{"kind":"Field","alias":{"kind":"Name","value":"aiResponseMessageId"},"name":{"kind":"Name","value":"messageId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrStatusChangedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedStatus"},"name":{"kind":"Name","value":"status"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedAction"},"name":{"kind":"Name","value":"action"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedPreviousStatus"},"name":{"kind":"Name","value":"previousStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedHeadBranch"},"name":{"kind":"Name","value":"headBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedBaseBranch"},"name":{"kind":"Name","value":"baseBranch"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrStatusChangedMergedAt"},"name":{"kind":"Name","value":"mergedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCheckRunMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckRunGithubId"},"name":{"kind":"Name","value":"checkRunGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckName"},"name":{"kind":"Name","value":"checkName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckStatus"},"name":{"kind":"Name","value":"checkStatus"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunConclusion"},"name":{"kind":"Name","value":"conclusion"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCheckUrl"},"name":{"kind":"Name","value":"checkUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCheckRunCompletedAt"},"name":{"kind":"Name","value":"completedAt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubReviewRequestedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubLogin"},"name":{"kind":"Name","value":"requestedReviewerGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubReviewRequestedRequestedReviewerGithubUserId"},"name":{"kind":"Name","value":"requestedReviewerGithubUserId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrCommentMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentKind"},"name":{"kind":"Name","value":"commentKind"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrCommentCommentSnippet"},"name":{"kind":"Name","value":"commentSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionLocation"},"name":{"kind":"Name","value":"location"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentGithubId"},"name":{"kind":"Name","value":"commentGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionCommentUrl"},"name":{"kind":"Name","value":"commentUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrMentionTextSnippet"},"name":{"kind":"Name","value":"textSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlGithubPrReviewMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewForeignEntityId"},"name":{"kind":"Name","value":"foreignEntityId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewGithubKey"},"name":{"kind":"Name","value":"githubKey"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewOwner"},"name":{"kind":"Name","value":"owner"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewRepo"},"name":{"kind":"Name","value":"repo"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewNumber"},"name":{"kind":"Name","value":"number"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewUrl"},"name":{"kind":"Name","value":"url"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewDisplayName"},"name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewTitle"},"name":{"kind":"Name","value":"title"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubLogin"},"name":{"kind":"Name","value":"senderGithubLogin"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubUserId"},"name":{"kind":"Name","value":"senderGithubUserId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewSenderGithubAvatarUrl"},"name":{"kind":"Name","value":"senderGithubAvatarUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewGithubId"},"name":{"kind":"Name","value":"reviewGithubId"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewUrl"},"name":{"kind":"Name","value":"reviewUrl"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewState"},"name":{"kind":"Name","value":"state"}},{"kind":"Field","alias":{"kind":"Name","value":"githubPrReviewReviewSnippet"},"name":{"kind":"Name","value":"reviewSnippet"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionSettledMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledActor"},"name":{"kind":"Name","value":"actor"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledStopReason"},"name":{"kind":"Name","value":"stopReason"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionSettledExcerpt"},"name":{"kind":"Name","value":"excerpt"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionWaitingForInputMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputTurn"},"name":{"kind":"Name","value":"turn"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionWaitingForInputQuestion"},"name":{"kind":"Name","value":"question"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlAgentSessionMentionedMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedSession"},"name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sessionId"}},{"kind":"Field","name":{"kind":"Name","value":"sessionName"}},{"kind":"Field","name":{"kind":"Name","value":"botId"}},{"kind":"Field","name":{"kind":"Name","value":"botName"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"announcementMessageId"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedMentionedBy"},"name":{"kind":"Name","value":"mentionedBy"}},{"kind":"Field","alias":{"kind":"Name","value":"agentSessionMentionedActionId"},"name":{"kind":"Name","value":"actionId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotifEvent"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationNavigationMetadataFields"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMentionMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelMessageSendMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendSenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlChannelReplyMetadata"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlNotification"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationStateFields"}},{"kind":"Field","name":{"kind":"Name","value":"metadata"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedEntryFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sortAt"}},{"kind":"Field","name":{"kind":"Name","value":"touchedAt"}},{"kind":"Field","name":{"kind":"Name","value":"revision"}},{"kind":"Field","name":{"kind":"Name","value":"primaryReason"}},{"kind":"Field","name":{"kind":"Name","value":"primaryStackIndex"}},{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"attentionAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseenCount"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"stacks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"kind"}},{"kind":"Field","name":{"kind":"Name","value":"threadId"}},{"kind":"Field","name":{"kind":"Name","value":"latestAt"}},{"kind":"Field","name":{"kind":"Name","value":"unseen"}},{"kind":"Field","name":{"kind":"Name","value":"count"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkFeedPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryUpserted"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"entry"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkFeedEntryFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedEntryRemoved"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"itemId"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkFeedInvalidated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"refresh"}}]}}]}}]} as unknown as DocumentNode<WorkFeedUpdatesSubscription, WorkFeedUpdatesSubscriptionVariables>;
export type SoupBackfillResult = { "user": { "soup": { "nextCursor": string | null } } };
\ No newline at end of file
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/work-feed.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/work-feed.graphql
new file mode 100644
index 0000000000..251244cb9c
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/work-feed.graphql
@@ -0,0 +1,77 @@
+# One Home work feed entry: the shared item (entity, state, stacked
+# notifications) and its placement in this feed.
+fragment WorkFeedEntryFields on WorkFeedEntry {
+ sortAt
+ touchedAt
+ revision
+ primaryReason
+ primaryStackIndex
+ item {
+ id
+ state
+ attentionAt
+ unseenCount
+ entity {
+ ...SoupItemPreviewFields
+ }
+ stacks {
+ kind
+ threadId
+ latestAt
+ unseen
+ count
+ notifications(limit: 100) {
+ ...SoupNotificationFields
+ }
+ }
+ }
+}
+
+fragment WorkFeedPatchFields on WorkFeedPatch {
+ __typename
+ ... on WorkFeedEntryUpserted {
+ entry {
+ ...WorkFeedEntryFields
+ }
+ }
+ ... on WorkFeedEntryRemoved {
+ itemId
+ }
+ ... on WorkFeedInvalidated {
+ refresh
+ }
+}
+
+query WorkFeed($input: WorkFeedInput) {
+ user {
+ id
+ workFeed(input: $input) {
+ entries {
+ ...WorkFeedEntryFields
+ }
+ nextCursor
+ }
+ }
+}
+
+mutation MarkWorkFeedItemsDone($input: MarkWorkFeedItemsDoneInput!) {
+ markWorkFeedItemsDone(input: $input) {
+ itemIds
+ undoToken
+ }
+}
+
+mutation UndoWorkFeedItemsDone($input: UndoWorkFeedItemsDoneInput!) {
+ undoWorkFeedItemsDone(input: $input) {
+ patches {
+ ...WorkFeedPatchFields
+ }
+ }
+}
+
+# Membership and placement changes for one feed scope, applied as batches.
+subscription WorkFeedUpdates($scope: WorkFeedScopeInput) {
+ workFeedUpdates(scope: $scope) {
+ ...WorkFeedPatchFields
+ }
+}
diff --git a/crates/complete_graph/Cargo.toml b/crates/complete_graph/Cargo.toml
index 88a6ccea69..e2c0c8394b 100644
--- a/crates/complete_graph/Cargo.toml
+++ b/crates/complete_graph/Cargo.toml
@@ -37,6 +37,7 @@ graphql_permission = { path = "../graphql_permission" }
graphql_properties = { path = "../graphql_properties" }
graphql_scheduled_action = { path = "../graphql_scheduled_action" }
graphql_soup = { path = "../graphql_soup" }
+graphql_work_feed = { path = "../graphql_work_feed" }
macro_authorization = { path = "../macro_authorization", features = [
"axum",
"outbound",
@@ -57,6 +58,7 @@ workspace-hack = { version = "0.1", path = "../workspace-hack" }
[dev-dependencies]
activity = { path = "../activity", default-features = false, features = ["realtime"] }
+work_feed = { path = "../work_feed" }
agent_runtime_protocol = { path = "../agent_runtime_protocol" }
apollo-compiler = { workspace = true }
calendar_events = { path = "../calendar_events" }
diff --git a/crates/complete_graph/src/lib.rs b/crates/complete_graph/src/lib.rs
index ad9409777f..e2362f261f 100644
--- a/crates/complete_graph/src/lib.rs
+++ b/crates/complete_graph/src/lib.rs
@@ -1,6 +1,7 @@
//! Composition of the domain GraphQL adapter crates (`graphql_soup`,
//! `graphql_channel`, `graphql_properties`, `graphql_notification`, `graphql_email`,
-//! `graphql_favorite`, `graphql_entity_mutation`) into the complete schema served by
+//! `graphql_favorite`, `graphql_entity_mutation`, `graphql_work_feed`) into the
+//! complete schema served by
//! `document_storage_service` and exported as SDL.
#![deny(missing_docs)]
#![deny(clippy::missing_docs_in_private_items)]
@@ -70,6 +71,10 @@ pub use graphql_properties::{
PropertiesEntityPropertyReader, PropertiesEntityPropertyWriter, PropertiesMutationRoot,
entity_properties_loader,
};
+pub use graphql_work_feed::{
+ EntityAccessWorkFeedViewers, WorkFeedGraphqlContext, WorkFeedGraphqlService,
+ WorkFeedViewerResolver,
+};
pub use realtime::{AgentSessionLogSubscriptions, agent_session_log_subscriptions};
pub use schema::{
EmailThreadInput, SchemaOnlySoupSchema, SchemaOnlyState, SharedSoupSchema, SoupQueryRoot,
diff --git a/crates/complete_graph/src/schema.rs b/crates/complete_graph/src/schema.rs
index c81e3cca8c..d641aeb46a 100644
--- a/crates/complete_graph/src/schema.rs
+++ b/crates/complete_graph/src/schema.rs
@@ -58,6 +58,10 @@ use graphql_soup::{
SoupPatch, resolve_grouped_soup, resolve_soup, resolve_soup_agent_session,
resolve_soup_email_thread, resolve_soup_updates,
};
+use graphql_work_feed::{
+ GraphqlWorkFeedPage, WorkFeedInput, WorkFeedMutationRoot, WorkFeedSubscriptionRoot,
+ resolve_work_feed,
+};
use macro_authorization::{
InternalAuthConfig, MacroAuthorizationService, MacroAuthorizationServiceImpl,
MacroAuthorizationState, NoopMacroAuthJwtValidator,
@@ -97,6 +101,7 @@ pub struct CompleteMutationRoot<
GraphqlEmailMutation<ES, SoupEmailThreadMutationOutput<E>>,
InitiativeMutationRoot<E>,
CalendarMutationRoot,
+ WorkFeedMutationRoot<E>,
);
impl<
@@ -121,17 +126,19 @@ impl<
GraphqlEmailMutation::<ES, SoupEmailThreadMutationOutput<E>>::new(),
InitiativeMutationRoot::<E>::default(),
CalendarMutationRoot,
+ WorkFeedMutationRoot::<E>::default(),
)
}
}
-/// Root subscription object combining realtime Soup, notification, and
-/// activity adapters.
+/// Root subscription object combining realtime Soup, notification,
+/// activity, and work feed adapters.
#[derive(MergedSubscription)]
pub struct CompleteSubscriptionRoot<R, NS, AS, Auth, St, NR, PR, ER, FR, AR, AcR>(
SoupSubscriptionRoot<R, Auth, St, NR, PR, ER, FR, AR, AcR>,
NotificationSubscriptionRoot<NS>,
ActivitySubscriptionRoot<AS>,
+ WorkFeedSubscriptionRoot<SoupEdges<NR, PR, ER, FR, AR, AcR>>,
)
where
R: SoupRealtimeSubscriptionService,
@@ -436,6 +443,7 @@ where
SoupSubscriptionRoot::new(realtime_service),
NotificationSubscriptionRoot::new(notification_subscription_service),
ActivitySubscriptionRoot::new(activity_subscription_service),
+ WorkFeedSubscriptionRoot::default(),
),
)
.finish()
@@ -797,6 +805,23 @@ where
GraphqlCalendarQuery::new(self.user_id.clone())
}
+ /// A page of the authenticated user's work feed, newest first: items
+ /// with outstanding attention (notifications, inbox Signal email,
+ /// reminders) and, in `WORK` mode, work the user recently did. Each
+ /// item carries its notifications stacked for presentation.
+ async fn work_feed(
+ &self,
+ ctx: &Context<'_>,
+ input: Option<WorkFeedInput>,
+ ) -> async_graphql::Result<GraphqlWorkFeedPage<SoupEdges<NR, PR, ER, FR, AR, AcR>>> {
+ resolve_work_feed::<SoupEdges<NR, PR, ER, FR, AR, AcR>>(
+ ctx,
+ self.user_id.clone(),
+ input.unwrap_or_default(),
+ )
+ .await
+ }
+
/// Authenticated user email catalog fields supplied by `graphql_email`.
#[graphql(flatten)]
async fn email(&self, ctx: &Context<'_>) -> async_graphql::Result<GraphqlEmailQuery<E>> {
diff --git a/crates/complete_graph/src/schema/test.rs b/crates/complete_graph/src/schema/test.rs
index c2ccc1c35a..d54d0de048 100644
--- a/crates/complete_graph/src/schema/test.rs
+++ b/crates/complete_graph/src/schema/test.rs
@@ -52,6 +52,7 @@ mod form_activity;
mod initiative;
mod scheduled_actions;
mod soup_patches;
+mod work_feed;
const VALID_USER_ID: &str = "macro|[email protected]";
const INTERNAL_USER_ID: &str = "macro|[email protected]";
diff --git a/crates/complete_graph/src/schema/test/work_feed.rs b/crates/complete_graph/src/schema/test/work_feed.rs
new file mode 100644
index 0000000000..643b4d7061
--- /dev/null
+++ b/crates/complete_graph/src/schema/test/work_feed.rs
@@ -0,0 +1,479 @@
+use std::sync::{Arc, Mutex};
+
+use ::work_feed::domain::{
+ models::{
+ WorkFeedChange, WorkFeedDoneOutcome, WorkFeedDoneReceipt, WorkFeedDoneTarget,
+ WorkFeedEntry, WorkFeedError, WorkFeedItem, WorkFeedItemKey, WorkFeedItemState,
+ WorkFeedItemType, WorkFeedMode, WorkFeedPage, WorkFeedPosition, WorkFeedPrimaryReason,
+ WorkFeedQuery, WorkFeedRevision, WorkFeedScope, WorkFeedStack, WorkFeedStackKind,
+ WorkFeedTrigger, WorkFeedViewer,
+ },
+ ports::WorkFeedTriggers,
+};
+use async_graphql::futures_util::{StreamExt as _, future::BoxFuture, pin_mut};
+use entity_access::domain::models::{EntityAccessReceipt, MemberTeamRole};
+use model_notifications::NotifEvent;
+use notification::domain::models::{NotificationState, UserNotificationRow};
+use soup::domain::models::SoupProjectionHydration;
+
+use super::*;
+use crate::{WorkFeedGraphqlContext, WorkFeedGraphqlService, WorkFeedViewerResolver};
+
+const DOC_ID: Uuid = Uuid::from_u128(0xD0C);
+
+fn at(minute: u32) -> chrono::DateTime<chrono::Utc> {
+ use chrono::TimeZone;
+ chrono::Utc
+ .with_ymd_and_hms(2024, 6, 1, 10, minute, 0)
+ .unwrap()
+}
+
+fn doc_key() -> WorkFeedItemKey {
+ WorkFeedItemKey::new(ModelEntityType::Document.with_entity_string(DOC_ID.to_string()))
+}
+
+fn comment(id: u128, minute: u32) -> Arc<UserNotificationRow<NotifEvent>> {
+ let metadata: NotifEvent = serde_json::from_value(serde_json::json!({
+ "tag": "commented_on_document",
+ "content": {
+ "documentName": "Doc",
+ "owner": VALID_USER_ID,
+ "commentId": Uuid::from_u128(id),
+ "threadId": Uuid::from_u128(id),
+ "text": "looks good",
+ },
+ }))
+ .unwrap();
+ Arc::new(UserNotificationRow {
+ owner_id: MacroUserIdStr::parse_from_str(VALID_USER_ID).unwrap(),
+ notification_id: Uuid::from_u128(id),
+ notification_event_type: "commented_on_document".to_string(),
+ entity: doc_key().entity().clone(),
+ sent: true,
+ state: NotificationState::Unseen,
+ created_at: at(minute),
+ viewed_at: None,
+ updated_at: at(minute),
+ deleted_at: None,
+ notification_metadata: metadata,
+ sender_id: None,
+ })
+}
+
+fn doc_entry() -> WorkFeedEntry<SoupProjectionHydration> {
+ let notifications = vec![comment(2, 7), comment(1, 5)];
+ WorkFeedEntry {
+ sort_at: at(9),
+ item: WorkFeedItem {
+ key: doc_key(),
+ entity: SoupProjectionHydration {
+ item: soup_document(DOC_ID),
+ document_server_facts: None,
+ },
+ state: WorkFeedItemState::Unseen,
+ attention_at: Some(at(7)),
+ touched_at: Some(at(9)),
+ stacks: vec![WorkFeedStack {
+ kind: WorkFeedStackKind::Comments,
+ thread_id: None,
+ notifications: notifications.clone(),
+ }],
+ notifications,
+ primary: WorkFeedPrimaryReason::OwnWork,
+ },
+ }
+}
+
+#[derive(Default)]
+struct RecordingWorkFeedService {
+ pages: Mutex<Vec<(WorkFeedViewer, WorkFeedQuery)>>,
+ recomputes: Mutex<Vec<(WorkFeedScope, Vec<WorkFeedItemKey>)>>,
+ dones: Mutex<Vec<Vec<WorkFeedDoneTarget>>>,
+ undos: Mutex<Vec<(WorkFeedScope, WorkFeedDoneReceipt)>>,
+}
+
+/// Shares the recording service between the schema and the assertions.
+struct Recording(Arc<RecordingWorkFeedService>);
+
+impl WorkFeedGraphqlService for Recording {
+ fn page(
+ &self,
+ viewer: WorkFeedViewer,
+ query: WorkFeedQuery,
+ ) -> BoxFuture<'_, Result<WorkFeedPage<SoupProjectionHydration>, WorkFeedError>> {
+ self.0.pages.lock().unwrap().push((viewer, query));
+ Box::pin(async {
+ Ok(WorkFeedPage {
+ entries: vec![doc_entry()],
+ next: Some(WorkFeedPosition {
+ sort_at: at(9),
+ entity_id: DOC_ID.to_string(),
+ }),
+ })
+ })
+ }
+
+ fn recompute(
+ &self,
+ _viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ keys: Vec<WorkFeedItemKey>,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>> {
+ self.0
+ .recomputes
+ .lock()
+ .unwrap()
+ .push((scope, keys.clone()));
+ Box::pin(async move {
+ Ok(keys
+ .into_iter()
+ .map(|key| {
+ if key == doc_key() {
+ WorkFeedChange::Upserted(doc_entry())
+ } else {
+ WorkFeedChange::Removed(key)
+ }
+ })
+ .collect())
+ })
+ }
+
+ fn mark_done(
+ &self,
+ _viewer: WorkFeedViewer,
+ targets: Vec<WorkFeedDoneTarget>,
+ ) -> BoxFuture<'_, Result<WorkFeedDoneOutcome, WorkFeedError>> {
+ let items = targets
+ .iter()
+ .map(|target| target.key.clone())
+ .collect::<Vec<_>>();
+ self.0.dones.lock().unwrap().push(targets);
+ Box::pin(async move {
+ Ok(WorkFeedDoneOutcome {
+ receipt: WorkFeedDoneReceipt {
+ items: items.iter().map(WorkFeedItemKey::id).collect(),
+ notification_ids: vec![Uuid::from_u128(1)],
+ ..Default::default()
+ },
+ items,
+ })
+ })
+ }
+
+ fn undo_done(
+ &self,
+ _viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ receipt: WorkFeedDoneReceipt,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>> {
+ self.0.undos.lock().unwrap().push((scope, receipt));
+ Box::pin(async { Ok(vec![WorkFeedChange::Upserted(doc_entry())]) })
+ }
+}
+
+/// Triggers a test drives by hand.
+#[derive(Default, Clone)]
+struct ManualTriggers {
+ sender: Arc<Mutex<Option<tokio::sync::mpsc::Sender<WorkFeedTrigger>>>>,
+ subscribed: Arc<Mutex<Vec<MacroUserIdStr<'static>>>>,
+}
+
+impl WorkFeedTriggers for ManualTriggers {
+ fn subscribe(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ) -> tokio::sync::mpsc::Receiver<WorkFeedTrigger> {
+ let (sender, receiver) = tokio::sync::mpsc::channel(8);
+ *self.sender.lock().unwrap() = Some(sender);
+ self.subscribed.lock().unwrap().push(user);
+ receiver
+ }
+}
+
+struct NoTeam;
+
+impl WorkFeedViewerResolver for NoTeam {
+ fn team(
+ &self,
+ _user: MacroUserIdStr<'static>,
+ ) -> BoxFuture<'_, Result<Option<EntityAccessReceipt<MemberTeamRole>>, rootcause::Report>> {
+ Box::pin(async { Ok(None) })
+ }
+}
+
+fn context(
+ service: &Arc<RecordingWorkFeedService>,
+ triggers: &ManualTriggers,
+) -> WorkFeedGraphqlContext {
+ WorkFeedGraphqlContext::new(Recording(Arc::clone(service)), triggers.clone(), NoTeam)
+}
+
+fn viewer_id() -> MacroUserIdStr<'static> {
+ MacroUserIdStr::parse_from_str(VALID_USER_ID).unwrap()
+}
+
+#[tokio::test]
+async fn work_feed_pages_hydrated_stacked_entries_for_the_viewer() {
+ let harness = harness();
+ let service = Arc::new(RecordingWorkFeedService::default());
+ let triggers = ManualTriggers::default();
+
+ let response = harness
+ .schema
+ .execute(
+ harness
+ .request(
+ r#"{ user { workFeed(input: {
+ scope: { mode: ATTENTION, types: [DOCUMENT, CHANNEL_THREAD] },
+ limit: 10
+ }) {
+ nextCursor
+ entries {
+ sortAt touchedAt revision primaryReason primaryStackIndex
+ item {
+ id state attentionAt unseenCount
+ entity { __typename id }
+ stacks {
+ kind threadId latestAt unseen count
+ notifications(limit: 1) { id eventType state }
+ }
+ }
+ }
+ } } }"#,
+ authenticated_parts(),
+ )
+ .data(context(&service, &triggers)),
+ )
+ .await;
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let page = &data["user"]["workFeed"];
+ let entry = &page["entries"][0];
+
+ assert_eq!(entry["sortAt"], at(9).to_rfc3339());
+ assert_eq!(entry["touchedAt"], at(9).to_rfc3339());
+ assert_eq!(entry["primaryReason"], "OWN_WORK");
+ assert!(entry["primaryStackIndex"].is_null());
+ let revision = WorkFeedRevision::decode(entry["revision"].as_str().unwrap()).unwrap();
+ assert_eq!(revision.attention_through, Some(at(7)));
+
+ let item = &entry["item"];
+ assert_eq!(item["id"], format!("document:{DOC_ID}"));
+ assert_eq!(item["state"], "UNSEEN");
+ assert_eq!(item["unseenCount"], 2);
+ assert_eq!(item["entity"]["__typename"], "GraphqlSoupDocument");
+ assert_eq!(item["entity"]["id"], DOC_ID.to_string());
+ let stack = &item["stacks"][0];
+ assert_eq!(stack["kind"], "COMMENTS");
+ assert_eq!(stack["count"], 2);
+ assert_eq!(stack["unseen"], true);
+ assert_eq!(stack["latestAt"], at(7).to_rfc3339());
+ assert_eq!(stack["notifications"].as_array().unwrap().len(), 1);
+ assert_eq!(
+ stack["notifications"][0]["id"],
+ Uuid::from_u128(2).to_string()
+ );
+
+ let position = WorkFeedPosition::decode(page["nextCursor"].as_str().unwrap()).unwrap();
+ assert_eq!(position.entity_id, DOC_ID.to_string());
+
+ let pages = service.pages.lock().unwrap();
+ let (viewer, query) = &pages[0];
+ assert_eq!(viewer.user.as_ref(), VALID_USER_ID);
+ assert_eq!(query.scope.mode, WorkFeedMode::Attention);
+ assert_eq!(
+ query.scope.types,
+ vec![WorkFeedItemType::Document, WorkFeedItemType::ChannelThread]
+ );
+ assert_eq!(query.limit, 10);
+}
+
+#[tokio::test]
+async fn work_feed_rejects_a_bad_cursor_before_reading() {
+ let harness = harness();
+ let service = Arc::new(RecordingWorkFeedService::default());
+ let response = harness
+ .schema
+ .execute(
+ harness
+ .request(
+ r#"{ user { workFeed(input: { cursor: "nope" }) { nextCursor } } }"#,
+ authenticated_parts(),
+ )
+ .data(context(&service, &ManualTriggers::default())),
+ )
+ .await;
+ assert_eq!(response.errors[0].message, "invalid work feed cursor");
+ assert!(service.pages.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn mark_done_completes_the_observed_revision_and_undo_restores_it() {
+ let harness = harness();
+ let service = Arc::new(RecordingWorkFeedService::default());
+ let triggers = ManualTriggers::default();
+ let revision = WorkFeedRevision {
+ attention_through: Some(at(7)),
+ }
+ .encode();
+
+ let done = harness
+ .schema
+ .execute(
+ harness
+ .request(
+ &format!(
+ r#"mutation {{ markWorkFeedItemsDone(input: {{ items: [
+ {{ id: "document:{DOC_ID}", revision: "{revision}" }}
+ ] }}) {{ itemIds undoToken }} }}"#
+ ),
+ authenticated_parts(),
+ )
+ .data(viewer_id())
+ .data(context(&service, &triggers)),
+ )
+ .await;
+ assert!(done.errors.is_empty(), "{:?}", done.errors);
+ let done = done.data.into_json().unwrap();
+ assert_eq!(
+ done["markWorkFeedItemsDone"]["itemIds"],
+ serde_json::json!([format!("document:{DOC_ID}")])
+ );
+ let targets = service.dones.lock().unwrap()[0].clone();
+ assert_eq!(targets[0].key, doc_key());
+ assert_eq!(targets[0].revision.unwrap().attention_through, Some(at(7)));
+
+ let undo_token = done["markWorkFeedItemsDone"]["undoToken"].as_str().unwrap();
+ let undo = harness
+ .schema
+ .execute(
+ harness
+ .request(
+ &format!(
+ r#"mutation {{ undoWorkFeedItemsDone(input: {{
+ undoToken: "{undo_token}", scope: {{ mode: WORK }}
+ }}) {{ patches {{ __typename
+ ... on WorkFeedEntryUpserted {{ entry {{ item {{ id }} }} }}
+ }} }} }}"#
+ ),
+ authenticated_parts(),
+ )
+ .data(viewer_id())
+ .data(context(&service, &triggers)),
+ )
+ .await;
+ assert!(undo.errors.is_empty(), "{:?}", undo.errors);
+ let undo = undo.data.into_json().unwrap();
+ assert_eq!(
+ undo["undoWorkFeedItemsDone"]["patches"][0]["entry"]["item"]["id"],
+ format!("document:{DOC_ID}")
+ );
+ let undos = service.undos.lock().unwrap();
+ assert_eq!(undos[0].1.notification_ids, vec![Uuid::from_u128(1)]);
+}
+
+#[tokio::test]
+async fn mark_done_requires_an_authenticated_user() {
+ let harness = harness();
+ let service = Arc::new(RecordingWorkFeedService::default());
+ let response = harness
+ .schema
+ .execute(
+ harness
+ .request(
+ r#"mutation { markWorkFeedItemsDone(input: { items: [] }) { itemIds } }"#,
+ authenticated_parts(),
+ )
+ .data(context(&service, &ManualTriggers::default())),
+ )
+ .await;
+ assert_eq!(response.errors[0].message, "authentication required");
+ assert!(service.dones.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn work_feed_updates_batch_recomputed_patches() {
+ let harness = harness();
+ let service = Arc::new(RecordingWorkFeedService::default());
+ let triggers = ManualTriggers::default();
+ let other = WorkFeedItemKey::new(
+ ModelEntityType::Chat.with_entity_string(Uuid::from_u128(0xC4A7).to_string()),
+ );
+
+ let request = async_graphql::Request::new(
+ r#"subscription { workFeedUpdates(scope: { mode: WORK }) {
+ __typename
+ ... on WorkFeedEntryUpserted { entry { sortAt item { id state } } }
+ ... on WorkFeedEntryRemoved { itemId }
+ ... on WorkFeedInvalidated { refresh }
+ } }"#,
+ )
+ .data(viewer_id())
+ .data(context(&service, &triggers));
+ let responses = harness.schema.execute_stream(request);
+ pin_mut!(responses);
+
+ // The subscription opens its triggers lazily, on first poll.
+ let first = tokio::spawn({
+ let triggers = triggers.clone();
+ let other = other.clone();
+ async move {
+ let sender = loop {
+ if let Some(sender) = triggers.sender.lock().unwrap().clone() {
+ break sender;
+ }
+ tokio::task::yield_now().await;
+ };
+ // A burst inside one window becomes one recompute.
+ sender
+ .send(WorkFeedTrigger::Changed(vec![doc_key().into_entity()]))
+ .await
+ .unwrap();
+ sender
+ .send(WorkFeedTrigger::Changed(vec![
+ other.into_entity(),
+ doc_key().into_entity(),
+ ]))
+ .await
+ .unwrap();
+ sender
+ }
+ });
+ let response = responses.next().await.expect("patch batch");
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().unwrap();
+ let patches = data["workFeedUpdates"].as_array().unwrap();
+ assert_eq!(patches.len(), 2);
+ assert_eq!(patches[0]["__typename"], "WorkFeedEntryUpserted");
+ assert_eq!(
+ patches[0]["entry"]["item"]["id"],
+ format!("document:{DOC_ID}")
+ );
+ assert_eq!(patches[1]["__typename"], "WorkFeedEntryRemoved");
+ assert_eq!(patches[1]["itemId"], other.id());
+ {
+ let recomputes = service.recomputes.lock().unwrap();
+ assert_eq!(recomputes.len(), 1);
+ assert_eq!(recomputes[0].0.mode, WorkFeedMode::Work);
+ assert_eq!(recomputes[0].1, vec![doc_key(), other.clone()]);
+ }
+
+ let sender = first.await.unwrap();
+ sender.send(WorkFeedTrigger::Invalidated).await.unwrap();
+ let response = responses.next().await.expect("invalidation");
+ let data = response.data.into_json().unwrap();
+ assert_eq!(
+ data["workFeedUpdates"][0]["__typename"],
+ "WorkFeedInvalidated"
+ );
+
+ // When the sources end, the stream ends with an error to resubscribe.
+ drop(sender);
+ *triggers.sender.lock().unwrap() = None;
+ let response = responses.next().await.expect("closing error");
+ assert!(!response.errors.is_empty());
+ assert_eq!(
+ triggers.subscribed.lock().unwrap().as_slice(),
+ &[viewer_id()]
+ );
+}
diff --git a/crates/entity_access/src/inbound/axum_extractors.rs b/crates/entity_access/src/inbound/axum_extractors.rs
index 54ba8a56e0..bcc406f77a 100644
--- a/crates/entity_access/src/inbound/axum_extractors.rs
+++ b/crates/entity_access/src/inbound/axum_extractors.rs
@@ -46,7 +46,7 @@ pub use principal::principal_entity_access_receipt;
pub use project::{ProjectAccessLevelExtractor, ProjectBodyAccessLevelExtractorV2};
pub use reminder::ReminderAccessExtractor;
pub use scheduled_action::ScheduledActionAccessExtractor;
-pub use team::{MacroUserTeamExtractorV2, OptionalMacroUserTeamExtractorV2};
+pub use team::{MacroUserTeamExtractorV2, OptionalMacroUserTeamExtractorV2, user_team_receipt};
pub use thread::ThreadAccessLevelExtractor;
use std::borrow::Cow;
diff --git a/crates/entity_access/src/inbound/axum_extractors/team.rs b/crates/entity_access/src/inbound/axum_extractors/team.rs
index d6f563bab5..73b33fe4b8 100644
--- a/crates/entity_access/src/inbound/axum_extractors/team.rs
+++ b/crates/entity_access/src/inbound/axum_extractors/team.rs
@@ -89,6 +89,23 @@ where
}))
}
+/// The team receipt an authenticated user qualifies for, minted the way
+/// [`OptionalMacroUserTeamExtractorV2`] mints it for users. For transports
+/// without request parts to extract from, such as GraphQL subscriptions,
+/// whose user was authenticated when the connection was established.
+pub async fn user_team_receipt<T, Svc>(
+ service: &Svc,
+ macro_user_id: MacroUserIdStr<'static>,
+) -> Result<Option<EntityAccessReceipt<T>>, ExtractorError>
+where
+ T: RequiredPermission,
+ Svc: EntityAccessService,
+{
+ Ok(user_team_access_outcome::<T, Svc>(service, macro_user_id)
+ .await?
+ .into_optional_receipt())
+}
+
async fn bot_team_access_outcome<T, Svc>(
service: &Svc,
authentication: &BotAuthentication,
diff --git a/crates/graphql_work_feed/Cargo.toml b/crates/graphql_work_feed/Cargo.toml
new file mode 100644
index 0000000000..bee9cb2c99
--- /dev/null
+++ b/crates/graphql_work_feed/Cargo.toml
@@ -0,0 +1,30 @@
+[package]
+edition = "2024"
+name = "graphql_work_feed"
+publish = false
+version = "0.1.0"
+
+[dependencies]
+async-graphql = { workspace = true }
+async-stream = { workspace = true }
+entity_access = { path = "../entity_access", default-features = false, features = ["inbound"] }
+futures = { workspace = true }
+graphql_common = { path = "../graphql_common" }
+graphql_notification = { path = "../graphql_notification" }
+graphql_soup = { path = "../graphql_soup" }
+macro_user_id = { path = "../macro_user_id" }
+model_notifications = { path = "../model_notifications" }
+rootcause = { workspace = true }
+soup = { path = "../soup", default-features = false, features = ["ports"] }
+tokio = { workspace = true, features = ["sync", "time", "macros"] }
+tracing = { workspace = true }
+work_feed = { path = "../work_feed" }
+workspace-hack = { version = "0.1", path = "../workspace-hack" }
+
+[dev-dependencies]
+chrono = { workspace = true }
+model-entity = { path = "../model-entity" }
+notification = { path = "../notification" }
+serde_json = { workspace = true }
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
+uuid = { workspace = true }
diff --git a/crates/graphql_work_feed/src/context.rs b/crates/graphql_work_feed/src/context.rs
new file mode 100644
index 0000000000..a73d960dff
--- /dev/null
+++ b/crates/graphql_work_feed/src/context.rs
@@ -0,0 +1,174 @@
+use std::sync::Arc;
+
+use entity_access::{
+ domain::{
+ models::{EntityAccessReceipt, MemberTeamRole},
+ ports::EntityAccessService,
+ },
+ inbound::axum_extractors::user_team_receipt,
+};
+use futures::future::BoxFuture;
+use macro_user_id::user_id::MacroUserIdStr;
+use soup::domain::models::SoupProjectionHydration;
+use work_feed::domain::{
+ models::{
+ WorkFeedChange, WorkFeedDoneOutcome, WorkFeedDoneReceipt, WorkFeedDoneTarget,
+ WorkFeedError, WorkFeedItemKey, WorkFeedPage, WorkFeedQuery, WorkFeedScope, WorkFeedViewer,
+ },
+ ports::WorkFeedTriggers,
+ service::WorkFeedService,
+};
+
+/// The work feed use cases over Soup-hydrated items, object-safe so request
+/// data can carry them without a schema type parameter.
+pub trait WorkFeedGraphqlService: Send + Sync + 'static {
+ /// See [`WorkFeedService::page`].
+ fn page(
+ &self,
+ viewer: WorkFeedViewer,
+ query: WorkFeedQuery,
+ ) -> BoxFuture<'_, Result<WorkFeedPage<SoupProjectionHydration>, WorkFeedError>>;
+
+ /// See [`WorkFeedService::recompute`].
+ fn recompute(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ keys: Vec<WorkFeedItemKey>,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>>;
+
+ /// See [`WorkFeedService::mark_done`].
+ fn mark_done(
+ &self,
+ viewer: WorkFeedViewer,
+ targets: Vec<WorkFeedDoneTarget>,
+ ) -> BoxFuture<'_, Result<WorkFeedDoneOutcome, WorkFeedError>>;
+
+ /// See [`WorkFeedService::undo_done`].
+ fn undo_done(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ receipt: WorkFeedDoneReceipt,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>>;
+}
+
+impl<T> WorkFeedGraphqlService for T
+where
+ T: WorkFeedService<Entity = SoupProjectionHydration>,
+{
+ fn page(
+ &self,
+ viewer: WorkFeedViewer,
+ query: WorkFeedQuery,
+ ) -> BoxFuture<'_, Result<WorkFeedPage<SoupProjectionHydration>, WorkFeedError>> {
+ Box::pin(WorkFeedService::page(self, viewer, query))
+ }
+
+ fn recompute(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ keys: Vec<WorkFeedItemKey>,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>> {
+ Box::pin(WorkFeedService::recompute(self, viewer, scope, keys))
+ }
+
+ fn mark_done(
+ &self,
+ viewer: WorkFeedViewer,
+ targets: Vec<WorkFeedDoneTarget>,
+ ) -> BoxFuture<'_, Result<WorkFeedDoneOutcome, WorkFeedError>> {
+ Box::pin(WorkFeedService::mark_done(self, viewer, targets))
+ }
+
+ fn undo_done(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ receipt: WorkFeedDoneReceipt,
+ ) -> BoxFuture<'_, Result<Vec<WorkFeedChange<SoupProjectionHydration>>, WorkFeedError>> {
+ Box::pin(WorkFeedService::undo_done(self, viewer, scope, receipt))
+ }
+}
+
+/// Resolves the team access a work feed request is evaluated with. Requests
+/// and subscriptions alike only carry the authenticated user, so the team
+/// receipt is minted from it at the entity access boundary.
+pub trait WorkFeedViewerResolver: Send + Sync + 'static {
+ /// The user's qualifying team receipt, if any.
+ fn team(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ) -> BoxFuture<'_, Result<Option<EntityAccessReceipt<MemberTeamRole>>, rootcause::Report>>;
+}
+
+/// Mints viewer team receipts through the entity access service.
+pub struct EntityAccessWorkFeedViewers<S>(pub Arc<S>);
+
+impl<S> WorkFeedViewerResolver for EntityAccessWorkFeedViewers<S>
+where
+ S: EntityAccessService,
+{
+ fn team(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ) -> BoxFuture<'_, Result<Option<EntityAccessReceipt<MemberTeamRole>>, rootcause::Report>> {
+ Box::pin(async move {
+ user_team_receipt::<MemberTeamRole, S>(self.0.as_ref(), user)
+ .await
+ .map_err(|error| rootcause::report!("failed to resolve team access: {error}"))
+ })
+ }
+}
+
+/// Request data for the work feed fields, inserted by the composition root
+/// for HTTP requests and subscription connections alike.
+#[derive(Clone)]
+pub struct WorkFeedGraphqlContext {
+ /// The feed's use cases.
+ pub(crate) service: Arc<dyn WorkFeedGraphqlService>,
+ /// Realtime changes that may affect a viewer's items.
+ pub(crate) triggers: Arc<dyn WorkFeedTriggers>,
+ /// Team access lookup for viewers.
+ pub(crate) viewers: Arc<dyn WorkFeedViewerResolver>,
+}
+
+impl WorkFeedGraphqlContext {
+ /// Bundle the work feed's capabilities for request data.
+ pub fn new(
+ service: impl WorkFeedGraphqlService,
+ triggers: impl WorkFeedTriggers,
+ viewers: impl WorkFeedViewerResolver,
+ ) -> Self {
+ Self {
+ service: Arc::new(service),
+ triggers: Arc::new(triggers),
+ viewers: Arc::new(viewers),
+ }
+ }
+
+ /// The viewer a request for `user` is evaluated as.
+ pub(crate) async fn viewer(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ) -> async_graphql::Result<WorkFeedViewer> {
+ let team = self.viewers.team(user.clone()).await.map_err(|error| {
+ tracing::error!(error = ?error, "work feed viewer lookup failed");
+ async_graphql::Error::new("the work feed is unavailable")
+ })?;
+ Ok(WorkFeedViewer { user, team })
+ }
+}
+
+/// Map a service error to a client-facing GraphQL error; dependency details
+/// are logged, never exposed.
+pub(crate) fn to_graphql_error(error: WorkFeedError) -> async_graphql::Error {
+ match error {
+ WorkFeedError::InvalidInput(message) => async_graphql::Error::new(message),
+ WorkFeedError::Unavailable(report) => {
+ tracing::error!(error = ?report, "work feed request failed");
+ async_graphql::Error::new("the work feed is unavailable")
+ }
+ }
+}
diff --git a/crates/graphql_work_feed/src/inputs.rs b/crates/graphql_work_feed/src/inputs.rs
new file mode 100644
index 0000000000..05da6f6f5a
--- /dev/null
+++ b/crates/graphql_work_feed/src/inputs.rs
@@ -0,0 +1,183 @@
+use async_graphql::{Enum, ID, InputObject};
+use work_feed::domain::models::{
+ WorkFeedDoneTarget, WorkFeedItemKey, WorkFeedItemType, WorkFeedMode, WorkFeedPosition,
+ WorkFeedQuery, WorkFeedRevision, WorkFeedScope,
+};
+
+#[cfg(test)]
+mod test;
+
+/// Items returned by one work feed page when no limit is given.
+pub const DEFAULT_WORK_FEED_LIMIT: i32 = 50;
+/// Most items one work feed page may return.
+pub const MAX_WORK_FEED_LIMIT: i32 = 100;
+/// Most items one done mutation may complete.
+pub const MAX_DONE_ITEMS: usize = 200;
+
+/// Which reasons admit items to a work feed.
+#[derive(Enum, Clone, Copy, Debug, PartialEq, Eq, Default)]
+#[graphql(name = "WorkFeedMode")]
+pub enum GraphqlWorkFeedMode {
+ /// Outstanding attention plus the viewer's recent own work.
+ #[default]
+ Work,
+ /// Outstanding attention only.
+ Attention,
+}
+
+impl From<GraphqlWorkFeedMode> for WorkFeedMode {
+ fn from(value: GraphqlWorkFeedMode) -> Self {
+ match value {
+ GraphqlWorkFeedMode::Work => Self::Work,
+ GraphqlWorkFeedMode::Attention => Self::Attention,
+ }
+ }
+}
+
+/// The kinds of item a work feed can be narrowed to.
+#[derive(Enum, Clone, Copy, Debug, PartialEq, Eq)]
+#[graphql(name = "WorkFeedItemType")]
+pub enum GraphqlWorkFeedItemType {
+ /// Documents and tasks.
+ Document,
+ /// AI chats.
+ Chat,
+ /// Projects.
+ Project,
+ /// Email threads.
+ Email,
+ /// Channel activity outside a dedicated thread item.
+ Channel,
+ /// One channel thread.
+ ChannelThread,
+ /// Calendar reminders.
+ CalendarEvent,
+ /// GitHub pull requests.
+ PullRequest,
+ /// Agent sessions.
+ AgentSession,
+}
+
+impl From<GraphqlWorkFeedItemType> for WorkFeedItemType {
+ fn from(value: GraphqlWorkFeedItemType) -> Self {
+ match value {
+ GraphqlWorkFeedItemType::Document => Self::Document,
+ GraphqlWorkFeedItemType::Chat => Self::Chat,
+ GraphqlWorkFeedItemType::Project => Self::Project,
+ GraphqlWorkFeedItemType::Email => Self::Email,
+ GraphqlWorkFeedItemType::Channel => Self::Channel,
+ GraphqlWorkFeedItemType::ChannelThread => Self::ChannelThread,
+ GraphqlWorkFeedItemType::CalendarEvent => Self::CalendarEvent,
+ GraphqlWorkFeedItemType::PullRequest => Self::PullRequest,
+ GraphqlWorkFeedItemType::AgentSession => Self::AgentSession,
+ }
+ }
+}
+
+/// Which items a work feed shows. Pages, subscriptions and undo for one feed
+/// send the same scope.
+#[derive(InputObject, Default, Clone)]
+pub struct WorkFeedScopeInput {
+ /// Which reasons admit items. Defaults to `WORK`.
+ pub mode: Option<GraphqlWorkFeedMode>,
+ /// Item kinds to include; omitted or empty means every kind.
+ pub types: Option<Vec<GraphqlWorkFeedItemType>>,
+ /// Whether snippet documents are included. Defaults to false.
+ pub include_snippets: Option<bool>,
+}
+
+impl WorkFeedScopeInput {
+ /// Convert into the domain scope, applying defaults.
+ pub(crate) fn into_scope(self) -> WorkFeedScope {
+ WorkFeedScope {
+ mode: self.mode.unwrap_or_default().into(),
+ types: self
+ .types
+ .unwrap_or_default()
+ .into_iter()
+ .map(Into::into)
+ .collect(),
+ include_snippets: self.include_snippets.unwrap_or(false),
+ }
+ }
+}
+
+/// Page request for the viewer's work feed.
+#[derive(InputObject, Default)]
+pub struct WorkFeedInput {
+ /// Which items the feed shows.
+ pub scope: Option<WorkFeedScopeInput>,
+ /// Page size; defaults to 50, capped at 100.
+ pub limit: Option<i32>,
+ /// Opaque cursor from the previous page's `nextCursor`; absent for the
+ /// first page. Send it with the same scope.
+ pub cursor: Option<String>,
+}
+
+impl WorkFeedInput {
+ /// Validate and convert into the domain query.
+ pub(crate) fn into_query(self) -> async_graphql::Result<WorkFeedQuery> {
+ let limit =
+ graphql_common::parse_limit(self.limit, DEFAULT_WORK_FEED_LIMIT, MAX_WORK_FEED_LIMIT)?;
+ let after = self
+ .cursor
+ .map(|cursor| WorkFeedPosition::decode(&cursor))
+ .transpose()
+ .map_err(|_| async_graphql::Error::new("invalid work feed cursor"))?;
+ Ok(WorkFeedQuery {
+ scope: self.scope.unwrap_or_default().into_scope(),
+ limit: u16::try_from(limit).expect("limit is capped below u16::MAX"),
+ after,
+ })
+ }
+}
+
+/// One item to mark done.
+#[derive(InputObject)]
+pub struct WorkFeedDoneItemInput {
+ /// The item's id.
+ pub id: ID,
+ /// The entry's `revision` the caller observed. Reasons newer than it
+ /// stay active. Omit to acknowledge everything current.
+ pub revision: Option<String>,
+}
+
+/// Input for marking work feed items done.
+#[derive(InputObject)]
+pub struct MarkWorkFeedItemsDoneInput {
+ /// The items to complete, at most 200.
+ pub items: Vec<WorkFeedDoneItemInput>,
+}
+
+impl MarkWorkFeedItemsDoneInput {
+ /// Validate and convert into domain done targets.
+ pub(crate) fn into_targets(self) -> async_graphql::Result<Vec<WorkFeedDoneTarget>> {
+ if self.items.len() > MAX_DONE_ITEMS {
+ return Err(async_graphql::Error::new(format!(
+ "at most {MAX_DONE_ITEMS} items can be marked done at once"
+ )));
+ }
+ self.items
+ .into_iter()
+ .map(|item| {
+ let key = WorkFeedItemKey::parse(&item.id)
+ .map_err(|_| async_graphql::Error::new("invalid work feed item id"))?;
+ let revision = item
+ .revision
+ .map(|revision| WorkFeedRevision::decode(&revision))
+ .transpose()
+ .map_err(|_| async_graphql::Error::new("invalid work feed revision"))?;
+ Ok(WorkFeedDoneTarget { key, revision })
+ })
+ .collect()
+ }
+}
+
+/// Input for undoing one mark-done.
+#[derive(InputObject)]
+pub struct UndoWorkFeedItemsDoneInput {
+ /// The `undoToken` the mark-done returned.
+ pub undo_token: String,
+ /// The feed the restored items are placed in.
+ pub scope: Option<WorkFeedScopeInput>,
+}
diff --git a/crates/graphql_work_feed/src/inputs/test.rs b/crates/graphql_work_feed/src/inputs/test.rs
new file mode 100644
index 0000000000..75a8de9151
--- /dev/null
+++ b/crates/graphql_work_feed/src/inputs/test.rs
@@ -0,0 +1,81 @@
+use super::*;
+
+#[test]
+fn feed_input_defaults_to_the_whole_work_feed() {
+ let query = WorkFeedInput::default().into_query().unwrap();
+ assert_eq!(query.scope.mode, WorkFeedMode::Work);
+ assert!(query.scope.types.is_empty());
+ assert!(!query.scope.include_snippets);
+ assert_eq!(query.limit, 50);
+ assert!(query.after.is_none());
+}
+
+#[test]
+fn feed_input_rejects_bad_limits_and_cursors() {
+ let too_many = WorkFeedInput {
+ limit: Some(101),
+ ..Default::default()
+ };
+ assert!(too_many.into_query().is_err());
+
+ let bad_cursor = WorkFeedInput {
+ cursor: Some("not a cursor".to_string()),
+ ..Default::default()
+ };
+ assert!(bad_cursor.into_query().is_err());
+}
+
+#[test]
+fn scope_input_maps_types_and_mode() {
+ let scope = WorkFeedScopeInput {
+ mode: Some(GraphqlWorkFeedMode::Attention),
+ types: Some(vec![
+ GraphqlWorkFeedItemType::ChannelThread,
+ GraphqlWorkFeedItemType::PullRequest,
+ ]),
+ include_snippets: Some(true),
+ }
+ .into_scope();
+ assert_eq!(scope.mode, WorkFeedMode::Attention);
+ assert_eq!(
+ scope.types,
+ vec![
+ WorkFeedItemType::ChannelThread,
+ WorkFeedItemType::PullRequest
+ ]
+ );
+ assert!(scope.include_snippets);
+}
+
+#[test]
+fn done_input_parses_ids_and_revisions() {
+ let revision = WorkFeedRevision::default().encode();
+ let targets = MarkWorkFeedItemsDoneInput {
+ items: vec![WorkFeedDoneItemInput {
+ id: ID("document:11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa".to_string()),
+ revision: Some(revision),
+ }],
+ }
+ .into_targets()
+ .unwrap();
+ assert_eq!(targets.len(), 1);
+ assert_eq!(targets[0].revision, Some(WorkFeedRevision::default()));
+
+ let bad_id = MarkWorkFeedItemsDoneInput {
+ items: vec![WorkFeedDoneItemInput {
+ id: ID("nope".to_string()),
+ revision: None,
+ }],
+ };
+ assert!(bad_id.into_targets().is_err());
+
+ let too_many = MarkWorkFeedItemsDoneInput {
+ items: (0..=MAX_DONE_ITEMS)
+ .map(|_| WorkFeedDoneItemInput {
+ id: ID("document:x".to_string()),
+ revision: None,
+ })
+ .collect(),
+ };
+ assert!(too_many.into_targets().is_err());
+}
diff --git a/crates/graphql_work_feed/src/lib.rs b/crates/graphql_work_feed/src/lib.rs
new file mode 100644
index 0000000000..d4b96282a4
--- /dev/null
+++ b/crates/graphql_work_feed/src/lib.rs
@@ -0,0 +1,36 @@
+//! GraphQL inbound adapter for the work feed: the `workFeed` page under the
+//! viewer, the done and undo mutations, and the `workFeedUpdates`
+//! subscription. The schema itself is composed by `complete_graph`.
+#![deny(missing_docs)]
+#![deny(clippy::missing_docs_in_private_items)]
+
+/// Request data carrying the work feed service, triggers and viewer lookup.
+mod context;
+/// Feed, scope and mutation inputs.
+mod inputs;
+/// Done and undo mutations.
+mod mutations;
+/// Page, entry, item, stack and patch objects.
+mod objects;
+/// The `workFeed` page resolver.
+mod query;
+/// The `workFeedUpdates` subscription.
+mod subscriptions;
+
+pub use context::{
+ EntityAccessWorkFeedViewers, WorkFeedGraphqlContext, WorkFeedGraphqlService,
+ WorkFeedViewerResolver,
+};
+pub use inputs::{
+ GraphqlWorkFeedItemType, GraphqlWorkFeedMode, MarkWorkFeedItemsDoneInput,
+ UndoWorkFeedItemsDoneInput, WorkFeedDoneItemInput, WorkFeedInput, WorkFeedScopeInput,
+};
+pub use mutations::{
+ MarkWorkFeedItemsDonePayload, UndoWorkFeedItemsDonePayload, WorkFeedMutationRoot,
+};
+pub use objects::{
+ GraphqlWorkFeedEntry, GraphqlWorkFeedItem, GraphqlWorkFeedPage, GraphqlWorkFeedPatch,
+ GraphqlWorkFeedStack,
+};
+pub use query::resolve_work_feed;
+pub use subscriptions::WorkFeedSubscriptionRoot;
diff --git a/crates/graphql_work_feed/src/mutations.rs b/crates/graphql_work_feed/src/mutations.rs
new file mode 100644
index 0000000000..dbf2d4b72c
--- /dev/null
+++ b/crates/graphql_work_feed/src/mutations.rs
@@ -0,0 +1,94 @@
+use std::marker::PhantomData;
+
+use async_graphql::{Context, ID, Object, SimpleObject};
+use graphql_common::require_authenticated_user;
+use graphql_soup::SoupEntityEdges;
+use work_feed::domain::models::WorkFeedDoneReceipt;
+
+use crate::{
+ context::{WorkFeedGraphqlContext, to_graphql_error},
+ inputs::{MarkWorkFeedItemsDoneInput, UndoWorkFeedItemsDoneInput},
+ objects::GraphqlWorkFeedPatch,
+};
+
+/// The result of marking work feed items done.
+#[derive(SimpleObject)]
+pub struct MarkWorkFeedItemsDonePayload {
+ /// The completed items; remove them from every feed. Items that were
+ /// already gone are included.
+ item_ids: Vec<ID>,
+ /// Opaque token that reverses exactly this operation.
+ undo_token: String,
+}
+
+/// The result of undoing a mark-done.
+#[derive(SimpleObject)]
+pub struct UndoWorkFeedItemsDonePayload<E: SoupEntityEdges> {
+ /// The restored items' places in the requested feed.
+ patches: Vec<GraphqlWorkFeedPatch<E>>,
+}
+
+/// Root GraphQL adapter for work feed mutations.
+pub struct WorkFeedMutationRoot<E>(PhantomData<fn() -> E>);
+
+impl<E> Default for WorkFeedMutationRoot<E> {
+ fn default() -> Self {
+ Self(PhantomData)
+ }
+}
+
+#[Object]
+impl<E: SoupEntityEdges> WorkFeedMutationRoot<E> {
+ /// Mark work feed items done for the authenticated user: acknowledge the
+ /// notifications each entry showed and archive inbox email.
+ /// Notifications newer than an entry's `revision` stay active. Own work
+ /// is not acknowledged, so an item the user also worked on stays in the
+ /// work feed, seen. Tasks, discussions and pull requests themselves are
+ /// not completed.
+ async fn mark_work_feed_items_done(
+ &self,
+ ctx: &Context<'_>,
+ input: MarkWorkFeedItemsDoneInput,
+ ) -> async_graphql::Result<MarkWorkFeedItemsDonePayload> {
+ let user = require_authenticated_user(ctx)?;
+ let context = ctx.data::<WorkFeedGraphqlContext>()?;
+ let targets = input.into_targets()?;
+ let viewer = context.viewer(user).await?;
+ let outcome = context
+ .service
+ .mark_done(viewer, targets)
+ .await
+ .map_err(to_graphql_error)?;
+ Ok(MarkWorkFeedItemsDonePayload {
+ item_ids: outcome.items.iter().map(|key| ID(key.id())).collect(),
+ undo_token: outcome.receipt.encode(),
+ })
+ }
+
+ /// Reverse one mark-done for the authenticated user without overwriting
+ /// anything that happened since, and return the restored items' places
+ /// in the requested feed.
+ async fn undo_work_feed_items_done(
+ &self,
+ ctx: &Context<'_>,
+ input: UndoWorkFeedItemsDoneInput,
+ ) -> async_graphql::Result<UndoWorkFeedItemsDonePayload<E>> {
+ let user = require_authenticated_user(ctx)?;
+ let context = ctx.data::<WorkFeedGraphqlContext>()?;
+ let receipt = WorkFeedDoneReceipt::decode(&input.undo_token)
+ .map_err(|_| async_graphql::Error::new("invalid work feed undo token"))?;
+ let scope = input.scope.unwrap_or_default().into_scope();
+ let viewer = context.viewer(user).await?;
+ let changes = context
+ .service
+ .undo_done(viewer, scope, receipt)
+ .await
+ .map_err(to_graphql_error)?;
+ Ok(UndoWorkFeedItemsDonePayload {
+ patches: changes
+ .into_iter()
+ .map(GraphqlWorkFeedPatch::from)
+ .collect(),
+ })
+ }
+}
diff --git a/crates/graphql_work_feed/src/objects.rs b/crates/graphql_work_feed/src/objects.rs
new file mode 100644
index 0000000000..105734c53f
--- /dev/null
+++ b/crates/graphql_work_feed/src/objects.rs
@@ -0,0 +1,372 @@
+use async_graphql::{Enum, ID, Object, SimpleObject, Union};
+use graphql_notification::GraphqlNotification;
+use graphql_soup::{GraphqlSoupEntity, SoupEntityEdges};
+use soup::domain::models::SoupProjectionHydration;
+use work_feed::domain::models::{
+ WorkFeedChange, WorkFeedEntry, WorkFeedItemState, WorkFeedPage, WorkFeedPrimaryReason,
+ WorkFeedStack, WorkFeedStackKind, counts_as_unseen,
+};
+
+/// Most notifications one stack returns when no limit is given.
+const DEFAULT_STACK_NOTIFICATION_LIMIT: i32 = 20;
+/// Most notifications one stack may return.
+const MAX_STACK_NOTIFICATION_LIMIT: i32 = 100;
+
+/// An item's state for its viewer.
+#[derive(Enum, Clone, Copy, Debug, PartialEq, Eq)]
+#[graphql(name = "WorkFeedItemState")]
+pub enum GraphqlWorkFeedItemState {
+ /// At least one active reason is unseen.
+ Unseen,
+ /// Every active reason has been seen.
+ Seen,
+ /// Every notification the viewer observed was completed.
+ Done,
+}
+
+impl From<WorkFeedItemState> for GraphqlWorkFeedItemState {
+ fn from(value: WorkFeedItemState) -> Self {
+ match value {
+ WorkFeedItemState::Unseen => Self::Unseen,
+ WorkFeedItemState::Seen => Self::Seen,
+ WorkFeedItemState::Done => Self::Done,
+ }
+ }
+}
+
+/// How one stack groups its notifications.
+#[derive(Enum, Clone, Copy, Debug, PartialEq, Eq)]
+#[graphql(name = "WorkFeedStackKind")]
+pub enum GraphqlWorkFeedStackKind {
+ /// Replies, thread mentions and the absorbed root of one channel thread.
+ ChannelThread,
+ /// One root mention in a channel whose thread has no replies yet.
+ ChannelMention,
+ /// New root messages in a channel.
+ ChannelMessages,
+ /// Reactions to the viewer's channel messages.
+ ChannelReactions,
+ /// Several comments, replies or mentions in one document comment thread.
+ CommentThread,
+ /// A standalone mention in a document comment.
+ CommentMention,
+ /// Standalone root comments on a document.
+ Comments,
+ /// Mentions of a document in channels.
+ DocumentMentions,
+ /// One discussion thread on a project, company or contact.
+ Discussion,
+ /// Any other single event.
+ Event,
+}
+
+impl From<WorkFeedStackKind> for GraphqlWorkFeedStackKind {
+ fn from(value: WorkFeedStackKind) -> Self {
+ match value {
+ WorkFeedStackKind::ChannelThread => Self::ChannelThread,
+ WorkFeedStackKind::ChannelMention => Self::ChannelMention,
+ WorkFeedStackKind::ChannelMessages => Self::ChannelMessages,
+ WorkFeedStackKind::ChannelReactions => Self::ChannelReactions,
+ WorkFeedStackKind::CommentThread => Self::CommentThread,
+ WorkFeedStackKind::CommentMention => Self::CommentMention,
+ WorkFeedStackKind::Comments => Self::Comments,
+ WorkFeedStackKind::DocumentMentions => Self::DocumentMentions,
+ WorkFeedStackKind::Discussion => Self::Discussion,
+ WorkFeedStackKind::Event => Self::Event,
+ }
+ }
+}
+
+/// Why an entry is presented the way it is in its feed.
+#[derive(Enum, Clone, Copy, Debug, PartialEq, Eq)]
+#[graphql(name = "WorkFeedPrimaryReason")]
+pub enum GraphqlWorkFeedPrimaryReason {
+ /// The viewer's own work is the newest reason: open the entity.
+ OwnWork,
+ /// Incoming attention is the newest reason: present and open the
+ /// primary stack.
+ Attention,
+}
+
+/// Notifications grouped the way they are presented.
+pub struct GraphqlWorkFeedStack(WorkFeedStack);
+
+/// Notifications grouped the way they are presented, newest first. The
+/// newest notification names the stack and is its navigation target.
+#[Object(name = "WorkFeedStack")]
+impl GraphqlWorkFeedStack {
+ /// How the stack groups its notifications.
+ async fn kind(&self) -> GraphqlWorkFeedStackKind {
+ self.0.kind.into()
+ }
+
+ /// The conversation thread the stack belongs to, when it is one: a
+ /// channel thread root, document comment thread or discussion thread.
+ async fn thread_id(&self) -> Option<&str> {
+ self.0.thread_id.as_deref()
+ }
+
+ /// When the stack's newest notification was created, in RFC 3339.
+ async fn latest_at(&self) -> String {
+ self.0.latest().created_at.to_rfc3339()
+ }
+
+ /// Whether any notification in the stack is unseen.
+ async fn unseen(&self) -> bool {
+ self.0.is_unseen()
+ }
+
+ /// How many notifications the stack holds.
+ async fn count(&self) -> i32 {
+ i32::try_from(self.0.notifications.len()).unwrap_or(i32::MAX)
+ }
+
+ /// The stack's notifications, newest first. Defaults to 20, capped at
+ /// 100; `count` is the full size.
+ async fn notifications(
+ &self,
+ limit: Option<i32>,
+ ) -> async_graphql::Result<Vec<GraphqlNotification>> {
+ let limit = graphql_common::parse_limit(
+ limit,
+ DEFAULT_STACK_NOTIFICATION_LIMIT,
+ MAX_STACK_NOTIFICATION_LIMIT,
+ )?;
+ Ok(self
+ .0
+ .notifications
+ .iter()
+ .take(limit as usize)
+ .cloned()
+ .map(GraphqlNotification::from)
+ .collect())
+ }
+}
+
+/// One context the viewer can return to or acknowledge. The same item is
+/// shared by every feed it appears in; per-feed placement lives on its entry.
+pub struct GraphqlWorkFeedItem<E: SoupEntityEdges> {
+ /// The item's global id.
+ id: String,
+ /// The entity the item is about.
+ entity: GraphqlSoupEntity<E>,
+ /// The item's aggregate state.
+ state: WorkFeedItemState,
+ /// The newest active notification in the item's scope.
+ attention_at: Option<String>,
+ /// How many of the item's active notifications are unseen.
+ unseen_count: usize,
+ /// The item's notifications grouped for presentation.
+ stacks: Vec<GraphqlWorkFeedStack>,
+}
+
+/// One context the viewer can return to or acknowledge: an entity, a
+/// channel thread, or a channel's activity outside its threads. Items are
+/// shared across feeds; placement and primary reason live on each entry.
+#[Object(name = "WorkFeedItem")]
+impl<E: SoupEntityEdges> GraphqlWorkFeedItem<E> {
+ /// Stable per-viewer item id: `<entity type>:<entity id>`.
+ async fn id(&self) -> ID {
+ ID(self.id.clone())
+ }
+
+ /// The entity the item is about; a channel thread's entity is its root
+ /// message.
+ async fn entity(&self) -> &GraphqlSoupEntity<E> {
+ &self.entity
+ }
+
+ /// The item's state for the viewer.
+ async fn state(&self) -> GraphqlWorkFeedItemState {
+ self.state.into()
+ }
+
+ /// When the newest active notification in the item's scope was created,
+ /// in RFC 3339; absent when the item has no outstanding attention.
+ async fn attention_at(&self) -> Option<&str> {
+ self.attention_at.as_deref()
+ }
+
+ /// How many of the item's active notifications are unseen.
+ async fn unseen_count(&self) -> i32 {
+ i32::try_from(self.unseen_count).unwrap_or(i32::MAX)
+ }
+
+ /// The item's active notifications grouped for presentation, newest
+ /// stack first.
+ async fn stacks(&self) -> &[GraphqlWorkFeedStack] {
+ &self.stacks
+ }
+}
+
+/// An item placed in one feed.
+pub struct GraphqlWorkFeedEntry<E: SoupEntityEdges> {
+ /// The item.
+ item: GraphqlWorkFeedItem<E>,
+ /// The entry's sort time.
+ sort_at: String,
+ /// The own work counted by this feed.
+ touched_at: Option<String>,
+ /// What done acknowledges for this entry.
+ revision: String,
+ /// The entry's primary reason.
+ primary: WorkFeedPrimaryReason,
+}
+
+/// An item placed in one feed: where it sits, why, and what marking it done
+/// acknowledges.
+#[Object(name = "WorkFeedEntry")]
+impl<E: SoupEntityEdges> GraphqlWorkFeedEntry<E> {
+ /// The item.
+ async fn item(&self) -> &GraphqlWorkFeedItem<E> {
+ &self.item
+ }
+
+ /// Where the entry sits, in RFC 3339: the later of the item's attention
+ /// and own-work times in this feed.
+ async fn sort_at(&self) -> &str {
+ &self.sort_at
+ }
+
+ /// The viewer's newest own work counted by this feed, in RFC 3339;
+ /// always absent in attention mode.
+ async fn touched_at(&self) -> Option<&str> {
+ self.touched_at.as_deref()
+ }
+
+ /// Opaque token of the attention this entry shows; send it with done so
+ /// notifications that arrive later stay active.
+ async fn revision(&self) -> &str {
+ &self.revision
+ }
+
+ /// Why the entry is presented the way it is.
+ async fn primary_reason(&self) -> GraphqlWorkFeedPrimaryReason {
+ match self.primary {
+ WorkFeedPrimaryReason::OwnWork => GraphqlWorkFeedPrimaryReason::OwnWork,
+ WorkFeedPrimaryReason::Attention { .. } => GraphqlWorkFeedPrimaryReason::Attention,
+ }
+ }
+
+ /// Index into the item's stacks of the stack the entry presents and
+ /// opens, when its primary reason is attention.
+ async fn primary_stack_index(&self) -> Option<i32> {
+ match self.primary {
+ WorkFeedPrimaryReason::OwnWork => None,
+ WorkFeedPrimaryReason::Attention { stack } => i32::try_from(stack).ok(),
+ }
+ }
+}
+
+impl<E: SoupEntityEdges> GraphqlWorkFeedEntry<E> {
+ /// Build the GraphQL entry for a domain entry.
+ pub fn new(entry: WorkFeedEntry<SoupProjectionHydration>) -> Self {
+ let item = entry.item;
+ let revision = item.revision().encode();
+ let unseen_count = item
+ .notifications
+ .iter()
+ .filter(|notification| counts_as_unseen(notification))
+ .count();
+ Self {
+ sort_at: entry.sort_at.to_rfc3339(),
+ touched_at: item.touched_at.map(|touched| touched.to_rfc3339()),
+ revision,
+ primary: item.primary,
+ item: GraphqlWorkFeedItem {
+ id: item.key.id(),
+ entity: GraphqlSoupEntity::new_with_projection(item.entity),
+ state: item.state,
+ attention_at: item.attention_at.map(|attention| attention.to_rfc3339()),
+ unseen_count,
+ stacks: item.stacks.into_iter().map(GraphqlWorkFeedStack).collect(),
+ },
+ }
+ }
+}
+
+/// One page of the viewer's work feed, newest first.
+#[derive(SimpleObject)]
+#[graphql(name = "WorkFeedPage")]
+pub struct GraphqlWorkFeedPage<E: SoupEntityEdges> {
+ /// The page's entries.
+ entries: Vec<GraphqlWorkFeedEntry<E>>,
+ /// Cursor for the next page; absent once the feed is exhausted.
+ next_cursor: Option<String>,
+}
+
+impl<E: SoupEntityEdges> GraphqlWorkFeedPage<E> {
+ /// Build the GraphQL page for a domain page.
+ pub fn new(page: WorkFeedPage<SoupProjectionHydration>) -> Self {
+ Self {
+ entries: page
+ .entries
+ .into_iter()
+ .map(GraphqlWorkFeedEntry::new)
+ .collect(),
+ next_cursor: page.next.map(|next| next.encode()),
+ }
+ }
+}
+
+/// An item that belongs in the subscribed feed, with its current content and
+/// placement. Insert it, or move it to its new `sortAt`.
+#[derive(SimpleObject)]
+#[graphql(name = "WorkFeedEntryUpserted")]
+pub struct GraphqlWorkFeedEntryUpserted<E: SoupEntityEdges> {
+ /// The entry.
+ entry: GraphqlWorkFeedEntry<E>,
+}
+
+/// An item that no longer belongs in the subscribed feed: done, filtered out
+/// or inaccessible. The entity itself is not necessarily deleted.
+#[derive(SimpleObject)]
+#[graphql(name = "WorkFeedEntryRemoved")]
+pub struct GraphqlWorkFeedEntryRemoved {
+ /// The removed item's id.
+ item_id: ID,
+}
+
+/// Changes may have been missed: refetch the feed.
+#[derive(SimpleObject)]
+#[graphql(name = "WorkFeedInvalidated")]
+pub struct GraphqlWorkFeedInvalidated {
+ /// Always true.
+ refresh: bool,
+}
+
+/// One change to a work feed's membership, placement or items.
+#[expect(
+ clippy::large_enum_variant,
+ reason = "upserts dominate and carry hydrated entries"
+)]
+#[derive(Union)]
+#[graphql(name = "WorkFeedPatch")]
+pub enum GraphqlWorkFeedPatch<E: SoupEntityEdges> {
+ /// An item belongs in the feed with this content and placement.
+ Upserted(GraphqlWorkFeedEntryUpserted<E>),
+ /// An item no longer belongs in the feed.
+ Removed(GraphqlWorkFeedEntryRemoved),
+ /// The feed must be refetched.
+ Invalidated(GraphqlWorkFeedInvalidated),
+}
+
+impl<E: SoupEntityEdges> GraphqlWorkFeedPatch<E> {
+ /// The patch announcing that changes may have been missed.
+ pub fn invalidated() -> Self {
+ Self::Invalidated(GraphqlWorkFeedInvalidated { refresh: true })
+ }
+}
+
+impl<E: SoupEntityEdges> From<WorkFeedChange<SoupProjectionHydration>> for GraphqlWorkFeedPatch<E> {
+ fn from(change: WorkFeedChange<SoupProjectionHydration>) -> Self {
+ match change {
+ WorkFeedChange::Upserted(entry) => Self::Upserted(GraphqlWorkFeedEntryUpserted {
+ entry: GraphqlWorkFeedEntry::new(entry),
+ }),
+ WorkFeedChange::Removed(key) => Self::Removed(GraphqlWorkFeedEntryRemoved {
+ item_id: ID(key.id()),
+ }),
+ }
+ }
+}
diff --git a/crates/graphql_work_feed/src/query.rs b/crates/graphql_work_feed/src/query.rs
new file mode 100644
index 0000000000..f9b8ae2f3c
--- /dev/null
+++ b/crates/graphql_work_feed/src/query.rs
@@ -0,0 +1,26 @@
+use async_graphql::Context;
+use graphql_soup::SoupEntityEdges;
+use macro_user_id::user_id::MacroUserIdStr;
+
+use crate::{
+ context::{WorkFeedGraphqlContext, to_graphql_error},
+ inputs::WorkFeedInput,
+ objects::GraphqlWorkFeedPage,
+};
+
+/// Resolve one page of `user`'s work feed.
+pub async fn resolve_work_feed<E: SoupEntityEdges>(
+ ctx: &Context<'_>,
+ user: MacroUserIdStr<'static>,
+ input: WorkFeedInput,
+) -> async_graphql::Result<GraphqlWorkFeedPage<E>> {
+ let context = ctx.data::<WorkFeedGraphqlContext>()?;
+ let query = input.into_query()?;
+ let viewer = context.viewer(user).await?;
+ let page = context
+ .service
+ .page(viewer, query)
+ .await
+ .map_err(to_graphql_error)?;
+ Ok(GraphqlWorkFeedPage::new(page))
+}
diff --git a/crates/graphql_work_feed/src/subscriptions.rs b/crates/graphql_work_feed/src/subscriptions.rs
new file mode 100644
index 0000000000..7bd197e3dc
--- /dev/null
+++ b/crates/graphql_work_feed/src/subscriptions.rs
@@ -0,0 +1,115 @@
+use std::{collections::HashSet, marker::PhantomData, time::Duration};
+
+use async_graphql::{Context, Subscription};
+use futures::Stream;
+use graphql_common::require_authenticated_user;
+use graphql_soup::SoupEntityEdges;
+use work_feed::domain::models::{WorkFeedItemKey, WorkFeedTrigger};
+
+use crate::{
+ context::WorkFeedGraphqlContext, inputs::WorkFeedScopeInput, objects::GraphqlWorkFeedPatch,
+};
+
+#[cfg(test)]
+mod test;
+
+/// How long triggers are collected before one recompute, so a burst of
+/// realtime events (a busy thread, a bulk done) costs one feed lookup.
+const COALESCE_WINDOW: Duration = Duration::from_millis(300);
+
+/// The triggers collected for one recompute.
+#[derive(Default)]
+struct TriggerBatch {
+ /// Keys to recompute, in arrival order.
+ keys: Vec<WorkFeedItemKey>,
+ /// Keys already in `keys`.
+ seen: HashSet<WorkFeedItemKey>,
+ /// Whether any trigger said changes may have been missed.
+ invalidated: bool,
+}
+
+impl TriggerBatch {
+ /// Add one trigger to the batch.
+ fn absorb(&mut self, trigger: WorkFeedTrigger) {
+ match trigger {
+ WorkFeedTrigger::Changed(entities) => {
+ for entity in entities {
+ let key = WorkFeedItemKey::new(entity);
+ if self.seen.insert(key.clone()) {
+ self.keys.push(key);
+ }
+ }
+ }
+ WorkFeedTrigger::Invalidated => self.invalidated = true,
+ }
+ }
+}
+
+/// Root GraphQL adapter for the work feed subscription.
+pub struct WorkFeedSubscriptionRoot<E>(PhantomData<fn() -> E>);
+
+impl<E> Default for WorkFeedSubscriptionRoot<E> {
+ fn default() -> Self {
+ Self(PhantomData)
+ }
+}
+
+#[Subscription]
+impl<E: SoupEntityEdges> WorkFeedSubscriptionRoot<E> {
+ /// Changes to the authenticated user's work feed in `scope`: entries to
+ /// insert or move, items to remove, and an invalidation when changes may
+ /// have been missed. Each payload is one batch to apply together. Start
+ /// it before fetching the first page and refetch after an invalidation;
+ /// the stream ends with an error when its sources end, after which the
+ /// client resubscribes and refetches.
+ async fn work_feed_updates(
+ &self,
+ ctx: &Context<'_>,
+ scope: Option<WorkFeedScopeInput>,
+ ) -> async_graphql::Result<
+ impl Stream<Item = async_graphql::Result<Vec<GraphqlWorkFeedPatch<E>>>> + 'static,
+ > {
+ let user = require_authenticated_user(ctx)?;
+ let context = ctx.data::<WorkFeedGraphqlContext>()?.clone();
+ let scope = scope.unwrap_or_default().into_scope();
+ let viewer = context.viewer(user.clone()).await?;
+ let mut triggers = context.triggers.subscribe(user);
+
+ Ok(async_stream::stream! {
+ while let Some(first) = triggers.recv().await {
+ let mut batch = TriggerBatch::default();
+ batch.absorb(first);
+ let window = tokio::time::sleep(COALESCE_WINDOW);
+ tokio::pin!(window);
+ let mut open = true;
+ while open {
+ tokio::select! {
+ () = &mut window => break,
+ next = triggers.recv() => match next {
+ Some(trigger) => batch.absorb(trigger),
+ None => open = false,
+ },
+ }
+ }
+
+ if batch.invalidated {
+ yield Ok(vec![GraphqlWorkFeedPatch::invalidated()]);
+ continue;
+ }
+ match context.service.recompute(viewer.clone(), scope.clone(), batch.keys).await {
+ Ok(changes) if changes.is_empty() => {}
+ Ok(changes) => {
+ yield Ok(changes.into_iter().map(GraphqlWorkFeedPatch::from).collect());
+ }
+ Err(error) => {
+ tracing::error!(error = ?error, "work feed recompute failed");
+ yield Ok(vec![GraphqlWorkFeedPatch::invalidated()]);
+ }
+ }
+ }
+ yield Err(async_graphql::Error::new(
+ "work feed subscription ended; resubscribe and refetch the feed",
+ ));
+ })
+ }
+}
diff --git a/crates/graphql_work_feed/src/subscriptions/test.rs b/crates/graphql_work_feed/src/subscriptions/test.rs
new file mode 100644
index 0000000000..0086b93a2f
--- /dev/null
+++ b/crates/graphql_work_feed/src/subscriptions/test.rs
@@ -0,0 +1,19 @@
+use super::*;
+use model_entity::EntityType;
+
+#[test]
+fn batches_deduplicate_keys_in_arrival_order() {
+ let doc = EntityType::Document.with_entity_string("d".to_string());
+ let chat = EntityType::Chat.with_entity_string("c".to_string());
+ let mut batch = TriggerBatch::default();
+ batch.absorb(WorkFeedTrigger::Changed(vec![doc.clone(), chat.clone()]));
+ batch.absorb(WorkFeedTrigger::Changed(vec![doc.clone()]));
+ assert_eq!(
+ batch.keys,
+ vec![WorkFeedItemKey::new(doc), WorkFeedItemKey::new(chat)]
+ );
+ assert!(!batch.invalidated);
+
+ batch.absorb(WorkFeedTrigger::Invalidated);
+ assert!(batch.invalidated);
+}
diff --git a/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.down.sql b/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.down.sql
new file mode 100644
index 0000000000..b6c5a845d3
--- /dev/null
+++ b/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.down.sql
@@ -0,0 +1,2 @@
+-- no-transaction
+DROP INDEX CONCURRENTLY IF EXISTS idx_activity_events_subject_entity;
diff --git a/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.up.sql b/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.up.sql
new file mode 100644
index 0000000000..facd50a967
--- /dev/null
+++ b/crates/macro_db_client/migrations/20261009005837_activity_events_subject_entity_idx.up.sql
@@ -0,0 +1,9 @@
+-- no-transaction
+-- Latest own activity per entity for the work feed: one probe per feed
+-- candidate instead of a scan of the viewer's whole activity history (the
+-- subject index) or of the entity's history across every user (the entity
+-- index).
+-- Must stay a single statement: sqlx sends no-transaction migrations as
+-- one batch, and CONCURRENTLY cannot run inside a transaction.
+CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_activity_events_subject_entity
+ ON activity_events (subject_id, entity_type, entity_id, occurred_at DESC);
diff --git a/crates/soup/fixtures/work_feed.sql b/crates/soup/fixtures/work_feed.sql
new file mode 100644
index 0000000000..a1551cb97d
--- /dev/null
+++ b/crates/soup/fixtures/work_feed.sql
@@ -0,0 +1,139 @@
+-- Fixture for the soup work feed candidate query.
+--
+-- user-1 is the subject. Each entity exercises one rule of the merge between
+-- attention (live notifications, one not done) and own work (latest non-view
+-- activity).
+-- (T = minute past 10:00 on 2024-06-01, UTC)
+--
+-- thread-S sent by user-1 at T13; its T0 notification does not count
+-- because the thread is not in the inbox -> own T13
+-- thread-Z in the inbox, notified at T12 -> attention T12
+-- channel-X user-1 messaged at T11 -> own T11
+-- doc-A notified at T5, edited at T9 -> own T9
+-- doc-B notified at T8, edited at T3 -> attention T8
+-- doc-G notified at T8 (ties doc-B; id breaks it) -> attention T8
+-- doc-C edited at T7, never notified -> own T7
+-- chat-A notified at T4 -> attention T4
+-- doc-E only notification is done (T10), edited T2 -> own T2
+-- thread-M a mention in channel-X's thread M at T1 -> attention T1
+--
+-- Never surfaced: doc-F (only opened), thread-A (archived, notified T14),
+-- and user-2's activity.
+
+SET session_replication_role = 'replica';
+
+INSERT INTO public."Organization" ("id", "name", "status")
+VALUES (1, 'Test Organization', 'PILOT')
+ON CONFLICT DO NOTHING;
+
+INSERT INTO public."macro_user" ("id", "username", "email", "stripe_customer_id")
+VALUES ('a1111111-1111-1111-1111-111111111111', '[email protected]', '[email protected]', 'stripe_id_1'),
+ ('a2222222-2222-2222-2222-222222222222', '[email protected]', '[email protected]', 'stripe_id_2');
+
+INSERT INTO public."User" ("id", "email", "stripeCustomerId", "organizationId", "macro_user_id")
+VALUES ('macro|[email protected]', '[email protected]', 'stripe_id_1', 1, 'a1111111-1111-1111-1111-111111111111'),
+ ('macro|[email protected]', '[email protected]', 'stripe_id_2', 1, 'a2222222-2222-2222-2222-222222222222')
+ON CONFLICT DO NOTHING;
+
+---------------------------------------------------
+-- ENTITIES
+---------------------------------------------------
+
+INSERT INTO public."DocumentFamily" ("id", "rootDocumentId")
+VALUES (1, '11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa'),
+ (2, '11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb'),
+ (3, '11111111-cccc-cccc-cccc-cccccccccccc'),
+ (5, '11111111-eeee-eeee-eeee-eeeeeeeeeeee'),
+ (6, '11111111-ffff-ffff-ffff-ffffffffffff'),
+ (7, '11111111-0000-0000-0000-000000000000');
+
+INSERT INTO public."Document" ("id", "name", "owner", "documentFamilyId", "fileType", "createdAt", "updatedAt", "deletedAt")
+VALUES ('11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'Doc A', 'macro|[email protected]', 1, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL),
+ ('11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'Doc B', 'macro|[email protected]', 2, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL),
+ ('11111111-cccc-cccc-cccc-cccccccccccc', 'Doc C', 'macro|[email protected]', 3, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL),
+ ('11111111-eeee-eeee-eeee-eeeeeeeeeeee', 'Doc E', 'macro|[email protected]', 5, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL),
+ ('11111111-ffff-ffff-ffff-ffffffffffff', 'Doc F', 'macro|[email protected]', 6, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL),
+ ('11111111-0000-0000-0000-000000000000', 'Doc G', 'macro|[email protected]', 7, 'md', '2023-01-05 10:00:00', '2023-01-05 10:00:00', NULL);
+
+INSERT INTO public."Chat" ("id", "name", "userId", "projectId", "createdAt", "updatedAt")
+VALUES ('22222222-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'Chat A', 'macro|[email protected]', NULL, '2023-01-06 10:00:00', '2023-01-06 10:00:00');
+
+INSERT INTO public.comms_channels ("id", "channel_type", "owner_id", "created_at", "updated_at")
+VALUES ('33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'private', 'macro|[email protected]', '2023-01-07 10:00:00', '2023-01-07 10:00:00');
+
+INSERT INTO public.comms_messages ("id", "parent_entity_type", "parent_entity_id", "thread_id", "sender_id", "content", "created_at", "updated_at")
+VALUES ('99999999-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'channel', '33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa', NULL, 'macro|[email protected]', 'hey @user-1', '2024-06-01 10:01:00+00', '2024-06-01 10:01:00+00');
+
+INSERT INTO public.comms_channel_participants ("channel_id", "role", "user_id", "joined_at", "left_at")
+VALUES ('33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'member', 'macro|[email protected]', '2023-01-07 10:00:00', NULL);
+
+INSERT INTO public.email_links ("id", "macro_id", "fusionauth_user_id", "email_address", "provider")
+VALUES ('55555555-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'macro|[email protected]', 'fa-user-1', '[email protected]', 'GMAIL');
+
+INSERT INTO public.email_threads ("id", "link_id", "inbox_visible", "is_signal", "latest_inbound_message_ts", "created_at", "updated_at")
+VALUES ('44444444-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '55555555-aaaa-aaaa-aaaa-aaaaaaaaaaaa', TRUE, TRUE, '2024-06-01 10:12:00+00', '2024-06-01 10:12:00+00', '2024-06-01 10:12:00+00'),
+ -- thread-S: sent by user-1, not in the inbox.
+ ('44444444-5555-5555-5555-555555555555', '55555555-aaaa-aaaa-aaaa-aaaaaaaaaaaa', FALSE, TRUE, NULL, '2024-06-01 10:13:00+00', '2024-06-01 10:13:00+00'),
+ -- thread-A: archived.
+ ('44444444-0000-0000-0000-000000000000', '55555555-aaaa-aaaa-aaaa-aaaaaaaaaaaa', FALSE, TRUE, '2024-06-01 10:14:00+00', '2024-06-01 10:14:00+00', '2024-06-01 10:14:00+00');
+
+INSERT INTO public.entity_access ("entity_id", "entity_type", "source_id", "source_type", "access_level", "granted_from_project_id")
+VALUES ('11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'document', 'macro|[email protected]', 'user', 'owner', NULL),
+ ('11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'document', 'macro|[email protected]', 'user', 'owner', NULL),
+ ('11111111-cccc-cccc-cccc-cccccccccccc', 'document', 'macro|[email protected]', 'user', 'owner', NULL),
+ ('11111111-eeee-eeee-eeee-eeeeeeeeeeee', 'document', 'macro|[email protected]', 'user', 'owner', NULL),
+ ('11111111-ffff-ffff-ffff-ffffffffffff', 'document', 'macro|[email protected]', 'user', 'owner', NULL),
+ ('11111111-0000-0000-0000-000000000000', 'document', 'macro|[email protected]', 'user', 'view', NULL),
+ ('22222222-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'chat', 'macro|[email protected]', 'user', 'owner', NULL);
+
+---------------------------------------------------
+-- NOTIFICATIONS
+---------------------------------------------------
+
+INSERT INTO public.notification ("id", "notification_event_type", "event_item_id", "event_item_type", "service_sender", "created_at", "metadata", "sender_id", "secondary_event_item_id", "secondary_event_item_type")
+VALUES
+('0190b000-0000-7000-8000-000000000005', 'document_mention', '11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'document', 'test', '2024-06-01 10:05:00', '{}', 'macro|[email protected]', NULL, NULL),
+('0190b000-0000-7000-8000-000000000008', 'document_mention', '11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb', 'document', 'test', '2024-06-01 10:08:00', '{}', 'macro|[email protected]', NULL, NULL),
+('0190b000-0000-7000-8000-000000000108', 'document_mention', '11111111-0000-0000-0000-000000000000', 'document', 'test', '2024-06-01 10:08:00', '{}', 'macro|[email protected]', NULL, NULL),
+('0190b000-0000-7000-8000-000000000004', 'ai_response', '22222222-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'chat', 'test', '2024-06-01 10:04:00', '{}', NULL, NULL, NULL),
+('0190b000-0000-7000-8000-000000000010', 'document_mention', '11111111-eeee-eeee-eeee-eeeeeeeeeeee', 'document', 'test', '2024-06-01 10:10:00', '{}', 'macro|[email protected]', NULL, NULL),
+('0190b000-0000-7000-8000-000000000001', 'channel_mention', '33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'channel', 'test', '2024-06-01 10:01:00', '{"messageId": "99999999-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}', 'macro|[email protected]', '99999999-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'channel_message'),
+('0190b000-0000-7000-8000-000000000012', 'new_email', '44444444-aaaa-aaaa-aaaa-aaaaaaaaaaaa', 'email_thread', 'test', '2024-06-01 10:12:00', '{}', NULL, NULL, NULL),
+('0190b000-0000-7000-8000-000000000000', 'new_email', '44444444-5555-5555-5555-555555555555', 'email_thread', 'test', '2024-06-01 10:00:00', '{}', NULL, NULL, NULL),
+('0190b000-0000-7000-8000-000000000014', 'new_email', '44444444-0000-0000-0000-000000000000', 'email_thread', 'test', '2024-06-01 10:14:00', '{}', NULL, NULL, NULL);
+
+INSERT INTO public.user_notification ("user_id", "notification_id", "created_at", "sent", "seen_at", "deleted_at", "state", "is_important_v0")
+VALUES
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000005', '2024-06-01 10:05:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000008', '2024-06-01 10:08:00', TRUE, NULL, NULL, 'seen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000108', '2024-06-01 10:08:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000004', '2024-06-01 10:04:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000010', '2024-06-01 10:10:00', TRUE, NULL, NULL, 'done', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000001', '2024-06-01 10:01:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000012', '2024-06-01 10:12:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000000', '2024-06-01 10:00:00', TRUE, NULL, NULL, 'unseen', FALSE),
+('macro|[email protected]', '0190b000-0000-7000-8000-000000000014', '2024-06-01 10:14:00', TRUE, NULL, NULL, 'unseen', FALSE);
+
+---------------------------------------------------
+-- OWN ACTIVITY
+---------------------------------------------------
+
+INSERT INTO public.activity_events ("id", "actor_id", "subject_id", "action", "action_payload", "entity_type", "entity_id", "occurred_at")
+VALUES
+('0190c000-0000-7000-8000-000000000009', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'document', '11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '2024-06-01 10:09:00+00'),
+('0190c000-0000-7000-8000-000000000003', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'document', '11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb', '2024-06-01 10:03:00+00'),
+('0190c000-0000-7000-8000-000000000007', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'document', '11111111-cccc-cccc-cccc-cccccccccccc', '2024-06-01 10:07:00+00'),
+('0190c000-0000-7000-8000-000000000002', 'macro|[email protected]', 'macro|[email protected]', 'created', NULL, 'document', '11111111-eeee-eeee-eeee-eeeeeeeeeeee', '2024-06-01 10:02:00+00'),
+('0190c000-0000-7000-8000-000000000015', 'macro|[email protected]', 'macro|[email protected]', 'opened', NULL, 'document', '11111111-ffff-ffff-ffff-ffffffffffff', '2024-06-01 10:15:00+00'),
+('0190c000-0000-7000-8000-000000000011', 'macro|[email protected]', 'macro|[email protected]', 'messaged', NULL, 'channel', '33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '2024-06-01 10:11:00+00'),
+('0190c000-0000-7000-8000-000000000013', 'macro|[email protected]', 'macro|[email protected]', 'sent', NULL, 'email_thread', '44444444-5555-5555-5555-555555555555', '2024-06-01 10:13:00+00'),
+-- Opening doc-A after editing it must not move it.
+('0190c000-0000-7000-8000-000000000016', 'macro|[email protected]', 'macro|[email protected]', 'opened', NULL, 'document', '11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '2024-06-01 10:16:00+00'),
+-- user-2's newer edit of doc-B is not user-1's own work.
+('0190c000-0000-7000-8000-000000000020', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'document', '11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb', '2024-06-01 10:20:00+00'),
+-- Archiving thread-A records an edit, which is triage, not own work.
+('0190c000-0000-7000-8000-000000000017', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'email_thread', '44444444-0000-0000-0000-000000000000', '2024-06-01 10:17:00+00'),
+-- Archiving thread-S after sending must not move it from its send.
+('0190c000-0000-7000-8000-000000000018', 'macro|[email protected]', 'macro|[email protected]', 'edited', NULL, 'email_thread', '44444444-5555-5555-5555-555555555555', '2024-06-01 10:18:00+00');
+
+SET session_replication_role = 'origin';
diff --git a/crates/soup/src/domain/models.rs b/crates/soup/src/domain/models.rs
index 499fb79a6e..d126d9975c 100644
--- a/crates/soup/src/domain/models.rs
+++ b/crates/soup/src/domain/models.rs
@@ -32,7 +32,7 @@ use item_filters::{
},
};
use macro_user_id::user_id::MacroUserIdStr;
-use model_entity::Entity;
+use model_entity::{Entity, EntityType};
use models_grouping::GroupingConfig;
use models_pagination::{
Cursor, CursorWithValAndFilter, Frecency, NotifiedAt, Query, SimpleSortMethod, TouchedByMe,
@@ -906,6 +906,119 @@ pub struct NotifiedEntity {
pub notified_at: chrono::DateTime<chrono::Utc>,
}
+/// Which reasons admit an entity to the work feed.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum WorkFeedSoupMode {
+ /// Live notifications plus the viewer's own work.
+ Work,
+ /// Live notifications only.
+ Attention,
+}
+
+/// Keyset position for a work feed page: the sort time and entity id of the
+/// last candidate the previous page walked.
+///
+/// Like [`NotifiedPagePosition`], the id stays the raw stored string.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct WorkFeedPagePosition {
+ /// The last candidate's sort time: the later of its attention and
+ /// own-work timestamps.
+ pub sort_at: chrono::DateTime<chrono::Utc>,
+ /// The last candidate's entity id — the tiebreaker on equal sort times.
+ pub entity_id: String,
+}
+
+/// Parameters for one page of work feed candidates.
+#[derive(Debug)]
+pub struct WorkFeedCandidateRequest<'a> {
+ /// User whose feed is listed; also the access-check subject.
+ pub user_id: MacroUserIdStr<'a>,
+ /// Maximum candidates to return.
+ pub limit: u16,
+ /// Whether own work admits candidates.
+ pub mode: WorkFeedSoupMode,
+ /// Resume after this position; `None` for the first page.
+ pub after: Option<WorkFeedPagePosition>,
+ /// Entity types the caller asked for. Narrowed further by the filter
+ /// and by which hydration legs are active.
+ pub types: &'a [EntityType],
+ /// Entity filters folded into the candidate gates where soup owns the
+ /// fold, exactly as for the notified-at feed.
+ pub filter: Option<&'a EntityFilterAst>,
+ /// Every inbox the caller can read; gates email-thread candidates.
+ pub link_ids: &'a [Uuid],
+ /// Sources whose stored foreign entities the caller may see.
+ pub foreign_entity_sources: &'a [SourceId],
+ /// Entity types whose candidates the domain can hydrate for this request.
+ pub hydratable: NotifiedHydratableTypes,
+ /// Restrict the feed to these candidate keys, for recomputing known items.
+ pub only: Option<&'a [Entity<'static>]>,
+}
+
+/// One work feed candidate and the timestamps of its two reasons.
+///
+/// Each candidate carries the reason that places it in the feed: its
+/// `sort_at` is the later of the two timestamps, and exactly one of the
+/// candidate query's two streams emits it.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct WorkFeedCandidate {
+ /// The candidate's entity; channel-thread candidates are keyed on their
+ /// thread root as a `channel_message`, like the notified-at feed.
+ pub entity: Entity<'static>,
+ /// The latest live notification keyed to the candidate, when at least
+ /// one of them is not done.
+ pub attention_at: Option<chrono::DateTime<chrono::Utc>>,
+ /// The viewer's latest own (non-view) activity on the candidate. Always
+ /// `None` in attention mode.
+ pub touched_at: Option<chrono::DateTime<chrono::Utc>>,
+ /// Where the candidate sits in the feed.
+ pub sort_at: chrono::DateTime<chrono::Utc>,
+}
+
+/// Request for one page of the hydrated work feed.
+#[derive(Debug, Clone)]
+pub struct WorkFeedSoupRequest {
+ /// User whose feed is listed.
+ pub user: MacroUserIdStr<'static>,
+ /// Every inbox the caller can read.
+ pub link_ids: Vec<Uuid>,
+ /// Maximum items to return.
+ pub limit: u16,
+ /// Whether own work admits items.
+ pub mode: WorkFeedSoupMode,
+ /// Entity types to include.
+ pub types: Vec<EntityType>,
+ /// Membership filters, folded into the candidate gates and applied in
+ /// full by each domain's hydration leg.
+ pub filter: EntityFilterAst,
+ /// Resume after this position; `None` for the first page.
+ pub after: Option<WorkFeedPagePosition>,
+ /// Restrict the feed to these candidate keys, for recomputing known items.
+ pub only: Option<Vec<Entity<'static>>>,
+}
+
+/// One hydrated work feed item and its reason timestamps.
+#[derive(Debug)]
+pub struct WorkFeedSoupItem {
+ /// The authorized Soup item with its server facts.
+ pub hydration: SoupProjectionHydration,
+ /// See [`WorkFeedCandidate::attention_at`].
+ pub attention_at: Option<chrono::DateTime<chrono::Utc>>,
+ /// See [`WorkFeedCandidate::touched_at`].
+ pub touched_at: Option<chrono::DateTime<chrono::Utc>>,
+ /// See [`WorkFeedCandidate::sort_at`].
+ pub sort_at: chrono::DateTime<chrono::Utc>,
+}
+
+/// One page of the hydrated work feed.
+#[derive(Debug)]
+pub struct WorkFeedSoupPage {
+ /// The page's items, newest first.
+ pub items: Vec<WorkFeedSoupItem>,
+ /// Where the next page starts; `None` once the feed is exhausted.
+ pub next: Option<WorkFeedPagePosition>,
+}
+
/// Whether the notified-at candidate query can fold this calendar filter.
///
/// Only id and notification-state literals have a soup-owned fold; the rest
diff --git a/crates/soup/src/domain/ports.rs b/crates/soup/src/domain/ports.rs
index 8a3af65be6..5d72827290 100644
--- a/crates/soup/src/domain/ports.rs
+++ b/crates/soup/src/domain/ports.rs
@@ -3,7 +3,8 @@ use std::sync::Arc;
use crate::domain::models::{
AdvancedSortParams, EnrichedSoupItem, GroupedSortRequest, IntoSoupReqAst, NotifiedEntity,
NotifiedSoupRequest, SimpleSortRequest, SoupErr, SoupProjectionHydration, SoupPropertiesField,
- SoupRequest, TouchedEntity, TouchedSoupRequest, grouping::ItemGroupingInfo,
+ SoupRequest, TouchedEntity, TouchedSoupRequest, WorkFeedCandidate, WorkFeedCandidateRequest,
+ WorkFeedSoupPage, WorkFeedSoupRequest, grouping::ItemGroupingInfo,
};
use entity_access::domain::models::{EntityAccessReceipt, MemberTeamRole};
use macro_user_id::user_id::MacroUserIdStr;
@@ -104,6 +105,15 @@ pub trait SoupRepo: Send + Sync + 'static {
&self,
req: NotifiedSoupRequest<'a>,
) -> impl Future<Output = Result<Vec<NotifiedEntity>, Self::Err>> + Send;
+
+ /// Fetch one page of work feed candidates: entities with live attention
+ /// or own work, newest `sort_at` first, already gated on existence,
+ /// deletion and access, and on the request's entity filters where soup
+ /// owns the fold.
+ fn work_feed_soup_page<'a>(
+ &self,
+ req: WorkFeedCandidateRequest<'a>,
+ ) -> impl Future<Output = Result<Vec<WorkFeedCandidate>, Self::Err>> + Send;
}
/// The possible outputs of soup — one paginated page per query mode.
@@ -308,6 +318,25 @@ pub trait SoupService: Send + Sync + 'static {
&self,
user_id: MacroUserIdStr<'a>,
) -> impl Future<Output = Result<Vec<PropertyDefinitionWithOptions>, SoupErr>> + Send;
+
+ /// Fetch one hydrated page of the viewer's work feed: entities with live
+ /// attention or own work, newest `sort_at` first, each with its reason
+ /// timestamps and authoritative server facts.
+ ///
+ /// Services without a work feed reject the request. The production
+ /// service overrides this method.
+ fn get_work_feed_page(
+ &self,
+ req: WorkFeedSoupRequest,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> impl Future<Output = Result<WorkFeedSoupPage, SoupErr>> + Send {
+ let _ = (req, team_receipt);
+ async move {
+ Err(SoupErr::SoupDbErr(anyhow::anyhow!(
+ "this soup service does not serve the work feed"
+ )))
+ }
+ }
}
impl<S> SoupService for Arc<S>
@@ -409,6 +438,14 @@ where
) -> Result<Vec<PropertyDefinitionWithOptions>, SoupErr> {
(**self).caller_tag_sets(user_id).await
}
+
+ async fn get_work_feed_page(
+ &self,
+ req: WorkFeedSoupRequest,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<WorkFeedSoupPage, SoupErr> {
+ (**self).get_work_feed_page(req, team_receipt).await
+ }
}
/// No-op [`SoupService`] for binaries that need to satisfy the bound but
diff --git a/crates/soup/src/domain/service.rs b/crates/soup/src/domain/service.rs
index c65c907ee4..1fecf17a1c 100644
--- a/crates/soup/src/domain/service.rs
+++ b/crates/soup/src/domain/service.rs
@@ -1,11 +1,12 @@
use crate::domain::{
models::{
AdvancedSortParams, EnrichedSoupItem, FrecencyQueryInner, GetCrmCompaniesRequest,
- GroupedSortRequest, IntoSoupReqAst, NotifiedEntity, NotifiedHydratableTypes,
- NotifiedPagePosition, NotifiedQueryInner, NotifiedSoupRequest, SimpleQueryInner,
- SimpleSortQuery, SimpleSortRequest, SoupDocumentServerFacts, SoupErr,
- SoupProjectionHydration, SoupPropertiesField, SoupQuery, SoupRequest, SoupSortDirection,
- SoupType, TouchedPagePosition, TouchedQueryInner, TouchedSoupRequest,
+ GroupedSortRequest, IntoSoupReqAst, NotifiedHydratableTypes, NotifiedPagePosition,
+ NotifiedQueryInner, NotifiedSoupRequest, SimpleQueryInner, SimpleSortQuery,
+ SimpleSortRequest, SoupDocumentServerFacts, SoupErr, SoupProjectionHydration,
+ SoupPropertiesField, SoupQuery, SoupRequest, SoupSortDirection, SoupType,
+ TouchedPagePosition, TouchedQueryInner, TouchedSoupRequest, WorkFeedCandidateRequest,
+ WorkFeedPagePosition, WorkFeedSoupItem, WorkFeedSoupPage, WorkFeedSoupRequest,
calendar_filter_supported_by_notified, grouping::ItemGroupingInfo,
},
ports::{SoupOutput, SoupRepo, SoupService},
@@ -809,14 +810,12 @@ where
.await
.map_err(anyhow::Error::from)?;
let candidate_page_full = candidates.len() == page_len;
+ let entities: Vec<Entity<'static>> = candidates
+ .iter()
+ .map(|candidate| candidate.entity.clone())
+ .collect();
let mut hydrated = self
- .hydrate_notified_candidates(
- &candidates,
- soup_type,
- &user,
- &legs,
- include_projection,
- )
+ .hydrate_notified_candidates(&entities, soup_type, &user, &legs, include_projection)
.await?;
// Walk candidates in feed order until the page is full. The
@@ -859,11 +858,162 @@ where
Ok((page, next))
}
+ /// Runs one page of the work feed: fetches merged attention and own-work
+ /// candidates, hydrates them through the notified-at feed's legs, and
+ /// reassembles the page in feed order.
+ ///
+ /// The legs come from a notified-at request over the same filter, so each
+ /// domain applies its filter tree exactly as it does for the inbox. The
+ /// email leg uses the `All` view: own work includes sent threads that
+ /// are not in the inbox, and the candidate query already confines email
+ /// attention to inbox threads. Candidates a leg rejects are dropped and
+ /// the page refills from the next candidate page, bounded by
+ /// [`MAX_NOTIFIED_FILL_ROUNDS`].
+ #[tracing::instrument(err, skip(self, req, team_receipt), fields(user = %req.user))]
+ async fn handle_work_feed_request(
+ &self,
+ req: WorkFeedSoupRequest,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<WorkFeedSoupPage, SoupErr> {
+ if !calendar_filter_supported_by_notified(req.filter.calendar_event_filter.as_deref()) {
+ return Err(SoupErr::NotifiedUnsupportedFilter("calendar_event"));
+ }
+ let limit = req.limit.clamp(1, 500);
+ let legs_request = SoupRequest {
+ soup_type: SoupType::Expanded,
+ limit,
+ cursor: SoupQuery::new_sort_notified(Some(req.filter.clone())),
+ sort_direction: SoupSortDirection::Desc,
+ user: req.user.clone(),
+ email_preview_view: PreviewView::StandardLabel(PreviewViewStandardLabel::All),
+ link_ids: req.link_ids.clone(),
+ };
+ let foreign_entity_source_ids =
+ legs_request.build_foreign_entity_source_ids(team_receipt.as_ref());
+ let metadata_source_ids = foreign_entity_source_ids.clone();
+ let legs = NotifiedHydrationLegs {
+ link_ids: legs_request.link_ids.clone(),
+ comms: legs_request.build_comms_request(),
+ comms_threads: legs_request.build_comms_thread_request(),
+ foreign_entities: legs_request
+ .build_foreign_entity_query()
+ .map(|query| (foreign_entity_source_ids, query)),
+ github_pull_request_filter: legs_request.build_github_pull_request_filter(),
+ email: legs_request.build_email_request(team_receipt),
+ };
+ let foreign_entity_sources: Vec<SourceId> = legs
+ .foreign_entities
+ .as_ref()
+ .map(|(sources, _)| sources.clone())
+ .unwrap_or_default();
+ let hydratable = NotifiedHydratableTypes {
+ channels: legs.comms.is_some(),
+ channel_threads: legs.comms_threads.is_some(),
+ email_threads: legs.email.is_some(),
+ foreign_entities: legs.foreign_entities.is_some(),
+ };
+ let page_len = usize::from(limit);
+
+ let mut after = req.after.clone();
+ let mut page: Vec<(SoupCandidate, chrono::DateTime<chrono::Utc>)> =
+ Vec::with_capacity(page_len);
+ let mut next = None;
+ for _ in 0..MAX_NOTIFIED_FILL_ROUNDS {
+ let candidates = self
+ .soup_storage
+ .work_feed_soup_page(WorkFeedCandidateRequest {
+ user_id: req.user.copied(),
+ limit,
+ mode: req.mode,
+ after: after.clone(),
+ types: &req.types,
+ filter: Some(&req.filter),
+ link_ids: &legs.link_ids,
+ foreign_entity_sources: &foreign_entity_sources,
+ hydratable,
+ only: req.only.as_deref(),
+ })
+ .await
+ .map_err(anyhow::Error::from)?;
+ let candidate_page_full = candidates.len() == page_len;
+ let entities: Vec<Entity<'static>> = candidates
+ .iter()
+ .map(|candidate| candidate.entity.clone())
+ .collect();
+ let mut hydrated = self
+ .hydrate_notified_candidates(&entities, SoupType::Expanded, &req.user, &legs, true)
+ .await?;
+
+ // Walk candidates in feed order until the page is full; the
+ // cursor is the last candidate walked, kept or dropped.
+ let mut walked = None;
+ let mut consumed = 0;
+ for candidate in &candidates {
+ if page.len() == page_len {
+ break;
+ }
+ consumed += 1;
+ walked = Some(WorkFeedPagePosition {
+ sort_at: candidate.sort_at,
+ entity_id: candidate.entity.entity_id.to_string(),
+ });
+ let key = (
+ candidate.entity.entity_type,
+ candidate.entity.entity_id.to_string(),
+ );
+ if let Some(mut item) = hydrated.remove(&key) {
+ item.notified_at = candidate.attention_at;
+ item.touched_at = candidate.touched_at;
+ page.push((item, candidate.sort_at));
+ }
+ }
+
+ let exhausted = !candidate_page_full && consumed == candidates.len();
+ if page.len() == page_len {
+ next = if exhausted { None } else { walked };
+ break;
+ }
+ if exhausted {
+ next = None;
+ break;
+ }
+ next = walked.clone();
+ after = walked;
+ }
+
+ let (mut items, sort_ats): (Vec<SoupCandidate>, Vec<_>) = page.into_iter().unzip();
+ agent_metadata::enrich(
+ &self.github_pull_request_service,
+ self.agent_branches.as_deref(),
+ req.user.to_string(),
+ metadata_source_ids,
+ &mut items,
+ )
+ .await?;
+
+ Ok(WorkFeedSoupPage {
+ items: items
+ .into_iter()
+ .zip(sort_ats)
+ .map(|(candidate, sort_at)| WorkFeedSoupItem {
+ attention_at: candidate.notified_at,
+ touched_at: candidate.touched_at,
+ sort_at,
+ hydration: SoupProjectionHydration {
+ item: candidate.item,
+ document_server_facts: candidate.document_server_facts,
+ },
+ })
+ .collect(),
+ next,
+ })
+ }
+
/// Hydrates one candidate page's entities through the by-id queries and
/// the domain legs, keyed by entity for reassembly in candidate order.
async fn hydrate_notified_candidates(
&self,
- candidates: &[NotifiedEntity],
+ entities: &[Entity<'static>],
soup_type: SoupType,
user: &MacroUserIdStr<'static>,
legs: &NotifiedHydrationLegs,
@@ -875,34 +1025,30 @@ where
let mut thread_ids = Vec::new();
let mut email_ids = Vec::new();
let mut foreign_entity_ids = Vec::new();
- for candidate in candidates {
- match candidate.entity.entity_type {
+ for entity in entities {
+ match entity.entity_type {
// Calendar events and agent sessions ride the main by-ids
// query in both soup types.
EntityType::Document
| EntityType::Chat
| EntityType::CalendarEvent
| EntityType::AgentSession
- | EntityType::Initiative => main_entities.push(candidate.entity.copied()),
+ | EntityType::Initiative => main_entities.push(entity.copied()),
// Same split as the touched feed: the expanded by-ids query
// omits project rows, so they hydrate unexpanded separately.
EntityType::Project => match soup_type {
- SoupType::Expanded => project_entities.push(candidate.entity.copied()),
- SoupType::UnExpanded => main_entities.push(candidate.entity.copied()),
+ SoupType::Expanded => project_entities.push(entity.copied()),
+ SoupType::UnExpanded => main_entities.push(entity.copied()),
},
- EntityType::Channel => {
- push_candidate_uuid(&mut channel_ids, &candidate.entity, "channel")
- }
+ EntityType::Channel => push_candidate_uuid(&mut channel_ids, entity, "channel"),
// Thread-scoped channel notifications are keyed on their
// thread root, which is the thread row's id.
EntityType::ChannelMessage => {
- push_candidate_uuid(&mut thread_ids, &candidate.entity, "channel thread")
- }
- EntityType::EmailThread => {
- push_candidate_uuid(&mut email_ids, &candidate.entity, "email")
+ push_candidate_uuid(&mut thread_ids, entity, "channel thread")
}
+ EntityType::EmailThread => push_candidate_uuid(&mut email_ids, entity, "email"),
EntityType::ForeignEntity => {
- push_candidate_uuid(&mut foreign_entity_ids, &candidate.entity, "foreign")
+ push_candidate_uuid(&mut foreign_entity_ids, entity, "foreign")
}
// The candidate query only returns the types above.
_ => {}
@@ -1857,4 +2003,12 @@ where
.await
.map_err(anyhow::Error::from)?)
}
+
+ async fn get_work_feed_page(
+ &self,
+ req: WorkFeedSoupRequest,
+ team_receipt: Option<EntityAccessReceipt<MemberTeamRole>>,
+ ) -> Result<WorkFeedSoupPage, SoupErr> {
+ self.handle_work_feed_request(req, team_receipt).await
+ }
}
diff --git a/crates/soup/src/domain/service/tests.rs b/crates/soup/src/domain/service/tests.rs
index 6a869d1f4c..1947ca81f1 100644
--- a/crates/soup/src/domain/service/tests.rs
+++ b/crates/soup/src/domain/service/tests.rs
@@ -47,6 +47,7 @@ use super::*;
mod agent_metadata;
mod exclusions;
mod favorites;
+mod work_feed;
struct NoopEmailPreviewService;
diff --git a/crates/soup/src/domain/service/tests/work_feed.rs b/crates/soup/src/domain/service/tests/work_feed.rs
new file mode 100644
index 0000000000..6c6cfbb803
--- /dev/null
+++ b/crates/soup/src/domain/service/tests/work_feed.rs
@@ -0,0 +1,215 @@
+use super::*;
+use crate::domain::models::{
+ WorkFeedCandidate, WorkFeedPagePosition, WorkFeedSoupMode, WorkFeedSoupRequest,
+};
+
+fn work_feed_request(limit: u16) -> WorkFeedSoupRequest {
+ WorkFeedSoupRequest {
+ user: MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap(),
+ link_ids: vec![],
+ limit,
+ mode: WorkFeedSoupMode::Work,
+ types: vec![EntityType::Document],
+ filter: EntityFilterAst::default(),
+ after: None,
+ only: None,
+ }
+}
+
+fn candidate(
+ id: Uuid,
+ attention: Option<DateTime<Utc>>,
+ touched: Option<DateTime<Utc>>,
+) -> WorkFeedCandidate {
+ WorkFeedCandidate {
+ entity: EntityType::Document.with_entity_string(id.to_string()),
+ attention_at: attention,
+ touched_at: touched,
+ sort_at: attention.max(touched).unwrap(),
+ }
+}
+
+fn service(
+ soup_mock: MockSoupRepo,
+) -> SoupImpl<
+ MockSoupRepo,
+ FrecencyQueryServiceImpl<MockFrecencyStorage>,
+ NoopEmailPreviewService,
+ RecordingCommsService,
+ NoopCallRecordQueryService,
+ NoOpCrmService,
+ NoopPullRequestListing,
+> {
+ SoupImpl::new(
+ soup_mock,
+ FrecencyQueryServiceImpl::new(MockFrecencyStorage::new()),
+ NoopEmailPreviewService,
+ RecordingCommsService::new(vec![]),
+ NoopCallRecordQueryService,
+ NoOpCrmService,
+ NoopPullRequestListing,
+ )
+}
+
+/// Hydration drops refill the page from the next candidate page, every item
+/// keeps both reason timestamps, and the request's mode and types reach the
+/// candidate query.
+#[tokio::test]
+async fn work_feed_refills_after_drops_and_carries_reason_timestamps() {
+ let own = Uuid::from_u128(1);
+ let ghost = Uuid::from_u128(2);
+ let notified = Uuid::from_u128(3);
+ let base: DateTime<Utc> = DateTime::default();
+
+ let mut soup_mock = MockSoupRepo::new();
+ soup_mock
+ .expect_work_feed_soup_page()
+ .times(2)
+ .returning(move |req| {
+ assert_eq!(req.limit, 2);
+ assert_eq!(req.mode, WorkFeedSoupMode::Work);
+ assert_eq!(req.types, &[EntityType::Document]);
+ assert!(req.only.is_none());
+ let rows = match &req.after {
+ None => vec![
+ candidate(own, Some(base + Days::new(1)), Some(base + Days::new(5))),
+ candidate(ghost, Some(base + Days::new(4)), None),
+ ],
+ Some(after) => {
+ assert_eq!(
+ *after,
+ WorkFeedPagePosition {
+ sort_at: base + Days::new(4),
+ entity_id: ghost.to_string(),
+ }
+ );
+ vec![candidate(notified, Some(base + Days::new(3)), None)]
+ }
+ };
+ Box::pin(async move { Ok(rows) })
+ });
+ soup_mock
+ .expect_expanded_soup_by_ids_with_projection()
+ .times(2)
+ .returning(move |params| {
+ let items = params
+ .entities
+ .iter()
+ .filter_map(|entity| {
+ let id = Uuid::parse_str(&entity.entity_id).unwrap();
+ (id != ghost).then(|| SoupProjectionHydration {
+ item: SoupItem::Document(soup_document_uuid_with_updated(
+ id,
+ Default::default(),
+ )),
+ document_server_facts: None,
+ })
+ })
+ .collect();
+ Box::pin(async move { Ok(items) })
+ });
+
+ let page = service(soup_mock)
+ .get_work_feed_page(work_feed_request(2), None)
+ .await
+ .unwrap();
+
+ let items: Vec<_> = page
+ .items
+ .iter()
+ .map(|item| {
+ (
+ item.hydration.item.id(),
+ item.attention_at,
+ item.touched_at,
+ item.sort_at,
+ )
+ })
+ .collect();
+ assert_eq!(
+ items,
+ vec![
+ (
+ own,
+ Some(base + Days::new(1)),
+ Some(base + Days::new(5)),
+ base + Days::new(5)
+ ),
+ (
+ notified,
+ Some(base + Days::new(3)),
+ None,
+ base + Days::new(3)
+ ),
+ ]
+ );
+ // The second candidate page was short and fully consumed.
+ assert!(page.next.is_none());
+}
+
+#[tokio::test]
+async fn work_feed_full_page_continues_from_the_last_candidate() {
+ let first = Uuid::from_u128(1);
+ let second = Uuid::from_u128(2);
+ let base: DateTime<Utc> = DateTime::default();
+
+ let mut soup_mock = MockSoupRepo::new();
+ soup_mock
+ .expect_work_feed_soup_page()
+ .times(1)
+ .returning(move |_| {
+ Box::pin(async move {
+ Ok(vec![
+ candidate(first, Some(base + Days::new(5)), None),
+ candidate(second, None, Some(base + Days::new(4))),
+ ])
+ })
+ });
+ soup_mock
+ .expect_expanded_soup_by_ids_with_projection()
+ .times(1)
+ .returning(move |params| {
+ let items = params
+ .entities
+ .iter()
+ .map(|entity| SoupProjectionHydration {
+ item: SoupItem::Document(soup_document_uuid_with_updated(
+ Uuid::parse_str(&entity.entity_id).unwrap(),
+ Default::default(),
+ )),
+ document_server_facts: None,
+ })
+ .collect();
+ Box::pin(async move { Ok(items) })
+ });
+
+ let page = service(soup_mock)
+ .get_work_feed_page(work_feed_request(2), None)
+ .await
+ .unwrap();
+
+ assert_eq!(page.items.len(), 2);
+ assert_eq!(
+ page.next,
+ Some(WorkFeedPagePosition {
+ sort_at: base + Days::new(4),
+ entity_id: second.to_string(),
+ })
+ );
+}
+
+#[tokio::test]
+async fn work_feed_rejects_calendar_filters_it_cannot_fold() {
+ let mut soup_mock = MockSoupRepo::new();
+ soup_mock.expect_work_feed_soup_page().times(0);
+ let mut request = work_feed_request(2);
+ request.filter.calendar_event_filter = Some(Arc::new(Expr::val(
+ item_filters::ast::calendar_event::CalendarEventLiteral::Status("confirmed".into()),
+ )));
+
+ let error = service(soup_mock)
+ .get_work_feed_page(request, None)
+ .await
+ .unwrap_err();
+ assert_matches!(error, SoupErr::NotifiedUnsupportedFilter("calendar_event"));
+}
diff --git a/crates/soup/src/outbound/pg_soup_repo.rs b/crates/soup/src/outbound/pg_soup_repo.rs
index 83e8984010..c93e55d237 100644
--- a/crates/soup/src/outbound/pg_soup_repo.rs
+++ b/crates/soup/src/outbound/pg_soup_repo.rs
@@ -3,7 +3,8 @@ use crate::{
models::{
AdvancedSortParams, GroupedSortRequest, NotifiedEntity, NotifiedSoupRequest,
SimpleSortQuery, SimpleSortRequest, SoupProjectionHydration, SoupPropertiesField,
- TouchedEntity, TouchedSoupRequest, grouping::ItemGroupingInfo,
+ TouchedEntity, TouchedSoupRequest, WorkFeedCandidate, WorkFeedCandidateRequest,
+ grouping::ItemGroupingInfo,
},
ports::SoupRepo,
},
@@ -29,6 +30,7 @@ mod initiative;
mod notified;
mod touched;
mod unexpanded;
+mod work_feed;
/// PostgreSQL implementation of [`SoupRepo`].
pub struct PgSoupRepo {
@@ -317,6 +319,13 @@ impl SoupRepo for PgSoupRepo {
) -> Result<Vec<NotifiedEntity>, Self::Err> {
notified::notified_soup_page(&self.pool.0, req).await
}
+
+ async fn work_feed_soup_page<'a>(
+ &self,
+ req: WorkFeedCandidateRequest<'a>,
+ ) -> Result<Vec<WorkFeedCandidate>, Self::Err> {
+ work_feed::work_feed_soup_page(&self.pool.0, req).await
+ }
}
fn sort_and_truncate_hydrations(
diff --git a/crates/soup/src/outbound/pg_soup_repo/notified.rs b/crates/soup/src/outbound/pg_soup_repo/notified.rs
index 039a3c2097..107ebd1d2f 100644
--- a/crates/soup/src/outbound/pg_soup_repo/notified.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/notified.rs
@@ -43,7 +43,7 @@ use crate::outbound::pg_soup_repo::type_err;
/// The candidate row's entity id, as the gates see it: the `notified` CTE's
/// derived key (thread root for thread-scoped channel notifications).
-const ID_SQL: &str = "nc.entity_id";
+pub(super) const ID_SQL: &str = "nc.entity_id";
/// Folds a calendar filter into SQL over the `event` alias. Only the literals
/// [`calendar_filter_supported_by_notified`] admits have a fold; anything
@@ -72,7 +72,7 @@ fn build_calendar_event_filter(tree: Option<&Expr<CalendarEventLiteral>>) -> Str
/// Calendar events are owner- or delegation-scoped, never `entity_access`
/// rows: visible iff the caller owns the event or is delegated the inbox it
/// was synced from. Mirrors the calendar by-ids hydration's access check.
-fn calendar_event_gate(filter: Option<&EntityFilterAst>) -> String {
+pub(super) fn calendar_event_gate(filter: Option<&EntityFilterAst>) -> String {
let calendar_filter = filter.and_then(|f| f.calendar_event_filter.as_deref());
let props_filter = filter.and_then(|f| f.properties_filter.as_deref());
uuid_guarded(
@@ -103,7 +103,7 @@ fn calendar_event_gate(filter: Option<&EntityFilterAst>) -> String {
/// parallel id / auth-entity arrays of those sources). The foreign-entity
/// tree folds in its own crate, which hydration applies in full; the
/// notification-state conjuncts it implies are pre-applied here.
-fn foreign_entity_gate(filter: Option<&EntityFilterAst>) -> String {
+pub(super) fn foreign_entity_gate(filter: Option<&EntityFilterAst>) -> String {
let implied = implied_conjuncts_sql(
filter.and_then(|f| f.foreign_entity_filter.as_deref()),
|literal| match literal {
@@ -133,7 +133,7 @@ fn foreign_entity_gate(filter: Option<&EntityFilterAst>) -> String {
/// Agent sessions are authorized through `entity_access`, whose sources are
/// the same user / channel / team ids the query's `user_source_ids` CTE
/// already collects - the predicate the agent-session leg's own queries use.
-fn agent_session_gate() -> String {
+pub(super) fn agent_session_gate() -> String {
uuid_guarded(
ID_SQL,
format!(
@@ -174,7 +174,7 @@ fn foreign_entity_filter_is_impossible(tree: Option<&Expr<ForeignEntityLiteral>>
/// their own filter can never match or an active properties filter can never
/// match them; domain-hydrated types additionally need their leg to be
/// active for the request.
-fn included_types(req: &NotifiedSoupRequest<'_>) -> Vec<&'static str> {
+pub(super) fn included_types(req: &NotifiedSoupRequest<'_>) -> Vec<&'static str> {
let props = req.filter.and_then(|f| f.properties_filter.as_deref());
let propertyless_ok = props.is_none_or(properties_filter_matches_propertyless);
let mut types = Vec::with_capacity(8);
diff --git a/crates/soup/src/outbound/pg_soup_repo/touched.rs b/crates/soup/src/outbound/pg_soup_repo/touched.rs
index 9918a28c3a..48b4287bd4 100644
--- a/crates/soup/src/outbound/pg_soup_repo/touched.rs
+++ b/crates/soup/src/outbound/pg_soup_repo/touched.rs
@@ -24,7 +24,7 @@ const ID_SQL: &str = "ae.entity_id";
/// Renders [`VIEW_ACTION_TAGS`] as a SQL `IN`-list body, e.g. `'opened'`.
/// The tags are compile-time constants of this workspace, never user input.
-fn view_tags_sql() -> String {
+pub(super) fn view_tags_sql() -> String {
VIEW_ACTION_TAGS
.iter()
.map(|tag| format!("'{tag}'"))
diff --git a/crates/soup/src/outbound/pg_soup_repo/work_feed.rs b/crates/soup/src/outbound/pg_soup_repo/work_feed.rs
new file mode 100644
index 0000000000..e91827e4b8
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/work_feed.rs
@@ -0,0 +1,228 @@
+//! The work feed candidate query: one keyset-paginated page merging the
+//! viewer's attention (live notifications, at least one not done) with their
+//! own work (latest activity that counts as work), newest first.
+//!
+//! An item's place in the feed is `sort_at = max(attention_at, touched_at)`.
+//! The query runs two streams, each ordered by its own timestamp: the
+//! attention stream keeps a candidate only when its own work is not newer,
+//! and the own-work stream only when its attention is not at least as new.
+//! Every candidate is therefore emitted by exactly one stream, at its
+//! `sort_at`, so merging the two ordered streams and taking the first `limit`
+//! rows is the page — no candidate repeats across pages and none is skipped.
+//!
+//! Both streams share the notified-at feed's keying (thread-scoped channel
+//! notifications become `channel_message` candidates on their thread root)
+//! and its per-type gates. One condition is specific to the work feed: an
+//! email thread's attention lasts only while the thread is in the inbox
+//! (mail's own notion of done).
+//!
+//! Like the notified-at feed, channel, channel-thread, email and
+//! foreign-entity filter trees fold in their own domains, so the service
+//! drops candidates their hydration legs reject and refills from the next
+//! page; a short page here still means the feed is exhausted.
+
+use activity::Action;
+use cowlike::CowLike;
+use model_entity::EntityType;
+use sqlx::{PgPool, Row};
+use std::str::FromStr;
+
+use crate::domain::models::{
+ NotifiedSoupRequest, WorkFeedCandidate, WorkFeedCandidateRequest, WorkFeedSoupMode,
+};
+use crate::outbound::pg_soup_repo::candidate_gates::{
+ channel_gate, channel_thread_gate, chat_gate, document_gate, email_gate, initiative_gate,
+ project_gate, uuid_guarded,
+};
+use crate::outbound::pg_soup_repo::notified::{
+ ID_SQL, agent_session_gate, calendar_event_gate, foreign_entity_gate, included_types,
+};
+use crate::outbound::pg_soup_repo::touched::view_tags_sql;
+use crate::outbound::pg_soup_repo::type_err;
+
+/// Every type the work feed can surface, in the order the notified-at feed
+/// decides them.
+fn requested_types<'a>(req: &WorkFeedCandidateRequest<'a>) -> Vec<&'static str> {
+ let notified = NotifiedSoupRequest {
+ user_id: req.user_id.copied(),
+ limit: req.limit,
+ after: None,
+ filter: req.filter,
+ link_ids: req.link_ids,
+ foreign_entity_sources: req.foreign_entity_sources,
+ hydratable: req.hydratable,
+ };
+ let requested: Vec<&'static str> = req.types.iter().map(|t| (*t).into()).collect();
+ included_types(&notified)
+ .into_iter()
+ .filter(|entity_type| requested.contains(entity_type))
+ .collect()
+}
+
+/// An email thread's attention lasts while the thread is in the inbox: mail
+/// done is archive, independent of the thread's notification states.
+fn email_inbox_gate() -> String {
+ uuid_guarded(
+ ID_SQL,
+ format!(
+ r#"EXISTS (
+ SELECT 1 FROM email_threads inbox
+ WHERE inbox.id = {ID_SQL}::uuid
+ AND inbox.inbox_visible
+ )"#
+ ),
+ )
+}
+
+/// The viewer's live notifications keyed to the candidate at `alias`, with
+/// `predicate` applied. Own-work candidates are never thread rows, so a
+/// channel candidate keeps only its channel-level notifications.
+fn keyed_notifications(alias: &str, predicate: &str) -> String {
+ format!(
+ r#"EXISTS (
+ SELECT 1
+ FROM notification n
+ JOIN user_notification un ON un.notification_id = n.id
+ WHERE un.user_id = $1
+ AND un.deleted_at IS NULL
+ AND n.event_item_type = {alias}.entity_type
+ AND n.event_item_id = {alias}.entity_id
+ AND ({alias}.entity_type <> 'channel'
+ OR n.secondary_event_item_type IS DISTINCT FROM 'channel_message')
+ AND {predicate}
+ )"#
+ )
+}
+
+/// The attention timestamp of an own-work row, computed exactly as the
+/// attention stream would: the newest live notification, when one is not
+/// done and (for email) the thread is in the inbox.
+fn own_attention_at() -> String {
+ r#"(
+ SELECT max(un.created_at) AT TIME ZONE 'UTC'
+ FROM notification n
+ JOIN user_notification un ON un.notification_id = n.id
+ WHERE un.user_id = $1
+ AND un.deleted_at IS NULL
+ AND n.event_item_type = o.entity_type
+ AND n.event_item_id = o.entity_id
+ AND (o.entity_type <> 'channel'
+ OR n.secondary_event_item_type IS DISTINCT FROM 'channel_message')
+ AND (o.entity_type <> 'email_thread' OR EXISTS (
+ SELECT 1 FROM email_threads inbox
+ WHERE inbox.id::text = o.entity_id
+ AND inbox.inbox_visible
+ ))
+ HAVING bool_or(un.state <> 'done')
+ )"#
+ .to_string()
+}
+
+/// Whether the `activity_events` row aliased `alias` is the viewer's own work:
+/// any action but a view, except that an email thread is only worked on by
+/// sending from it. Archiving, starring, labeling and moving a thread record
+/// edits, and done itself archives, so counting them would bring every
+/// completed email back as own work.
+fn own_work(alias: &str) -> String {
+ let sent: &'static str = Action::Sent.into();
+ format!(
+ "{alias}.action NOT IN ({views}) \
+ AND ({alias}.entity_type <> 'email_thread' OR {alias}.action = '{sent}')",
+ views = view_tags_sql(),
+ )
+}
+
+fn build_query(req: &WorkFeedCandidateRequest<'_>) -> String {
+ let filter = req.filter;
+ format!(
+ include_str!("work_feed/query.sql"),
+ own_work_ae = own_work("ae"),
+ own_work_newer = own_work("newer"),
+ email_inbox_gate = email_inbox_gate(),
+ attention_pending = keyed_notifications("nc", "un.state <> 'done'"),
+ attention_since_touch =
+ keyed_notifications("nc", "un.created_at AT TIME ZONE 'UTC' >= nc.touched_at"),
+ own_attention_at = own_attention_at(),
+ document_gate = document_gate(ID_SQL, filter),
+ chat_gate = chat_gate(ID_SQL, filter),
+ project_gate = project_gate(ID_SQL, filter),
+ initiative_gate = initiative_gate(ID_SQL, filter),
+ channel_gate = channel_gate(ID_SQL, filter),
+ channel_thread_gate = channel_thread_gate(ID_SQL, filter),
+ email_gate = email_gate(ID_SQL, filter),
+ calendar_event_gate = calendar_event_gate(filter),
+ foreign_entity_gate = foreign_entity_gate(filter),
+ agent_session_gate = agent_session_gate(),
+ )
+}
+
+/// Fetches one page of work feed candidates.
+///
+/// `user_notification.created_at` is a naive `TIMESTAMP` written in UTC; the
+/// query converts it to `timestamptz` so attention and activity timestamps
+/// compare and paginate on one clock.
+#[tracing::instrument(err, skip(db, req))]
+pub(super) async fn work_feed_soup_page(
+ db: &PgPool,
+ req: WorkFeedCandidateRequest<'_>,
+) -> Result<Vec<WorkFeedCandidate>, sqlx::Error> {
+ let types = requested_types(&req);
+ if types.is_empty() {
+ return Ok(Vec::new());
+ }
+
+ let sql = build_query(&req);
+
+ let after_ts = req.after.as_ref().map(|a| a.sort_at);
+ let after_id = req.after.as_ref().map(|a| a.entity_id.clone());
+ let source_ids: Vec<&str> = req
+ .foreign_entity_sources
+ .iter()
+ .map(|source| source.id.as_str())
+ .collect();
+ let source_auth_entities: Vec<&str> = req
+ .foreign_entity_sources
+ .iter()
+ .map(|source| source.auth_entity.as_str())
+ .collect();
+ let (only_types, only_ids): (Option<Vec<&str>>, Option<Vec<&str>>) = match req.only {
+ Some(only) => (
+ Some(only.iter().map(|e| e.entity_type.into()).collect()),
+ Some(only.iter().map(|e| e.entity_id.as_ref()).collect()),
+ ),
+ None => (None, None),
+ };
+
+ sqlx::QueryBuilder::<sqlx::Postgres>::new(sql)
+ .build()
+ .bind(req.user_id.as_ref())
+ .bind(&types)
+ .bind(after_ts)
+ .bind(after_id)
+ .bind(req.link_ids)
+ .bind(req.limit as i64)
+ .bind(&source_ids)
+ .bind(&source_auth_entities)
+ .bind(req.mode == WorkFeedSoupMode::Work)
+ .bind(only_types)
+ .bind(only_ids)
+ // Unnamed statement, same reasoning as the other candidate queries:
+ // the SQL text varies per filter shape.
+ .persistent(false)
+ .try_map(|row: sqlx::postgres::PgRow| {
+ let entity_type: String = row.try_get("entity_type")?;
+ let entity_id: String = row.try_get("entity_id")?;
+ let entity_type = EntityType::from_str(&entity_type).map_err(type_err)?;
+ Ok(WorkFeedCandidate {
+ entity: entity_type.with_entity_string(entity_id),
+ attention_at: row.try_get("attention_at")?,
+ touched_at: row.try_get("touched_at")?,
+ sort_at: row.try_get("sort_at")?,
+ })
+ })
+ .fetch_all(db)
+ .await
+}
+
+#[cfg(test)]
+mod test;
diff --git a/crates/soup/src/outbound/pg_soup_repo/work_feed/query.sql b/crates/soup/src/outbound/pg_soup_repo/work_feed/query.sql
new file mode 100644
index 0000000000..ef211e79b0
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/work_feed/query.sql
@@ -0,0 +1,145 @@
+WITH user_source_ids AS (
+ SELECT cp.channel_id::text as source_id FROM comms_channel_participants cp
+ WHERE cp.user_id = $1 AND cp.left_at IS NULL
+ UNION ALL
+ SELECT t.team_id::text FROM team_user t
+ WHERE t.user_id = $1
+ UNION ALL
+ SELECT $1
+),
+only_keys AS MATERIALIZED (
+ SELECT k.entity_type, k.entity_id
+ FROM unnest($10::text[], $11::text[]) AS k(entity_type, entity_id)
+),
+notified AS NOT MATERIALIZED (
+ SELECT
+ un.created_at,
+ un.state,
+ CASE WHEN n.event_item_type = 'channel'
+ AND n.secondary_event_item_type = 'channel_message'
+ THEN 'channel_message' ELSE n.event_item_type
+ END AS entity_type,
+ CASE WHEN n.event_item_type = 'channel'
+ AND n.secondary_event_item_type = 'channel_message'
+ THEN n.secondary_event_item_id ELSE n.event_item_id
+ END AS entity_id
+ FROM user_notification un
+ JOIN notification n ON n.id = un.notification_id
+ WHERE un.user_id = $1
+ AND un.deleted_at IS NULL
+),
+attention AS NOT MATERIALIZED (
+ SELECT
+ entity_type,
+ entity_id,
+ max(created_at) AT TIME ZONE 'UTC' AS attention_at
+ FROM notified
+ WHERE entity_type = ANY($2)
+ GROUP BY entity_type, entity_id
+ HAVING bool_or(state <> 'done')
+),
+attention_page AS (
+ SELECT nc.entity_type, nc.entity_id, nc.attention_at, nc.touched_at
+ FROM (
+ SELECT
+ ordered.entity_type,
+ ordered.entity_id,
+ ordered.attention_at,
+ latest_own.occurred_at AS touched_at
+ FROM (
+ SELECT entity_type, entity_id, attention_at
+ FROM attention
+ WHERE ($3::timestamptz IS NULL OR (attention_at, entity_id) < ($3, $4))
+ AND ($10::text[] IS NULL OR (entity_type, entity_id) IN (
+ SELECT entity_type, entity_id FROM only_keys
+ ))
+ ORDER BY attention_at DESC, entity_id DESC
+ OFFSET 0
+ ) ordered
+ LEFT JOIN LATERAL (
+ SELECT ae.occurred_at
+ FROM activity_events ae
+ WHERE $9
+ AND ae.subject_id = $1
+ AND ae.entity_type = ordered.entity_type
+ AND ae.entity_id = ordered.entity_id
+ AND {own_work_ae}
+ ORDER BY ae.occurred_at DESC
+ LIMIT 1
+ ) latest_own ON TRUE
+ ) nc
+ WHERE (nc.touched_at IS NULL OR nc.touched_at <= nc.attention_at)
+ AND (nc.entity_type <> 'email_thread' OR {email_inbox_gate})
+ AND CASE nc.entity_type
+ WHEN 'document' THEN {document_gate}
+ WHEN 'chat' THEN {chat_gate}
+ WHEN 'project' THEN {project_gate}
+ WHEN 'initiative' THEN {initiative_gate}
+ WHEN 'channel' THEN {channel_gate}
+ WHEN 'channel_message' THEN {channel_thread_gate}
+ WHEN 'email_thread' THEN {email_gate}
+ WHEN 'calendar_event' THEN {calendar_event_gate}
+ WHEN 'foreign_entity' THEN {foreign_entity_gate}
+ WHEN 'agent_session' THEN {agent_session_gate}
+ ELSE FALSE
+ END
+ ORDER BY nc.attention_at DESC, nc.entity_id DESC
+ LIMIT $6
+),
+own_page AS (
+ SELECT nc.entity_type, nc.entity_id, nc.touched_at
+ FROM (
+ SELECT ae.entity_type, ae.entity_id, ae.occurred_at AS touched_at
+ FROM activity_events ae
+ WHERE $9
+ AND ae.subject_id = $1
+ AND {own_work_ae}
+ AND ae.entity_type = ANY($2)
+ AND ae.entity_type <> 'channel_message'
+ AND ($3::timestamptz IS NULL OR (ae.occurred_at, ae.entity_id) < ($3, $4))
+ AND ($10::text[] IS NULL OR (ae.entity_type, ae.entity_id) IN (
+ SELECT entity_type, entity_id FROM only_keys
+ ))
+ AND NOT EXISTS (
+ SELECT 1 FROM activity_events newer
+ WHERE newer.subject_id = $1
+ AND newer.entity_type = ae.entity_type
+ AND newer.entity_id = ae.entity_id
+ AND {own_work_newer}
+ AND (newer.occurred_at, newer.id) > (ae.occurred_at, ae.id)
+ )
+ ORDER BY ae.occurred_at DESC, ae.entity_id DESC
+ OFFSET 0
+ ) nc
+ -- The attention stream owns a candidate whose live attention is at least
+ -- as new as this touch; skipping it here emits every candidate once.
+ WHERE NOT (
+ {attention_pending}
+ AND {attention_since_touch}
+ AND (nc.entity_type <> 'email_thread' OR {email_inbox_gate})
+ )
+ AND CASE nc.entity_type
+ WHEN 'document' THEN {document_gate}
+ WHEN 'chat' THEN {chat_gate}
+ WHEN 'project' THEN {project_gate}
+ WHEN 'initiative' THEN {initiative_gate}
+ WHEN 'channel' THEN {channel_gate}
+ WHEN 'email_thread' THEN {email_gate}
+ WHEN 'calendar_event' THEN {calendar_event_gate}
+ WHEN 'foreign_entity' THEN {foreign_entity_gate}
+ WHEN 'agent_session' THEN {agent_session_gate}
+ ELSE FALSE
+ END
+ ORDER BY nc.touched_at DESC, nc.entity_id DESC
+ LIMIT $6
+)
+SELECT entity_type, entity_id, attention_at, touched_at, sort_at
+FROM (
+ SELECT entity_type, entity_id, attention_at, touched_at, attention_at AS sort_at
+ FROM attention_page
+ UNION ALL
+ SELECT o.entity_type, o.entity_id, {own_attention_at}, o.touched_at, o.touched_at AS sort_at
+ FROM own_page o
+) merged
+ORDER BY sort_at DESC, entity_id DESC
+LIMIT $6
diff --git a/crates/soup/src/outbound/pg_soup_repo/work_feed/test.rs b/crates/soup/src/outbound/pg_soup_repo/work_feed/test.rs
new file mode 100644
index 0000000000..4a65b09460
--- /dev/null
+++ b/crates/soup/src/outbound/pg_soup_repo/work_feed/test.rs
@@ -0,0 +1,250 @@
+use super::*;
+use crate::domain::models::{NotifiedHydratableTypes, WorkFeedPagePosition};
+use chrono::Timelike;
+use foreign_entity::domain::models::SourceId;
+use macro_db_migrator::MACRO_DB_MIGRATIONS;
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::Entity;
+use sqlx::{Pool, Postgres};
+use uuid::Uuid;
+
+const USER_1: &str = "macro|[email protected]";
+const DOC_A: &str = "11111111-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+const DOC_B: &str = "11111111-bbbb-bbbb-bbbb-bbbbbbbbbbbb";
+const DOC_C: &str = "11111111-cccc-cccc-cccc-cccccccccccc";
+const DOC_E: &str = "11111111-eeee-eeee-eeee-eeeeeeeeeeee";
+const DOC_F: &str = "11111111-ffff-ffff-ffff-ffffffffffff";
+const DOC_G: &str = "11111111-0000-0000-0000-000000000000";
+const CHAT_A: &str = "22222222-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+const CHANNEL_X: &str = "33333333-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+const THREAD_M: &str = "99999999-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+const THREAD_Z: &str = "44444444-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+const THREAD_S: &str = "44444444-5555-5555-5555-555555555555";
+const LINK_1: &str = "55555555-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
+
+const EVERYTHING: NotifiedHydratableTypes = NotifiedHydratableTypes {
+ channels: true,
+ channel_threads: true,
+ email_threads: true,
+ foreign_entities: true,
+};
+
+const ALL_TYPES: &[EntityType] = &[
+ EntityType::Document,
+ EntityType::Chat,
+ EntityType::Project,
+ EntityType::Channel,
+ EntityType::ChannelMessage,
+ EntityType::EmailThread,
+ EntityType::CalendarEvent,
+ EntityType::ForeignEntity,
+ EntityType::AgentSession,
+];
+
+fn req<'a>(
+ mode: WorkFeedSoupMode,
+ link_ids: &'a [Uuid],
+ sources: &'a [SourceId],
+) -> WorkFeedCandidateRequest<'a> {
+ WorkFeedCandidateRequest {
+ user_id: MacroUserIdStr::parse_from_str(USER_1).unwrap(),
+ limit: 50,
+ mode,
+ after: None,
+ types: ALL_TYPES,
+ filter: None,
+ link_ids,
+ foreign_entity_sources: sources,
+ hydratable: EVERYTHING,
+ only: None,
+ }
+}
+
+fn keys(page: &[WorkFeedCandidate]) -> Vec<(EntityType, String)> {
+ page.iter()
+ .map(|c| (c.entity.entity_type, c.entity.entity_id.to_string()))
+ .collect()
+}
+
+/// `(sort, attention, touched)` minutes past 10:00 per candidate.
+fn minutes(page: &[WorkFeedCandidate]) -> Vec<(u32, Option<u32>, Option<u32>)> {
+ page.iter()
+ .map(|c| {
+ (
+ c.sort_at.minute(),
+ c.attention_at.map(|t| t.minute()),
+ c.touched_at.map(|t| t.minute()),
+ )
+ })
+ .collect()
+}
+
+fn sources() -> Vec<SourceId> {
+ vec![SourceId::user(USER_1)]
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../../fixtures", scripts("work_feed")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn work_mode_merges_attention_and_own_work(pool: Pool<Postgres>) -> anyhow::Result<()> {
+ let link_ids = [Uuid::parse_str(LINK_1)?];
+ let sources = sources();
+ let page = work_feed_soup_page(&pool, req(WorkFeedSoupMode::Work, &link_ids, &sources)).await?;
+
+ assert_eq!(
+ keys(&page),
+ vec![
+ (EntityType::EmailThread, THREAD_S.to_string()),
+ (EntityType::EmailThread, THREAD_Z.to_string()),
+ (EntityType::Channel, CHANNEL_X.to_string()),
+ (EntityType::Document, DOC_A.to_string()),
+ (EntityType::Document, DOC_B.to_string()),
+ (EntityType::Document, DOC_G.to_string()),
+ (EntityType::Document, DOC_C.to_string()),
+ (EntityType::Chat, CHAT_A.to_string()),
+ (EntityType::Document, DOC_E.to_string()),
+ (EntityType::ChannelMessage, THREAD_M.to_string()),
+ ]
+ );
+ assert_eq!(
+ minutes(&page),
+ vec![
+ // thread-S: its notification does not count outside the inbox,
+ // and archiving it after the send is not own work. Archived
+ // thread-A has nothing else, so it stays out.
+ (13, None, Some(13)),
+ (12, Some(12), None),
+ // channel-X: the thread mention belongs to thread-M.
+ (11, None, Some(11)),
+ // doc-A: the later opened row does not count as own work.
+ (9, Some(5), Some(9)),
+ // doc-B: user-2's later edit is not user-1's own work.
+ (8, Some(8), Some(3)),
+ (8, Some(8), None),
+ // doc-C: own work alone admits it.
+ (7, None, Some(7)),
+ (4, Some(4), None),
+ // doc-E: its only notification is done.
+ (2, None, Some(2)),
+ (1, Some(1), None),
+ ]
+ );
+
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../../fixtures", scripts("work_feed")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn attention_mode_ignores_own_work(pool: Pool<Postgres>) -> anyhow::Result<()> {
+ let link_ids = [Uuid::parse_str(LINK_1)?];
+ let sources = sources();
+ let page =
+ work_feed_soup_page(&pool, req(WorkFeedSoupMode::Attention, &link_ids, &sources)).await?;
+
+ assert_eq!(
+ keys(&page),
+ vec![
+ (EntityType::EmailThread, THREAD_Z.to_string()),
+ (EntityType::Document, DOC_B.to_string()),
+ (EntityType::Document, DOC_G.to_string()),
+ (EntityType::Document, DOC_A.to_string()),
+ (EntityType::Chat, CHAT_A.to_string()),
+ (EntityType::ChannelMessage, THREAD_M.to_string()),
+ ]
+ );
+ assert!(page.iter().all(|c| c.touched_at.is_none()));
+ assert_eq!(page[3].sort_at.minute(), 5);
+
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../../fixtures", scripts("work_feed")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn keyset_paginates_across_both_streams(pool: Pool<Postgres>) -> anyhow::Result<()> {
+ let link_ids = [Uuid::parse_str(LINK_1)?];
+ let sources = sources();
+
+ let mut all = Vec::new();
+ let mut after = None;
+ loop {
+ let mut request = req(WorkFeedSoupMode::Work, &link_ids, &sources);
+ request.limit = 3;
+ request.after = after;
+ let page = work_feed_soup_page(&pool, request).await?;
+ let full = page.len() == 3;
+ all.extend(page);
+ if !full {
+ break;
+ }
+ let last = all.last().unwrap();
+ after = Some(WorkFeedPagePosition {
+ sort_at: last.sort_at,
+ entity_id: last.entity.entity_id.to_string(),
+ });
+ }
+
+ // Pages of three — including a boundary inside the doc-B/doc-G tie —
+ // yield the same feed as one page: nothing repeats and nothing is lost.
+ let one_page =
+ work_feed_soup_page(&pool, req(WorkFeedSoupMode::Work, &link_ids, &sources)).await?;
+ assert_eq!(keys(&all), keys(&one_page));
+ assert_eq!(all.len(), 10);
+
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../../fixtures", scripts("work_feed")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn only_restricts_to_known_items(pool: Pool<Postgres>) -> anyhow::Result<()> {
+ let link_ids = [Uuid::parse_str(LINK_1)?];
+ let sources = sources();
+ let only: Vec<Entity<'static>> = vec![
+ EntityType::Document.with_entity_string(DOC_A.to_string()),
+ // Only ever opened: recomputing it finds nothing.
+ EntityType::Document.with_entity_string(DOC_F.to_string()),
+ EntityType::ChannelMessage.with_entity_string(THREAD_M.to_string()),
+ ];
+ let mut request = req(WorkFeedSoupMode::Work, &link_ids, &sources);
+ request.only = Some(&only);
+ let page = work_feed_soup_page(&pool, request).await?;
+
+ assert_eq!(
+ keys(&page),
+ vec![
+ (EntityType::Document, DOC_A.to_string()),
+ (EntityType::ChannelMessage, THREAD_M.to_string()),
+ ]
+ );
+
+ Ok(())
+}
+
+#[sqlx::test(
+ fixtures(path = "../../../../fixtures", scripts("work_feed")),
+ migrator = "MACRO_DB_MIGRATIONS"
+)]
+async fn types_narrow_both_streams(pool: Pool<Postgres>) -> anyhow::Result<()> {
+ let link_ids = [Uuid::parse_str(LINK_1)?];
+ let sources = sources();
+ let mut request = req(WorkFeedSoupMode::Work, &link_ids, &sources);
+ request.types = &[EntityType::EmailThread, EntityType::Chat];
+ let page = work_feed_soup_page(&pool, request).await?;
+
+ assert_eq!(
+ keys(&page),
+ vec![
+ (EntityType::EmailThread, THREAD_S.to_string()),
+ (EntityType::EmailThread, THREAD_Z.to_string()),
+ (EntityType::Chat, CHAT_A.to_string()),
+ ]
+ );
+
+ Ok(())
+}
diff --git a/crates/work_feed/Cargo.toml b/crates/work_feed/Cargo.toml
new file mode 100644
index 0000000000..96ec3bcc6c
--- /dev/null
+++ b/crates/work_feed/Cargo.toml
@@ -0,0 +1,46 @@
+[package]
+edition = "2024"
+name = "work_feed"
+publish = false
+version = "0.1.0"
+
+[features]
+default = []
+# Adapters over the services that own the feed's data.
+outbound = [
+ "dep:activity",
+ "dep:email",
+ "dep:soup",
+ "dep:soup_realtime",
+ "dep:models_soup",
+]
+
+[dependencies]
+activity = { path = "../activity", default-features = false, features = ["realtime"], optional = true }
+base64 = { workspace = true }
+chrono = { workspace = true, features = ["serde"] }
+cowlike = { path = "../cowlike" }
+document_sub_type = { path = "../document_sub_type" }
+email = { path = "../email", default-features = false, features = ["ports"], optional = true }
+entity_access = { path = "../entity_access", default-features = false, features = ["ports"] }
+filter_ast = { path = "../filter_ast" }
+futures = { workspace = true }
+item_filters = { path = "../item_filters" }
+macro_user_id = { path = "../macro_user_id" }
+model-entity = { path = "../model-entity" }
+model_notifications = { path = "../model_notifications" }
+models_soup = { path = "../models_soup", optional = true }
+notification = { path = "../notification" }
+rootcause = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+soup = { path = "../soup", default-features = false, features = ["ports"], optional = true }
+soup_realtime = { path = "../soup_realtime", default-features = false, features = ["ports"], optional = true }
+thiserror = { workspace = true }
+tokio = { workspace = true, features = ["sync", "time", "macros", "rt"] }
+tracing = { workspace = true }
+uuid = { workspace = true }
+workspace-hack = { version = "0.1", path = "../workspace-hack" }
+
+[dev-dependencies]
+tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
diff --git a/crates/work_feed/src/domain.rs b/crates/work_feed/src/domain.rs
new file mode 100644
index 0000000000..baba2fa569
--- /dev/null
+++ b/crates/work_feed/src/domain.rs
@@ -0,0 +1,12 @@
+//! Work feed domain: models, ports, policy, stacking and the service.
+
+pub mod models;
+pub mod policy;
+pub mod ports;
+pub mod realtime;
+pub mod service;
+pub mod stacking;
+
+/// Notification fixtures shared by the domain tests.
+#[cfg(test)]
+pub(crate) mod test_support;
diff --git a/crates/work_feed/src/domain/models.rs b/crates/work_feed/src/domain/models.rs
new file mode 100644
index 0000000000..870941ec91
--- /dev/null
+++ b/crates/work_feed/src/domain/models.rs
@@ -0,0 +1,495 @@
+//! Work feed domain models.
+
+use std::{str::FromStr, sync::Arc};
+
+use base64::{Engine, engine::general_purpose::URL_SAFE_NO_PAD};
+use chrono::{DateTime, Utc};
+use entity_access::domain::models::{EntityAccessReceipt, MemberTeamRole};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::{Entity, EntityType};
+use model_notifications::NotifEvent;
+use notification::domain::models::UserNotificationRow;
+use serde::{Deserialize, Serialize};
+use uuid::Uuid;
+
+#[cfg(test)]
+mod test;
+
+/// A notification row as the work feed reads it.
+pub type FeedNotification = Arc<UserNotificationRow<NotifEvent>>;
+
+/// The caller a work feed request is evaluated for.
+#[derive(Debug, Clone)]
+pub struct WorkFeedViewer {
+ /// The authenticated user.
+ pub user: MacroUserIdStr<'static>,
+ /// The user's team membership, when they have one; foreign entities
+ /// stored for the team are visible through it.
+ pub team: Option<EntityAccessReceipt<MemberTeamRole>>,
+}
+
+/// Which reasons admit an item to the feed.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum WorkFeedMode {
+ /// Outstanding attention plus the viewer's recent own work: desktop Home.
+ Work,
+ /// Outstanding attention only: the notifications list.
+ Attention,
+}
+
+/// The kinds of item a caller can narrow the feed to.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum WorkFeedItemType {
+ /// Documents and tasks.
+ Document,
+ /// AI chats.
+ Chat,
+ /// Projects (folders).
+ Project,
+ /// Email threads.
+ Email,
+ /// Channel activity outside a dedicated thread item.
+ Channel,
+ /// One channel thread.
+ ChannelThread,
+ /// Calendar reminders.
+ CalendarEvent,
+ /// GitHub pull requests.
+ PullRequest,
+ /// Agent sessions.
+ AgentSession,
+}
+
+impl WorkFeedItemType {
+ /// Every item type, the default selection.
+ pub const ALL: [WorkFeedItemType; 9] = [
+ Self::Document,
+ Self::Chat,
+ Self::Project,
+ Self::Email,
+ Self::Channel,
+ Self::ChannelThread,
+ Self::CalendarEvent,
+ Self::PullRequest,
+ Self::AgentSession,
+ ];
+
+ /// The candidate entity type items of this kind are keyed on.
+ pub fn entity_type(self) -> EntityType {
+ match self {
+ Self::Document => EntityType::Document,
+ Self::Chat => EntityType::Chat,
+ Self::Project => EntityType::Project,
+ Self::Email => EntityType::EmailThread,
+ Self::Channel => EntityType::Channel,
+ Self::ChannelThread => EntityType::ChannelMessage,
+ Self::CalendarEvent => EntityType::CalendarEvent,
+ Self::PullRequest => EntityType::ForeignEntity,
+ Self::AgentSession => EntityType::AgentSession,
+ }
+ }
+}
+
+/// Stable per-viewer identity of a work feed item: the entity its candidate
+/// is keyed on. A channel thread is keyed on its root message, so it stays
+/// one item as replies arrive and whether or not its channel is also listed.
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct WorkFeedItemKey(Entity<'static>);
+
+/// A work feed item id that does not name an item.
+#[derive(Debug, thiserror::Error)]
+#[error("invalid work feed item id")]
+pub struct InvalidWorkFeedItemId;
+
+impl WorkFeedItemKey {
+ /// The item keyed on `entity`.
+ pub fn new(entity: Entity<'static>) -> Self {
+ Self(entity)
+ }
+
+ /// The entity the item is keyed on.
+ pub fn entity(&self) -> &Entity<'static> {
+ &self.0
+ }
+
+ /// Consume the key, returning its entity.
+ pub fn into_entity(self) -> Entity<'static> {
+ self.0
+ }
+
+ /// The item's global id: `<entity type>:<entity id>`.
+ pub fn id(&self) -> String {
+ format!("{}:{}", self.0.entity_type, self.0.entity_id)
+ }
+
+ /// Parse an id produced by [`Self::id`].
+ pub fn parse(id: &str) -> Result<Self, InvalidWorkFeedItemId> {
+ let (entity_type, entity_id) = id.split_once(':').ok_or(InvalidWorkFeedItemId)?;
+ if entity_id.is_empty() {
+ return Err(InvalidWorkFeedItemId);
+ }
+ let entity_type = EntityType::from_str(entity_type).map_err(|_| InvalidWorkFeedItemId)?;
+ Ok(Self(entity_type.with_entity_string(entity_id.to_string())))
+ }
+}
+
+/// An item's state for its viewer, aggregated over its active reasons.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum WorkFeedItemState {
+ /// At least one active reason is unseen.
+ Unseen,
+ /// Every active reason has been seen.
+ Seen,
+ /// Every notification the viewer observed was completed.
+ Done,
+}
+
+/// How one stack groups its notifications.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
+pub enum WorkFeedStackKind {
+ /// Replies, thread mentions and the absorbed root of one channel thread.
+ ChannelThread,
+ /// One root mention in a channel whose thread has no replies yet.
+ ChannelMention,
+ /// New root messages in a channel.
+ ChannelMessages,
+ /// Reactions to the viewer's channel messages.
+ ChannelReactions,
+ /// Several comments, replies or mentions in one document comment thread.
+ CommentThread,
+ /// A standalone mention in a document comment.
+ CommentMention,
+ /// Standalone root comments on a document.
+ Comments,
+ /// Mentions of a document in channels.
+ DocumentMentions,
+ /// One discussion thread on a project, company or contact.
+ Discussion,
+ /// Any other single event.
+ Event,
+}
+
+/// Notifications grouped the way they are presented: newest first, with the
+/// newest notification naming the stack.
+#[derive(Debug, Clone)]
+pub struct WorkFeedStack {
+ /// How the stack groups its notifications.
+ pub kind: WorkFeedStackKind,
+ /// The conversation thread the stack belongs to, when it is one.
+ pub thread_id: Option<String>,
+ /// The stack's notifications, newest first.
+ pub notifications: Vec<FeedNotification>,
+}
+
+impl WorkFeedStack {
+ /// The newest notification in the stack.
+ pub fn latest(&self) -> &FeedNotification {
+ &self.notifications[0]
+ }
+
+ /// Whether any notification in the stack is unseen.
+ pub fn is_unseen(&self) -> bool {
+ self.notifications
+ .iter()
+ .any(|notification| counts_as_unseen(notification))
+ }
+}
+
+/// Whether a notification makes its item unseen. Channel events other than
+/// messages, mentions and reactions (invites, calls) never do.
+pub fn counts_as_unseen(notification: &UserNotificationRow<NotifEvent>) -> bool {
+ use notification::domain::models::NotificationState;
+ if notification.state != NotificationState::Unseen {
+ return false;
+ }
+ if notification.entity.entity_type != EntityType::Channel {
+ return true;
+ }
+ matches!(
+ notification.notification_metadata,
+ NotifEvent::ChannelMention(_)
+ | NotifEvent::ChannelMessageSend(_)
+ | NotifEvent::ChannelMessageReaction(_)
+ | NotifEvent::ChannelMessageReply(_)
+ | NotifEvent::DocumentMention(_)
+ )
+}
+
+/// Why an item is presented the way it is, chosen with its click target.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum WorkFeedPrimaryReason {
+ /// The viewer's own work is the newest reason: open the entity.
+ OwnWork,
+ /// Incoming attention is the newest reason: present and open the stack
+ /// at this index of the item's stacks.
+ Attention {
+ /// Index into the item's stacks.
+ stack: usize,
+ },
+}
+
+/// The attention a viewer observed on an item. Done acknowledges only what
+/// was observed, so a notification arriving later keeps the item active.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
+pub struct WorkFeedRevision {
+ /// The newest active notification observed.
+ #[serde(rename = "a", default, skip_serializing_if = "Option::is_none")]
+ pub attention_through: Option<DateTime<Utc>>,
+}
+
+/// A revision token that does not decode.
+#[derive(Debug, thiserror::Error)]
+#[error("invalid work feed revision")]
+pub struct InvalidWorkFeedRevision;
+
+impl WorkFeedRevision {
+ /// The opaque token clients echo back.
+ pub fn encode(&self) -> String {
+ encode_token(self)
+ }
+
+ /// Decode a token produced by [`Self::encode`].
+ pub fn decode(token: &str) -> Result<Self, InvalidWorkFeedRevision> {
+ decode_token(token).ok_or(InvalidWorkFeedRevision)
+ }
+}
+
+/// One item of the feed for its viewer.
+#[derive(Debug, Clone)]
+pub struct WorkFeedItem<E> {
+ /// The item's identity.
+ pub key: WorkFeedItemKey,
+ /// The hydrated entity the item is about.
+ pub entity: E,
+ /// The item's aggregate state.
+ pub state: WorkFeedItemState,
+ /// The newest active notification in the item's scope.
+ pub attention_at: Option<DateTime<Utc>>,
+ /// The viewer's newest own work on the item.
+ pub touched_at: Option<DateTime<Utc>>,
+ /// Every active notification in the item's scope, newest first —
+ /// including those a stack shadows, which done also acknowledges.
+ pub notifications: Vec<FeedNotification>,
+ /// The item's notifications grouped for presentation, newest first.
+ pub stacks: Vec<WorkFeedStack>,
+ /// The reason the item is presented by and opens to.
+ pub primary: WorkFeedPrimaryReason,
+}
+
+impl<E> WorkFeedItem<E> {
+ /// The attention this item currently carries.
+ pub fn revision(&self) -> WorkFeedRevision {
+ WorkFeedRevision {
+ attention_through: self.attention_at,
+ }
+ }
+}
+
+/// An item placed in one feed.
+#[derive(Debug, Clone)]
+pub struct WorkFeedEntry<E> {
+ /// The item.
+ pub item: WorkFeedItem<E>,
+ /// Where the item sits: the later of its attention and own-work times.
+ pub sort_at: DateTime<Utc>,
+}
+
+/// Where the next page of a feed starts.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+pub struct WorkFeedPosition {
+ /// The last walked candidate's sort time.
+ #[serde(rename = "s")]
+ pub sort_at: DateTime<Utc>,
+ /// The last walked candidate's entity id.
+ #[serde(rename = "i")]
+ pub entity_id: String,
+}
+
+/// A cursor that does not decode.
+#[derive(Debug, thiserror::Error)]
+#[error("invalid work feed cursor")]
+pub struct InvalidWorkFeedCursor;
+
+impl WorkFeedPosition {
+ /// The opaque cursor clients send back for the next page.
+ pub fn encode(&self) -> String {
+ encode_token(self)
+ }
+
+ /// Decode a cursor produced by [`Self::encode`].
+ pub fn decode(cursor: &str) -> Result<Self, InvalidWorkFeedCursor> {
+ decode_token(cursor).ok_or(InvalidWorkFeedCursor)
+ }
+}
+
+/// Which items one feed shows.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct WorkFeedScope {
+ /// Which reasons admit items.
+ pub mode: WorkFeedMode,
+ /// The item kinds to include; empty means every kind.
+ pub types: Vec<WorkFeedItemType>,
+ /// Whether snippet documents are included.
+ pub include_snippets: bool,
+}
+
+impl WorkFeedScope {
+ /// Every item with any reason, regardless of the caller's filters: the
+ /// scope done and undo evaluate an item in.
+ pub fn everything() -> Self {
+ Self {
+ mode: WorkFeedMode::Work,
+ types: Vec::new(),
+ include_snippets: true,
+ }
+ }
+}
+
+/// A request for one page of the feed.
+#[derive(Debug, Clone)]
+pub struct WorkFeedQuery {
+ /// Which items the feed shows.
+ pub scope: WorkFeedScope,
+ /// Maximum items on the page.
+ pub limit: u16,
+ /// Resume after this position; `None` for the first page.
+ pub after: Option<WorkFeedPosition>,
+}
+
+/// One page of the feed, newest first.
+#[derive(Debug)]
+pub struct WorkFeedPage<E> {
+ /// The page's entries.
+ pub entries: Vec<WorkFeedEntry<E>>,
+ /// Where the next page starts; `None` once the feed is exhausted.
+ pub next: Option<WorkFeedPosition>,
+}
+
+/// How a known item changed for one feed.
+#[derive(Debug)]
+pub enum WorkFeedChange<E> {
+ /// The item belongs in the feed with this content and placement.
+ Upserted(WorkFeedEntry<E>),
+ /// The item no longer belongs in the feed. The entity itself may still
+ /// exist: done, filtered out and inaccessible items all leave this way.
+ Removed(WorkFeedItemKey),
+}
+
+/// An item the caller asked to mark done, with the reasons they observed.
+#[derive(Debug, Clone)]
+pub struct WorkFeedDoneTarget {
+ /// The item.
+ pub key: WorkFeedItemKey,
+ /// What the caller observed; `None` acknowledges everything current.
+ pub revision: Option<WorkFeedRevision>,
+}
+
+/// Everything one mark-done operation changed, so undo can reverse exactly
+/// those effects and nothing that happened since.
+#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
+pub struct WorkFeedDoneReceipt {
+ /// The items the operation completed.
+ #[serde(rename = "k")]
+ pub items: Vec<String>,
+ /// Notifications this operation moved to done.
+ #[serde(rename = "n", default)]
+ pub notification_ids: Vec<Uuid>,
+ /// Email threads this operation archived.
+ #[serde(rename = "e", default)]
+ pub archived_threads: Vec<Uuid>,
+}
+
+/// An undo token that does not decode.
+#[derive(Debug, thiserror::Error)]
+#[error("invalid work feed undo token")]
+pub struct InvalidWorkFeedUndoToken;
+
+impl WorkFeedDoneReceipt {
+ /// The opaque undo token returned to the caller.
+ pub fn encode(&self) -> String {
+ encode_token(self)
+ }
+
+ /// Decode a token produced by [`Self::encode`].
+ pub fn decode(token: &str) -> Result<Self, InvalidWorkFeedUndoToken> {
+ decode_token(token).ok_or(InvalidWorkFeedUndoToken)
+ }
+
+ /// The keys of the items this receipt completed.
+ pub fn item_keys(&self) -> Vec<WorkFeedItemKey> {
+ self.items
+ .iter()
+ .filter_map(|id| WorkFeedItemKey::parse(id).ok())
+ .collect()
+ }
+}
+
+/// The outcome of marking items done.
+#[derive(Debug)]
+pub struct WorkFeedDoneOutcome {
+ /// The items now done; requested items that were already gone are
+ /// reported done as well, so callers can drop them.
+ pub items: Vec<WorkFeedItemKey>,
+ /// What the operation changed, for undo.
+ pub receipt: WorkFeedDoneReceipt,
+}
+
+/// A change that may affect one viewer's items, from any realtime source.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum WorkFeedTrigger {
+ /// These candidate keys may have changed.
+ Changed(Vec<Entity<'static>>),
+ /// Changes may have been missed; mounted feeds must refetch.
+ Invalidated,
+}
+
+/// Errors returned by the work feed service.
+#[derive(Debug, thiserror::Error)]
+pub enum WorkFeedError {
+ /// The caller sent an invalid cursor, revision, item id or undo token.
+ #[error("{0}")]
+ InvalidInput(&'static str),
+ /// A dependency failed.
+ #[error("the work feed is unavailable: {0}")]
+ Unavailable(rootcause::Report),
+}
+
+impl From<rootcause::Report> for WorkFeedError {
+ fn from(report: rootcause::Report) -> Self {
+ Self::Unavailable(report)
+ }
+}
+
+impl From<InvalidWorkFeedCursor> for WorkFeedError {
+ fn from(_: InvalidWorkFeedCursor) -> Self {
+ Self::InvalidInput("invalid work feed cursor")
+ }
+}
+
+impl From<InvalidWorkFeedRevision> for WorkFeedError {
+ fn from(_: InvalidWorkFeedRevision) -> Self {
+ Self::InvalidInput("invalid work feed revision")
+ }
+}
+
+impl From<InvalidWorkFeedItemId> for WorkFeedError {
+ fn from(_: InvalidWorkFeedItemId) -> Self {
+ Self::InvalidInput("invalid work feed item id")
+ }
+}
+
+impl From<InvalidWorkFeedUndoToken> for WorkFeedError {
+ fn from(_: InvalidWorkFeedUndoToken) -> Self {
+ Self::InvalidInput("invalid work feed undo token")
+ }
+}
+
+fn encode_token<T: Serialize>(value: &T) -> String {
+ let json = serde_json::to_vec(value).expect("work feed tokens serialize");
+ URL_SAFE_NO_PAD.encode(json)
+}
+
+fn decode_token<T: for<'de> Deserialize<'de>>(token: &str) -> Option<T> {
+ let json = URL_SAFE_NO_PAD.decode(token).ok()?;
+ serde_json::from_slice(&json).ok()
+}
diff --git a/crates/work_feed/src/domain/models/test.rs b/crates/work_feed/src/domain/models/test.rs
new file mode 100644
index 0000000000..98a6d8d55d
--- /dev/null
+++ b/crates/work_feed/src/domain/models/test.rs
@@ -0,0 +1,55 @@
+use super::*;
+use crate::domain::test_support::{at, uuid};
+
+#[test]
+fn item_ids_round_trip() {
+ let key =
+ WorkFeedItemKey::new(EntityType::ChannelMessage.with_entity_string(uuid(7).to_string()));
+ let id = key.id();
+ assert_eq!(id, format!("channel_message:{}", uuid(7)));
+ assert_eq!(WorkFeedItemKey::parse(&id).unwrap(), key);
+}
+
+#[test]
+fn malformed_item_ids_are_rejected() {
+ for id in ["", "document", "document:", "not_a_type:abc"] {
+ assert!(WorkFeedItemKey::parse(id).is_err(), "{id} parsed");
+ }
+}
+
+#[test]
+fn tokens_round_trip() {
+ let revision = WorkFeedRevision {
+ attention_through: Some(at(5)),
+ };
+ assert_eq!(
+ WorkFeedRevision::decode(&revision.encode()).unwrap(),
+ revision
+ );
+
+ let position = WorkFeedPosition {
+ sort_at: at(9),
+ entity_id: uuid(3).to_string(),
+ };
+ assert_eq!(
+ WorkFeedPosition::decode(&position.encode()).unwrap(),
+ position
+ );
+
+ let receipt = WorkFeedDoneReceipt {
+ items: vec![format!("document:{}", uuid(1))],
+ notification_ids: vec![uuid(2)],
+ archived_threads: vec![uuid(3)],
+ };
+ assert_eq!(
+ WorkFeedDoneReceipt::decode(&receipt.encode()).unwrap(),
+ receipt
+ );
+}
+
+#[test]
+fn garbage_tokens_are_rejected() {
+ assert!(WorkFeedRevision::decode("not base64!").is_err());
+ assert!(WorkFeedPosition::decode("e30").is_err());
+ assert!(WorkFeedDoneReceipt::decode("").is_err());
+}
diff --git a/crates/work_feed/src/domain/policy.rs b/crates/work_feed/src/domain/policy.rs
new file mode 100644
index 0000000000..b9a73f81a2
--- /dev/null
+++ b/crates/work_feed/src/domain/policy.rs
@@ -0,0 +1,83 @@
+//! Membership policy: which entities may appear in the feed at all.
+//!
+//! The feed's reasons (outstanding attention, recent own work) come
+//! from the candidate source; this policy only narrows candidates the way
+//! Home's Signal view always has. Attention needs no content-age cutoff: a
+//! new comment on a months-old document is current news.
+
+use std::sync::Arc;
+
+use document_sub_type::DocumentSubType;
+use filter_ast::Expr;
+use item_filters::{
+ SharedEmailFilter,
+ ast::{
+ EmailFilterAst, EntityFilterAst, agent_session::AgentSessionLiteral,
+ channel::ChannelThreadLiteral, document::DocumentLiteral, email::EmailLiteral,
+ foreign_entity::ForeignEntityLiteral,
+ },
+};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::EntityType;
+
+use super::models::WorkFeedItemType;
+
+#[cfg(test)]
+mod test;
+
+/// The only foreign entities Home surfaces.
+const GITHUB_PULL_REQUEST_SOURCE: &str = "github_pull_request";
+
+/// The Signal membership filter for `user`.
+///
+/// - Email is Signal-classified and the viewer's own (not shared) mail;
+/// Noise mail stays out even when the viewer touches it.
+/// - Channel threads include the viewer as a participant.
+/// - Pull requests include the viewer.
+/// - Agent sessions are opted in (Soup excludes them by default).
+/// - Snippets are documents only when the caller shows them.
+pub fn signal_filter(user: &MacroUserIdStr<'static>, include_snippets: bool) -> EntityFilterAst {
+ EntityFilterAst {
+ document_filter: (!include_snippets).then(|| {
+ Arc::new(Expr::is_not(Expr::val(DocumentLiteral::SubType(
+ DocumentSubType::Snippet,
+ ))))
+ }),
+ email_filter: EmailFilterAst {
+ tree: Some(Arc::new(Expr::and(
+ Expr::val(EmailLiteral::Importance(true)),
+ Expr::val(EmailLiteral::Shared(SharedEmailFilter::Exclude)),
+ ))),
+ crm_scope: None,
+ },
+ channel_thread_filter: Some(Arc::new(Expr::val(ChannelThreadLiteral::Participant(
+ user.clone(),
+ )))),
+ foreign_entity_filter: Some(Arc::new(Expr::and(
+ Expr::val(ForeignEntityLiteral::ForeignEntitySource(
+ GITHUB_PULL_REQUEST_SOURCE.to_string(),
+ )),
+ Expr::val(ForeignEntityLiteral::IncludesMe),
+ ))),
+ agent_session_filter: Some(Arc::new(Expr::val(AgentSessionLiteral::Include))),
+ ..Default::default()
+ }
+}
+
+/// The candidate entity types for the requested item kinds, deduplicated in
+/// request order; no kinds means every kind.
+pub fn candidate_types(types: &[WorkFeedItemType]) -> Vec<EntityType> {
+ let requested: &[WorkFeedItemType] = if types.is_empty() {
+ &WorkFeedItemType::ALL
+ } else {
+ types
+ };
+ let mut entity_types = Vec::with_capacity(requested.len());
+ for item_type in requested {
+ let entity_type = item_type.entity_type();
+ if !entity_types.contains(&entity_type) {
+ entity_types.push(entity_type);
+ }
+ }
+ entity_types
+}
diff --git a/crates/work_feed/src/domain/policy/test.rs b/crates/work_feed/src/domain/policy/test.rs
new file mode 100644
index 0000000000..efa92a752f
--- /dev/null
+++ b/crates/work_feed/src/domain/policy/test.rs
@@ -0,0 +1,42 @@
+use super::*;
+use crate::domain::test_support::viewer_id;
+
+#[test]
+fn no_types_means_every_type() {
+ assert_eq!(
+ candidate_types(&[]),
+ WorkFeedItemType::ALL
+ .iter()
+ .map(|item_type| item_type.entity_type())
+ .collect::<Vec<_>>()
+ );
+}
+
+#[test]
+fn types_keep_request_order_without_duplicates() {
+ assert_eq!(
+ candidate_types(&[
+ WorkFeedItemType::Email,
+ WorkFeedItemType::Document,
+ WorkFeedItemType::Email,
+ ]),
+ vec![EntityType::EmailThread, EntityType::Document]
+ );
+}
+
+#[test]
+fn signal_filter_matches_home_signal() {
+ let filter = signal_filter(&viewer_id(), false);
+ assert!(filter.document_filter.is_some(), "snippets are excluded");
+ assert!(
+ filter.agent_session_filter.is_some(),
+ "agent sessions are opted in"
+ );
+ assert!(filter.initiative_filter.is_none(), "initiatives stay out");
+ assert!(filter.email_filter.tree.is_some());
+ assert!(filter.channel_thread_filter.is_some());
+ assert!(filter.foreign_entity_filter.is_some());
+
+ let with_snippets = signal_filter(&viewer_id(), true);
+ assert!(with_snippets.document_filter.is_none());
+}
diff --git a/crates/work_feed/src/domain/ports.rs b/crates/work_feed/src/domain/ports.rs
new file mode 100644
index 0000000000..22d93904e7
--- /dev/null
+++ b/crates/work_feed/src/domain/ports.rs
@@ -0,0 +1,141 @@
+//! Capabilities the work feed needs from the domains that own its data.
+
+use std::collections::HashMap;
+
+use chrono::{DateTime, Utc};
+use item_filters::ast::EntityFilterAst;
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::{Entity, EntityType};
+use rootcause::Report;
+use uuid::Uuid;
+
+use super::models::{
+ FeedNotification, WorkFeedMode, WorkFeedPosition, WorkFeedTrigger, WorkFeedViewer,
+};
+
+/// Facts about a candidate's entity that scoping and state depend on.
+#[derive(Debug, Clone, Default, PartialEq, Eq)]
+pub struct EntityFacts {
+ /// For a channel thread, the channel whose notifications it shares.
+ pub thread_channel: Option<Uuid>,
+ /// For an email thread, its mailbox state.
+ pub mail: Option<MailFacts>,
+}
+
+/// An email thread's mailbox state.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub struct MailFacts {
+ /// The thread is in the inbox (not archived).
+ pub inbox_visible: bool,
+ /// The thread has no unread mail.
+ pub is_read: bool,
+}
+
+/// A request for one page of hydrated candidates.
+#[derive(Debug, Clone)]
+pub struct SourceRequest {
+ /// Who the feed is for.
+ pub viewer: WorkFeedViewer,
+ /// Which reasons admit candidates.
+ pub mode: WorkFeedMode,
+ /// Candidate entity types to include.
+ pub types: Vec<EntityType>,
+ /// The membership policy filter.
+ pub filter: EntityFilterAst,
+ /// Maximum candidates to return.
+ pub limit: u16,
+ /// Resume after this position; `None` for the first page.
+ pub after: Option<WorkFeedPosition>,
+ /// Restrict to these candidate keys, for recomputing known items.
+ pub only: Option<Vec<Entity<'static>>>,
+}
+
+/// One hydrated, authorized candidate.
+#[derive(Debug, Clone)]
+pub struct SourceItem<E> {
+ /// The candidate key.
+ pub key: Entity<'static>,
+ /// The hydrated entity.
+ pub entity: E,
+ /// Facts used for scoping and state.
+ pub facts: EntityFacts,
+ /// The candidate's live attention time, when it has any.
+ pub attention_at: Option<DateTime<Utc>>,
+ /// The viewer's own-work time, when it has any.
+ pub touched_at: Option<DateTime<Utc>>,
+ /// Where the candidate sits in the feed.
+ pub sort_at: DateTime<Utc>,
+}
+
+/// One page of hydrated candidates.
+#[derive(Debug)]
+pub struct SourcePage<E> {
+ /// The page's candidates, newest first.
+ pub items: Vec<SourceItem<E>>,
+ /// Where the next page starts; `None` once the feed is exhausted.
+ pub next: Option<WorkFeedPosition>,
+}
+
+/// Lists hydrated, authorized feed candidates in feed order.
+pub trait WorkFeedSource: Send + Sync + 'static {
+ /// The hydrated entity carried by each candidate.
+ type Entity: Send + Sync + 'static;
+
+ /// Fetch one page of candidates.
+ fn page(
+ &self,
+ request: SourceRequest,
+ ) -> impl Future<Output = Result<SourcePage<Self::Entity>, Report>> + Send;
+}
+
+/// Reads and acknowledges the viewer's notifications.
+pub trait WorkFeedNotifications: Send + Sync + 'static {
+ /// The viewer's active (unseen or seen) notifications about each entity.
+ fn active(
+ &self,
+ user: MacroUserIdStr<'static>,
+ entities: Vec<Entity<'static>>,
+ ) -> impl Future<Output = Result<HashMap<Entity<'static>, Vec<FeedNotification>>, Report>> + Send;
+
+ /// Move the viewer's notifications to done, or back from done to seen.
+ /// Returns the ids whose state changed.
+ fn set_done(
+ &self,
+ user: MacroUserIdStr<'static>,
+ notification_ids: Vec<Uuid>,
+ done: bool,
+ ) -> impl Future<Output = Result<Vec<Uuid>, Report>> + Send;
+}
+
+/// Archives email threads; mail's notion of done.
+pub trait WorkFeedMail: Send + Sync + 'static {
+ /// Archive or unarchive one of the viewer's threads.
+ fn set_archived(
+ &self,
+ user: MacroUserIdStr<'static>,
+ thread_id: Uuid,
+ archived: bool,
+ ) -> impl Future<Output = Result<(), Report>> + Send;
+}
+
+/// Tells the viewer's other sessions that items changed in ways their
+/// realtime streams do not report, such as notifications completed here.
+pub trait WorkFeedSignals: Send + Sync + 'static {
+ /// Best effort: failures are logged, never returned.
+ fn items_changed(
+ &self,
+ user: MacroUserIdStr<'static>,
+ entities: Vec<Entity<'static>>,
+ ) -> impl Future<Output = ()> + Send;
+}
+
+/// Realtime changes that may affect a viewer's items.
+pub trait WorkFeedTriggers: Send + Sync + 'static {
+ /// Subscribe to triggers for `user`. The receiver closes when the
+ /// underlying streams end; a subscriber that falls behind receives
+ /// [`WorkFeedTrigger::Invalidated`] first.
+ fn subscribe(
+ &self,
+ user: MacroUserIdStr<'static>,
+ ) -> tokio::sync::mpsc::Receiver<WorkFeedTrigger>;
+}
diff --git a/crates/work_feed/src/domain/realtime.rs b/crates/work_feed/src/domain/realtime.rs
new file mode 100644
index 0000000000..9b65ef901b
--- /dev/null
+++ b/crates/work_feed/src/domain/realtime.rs
@@ -0,0 +1,34 @@
+//! Which items a realtime change may affect.
+//!
+//! Triggers only name candidate keys; the service recomputes those items
+//! from storage, so a trigger that names an item outside the feed costs one
+//! lookup and changes nothing.
+
+use model_entity::{Entity, EntityType};
+use model_notifications::NotifEvent;
+use notification::domain::models::UserNotificationRow;
+
+use super::stacking::channel_thread_root;
+
+#[cfg(test)]
+mod test;
+
+/// The items a notification about its entity may affect. A channel
+/// notification can move between the channel item and a thread item, so
+/// both are recomputed; a plain send names the thread it may root.
+pub fn notification_trigger_keys(
+ notification: &UserNotificationRow<NotifEvent>,
+) -> Vec<Entity<'static>> {
+ let mut keys = vec![notification.entity.clone()];
+ if notification.entity.entity_type != EntityType::Channel {
+ return keys;
+ }
+ let thread = channel_thread_root(notification).or(match &notification.notification_metadata {
+ NotifEvent::ChannelMessageSend(send) => Some(send.message_id.as_str()),
+ _ => None,
+ });
+ if let Some(root) = thread {
+ keys.push(EntityType::ChannelMessage.with_entity_string(root.to_string()));
+ }
+ keys
+}
diff --git a/crates/work_feed/src/domain/realtime/test.rs b/crates/work_feed/src/domain/realtime/test.rs
new file mode 100644
index 0000000000..7356b8c560
--- /dev/null
+++ b/crates/work_feed/src/domain/realtime/test.rs
@@ -0,0 +1,39 @@
+use super::*;
+use crate::domain::test_support::*;
+
+const CHANNEL: u128 = 0xC0;
+
+fn thread(id: u128) -> Entity<'static> {
+ entity(EntityType::ChannelMessage, id)
+}
+
+#[test]
+fn channel_notifications_recompute_the_channel_and_its_thread() {
+ let channel = entity(EntityType::Channel, CHANNEL);
+ assert_eq!(
+ notification_trigger_keys(&channel_reply(1, CHANNEL, 0x70, 0x71, 1)),
+ vec![channel.clone(), thread(0x70)]
+ );
+ assert_eq!(
+ notification_trigger_keys(&channel_mention(2, CHANNEL, 0x72, None, 1)),
+ vec![channel.clone(), thread(0x72)]
+ );
+ // A plain send may root a thread that absorbs it.
+ assert_eq!(
+ notification_trigger_keys(&channel_send(3, CHANNEL, 0x73, 1)),
+ vec![channel.clone(), thread(0x73)]
+ );
+ assert_eq!(
+ notification_trigger_keys(&channel_invite(4, CHANNEL, 1)),
+ vec![channel]
+ );
+}
+
+#[test]
+fn other_notifications_recompute_their_entity() {
+ let document = entity(EntityType::Document, 0xD0);
+ assert_eq!(
+ notification_trigger_keys(&doc_comment(1, 0xD0, 0xA0, 0xA0, 1)),
+ vec![document]
+ );
+}
diff --git a/crates/work_feed/src/domain/service.rs b/crates/work_feed/src/domain/service.rs
new file mode 100644
index 0000000000..bbbd684409
--- /dev/null
+++ b/crates/work_feed/src/domain/service.rs
@@ -0,0 +1,433 @@
+//! The work feed use cases: list a page, recompute known items, mark items
+//! done, and undo a done.
+
+use std::collections::{HashMap, HashSet};
+
+use model_entity::{Entity, EntityType};
+use model_notifications::NotifEvent;
+use rootcause::Report;
+use uuid::Uuid;
+
+use super::{
+ models::{
+ FeedNotification, WorkFeedChange, WorkFeedDoneOutcome, WorkFeedDoneReceipt,
+ WorkFeedDoneTarget, WorkFeedEntry, WorkFeedError, WorkFeedItem, WorkFeedItemKey,
+ WorkFeedItemState, WorkFeedPage, WorkFeedPrimaryReason, WorkFeedQuery, WorkFeedScope,
+ WorkFeedViewer, counts_as_unseen,
+ },
+ policy,
+ ports::{
+ EntityFacts, SourceItem, SourceRequest, WorkFeedMail, WorkFeedNotifications,
+ WorkFeedSignals, WorkFeedSource,
+ },
+ stacking,
+};
+
+#[cfg(test)]
+mod test;
+
+/// Most candidate keys recomputed per source request.
+const RECOMPUTE_CHUNK: usize = 200;
+
+/// The work feed's use cases.
+pub trait WorkFeedService: Send + Sync + 'static {
+ /// The hydrated entity each item carries.
+ type Entity: Send + Sync + 'static;
+
+ /// One page of the viewer's feed, newest first.
+ fn page(
+ &self,
+ viewer: WorkFeedViewer,
+ query: WorkFeedQuery,
+ ) -> impl Future<Output = Result<WorkFeedPage<Self::Entity>, WorkFeedError>> + Send;
+
+ /// The current membership and content of known items in one feed: each
+ /// key comes back upserted with its placement, or removed.
+ fn recompute(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ keys: Vec<WorkFeedItemKey>,
+ ) -> impl Future<Output = Result<Vec<WorkFeedChange<Self::Entity>>, WorkFeedError>> + Send;
+
+ /// Acknowledge the attention the caller observed on each item: its
+ /// notifications move to done and its inbox email is archived. Own work
+ /// is not acknowledged, so an item the viewer also worked on stays in the
+ /// work feed, seen, at its own-work time. Underlying tasks, discussions
+ /// and pull requests are not completed.
+ fn mark_done(
+ &self,
+ viewer: WorkFeedViewer,
+ targets: Vec<WorkFeedDoneTarget>,
+ ) -> impl Future<Output = Result<WorkFeedDoneOutcome, WorkFeedError>> + Send;
+
+ /// Reverse exactly what one mark-done changed, then recompute its items
+ /// for the caller's feed.
+ fn undo_done(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ receipt: WorkFeedDoneReceipt,
+ ) -> impl Future<Output = Result<Vec<WorkFeedChange<Self::Entity>>, WorkFeedError>> + Send;
+}
+
+/// The work feed service over its ports.
+pub struct WorkFeedServiceImpl<S, N, M, G> {
+ source: S,
+ notifications: N,
+ mail: M,
+ signals: G,
+}
+
+impl<S, N, M, G> WorkFeedServiceImpl<S, N, M, G> {
+ /// Create the service from its ports.
+ pub fn new(source: S, notifications: N, mail: M, signals: G) -> Self {
+ Self {
+ source,
+ notifications,
+ mail,
+ signals,
+ }
+ }
+}
+
+/// An entry with the facts done needs about it.
+struct Assembled<E> {
+ entry: WorkFeedEntry<E>,
+ facts: EntityFacts,
+}
+
+/// The notifications an item's scope is drawn from: a thread shares its
+/// channel's notifications, every other item reads its own entity's.
+fn notification_source(item: &SourceItem<impl Sized>) -> Option<Entity<'static>> {
+ match item.key.entity_type {
+ EntityType::ChannelMessage => item
+ .facts
+ .thread_channel
+ .map(|channel| EntityType::Channel.with_entity_string(channel.to_string())),
+ _ => Some(item.key.clone()),
+ }
+}
+
+/// Build one item from its candidate and its source's active notifications.
+/// Returns `None` when, after scoping, the item has no reason left.
+fn assemble_item<E>(
+ item: SourceItem<E>,
+ loaded: &HashMap<Entity<'static>, Vec<FeedNotification>>,
+) -> Option<Assembled<E>> {
+ let source = notification_source(&item);
+ let available = source
+ .as_ref()
+ .and_then(|source| loaded.get(source))
+ .map(Vec::as_slice)
+ .unwrap_or_default();
+ let mut scoped = match item.key.entity_type {
+ EntityType::Channel => stacking::scope_channel(available),
+ EntityType::ChannelMessage => {
+ stacking::scope_channel_thread(available, item.key.entity_id.as_ref())
+ }
+ _ => available.to_vec(),
+ };
+ // An email's attention lasts while it is in the inbox: archive is mail's
+ // own done, whatever its notifications' states.
+ if item.facts.mail.is_some_and(|mail| !mail.inbox_visible) {
+ scoped.clear();
+ }
+ stacking::sort_newest_first(&mut scoped);
+ if scoped.is_empty() && item.touched_at.is_none() {
+ return None;
+ }
+
+ let stacks = stacking::stack(&scoped);
+ let attention_at = scoped.first().map(|notification| notification.created_at);
+ let unseen = match item.facts.mail {
+ // Mail is unseen while it has unread messages or an unseen reminder;
+ // new-mail notifications follow the mailbox's own read state.
+ Some(mail) => {
+ !mail.is_read
+ || scoped.iter().any(|notification| {
+ matches!(notification.notification_metadata, NotifEvent::Reminder(_))
+ && counts_as_unseen(notification)
+ })
+ }
+ None => scoped
+ .iter()
+ .any(|notification| counts_as_unseen(notification)),
+ };
+ let primary = match (attention_at, item.touched_at) {
+ (Some(attention), Some(touched)) if touched >= attention => WorkFeedPrimaryReason::OwnWork,
+ (Some(_), _) if !stacks.is_empty() => WorkFeedPrimaryReason::Attention { stack: 0 },
+ _ => WorkFeedPrimaryReason::OwnWork,
+ };
+
+ Some(Assembled {
+ entry: WorkFeedEntry {
+ sort_at: item.sort_at,
+ item: WorkFeedItem {
+ key: WorkFeedItemKey::new(item.key),
+ entity: item.entity,
+ state: if unseen {
+ WorkFeedItemState::Unseen
+ } else {
+ WorkFeedItemState::Seen
+ },
+ attention_at,
+ touched_at: item.touched_at,
+ notifications: scoped,
+ stacks,
+ primary,
+ },
+ },
+ facts: item.facts,
+ })
+}
+
+impl<S, N, M, G> WorkFeedServiceImpl<S, N, M, G>
+where
+ S: WorkFeedSource,
+ N: WorkFeedNotifications,
+ M: WorkFeedMail,
+ G: WorkFeedSignals,
+{
+ /// Load the candidates' notifications and build their items, in order.
+ async fn assemble(
+ &self,
+ viewer: &WorkFeedViewer,
+ items: Vec<SourceItem<S::Entity>>,
+ ) -> Result<Vec<Assembled<S::Entity>>, Report> {
+ let mut sources = Vec::new();
+ let mut seen = HashSet::new();
+ for source in items.iter().filter_map(notification_source) {
+ if seen.insert(source.clone()) {
+ sources.push(source);
+ }
+ }
+ let loaded = if sources.is_empty() {
+ HashMap::new()
+ } else {
+ self.notifications
+ .active(viewer.user.clone(), sources)
+ .await?
+ };
+ Ok(items
+ .into_iter()
+ .filter_map(|item| assemble_item(item, &loaded))
+ .collect())
+ }
+
+ /// Current items for `keys` in `scope`, keyed by item.
+ async fn current(
+ &self,
+ viewer: &WorkFeedViewer,
+ scope: &WorkFeedScope,
+ keys: &[WorkFeedItemKey],
+ ) -> Result<HashMap<WorkFeedItemKey, Assembled<S::Entity>>, Report> {
+ let filter = policy::signal_filter(&viewer.user, scope.include_snippets);
+ let types = policy::candidate_types(&scope.types);
+ let mut current = HashMap::with_capacity(keys.len());
+ for chunk in keys.chunks(RECOMPUTE_CHUNK) {
+ let page = self
+ .source
+ .page(SourceRequest {
+ viewer: viewer.clone(),
+ mode: scope.mode,
+ types: types.clone(),
+ filter: filter.clone(),
+ limit: u16::try_from(chunk.len()).unwrap_or(u16::MAX),
+ after: None,
+ only: Some(chunk.iter().map(|key| key.entity().clone()).collect()),
+ })
+ .await?;
+ for assembled in self.assemble(viewer, page.items).await? {
+ current.insert(assembled.entry.item.key.clone(), assembled);
+ }
+ }
+ Ok(current)
+ }
+}
+
+/// Keys deduplicated in first-seen order.
+fn unique_keys(keys: impl IntoIterator<Item = WorkFeedItemKey>) -> Vec<WorkFeedItemKey> {
+ let mut seen = HashSet::new();
+ keys.into_iter()
+ .filter(|key| seen.insert(key.clone()))
+ .collect()
+}
+
+/// An email thread item's thread id.
+fn email_thread_id(key: &WorkFeedItemKey) -> Option<Uuid> {
+ (key.entity().entity_type == EntityType::EmailThread)
+ .then(|| Uuid::parse_str(key.entity().entity_id.as_ref()).ok())
+ .flatten()
+}
+
+impl<S, N, M, G> WorkFeedService for WorkFeedServiceImpl<S, N, M, G>
+where
+ S: WorkFeedSource,
+ N: WorkFeedNotifications,
+ M: WorkFeedMail,
+ G: WorkFeedSignals,
+{
+ type Entity = S::Entity;
+
+ #[tracing::instrument(err, skip(self, viewer), fields(user = %viewer.user))]
+ async fn page(
+ &self,
+ viewer: WorkFeedViewer,
+ query: WorkFeedQuery,
+ ) -> Result<WorkFeedPage<Self::Entity>, WorkFeedError> {
+ let page = self
+ .source
+ .page(SourceRequest {
+ viewer: viewer.clone(),
+ mode: query.scope.mode,
+ types: policy::candidate_types(&query.scope.types),
+ filter: policy::signal_filter(&viewer.user, query.scope.include_snippets),
+ limit: query.limit,
+ after: query.after,
+ only: None,
+ })
+ .await?;
+ let entries = self
+ .assemble(&viewer, page.items)
+ .await?
+ .into_iter()
+ .map(|assembled| assembled.entry)
+ .collect();
+ Ok(WorkFeedPage {
+ entries,
+ next: page.next,
+ })
+ }
+
+ #[tracing::instrument(err, skip(self, viewer, keys), fields(user = %viewer.user, keys = keys.len()))]
+ async fn recompute(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ keys: Vec<WorkFeedItemKey>,
+ ) -> Result<Vec<WorkFeedChange<Self::Entity>>, WorkFeedError> {
+ let keys = unique_keys(keys);
+ if keys.is_empty() {
+ return Ok(Vec::new());
+ }
+ let mut current = self.current(&viewer, &scope, &keys).await?;
+ Ok(keys
+ .into_iter()
+ .map(|key| match current.remove(&key) {
+ Some(assembled) => WorkFeedChange::Upserted(assembled.entry),
+ None => WorkFeedChange::Removed(key),
+ })
+ .collect())
+ }
+
+ #[tracing::instrument(err, skip(self, viewer, targets), fields(user = %viewer.user, targets = targets.len()))]
+ async fn mark_done(
+ &self,
+ viewer: WorkFeedViewer,
+ targets: Vec<WorkFeedDoneTarget>,
+ ) -> Result<WorkFeedDoneOutcome, WorkFeedError> {
+ let keys = unique_keys(targets.iter().map(|target| target.key.clone()));
+ if keys.is_empty() {
+ return Ok(WorkFeedDoneOutcome {
+ items: Vec::new(),
+ receipt: WorkFeedDoneReceipt::default(),
+ });
+ }
+ // Evaluate each item in every feed's scope, whatever feed the caller
+ // was looking at, so done acknowledges what they observed.
+ let current = self
+ .current(&viewer, &WorkFeedScope::everything(), &keys)
+ .await?;
+
+ let mut notification_ids = Vec::new();
+ let mut archive = Vec::new();
+ let mut planned = HashSet::new();
+ for target in &targets {
+ if !planned.insert(target.key.clone()) {
+ continue;
+ }
+ let Some(assembled) = current.get(&target.key) else {
+ // Already gone from every feed: nothing left to acknowledge.
+ continue;
+ };
+ let item = &assembled.entry.item;
+ let observed = target.revision.unwrap_or_else(|| item.revision());
+ if let Some(through) = observed.attention_through {
+ notification_ids.extend(
+ item.notifications
+ .iter()
+ .filter(|notification| notification.created_at <= through)
+ .map(|notification| notification.notification_id),
+ );
+ }
+ if assembled.facts.mail.is_some_and(|mail| mail.inbox_visible)
+ && let Some(thread_id) = email_thread_id(&target.key)
+ {
+ archive.push(thread_id);
+ }
+ }
+
+ let user = viewer.user.clone();
+ let changed_notifications = if notification_ids.is_empty() {
+ Vec::new()
+ } else {
+ self.notifications
+ .set_done(user.clone(), notification_ids, true)
+ .await?
+ };
+ // Archiving is best effort: the thread's notifications are already
+ // done, which removes its attention on their own.
+ let mut archived = Vec::new();
+ for thread_id in archive {
+ match self.mail.set_archived(user.clone(), thread_id, true).await {
+ Ok(()) => archived.push(thread_id),
+ Err(error) => {
+ tracing::warn!(error = ?error, %thread_id, "failed to archive work feed email")
+ }
+ }
+ }
+
+ self.signals
+ .items_changed(user, keys.iter().map(|key| key.entity().clone()).collect())
+ .await;
+
+ Ok(WorkFeedDoneOutcome {
+ receipt: WorkFeedDoneReceipt {
+ items: keys.iter().map(WorkFeedItemKey::id).collect(),
+ notification_ids: changed_notifications,
+ archived_threads: archived,
+ },
+ items: keys,
+ })
+ }
+
+ #[tracing::instrument(err, skip(self, viewer, receipt), fields(user = %viewer.user))]
+ async fn undo_done(
+ &self,
+ viewer: WorkFeedViewer,
+ scope: WorkFeedScope,
+ receipt: WorkFeedDoneReceipt,
+ ) -> Result<Vec<WorkFeedChange<Self::Entity>>, WorkFeedError> {
+ let user = viewer.user.clone();
+ if !receipt.notification_ids.is_empty() {
+ self.notifications
+ .set_done(user.clone(), receipt.notification_ids.clone(), false)
+ .await?;
+ }
+ for thread_id in &receipt.archived_threads {
+ if let Err(error) = self
+ .mail
+ .set_archived(user.clone(), *thread_id, false)
+ .await
+ {
+ tracing::warn!(error = ?error, %thread_id, "failed to unarchive work feed email");
+ }
+ }
+ let keys = receipt.item_keys();
+ self.signals
+ .items_changed(user, keys.iter().map(|key| key.entity().clone()).collect())
+ .await;
+ self.recompute(viewer, scope, keys).await
+ }
+}
diff --git a/crates/work_feed/src/domain/service/test.rs b/crates/work_feed/src/domain/service/test.rs
new file mode 100644
index 0000000000..5c4f0553ae
--- /dev/null
+++ b/crates/work_feed/src/domain/service/test.rs
@@ -0,0 +1,624 @@
+use std::sync::Mutex;
+
+use macro_user_id::user_id::MacroUserIdStr;
+use notification::domain::models::NotificationState;
+use serde_json::json;
+
+use super::*;
+use crate::domain::{
+ models::{
+ WorkFeedItemType, WorkFeedMode, WorkFeedPosition, WorkFeedRevision, WorkFeedStackKind,
+ },
+ ports::{MailFacts, SourcePage},
+ test_support::*,
+};
+
+const DOC: u128 = 0xD0;
+const OTHER_DOC: u128 = 0xD1;
+const CHANNEL: u128 = 0xC0;
+const THREAD: u128 = 0x70;
+const MAIL: u128 = 0xE0;
+const SENT_MAIL: u128 = 0xE1;
+
+/// A source serving a fixed, ordered feed of labelled candidates.
+#[derive(Default)]
+struct FakeSource {
+ items: Mutex<Vec<SourceItem<&'static str>>>,
+ requests: Mutex<Vec<SourceRequest>>,
+}
+
+impl FakeSource {
+ fn with(items: Vec<SourceItem<&'static str>>) -> Self {
+ Self {
+ items: Mutex::new(items),
+ requests: Mutex::default(),
+ }
+ }
+}
+
+impl WorkFeedSource for FakeSource {
+ type Entity = &'static str;
+
+ async fn page(&self, request: SourceRequest) -> Result<SourcePage<&'static str>, Report> {
+ self.requests.lock().unwrap().push(request.clone());
+ let items = self.items.lock().unwrap().clone();
+ let mut page: Vec<_> = items
+ .into_iter()
+ .filter(|item| {
+ request
+ .only
+ .as_ref()
+ .is_none_or(|only| only.contains(&item.key))
+ })
+ .filter(|item| {
+ request.after.as_ref().is_none_or(|after| {
+ (item.sort_at, item.key.entity_id.to_string())
+ < (after.sort_at, after.entity_id.clone())
+ })
+ })
+ .collect();
+ let full = page.len() > usize::from(request.limit);
+ page.truncate(usize::from(request.limit));
+ let next = full.then(|| {
+ let last = page.last().unwrap();
+ WorkFeedPosition {
+ sort_at: last.sort_at,
+ entity_id: last.key.entity_id.to_string(),
+ }
+ });
+ Ok(SourcePage { items: page, next })
+ }
+}
+
+#[derive(Default)]
+struct FakeNotifications {
+ by_entity: Mutex<HashMap<Entity<'static>, Vec<FeedNotification>>>,
+ loads: Mutex<Vec<Vec<Entity<'static>>>>,
+ done_calls: Mutex<Vec<(Vec<Uuid>, bool)>>,
+}
+
+impl FakeNotifications {
+ fn with(notifications: Vec<FeedNotification>) -> Self {
+ let mut by_entity: HashMap<Entity<'static>, Vec<FeedNotification>> = HashMap::new();
+ for notification in notifications {
+ by_entity
+ .entry(notification.entity.clone())
+ .or_default()
+ .push(notification);
+ }
+ Self {
+ by_entity: Mutex::new(by_entity),
+ ..Default::default()
+ }
+ }
+
+ fn state_of(&self, id: Uuid) -> NotificationState {
+ self.by_entity
+ .lock()
+ .unwrap()
+ .values()
+ .flatten()
+ .find(|n| n.notification_id == id)
+ .map(|n| n.state)
+ .unwrap()
+ }
+}
+
+impl WorkFeedNotifications for FakeNotifications {
+ async fn active(
+ &self,
+ _user: MacroUserIdStr<'static>,
+ entities: Vec<Entity<'static>>,
+ ) -> Result<HashMap<Entity<'static>, Vec<FeedNotification>>, Report> {
+ self.loads.lock().unwrap().push(entities.clone());
+ let by_entity = self.by_entity.lock().unwrap();
+ Ok(entities
+ .into_iter()
+ .map(|entity| {
+ let active = by_entity
+ .get(&entity)
+ .into_iter()
+ .flatten()
+ .filter(|n| n.state != NotificationState::Done)
+ .cloned()
+ .collect();
+ (entity, active)
+ })
+ .collect())
+ }
+
+ async fn set_done(
+ &self,
+ _user: MacroUserIdStr<'static>,
+ notification_ids: Vec<Uuid>,
+ done: bool,
+ ) -> Result<Vec<Uuid>, Report> {
+ self.done_calls
+ .lock()
+ .unwrap()
+ .push((notification_ids.clone(), done));
+ let mut changed = Vec::new();
+ for notifications in self.by_entity.lock().unwrap().values_mut() {
+ for notification in notifications.iter_mut() {
+ if notification_ids.contains(&notification.notification_id) {
+ let state = if done {
+ NotificationState::Done
+ } else {
+ NotificationState::Seen
+ };
+ *notification = with_state(notification, state);
+ changed.push(notification.notification_id);
+ }
+ }
+ }
+ Ok(changed)
+ }
+}
+
+#[derive(Default)]
+struct FakeMail {
+ calls: Mutex<Vec<(Uuid, bool)>>,
+}
+
+impl WorkFeedMail for FakeMail {
+ async fn set_archived(
+ &self,
+ _user: MacroUserIdStr<'static>,
+ thread_id: Uuid,
+ archived: bool,
+ ) -> Result<(), Report> {
+ self.calls.lock().unwrap().push((thread_id, archived));
+ Ok(())
+ }
+}
+
+#[derive(Default)]
+struct FakeSignals {
+ calls: Mutex<Vec<Vec<Entity<'static>>>>,
+}
+
+impl WorkFeedSignals for FakeSignals {
+ async fn items_changed(&self, _user: MacroUserIdStr<'static>, entities: Vec<Entity<'static>>) {
+ self.calls.lock().unwrap().push(entities);
+ }
+}
+
+type Service = WorkFeedServiceImpl<FakeSource, FakeNotifications, FakeMail, FakeSignals>;
+
+fn service(items: Vec<SourceItem<&'static str>>, notifications: Vec<FeedNotification>) -> Service {
+ WorkFeedServiceImpl::new(
+ FakeSource::with(items),
+ FakeNotifications::with(notifications),
+ FakeMail::default(),
+ FakeSignals::default(),
+ )
+}
+
+fn viewer() -> WorkFeedViewer {
+ WorkFeedViewer {
+ user: viewer_id(),
+ team: None,
+ }
+}
+
+fn candidate(
+ label: &'static str,
+ key: Entity<'static>,
+ attention: Option<u32>,
+ touched: Option<u32>,
+) -> SourceItem<&'static str> {
+ let attention_at = attention.map(at);
+ let touched_at = touched.map(at);
+ SourceItem {
+ key,
+ entity: label,
+ facts: EntityFacts::default(),
+ attention_at,
+ touched_at,
+ sort_at: attention_at.max(touched_at).unwrap(),
+ }
+}
+
+fn mail_candidate(
+ label: &'static str,
+ id: u128,
+ attention: Option<u32>,
+ touched: Option<u32>,
+ mail: MailFacts,
+) -> SourceItem<&'static str> {
+ let mut item = candidate(
+ label,
+ entity(EntityType::EmailThread, id),
+ attention,
+ touched,
+ );
+ item.facts.mail = Some(mail);
+ item
+}
+
+fn new_email(id: u128, thread: u128, minute: u32, state: NotificationState) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::EmailThread, thread),
+ "new_email",
+ json!({
+ "toEmail": "[email protected]",
+ "threadId": uuid(thread),
+ "subject": "Hello",
+ "snippet": "...",
+ }),
+ minute,
+ state,
+ )
+}
+
+fn query() -> WorkFeedQuery {
+ WorkFeedQuery {
+ scope: WorkFeedScope {
+ mode: WorkFeedMode::Work,
+ types: Vec::new(),
+ include_snippets: false,
+ },
+ limit: 50,
+ after: None,
+ }
+}
+
+fn key(entity: Entity<'static>) -> WorkFeedItemKey {
+ WorkFeedItemKey::new(entity)
+}
+
+#[tokio::test]
+async fn page_assembles_stacked_items_in_feed_order() {
+ let mut thread = candidate(
+ "thread",
+ entity(EntityType::ChannelMessage, THREAD),
+ Some(6),
+ None,
+ );
+ thread.facts.thread_channel = Some(uuid(CHANNEL));
+ let service = service(
+ vec![
+ candidate("doc", entity(EntityType::Document, DOC), Some(5), Some(9)),
+ thread,
+ // The channel's only notification belongs to the thread.
+ candidate(
+ "channel",
+ entity(EntityType::Channel, CHANNEL),
+ Some(6),
+ None,
+ ),
+ mail_candidate(
+ "mail",
+ MAIL,
+ Some(4),
+ None,
+ MailFacts {
+ inbox_visible: true,
+ is_read: false,
+ },
+ ),
+ mail_candidate(
+ "sent",
+ SENT_MAIL,
+ None,
+ Some(3),
+ MailFacts {
+ inbox_visible: false,
+ is_read: true,
+ },
+ ),
+ ],
+ vec![
+ doc_comment(1, DOC, 0xA0, 0xA0, 5),
+ channel_reply(2, CHANNEL, THREAD, 0x71, 6),
+ new_email(3, MAIL, 4, NotificationState::Seen),
+ // Outside the inbox, mail attention no longer counts.
+ new_email(4, SENT_MAIL, 2, NotificationState::Unseen),
+ ],
+ );
+
+ let page = service.page(viewer(), query()).await.unwrap();
+ let labels: Vec<_> = page.entries.iter().map(|e| e.item.entity).collect();
+ assert_eq!(labels, vec!["doc", "thread", "mail", "sent"]);
+
+ // doc-A: own work is newer, but its older comment keeps it unseen.
+ let doc = &page.entries[0].item;
+ assert_eq!(doc.primary, WorkFeedPrimaryReason::OwnWork);
+ assert_eq!(doc.state, WorkFeedItemState::Unseen);
+ assert_eq!(doc.attention_at, Some(at(5)));
+ assert_eq!(doc.touched_at, Some(at(9)));
+ assert_eq!(page.entries[0].sort_at, at(9));
+ assert_eq!(doc.stacks[0].kind, WorkFeedStackKind::Comments);
+
+ let thread = &page.entries[1].item;
+ assert_eq!(
+ thread.primary,
+ WorkFeedPrimaryReason::Attention { stack: 0 }
+ );
+ assert_eq!(thread.stacks[0].kind, WorkFeedStackKind::ChannelThread);
+
+ // Unread mail is unseen even when its notification was seen.
+ assert_eq!(page.entries[2].item.state, WorkFeedItemState::Unseen);
+
+ let sent = &page.entries[3].item;
+ assert!(sent.notifications.is_empty());
+ assert_eq!(sent.state, WorkFeedItemState::Seen);
+ assert_eq!(sent.primary, WorkFeedPrimaryReason::OwnWork);
+
+ // The thread and its channel share one notification load.
+ let loads = service.notifications.loads.lock().unwrap();
+ assert_eq!(loads.len(), 1);
+ assert_eq!(
+ loads[0]
+ .iter()
+ .filter(|e| e.entity_type == EntityType::Channel)
+ .count(),
+ 1
+ );
+}
+
+#[tokio::test]
+async fn page_forwards_scope_and_cursor_to_the_source() {
+ let service = service(
+ vec![candidate(
+ "doc",
+ entity(EntityType::Document, DOC),
+ None,
+ Some(9),
+ )],
+ Vec::new(),
+ );
+ let mut query = query();
+ query.scope.mode = WorkFeedMode::Attention;
+ query.scope.types = vec![WorkFeedItemType::Email, WorkFeedItemType::ChannelThread];
+ query.after = Some(WorkFeedPosition {
+ sort_at: at(30),
+ entity_id: "x".to_string(),
+ });
+ service.page(viewer(), query).await.unwrap();
+
+ let requests = service.source.requests.lock().unwrap();
+ assert_eq!(requests[0].mode, WorkFeedMode::Attention);
+ assert_eq!(
+ requests[0].types,
+ vec![EntityType::EmailThread, EntityType::ChannelMessage]
+ );
+ assert_eq!(requests[0].after.as_ref().unwrap().sort_at, at(30));
+ assert!(requests[0].only.is_none());
+}
+
+#[tokio::test]
+async fn recompute_upserts_present_items_and_removes_missing_ones() {
+ let service = service(
+ vec![candidate(
+ "doc",
+ entity(EntityType::Document, DOC),
+ None,
+ Some(9),
+ )],
+ Vec::new(),
+ );
+ let changes = service
+ .recompute(
+ viewer(),
+ query().scope,
+ vec![
+ key(entity(EntityType::Document, DOC)),
+ key(entity(EntityType::Document, OTHER_DOC)),
+ key(entity(EntityType::Document, DOC)),
+ ],
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(changes.len(), 2);
+ assert!(matches!(&changes[0], WorkFeedChange::Upserted(entry) if entry.item.entity == "doc"));
+ assert!(
+ matches!(&changes[1], WorkFeedChange::Removed(removed) if *removed == key(entity(EntityType::Document, OTHER_DOC)))
+ );
+}
+
+#[tokio::test]
+async fn done_acknowledges_only_what_was_observed() {
+ let service = service(
+ vec![candidate(
+ "doc",
+ entity(EntityType::Document, DOC),
+ Some(8),
+ Some(9),
+ )],
+ vec![
+ doc_comment(1, DOC, 0xA0, 0xA0, 5),
+ // Arrived after the caller looked at the item.
+ doc_comment(2, DOC, 0xB0, 0xB0, 8),
+ ],
+ );
+ let doc = key(entity(EntityType::Document, DOC));
+
+ let outcome = service
+ .mark_done(
+ viewer(),
+ vec![WorkFeedDoneTarget {
+ key: doc.clone(),
+ revision: Some(WorkFeedRevision {
+ attention_through: Some(at(6)),
+ }),
+ }],
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(outcome.items, vec![doc.clone()]);
+ assert_eq!(outcome.receipt.notification_ids, vec![uuid(1)]);
+ assert_eq!(
+ service.notifications.state_of(uuid(1)),
+ NotificationState::Done
+ );
+ assert_eq!(
+ service.notifications.state_of(uuid(2)),
+ NotificationState::Unseen
+ );
+ assert!(outcome.receipt.archived_threads.is_empty());
+ // Every session of the viewer is told the item changed.
+ assert_eq!(
+ *service.signals.calls.lock().unwrap(),
+ vec![vec![doc.entity().clone()]]
+ );
+}
+
+#[tokio::test]
+async fn done_without_a_revision_completes_everything_current() {
+ let inbox = MailFacts {
+ inbox_visible: true,
+ is_read: true,
+ };
+ let sent = MailFacts {
+ inbox_visible: false,
+ is_read: true,
+ };
+ let service = service(
+ vec![
+ mail_candidate("mail", MAIL, Some(4), None, inbox),
+ mail_candidate("sent", SENT_MAIL, None, Some(3), sent),
+ ],
+ vec![new_email(1, MAIL, 4, NotificationState::Unseen)],
+ );
+
+ let outcome = service
+ .mark_done(
+ viewer(),
+ vec![
+ WorkFeedDoneTarget {
+ key: key(entity(EntityType::EmailThread, MAIL)),
+ revision: None,
+ },
+ WorkFeedDoneTarget {
+ key: key(entity(EntityType::EmailThread, SENT_MAIL)),
+ revision: None,
+ },
+ ],
+ )
+ .await
+ .unwrap();
+
+ assert_eq!(outcome.receipt.notification_ids, vec![uuid(1)]);
+ // Only the inbox thread is archived; the sent thread is own work, which
+ // done leaves alone.
+ assert_eq!(
+ *service.mail.calls.lock().unwrap(),
+ vec![(uuid(MAIL), true)]
+ );
+ assert_eq!(outcome.receipt.archived_threads, vec![uuid(MAIL)]);
+}
+
+#[tokio::test]
+async fn done_leaves_own_work_alone() {
+ let service = service(
+ vec![candidate(
+ "doc",
+ entity(EntityType::Document, DOC),
+ None,
+ Some(9),
+ )],
+ Vec::new(),
+ );
+ let doc = key(entity(EntityType::Document, DOC));
+ let outcome = service
+ .mark_done(
+ viewer(),
+ vec![WorkFeedDoneTarget {
+ key: doc.clone(),
+ revision: None,
+ }],
+ )
+ .await
+ .unwrap();
+
+ // Nothing to acknowledge: the item keeps its own-work reason.
+ assert_eq!(outcome.items, vec![doc]);
+ assert!(outcome.receipt.notification_ids.is_empty());
+ assert!(service.notifications.done_calls.lock().unwrap().is_empty());
+ assert!(service.mail.calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn done_on_an_item_already_gone_changes_nothing() {
+ let service = service(Vec::new(), Vec::new());
+ let gone = key(entity(EntityType::Document, DOC));
+ let outcome = service
+ .mark_done(
+ viewer(),
+ vec![WorkFeedDoneTarget {
+ key: gone.clone(),
+ revision: None,
+ }],
+ )
+ .await
+ .unwrap();
+ assert_eq!(outcome.items, vec![gone]);
+ assert_eq!(outcome.receipt.notification_ids, Vec::<Uuid>::new());
+ assert!(service.notifications.done_calls.lock().unwrap().is_empty());
+}
+
+#[tokio::test]
+async fn undo_reverses_exactly_one_done() {
+ let inbox = MailFacts {
+ inbox_visible: true,
+ is_read: true,
+ };
+ let service = service(
+ vec![
+ candidate("doc", entity(EntityType::Document, DOC), Some(5), Some(9)),
+ mail_candidate("mail", MAIL, Some(4), None, inbox),
+ ],
+ vec![
+ doc_comment(1, DOC, 0xA0, 0xA0, 5),
+ new_email(2, MAIL, 4, NotificationState::Unseen),
+ ],
+ );
+ let doc = key(entity(EntityType::Document, DOC));
+ let mail = key(entity(EntityType::EmailThread, MAIL));
+ let outcome = service
+ .mark_done(
+ viewer(),
+ vec![
+ WorkFeedDoneTarget {
+ key: doc.clone(),
+ revision: None,
+ },
+ WorkFeedDoneTarget {
+ key: mail.clone(),
+ revision: None,
+ },
+ ],
+ )
+ .await
+ .unwrap();
+
+ let receipt = WorkFeedDoneReceipt::decode(&outcome.receipt.encode()).unwrap();
+ let changes = service
+ .undo_done(viewer(), query().scope, receipt)
+ .await
+ .unwrap();
+
+ // Undone notifications come back seen.
+ assert_eq!(
+ service.notifications.state_of(uuid(1)),
+ NotificationState::Seen
+ );
+ assert_eq!(
+ service.notifications.state_of(uuid(2)),
+ NotificationState::Seen
+ );
+ assert_eq!(
+ *service.mail.calls.lock().unwrap(),
+ vec![(uuid(MAIL), true), (uuid(MAIL), false)]
+ );
+ assert_eq!(changes.len(), 2);
+ assert!(
+ changes
+ .iter()
+ .all(|change| matches!(change, WorkFeedChange::Upserted(_)))
+ );
+}
diff --git a/crates/work_feed/src/domain/stacking.rs b/crates/work_feed/src/domain/stacking.rs
new file mode 100644
index 0000000000..9f370c6512
--- /dev/null
+++ b/crates/work_feed/src/domain/stacking.rs
@@ -0,0 +1,446 @@
+//! Item scoping and notification stacking.
+//!
+//! Scoping decides which of a candidate's notifications belong to its item.
+//! A channel's notifications split between the channel item and one item per
+//! thread: mentions, reactions, replies and document mentions belong to the
+//! thread rooted at the message they name, matching how notifications are
+//! keyed for the feed; a root message joins its thread once the thread has
+//! replies or thread mentions. Every other item owns all of its entity's
+//! notifications.
+//!
+//! Stacking then groups an item's notifications for presentation: one stack
+//! per conversation thread, mentions shadowing the plain message they were
+//! sent in, and every other event on its own. Shadowed notifications stay in
+//! the item's scope so completing the item acknowledges them too.
+
+use std::collections::{HashMap, HashSet};
+
+use model_entity::EntityType;
+use model_notifications::NotifEvent;
+use notification::domain::models::UserNotificationRow;
+
+use super::models::{FeedNotification, WorkFeedStack, WorkFeedStackKind};
+
+#[cfg(test)]
+mod test;
+
+/// The channel thread root a channel notification is attributed to, if any:
+/// the thread for replies, and the named message's thread (or the message
+/// itself, which becomes the root) for mentions, reactions and document
+/// mentions. Plain sends and channel-level events have none.
+pub fn channel_thread_root(notification: &UserNotificationRow<NotifEvent>) -> Option<&str> {
+ if notification.entity.entity_type != EntityType::Channel {
+ return None;
+ }
+ match &notification.notification_metadata {
+ NotifEvent::ChannelMessageReply(reply) => Some(reply.thread_id.as_str()),
+ NotifEvent::ChannelMention(mention) => {
+ Some(mention.thread_id.as_deref().unwrap_or(&mention.message_id))
+ }
+ NotifEvent::ChannelMessageReaction(reaction) => Some(
+ reaction
+ .thread_id
+ .as_deref()
+ .unwrap_or(&reaction.message_id),
+ ),
+ NotifEvent::DocumentMention(mention) => Some(
+ mention
+ .channel
+ .thread_id
+ .as_deref()
+ .unwrap_or(&mention.channel.message_id),
+ ),
+ _ => None,
+ }
+}
+
+/// Threads in a channel that have replies or thread mentions; their root
+/// messages belong to the thread rather than to the channel.
+fn active_threads(notifications: &[FeedNotification]) -> HashSet<&str> {
+ notifications
+ .iter()
+ .filter_map(|notification| match &notification.notification_metadata {
+ NotifEvent::ChannelMessageReply(reply) => Some(reply.thread_id.as_str()),
+ NotifEvent::ChannelMention(mention) => mention.thread_id.as_deref(),
+ _ => None,
+ })
+ .collect()
+}
+
+/// The root message a plain channel send is about, when it is one.
+fn root_send_message(notification: &FeedNotification) -> Option<&str> {
+ match &notification.notification_metadata {
+ NotifEvent::ChannelMessageSend(send) => Some(send.message_id.as_str()),
+ _ => None,
+ }
+}
+
+/// The channel item's share of its channel's notifications.
+pub fn scope_channel(notifications: &[FeedNotification]) -> Vec<FeedNotification> {
+ let active = active_threads(notifications);
+ notifications
+ .iter()
+ .filter(|notification| {
+ channel_thread_root(notification).is_none()
+ && root_send_message(notification).is_none_or(|message| !active.contains(message))
+ })
+ .cloned()
+ .collect()
+}
+
+/// One thread item's share of its channel's notifications.
+pub fn scope_channel_thread(
+ notifications: &[FeedNotification],
+ root: &str,
+) -> Vec<FeedNotification> {
+ notifications
+ .iter()
+ .filter(|notification| {
+ channel_thread_root(notification) == Some(root)
+ || root_send_message(notification) == Some(root)
+ })
+ .cloned()
+ .collect()
+}
+
+/// Sort notifications newest first, breaking ties by id for a stable order.
+pub fn sort_newest_first(notifications: &mut [FeedNotification]) {
+ notifications.sort_by(|a, b| {
+ b.created_at
+ .cmp(&a.created_at)
+ .then_with(|| b.notification_id.cmp(&a.notification_id))
+ });
+}
+
+/// A message-shaped notification's role in its conversation.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+enum Role {
+ /// A new root message or comment.
+ Send,
+ /// A reply in a thread.
+ Reply,
+ /// A mention.
+ Mention,
+}
+
+/// A channel message or document comment notification, normalized.
+#[derive(Debug, Clone)]
+struct View {
+ notification: FeedNotification,
+ role: Role,
+ message_id: String,
+ thread_id: Option<String>,
+}
+
+fn channel_view(notification: &FeedNotification) -> Option<View> {
+ let (role, message_id, thread_id) = match &notification.notification_metadata {
+ NotifEvent::ChannelMessageSend(send) => (Role::Send, send.message_id.clone(), None),
+ NotifEvent::ChannelMessageReply(reply) => (
+ Role::Reply,
+ reply.message_id.clone(),
+ Some(reply.thread_id.clone()),
+ ),
+ NotifEvent::ChannelMention(mention) => (
+ Role::Mention,
+ mention.message_id.clone(),
+ mention.thread_id.clone(),
+ ),
+ _ => return None,
+ };
+ Some(View {
+ notification: notification.clone(),
+ role,
+ message_id,
+ thread_id,
+ })
+}
+
+fn comment_view(notification: &FeedNotification) -> Option<View> {
+ let (role, message_id, thread_id) = match &notification.notification_metadata {
+ // A root comment shares its thread's id; owner notifications for
+ // replies use the generic comment event.
+ NotifEvent::CommentedOnDocument(comment) => {
+ let comment_id = comment.comment_id.to_string();
+ let thread_id = comment.thread_id.to_string();
+ let role = if comment_id == thread_id {
+ Role::Send
+ } else {
+ Role::Reply
+ };
+ (role, comment_id, thread_id)
+ }
+ NotifEvent::RepliedToDocumentCommentThread(reply) => (
+ Role::Reply,
+ reply.comment_id.to_string(),
+ reply.thread_id.to_string(),
+ ),
+ NotifEvent::MentionedInDocumentComment(mention) => (
+ Role::Mention,
+ mention.comment_id.to_string(),
+ mention.thread_id.to_string(),
+ ),
+ _ => return None,
+ };
+ Some(View {
+ notification: notification.clone(),
+ role,
+ message_id,
+ thread_id: Some(thread_id),
+ })
+}
+
+/// The discussion thread a project, company or contact notification is in.
+fn discussion_thread(notification: &FeedNotification) -> Option<String> {
+ match &notification.notification_metadata {
+ NotifEvent::InitiativeDiscussion(discussion) => Some(format!(
+ "initiative_discussion:{}:{}",
+ notification.entity.entity_id, discussion.thread_id
+ )),
+ NotifEvent::CrmDiscussion(discussion) => Some(format!(
+ "crm_discussion:{}:{}",
+ notification.entity.entity_id, discussion.thread_id
+ )),
+ _ => None,
+ }
+}
+
+fn is_channel_event(notification: &FeedNotification) -> bool {
+ matches!(
+ notification.notification_metadata,
+ NotifEvent::ChannelMention(_)
+ | NotifEvent::ChannelMessageSend(_)
+ | NotifEvent::ChannelMessageReaction(_)
+ | NotifEvent::ChannelMessageReply(_)
+ | NotifEvent::DocumentMention(_)
+ )
+}
+
+fn is_comment_event(notification: &FeedNotification) -> bool {
+ matches!(
+ notification.notification_metadata,
+ NotifEvent::CommentedOnDocument(_)
+ | NotifEvent::RepliedToDocumentCommentThread(_)
+ | NotifEvent::MentionedInDocumentComment(_)
+ )
+}
+
+fn make_stack(
+ kind: WorkFeedStackKind,
+ thread_id: Option<String>,
+ mut notifications: Vec<FeedNotification>,
+) -> Option<WorkFeedStack> {
+ if notifications.is_empty() {
+ return None;
+ }
+ sort_newest_first(&mut notifications);
+ Some(WorkFeedStack {
+ kind,
+ thread_id,
+ notifications,
+ })
+}
+
+/// Group values by key, keeping first-seen key order so output is stable.
+fn group_by<T>(items: impl IntoIterator<Item = (String, T)>) -> Vec<(String, Vec<T>)> {
+ let mut order = Vec::new();
+ let mut groups: HashMap<String, Vec<T>> = HashMap::new();
+ for (key, item) in items {
+ groups
+ .entry(key.clone())
+ .or_insert_with(|| {
+ order.push(key);
+ Vec::new()
+ })
+ .push(item);
+ }
+ order
+ .into_iter()
+ .map(|key| {
+ let items = groups.remove(&key).expect("every ordered key has a group");
+ (key, items)
+ })
+ .collect()
+}
+
+/// Channel stacks: root mentions without a thread stand alone, new root
+/// messages share one stack, and each thread gathers its replies, thread
+/// mentions and absorbed root. A mention shadows the send or reply for the
+/// same message.
+fn stack_channel_views(views: Vec<View>) -> Vec<WorkFeedStack> {
+ let mentioned: HashSet<String> = views
+ .iter()
+ .filter(|view| view.role == Role::Mention)
+ .map(|view| view.message_id.clone())
+ .collect();
+ let active: HashSet<String> = views
+ .iter()
+ .filter_map(|view| match view.role {
+ Role::Reply => view.thread_id.clone(),
+ Role::Mention => view.thread_id.clone(),
+ Role::Send => None,
+ })
+ .collect();
+
+ let mut orphan_mentions = Vec::new();
+ let mut new_sends = Vec::new();
+ let mut threaded = Vec::new();
+ for view in views {
+ let shadowed = view.role != Role::Mention && mentioned.contains(&view.message_id);
+ if shadowed {
+ continue;
+ }
+ match (view.role, view.thread_id.as_deref()) {
+ (Role::Reply, Some(thread)) => threaded.push((thread.to_string(), view.notification)),
+ (Role::Reply, None) => {}
+ (Role::Mention, Some(thread)) => threaded.push((thread.to_string(), view.notification)),
+ (Role::Mention, None) if active.contains(&view.message_id) => {
+ threaded.push((view.message_id, view.notification))
+ }
+ (Role::Mention, None) => orphan_mentions.push(view),
+ (Role::Send, _) if active.contains(&view.message_id) => {
+ threaded.push((view.message_id, view.notification))
+ }
+ (Role::Send, _) => new_sends.push(view.notification),
+ }
+ }
+
+ let mut stacks: Vec<WorkFeedStack> = orphan_mentions
+ .into_iter()
+ .filter_map(|view| {
+ make_stack(
+ WorkFeedStackKind::ChannelMention,
+ Some(view.message_id),
+ vec![view.notification],
+ )
+ })
+ .collect();
+ stacks.extend(make_stack(
+ WorkFeedStackKind::ChannelMessages,
+ None,
+ new_sends,
+ ));
+ stacks.extend(
+ group_by(threaded)
+ .into_iter()
+ .filter(|(thread, _)| !thread.is_empty())
+ .filter_map(|(thread, notifications)| {
+ make_stack(
+ WorkFeedStackKind::ChannelThread,
+ Some(thread),
+ notifications,
+ )
+ }),
+ );
+ stacks
+}
+
+/// Document comment stacks: a thread with several events or any reply is one
+/// stack, a lone mention stands alone, and lone root comments share a stack.
+/// A mention shadows the comment it was made in.
+fn stack_comment_views(views: Vec<View>) -> Vec<WorkFeedStack> {
+ let mentioned: HashSet<String> = views
+ .iter()
+ .filter(|view| view.role == Role::Mention)
+ .map(|view| view.message_id.clone())
+ .collect();
+ let visible = views
+ .into_iter()
+ .filter(|view| view.role == Role::Mention || !mentioned.contains(&view.message_id))
+ .map(|view| (view.thread_id.clone().unwrap_or_default(), view));
+
+ let mut stacks = Vec::new();
+ let mut standalone_sends = Vec::new();
+ for (thread, group) in group_by(visible) {
+ if thread.is_empty() {
+ continue;
+ }
+ let is_thread = group.len() >= 2 || group.iter().any(|view| view.role == Role::Reply);
+ if is_thread {
+ stacks.extend(make_stack(
+ WorkFeedStackKind::CommentThread,
+ Some(thread),
+ group.into_iter().map(|view| view.notification).collect(),
+ ));
+ continue;
+ }
+ let view = group.into_iter().next().expect("groups are non-empty");
+ match view.role {
+ Role::Send => standalone_sends.push(view.notification),
+ Role::Mention => stacks.extend(make_stack(
+ WorkFeedStackKind::CommentMention,
+ Some(thread),
+ vec![view.notification],
+ )),
+ Role::Reply => {}
+ }
+ }
+ stacks.extend(make_stack(
+ WorkFeedStackKind::Comments,
+ None,
+ standalone_sends,
+ ));
+ stacks
+}
+
+/// Group an item's notifications into stacks, newest stack first.
+pub fn stack(notifications: &[FeedNotification]) -> Vec<WorkFeedStack> {
+ let mut stacks = Vec::new();
+
+ let reactions: Vec<FeedNotification> = notifications
+ .iter()
+ .filter(|n| {
+ matches!(
+ n.notification_metadata,
+ NotifEvent::ChannelMessageReaction(_)
+ )
+ })
+ .cloned()
+ .collect();
+ let channel_views: Vec<View> = notifications.iter().filter_map(channel_view).collect();
+ let comment_views: Vec<View> = notifications.iter().filter_map(comment_view).collect();
+ let document_mentions: Vec<FeedNotification> = notifications
+ .iter()
+ .filter(|n| matches!(n.notification_metadata, NotifEvent::DocumentMention(_)))
+ .cloned()
+ .collect();
+ let discussions = notifications
+ .iter()
+ .filter_map(|n| discussion_thread(n).map(|thread| (thread, n.clone())));
+
+ for (_, group) in group_by(discussions) {
+ let thread_id = group.first().and_then(|n| match &n.notification_metadata {
+ NotifEvent::InitiativeDiscussion(d) => Some(d.thread_id.to_string()),
+ NotifEvent::CrmDiscussion(d) => Some(d.thread_id.to_string()),
+ _ => None,
+ });
+ stacks.extend(make_stack(WorkFeedStackKind::Discussion, thread_id, group));
+ }
+ stacks.extend(stack_channel_views(channel_views));
+ stacks.extend(make_stack(
+ WorkFeedStackKind::ChannelReactions,
+ None,
+ reactions,
+ ));
+ stacks.extend(stack_comment_views(comment_views));
+ stacks.extend(make_stack(
+ WorkFeedStackKind::DocumentMentions,
+ None,
+ document_mentions,
+ ));
+ stacks.extend(
+ notifications
+ .iter()
+ .filter(|n| {
+ !is_channel_event(n) && !is_comment_event(n) && discussion_thread(n).is_none()
+ })
+ .filter_map(|n| make_stack(WorkFeedStackKind::Event, None, vec![n.clone()])),
+ );
+
+ stacks.sort_by(|a, b| {
+ let (a, b) = (a.latest(), b.latest());
+ b.created_at
+ .cmp(&a.created_at)
+ .then_with(|| b.notification_id.cmp(&a.notification_id))
+ });
+ stacks
+}
diff --git a/crates/work_feed/src/domain/stacking/test.rs b/crates/work_feed/src/domain/stacking/test.rs
new file mode 100644
index 0000000000..d0f1b1ff4e
--- /dev/null
+++ b/crates/work_feed/src/domain/stacking/test.rs
@@ -0,0 +1,157 @@
+use super::*;
+use crate::domain::test_support::*;
+use notification::domain::models::NotificationState;
+
+const CHANNEL: u128 = 0xC0;
+const THREAD: u128 = 0x7A;
+const OTHER_THREAD: u128 = 0x7B;
+const DOC: u128 = 0xD0;
+
+fn kinds(stacks: &[WorkFeedStack]) -> Vec<WorkFeedStackKind> {
+ stacks.iter().map(|stack| stack.kind).collect()
+}
+
+#[test]
+fn thread_activity_leaves_the_channel_item() {
+ let notifications = vec![
+ channel_send(1, CHANNEL, THREAD, 1),
+ channel_reply(2, CHANNEL, THREAD, 0x101, 2),
+ channel_mention(3, CHANNEL, 0x102, Some(OTHER_THREAD), 3),
+ channel_reaction(4, CHANNEL, 0x103, None, 4),
+ channel_send(5, CHANNEL, 0x104, 5),
+ channel_invite(6, CHANNEL, 6),
+ ];
+
+ // The channel keeps its plain new message and its channel-level invite;
+ // the thread's root send moved into the now-active thread.
+ assert_eq!(ids(&scope_channel(&notifications)), vec![uuid(5), uuid(6)]);
+ assert_eq!(
+ ids(&scope_channel_thread(
+ &notifications,
+ &uuid(THREAD).to_string()
+ )),
+ vec![uuid(1), uuid(2)]
+ );
+ assert_eq!(
+ ids(&scope_channel_thread(
+ &notifications,
+ &uuid(OTHER_THREAD).to_string()
+ )),
+ vec![uuid(3)]
+ );
+ // A reaction to a root message belongs to that message's thread item.
+ assert_eq!(
+ ids(&scope_channel_thread(
+ &notifications,
+ &uuid(0x103).to_string()
+ )),
+ vec![uuid(4)]
+ );
+}
+
+#[test]
+fn a_root_mention_owns_its_future_thread() {
+ let mention = channel_mention(1, CHANNEL, THREAD, None, 1);
+ let reply = channel_reply(2, CHANNEL, THREAD, 0x101, 2);
+
+ assert!(scope_channel(std::slice::from_ref(&mention)).is_empty());
+ let alone = scope_channel_thread(std::slice::from_ref(&mention), &uuid(THREAD).to_string());
+ assert_eq!(
+ kinds(&stack(&alone)),
+ vec![WorkFeedStackKind::ChannelMention]
+ );
+
+ // Its first reply joins the same item and turns it into a thread stack.
+ let both = scope_channel_thread(&[mention, reply], &uuid(THREAD).to_string());
+ let stacks = stack(&both);
+ assert_eq!(kinds(&stacks), vec![WorkFeedStackKind::ChannelThread]);
+ assert_eq!(stacks[0].thread_id, Some(uuid(THREAD).to_string()));
+ assert_eq!(ids(&stacks[0].notifications), vec![uuid(2), uuid(1)]);
+}
+
+#[test]
+fn a_mention_shadows_the_message_it_was_sent_in() {
+ let notifications = vec![
+ channel_send(1, CHANNEL, 0x100, 1),
+ channel_mention(2, CHANNEL, 0x100, None, 1),
+ ];
+ let stacks = stack(&notifications);
+ assert_eq!(kinds(&stacks), vec![WorkFeedStackKind::ChannelMention]);
+ assert_eq!(ids(&stacks[0].notifications), vec![uuid(2)]);
+}
+
+#[test]
+fn channel_stacks_group_sends_threads_and_reactions() {
+ let notifications = vec![
+ channel_send(1, CHANNEL, 0x100, 1),
+ channel_send(2, CHANNEL, 0x101, 3),
+ channel_reply(3, CHANNEL, THREAD, 0x102, 2),
+ channel_mention(4, CHANNEL, 0x103, Some(THREAD), 4),
+ channel_reaction(5, CHANNEL, 0x104, None, 5),
+ channel_reaction(6, CHANNEL, 0x105, None, 0),
+ ];
+ let stacks = stack(&notifications);
+
+ // Newest stack first: reactions (T5), the thread (T4), new sends (T3).
+ assert_eq!(
+ kinds(&stacks),
+ vec![
+ WorkFeedStackKind::ChannelReactions,
+ WorkFeedStackKind::ChannelThread,
+ WorkFeedStackKind::ChannelMessages,
+ ]
+ );
+ assert_eq!(ids(&stacks[0].notifications), vec![uuid(5), uuid(6)]);
+ assert_eq!(ids(&stacks[1].notifications), vec![uuid(4), uuid(3)]);
+ assert_eq!(ids(&stacks[2].notifications), vec![uuid(2), uuid(1)]);
+}
+
+#[test]
+fn document_comments_stack_by_thread() {
+ let notifications = vec![
+ // Thread A: a root comment and a reply -> one thread stack.
+ doc_comment(1, DOC, 0xA0, 0xA0, 1),
+ doc_reply(2, DOC, 0xA1, 0xA0, 2),
+ // Thread B: a lone root comment; thread C: another.
+ doc_comment(3, DOC, 0xB0, 0xB0, 3),
+ doc_comment(4, DOC, 0xC0, 0xC0, 4),
+ // Thread D: a mention shadows the comment it was made in.
+ doc_comment(5, DOC, 0xD1, 0xD0, 5),
+ doc_comment_mention(6, DOC, 0xD1, 0xD0, 6),
+ ];
+ let stacks = stack(&notifications);
+
+ assert_eq!(
+ kinds(&stacks),
+ vec![
+ WorkFeedStackKind::CommentMention,
+ WorkFeedStackKind::Comments,
+ WorkFeedStackKind::CommentThread,
+ ]
+ );
+ assert_eq!(ids(&stacks[0].notifications), vec![uuid(6)]);
+ assert_eq!(ids(&stacks[1].notifications), vec![uuid(4), uuid(3)]);
+ assert_eq!(ids(&stacks[2].notifications), vec![uuid(2), uuid(1)]);
+ assert_eq!(stacks[2].thread_id, Some(uuid(0xA0).to_string()));
+}
+
+#[test]
+fn other_events_stand_alone_newest_first() {
+ let document = entity(EntityType::Document, DOC);
+ let notifications = vec![reminder(1, document.clone(), 1), reminder(2, document, 3)];
+ let stacks = stack(&notifications);
+ assert_eq!(
+ kinds(&stacks),
+ vec![WorkFeedStackKind::Event, WorkFeedStackKind::Event]
+ );
+ assert_eq!(stacks[0].latest().notification_id, uuid(2));
+}
+
+#[test]
+fn stack_unseen_follows_its_notifications() {
+ let seen = with_state(&channel_send(1, CHANNEL, 0x100, 1), NotificationState::Seen);
+ let unseen_invite = channel_invite(2, CHANNEL, 2);
+ let stacks = stack(&[seen, unseen_invite]);
+ // Seen messages and invites (never unread) leave every stack seen.
+ assert!(stacks.iter().all(|stack| !stack.is_unseen()));
+}
diff --git a/crates/work_feed/src/domain/test_support.rs b/crates/work_feed/src/domain/test_support.rs
new file mode 100644
index 0000000000..bbd0c91433
--- /dev/null
+++ b/crates/work_feed/src/domain/test_support.rs
@@ -0,0 +1,248 @@
+//! Notification fixtures shared by the domain tests.
+
+use std::sync::Arc;
+
+use chrono::{DateTime, TimeZone, Utc};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::{Entity, EntityType};
+use model_notifications::NotifEvent;
+use notification::domain::models::{NotificationState, UserNotificationRow};
+use serde_json::{Value, json};
+use uuid::Uuid;
+
+use super::models::FeedNotification;
+
+pub(crate) const USER: &str = "macro|[email protected]";
+
+/// A minute past 10:00 on 2024-06-01, UTC.
+pub(crate) fn at(minute: u32) -> DateTime<Utc> {
+ Utc.with_ymd_and_hms(2024, 6, 1, 10, minute, 0).unwrap()
+}
+
+pub(crate) fn viewer_id() -> MacroUserIdStr<'static> {
+ MacroUserIdStr::parse_from_str(USER).unwrap()
+}
+
+pub(crate) fn uuid(n: u128) -> Uuid {
+ Uuid::from_u128(n)
+}
+
+pub(crate) fn entity(entity_type: EntityType, id: u128) -> Entity<'static> {
+ entity_type.with_entity_string(uuid(id).to_string())
+}
+
+/// A notification with typed metadata decoded from `tag`/`content`, the way
+/// stored rows are.
+pub(crate) fn notification(
+ id: u128,
+ entity: Entity<'static>,
+ tag: &str,
+ content: Value,
+ minute: u32,
+ state: NotificationState,
+) -> FeedNotification {
+ let metadata: NotifEvent = serde_json::from_value(json!({ "tag": tag, "content": content }))
+ .unwrap_or_else(|error| panic!("invalid {tag} fixture: {error}"));
+ Arc::new(UserNotificationRow {
+ owner_id: viewer_id(),
+ notification_id: uuid(id),
+ notification_event_type: tag.to_string(),
+ entity,
+ sent: true,
+ state,
+ created_at: at(minute),
+ viewed_at: None,
+ updated_at: at(minute),
+ deleted_at: None,
+ notification_metadata: metadata,
+ sender_id: None,
+ })
+}
+
+pub(crate) fn channel_send(
+ id: u128,
+ channel: u128,
+ message: u128,
+ minute: u32,
+) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::Channel, channel),
+ "channel_message_send",
+ json!({ "messageId": uuid(message), "messageContent": "hi", "channelType": "public" }),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn channel_reply(
+ id: u128,
+ channel: u128,
+ thread: u128,
+ message: u128,
+ minute: u32,
+) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::Channel, channel),
+ "channel_message_reply",
+ json!({
+ "threadId": uuid(thread),
+ "messageId": uuid(message),
+ "messageContent": "re",
+ "channelType": "public",
+ }),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn channel_mention(
+ id: u128,
+ channel: u128,
+ message: u128,
+ thread: Option<u128>,
+ minute: u32,
+) -> FeedNotification {
+ let mut content = json!({
+ "messageId": uuid(message),
+ "messageContent": "@you",
+ "channelType": "public",
+ });
+ if let Some(thread) = thread {
+ content["threadId"] = json!(uuid(thread));
+ }
+ notification(
+ id,
+ entity(EntityType::Channel, channel),
+ "channel_mention",
+ content,
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn channel_reaction(
+ id: u128,
+ channel: u128,
+ message: u128,
+ thread: Option<u128>,
+ minute: u32,
+) -> FeedNotification {
+ let mut content = json!({
+ "messageId": uuid(message),
+ "messageContent": "nice",
+ "emoji": "+1",
+ "channelType": "public",
+ });
+ if let Some(thread) = thread {
+ content["threadId"] = json!(uuid(thread));
+ }
+ notification(
+ id,
+ entity(EntityType::Channel, channel),
+ "channel_message_reaction",
+ content,
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn channel_invite(id: u128, channel: u128, minute: u32) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::Channel, channel),
+ "channel_invite",
+ json!({ "invitedBy": USER, "channelType": "public" }),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+fn comment_content(comment: u128, thread: u128) -> Value {
+ json!({
+ "documentName": "Doc",
+ "owner": USER,
+ "commentId": uuid(comment),
+ "threadId": uuid(thread),
+ "text": "comment",
+ })
+}
+
+pub(crate) fn doc_comment(
+ id: u128,
+ document: u128,
+ comment: u128,
+ thread: u128,
+ minute: u32,
+) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::Document, document),
+ "commented_on_document",
+ comment_content(comment, thread),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn doc_reply(
+ id: u128,
+ document: u128,
+ comment: u128,
+ thread: u128,
+ minute: u32,
+) -> FeedNotification {
+ notification(
+ id,
+ entity(EntityType::Document, document),
+ "replied_to_document_comment_thread",
+ comment_content(comment, thread),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn doc_comment_mention(
+ id: u128,
+ document: u128,
+ comment: u128,
+ thread: u128,
+ minute: u32,
+) -> FeedNotification {
+ let mut content = comment_content(comment, thread);
+ content["mentionId"] = json!("mention");
+ notification(
+ id,
+ entity(EntityType::Document, document),
+ "mentioned_in_document_comment",
+ content,
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+pub(crate) fn reminder(id: u128, entity: Entity<'static>, minute: u32) -> FeedNotification {
+ notification(
+ id,
+ entity,
+ "reminder",
+ json!({ "reminderId": uuid(id), "description": "follow up" }),
+ minute,
+ NotificationState::Unseen,
+ )
+}
+
+/// The same notification in another state.
+pub(crate) fn with_state(
+ notification: &FeedNotification,
+ state: NotificationState,
+) -> FeedNotification {
+ let mut row = (**notification).clone();
+ row.state = state;
+ Arc::new(row)
+}
+
+pub(crate) fn ids(notifications: &[FeedNotification]) -> Vec<Uuid> {
+ notifications.iter().map(|n| n.notification_id).collect()
+}
diff --git a/crates/work_feed/src/lib.rs b/crates/work_feed/src/lib.rs
new file mode 100644
index 0000000000..9351b9945e
--- /dev/null
+++ b/crates/work_feed/src/lib.rs
@@ -0,0 +1,16 @@
+#![deny(missing_docs)]
+//! The work feed: Home's combined list of things that need the viewer's
+//! attention and work they recently did, served as one paginated, stacked,
+//! live-updating feed.
+//!
+//! # Architecture
+//!
+//! - **domain**: item identity, membership policy, notification stacking,
+//! seen/done state, and the page, recompute, done and undo use cases.
+//! - **outbound**: adapters over the Soup, notification, email, activity and
+//! realtime services that own the underlying data.
+
+pub mod domain;
+
+#[cfg(feature = "outbound")]
+pub mod outbound;
diff --git a/crates/work_feed/src/outbound.rs b/crates/work_feed/src/outbound.rs
new file mode 100644
index 0000000000..f4173e02f7
--- /dev/null
+++ b/crates/work_feed/src/outbound.rs
@@ -0,0 +1,7 @@
+//! Adapters implementing the work feed's ports.
+
+pub mod mail;
+pub mod notifications;
+pub mod signals;
+pub mod source;
+pub mod triggers;
diff --git a/crates/work_feed/src/outbound/mail.rs b/crates/work_feed/src/outbound/mail.rs
new file mode 100644
index 0000000000..d1b32c430a
--- /dev/null
+++ b/crates/work_feed/src/outbound/mail.rs
@@ -0,0 +1,39 @@
+//! Email archive through the email domain service.
+
+use std::sync::Arc;
+
+use email::domain::ports::EmailService;
+use macro_user_id::user_id::MacroUserIdStr;
+use rootcause::Report;
+use uuid::Uuid;
+
+use crate::domain::ports::WorkFeedMail;
+
+/// Archives threads through [`EmailService`].
+pub struct EmailWorkFeedMail<E> {
+ email: Arc<E>,
+}
+
+impl<E> EmailWorkFeedMail<E> {
+ /// Create the adapter over the email service.
+ pub fn new(email: Arc<E>) -> Self {
+ Self { email }
+ }
+}
+
+impl<E> WorkFeedMail for EmailWorkFeedMail<E>
+where
+ E: EmailService,
+{
+ async fn set_archived(
+ &self,
+ user: MacroUserIdStr<'static>,
+ thread_id: Uuid,
+ archived: bool,
+ ) -> Result<(), Report> {
+ self.email
+ .set_thread_archived(user, thread_id, archived)
+ .await
+ .map_err(|error| rootcause::report!("failed to set thread archive state: {error}"))
+ }
+}
diff --git a/crates/work_feed/src/outbound/notifications.rs b/crates/work_feed/src/outbound/notifications.rs
new file mode 100644
index 0000000000..25b8c2b4b3
--- /dev/null
+++ b/crates/work_feed/src/outbound/notifications.rs
@@ -0,0 +1,73 @@
+//! Notifications through the notification domain's reader service.
+
+use std::{collections::HashMap, sync::Arc};
+
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::Entity;
+use model_notifications::NotifEvent;
+use notification::domain::{
+ models::{
+ entity_query::EntityNotificationQuery,
+ request::{NotificationStatus, UpdateNotificationsRequest},
+ },
+ service::NotificationReader,
+};
+use rootcause::Report;
+use uuid::Uuid;
+
+use crate::domain::{models::FeedNotification, ports::WorkFeedNotifications};
+
+/// Reads and acknowledges notifications through [`NotificationReader`].
+pub struct ReaderWorkFeedNotifications<R> {
+ reader: Arc<R>,
+}
+
+impl<R> ReaderWorkFeedNotifications<R> {
+ /// Create the adapter over a notification reader.
+ pub fn new(reader: Arc<R>) -> Self {
+ Self { reader }
+ }
+}
+
+impl<R> WorkFeedNotifications for ReaderWorkFeedNotifications<R>
+where
+ R: NotificationReader,
+{
+ async fn active(
+ &self,
+ user: MacroUserIdStr<'static>,
+ entities: Vec<Entity<'static>>,
+ ) -> Result<HashMap<Entity<'static>, Vec<FeedNotification>>, Report> {
+ // The default query is the active (unseen and seen) edge, unlimited.
+ Ok(self
+ .reader
+ .get_entity_notifications_batch::<NotifEvent>(
+ user,
+ entities,
+ EntityNotificationQuery::default(),
+ )
+ .await?
+ .into_iter()
+ .map(|(entity, rows)| (entity, rows.into_iter().map(Arc::new).collect()))
+ .collect())
+ }
+
+ async fn set_done(
+ &self,
+ user: MacroUserIdStr<'static>,
+ notification_ids: Vec<Uuid>,
+ done: bool,
+ ) -> Result<Vec<Uuid>, Report> {
+ Ok(self
+ .reader
+ .update_notifications_and_return::<serde_json::Value>(UpdateNotificationsRequest {
+ user_id: user,
+ notification_ids: &notification_ids,
+ status: NotificationStatus::Done(done),
+ })
+ .await?
+ .into_iter()
+ .map(|row| row.notification_id)
+ .collect())
+ }
+}
diff --git a/crates/work_feed/src/outbound/signals.rs b/crates/work_feed/src/outbound/signals.rs
new file mode 100644
index 0000000000..e97c1c159a
--- /dev/null
+++ b/crates/work_feed/src/outbound/signals.rs
@@ -0,0 +1,37 @@
+//! Cross-session change signals over the user-addressed Soup realtime topic.
+
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::Entity;
+use soup_realtime::domain::{
+ models::{Patch, SoupRealtimeMessage},
+ ports::SoupRealtimePublisher,
+};
+
+use crate::domain::ports::WorkFeedSignals;
+
+/// Publishes an entity patch addressed to the viewer alone, which every
+/// one of their sessions' work feed subscriptions recomputes from.
+pub struct SoupRealtimeWorkFeedSignals<P> {
+ publisher: P,
+}
+
+impl<P> SoupRealtimeWorkFeedSignals<P> {
+ /// Create the adapter over a Soup realtime publisher.
+ pub fn new(publisher: P) -> Self {
+ Self { publisher }
+ }
+}
+
+impl<P> WorkFeedSignals for SoupRealtimeWorkFeedSignals<P>
+where
+ P: SoupRealtimePublisher,
+{
+ async fn items_changed(&self, user: MacroUserIdStr<'static>, entities: Vec<Entity<'static>>) {
+ for entity in entities {
+ let message = SoupRealtimeMessage::new(user.clone(), Patch::Updated(entity));
+ if let Err(error) = self.publisher.publish(message).await {
+ tracing::warn!(error = ?error, "failed to publish work feed change");
+ }
+ }
+ }
+}
diff --git a/crates/work_feed/src/outbound/source.rs b/crates/work_feed/src/outbound/source.rs
new file mode 100644
index 0000000000..badc71b009
--- /dev/null
+++ b/crates/work_feed/src/outbound/source.rs
@@ -0,0 +1,112 @@
+//! Feed candidates from the Soup service.
+
+use std::sync::Arc;
+
+use cowlike::CowLike;
+use email::domain::ports::EmailService;
+use models_soup::item::SoupItem;
+use rootcause::Report;
+use soup::domain::{
+ models::{
+ SoupProjectionHydration, WorkFeedPagePosition, WorkFeedSoupMode, WorkFeedSoupRequest,
+ },
+ ports::SoupService,
+};
+
+use crate::domain::{
+ models::{WorkFeedMode, WorkFeedPosition},
+ ports::{EntityFacts, MailFacts, SourceItem, SourcePage, SourceRequest, WorkFeedSource},
+};
+
+/// Candidates from Soup's work feed query, hydrated as Soup items.
+pub struct SoupWorkFeedSource<S, E> {
+ soup: S,
+ email: Arc<E>,
+}
+
+impl<S, E> SoupWorkFeedSource<S, E> {
+ /// Create a source over the Soup service; the email service resolves the
+ /// viewer's readable inboxes.
+ pub fn new(soup: S, email: Arc<E>) -> Self {
+ Self { soup, email }
+ }
+}
+
+/// The facts scoping and state need from a hydrated Soup item.
+fn facts(item: &SoupItem<()>) -> EntityFacts {
+ match item {
+ SoupItem::ChannelThread(thread) => EntityFacts {
+ thread_channel: Some(thread.channel_id),
+ mail: None,
+ },
+ SoupItem::EmailThread(thread) => EntityFacts {
+ thread_channel: None,
+ mail: Some(MailFacts {
+ inbox_visible: thread.thread.inbox_visible,
+ is_read: thread.thread.is_read,
+ }),
+ },
+ _ => EntityFacts::default(),
+ }
+}
+
+impl<S, E> WorkFeedSource for SoupWorkFeedSource<S, E>
+where
+ S: SoupService,
+ E: EmailService,
+{
+ type Entity = SoupProjectionHydration;
+
+ async fn page(&self, request: SourceRequest) -> Result<SourcePage<Self::Entity>, Report> {
+ let link_ids = self
+ .email
+ .get_inboxes_for_macro_id(request.viewer.user.copied())
+ .await
+ .map_err(|error| rootcause::report!("failed to list inboxes: {error}"))?
+ .into_iter()
+ .map(|link| link.id)
+ .collect();
+ let page = self
+ .soup
+ .get_work_feed_page(
+ WorkFeedSoupRequest {
+ user: request.viewer.user.clone(),
+ link_ids,
+ limit: request.limit,
+ mode: match request.mode {
+ WorkFeedMode::Work => WorkFeedSoupMode::Work,
+ WorkFeedMode::Attention => WorkFeedSoupMode::Attention,
+ },
+ types: request.types,
+ filter: request.filter,
+ after: request.after.map(|after| WorkFeedPagePosition {
+ sort_at: after.sort_at,
+ entity_id: after.entity_id,
+ }),
+ only: request.only,
+ },
+ request.viewer.team,
+ )
+ .await
+ .map_err(|error| rootcause::report!("failed to load work feed candidates: {error}"))?;
+
+ Ok(SourcePage {
+ items: page
+ .items
+ .into_iter()
+ .map(|item| SourceItem {
+ key: item.hydration.item.entity(),
+ facts: facts(&item.hydration.item),
+ attention_at: item.attention_at,
+ touched_at: item.touched_at,
+ sort_at: item.sort_at,
+ entity: item.hydration,
+ })
+ .collect(),
+ next: page.next.map(|next| WorkFeedPosition {
+ sort_at: next.sort_at,
+ entity_id: next.entity_id,
+ }),
+ })
+ }
+}
diff --git a/crates/work_feed/src/outbound/triggers.rs b/crates/work_feed/src/outbound/triggers.rs
new file mode 100644
index 0000000000..c0a1b305f2
--- /dev/null
+++ b/crates/work_feed/src/outbound/triggers.rs
@@ -0,0 +1,115 @@
+//! Work feed triggers from the notification, activity and Soup realtime
+//! streams a viewer already receives.
+
+use std::sync::Arc;
+
+use activity::{Action, ActivitySubscriptionService, ActivitySubscriptionUpdate, RecordedAction};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_notifications::NotifEvent;
+use notification::domain::{
+ models::NotificationSubscriptionUpdate, ports::WebSocketNotificationSubscriptionService,
+};
+use soup_realtime::domain::{models::Patch, ports::SoupRealtimeSubscriptionService};
+use tokio::sync::mpsc;
+
+use crate::domain::{
+ models::WorkFeedTrigger, ports::WorkFeedTriggers, realtime::notification_trigger_keys,
+};
+
+/// Triggers buffered per subscriber before upstream reads wait.
+const TRIGGER_BUFFER: usize = 64;
+
+/// Merges a viewer's realtime streams into work feed triggers.
+pub struct RealtimeWorkFeedTriggers<NS, AS, R> {
+ notifications: Arc<NS>,
+ activity: Arc<AS>,
+ soup: Arc<R>,
+}
+
+impl<NS, AS, R> RealtimeWorkFeedTriggers<NS, AS, R> {
+ /// Create the adapter over the three realtime subscription services.
+ pub fn new(notifications: Arc<NS>, activity: Arc<AS>, soup: Arc<R>) -> Self {
+ Self {
+ notifications,
+ activity,
+ soup,
+ }
+ }
+}
+
+/// The trigger an activity update implies for `user`: only the viewer's own
+/// non-view actions change own work.
+fn activity_trigger(
+ user: &MacroUserIdStr<'static>,
+ update: ActivitySubscriptionUpdate,
+) -> Option<WorkFeedTrigger> {
+ match update {
+ ActivitySubscriptionUpdate::Updated(record) => {
+ let own = record.subject_id == user.as_ref();
+ let viewed = matches!(record.action, RecordedAction::Known(Action::Opened));
+ (own && !viewed).then(|| {
+ WorkFeedTrigger::Changed(vec![
+ record
+ .entity_type
+ .with_entity_string(record.entity_id.clone()),
+ ])
+ })
+ }
+ ActivitySubscriptionUpdate::Invalidated => Some(WorkFeedTrigger::Invalidated),
+ }
+}
+
+fn notification_trigger(update: NotificationSubscriptionUpdate<NotifEvent>) -> WorkFeedTrigger {
+ match update {
+ NotificationSubscriptionUpdate::New(row) | NotificationSubscriptionUpdate::Updated(row) => {
+ WorkFeedTrigger::Changed(notification_trigger_keys(&row))
+ }
+ // A deleted row no longer names its entity; refetching is the only
+ // way to learn which item lost a reason.
+ NotificationSubscriptionUpdate::Deleted(_) => WorkFeedTrigger::Invalidated,
+ }
+}
+
+impl<NS, AS, R> WorkFeedTriggers for RealtimeWorkFeedTriggers<NS, AS, R>
+where
+ NS: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>,
+ AS: ActivitySubscriptionService,
+ R: SoupRealtimeSubscriptionService,
+{
+ fn subscribe(&self, user: MacroUserIdStr<'static>) -> mpsc::Receiver<WorkFeedTrigger> {
+ let (sender, receiver) = mpsc::channel(TRIGGER_BUFFER);
+ let mut notifications = self.notifications.subscribe(user.clone());
+ let mut activity = self.activity.subscribe(user.clone());
+ let mut soup = self.soup.subscribe(user.clone());
+ tokio::spawn(async move {
+ loop {
+ let trigger = tokio::select! {
+ () = sender.closed() => return,
+ update = notifications.recv() => match update {
+ Some(update) => Some(notification_trigger(update)),
+ None => break,
+ },
+ update = activity.recv() => match update {
+ Some(update) => activity_trigger(&user, update),
+ None => break,
+ },
+ patch = soup.recv() => match patch {
+ Some(Patch::Updated(entity) | Patch::Deleted(entity)) => {
+ Some(WorkFeedTrigger::Changed(vec![entity]))
+ }
+ None => break,
+ },
+ };
+ if let Some(trigger) = trigger
+ && sender.send(trigger).await.is_err()
+ {
+ return;
+ }
+ }
+ // An upstream stream ended, normally or after falling behind:
+ // changes may have been missed, so subscribers must refetch.
+ let _ = sender.send(WorkFeedTrigger::Invalidated).await;
+ });
+ receiver
+ }
+}
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 09db944019..0bf0b6e509 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -229,6 +229,19 @@ chat remain visible, and that loading older rows still works through pages of
Noise-only email activity. Each entity appears once, ordered by its latest
notification or own action. On desktop, the funnel button to the right of **Home**
opens **Filter Home**.
+
+With the GraphQL Soup flag on, desktop Signal reads
+the server work feed (`user.workFeed` plus the `workFeedUpdates` subscription)
+instead of merging sources in the browser; Noise, search, and touch devices keep
+the merged feed. Verify these against a backend that serves the work feed: a
+document you edited with no notifications appears read and offers no **Mark Done**.
+**Mark Done** clears a row's notifications (and archives an inbox email): a row
+that is only notifications leaves and stays gone after a reload, while a row you
+also worked on stays, read, at the time of your own work. **Undo** brings a done
+row back in place. A new comment on a months-old document appears at the top. With
+two sessions of the same account, marking a row done in one removes it from the
+other without reloading. A channel thread and its channel remain separate rows, and
+completing the channel leaves the thread.
The menu shares the legacy compact submenus: **Status** offers **Unread**, **Read**,
and **All** as single-select radio items with a checkmark on the right of the selected
option, and **Type** contains the entity checkboxes. Status closes the menu
diff --git a/services/document_storage_service/Cargo.toml b/services/document_storage_service/Cargo.toml
index bbf69caafa..8d26999ec6 100644
--- a/services/document_storage_service/Cargo.toml
+++ b/services/document_storage_service/Cargo.toml
@@ -277,6 +277,7 @@ webhook = { path = "../../crates/webhook", features = [
"outbound",
"worker",
] }
+work_feed = { path = "../../crates/work_feed", features = ["outbound"] }
workspace-hack = { version = "0.1", path = "../../crates/workspace-hack" }
zip = { workspace = true }
diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rs
index 9d632deb13..50ec97da1e 100644
--- a/services/document_storage_service/src/api/context.rs
+++ b/services/document_storage_service/src/api/context.rs
@@ -831,6 +831,7 @@ pub(crate) struct ApiContext {
pub graphql_scheduled_action_context: graphql_scheduled_action::ScheduledActionGraphqlContext,
pub graphql_calendar_context: graphql_calendar::CalendarGraphqlContext,
pub graphql_calendar_mutation_context: graphql_calendar::CalendarGraphqlMutationContext,
+ pub graphql_work_feed_context: complete_graph::WorkFeedGraphqlContext,
pub graphql_initiative_entity_loader: graphql_initiative::InitiativeEntityLoader,
pub graphql_agent_session_entity_loader: graphql_soup::AgentSessionEntityLoader,
pub databases_state: DssDatabasesState,
diff --git a/services/document_storage_service/src/api/graphql_soup.rs b/services/document_storage_service/src/api/graphql_soup.rs
index ebd513c480..c66164a8f4 100644
--- a/services/document_storage_service/src/api/graphql_soup.rs
+++ b/services/document_storage_service/src/api/graphql_soup.rs
@@ -174,6 +174,7 @@ fn insert_graphql_context_data(
data.insert(state.graphql_scheduled_action_context.clone());
data.insert(state.graphql_calendar_context.clone());
data.insert(state.graphql_calendar_mutation_context.clone());
+ data.insert(state.graphql_work_feed_context.clone());
data.insert(state.graphql_initiative_entity_loader.clone());
data.insert(state.graphql_agent_session_entity_loader.clone());
data.insert(graphql_initiative::initiative_detail_loader(
diff --git a/services/document_storage_service/src/server.rs b/services/document_storage_service/src/server.rs
index d760bcb97a..9048bc9df9 100644
--- a/services/document_storage_service/src/server.rs
+++ b/services/document_storage_service/src/server.rs
@@ -1951,8 +1951,36 @@ pub async fn run() -> anyhow::Result<()> {
entity_access_service.clone(),
));
+ // Home's work feed: Soup candidates over the replica, notification
+ // acknowledgement on the primary, and live updates recomputed from the
+ // viewer's notification, activity and Soup streams. Done publishes a
+ // viewer-addressed Soup patch so the viewer's other sessions recompute
+ // too: GraphQL notification writes publish no realtime update.
+ let graphql_work_feed_context = complete_graph::WorkFeedGraphqlContext::new(
+ work_feed::domain::service::WorkFeedServiceImpl::new(
+ work_feed::outbound::source::SoupWorkFeedSource::new(
+ soup_service.clone(),
+ Arc::new(email_service.clone()),
+ ),
+ work_feed::outbound::notifications::ReaderWorkFeedNotifications::new(
+ graphql_notification_reader.clone(),
+ ),
+ work_feed::outbound::mail::EmailWorkFeedMail::new(Arc::new(email_service.clone())),
+ work_feed::outbound::signals::SoupRealtimeWorkFeedSignals::new(
+ KafkaSoupRealtimePublisher::new(macro_event_broker.clone()),
+ ),
+ ),
+ work_feed::outbound::triggers::RealtimeWorkFeedTriggers::new(
+ websocket_notification_consumer_service.clone(),
+ activity_realtime_service.clone(),
+ soup_realtime_service.clone(),
+ ),
+ complete_graph::EntityAccessWorkFeedViewers(entity_access_service.clone()),
+ );
+
let api_context = ApiContext {
dictation_state,
+ graphql_work_feed_context,
contacts_ingress: contacts_ingress.clone(),
soup_router_state: SoupRouterState::from_arc(
soup_service.clone(),
diff --git a/static_assets/schema.graphql b/static_assets/schema.graphql
index f480e69045..3b1c75f16b 100644
--- a/static_assets/schema.graphql
+++ b/static_assets/schema.graphql
@@ -329,11 +329,26 @@ type CompleteMutationRoot {
Set the viewer's RSVP on an event, the whole series or one occurrence.
"""
respondToCalendarEvent(input: RespondToCalendarEventInput!): GraphqlCalendarMutationPayload!
+ """
+ Mark work feed items done for the authenticated user: acknowledge the
+ notifications each entry showed and archive inbox email.
+ Notifications newer than an entry's `revision` stay active. Own work
+ is not acknowledged, so an item the user also worked on stays in the
+ work feed, seen. Tasks, discussions and pull requests themselves are
+ not completed.
+ """
+ markWorkFeedItemsDone(input: MarkWorkFeedItemsDoneInput!): MarkWorkFeedItemsDonePayload!
+ """
+ Reverse one mark-done for the authenticated user without overwriting
+ anything that happened since, and return the restored items' places
+ in the requested feed.
+ """
+ undoWorkFeedItemsDone(input: UndoWorkFeedItemsDoneInput!): UndoWorkFeedItemsDonePayload!
}
"""
-Root subscription object combining realtime Soup, notification, and
-activity adapters.
+Root subscription object combining realtime Soup, notification,
+activity, and work feed adapters.
"""
type CompleteSubscriptionRoot {
"""
@@ -356,6 +371,15 @@ type CompleteSubscriptionRoot {
Subscribe to realtime activity for the authenticated user.
"""
activityUpdates: GraphqlActivityPatch!
+ """
+ Changes to the authenticated user's work feed in `scope`: entries to
+ insert or move, items to remove, and an invalidation when changes may
+ have been missed. Each payload is one batch to apply together. Start
+ it before fetching the first page and refetch after an invalidation;
+ the stream ends with an error when its sources end, after which the
+ client resubscribes and refetches.
+ """
+ workFeedUpdates(scope: WorkFeedScopeInput): [WorkFeedPatch!]!
}
"""
@@ -8186,6 +8210,13 @@ type GraphqlUser {
"""
calendarChanges(input: CalendarChangesInput!): GraphqlCalendarChanges!
"""
+ A page of the authenticated user's work feed, newest first: items
+ with outstanding attention (notifications, inbox Signal email,
+ reminders) and, in `WORK` mode, work the user recently did. Each
+ item carries its notifications stacked for presentation.
+ """
+ workFeed(input: WorkFeedInput): WorkFeedPage!
+ """
Labels across every owned or delegated inbox accessible to the authenticated user.
"""
emailLabels: [GraphqlSoupEmailLabel!]!
@@ -8463,6 +8494,31 @@ input MarkEmailThreadUnreadInput {
threadId: ID!
}
+"""
+Input for marking work feed items done.
+"""
+input MarkWorkFeedItemsDoneInput {
+ """
+ The items to complete, at most 200.
+ """
+ items: [WorkFeedDoneItemInput!]!
+}
+
+"""
+The result of marking work feed items done.
+"""
+type MarkWorkFeedItemsDonePayload {
+ """
+ The completed items; remove them from every feed. Items that were
+ already gone are included.
+ """
+ itemIds: [ID!]!
+ """
+ Opaque token that reverses exactly this operation.
+ """
+ undoToken: String!
+}
+
"""
One entity move in a batch.
"""
@@ -8898,6 +8954,30 @@ input TimedEventTimeInput {
timeZone: String
}
+"""
+Input for undoing one mark-done.
+"""
+input UndoWorkFeedItemsDoneInput {
+ """
+ The `undoToken` the mark-done returned.
+ """
+ undoToken: String!
+ """
+ The feed the restored items are placed in.
+ """
+ scope: WorkFeedScopeInput
+}
+
+"""
+The result of undoing a mark-done.
+"""
+type UndoWorkFeedItemsDonePayload {
+ """
+ The restored items' places in the requested feed.
+ """
+ patches: [WorkFeedPatch!]!
+}
+
"""
Patch an event; omitted fields are left untouched.
"""
@@ -9064,6 +9144,348 @@ input UpdateNotificationsInput {
operation: NotificationUpdateOperation!
}
+"""
+One item to mark done.
+"""
+input WorkFeedDoneItemInput {
+ """
+ The item's id.
+ """
+ id: ID!
+ """
+ The entry's `revision` the caller observed. Reasons newer than it
+ stay active. Omit to acknowledge everything current.
+ """
+ revision: String
+}
+
+"""
+An item placed in one feed: where it sits, why, and what marking it done
+acknowledges.
+"""
+type WorkFeedEntry {
+ """
+ The item.
+ """
+ item: WorkFeedItem!
+ """
+ Where the entry sits, in RFC 3339: the later of the item's attention
+ and own-work times in this feed.
+ """
+ sortAt: String!
+ """
+ The viewer's newest own work counted by this feed, in RFC 3339;
+ always absent in attention mode.
+ """
+ touchedAt: String
+ """
+ Opaque token of the attention this entry shows; send it with done so
+ notifications that arrive later stay active.
+ """
+ revision: String!
+ """
+ Why the entry is presented the way it is.
+ """
+ primaryReason: WorkFeedPrimaryReason!
+ """
+ Index into the item's stacks of the stack the entry presents and
+ opens, when its primary reason is attention.
+ """
+ primaryStackIndex: Int
+}
+
+"""
+An item that no longer belongs in the subscribed feed: done, filtered out
+or inaccessible. The entity itself is not necessarily deleted.
+"""
+type WorkFeedEntryRemoved {
+ """
+ The removed item's id.
+ """
+ itemId: ID!
+}
+
+"""
+An item that belongs in the subscribed feed, with its current content and
+placement. Insert it, or move it to its new `sortAt`.
+"""
+type WorkFeedEntryUpserted {
+ """
+ The entry.
+ """
+ entry: WorkFeedEntry!
+}
+
+"""
+Page request for the viewer's work feed.
+"""
+input WorkFeedInput {
+ """
+ Which items the feed shows.
+ """
+ scope: WorkFeedScopeInput
+ """
+ Page size; defaults to 50, capped at 100.
+ """
+ limit: Int
+ """
+ Opaque cursor from the previous page's `nextCursor`; absent for the
+ first page. Send it with the same scope.
+ """
+ cursor: String
+}
+
+"""
+Changes may have been missed: refetch the feed.
+"""
+type WorkFeedInvalidated {
+ """
+ Always true.
+ """
+ refresh: Boolean!
+}
+
+"""
+One context the viewer can return to or acknowledge: an entity, a
+channel thread, or a channel's activity outside its threads. Items are
+shared across feeds; placement and primary reason live on each entry.
+"""
+type WorkFeedItem {
+ """
+ Stable per-viewer item id: `<entity type>:<entity id>`.
+ """
+ id: ID!
+ """
+ The entity the item is about; a channel thread's entity is its root
+ message.
+ """
+ entity: GraphqlSoupEntity!
+ """
+ The item's state for the viewer.
+ """
+ state: WorkFeedItemState!
+ """
+ When the newest active notification in the item's scope was created,
+ in RFC 3339; absent when the item has no outstanding attention.
+ """
+ attentionAt: String
+ """
+ How many of the item's active notifications are unseen.
+ """
+ unseenCount: Int!
+ """
+ The item's active notifications grouped for presentation, newest
+ stack first.
+ """
+ stacks: [WorkFeedStack!]!
+}
+
+"""
+An item's state for its viewer.
+"""
+enum WorkFeedItemState {
+ """
+ At least one active reason is unseen.
+ """
+ UNSEEN
+ """
+ Every active reason has been seen.
+ """
+ SEEN
+ """
+ Every notification the viewer observed was completed.
+ """
+ DONE
+}
+
+"""
+The kinds of item a work feed can be narrowed to.
+"""
+enum WorkFeedItemType {
+ """
+ Documents and tasks.
+ """
+ DOCUMENT
+ """
+ AI chats.
+ """
+ CHAT
+ """
+ Projects.
+ """
+ PROJECT
+ """
+ Email threads.
+ """
+ EMAIL
+ """
+ Channel activity outside a dedicated thread item.
+ """
+ CHANNEL
+ """
+ One channel thread.
+ """
+ CHANNEL_THREAD
+ """
+ Calendar reminders.
+ """
+ CALENDAR_EVENT
+ """
+ GitHub pull requests.
+ """
+ PULL_REQUEST
+ """
+ Agent sessions.
+ """
+ AGENT_SESSION
+}
+
+"""
+Which reasons admit items to a work feed.
+"""
+enum WorkFeedMode {
+ """
+ Outstanding attention plus the viewer's recent own work.
+ """
+ WORK
+ """
+ Outstanding attention only.
+ """
+ ATTENTION
+}
+
+"""
+One page of the viewer's work feed, newest first.
+"""
+type WorkFeedPage {
+ """
+ The page's entries.
+ """
+ entries: [WorkFeedEntry!]!
+ """
+ Cursor for the next page; absent once the feed is exhausted.
+ """
+ nextCursor: String
+}
+
+"""
+One change to a work feed's membership, placement or items.
+"""
+union WorkFeedPatch = WorkFeedEntryUpserted | WorkFeedEntryRemoved | WorkFeedInvalidated
+
+"""
+Why an entry is presented the way it is in its feed.
+"""
+enum WorkFeedPrimaryReason {
+ """
+ The viewer's own work is the newest reason: open the entity.
+ """
+ OWN_WORK
+ """
+ Incoming attention is the newest reason: present and open the
+ primary stack.
+ """
+ ATTENTION
+}
+
+"""
+Which items a work feed shows. Pages, subscriptions and undo for one feed
+send the same scope.
+"""
+input WorkFeedScopeInput {
+ """
+ Which reasons admit items. Defaults to `WORK`.
+ """
+ mode: WorkFeedMode
+ """
+ Item kinds to include; omitted or empty means every kind.
+ """
+ types: [WorkFeedItemType!]
+ """
+ Whether snippet documents are included. Defaults to false.
+ """
+ includeSnippets: Boolean
+}
+
+"""
+Notifications grouped the way they are presented, newest first. The
+newest notification names the stack and is its navigation target.
+"""
+type WorkFeedStack {
+ """
+ How the stack groups its notifications.
+ """
+ kind: WorkFeedStackKind!
+ """
+ The conversation thread the stack belongs to, when it is one: a
+ channel thread root, document comment thread or discussion thread.
+ """
+ threadId: String
+ """
+ When the stack's newest notification was created, in RFC 3339.
+ """
+ latestAt: String!
+ """
+ Whether any notification in the stack is unseen.
+ """
+ unseen: Boolean!
+ """
+ How many notifications the stack holds.
+ """
+ count: Int!
+ """
+ The stack's notifications, newest first. Defaults to 20, capped at
+ 100; `count` is the full size.
+ """
+ notifications(limit: Int): [GraphqlNotification!]!
+}
+
+"""
+How one stack groups its notifications.
+"""
+enum WorkFeedStackKind {
+ """
+ Replies, thread mentions and the absorbed root of one channel thread.
+ """
+ CHANNEL_THREAD
+ """
+ One root mention in a channel whose thread has no replies yet.
+ """
+ CHANNEL_MENTION
+ """
+ New root messages in a channel.
+ """
+ CHANNEL_MESSAGES
+ """
+ Reactions to the viewer's channel messages.
+ """
+ CHANNEL_REACTIONS
+ """
+ Several comments, replies or mentions in one document comment thread.
+ """
+ COMMENT_THREAD
+ """
+ A standalone mention in a document comment.
+ """
+ COMMENT_MENTION
+ """
+ Standalone root comments on a document.
+ """
+ COMMENTS
+ """
+ Mentions of a document in channels.
+ """
+ DOCUMENT_MENTIONS
+ """
+ One discussion thread on a project, company or contact.
+ """
+ DISCUSSION
+ """
+ Any other single event.
+ """
+ EVENT
+}
+
"""
Directs the executor to include this field or fragment only when the `if` argument is true.
"""