Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
feat(soup): add favorites filtering and optimistic membership (#7070)
teobf323b6e5bfa
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.jsonindex ac607aea45..67d56b6dc7 100644--- a/.github/workspace-dep-closures.json+++ b/.github/workspace-dep-closures.json@@ -442,6 +442,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -592,6 +593,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -1068,6 +1070,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -1292,6 +1295,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -1747,6 +1751,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -2063,6 +2068,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -3519,6 +3525,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -5442,6 +5449,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -5704,6 +5712,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -5972,6 +5981,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -7014,6 +7024,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -7168,6 +7179,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -8583,6 +8595,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -9222,6 +9235,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -9347,6 +9361,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -9463,6 +9478,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",@@ -9585,6 +9601,7 @@"crates/entity_registry/entity_registry","crates/entity_registry/entity_registry_db_utils","crates/entity_registry/shared_entity_registry",+ "crates/favorites","crates/filter_ast","crates/foreign_entity","crates/frecency",diff --git a/Cargo.lock b/Cargo.lockindex 666c01e0fa..341c224d4b 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -16151,6 +16151,7 @@ dependencies = ["either","email","entity_access",+ "favorites","filter_ast","foreign_entity","frecency",diff --git a/apps/web/src/features/entity/types/entity.ts b/apps/web/src/features/entity/types/entity.tsindex 438b3679a0..beb933f63a 100644--- a/apps/web/src/features/entity/types/entity.ts+++ b/apps/web/src/features/entity/types/entity.ts@@ -17,6 +17,8 @@ export type EntityBase = {name: string;ownerId: string;frecencyScore?: number;+ /** Viewer-owned favorite state from Soup; absent on search-only results. */+ isFavorited?: boolean;/*** The viewer's latest own mutation of this entity, present only on rows* from `touched_by_me` pages. The Recent feed sorts on it, so mutationdiff --git a/apps/web/src/lib/queries/favorites/favorites.test.tsx b/apps/web/src/lib/queries/favorites/favorites.test.tsxindex f442ef7c86..0a36565f55 100644--- a/apps/web/src/lib/queries/favorites/favorites.test.tsx+++ b/apps/web/src/lib/queries/favorites/favorites.test.tsx@@ -23,6 +23,8 @@ const mocks = vi.hoisted(() => ({graphqlSetMutate: vi.fn(),graphqlSetMutateAsync: vi.fn(),getFavoritesRest: vi.fn(),+ getSoupEntity: vi.fn(),+ updateSoupEntity: vi.fn(),addFavoriteRest: vi.fn(),removeFavoriteRest: vi.fn(),reorderFavoritesRest: vi.fn(),@@ -44,6 +46,11 @@ vi.mock('@service-storage/client', () => ({},}));+vi.mock('../soup/cache', () => ({+ getSoupEntityById: mocks.getSoupEntity,+ optimisticUpdateSoupEntity: mocks.updateSoupEntity,+}));+vi.mock('./graphql', () => ({createGraphqlFavoritesQuery: mocks.createGraphqlFavoritesQuery,createGraphqlReorderFavoritesMutation: mocks.createGraphqlReorderMutation,@@ -61,6 +68,7 @@ vi.mock('../client', () => ({import {type FavoritesFilter,favoriteEntityType,+ invalidateFavorites,useAddFavoriteMutation,useFavoritesData,useRemoveFavoriteMutation,@@ -100,6 +108,19 @@ function renderHook<T>(factory: () => T): T {}describe('favorites transport', () => {+ it('refreshes only favorites-filtered REST Soup queries when favorites change', async () => {+ mocks.graphqlSoupEnabled.mockReturnValue(false);+ const favoritesKey = ['soup', 'astItems', {}, { favorites_only: true }];+ const inboxKey = ['soup', 'astItems', {}, { emailView: 'inbox' }];+ testQueryClient.setQueryData(favoritesKey, { items: [] });+ testQueryClient.setQueryData(inboxKey, { items: [] });+ await invalidateFavorites();+ expect(testQueryClient.getQueryState(favoritesKey)?.isInvalidated).toBe(+ true+ );+ expect(testQueryClient.getQueryState(inboxKey)?.isInvalidated).toBe(false);+ });+it('maps agent sessions to their canonical favorite entity type', () => {expect(favoriteEntityType('agent_session')).toBe('agent_session');});@@ -298,6 +319,30 @@ describe('favorites transport', () => {expect(testQueryClient.getMutationCache().getAll()).toEqual([]);});+ it('patches the REST Soup entity optimistically and rolls it back on failure', async () => {+ mocks.graphqlSoupEnabled.mockReturnValue(false);+ const rollback = vi.fn();+ const item = {+ tag: 'emailThread',+ data: { id: 'thread-1' },+ frecency_score: 0,+ is_favorited: true,+ };+ mocks.getSoupEntity.mockReturnValue(item);+ mocks.updateSoupEntity.mockReturnValue({ rollback });+ mocks.removeFavoriteRest.mockRejectedValue(new Error('offline'));+ const mutation = renderHook(() => useRemoveFavoriteMutation());+ await expect(+ mutation.mutateAsync({ entityType: 'email_thread', entityId: 'thread-1' })+ ).rejects.toThrow('offline');+ expect(mocks.updateSoupEntity).toHaveBeenCalledWith({+ ...item,+ is_favorited: false,+ });+ expect(rollback).toHaveBeenCalledOnce();+ mocks.getSoupEntity.mockReset();+ });+it('keeps REST reorder optimism while GraphQL Soup is disabled', async () => {mocks.graphqlSoupEnabled.mockReturnValue(false);testQueryClient.setQueryData<FavoritesList>(favoriteKeys.list().queryKey, {diff --git a/apps/web/src/lib/queries/favorites/favorites.ts b/apps/web/src/lib/queries/favorites/favorites.tsindex c7c55471a5..51c1c8d0eb 100644--- a/apps/web/src/lib/queries/favorites/favorites.ts+++ b/apps/web/src/lib/queries/favorites/favorites.ts@@ -14,6 +14,8 @@ import { useMutation, useQuery } from '@tanstack/solid-query';import type { Accessor } from 'solid-js';import { queryClient } from '../client';+import { getSoupEntityById, optimisticUpdateSoupEntity } from '../soup/cache';+import { soupKeys } from '../soup/keys';import { withCallbacks } from '../utils';import {@@ -158,9 +160,27 @@ export function invalidateFavorites() {return refreshActiveGraphqlFavoritesQueries();}- return queryClient.invalidateQueries({- queryKey: favoriteKeys.list._def,- });+ return Promise.all([+ queryClient.invalidateQueries({ queryKey: favoriteKeys.list._def }),+ queryClient.invalidateQueries({+ queryKey: soupKeys._def,+ predicate: (query) =>+ query.queryKey.some(+ (part) =>+ part !== null &&+ typeof part === 'object' &&+ 'favorites_only' in part &&+ part.favorites_only === true+ ),+ }),+ ]).then(() => undefined);+}++function updateSoupFavorite(entityId: string, favorite: boolean) {+ const item = getSoupEntityById(entityId);+ return item+ ? optimisticUpdateSoupEntity({ ...item, is_favorited: favorite })+ : undefined;}type FavoriteMutationContext = { rollback: () => void } | undefined;@@ -196,6 +216,7 @@ export function useAddFavoriteMutation(callbacks?: AddFavoriteCallbacks) {queryKey: favoriteKeys.list._def,});const previous = readLists();+ const soupUpdate = updateSoupFavorite(args.entityId, true);const optimistic = pendingFavorite(args);writeLists((prev, filter) =>favoriteMatchesFilter(optimistic, filter)@@ -206,7 +227,10 @@ export function useAddFavoriteMutation(callbacks?: AddFavoriteCallbacks) {: prev);return {- rollback: () => restoreLists(previous),+ rollback: () => {+ restoreLists(previous);+ soupUpdate?.rollback();+ },};},onError: (_error, _args, context) => {@@ -247,6 +271,7 @@ export function useRemoveFavoriteMutation(callbacks?: RemoveFavoriteCallbacks) {queryKey: favoriteKeys.list._def,});const previous = readLists();+ const soupUpdate = updateSoupFavorite(args.entityId, false);const keep = (favorite: Favorite) =>!(favorite.entityType === args.entityType &&@@ -257,7 +282,10 @@ export function useRemoveFavoriteMutation(callbacks?: RemoveFavoriteCallbacks) {favorites: prev.favorites.filter(keep),}));return {- rollback: () => restoreLists(previous),+ rollback: () => {+ restoreLists(previous);+ soupUpdate?.rollback();+ },};},onError: (_error, _args, context) => {diff --git a/apps/web/src/lib/queries/favorites/graphql.test.tsx b/apps/web/src/lib/queries/favorites/graphql.test.tsxindex 5e62ba68fc..00f75eebc9 100644--- a/apps/web/src/lib/queries/favorites/graphql.test.tsx+++ b/apps/web/src/lib/queries/favorites/graphql.test.tsx@@ -469,7 +469,19 @@ describe('GraphQL favorites queries', () => {optimisticResponse: {setFavorite: expect.objectContaining({__typename: 'SetFavoritePayload',- result: { __typename: 'GraphqlMutationSuccess' },+ result: {+ __typename: 'GraphqlMutationSuccess',+ effects: [+ {+ __typename: 'SoupUpdated',+ item: {+ __typename: 'GraphqlSoupDocument',+ id: 'document-1',+ isFavorited: true,+ },+ },+ ],+ },favorite: expect.objectContaining({id: 'document:document-1',sortOrder: 2,diff --git a/apps/web/src/lib/queries/soup/graphql/ast.test.ts b/apps/web/src/lib/queries/soup/graphql/ast.test.tsindex c8b9e4ac38..1b23a59915 100644--- a/apps/web/src/lib/queries/soup/graphql/ast.test.ts+++ b/apps/web/src/lib/queries/soup/graphql/ast.test.ts@@ -402,6 +402,23 @@ describe('makeGraphqlSoupInput', () => {).toThrow('unknown file association');});+ it('preserves the stable favorites constraint without expanding entity IDs', () => {+ const body = { ...compileToAst(queryStateFrom({})), favorites_only: true };+ expect(+ makeGraphqlSoupInput({+ params: { limit: 100, sort_method: 'updated_at' },+ body,+ })+ ).toMatchObject({ initial: { filters: { favoritesOnly: true } } });+ expect(+ makeGraphqlGroupedSoupInput({+ params: { limit: 100, sort_method: 'updated_at' },+ body,+ groupBy: { type: 'entity_type' },+ })+ ).toMatchObject({ initial: { filters: { favoritesOnly: true } } });+ });+it('throws for REST-only top-level filters instead of silently widening the query', () => {for (const body of [{ eca: ['[email protected]'] },diff --git a/apps/web/src/lib/queries/soup/graphql/ast.ts b/apps/web/src/lib/queries/soup/graphql/ast.tsindex e84797ee7d..7a5d4ca57d 100644--- a/apps/web/src/lib/queries/soup/graphql/ast.ts+++ b/apps/web/src/lib/queries/soup/graphql/ast.ts@@ -66,6 +66,7 @@ type TargetAstKey =| 'propf';type AstBody = Partial<Record<TargetAstKey, RestAst>> & {+ favorites_only?: SoupAstBody['favorites_only'];/** CRM-address and CRM-domain filters are REST-only today. */eca?: string[];ecd?: string[];@@ -617,6 +618,8 @@ function assertGraphqlCompatibleBody(body: AstBody): void {function makeGraphqlFilters(body: AstBody): GraphqlEntityFilterAstInput {assertGraphqlCompatibleBody(body);const filters: GraphqlEntityFilterAstInput = {};+ if (body.favorites_only !== undefined)+ filters.favoritesOnly = body.favorites_only;if (body.calf) {filters.calendarEventFilter = compileExpr(diff --git a/apps/web/src/lib/queries/soup/normalized-cache/types.ts b/apps/web/src/lib/queries/soup/normalized-cache/types.tsindex e5cc737c14..4a3256a668 100644--- a/apps/web/src/lib/queries/soup/normalized-cache/types.ts+++ b/apps/web/src/lib/queries/soup/normalized-cache/types.ts@@ -29,6 +29,7 @@ export type SoupEntityPartial<T extends SoupEntityTag = SoupEntityTag> = {tag: T;data: SoupPartialData<T>;frecency_score: number;+ is_favorited?: boolean;/** Optimistic own-touch stamp; only `bumpSoupEntityTouchedAt` sets it. */touched_at?: string | null;/** Latest-notification stamp; only `bumpSoupEntityNotifiedAt` sets it. */diff --git a/apps/web/src/lib/queries/soup/transform-utils.test.ts b/apps/web/src/lib/queries/soup/transform-utils.test.tsindex 49441e1d17..6932449c8f 100644--- a/apps/web/src/lib/queries/soup/transform-utils.test.ts+++ b/apps/web/src/lib/queries/soup/transform-utils.test.ts@@ -58,6 +58,7 @@ describe('chat soup entities', () => {type: 'chat',id: item.data.id,model,+ isFavorited: false,});});diff --git a/apps/web/src/lib/queries/soup/transform-utils.ts b/apps/web/src/lib/queries/soup/transform-utils.tsindex 28db4c8c45..413db7d6d1 100644--- a/apps/web/src/lib/queries/soup/transform-utils.ts+++ b/apps/web/src/lib/queries/soup/transform-utils.ts@@ -1062,7 +1062,10 @@ export const mapApiSoupItemToEntity = ();const notified = notifiedAt ? { ...touched, notifiedAt } : touched;- return withRawNotifications(notified, item);+ return withRawNotifications(+ { ...notified, isFavorited: item.is_favorited },+ item+ );};const toCalendarEventTime = (diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.tsindex 806264d8a8..965853c988 100644--- a/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityFilters.ts@@ -13,6 +13,7 @@ import type { ChatFilters } from './chatFilters';import type { CrmCompanyFilters } from './crmCompanyFilters';import type { DocumentFilters } from './documentFilters';import type { EmailFilters } from './emailFilters';+import type { EntityFiltersFavoritesOnly } from './entityFiltersFavoritesOnly';import type { ForeignEntityFilters } from './foreignEntityFilters';import type { InitiativeFilters } from './initiativeFilters';import type { ProjectFilters } from './projectFilters';@@ -42,6 +43,8 @@ export interface EntityFilters {document_filters?: DocumentFilters;/** the bundled [EmailFilters] */email_filters?: EmailFilters;+ /** Restrict results to the authenticated viewer's favorites when true. */+ favorites_only?: EntityFiltersFavoritesOnly;/** the bundled [ForeignEntityFilters] */foreign_entity_filters?: ForeignEntityFilters;/** Initiative filters. Initiatives are opt-in. */diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/entityFiltersFavoritesOnly.ts b/apps/web/src/lib/service-clients/service-search/generated/models/entityFiltersFavoritesOnly.tsnew file mode 100644index 0000000000..7e03a8eebf--- /dev/null+++ b/apps/web/src/lib/service-clients/service-search/generated/models/entityFiltersFavoritesOnly.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * search_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Restrict results to the authenticated viewer's favorites when true.+ */+export type EntityFiltersFavoritesOnly = boolean | null;diff --git a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts b/apps/web/src/lib/service-clients/service-search/generated/models/index.tsindex 16d0910c9e..ed3886334b 100644--- a/apps/web/src/lib/service-clients/service-search/generated/models/index.ts+++ b/apps/web/src/lib/service-clients/service-search/generated/models/index.ts@@ -179,6 +179,7 @@ export * from './emailSearchResultScore';export * from './emailSearchResultSentAt';export * from './emptyResponse';export * from './entityFilters';+export * from './entityFiltersFavoritesOnly';export * from './entityReference';export * from './entityReferenceSpecificMessageId';export * from './entityType';diff --git a/apps/web/src/lib/service-clients/service-search/openapi.json b/apps/web/src/lib/service-clients/service-search/openapi.jsonindex 476c2eee6f..ea1ea09341 100644--- a/apps/web/src/lib/service-clients/service-search/openapi.json+++ b/apps/web/src/lib/service-clients/service-search/openapi.json@@ -2163,6 +2163,10 @@"$ref": "#/components/schemas/EmailFilters","description": "the bundled [EmailFilters]"},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict results to the authenticated viewer's favorites when true."+ },"foreign_entity_filters": {"$ref": "#/components/schemas/ForeignEntityFilters","description": "the bundled [ForeignEntityFilters]"diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.tsindex 38209efbee..197fd54320 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAst.ts@@ -4,6 +4,7 @@* document_storage_service* OpenAPI spec version: 0.1.0*/+import type { ApiEntityFilterAstFavoritesOnly } from './apiEntityFilterAstFavoritesOnly';/*** Wire-format entity filter AST accepted by soup AST endpoints.@@ -43,6 +44,8 @@ tree only; CRM scope is carried by the `ecd` / `eca` siblingfields). On this endpoint the email filter stays a bare tree,unlike the materialized [`EntityFilterAst`] used for cursors. */ef?: unknown;+ /** Restrict to the authenticated viewer's favorites before pagination when true. */+ favorites_only?: ApiEntityFilterAstFavoritesOnly;/** the filters that should be applied to foreign entity records */fef?: unknown;/** the filters that should be applied to the project entity */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAstFavoritesOnly.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAstFavoritesOnly.tsnew file mode 100644index 0000000000..55c9a4d233--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/apiEntityFilterAstFavoritesOnly.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Restrict to the authenticated viewer's favorites before pagination when true.+ */+export type ApiEntityFilterAstFavoritesOnly = boolean | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.tsindex d63bf53cee..17dca9de88 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFilters.ts@@ -13,6 +13,7 @@ import type { ChatFilters } from './chatFilters';import type { CrmCompanyFilters } from './crmCompanyFilters';import type { DocumentFilters } from './documentFilters';import type { EmailFilters } from './emailFilters';+import type { EntityFiltersFavoritesOnly } from './entityFiltersFavoritesOnly';import type { ForeignEntityFilters } from './foreignEntityFilters';import type { InitiativeFilters } from './initiativeFilters';import type { ProjectFilters } from './projectFilters';@@ -42,6 +43,8 @@ export interface EntityFilters {document_filters?: DocumentFilters;/** the bundled [EmailFilters] */email_filters?: EmailFilters;+ /** Restrict results to the authenticated viewer's favorites when true. */+ favorites_only?: EntityFiltersFavoritesOnly;/** the bundled [ForeignEntityFilters] */foreign_entity_filters?: ForeignEntityFilters;/** Initiative filters. Initiatives are opt-in. */diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFiltersFavoritesOnly.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFiltersFavoritesOnly.tsnew file mode 100644index 0000000000..0147db558e--- /dev/null+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/entityFiltersFavoritesOnly.ts@@ -0,0 +1,11 @@+/**+ * Generated by orval v7.21.0 🍺+ * Do not edit manually.+ * document_storage_service+ * OpenAPI spec version: 0.1.0+ */++/**+ * Restrict results to the authenticated viewer's favorites when true.+ */+export type EntityFiltersFavoritesOnly = boolean | null;diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.tsindex ff94c33627..295beb95c8 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts@@ -131,6 +131,7 @@ export * from './apiChannelWithLatestTeamId';export * from './apiChannelWithLatestViewedAt';export * from './apiCountedReaction';export * from './apiEntityFilterAst';+export * from './apiEntityFilterAstFavoritesOnly';export * from './apiGroupByField';export * from './apiGroupByFieldOneOf';export * from './apiGroupByFieldOneOfProperty';@@ -696,6 +697,7 @@ export * from './emptyResponse';export * from './ensureCollabSurfaceRequest';export * from './ensureCollabSurfaceRequestParentEntityType';export * from './entityFilters';+export * from './entityFiltersFavoritesOnly';export * from './entityMessageDeleteMessageParams';export * from './entityMessageDeleteThreadParams';export * from './entityMessageLegacyParams';diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.tsindex cda0eb9406..a97d9138dd 100644--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts@@ -14933,6 +14933,12 @@ export const postItemsSoupBody = zod.describe('The email filters used to filter down what emails you search over.'),+ favorites_only: zod+ .boolean()+ .nullish()+ .describe(+ "Restrict results to the authenticated viewer's favorites when true."+ ),foreign_entity_filters: zod.object({foreign_entity_ids: zod@@ -18892,6 +18898,12 @@ export const postItemsSoupAstBody = zod.describe('the filters that should be applied to the email entity (raw AST\ntree only; CRM scope is carried by the `ecd` \/ `eca` sibling\nfields). On this endpoint the email filter stays a bare tree,\nunlike the materialized [`EntityFilterAst`] used for cursors.'),+ favorites_only: zod+ .boolean()+ .nullish()+ .describe(+ "Restrict to the authenticated viewer's favorites before pagination when true."+ ),fef: zod.unknown().optional()@@ -22673,6 +22685,12 @@ export const postItemsSoupAstGroupedBody = zod.describe('the filters that should be applied to the email entity (raw AST\ntree only; CRM scope is carried by the `ecd` \/ `eca` sibling\nfields). On this endpoint the email filter stays a bare tree,\nunlike the materialized [`EntityFilterAst`] used for cursors.'),+ favorites_only: zod+ .boolean()+ .nullish()+ .describe(+ "Restrict to the authenticated viewer's favorites before pagination when true."+ ),fef: zod.unknown().optional()@@ -22841,6 +22859,12 @@ export const postItemsSoupAstGroupedBody = zod.describe('the filters that should be applied to the email entity (raw AST\ntree only; CRM scope is carried by the `ecd` \/ `eca` sibling\nfields). On this endpoint the email filter stays a bare tree,\nunlike the materialized [`EntityFilterAst`] used for cursors.'),+ favorites_only: zod+ .boolean()+ .nullish()+ .describe(+ "Restrict to the authenticated viewer's favorites before pagination when true."+ ),fef: zod.unknown().optional()diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.test.ts b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.test.tsindex 5d8a5b5749..87fa913216 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.test.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.test.ts@@ -65,6 +65,37 @@ describe('favorites GraphQL mutations', () => {});});+ it.each([+ { entityType: 'email_thread', typename: 'GraphqlSoupEmailThread' },+ { entityType: 'initiative', typename: 'GraphqlSoupInitiative' },+ ] as const)(+ 'updates the normalized $entityType favorite field without changing a Soup query',+ async ({ entityType, typename }) => {+ await executeGraphqlSetFavoriteMutation(+ client,+ { entityType, entityId: 'entity-1' },+ false,+ 0+ );+ expect(+ mutationMock.mock.calls[0][2].normalizedCacheOptimistic+ .optimisticResponse.setFavorite.result.effects+ ).toEqual([+ {+ __typename: 'SoupUpdated',+ item: {+ __typename: typename,+ id: 'entity-1',+ isFavorited: false,+ },+ },+ ]);+ expect(+ mutationMock.mock.calls[0][2].normalizedCacheOptimistic.revalidations+ ).toEqual(revalidations);+ }+ );+it.each([{ favorite: true, patchKind: 'prependUnique' },{ favorite: false, patchKind: 'remove' },@@ -81,7 +112,19 @@ describe('favorites GraphQL mutations', () => {optimisticResponse: {setFavorite: {__typename: 'SetFavoritePayload',- result: { __typename: 'GraphqlMutationSuccess' },+ result: {+ __typename: 'GraphqlMutationSuccess',+ effects: [+ {+ __typename: 'SoupUpdated',+ item: {+ __typename: 'GraphqlSoupDocument',+ id: 'document-1',+ isFavorited: favorite,+ },+ },+ ],+ },favorite: favorite? expect.objectContaining({__typename: 'GraphqlFavorite',diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.tsindex 9e249f9c24..27989fce1f 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts+++ b/apps/web/src/lib/service-clients/service-storage/graphql-favorites.ts@@ -111,6 +111,51 @@ export type FavoritesCacheTarget = {updateCachedList: boolean;};+type FavoriteEffects = Extract<+ SetFavoriteMutation['setFavorite']['result'],+ { __typename: 'GraphqlMutationSuccess' }+>['effects'];++function favoriteSoupEffects(+ args: SetFavoriteArgs,+ favorite: boolean+): FavoriteEffects {+ const typenames = {+ document: 'GraphqlSoupDocument',+ project: 'GraphqlSoupProject',+ chat: 'GraphqlSoupChat',+ channel: 'GraphqlSoupChannel',+ channel_message: 'GraphqlSoupChannelMessage',+ email_thread: 'GraphqlSoupEmailThread',+ calendar_event: 'GraphqlSoupCalendarEvent',+ call: 'GraphqlSoupCall',+ crm_company: 'GraphqlSoupCrmCompany',+ foreign_entity: 'GraphqlSoupForeignEntity',+ reminder: 'GraphqlSoupReminder',+ agent_session: 'GraphqlSoupAgentSession',+ user: undefined,+ team: undefined,+ static_file: undefined,+ crm_contact: undefined,+ skill: undefined,+ scheduled_action: undefined,+ initiative: 'GraphqlSoupInitiative',+ } as const satisfies Record<FavoriteEntityType, string | undefined>;+ const typename = typenames[args.entityType];+ return typename+ ? [+ {+ __typename: 'SoupUpdated',+ item: {+ __typename: typename,+ id: args.entityId,+ isFavorited: favorite,+ },+ },+ ]+ : [];+}+/** Submit a durable optimistic GraphQL add/remove favorite mutation. */export function executeGraphqlSetFavoriteMutation(client: Client,@@ -141,7 +186,10 @@ export function executeGraphqlSetFavoriteMutation(const optimisticData: SetFavoriteMutation = {setFavorite: {__typename: 'SetFavoritePayload',- result: { __typename: 'GraphqlMutationSuccess' },+ result: {+ __typename: 'GraphqlMutationSuccess',+ effects: favoriteSoupEffects(args, favorite),+ },favorite: favorite ? optimisticFavorite : null,},};diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/favorites.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/favorites.graphqlindex 2c779b4ed8..c81b4af143 100644--- a/apps/web/src/lib/service-clients/service-storage/graphql/favorites.graphql+++ b/apps/web/src/lib/service-clients/service-storage/graphql/favorites.graphql@@ -25,6 +25,18 @@ mutation SetFavorite($entity: EntityRefInput!, $favorite: Boolean!) {__typenameresult {__typename+ ... on GraphqlMutationSuccess {+ effects {+ __typename+ ... on SoupUpdated {+ item {+ __typename+ id+ isFavorited+ }+ }+ }+ }... on GraphqlMutationError {errorCodemessagediff --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.tsindex 7f87cffe63..2f73eee576 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@@ -594,6 +594,8 @@ export type GraphqlEntityFilterAst = {documentFilter?: GraphqlDocumentExpr | null | undefined;/** The email filter to apply. */emailFilter?: GraphqlEmailFilterAst | null | undefined;+ /** Restrict results to the authenticated viewer's favorites when true. */+ favoritesOnly?: boolean | null | undefined;/** The foreign entity filter to apply. */foreignEntityFilter?: GraphqlForeignEntityExpr | null | undefined;/** The initiative filter to apply. Initiatives are opt-in. */@@ -7035,7 +7037,24 @@ export type SetFavoriteMutationVariables = Exact<{export type SetFavoriteMutation = { setFavorite: { __typename: 'SetFavoritePayload', result:| { __typename: 'GraphqlMutationError', errorCode: GraphqlEntityMutationErrorCode, message: string }- | { __typename: 'GraphqlMutationSuccess' }+ | { __typename: 'GraphqlMutationSuccess', effects: Array<+ | { __typename: 'GraphqlCacheDeletion' }+ | { __typename: 'SoupUpdated', item:+ | { __typename: 'GraphqlSoupAgentSession', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupCalendarEvent', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupCall', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupChannel', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupChannelMessage', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupChat', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupCrmCompany', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupDocument', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupEmailThread', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupForeignEntity', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupInitiative', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupProject', id: string, isFavorited: boolean }+ | { __typename: 'GraphqlSoupReminder', id: string, isFavorited: boolean }+ }+ > }, favorite: { __typename: 'GraphqlFavorite', id: string, entityType: GraphqlEntityType, entityId: string, sortOrder: number, createdAt: string, fileType: string | null, documentSubType: string | null, channelType: string | null, channelId: string | null } | null } };export type ReorderFavoritesMutationVariables = Exact<{@@ -13116,7 +13135,7 @@ export const DuplicateEntitiesDocument = {"kind":"Document","definitions":[{"kinexport const SetEntityFavoriteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEntityFavorite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entity"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EntityRefInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEntityFavorite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entity"}}},{"kind":"Argument","name":{"kind":"Name","value":"favorite"},"value":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EntityMutationResultFields"}}]}}]}},{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"GraphqlSoupReminder"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"scheduleType"}},{"kind":"Field","name":{"kind":"Name","value":"remindAt"}},{"kind":"Field","name":{"kind":"Name","value":"cron"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"nextRunAt"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"referencedEntity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"subType"}}]}},{"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":"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":"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":"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":"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":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupPatchFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupPatch"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupUpdated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlCacheDeletion"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"graphqlTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EntityMutationResultFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlEntityMutationResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationSuccess"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"effects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPatchFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}}]} as unknown as DocumentNode<SetEntityFavoriteMutation, SetEntityFavoriteMutationVariables>;export const EntityPropertiesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"EntityProperties"},"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":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}}]}}]}}]}},{"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":"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"}}]}}]}}]}}]} as unknown as DocumentNode<EntityPropertiesQuery, EntityPropertiesQueryVariables>;export const FavoritesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Favorites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"FavoritesFilterInput"}}}],"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":"favorites"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FavoriteFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FavoriteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlFavorite"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"documentSubType"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}}]}}]} as unknown as DocumentNode<FavoritesQuery, FavoritesQueryVariables>;-export const SetFavoriteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetFavorite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entity"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EntityRefInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setFavorite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entity"}}},{"kind":"Argument","name":{"kind":"Name","value":"favorite"},"value":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"result"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"favorite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FavoriteFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FavoriteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlFavorite"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"documentSubType"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}}]}}]} as unknown as DocumentNode<SetFavoriteMutation, SetFavoriteMutationVariables>;+export const SetFavoriteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetFavorite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"entity"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EntityRefInput"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setFavorite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"entity"},"value":{"kind":"Variable","name":{"kind":"Name","value":"entity"}}},{"kind":"Argument","name":{"kind":"Name","value":"favorite"},"value":{"kind":"Variable","name":{"kind":"Name","value":"favorite"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"result"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationSuccess"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"effects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SoupUpdated"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"item"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isFavorited"}}]}}]}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlMutationError"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"errorCode"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"favorite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FavoriteFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FavoriteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlFavorite"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"documentSubType"}},{"kind":"Field","name":{"kind":"Name","value":"channelType"}},{"kind":"Field","name":{"kind":"Name","value":"channelId"}}]}}]} as unknown as DocumentNode<SetFavoriteMutation, SetFavoriteMutationVariables>;export const ReorderFavoritesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ReorderFavorites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ReorderFavoritesInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"reorderFavorites"},"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":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"entityId"}},{"kind":"Field","name":{"kind":"Name","value":"sortOrder"}}]}}]}}]} as unknown as DocumentNode<ReorderFavoritesMutation, ReorderFavoritesMutationVariables>;export const GroupSoupMembershipDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GroupSoupMembership"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"GroupedSoupInput"}}}}],"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":"groupSoup"},"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":"bins"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode<GroupSoupMembershipQuery, GroupSoupMembershipQueryVariables>;export const GroupSoupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GroupSoup"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"GroupedSoupInput"}}}}],"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":"groupSoup"},"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":"bins"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemFields"}}]}}]}}]}}]}}]}},{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"GraphqlSoupReminder"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"reminderDescription"},"name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"scheduleType"}},{"kind":"Field","name":{"kind":"Name","value":"remindAt"}},{"kind":"Field","name":{"kind":"Name","value":"cron"}},{"kind":"Field","name":{"kind":"Name","value":"timezone"}},{"kind":"Field","name":{"kind":"Name","value":"nextRunAt"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"completedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"referencedEntity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"subType"}}]}},{"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":"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":"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":"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":"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":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupItemPreviewFields"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]} as unknown as DocumentNode<GroupSoupQuery, GroupSoupQueryVariables>;diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.jsonindex dde88124d0..cc29f6eb06 100644--- a/apps/web/src/lib/service-clients/service-storage/openapi.json+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json@@ -16883,6 +16883,10 @@"ef": {"description": "the filters that should be applied to the email entity (raw AST\ntree only; CRM scope is carried by the `ecd` / `eca` sibling\nfields). On this endpoint the email filter stays a bare tree,\nunlike the materialized [`EntityFilterAst`] used for cursors."},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict to the authenticated viewer's favorites before pagination when true."+ },"fef": {"description": "the filters that should be applied to foreign entity records"},@@ -23459,6 +23463,10 @@"$ref": "#/components/schemas/EmailFilters","description": "the bundled [EmailFilters]"},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict results to the authenticated viewer's favorites when true."+ },"foreign_entity_filters": {"$ref": "#/components/schemas/ForeignEntityFilters","description": "the bundled [ForeignEntityFilters]"diff --git a/crates/frecency/src/outbound/postgres/dynamic_tests.rs b/crates/frecency/src/outbound/postgres/dynamic_tests.rsindex 13687f3636..bad68be6cf 100644--- a/crates/frecency/src/outbound/postgres/dynamic_tests.rs+++ b/crates/frecency/src/outbound/postgres/dynamic_tests.rs@@ -953,6 +953,7 @@ async fn test_dynamic_filter_document_date_created_at_gt(pool: PgPool) {.unwrap().into();let filter = EntityFilterAst {+ favorites_only: None,document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::CreatedAt(DateLiteral::GreaterThan(cutoff),)))),@@ -1051,6 +1052,7 @@ async fn test_dynamic_filter_document_date_created_at_lt(pool: PgPool) {.unwrap().into();let filter = EntityFilterAst {+ favorites_only: None,document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::CreatedAt(DateLiteral::LessThan(cutoff),)))),@@ -1145,6 +1147,7 @@ async fn test_dynamic_filter_document_date_updated_at_gt(pool: PgPool) {.unwrap().into();let filter = EntityFilterAst {+ favorites_only: None,document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::UpdatedAt(DateLiteral::GreaterThan(cutoff),)))),@@ -1244,6 +1247,7 @@ async fn test_dynamic_filter_document_date_updated_at_lt(pool: PgPool) {.unwrap().into();let filter = EntityFilterAst {+ favorites_only: None,document_filter: Some(Arc::new(Expr::Literal(DocumentLiteral::UpdatedAt(DateLiteral::LessThan(cutoff),)))),diff --git a/crates/graphql_soup/src/loaders.rs b/crates/graphql_soup/src/loaders.rsindex bb4968030c..c1c89b5d72 100644--- a/crates/graphql_soup/src/loaders.rs+++ b/crates/graphql_soup/src/loaders.rs@@ -390,6 +390,7 @@ fn entity_filter_ast(entities: &[Entity<'static>]) -> Result<EntityFilterAst, Solet nil = Uuid::nil();Ok(EntityFilterAst {+ favorites_only: None,calendar_event_filter: Some(literal_tree(calendar_events, CalendarEventLiteral::Id(nil))),document_filter: Some(literal_tree(documents, DocumentLiteral::Id(nil))),project_filter: Some(literal_tree(projects, ProjectLiteral::ProjectIdSelf(nil))),diff --git a/crates/graphql_soup_filter_input/src/lib.rs b/crates/graphql_soup_filter_input/src/lib.rsindex 17825490a9..ecc52d36ed 100644--- a/crates/graphql_soup_filter_input/src/lib.rs+++ b/crates/graphql_soup_filter_input/src/lib.rs@@ -339,6 +339,8 @@ impl TryFrom<GraphqlPropertyEntityType> for PropertyEntityType {#[derive(Serialize, Deserialize)]#[serde(deny_unknown_fields, rename_all = "camelCase")]pub struct GraphqlEntityFilterAst {+ /// Restrict results to the authenticated viewer's favorites when true.+ favorites_only: Option<bool>,/// The calendar event filter to apply.calendar_event_filter: Option<GraphqlCalendarEventExpr>,/// The document filter to apply.@@ -382,6 +384,7 @@ impl GraphqlEntityFilterAst {/// Convert an input whose serialized representation already passed ingress bounds.fn into_ast_unchecked(self) -> InputResult<EntityFilterAst> {Ok(EntityFilterAst {+ favorites_only: self.favorites_only,calendar_event_filter: optional_tree(self.calendar_event_filter)?,document_filter: optional_tree(self.document_filter)?,project_filter: optional_tree(self.project_filter)?,diff --git a/crates/graphql_soup_filter_input/src/test.rs b/crates/graphql_soup_filter_input/src/test.rsindex 2e33812996..43e3db137e 100644--- a/crates/graphql_soup_filter_input/src/test.rs+++ b/crates/graphql_soup_filter_input/src/test.rs@@ -8,6 +8,15 @@ fn generated_filter_fixture() -> Value {serde_json::from_str(include_str!("../fixtures/generated-soup-filter.json")).unwrap()}+#[test]+fn favorites_filter_materializes_without_changing_entity_scope() {+ let mut input = generated_filter_fixture();+ input["favoritesOnly"] = json!(true);+ let ast = materialize_graphql_filter(input).unwrap();+ assert_eq!(ast.favorites_only, Some(true));+ assert!(ast.email_filter.tree.is_some());+}+#[test]fn generated_typescript_variables_materialize_authoritative_ast() {let ast = materialize_graphql_filter(generated_filter_fixture()).unwrap();diff --git a/crates/item_filter_index/src/lib.rs b/crates/item_filter_index/src/lib.rsindex 67d9f6723b..df104ef512 100644--- a/crates/item_filter_index/src/lib.rs+++ b/crates/item_filter_index/src/lib.rs@@ -42,7 +42,7 @@ pub const SOUP_FLAT_V3: &str = "soup-flat-v3";/// Browser-composed profile with complete active-notification membership.pub const SOUP_FLAT_V4: &str = "soup-flat-v4";/// Host-composed profile with complete selectable property snapshots.-pub const SOUP_FLAT_V5: &str = "soup-flat-v5";+pub const SOUP_FLAT_V6: &str = "soup-flat-v6";// Keep this lightweight crate wasm-compatible instead of depending on the// native `system_properties` crate. A native test locks this stable UUID to@@ -79,9 +79,9 @@ pub mod vocabulary {Profile::new(token(super::SOUP_FLAT_V4))}- /// Host-composed property-aware Soup profile.- pub fn profile_v5() -> Profile {- Profile::new(token(super::SOUP_FLAT_V5))+ /// Host-composed property and favorite-aware Soup profile.+ pub fn profile_v6() -> Profile {+ Profile::new(token(super::SOUP_FLAT_V6))}/// IDs of unseen notifications for the viewer and primary entity.@@ -275,6 +275,9 @@ fn check_soup_flat(if ast.initiative_filter.is_some() {return Eligibility::Unsupported(UnsupportedReason::Partition("initiative"));}+ if ast.favorites_only == Some(true) {+ return Eligibility::Unsupported(UnsupportedReason::Literal("favorites"));+ }if request.has_cursor {return Eligibility::Unsupported(UnsupportedReason::Cursor);}diff --git a/crates/item_filter_index/src/mail.rs b/crates/item_filter_index/src/mail.rsindex 6ef3979d72..1bf2c7e37b 100644--- a/crates/item_filter_index/src/mail.rs+++ b/crates/item_filter_index/src/mail.rs@@ -28,6 +28,7 @@ pub fn compile(let unsupported = || LocalCompileOutcome::Unsupported(UnsupportedReason::Literal("email"));if !matches!(view, "ALL" | "INBOX" | "DRAFTS" | "SENT")|| ast.properties_filter.is_some()+ || ast.favorites_only == Some(true)|| ast.email_filter.crm_scope.is_some()|| links.len() > 100{diff --git a/crates/item_filter_index/src/properties.rs b/crates/item_filter_index/src/properties.rsindex f5959d1269..731c515eb6 100644--- a/crates/item_filter_index/src/properties.rs+++ b/crates/item_filter_index/src/properties.rs@@ -27,7 +27,7 @@ pub fn is_property_attribute(attribute: &Token) -> bool {/// A cached-Mail profile containing the same canonical message facts plus properties.pub fn mail_profile() -> Profile {- Profile::new(mail::token("soup-mail-v3"))+ Profile::new(mail::token("soup-mail-v4"))}fn supported(ast: &EntityFilterAst) -> bool {@@ -67,6 +67,17 @@ fn add_properties() -> Result<LocalCompileOutcome, CompileError> {let mut query = query.as_query().clone();query.profile = profile;+ if ast.favorites_only == Some(true) {+ for partition in &mut query.partitions {+ partition.predicate = PredicateExpr::And(+ Box::new(std::mem::replace(+ &mut partition.predicate,+ PredicateExpr::None,+ )),+ Box::new(mail::boolean("is-favorited", true)),+ );+ }+ }if ast.properties_filter.is_some() {for partition in &mut query.partitions {partition.predicate = PredicateExpr::And(@@ -95,9 +106,10 @@ pub fn compile_soup(}let mut base = ast.clone();base.properties_filter = None;+ base.favorites_only = None;match compile_soup_flat_v4(&base, request)? {LocalCompileOutcome::Supported(query) => {- add_properties(ast, query, vocabulary::profile_v5())+ add_properties(ast, query, vocabulary::profile_v6())}unsupported => Ok(unsupported),}@@ -118,6 +130,7 @@ pub fn compile_mail(}let mut base = ast.clone();base.properties_filter = None;+ base.favorites_only = None;match mail::compile(&base, request, view, links, viewer)? {LocalCompileOutcome::Supported(query) => add_properties(ast, query, mail_profile()),unsupported => Ok(unsupported),diff --git a/crates/item_filter_index/src/test.rs b/crates/item_filter_index/src/test.rsindex dac737a349..ba6275edd8 100644--- a/crates/item_filter_index/src/test.rs+++ b/crates/item_filter_index/src/test.rs@@ -32,6 +32,32 @@ fn request() -> SoupFlatRequest {}}+#[test]+fn favorite_filter_requires_current_projection_and_constrains_each_partition() {+ let mut ast = excluded_deferred_partitions();+ ast.favorites_only = Some(true);+ assert!(matches!(+ compile_soup_flat_v4(&ast, request()).unwrap(),+ LocalCompileOutcome::Unsupported(_)+ ));+ let LocalCompileOutcome::Supported(query) = properties::compile_soup(&ast, request()).unwrap()+ else {+ panic!("current compiler must support favorites");+ };+ fn requires_favorite(predicate: &PredicateExpr) -> bool {+ predicate == &PredicateExpr::None+ || predicate == &mail::boolean("is-favorited", true)+ || matches!(predicate, PredicateExpr::And(a, b) if requires_favorite(a) || requires_favorite(b))+ }+ for partition in &query.as_query().partitions {+ assert!(+ requires_favorite(&partition.predicate),+ "{:?}",+ partition.predicate+ );+ }+}+fn excluded_deferred_partitions() -> EntityFilterAst {let mut ast = EntityFilterAst {calendar_event_filter: Some(Arc::new(Expr::val(CalendarEventLiteral::Id(Uuid::nil())))),@@ -408,4 +434,9 @@ fn initiative_queries_use_server_instead_of_incomplete_local_index() {check_soup_flat_v3(&ast, request()),Eligibility::Unsupported(UnsupportedReason::Partition("initiative")));+ ast.favorites_only = Some(true);+ assert_eq!(+ properties::compile_soup(&ast, request()).unwrap(),+ LocalCompileOutcome::Unsupported(UnsupportedReason::Partition("initiative"))+ );}diff --git a/crates/item_filters/src/ast.rs b/crates/item_filters/src/ast.rsindex 93f43c8630..11b1d60cb9 100644--- a/crates/item_filters/src/ast.rs+++ b/crates/item_filters/src/ast.rs@@ -191,6 +191,9 @@ impl IsEmpty for EmailFilterAst {#[derive(Debug, Default, Serialize, Deserialize, Clone)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]pub struct EntityFilterAst {+ /// Restrict to the authenticated viewer's favorites before pagination when true.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub favorites_only: Option<bool>,/// filters applied to canonical calendar events#[serde(default, rename = "calf")]#[cfg_attr(feature = "schema", schema(value_type = serde_json::Value))]@@ -266,6 +269,7 @@ impl EntityFilterAst {.map(|(_, scope)| scope);let email_tree = EmailFilters::expand_ast(entity_filter.email_filters)?.map(Arc::new);Ok(Some(EntityFilterAst {+ favorites_only: entity_filter.favorites_only,calendar_event_filter: CalendarEventFilters::expand_ast(entity_filter.calendar_event_filters,)?@@ -327,6 +331,7 @@ impl EntityFilterAst {#[cfg(feature = "mock")]pub fn mock_empty() -> Self {Self {+ favorites_only: None,calendar_event_filter: None,document_filter: None,project_filter: None,@@ -363,6 +368,7 @@ fn crm_company_requests_admin(expr: &Expr<CrmCompanyLiteral>) -> bool {impl IsEmpty for EntityFilterAst {fn is_empty(&self) -> bool {let EntityFilterAst {+ favorites_only,calendar_event_filter,document_filter,project_filter,@@ -378,7 +384,8 @@ impl IsEmpty for EntityFilterAst {initiative_filter,properties_filter,} = self;- calendar_event_filter.is_none()+ favorites_only != &Some(true)+ && calendar_event_filter.is_none()&& document_filter.is_none()&& project_filter.is_none()&& chat_filter.is_none()diff --git a/crates/item_filters/src/lib.rs b/crates/item_filters/src/lib.rsindex 6b48802e5e..62e233b5fd 100644--- a/crates/item_filters/src/lib.rs+++ b/crates/item_filters/src/lib.rs@@ -816,6 +816,9 @@ pub enum TagFilterMode {#[derive(Debug, Clone, Default, Deserialize, Serialize)]#[cfg_attr(feature = "schema", derive(utoipa::ToSchema, schemars::JsonSchema))]pub struct EntityFilters {+ /// Restrict results to the authenticated viewer's favorites when true.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub favorites_only: Option<bool>,/// the bundled [CalendarEventFilters]#[serde(default)]pub calendar_event_filters: CalendarEventFilters,@@ -872,6 +875,7 @@ pub struct EntityFilters {impl IsEmpty for EntityFilters {fn is_empty(&self) -> bool {let EntityFilters {+ favorites_only,calendar_event_filters,project_filters,document_filters,@@ -890,7 +894,8 @@ impl IsEmpty for EntityFilters {// Mode is a modifier on tag_option_ids, not a filter by itself.tag_filter_mode: _,} = self;- calendar_event_filters.is_empty()+ favorites_only != &Some(true)+ && calendar_event_filters.is_empty()&& project_filters.is_empty()&& document_filters.is_empty()&& chat_filters.is_empty()diff --git a/crates/skills/src/outbound/soup_skill_lister.rs b/crates/skills/src/outbound/soup_skill_lister.rsindex 1ec42c97c9..1156e49bfc 100644--- a/crates/skills/src/outbound/soup_skill_lister.rs+++ b/crates/skills/src/outbound/soup_skill_lister.rs@@ -50,6 +50,7 @@ impl<S> Clone for SoupSkillLister<S> {/// entity type is force-filtered to the nil id so soup skips it entirely.fn skill_only_filter() -> EntityFilterAst {EntityFilterAst {+ favorites_only: None,document_filter: Some(Arc::new(Expr::val(DocumentLiteral::SubType(DocumentSubType::Skill,)))),diff --git a/crates/soup/Cargo.toml b/crates/soup/Cargo.tomlindex 1253b684d9..4320b10df4 100644--- a/crates/soup/Cargo.toml+++ b/crates/soup/Cargo.toml@@ -63,6 +63,7 @@ doppleganger = { workspace = true, features = ["chrono", "uuid"] }either = { workspace = true }email = { path = "../email", features = ["ports"] }entity_access = { path = "../entity_access", default-features = false }+favorites = { path = "../favorites", features = ["ports"] }filter_ast = { path = "../filter_ast" }foreign_entity = { path = "../foreign_entity", default-features = false, features = ["ports",diff --git a/crates/soup/src/domain/service.rs b/crates/soup/src/domain/service.rsindex f5b2611fde..d44a89fc81 100644--- a/crates/soup/src/domain/service.rs+++ b/crates/soup/src/domain/service.rs@@ -63,6 +63,7 @@ use std::sync::Arc;use uuid::Uuid;mod agent_metadata;+mod favorites;#[cfg(test)]mod tests;@@ -216,6 +217,7 @@ pub struct SoupImpl<T, U, V, C, K, Crm, F, Rem> {reminders_service: Rem,/// Optional captured branch facts supplied by the owning changes domain.agent_branches: Option<Arc<dyn agent_changes::domain::ports::SessionBranchReader>>,+ favorites: Option<Arc<dyn favorites::FavoriteReader>>,}impl<T, U, V, C, K, Crm, F, Rem> SoupImpl<T, U, V, C, K, Crm, F, Rem>@@ -252,6 +254,7 @@ whereforeign_entity_service,reminders_service,agent_branches: None,+ favorites: None,}}@@ -264,6 +267,30 @@ whereself}+ /// Attach the owning favorites service for viewer-scoped query filtering.+ pub fn with_favorites<S: ::favorites::domain::ports::FavoritesService>(+ mut self,+ service: Arc<S>,+ ) -> Self {+ self.favorites = Some(Arc::new(favorites::Reader(service)));+ self+ }++ async fn favorite_entities(+ &self,+ user: &MacroUserIdStr<'_>,+ ast: Option<&EntityFilterAst>,+ ) -> Result<Option<Vec<Entity<'static>>>, SoupErr> {+ if ast.and_then(|ast| ast.favorites_only) != Some(true) {+ return Ok(None);+ }+ let reader = self+ .favorites+ .as_ref()+ .ok_or_else(|| anyhow::anyhow!("Soup favorites reader is not configured"))?;+ Ok(Some(reader.read(user).await?))+ }+#[tracing::instrument(err, skip(self, req))]async fn handle_simple_request(&self,@@ -1518,7 +1545,20 @@ whereR: Clone + Serialize + Send,{let entity_filter = req.filters().clone();- let req = req.into_ast()?;+ let mut req = req.into_ast()?;+ if req.entity_ast().and_then(|ast| ast.favorites_only) == Some(true)+ && !matches!(&req.cursor, SoupQuery::Simple(_))+ {+ return Err(SoupErr::AstErr(item_filters::ast::ExpandErr::ApiAst(+ "favorites_only requires a timestamp sort".into(),+ )));+ }+ let favorite_entities = self.favorite_entities(&req.user, req.entity_ast()).await?;+ if let Some(entities) = &favorite_entities {+ req.cursor = req+ .cursor+ .map(|ast| ast.map(|ast| favorites::apply(ast, entities)));+ }let limit = req.limit.clamp(1, 500);// CRM-scoped visibility (team-wide email scope or hidden CRM@@ -1535,7 +1575,7 @@ where}// Borrow before email's builder consumes team_receipt.- let crm_company_request = req.build_crm_company_request(&team_receipt);+ let mut crm_company_request = req.build_crm_company_request(&team_receipt);let foreign_entity_source_ids = req.build_foreign_entity_source_ids(team_receipt.as_ref());let metadata_source_ids = foreign_entity_source_ids.clone();let metadata_user = req.user.to_string();@@ -1544,7 +1584,23 @@ wherelet comms_request = req.build_comms_request();let comms_thread_request = req.build_comms_thread_request();let call_request = req.build_call_request();- let reminder_request = req.build_reminder_request(limit.into());+ let mut reminder_request = req.build_reminder_request(limit.into());+ if let Some(entities) = &favorite_entities {+ crm_company_request = crm_company_request.and_then(|mut request| {+ favorites::intersect(+ &mut request.company_ids,+ favorites::ids(entities, EntityType::CrmCompany),+ )+ .then_some(request)+ });+ reminder_request = reminder_request.and_then(|mut request| {+ favorites::intersect(+ &mut request.reminder_ids,+ favorites::ids(entities, EntityType::Reminder),+ )+ .then_some(request)+ });+ }let sort_direction = req.sort_direction;let output: Result<SoupOutput<R, SoupCandidate>, SoupErr> = match req.cursor {@@ -1825,9 +1881,17 @@ where#[tracing::instrument(err, skip(self, req))]async fn get_user_soup_grouped(&self,- req: GroupedSortRequest<'_>,+ mut req: GroupedSortRequest<'_>,) -> Result<impl Iterator<Item = ItemGroupingInfo<SoupPropertiesField>> + Send, SoupErr> {let user_id = req.user_id.clone();+ if let Some(entities) = self+ .favorite_entities(&user_id, Some(req.cursor.filter()))+ .await?+ {+ req.cursor = req+ .cursor+ .map_filter(|ast| favorites::apply(ast, &entities));+ }let items = self.handle_grouped_soup_request(req).await?;self.populate_grouped_items(user_id, items).await}diff --git a/crates/soup/src/domain/service/favorites.rs b/crates/soup/src/domain/service/favorites.rsnew file mode 100644index 0000000000..f6a1ca3392--- /dev/null+++ b/crates/soup/src/domain/service/favorites.rs@@ -0,0 +1,136 @@+//! Resolve viewer-owned favorites before asking any domain for a page.+use super::*;+use ::favorites::domain::{models::FavoriteFilter, ports::FavoritesService};+use item_filters::ast::{+ agent_session::AgentSessionLiteral,+ calendar_event::CalendarEventLiteral,+ call::CallLiteral,+ chat::ChatLiteral,+ document::DocumentLiteral,+ initiative::{InitiativeLiteral, initiatives_requested},+ project::ProjectLiteral,+};+use std::{future::Future, pin::Pin};++#[cfg(test)]+mod test;++pub(super) trait FavoriteReader: Send + Sync {+ fn read<'a>(+ &'a self,+ user: &'a MacroUserIdStr<'_>,+ ) -> Pin<Box<dyn Future<Output = Result<Vec<Entity<'static>>, SoupErr>> + Send + 'a>>;+}++pub(super) struct Reader<S>(pub Arc<S>);++impl<S: FavoritesService> FavoriteReader for Reader<S> {+ fn read<'a>(+ &'a self,+ user: &'a MacroUserIdStr<'_>,+ ) -> Pin<Box<dyn Future<Output = Result<Vec<Entity<'static>>, SoupErr>> + Send + 'a>> {+ Box::pin(async move {+ let favorites = self+ .0+ .list_favorites(user, &FavoriteFilter::default())+ .await+ .map_err(anyhow::Error::from)?;+ Ok(favorites+ .into_iter()+ .map(|favorite| favorite.entity_type.with_entity_string(favorite.entity_id))+ .collect())+ })+ }+}++pub(super) fn ids(entities: &[Entity<'_>], kind: EntityType) -> Vec<Uuid> {+ entities+ .iter()+ .filter(|entity| entity.entity_type == kind)+ .filter_map(|entity| Uuid::parse_str(&entity.entity_id).ok())+ .collect()+}++fn constrain<T: Clone>(+ tree: &mut Option<Arc<Expr<T>>>,+ ids: Vec<Uuid>,+ literal: impl Fn(Uuid) -> T,+) {+ let ids = balanced_or_tree(ids.into_iter().map(|id| Expr::val(literal(id))).collect())+ .unwrap_or_else(|| Arc::new(Expr::val(literal(Uuid::nil()))));+ *tree = Some(with_id_tree(ids, tree.as_ref()));+}++pub(super) fn apply(mut ast: EntityFilterAst, entities: &[Entity<'_>]) -> EntityFilterAst {+ ast.favorites_only = None;+ constrain(+ &mut ast.document_filter,+ ids(entities, EntityType::Document),+ DocumentLiteral::Id,+ );+ constrain(+ &mut ast.project_filter,+ ids(entities, EntityType::Project),+ ProjectLiteral::ProjectIdSelf,+ );+ constrain(+ &mut ast.chat_filter,+ ids(entities, EntityType::Chat),+ ChatLiteral::ChatId,+ );+ constrain(+ &mut ast.email_filter.tree,+ ids(entities, EntityType::EmailThread),+ EmailLiteral::ThreadId,+ );+ constrain(+ &mut ast.channel_filter,+ ids(entities, EntityType::Channel),+ ChannelLiteral::ChannelId,+ );+ constrain(+ &mut ast.channel_thread_filter,+ ids(entities, EntityType::ChannelMessage),+ ChannelThreadLiteral::ThreadId,+ );+ constrain(+ &mut ast.call_filter,+ ids(entities, EntityType::Call),+ CallLiteral::CallId,+ );+ constrain(+ &mut ast.calendar_event_filter,+ ids(entities, EntityType::CalendarEvent),+ CalendarEventLiteral::Id,+ );+ constrain(+ &mut ast.foreign_entity_filter,+ ids(entities, EntityType::ForeignEntity),+ ForeignEntityLiteral::Id,+ );+ constrain(+ &mut ast.agent_session_filter,+ ids(entities, EntityType::AgentSession),+ AgentSessionLiteral::Id,+ );+ // Preserve initiatives' opt-in behavior when applying the favorite IDs.+ if initiatives_requested(ast.initiative_filter.as_deref()) {+ constrain(+ &mut ast.initiative_filter,+ ids(entities, EntityType::Initiative),+ InitiativeLiteral::Id,+ );+ }+ // CRM and reminders expose an ID-list service contract instead of arbitrary+ // AST evaluation. Intersect those lists separately, never OR them together.+ ast+}++pub(super) fn intersect(requested: &mut Vec<Uuid>, favorites: Vec<Uuid>) -> bool {+ if requested.is_empty() {+ *requested = favorites;+ } else {+ requested.retain(|id| favorites.contains(id));+ }+ !requested.is_empty()+}diff --git a/crates/soup/src/domain/service/favorites/test.rs b/crates/soup/src/domain/service/favorites/test.rsnew file mode 100644index 0000000000..221a26c62a--- /dev/null+++ b/crates/soup/src/domain/service/favorites/test.rs@@ -0,0 +1,119 @@+use super::*;++fn matches(tree: &Expr<EmailLiteral>, id: Uuid) -> bool {+ match tree {+ Expr::Literal(EmailLiteral::ThreadId(value)) => *value == id,+ Expr::And(a, b) => matches(a, id) && matches(b, id),+ Expr::Or(a, b) => matches(a, id) || matches(b, id),+ Expr::Not(a) => !matches(a, id),+ _ => panic!("expected an ID predicate"),+ }+}++#[test]+fn favorites_intersect_existing_filters_and_do_not_cross_entity_types() {+ let kept = Uuid::from_u128(1);+ let removed = Uuid::from_u128(2);+ let other = Uuid::from_u128(3);+ let mut ast = EntityFilterAst::default();+ ast.favorites_only = Some(true);+ ast.email_filter.tree = Some(Arc::new(Expr::is_not(Expr::val(EmailLiteral::ThreadId(+ removed,+ )))));+ let result = apply(+ ast,+ &[+ EntityType::EmailThread.with_entity_string(kept.to_string()),+ EntityType::EmailThread.with_entity_string(removed.to_string()),+ EntityType::Document.with_entity_string(other.to_string()),+ ],+ );+ let tree = result.email_filter.tree.unwrap();+ assert!(matches(&tree, kept));+ assert!(!matches(&tree, removed));+ assert!(!matches(&tree, other));+ assert_eq!(result.favorites_only, None);+}++#[test]+fn no_favorites_matches_no_emails() {+ let result = apply(EntityFilterAst::default(), &[]);+ assert!(!matches(+ result.email_filter.tree.as_deref().unwrap(),+ Uuid::from_u128(1)+ ));+}++fn matches_initiative(tree: &Expr<InitiativeLiteral>, id: Uuid) -> bool {+ match tree {+ Expr::Literal(InitiativeLiteral::Include) => true,+ Expr::Literal(InitiativeLiteral::Id(value)) => *value == id,+ Expr::And(a, b) => matches_initiative(a, id) && matches_initiative(b, id),+ Expr::Or(a, b) => matches_initiative(a, id) || matches_initiative(b, id),+ Expr::Not(a) => !matches_initiative(a, id),+ _ => panic!("expected an initiative ID or include predicate"),+ }+}++#[test]+fn favorite_initiatives_still_require_explicit_opt_in() {+ let id = Uuid::from_u128(1);+ for initiative_filter in [+ None,+ Some(Arc::new(Expr::is_not(Expr::val(InitiativeLiteral::Id(id))))),+ ] {+ let ast = EntityFilterAst {+ initiative_filter,+ ..Default::default()+ };+ let result = apply(+ ast,+ &[EntityType::Initiative.with_entity_string(id.to_string())],+ );+ assert!(!initiatives_requested(result.initiative_filter.as_deref()));+ }+}++#[test]+fn requested_initiatives_intersect_favorites_and_existing_filters() {+ let kept = Uuid::from_u128(1);+ let excluded = Uuid::from_u128(2);+ let other = Uuid::from_u128(3);+ let ast = EntityFilterAst {+ initiative_filter: Some(Arc::new(Expr::and(+ Expr::val(InitiativeLiteral::Include),+ Expr::is_not(Expr::val(InitiativeLiteral::Id(excluded))),+ ))),+ ..Default::default()+ };+ let result = apply(+ ast.clone(),+ &[+ EntityType::Initiative.with_entity_string(kept.to_string()),+ EntityType::Initiative.with_entity_string(excluded.to_string()),+ EntityType::Document.with_entity_string(other.to_string()),+ ],+ );+ let tree = result.initiative_filter.as_deref().unwrap();+ assert!(matches_initiative(tree, kept));+ assert!(!matches_initiative(tree, excluded));+ assert!(!matches_initiative(tree, other));+ let empty = apply(ast, &[]);+ assert!(!matches_initiative(+ empty.initiative_filter.as_deref().unwrap(),+ kept+ ));+}++#[test]+fn id_list_services_intersect_instead_of_widening() {+ let a = Uuid::from_u128(1);+ let b = Uuid::from_u128(2);+ let mut requested = vec![a, b];+ assert!(intersect(&mut requested, vec![b]));+ assert_eq!(requested, vec![b]);+ assert!(!intersect(&mut requested, vec![a]));+ let mut all = vec![];+ assert!(intersect(&mut all, vec![a]));+ assert_eq!(all, vec![a]);+}diff --git a/crates/soup/src/domain/service/tests.rs b/crates/soup/src/domain/service/tests.rsindex 9c201007ed..cbd130f531 100644--- a/crates/soup/src/domain/service/tests.rs+++ b/crates/soup/src/domain/service/tests.rs@@ -49,6 +49,7 @@ use super::*;mod agent_metadata;mod exclusions;+mod favorites;struct NoopEmailPreviewService;diff --git a/crates/soup/src/domain/service/tests/favorites.rs b/crates/soup/src/domain/service/tests/favorites.rsnew file mode 100644index 0000000000..78449f4cf3--- /dev/null+++ b/crates/soup/src/domain/service/tests/favorites.rs@@ -0,0 +1,86 @@+use super::super::favorites::FavoriteReader;+use super::*;++struct ViewerFavorites;++impl FavoriteReader for ViewerFavorites {+ fn read<'a>(+ &'a self,+ user: &'a MacroUserIdStr<'_>,+ ) -> std::pin::Pin<+ Box<dyn Future<Output = Result<Vec<model_entity::Entity<'static>>, SoupErr>> + Send + 'a>,+ > {+ assert_eq!(user.as_ref(), "macro|[email protected]");+ Box::pin(async {+ Ok(vec![+ EntityType::Document.with_entity_string(Uuid::from_u128(1).to_string()),+ ])+ })+ }+}++#[tokio::test]+async fn favorites_are_scoped_before_pagination_and_cursor_keeps_the_filter() {+ let mut repo = MockSoupRepo::new();+ repo.expect_unexpanded_generic_cursor_soup()+ .times(1)+ .returning(|request| {+ assert_eq!(request.user_id.as_ref(), "macro|[email protected]");+ assert_eq!(request.limit, 1);+ let SimpleSortQuery::ItemsFilter(query) = request.cursor else {+ panic!("filtered query")+ };+ let filter = query.filter();+ assert_eq!(filter.favorites_only, None);+ assert_matches!(filter.document_filter.as_deref().unwrap(),+ Expr::Literal(item_filters::ast::document::DocumentLiteral::Id(id)) => {+ assert_eq!(*id, Uuid::from_u128(1));+ }+ );+ Box::pin(async {+ Ok(vec![SoupItem::Document(soup_document_uuid_with_updated(+ Uuid::from_u128(1),+ DateTime::default(),+ ))])+ })+ });+ let mut service = SoupImpl::new(+ repo,+ FrecencyQueryServiceImpl::new(MockFrecencyStorage::new()),+ NoopEmailPreviewService,+ NoopCommsService,+ NoopCallRecordQueryService,+ NoOpCrmService,+ NoopForeignEntityService,+ NoOpRemindersService,+ );+ service.favorites = Some(Arc::new(ViewerFavorites));+ let filters = EntityFilterAst {+ favorites_only: Some(true),+ ..Default::default()+ };+ let page = service+ .get_user_soup(+ SoupRequest {+ soup_type: SoupType::UnExpanded,+ limit: 1,+ cursor: SoupQuery::new_sort_simple(SimpleSortMethod::UpdatedAt, filters.clone()),+ sort_direction: SoupSortDirection::Desc,+ user: MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap(),+ email_preview_view: PreviewView::default(),+ link_ids: vec![],+ },+ None,+ )+ .await+ .unwrap()+ .into_simple()+ .unwrap();+ assert_eq!(page.items.len(), 1);+ let cursor: CursorWithValAndFilter<String, SimpleSortMethod, EntityFilterAst> =+ page.next_cursor.unwrap().decode_json().unwrap();+ assert_eq!(+ serde_json::to_value(cursor.filter).unwrap(),+ serde_json::to_value(filters).unwrap()+ );+}diff --git a/crates/soup/src/inbound/axum_router.rs b/crates/soup/src/inbound/axum_router.rsindex 5378eee4a0..ff1749cda4 100644--- a/crates/soup/src/inbound/axum_router.rs+++ b/crates/soup/src/inbound/axum_router.rs@@ -1187,6 +1187,9 @@ where/// Wire-format entity filter AST accepted by soup AST endpoints.#[derive(Debug, Default, Serialize, Deserialize, Clone, ToSchema)]pub struct ApiEntityFilterAst {+ /// Restrict to the authenticated viewer's favorites before pagination when true.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub favorites_only: Option<bool>,/// filters applied to canonical calendar events#[serde(default, rename = "calf")]#[schema(value_type = serde_json::Value)]@@ -1333,6 +1336,7 @@ impl ApiEntityFilterAst {#[tracing::instrument(err, skip(self))]fn into_entity_ast(self) -> Result<EntityFilterAst, Report> {let ApiEntityFilterAst {+ favorites_only,calendar_event_filter,document_filter,project_filter,@@ -1399,6 +1403,7 @@ impl ApiEntityFilterAst {};Ok(EntityFilterAst {+ favorites_only,calendar_event_filter,document_filter,project_filter,diff --git a/crates/soup/src/inbound/toolset/list_entities.rs b/crates/soup/src/inbound/toolset/list_entities.rsindex 067708a936..6fbc26d869 100644--- a/crates/soup/src/inbound/toolset/list_entities.rs+++ b/crates/soup/src/inbound/toolset/list_entities.rs@@ -549,6 +549,7 @@ impl ListEntities {};let ast = EntityFilterAst {+ favorites_only: None,calendar_event_filter: None,document_filter: self.document_filter.clone(),project_filter: self.project_filter.clone(),@@ -594,6 +595,7 @@ impl ListEntities {};EntityFilterAst {+ favorites_only: ast.favorites_only,calendar_event_filter: if include_types.contains(&ItemType::CalendarEvent) {ast.calendar_event_filter} else {diff --git a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rsindex f9045dcc8c..99e4f0ce83 100644--- a/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs+++ b/crates/soup/src/outbound/pg_soup_repo/expanded/tests.rs@@ -5912,6 +5912,7 @@ fn mock_empty_ast() -> EntityFilterAst {agent_session_filter: None,initiative_filter: None,properties_filter: None,+ favorites_only: None,}}diff --git a/crates/soup_filter_cache_adapter/src/notifications.rs b/crates/soup_filter_cache_adapter/src/notifications.rsindex 7916c17931..b2867ee885 100644--- a/crates/soup_filter_cache_adapter/src/notifications.rs+++ b/crates/soup_filter_cache_adapter/src/notifications.rs@@ -278,7 +278,7 @@ async fn retain_complete_parents<S: Storage>(if document.record_key == *record_key&& (document.profile == *profile|| (*profile == vocabulary::profile_v4()- && document.profile == vocabulary::profile_v5()))+ && document.profile == vocabulary::profile_v6()))&& document.partition == *partition)})diff --git a/crates/soup_filter_cache_adapter/src/properties.rs b/crates/soup_filter_cache_adapter/src/properties.rsindex 23b04f097d..450b529c10 100644--- a/crates/soup_filter_cache_adapter/src/properties.rs+++ b/crates/soup_filter_cache_adapter/src/properties.rs@@ -28,7 +28,7 @@ fn error(error: impl std::fmt::Display) -> SoupFilterCacheAdapterError {fn current_profile(profile: &Profile) -> Profile {if profile == &vocabulary::profile_v4() {- vocabulary::profile_v5()+ vocabulary::profile_v6()} else if profile == &item_filter_index::mail::profile() {facts::mail_profile()} else {@@ -37,7 +37,7 @@ fn current_profile(profile: &Profile) -> Profile {}fn legacy_profile(profile: &Profile) -> Profile {- if profile == &vocabulary::profile_v5() {+ if profile == &vocabulary::profile_v6() {vocabulary::profile_v4()} else if profile == &facts::mail_profile() {item_filter_index::mail::profile()@@ -47,7 +47,11 @@ fn legacy_profile(profile: &Profile) -> Profile {}fn is_current(profile: &Profile) -> bool {- profile == &vocabulary::profile_v5() || profile == &facts::mail_profile()+ profile == &vocabulary::profile_v6() || profile == &facts::mail_profile()+}++fn is_extension_attribute(attribute: &Token) -> bool {+ facts::is_property_attribute(attribute) || attribute.as_str() == "is-favorited"}fn property_facts(state: Option<&ProjectionState>) -> Option<Vec<ExactFact>> {@@ -58,7 +62,7 @@ fn property_facts(state: Option<&ProjectionState>) -> Option<Vec<ExactFact>> {document.exact_facts.iter()- .filter(|fact| facts::is_property_attribute(&fact.attribute))+ .filter(|fact| is_extension_attribute(&fact.attribute)).cloned().collect()})@@ -70,7 +74,7 @@ fn legacy_state(mut state: ProjectionState) -> ProjectionState {document.profile = legacy_profile(&document.profile);document.exact_facts- .retain(|fact| !facts::is_property_attribute(&fact.attribute));+ .retain(|fact| !is_extension_attribute(&fact.attribute));}ProjectionState::Incomplete { profile, .. } => *profile = legacy_profile(profile),}@@ -91,12 +95,14 @@ fn extend_document(properties: Option<Vec<ExactFact>>,) -> ProjectionMutation {document.profile = current_profile(&document.profile);- if document.partition != vocabulary::channel_partition() {- let Some(properties) = properties else {- return incomplete(document.record_key, document.profile, document.partition);- };- document.exact_facts.extend(properties);- }+ let Some(properties) = properties.filter(|facts| {+ facts+ .iter()+ .any(|fact| fact.attribute.as_str() == "is-favorited")+ }) else {+ return incomplete(document.record_key, document.profile, document.partition);+ };+ document.exact_facts.extend(properties);document.canonicalize();if document.validate().is_err() {return incomplete(document.record_key, document.profile, document.partition);@@ -199,9 +205,7 @@ pub fn current_mutations(mutations: Vec<ProjectionMutation>) -> Vec<ProjectionMu.map(|mut mutation| {match &mut mutation {ProjectionMutation::Replace(document) => {- if !is_current(&document.profile)- && document.partition != vocabulary::channel_partition()- {+ if !is_current(&document.profile) {return incomplete(document.record_key.clone(),current_profile(&document.profile),diff --git a/crates/soup_filter_cache_adapter/src/properties/optimistic.rs b/crates/soup_filter_cache_adapter/src/properties/optimistic.rsindex d3954ddcea..9520b98ad6 100644--- a/crates/soup_filter_cache_adapter/src/properties/optimistic.rs+++ b/crates/soup_filter_cache_adapter/src/properties/optimistic.rs@@ -54,7 +54,7 @@ pub async fn augment_optimistic<S: PredicateIndexStorage>(.exact_facts.iter().chain(&document.exact_facts)- .filter(|fact| !facts::is_property_attribute(&fact.attribute))+ .filter(|fact| !is_extension_attribute(&fact.attribute)).map(|fact| fact.attribute.clone()).collect();OptimisticProjectionMutation::Patch {diff --git a/crates/soup_filter_cache_adapter/src/properties/prepare.rs b/crates/soup_filter_cache_adapter/src/properties/prepare.rsindex e1bf4747d9..ec3fc3af47 100644--- a/crates/soup_filter_cache_adapter/src/properties/prepare.rs+++ b/crates/soup_filter_cache_adapter/src/properties/prepare.rs@@ -14,15 +14,24 @@ use uuid::Uuid;#[derive(Default)]pub(super) struct Changes {+ favorite: Option<bool>,snapshot: Option<Result<Vec<ExactFact>, ()>>,values: BTreeMap<Uuid, Result<Vec<ExactFact>, ()>>,}impl Changes {pub(super) fn apply(&self, base: Option<Vec<ExactFact>>) -> Option<Vec<ExactFact>> {+ let favorite = self.favorite.map(favorite_fact).or_else(|| {+ base.as_ref()?+ .iter()+ .find(|fact| fact.attribute.as_str() == "is-favorited")+ .cloned()+ });let mut result = match &self.snapshot {Some(snapshot) => snapshot.clone().ok()?,None => base?,};+ result.retain(|fact| fact.attribute.as_str() != "is-favorited");+ result.extend(favorite);for (definition, value) in &self.values {let value = value.as_ref().ok()?;let attributes = attributes(*definition);@@ -36,9 +45,18 @@ impl Changes {let mut values = Vec::new();if let Some(snapshot) = &self.snapshot {values = snapshot.as_ref().ok()?.clone();- selected.extend(base.iter().map(|fact| fact.attribute.clone()));+ selected.extend(+ base.iter()+ .filter(|fact| facts::is_property_attribute(&fact.attribute))+ .map(|fact| fact.attribute.clone()),+ );selected.extend(values.iter().map(|fact| fact.attribute.clone()));}+ if let Some(favorite) = self.favorite {+ let fact = favorite_fact(favorite);+ selected.insert(fact.attribute.clone());+ values.push(fact);+ }for (definition, value) in &self.values {let value = value.as_ref().ok()?;let attributes = attributes(*definition);@@ -61,6 +79,12 @@ impl Changes {)}}+fn favorite_fact(value: bool) -> ExactFact {+ ExactFact {+ attribute: item_filter_index::mail::token("is-favorited"),+ value: ExactValue::new([u8::from(value)]).expect("boolean fact is bounded"),+ }+}fn attributes(definition: Uuid) -> [Token; 3] {[facts::select_attribute(definition),@@ -94,6 +118,7 @@ fn is_parent(key: &EntityKey<'_>) -> bool {"GraphqlSoupProject:","GraphqlSoupChat:","GraphqlSoupEmailThread:",+ "GraphqlSoupChannel:",].iter().any(|prefix| key.as_ref().starts_with(prefix))@@ -244,7 +269,7 @@ async fn owners<S: PredicateIndexStorage>(let mut result = Vec::new();for (profile, partitions, sort) in [(- vocabulary::profile_v5(),+ vocabulary::profile_v6(),vec![vocabulary::document_partition(),vocabulary::project_partition(),@@ -313,6 +338,15 @@ pub(super) async fn prepare<S: PredicateIndexStorage>(if !is_parent(key) {continue;}+ if let Some(CacheValue::Bool(favorite)) = record.fields.get("isFavorited") {+ let change = result+ .entry(RecordKey::new(key.to_string()).map_err(error)?)+ .or_default();+ change.favorite = Some(*favorite);+ if key.as_ref().starts_with("GraphqlSoupChannel:") {+ change.snapshot = Some(Ok(vec![]));+ }+ }if let Some(properties) = record.fields.get("properties") {if let CacheValue::List(properties) = properties {snapshot_children.extend(properties.iter().filter_map(|v| {diff --git a/crates/soup_filter_cache_adapter/src/properties/test.rs b/crates/soup_filter_cache_adapter/src/properties/test.rsindex f706f96c9d..29997f0d76 100644--- a/crates/soup_filter_cache_adapter/src/properties/test.rs+++ b/crates/soup_filter_cache_adapter/src/properties/test.rs@@ -10,6 +10,7 @@ use uuid::Uuid;const QUERY: &str = include_str!("test/project.graphql");const SET: &str = include_str!("test/set.graphql");+const FAVORITE: &str = include_str!("test/favorite.graphql");const VIEWER: &str = "macro|[email protected]";fn id(n: u128) -> String {Uuid::from_u128(n).to_string()@@ -22,7 +23,7 @@ fn property(n: u128, option: u128) -> Value {}fn data() -> Value {json!({"user": {"id": VIEWER, "soup": {"items": [{- "__typename": "GraphqlSoupProject", "id": id(100), "cacheProjection": null,+ "__typename": "GraphqlSoupProject", "id": id(100), "isFavorited": true, "cacheProjection": null,"ownerId": VIEWER, "parentId": null, "createdAt": "2025-01-01T00:00:00Z", "updatedAt": "2025-01-02T00:00:00Z", "notifications": [],"properties": [property(1, 11), property(2, 22)],}]}}})@@ -41,6 +42,109 @@ fn filters(property: Option<Value>) -> Value {}filters}++#[test]+fn favorites_membership_changes_optimistically_and_rolls_back_without_a_new_query() {+ pollster::block_on(async {+ let mut engine =+ Engine::new(cache_turso::TursoStorage::open_in_memory("favorites").unwrap());+ write(&mut engine, QUERY, &Map::new(), &data(), VIEWER).await;+ let mut filter = filters(None);+ filter["favoritesOnly"] = json!(true);+ let crate::SoupFilterCompileOutcome::Supported(query) =+ crate::compile_current_filter_request(filter, "UPDATED_AT", "DESC", 100).unwrap()+ else {+ panic!("favorite filter must be supported");+ };+ assert_eq!(+ engine+ .reconcile_predicate_index(&query, &[])+ .await+ .unwrap()+ .value+ .keys,+ vec![key()]+ );+ let vars = json!({"entity":{"type":"PROJECT","id":id(100)},"favorite":false})+ .as_object()+ .unwrap()+ .clone();+ let removal = json!({"setFavorite":{"result":{"__typename":"GraphqlMutationSuccess","effects":[{+ "__typename":"SoupUpdated","item":{"__typename":"GraphqlSoupProject","id":id(100),"isFavorited":false}+ }]}}});+ let core = crate::optimistic_projection_mutations(&removal, 0);+ let projections =+ augment_optimistic(engine.storage(), FAVORITE, None, &vars, &removal, core)+ .await+ .unwrap();+ let queued = engine+ .enqueue_optimistic_mutation_with_projections(+ None,+ BeginOptimisticWrite {+ uuid: "00000000-0000-7000-8000-000000000007",+ query: FAVORITE,+ operation_name: None,+ variables: &vars,+ data: &removal,+ link_patches: &[],+ revalidations: &[],+ created_at_ms: 0,+ },+ MutationClaimRequest {+ owner: "runner".into(),+ now_ms: 0,+ lease_expires_at_ms: 1000,+ },+ projections,+ )+ .await+ .unwrap();+ assert!(+ engine+ .reconcile_predicate_index(&query, &[])+ .await+ .unwrap()+ .value+ .keys+ .is_empty()+ );+ // Unrelated properties remain live while the favorite write is pending.+ assert!(matches(&mut engine, literal(1, 11)).await);+ let InitialClaimOutcome::Claimed(claim) = queued.initial_claim else {+ panic!("initial claim")+ };+ engine+ .rollback_optimistic_write(+ queued.transaction_id,+ MutationClaimToken {+ owner: "runner".into(),+ generation: claim.lease_generation,+ },+ )+ .await+ .unwrap();+ assert_eq!(+ engine+ .reconcile_predicate_index(&query, &[])+ .await+ .unwrap()+ .value+ .keys,+ vec![key()]+ );+ write(&mut engine, FAVORITE, &vars, &removal, VIEWER).await;+ assert!(+ engine+ .reconcile_predicate_index(&query, &[])+ .await+ .unwrap()+ .value+ .keys+ .is_empty()+ );+ assert!(matches(&mut engine, literal(1, 11)).await);+ });+}fn literal(definition: u128, option: u128) -> Value {json!({"literal":{"propertyDefinitionId": id(definition), "value":{"selectOption":id(option)}}})}@@ -354,7 +458,7 @@ fn property_optimism_only_patches_the_modified_definition() {else {panic!("property patch expected")};- assert_eq!(profile, &vocabulary::profile_v5());+ assert_eq!(profile, &vocabulary::profile_v6());assert_eq!(exact.len(), 3);assert!(exactdiff --git a/crates/soup_filter_cache_adapter/src/properties/test/favorite.graphql b/crates/soup_filter_cache_adapter/src/properties/test/favorite.graphqlnew file mode 100644index 0000000000..43cb982e62--- /dev/null+++ b/crates/soup_filter_cache_adapter/src/properties/test/favorite.graphql@@ -0,0 +1,15 @@+mutation SetFavorite($entity: EntityRefInput!, $favorite: Boolean!) {+ setFavorite(entity: $entity, favorite: $favorite) {+ result {+ __typename+ ... on GraphqlMutationSuccess {+ effects {+ __typename+ ... on SoupUpdated {+ item { __typename id isFavorited }+ }+ }+ }+ }+ }+}diff --git a/crates/soup_filter_cache_adapter/src/properties/test/project.graphql b/crates/soup_filter_cache_adapter/src/properties/test/project.graphqlindex 400ab6dd8c..8ebe662ee4 100644--- a/crates/soup_filter_cache_adapter/src/properties/test/project.graphql+++ b/crates/soup_filter_cache_adapter/src/properties/test/project.graphql@@ -3,7 +3,7 @@ query PropertySeed {idsoup(input: {initial: {limit: 100}}) {items {- __typename id cacheProjection+ __typename id isFavorited cacheProjection... on GraphqlSoupProject {ownerId parentId createdAt updatedAt notifications { id }properties {diff --git a/crates/soup_filter_cache_adapter/src/test/file_type.rs b/crates/soup_filter_cache_adapter/src/test/file_type.rsindex 91f0a29e36..e9f39129cc 100644--- a/crates/soup_filter_cache_adapter/src/test/file_type.rs+++ b/crates/soup_filter_cache_adapter/src/test/file_type.rs@@ -41,6 +41,7 @@ fn item(index: usize) -> Value {);item["fileType"] = json!(FILE_TYPES[index]);item["properties"] = json!([]);+ item["isFavorited"] = json!(false);item}fn filters(document: Value) -> Value {@@ -149,7 +150,7 @@ fn expressions() -> Vec<Value> {async fn seed<S: PredicateIndexStorage>(engine: &mut Engine<S>) {let query = SUPPLEMENT_BACKFILL.replace("user {", "user { id")- .replace("fileType", "fileType properties { id }");+ .replace("fileType", "fileType isFavorited properties { id }");let data = json!({"user":{"id":"viewer","soup":{"items":(0..FILE_TYPES.len()).map(item).collect::<Vec<_>>()}}});let vars = serde_json::Map::new();let projections =diff --git a/packages/sdk/generated/search/types.gen.ts b/packages/sdk/generated/search/types.gen.tsindex 46440d805b..cbba5f39fb 100644--- a/packages/sdk/generated/search/types.gen.ts+++ b/packages/sdk/generated/search/types.gen.ts@@ -1320,6 +1320,10 @@ export type EntityFilters = {* the bundled [EmailFilters]*/email_filters?: EmailFilters;+ /**+ * Restrict results to the authenticated viewer's favorites when true.+ */+ favorites_only?: boolean | null;/*** the bundled [ForeignEntityFilters]*/diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.tsindex dbc01f0c6c..b8a42a7322 100644--- a/packages/sdk/generated/storage/types.gen.ts+++ b/packages/sdk/generated/storage/types.gen.ts@@ -924,6 +924,10 @@ export type ApiEntityFilterAst = {* unlike the materialized [`EntityFilterAst`] used for cursors.*/ef?: unknown;+ /**+ * Restrict to the authenticated viewer's favorites before pagination when true.+ */+ favorites_only?: boolean | null;/*** the filters that should be applied to foreign entity records*/@@ -5471,6 +5475,10 @@ export type EntityFilters = {* the bundled [EmailFilters]*/email_filters?: EmailFilters;+ /**+ * Restrict results to the authenticated viewer's favorites when true.+ */+ favorites_only?: boolean | null;/*** the bundled [ForeignEntityFilters]*/diff --git a/packages/sdk/specs/search.json b/packages/sdk/specs/search.jsonindex 476c2eee6f..ea1ea09341 100644--- a/packages/sdk/specs/search.json+++ b/packages/sdk/specs/search.json@@ -2163,6 +2163,10 @@"$ref": "#/components/schemas/EmailFilters","description": "the bundled [EmailFilters]"},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict results to the authenticated viewer's favorites when true."+ },"foreign_entity_filters": {"$ref": "#/components/schemas/ForeignEntityFilters","description": "the bundled [ForeignEntityFilters]"diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.jsonindex dde88124d0..cc29f6eb06 100644--- a/packages/sdk/specs/storage.json+++ b/packages/sdk/specs/storage.json@@ -16883,6 +16883,10 @@"ef": {"description": "the filters that should be applied to the email entity (raw AST\ntree only; CRM scope is carried by the `ecd` / `eca` sibling\nfields). On this endpoint the email filter stays a bare tree,\nunlike the materialized [`EntityFilterAst`] used for cursors."},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict to the authenticated viewer's favorites before pagination when true."+ },"fef": {"description": "the filters that should be applied to foreign entity records"},@@ -23459,6 +23463,10 @@"$ref": "#/components/schemas/EmailFilters","description": "the bundled [EmailFilters]"},+ "favorites_only": {+ "type": ["boolean", "null"],+ "description": "Restrict results to the authenticated viewer's favorites when true."+ },"foreign_entity_filters": {"$ref": "#/components/schemas/ForeignEntityFilters","description": "the bundled [ForeignEntityFilters]"diff --git a/services/document_storage_service/src/main.rs b/services/document_storage_service/src/main.rsindex 8b92d8d55a..8eb5ecac79 100644--- a/services/document_storage_service/src/main.rs+++ b/services/document_storage_service/src/main.rs@@ -1283,6 +1283,8 @@ async fn run() -> anyhow::Result<()> {)),);+ let favorites_service = Arc::new(FavoritesServiceImpl::new(PgFavoritesRepo::new(db.clone())));+// Keep the replica-backed Soup reader alongside the primary-backed email// writer in SoupRouterState. REST, GraphQL lists, and realtime hydration// share this reader; only email mutations and their reply loader use the@@ -1304,6 +1306,7 @@ async fn run() -> anyhow::Result<()> {ForeignEntityServiceImpl::new(PgForeignEntityRepo::new(readonly_db.clone())),reminders_service.clone(),)+ .with_favorites(favorites_service.clone()).with_agent_branches(agent_changes::outbound::postgres::PgChangesetRepo::new(readonly_db.clone(),)),@@ -1483,7 +1486,6 @@ async fn run() -> anyhow::Result<()> {}});- let favorites_service = Arc::new(FavoritesServiceImpl::new(PgFavoritesRepo::new(db.clone())));let favorites_mutation_service = Arc::new(FavoritesMutationServiceImpl::new(favorites_service.clone(),entity_access_service.clone(),diff --git a/static_assets/schema.graphql b/static_assets/schema.graphqlindex 44008e593e..d85478a80a 100644--- a/static_assets/schema.graphql+++ b/static_assets/schema.graphql@@ -2174,6 +2174,10 @@ enum GraphqlEntityAccessLevel {GraphQL input mirroring `item_filters::ast::EntityFilterAst`."""input GraphqlEntityFilterAst {+ """+ Restrict results to the authenticated viewer's favorites when true.+ """+ favoritesOnly: Boolean"""The calendar event filter to apply."""