Skip to content

armgit / macro

Public Imported from GitHub
0

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

feat(soup): graphql backfill and entity notifications (#4759)

dev-rb07773d92f2a1
diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
index 8c78c17551..0461ddbc04 100644
--- a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
+++ b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
@@ -55,6 +55,7 @@ import {
type EntityData,
getPropertyOptionLabel,
isWithNotification,
+ type Notification,
toNotificationEntity,
} from '@entity';
import { useNotificationsForEntity } from '@notifications';
@@ -185,6 +186,17 @@ const VALID_API_SORT_METHODS: ApiSortMethod[] = [
'viewed_updated',
];
+type EntityWithRawNotifications = EntityData & {
+ notifications?: Notification[];
+};
+
+function rawEntityNotifications(
+ entity: EntityData
+): Notification[] | undefined {
+ const notifications = (entity as EntityWithRawNotifications).notifications;
+ return Array.isArray(notifications) ? notifications : undefined;
+}
+
export const SoupViewContextProvider: FlowComponent<
SoupViewContextProviderProps
> = (props) => {
@@ -405,7 +417,9 @@ export const SoupViewContextProvider: FlowComponent<
// The group-by actually sent to the backend (drives the grouped queries).
const serverGroupByField = createMemo(() =>
- isClientPropertyGroup() ? undefined : groupByField()
+ isClientPropertyGroup() || groupByField()?.type === 'date'
+ ? undefined
+ : groupByField()
);
// The new inbox surfaces channel threads the current user participates in —
@@ -522,7 +536,29 @@ export const SoupViewContextProvider: FlowComponent<
resolveCompanyStage,
});
+ // This is temporary while we are experimenting/handling
+ // the migration to graphql. We should not need this since
+ // the items themselves have the notifications on them. Remove
+ // when completely migrated
const attachNotifications = (entity: EntityData) => {
+ const rawNotifications = rawEntityNotifications(entity);
+ if (rawNotifications) {
+ const {
+ notifications: _notifications,
+ ...entityWithoutRawNotifications
+ } = entity as EntityWithRawNotifications;
+ return {
+ ...entityWithoutRawNotifications,
+ notifications: () =>
+ isNewInbox()
+ ? scopeChannelNotificationsForEntity(
+ entityWithoutRawNotifications,
+ rawNotifications
+ )
+ : rawNotifications,
+ };
+ }
+
const notifications = useNotificationsForEntity(
notificationSource,
toNotificationEntity(entity)
@@ -682,7 +718,7 @@ export const SoupViewContextProvider: FlowComponent<
for (let i = 0; i < merged.length; i++) {
const entity = merged[i];
- if (entity.notifications) continue;
+ if (isWithNotification(entity)) continue;
merged[i] = attachNotifications(entity);
}
diff --git a/apps/web/src/lib/queries/soup/backfill.ts b/apps/web/src/lib/queries/soup/backfill.ts
new file mode 100644
index 0000000000..dce06f74a9
--- /dev/null
+++ b/apps/web/src/lib/queries/soup/backfill.ts
@@ -0,0 +1,365 @@
+import { createTabLeaderSignal } from '@notifications/notification-election';
+import {
+ fetchGraphqlSoup,
+ type GraphqlSoupInput,
+ graphqlCacheEnabled,
+} from '@service-storage/graphql-soup';
+import { useQuery } from '@tanstack/solid-query';
+import type { Accessor } from 'solid-js';
+
+const BACKFILL_VERSION = 1;
+const PAGE_LIMIT = 250;
+const PAGE_DELAY_MS = 2_000;
+const INITIAL_RETRY_DELAY_MS = 1_000;
+const MAX_RETRY_DELAY_MS = 30_000;
+const EXCLUDED_ENTITY_ID = '00000000-0000-0000-0000-000000000000';
+
+export type SoupBackfillParams = {
+ /** Stable checkpoint namespace. Change it when the input changes. */
+ checkpointId: string;
+ /** Soup input shared by every page. The backfill manages the cursor. */
+ input: Omit<GraphqlSoupInput, 'cursor'>;
+ /** Delay between successful pages. Defaults to five seconds. */
+ pageDelayMs?: number;
+};
+
+export const ALL_SOUP_BACKFILL_PARAMS: SoupBackfillParams = {
+ checkpointId: 'all',
+ input: {
+ limit: PAGE_LIMIT,
+ expand: true,
+ sortMethod: 'VIEWED_UPDATED',
+ emailView: 'ALL',
+ filters: {
+ emailFilter: { tree: { literal: { threadId: EXCLUDED_ENTITY_ID } } },
+ channelThreadFilter: { literal: { threadId: EXCLUDED_ENTITY_ID } },
+ },
+ },
+};
+
+/**
+ * Fetches email threads while excluding every other entity variant with an
+ * impossible id filter.
+ */
+export const EMAIL_SOUP_BACKFILL_PARAMS: SoupBackfillParams = {
+ checkpointId: 'email-all',
+ input: {
+ limit: PAGE_LIMIT,
+ expand: true,
+ sortMethod: 'VIEWED_UPDATED',
+ emailView: 'ALL',
+ filters: {
+ documentFilter: { literal: { id: EXCLUDED_ENTITY_ID } },
+ projectFilter: { literal: { projectIdSelf: EXCLUDED_ENTITY_ID } },
+ chatFilter: { literal: { chatId: EXCLUDED_ENTITY_ID } },
+ channelFilter: { literal: { channelId: EXCLUDED_ENTITY_ID } },
+ channelThreadFilter: { literal: { threadId: EXCLUDED_ENTITY_ID } },
+ callFilter: { literal: { callId: EXCLUDED_ENTITY_ID } },
+ crmCompanyFilter: { literal: { id: EXCLUDED_ENTITY_ID } },
+ foreignEntityFilter: { literal: { id: EXCLUDED_ENTITY_ID } },
+ },
+ },
+};
+
+export type SoupBackfillCheckpoint = {
+ userId: string;
+ nextCursor: string | null;
+ pagesFetched: number;
+ itemsFetched: number;
+ completed: boolean;
+ /** Start of the pass currently being fetched. */
+ scanStartedAt: string | null;
+ /** Safe lower bound applied to updatedAt filters on the next pass. */
+ updatedSince: string | null;
+ /** Wall-clock time when the most recent pass reached its final page. */
+ completedAt: string | null;
+};
+
+type StoredSoupBackfillCheckpoint = Omit<
+ SoupBackfillCheckpoint,
+ 'scanStartedAt' | 'updatedSince' | 'completedAt'
+> &
+ Partial<
+ Pick<
+ SoupBackfillCheckpoint,
+ 'scanStartedAt' | 'updatedSince' | 'completedAt'
+ >
+ >;
+
+function checkpointKey(userId: string, checkpointId: string): string {
+ const baseKey = `graphql-soup-backfill:v${BACKFILL_VERSION}:${userId}`;
+ // Preserve the original all-Soup checkpoint key.
+ return checkpointId === ALL_SOUP_BACKFILL_PARAMS.checkpointId
+ ? baseKey
+ : `${baseKey}:${checkpointId}`;
+}
+
+function initialCheckpoint(userId: string): SoupBackfillCheckpoint {
+ return {
+ userId,
+ nextCursor: null,
+ pagesFetched: 0,
+ itemsFetched: 0,
+ completed: false,
+ scanStartedAt: null,
+ updatedSince: null,
+ completedAt: null,
+ };
+}
+
+function isOptionalTimestamp(value: unknown): boolean {
+ return value === undefined || value === null || typeof value === 'string';
+}
+
+function isCheckpoint(
+ value: unknown,
+ userId: string
+): value is StoredSoupBackfillCheckpoint {
+ if (!value || typeof value !== 'object') return false;
+
+ const checkpoint = value as Partial<SoupBackfillCheckpoint>;
+ return (
+ checkpoint.userId === userId &&
+ (typeof checkpoint.nextCursor === 'string' ||
+ checkpoint.nextCursor === null) &&
+ typeof checkpoint.pagesFetched === 'number' &&
+ typeof checkpoint.itemsFetched === 'number' &&
+ typeof checkpoint.completed === 'boolean' &&
+ isOptionalTimestamp(checkpoint.scanStartedAt) &&
+ isOptionalTimestamp(checkpoint.updatedSince) &&
+ isOptionalTimestamp(checkpoint.completedAt)
+ );
+}
+
+export function loadSoupBackfillCheckpoint(
+ userId: string,
+ checkpointId = ALL_SOUP_BACKFILL_PARAMS.checkpointId
+): SoupBackfillCheckpoint {
+ try {
+ const saved = localStorage.getItem(checkpointKey(userId, checkpointId));
+ if (!saved) return initialCheckpoint(userId);
+
+ const parsed: unknown = JSON.parse(saved);
+ if (!isCheckpoint(parsed, userId)) return initialCheckpoint(userId);
+
+ return {
+ ...parsed,
+ scanStartedAt: parsed.scanStartedAt ?? null,
+ updatedSince: parsed.updatedSince ?? null,
+ completedAt: parsed.completedAt ?? null,
+ };
+ } catch {
+ // Restarting from the beginning is safe when storage is unavailable or
+ // the saved checkpoint is malformed.
+ return initialCheckpoint(userId);
+ }
+}
+
+function saveSoupBackfillCheckpoint(
+ checkpoint: SoupBackfillCheckpoint,
+ checkpointId: string
+): void {
+ try {
+ localStorage.setItem(
+ checkpointKey(checkpoint.userId, checkpointId),
+ JSON.stringify(checkpoint)
+ );
+ } catch {
+ // A failed checkpoint write only causes already-cached pages to be fetched
+ // again after restart.
+ }
+}
+
+export function resetSoupBackfillCheckpoint(
+ userId: string,
+ checkpointId = ALL_SOUP_BACKFILL_PARAMS.checkpointId
+): void {
+ try {
+ localStorage.removeItem(checkpointKey(userId, checkpointId));
+ } catch {
+ // Storage can be unavailable in restricted browser contexts.
+ }
+}
+
+function abortReason(signal: AbortSignal): unknown {
+ return signal.reason ?? new DOMException('Aborted', 'AbortError');
+}
+
+function delay(ms: number, signal: AbortSignal): Promise<void> {
+ if (signal.aborted) return Promise.reject(abortReason(signal));
+
+ return new Promise((resolve, reject) => {
+ const timeout = setTimeout(resolve, ms);
+ signal.addEventListener(
+ 'abort',
+ () => {
+ clearTimeout(timeout);
+ reject(abortReason(signal));
+ },
+ { once: true }
+ );
+ });
+}
+
+/** Retry after 1s, 2s, 4s, 8s, and so on, capped at 30s. */
+function backfillRetryDelay(attempt: number): number {
+ const exponentialDelay = INITIAL_RETRY_DELAY_MS * 2 ** attempt;
+ return Math.min(exponentialDelay, MAX_RETRY_DELAY_MS);
+}
+
+function and<T>(left: T | null | undefined, right: T): T {
+ return left ? ({ and: { left, right } } as T) : right;
+}
+
+/**
+ * Restricts entity types that expose an updatedAt filter while preserving any
+ * caller-provided filters. Other entity types continue to be fetched normally.
+ */
+export function withUpdatedSince(
+ input: Omit<GraphqlSoupInput, 'cursor'>,
+ updatedSince: string | null
+): Omit<GraphqlSoupInput, 'cursor'> {
+ if (!updatedSince) return input;
+
+ const filters = input.filters ?? {};
+ const documentUpdatedAt = {
+ literal: { updatedAt: { gte: updatedSince } },
+ };
+
+ const projectUpdatedAt = {
+ literal: { updatedAt: { gte: updatedSince } },
+ };
+
+ const chatUpdatedAt = {
+ literal: { updatedAt: { gte: updatedSince } },
+ };
+
+ const emailUpdatedAt = {
+ literal: { updatedAt: { gte: updatedSince } },
+ };
+
+ return {
+ ...input,
+ filters: {
+ ...filters,
+ documentFilter: and(filters.documentFilter, documentUpdatedAt),
+ projectFilter: and(filters.projectFilter, projectUpdatedAt),
+ chatFilter: and(filters.chatFilter, chatUpdatedAt),
+ emailFilter: {
+ ...(filters.emailFilter ?? {}),
+ tree: and(filters.emailFilter?.tree, emailUpdatedAt),
+ },
+ },
+ };
+}
+
+export async function runSoupBackfill(
+ userId: string,
+ params: SoupBackfillParams,
+ signal: AbortSignal
+): Promise<SoupBackfillCheckpoint> {
+ let checkpoint = loadSoupBackfillCheckpoint(userId, params.checkpointId);
+
+ // `completed` only marks the end of one pass. A later invocation resets
+ // pagination so it can run another pass narrowed by the stored updatedSince.
+ // An unfinished checkpoint without scanStartedAt keeps its cursor and only
+ // initializes the timestamp needed for the next watermark.
+ if (checkpoint.completed || checkpoint.scanStartedAt === null) {
+ checkpoint = {
+ ...checkpoint,
+ nextCursor: checkpoint.completed ? null : checkpoint.nextCursor,
+ completed: false,
+ scanStartedAt: new Date().toISOString(),
+ };
+ saveSoupBackfillCheckpoint(checkpoint, params.checkpointId);
+ }
+
+ const passInput = withUpdatedSince(params.input, checkpoint.updatedSince);
+
+ while (!signal.aborted) {
+ const page = await fetchGraphqlSoup(
+ {
+ ...passInput,
+ cursor: checkpoint.nextCursor ?? undefined,
+ },
+ {
+ signal,
+ // Backfill must stop on a network failure instead of advancing from
+ // an old offline page. TanStack retries from the persisted cursor.
+ allowOfflineFallback: false,
+ }
+ );
+
+ const completed = page.next_cursor == null;
+ checkpoint = {
+ ...checkpoint,
+ nextCursor: page.next_cursor ?? null,
+ pagesFetched: checkpoint.pagesFetched + 1,
+ itemsFetched: checkpoint.itemsFetched + page.items.length,
+ completed,
+ ...(completed
+ ? {
+ // Use the pass start rather than its completion time so updates
+ // made while this pass was running are included next time.
+ updatedSince: checkpoint.scanStartedAt ?? checkpoint.updatedSince,
+ completedAt: new Date().toISOString(),
+ scanStartedAt: null,
+ }
+ : {}),
+ };
+ saveSoupBackfillCheckpoint(checkpoint, params.checkpointId);
+
+ if (checkpoint.completed) return checkpoint;
+
+ await delay(params.pageDelayMs ?? PAGE_DELAY_MS, signal);
+ }
+
+ throw abortReason(signal);
+}
+
+/**
+ * Slowly fills the browser GraphQL cache with every expanded Soup page.
+ * The next cursor is persisted after each successful page so retries and
+ * future sessions resume from the first unfinished page.
+ */
+export function useSoupBackfill(
+ userId: Accessor<string | undefined>,
+ params?: Accessor<SoupBackfillParams>
+) {
+ const checkpointId =
+ params?.().checkpointId ?? ALL_SOUP_BACKFILL_PARAMS.checkpointId;
+ const isLeader = createTabLeaderSignal(
+ `graphql-soup-backfill:v${BACKFILL_VERSION}:${checkpointId}`
+ );
+
+ return useQuery(() => {
+ const currentUserId = userId();
+ const currentParams = params?.() ?? ALL_SOUP_BACKFILL_PARAMS;
+
+ return {
+ queryKey: [
+ 'graphql-soup-backfill',
+ BACKFILL_VERSION,
+ currentUserId,
+ currentParams.checkpointId,
+ ] as const,
+ enabled:
+ currentUserId !== undefined && graphqlCacheEnabled() && isLeader(),
+ queryFn: ({ signal }: { signal: AbortSignal }) => {
+ return runSoupBackfill(currentUserId!, currentParams, signal);
+ },
+ networkMode: 'online' as const,
+ retry: 5,
+ retryDelay: backfillRetryDelay,
+ // Keep the successful result fresh in the elected tab. Other tabs keep
+ // the query disabled until tab-election transfers leadership to them.
+ staleTime: Infinity,
+ refetchOnWindowFocus: false,
+ };
+ });
+}
+
+/** Backfills only email threads using an independent persisted checkpoint. */
+export function useEmailSoupBackfill(userId: Accessor<string | undefined>) {
+ return useSoupBackfill(userId, () => EMAIL_SOUP_BACKFILL_PARAMS);
+}
diff --git a/apps/web/src/lib/queries/soup/transform-utils.ts b/apps/web/src/lib/queries/soup/transform-utils.ts
index fe1e81eb2c..ec04b05b46 100644
--- a/apps/web/src/lib/queries/soup/transform-utils.ts
+++ b/apps/web/src/lib/queries/soup/transform-utils.ts
@@ -23,6 +23,7 @@ import type {
ForeignEntity,
GithubPullRequestEntity,
NamedSubType,
+ Notification,
ProjectEntity,
SearchData,
WithSearch,
@@ -69,6 +70,12 @@ type SoupEntity =
| CrmCompanyEntity
| ForeignEntity;
+type SoupItemWithOptionalNotifications = DisplayableSoupItem & {
+ data: {
+ notifications?: Notification[] | null;
+ };
+};
+
type TypedInnerSearchResult =
| { results: InnerSearchResult[]; type?: undefined }
| { results: DocumentSearchResult[]; type: 'pdf'; searchQuery: string }
@@ -553,8 +560,20 @@ function normalizeSentinelTs(
return Date.parse(ts) > 0 ? ts : undefined;
}
-export const mapApiSoupItemToEntity = (item: DisplayableSoupItem): SoupEntity =>
- match(item)
+function withRawNotifications<T extends SoupEntity>(
+ entity: T,
+ item: DisplayableSoupItem
+): T {
+ const notifications = (item as SoupItemWithOptionalNotifications).data
+ .notifications;
+ if (!Array.isArray(notifications)) return entity;
+ return { ...entity, notifications } as T;
+}
+
+export const mapApiSoupItemToEntity = (
+ item: DisplayableSoupItem
+): SoupEntity => {
+ const entity = match(item)
.with({ tag: 'chat' }, (item) => ({
...item.data,
createdAt: item.data.createdAt,
@@ -806,6 +825,9 @@ export const mapApiSoupItemToEntity = (item: DisplayableSoupItem): SoupEntity =>
})
.exhaustive();
+ return withRawNotifications(entity, item);
+};
+
export const isInstructionsMdDoc = (
item: SoupApiItem,
instructionsIdQuery: UseQueryResult<string | null | undefined, Error>
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
index 41385b0a2b..ff4cecc00c 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
+++ b/apps/web/src/lib/service-clients/service-storage/graphql-soup.ts
@@ -72,7 +72,7 @@ const graphqlSoupClient = createClient({
* Browser: wasm engine in a worker. Tauri: native engine in the host
* process (graphql_cache_plugin).
*/
-function graphqlCacheEnabled(): boolean {
+export function graphqlCacheEnabled(): boolean {
return ENABLE_GRAPHQL_SOUP();
}
@@ -135,6 +135,10 @@ type GraphqlSoupChannelMessage = NonNullable<
{ __typename: 'GraphqlSoupChannel' }
>['latestMessage']
>;
+type GraphqlSoupNotification = Extract<
+ GraphqlSoupEntity,
+ { __typename: 'GraphqlSoupDocument' }
+>['notifications'][number];
function mapGraphqlPropertyValue(
value: GraphqlPropertyValue | null | undefined
@@ -235,6 +239,29 @@ function normalizeChannelType(channelType: string) {
return channelType.toLowerCase();
}
+function mapGraphqlNotificationEntityType(
+ entityType: GraphqlSoupNotification['entityType']
+) {
+ return entityType.toLowerCase();
+}
+
+function mapGraphqlNotifications(notifications: GraphqlSoupNotification[]) {
+ return notifications.map((notification) => ({
+ id: notification.id,
+ notification_event_type: notification.eventType,
+ notification_metadata: notification.metadata,
+ entity_id: notification.entityId,
+ entity_type: mapGraphqlNotificationEntityType(notification.entityType),
+ sent: notification.sent,
+ done: notification.done,
+ seen: notification.seen,
+ created_at: notification.createdAt,
+ viewed_at: notification.viewedAt ?? undefined,
+ updated_at: notification.updatedAt,
+ sender_id: notification.senderId ?? undefined,
+ }));
+}
+
function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
const frecency = item.frecencyScore;
// `is_favorited: false` below: the GraphQL soup surface has no favorites
@@ -262,6 +289,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
documentVersionId: 0,
properties: mapGraphqlProperties(entity.properties),
subType: mapDocumentSubType(entity.subType),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -283,6 +311,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
viewedAt: entity.viewedAt ?? undefined,
deletedAt: entity.deletedAt ?? undefined,
properties: mapGraphqlProperties(entity.properties),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -303,6 +332,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
viewedAt: entity.viewedAt ?? undefined,
deletedAt: entity.deletedAt ?? undefined,
properties: mapGraphqlProperties(entity.properties),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -360,6 +390,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
type: label.type,
})),
properties: mapGraphqlProperties(entity.properties),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -394,6 +425,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
latest_non_thread_message: mapChannelMessage(
entity.latestNonThreadMessage
),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -422,6 +454,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
reply_count: entity.replyCount,
},
updated_at: entity.updatedAt,
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -450,6 +483,8 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
joinedAt: participant.joinedAt,
leftAt: participant.leftAt ?? undefined,
})),
+ properties: mapGraphqlProperties(entity.properties),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -477,6 +512,7 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
createdAt: entity.createdAt,
})),
properties: mapGraphqlProperties(entity.properties),
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
@@ -496,12 +532,19 @@ function mapGraphqlSoupItem(item: GraphqlSoupItem): SoupApiItem {
metadata: entity.metadata,
createdAt: entity.createdAt,
updatedAt: entity.updatedAt,
+ notifications: mapGraphqlNotifications(entity.notifications),
},
}) as SoupApiItem
)
.exhaustive();
}
+export type FetchGraphqlSoupOptions = {
+ signal?: AbortSignal;
+ /** Defaults to true for normal foreground Soup reads. */
+ allowOfflineFallback?: boolean;
+};
+
/**
* Maps a GraphQL soup response to the REST `SoupPage` shape consumed by
* the existing soup pipeline (both the imperative fetch below and the
@@ -515,7 +558,8 @@ export function mapGraphqlSoupPage(data: SoupQuery): SoupPage {
}
export async function fetchGraphqlSoup(
- input: GraphqlSoupInput
+ input: GraphqlSoupInput,
+ options: FetchGraphqlSoupOptions = {}
): Promise<SoupPage> {
const client = getGraphqlSoupClient();
const useCache = graphqlCacheEnabled();
@@ -528,13 +572,20 @@ export async function fetchGraphqlSoup(
.query<SoupQuery, SoupQueryVariables>(
SoupQueryDocument,
{ input },
- useCache ? { requestPolicy: 'cache-and-network' } : {}
+ {
+ ...(useCache ? { requestPolicy: 'cache-and-network' as const } : {}),
+ ...(options.signal ? { fetchOptions: { signal: options.signal } } : {}),
+ }
)
.toPromise();
if (result.error) {
// Offline replay: a network failure falls back to the last cached page.
- if (useCache && result.error.networkError) {
+ if (
+ options.allowOfflineFallback !== false &&
+ useCache &&
+ result.error.networkError
+ ) {
const cached = await client
.query<SoupQuery, SoupQueryVariables>(
SoupQueryDocument,
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts b/apps/web/src/lib/service-clients/service-storage/graphql/generated/graphql.ts
index 6bf96a869d..77da4e7483 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
@@ -437,9 +437,17 @@ export type SoupQueryVariables = Exact<{
export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null, hasMore: boolean, items: Array<{ id: string, entityType: GraphqlSoupEntityType, frecencyScore: number, entity:
- | { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }> }
- | { __typename: 'GraphqlSoupChannel', id: string, channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null }
- | { __typename: 'GraphqlSoupChannelThread', id: string, channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number }
+ | { __typename: 'GraphqlSoupCall', id: string, channelId: string, channelName: string | null, createdBy: string, customName: string | null, summary: string | null, startedAt: string, endedAt: string | null, durationMs: number | null, isActive: boolean, status: string, attended: boolean, participants: Array<{ userId: string, joinedAt: string, leftAt: string | null }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
+ | { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
+ | { __typename: 'GraphqlDatePropertyValue', dateValue: string }
+ | { __typename: 'GraphqlEntityReferencePropertyValue', references: Array<{ entityId: string, entityType: GraphqlPropertyEntityType, specificMessageId: string | null }> }
+ | { __typename: 'GraphqlLinkPropertyValue', urls: Array<string> }
+ | { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
+ | { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
+ | { __typename: 'GraphqlStringPropertyValue', stringValue: string }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
+ | { __typename: 'GraphqlSoupChannel', id: string, channelType: string, ownerId: string, organizationId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, interactedAt: string | null, channelName: string | null, channelTeamId: string | null, participants: Array<{ channelId: string, userId: string, role: string, joinedAt: string, leftAt: string | null }>, latestMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, latestNonThreadMessage: { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> } | null, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
+ | { __typename: 'GraphqlSoupChannelThread', id: string, channelId: string, senderId: string, content: string, createdAt: string, updatedAt: string, effectiveUpdatedAt: string, replyCount: number, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
| { __typename: 'GraphqlSoupChat', id: string, ownerId: string, projectId: string | null, isPersistent: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, chatName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -448,7 +456,7 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }> }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
| { __typename: 'GraphqlSoupCrmCompany', id: string, description: string | null, emailSync: boolean, hidden: boolean, createdAt: string, updatedAt: string, viewedAt: string | null, domains: Array<string>, crmTeamId: string, crmCompanyName: string | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -457,7 +465,7 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }> }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
| { __typename: 'GraphqlSoupDocument', id: string, ownerId: string, fileType: string | null, projectId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, documentName: string, subType: { kind: string, isCompleted: boolean | null } | null, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -466,7 +474,7 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }> }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
| { __typename: 'GraphqlSoupEmailThread', id: string, providerId: string | null, ownerId: string, inboxVisible: boolean, linkId: string | null, snippet: string | null, senderEmail: string | null, senderName: string | null, senderPhotoUrl: string | null, isRead: boolean, isDraft: boolean, isImportant: boolean, projectId: string | null, sortTs: string, createdAt: string, updatedAt: string, viewedAt: string | null, emailName: string | null, participants: Array<{ id: string, linkId: string, name: string | null, email: string | null, sfsPhotoUrl: string | null }>, attachments: Array<{ id: string, messageId: string, providerAttachmentId: string | null, filename: string | null, mimeType: string | null, sizeBytes: number | null, contentId: string | null, createdAt: string }>, labels: Array<{ id: string, linkId: string, providerLabelId: string, name: string, createdAt: string, messageListVisibility: string, labelListVisibility: string, type: string }>, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -475,8 +483,8 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }> }
- | { __typename: 'GraphqlSoupForeignEntity', id: string, foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, metadata: unknown, createdAt: string, updatedAt: string }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
+ | { __typename: 'GraphqlSoupForeignEntity', id: string, foreignEntityId: string, foreignEntitySource: string, storedForId: string, storedForAuthEntity: string, metadata: unknown, createdAt: string, updatedAt: string, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
| { __typename: 'GraphqlSoupProject', id: string, ownerId: string, parentId: string | null, createdAt: string, updatedAt: string, viewedAt: string | null, deletedAt: string | null, projectName: string, properties: Array<{ id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
| { __typename: 'GraphqlBooleanPropertyValue', boolValue: boolean }
| { __typename: 'GraphqlDatePropertyValue', dateValue: string }
@@ -485,7 +493,7 @@ export type SoupQuery = { user: { id: string, soup: { nextCursor: string | null,
| { __typename: 'GraphqlNumberPropertyValue', numberValue: number }
| { __typename: 'GraphqlSelectOptionPropertyValue', optionIds: Array<string> }
| { __typename: 'GraphqlStringPropertyValue', stringValue: string }
- | null }> }
+ | null }>, notifications: Array<{ id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown }> }
}> } } };
export type SoupPropertyFieldsFragment = { id: string, propertyDefinitionId: string, displayName: string, dataType: GraphqlPropertyDataType, isMultiSelect: boolean, specificEntityType: GraphqlPropertyEntityType | null, isSystem: boolean, isMetadata: boolean, value:
@@ -500,7 +508,10 @@ export type SoupPropertyFieldsFragment = { id: string, propertyDefinitionId: str
export type SoupChannelMessageFieldsFragment = { id: string, threadId: string | null, senderId: string, content: string, createdAt: string, updatedAt: string, deletedAt: string | null, mentions: Array<string> };
+export type SoupNotificationFieldsFragment = { id: string, eventType: string, entityType: GraphqlSoupEntityType, entityId: string, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, metadata: unknown };
+
export const SoupPropertyFieldsFragmentDoc = {"kind":"Document","definitions":[{"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<SoupPropertyFieldsFragment, unknown>;
export const SoupChannelMessageFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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"}}]}}]} as unknown as DocumentNode<SoupChannelMessageFieldsFragment, unknown>;
+export const SoupNotificationFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupNotification"}},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"}}]}}]} as unknown as DocumentNode<SoupNotificationFieldsFragment, unknown>;
export const SetEntityPropertyDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEntityProperty"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetEntityPropertyInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEntityProperty"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"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<SetEntityPropertyMutation, SetEntityPropertyMutationVariables>;
-export const SoupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Soup"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"kind"}},{"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","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"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","name":{"kind":"Name","value":"id"}},{"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":"id"}},{"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","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":"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":"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","name":{"kind":"Name","value":"id"}},{"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":"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":"GraphqlSoupChannelThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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","name":{"kind":"Name","value":"id"}},{"kind":"Field","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":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"id"}},{"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":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}}]}}]}}]}},{"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":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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"}}]}}]} as unknown as DocumentNode<SoupQuery, SoupQueryVariables>;
\ No newline at end of file
+export const SoupDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Soup"},"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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"entityType"}},{"kind":"Field","name":{"kind":"Name","value":"frecencyScore"}},{"kind":"Field","name":{"kind":"Name","value":"entity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupDocument"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"kind"}},{"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChat"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"chatName"},"name":{"kind":"Name","value":"name"}},{"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupProject"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEmailThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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","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":"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":"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannel"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelThread"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCall"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","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":"properties"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPropertyFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupCrmCompany"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupForeignEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"metadata"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}},{"kind":"Field","name":{"kind":"Name","value":"hasMore"}}]}}]}}]}},{"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":"SoupNotificationFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupNotification"}},"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":"done"}},{"kind":"Field","name":{"kind":"Name","value":"seen"}},{"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":"Field","name":{"kind":"Name","value":"metadata"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupChannelMessageFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupChannelMessage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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"}}]}}]} as unknown as DocumentNode<SoupQuery, SoupQueryVariables>;
\ No newline at end of file
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
index 8c5fd61de0..f36c968731 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/soup.graphql
@@ -1,241 +1,286 @@
query Soup($input: SoupInput!) {
- user {
- id
- soup(input: $input) {
- items {
- id
- entityType
- frecencyScore
- entity {
- __typename
- ... on GraphqlSoupDocument {
- id
- documentName: name
- ownerId
- fileType
- projectId
- createdAt
- updatedAt
- viewedAt
- deletedAt
- subType {
- kind
- isCompleted
- }
- properties {
- ...SoupPropertyFields
- }
- }
- ... on GraphqlSoupChat {
- id
- chatName: name
- ownerId
- projectId
- isPersistent
- createdAt
- updatedAt
- viewedAt
- deletedAt
- properties {
- ...SoupPropertyFields
- }
- }
- ... on GraphqlSoupProject {
- id
- projectName: name
- ownerId
- parentId
- createdAt
- updatedAt
- viewedAt
- deletedAt
- properties {
- ...SoupPropertyFields
- }
- }
- ... on GraphqlSoupEmailThread {
- id
- providerId
- ownerId
- inboxVisible
- linkId
- emailName: name
- snippet
- senderEmail
- senderName
- senderPhotoUrl
- isRead
- isDraft
- isImportant
- projectId
- sortTs
- createdAt
- updatedAt
- viewedAt
- participants {
- id
- linkId
- name
- email
- sfsPhotoUrl
- }
- attachments {
- id
- messageId
- providerAttachmentId
- filename
- mimeType
- sizeBytes
- contentId
- createdAt
- }
- labels {
- id
- linkId
- providerLabelId
- name
- createdAt
- messageListVisibility
- labelListVisibility
- type
- }
- properties {
- ...SoupPropertyFields
- }
- }
- ... on GraphqlSoupChannel {
- id
- channelName: name
- channelType
- ownerId
- organizationId
- channelTeamId: teamId
- createdAt
- updatedAt
- viewedAt
- interactedAt
- participants {
- channelId
- userId
- role
- joinedAt
- leftAt
- }
- latestMessage {
- ...SoupChannelMessageFields
- }
- latestNonThreadMessage {
- ...SoupChannelMessageFields
- }
- }
- ... on GraphqlSoupChannelThread {
- id
- channelId
- senderId
- content
- createdAt
- updatedAt
- effectiveUpdatedAt
- replyCount
- }
- ... on GraphqlSoupCall {
- id
- channelId
- channelName
- createdBy
- customName
- summary
- startedAt
- endedAt
- durationMs
- isActive
- status
- attended
- participants {
- userId
- joinedAt
- leftAt
- }
- }
- ... on GraphqlSoupCrmCompany {
- id
- crmTeamId: teamId
- crmCompanyName: name
- description
- emailSync
- hidden
- createdAt
- updatedAt
- viewedAt
- domains
- properties {
- ...SoupPropertyFields
- }
- }
- ... on GraphqlSoupForeignEntity {
- id
- foreignEntityId
- foreignEntitySource
- storedForId
- storedForAuthEntity
- metadata
- createdAt
- updatedAt
- }
- }
- }
- nextCursor
- hasMore
- }
- }
+ user {
+ id
+ soup(input: $input) {
+ items {
+ id
+ entityType
+ frecencyScore
+ entity {
+ __typename
+ ... on GraphqlSoupDocument {
+ id
+ documentName: name
+ ownerId
+ fileType
+ projectId
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+ subType {
+ kind
+ isCompleted
+ }
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupChat {
+ id
+ chatName: name
+ ownerId
+ projectId
+ isPersistent
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupProject {
+ id
+ projectName: name
+ ownerId
+ parentId
+ createdAt
+ updatedAt
+ viewedAt
+ deletedAt
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupEmailThread {
+ id
+ providerId
+ ownerId
+ inboxVisible
+ linkId
+ emailName: name
+ snippet
+ senderEmail
+ senderName
+ senderPhotoUrl
+ isRead
+ isDraft
+ isImportant
+ projectId
+ sortTs
+ createdAt
+ updatedAt
+ viewedAt
+ participants {
+ id
+ linkId
+ name
+ email
+ sfsPhotoUrl
+ }
+ attachments {
+ id
+ messageId
+ providerAttachmentId
+ filename
+ mimeType
+ sizeBytes
+ contentId
+ createdAt
+ }
+ labels {
+ id
+ linkId
+ providerLabelId
+ name
+ createdAt
+ messageListVisibility
+ labelListVisibility
+ type
+ }
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupChannel {
+ id
+ channelName: name
+ channelType
+ ownerId
+ organizationId
+ channelTeamId: teamId
+ createdAt
+ updatedAt
+ viewedAt
+ interactedAt
+ participants {
+ channelId
+ userId
+ role
+ joinedAt
+ leftAt
+ }
+ latestMessage {
+ ...SoupChannelMessageFields
+ }
+ latestNonThreadMessage {
+ ...SoupChannelMessageFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupChannelThread {
+ id
+ channelId
+ senderId
+ content
+ createdAt
+ updatedAt
+ effectiveUpdatedAt
+ replyCount
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupCall {
+ id
+ channelId
+ channelName
+ createdBy
+ customName
+ summary
+ startedAt
+ endedAt
+ durationMs
+ isActive
+ status
+ attended
+ participants {
+ userId
+ joinedAt
+ leftAt
+ }
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupCrmCompany {
+ id
+ crmTeamId: teamId
+ crmCompanyName: name
+ description
+ emailSync
+ hidden
+ createdAt
+ updatedAt
+ viewedAt
+ domains
+ properties {
+ ...SoupPropertyFields
+ }
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ ... on GraphqlSoupForeignEntity {
+ id
+ foreignEntityId
+ foreignEntitySource
+ storedForId
+ storedForAuthEntity
+ metadata
+ createdAt
+ updatedAt
+ notifications {
+ ...SoupNotificationFields
+ }
+ }
+ }
+ }
+ nextCursor
+ hasMore
+ }
+ }
}
fragment SoupPropertyFields on GraphqlProperty {
- id
- propertyDefinitionId
- displayName
- dataType
- isMultiSelect
- specificEntityType
- isSystem
- isMetadata
- value {
- __typename
- ... on GraphqlBooleanPropertyValue {
- boolValue: value
- }
- ... on GraphqlNumberPropertyValue {
- numberValue: value
- }
- ... on GraphqlStringPropertyValue {
- stringValue: value
- }
- ... on GraphqlDatePropertyValue {
- dateValue: value
- }
- ... on GraphqlSelectOptionPropertyValue {
- optionIds
- }
- ... on GraphqlEntityReferencePropertyValue {
- references {
- entityId
- entityType
- specificMessageId
- }
- }
- ... on GraphqlLinkPropertyValue {
- urls
- }
- }
+ id
+ propertyDefinitionId
+ displayName
+ dataType
+ isMultiSelect
+ specificEntityType
+ isSystem
+ isMetadata
+ value {
+ __typename
+ ... on GraphqlBooleanPropertyValue {
+ boolValue: value
+ }
+ ... on GraphqlNumberPropertyValue {
+ numberValue: value
+ }
+ ... on GraphqlStringPropertyValue {
+ stringValue: value
+ }
+ ... on GraphqlDatePropertyValue {
+ dateValue: value
+ }
+ ... on GraphqlSelectOptionPropertyValue {
+ optionIds
+ }
+ ... on GraphqlEntityReferencePropertyValue {
+ references {
+ entityId
+ entityType
+ specificMessageId
+ }
+ }
+ ... on GraphqlLinkPropertyValue {
+ urls
+ }
+ }
}
fragment SoupChannelMessageFields on GraphqlSoupChannelMessage {
- id
- threadId
- senderId
- content
- createdAt
- updatedAt
- deletedAt
- mentions
+ id
+ threadId
+ senderId
+ content
+ createdAt
+ updatedAt
+ deletedAt
+ mentions
+}
+
+fragment SoupNotificationFields on GraphqlSoupNotification {
+ id
+ eventType
+ entityType
+ entityId
+ sent
+ done
+ seen
+ createdAt
+ viewedAt
+ updatedAt
+ senderId
+ metadata
}
diff --git a/apps/web/src/routes/Root.tsx b/apps/web/src/routes/Root.tsx
index 3171fd6df0..16d5910d9b 100644
--- a/apps/web/src/routes/Root.tsx
+++ b/apps/web/src/routes/Root.tsx
@@ -17,6 +17,10 @@ import {
} from '@app/lib/analytics/analytics-context';
import { PosthogProvider, usePosthog } from '@app/lib/analytics/posthog';
import { trackSignupCompletion } from '@app/lib/analytics/signupCompletion';
+import {
+ useEmailSoupBackfill,
+ useSoupBackfill,
+} from '@app/lib/queries/soup/backfill';
import { setHotkeyRoot } from '@app/signal/hotkeyRoot';
import { globalSplitManager } from '@app/signal/splitLayout';
import { CallProvider } from '@channel/Call/CallContext';
@@ -442,6 +446,9 @@ function UserInfoSideEffects() {
// Set user info for observability and analytics
const userInfo = useUserInfo();
+ useSoupBackfill(() => userInfo()?.id);
+ useEmailSoupBackfill(() => userInfo()?.id);
+
// Keep the active theme following the OS color scheme when auto-detect is on.
systemThemeEffect();