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.

Seanaye/feat/notification patch subscription (#5639)

Sean Ayee1f2c2cef39f
diff --git a/Cargo.lock b/Cargo.lock
index 4d37d1de2b..61082bb360 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10014,6 +10014,7 @@ dependencies = [
"macro_uuid",
"model-entity",
"model-error-response",
+ "model_notifications",
"model_user",
"models_pagination",
"rate_limit",
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 fb4fceec5e..e4f673ab4e 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
@@ -5324,30 +5324,33 @@ export type GraphqlHistoryItemFieldsFragment =
export type NotificationUpdatesSubscriptionVariables = Exact<{ [key: string]: never; }>;
-export type NotificationUpdatesSubscription = { notificationUpdates: { 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:
- | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
- | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
- | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
- | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
- | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
- | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
- | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
- | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
- | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
- | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
- | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
- | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
- | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
- } };
+export type NotificationUpdatesSubscription = { notificationUpdates:
+ | { __typename: 'GraphqlCacheDeletion', graphqlTypeName: string, entityId: string }
+ | { __typename: 'GraphqlNotification', id: string, eventType: string, entityType: GraphqlSoupEntityType, sent: boolean, done: boolean, seen: boolean, createdAt: string, viewedAt: string | null, updatedAt: string, senderId: string | null, notificationEntityId: string, metadata:
+ | { __typename: 'GraphqlAiResponseMetadata', aiResponseSummary: string, aiResponseMessageId: string }
+ | { __typename: 'GraphqlCalendarEventReminderMetadata', calendarEventReminderEventId: string, calendarEventReminderOccurrenceKey: string, calendarEventReminderTitle: string, calendarEventReminderStartsAt: string | null, calendarEventReminderEndsAt: string | null, calendarEventReminderStartDate: string | null, calendarEventReminderTimeZone: string | null, calendarEventReminderMinutesBefore: number }
+ | { __typename: 'GraphqlCallStartedMetadata', callStartedChannelName: string | null, callStartedSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelInviteMetadata', channelInviteInvitedBy: string, channelInviteChannelName: string, channelInviteMessageContent: string | null, channelInviteSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMentionMetadata', channelMentionMessageId: string, channelMentionMessageContent: string, channelMentionHasAttachments: boolean, channelMentionThreadId: string | null, channelMentionSenderDisplayName: string | null, channelMentionChannelType: GraphqlNotificationChannelType, channelMentionChannelName: string, channelMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelMessageSendMetadata', channelMessageSendSender: string | null, channelMessageSendSenderDisplayName: string | null, channelMessageSendMessageContent: string, channelMessageSendMessageId: string, channelMessageSendHasAttachments: boolean, channelMessageSendChannelType: GraphqlNotificationChannelType, channelMessageSendChannelName: string, channelMessageSendSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlChannelReplyMetadata', channelReplyThreadId: string, channelReplyMessageId: string, channelReplyUserId: string | null, channelReplySenderDisplayName: string | null, channelReplyMessageContent: string, channelReplyHasAttachments: boolean, channelReplyThreadParentSenderId: string | null, channelReplyChannelType: GraphqlNotificationChannelType, channelReplyChannelName: string, channelReplySenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlCommentedOnDocumentMetadata', commentedOnDocumentDocumentName: string, commentedOnDocumentOwner: string, commentedOnDocumentFileType: string | null, commentedOnDocumentSubType: GraphqlNotificationDocumentSubType | null, commentedOnDocumentCommentId: number, commentedOnDocumentThreadId: number, commentedOnDocumentText: string, commentedOnDocumentSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlDocumentMentionMetadata', documentMentionDocumentName: string, documentMentionOwner: string, documentMentionFileType: string | null, documentMentionSubType: GraphqlNotificationDocumentSubType | null, documentMentionMessageId: string, documentMentionMessageContent: string, documentMentionHasAttachments: boolean, documentMentionThreadId: string | null, documentMentionSenderDisplayName: string | null, documentMentionChannelType: GraphqlNotificationChannelType, documentMentionChannelName: string, documentMentionSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlGithubPrCheckRunMetadata', githubPrCheckRunForeignEntityId: string, githubPrCheckRunGithubKey: string, githubPrCheckRunOwner: string, githubPrCheckRunRepo: string, githubPrCheckRunNumber: string, githubPrCheckRunUrl: string, githubPrCheckRunDisplayName: string, githubPrCheckRunTitle: string, githubPrCheckRunSenderGithubLogin: string | null, githubPrCheckRunSenderGithubUserId: string | null, githubPrCheckRunSenderGithubAvatarUrl: string | null, githubPrCheckRunCheckRunGithubId: string, githubPrCheckRunCheckName: string, githubPrCheckRunCheckStatus: string, githubPrCheckRunConclusion: string, githubPrCheckRunState: GraphqlGithubPrCheckRunState, githubPrCheckRunCheckUrl: string, githubPrCheckRunCompletedAt: string }
+ | { __typename: 'GraphqlGithubPrCommentMetadata', githubPrCommentForeignEntityId: string, githubPrCommentGithubKey: string, githubPrCommentOwner: string, githubPrCommentRepo: string, githubPrCommentNumber: string, githubPrCommentUrl: string, githubPrCommentDisplayName: string, githubPrCommentTitle: string, githubPrCommentSenderGithubLogin: string | null, githubPrCommentSenderGithubUserId: string | null, githubPrCommentSenderGithubAvatarUrl: string | null, githubPrCommentCommentKind: GraphqlGithubPrCommentKind, githubPrCommentCommentGithubId: string | null, githubPrCommentCommentUrl: string | null, githubPrCommentCommentSnippet: string }
+ | { __typename: 'GraphqlGithubPrMentionMetadata', githubPrMentionForeignEntityId: string, githubPrMentionGithubKey: string, githubPrMentionOwner: string, githubPrMentionRepo: string, githubPrMentionNumber: string, githubPrMentionUrl: string, githubPrMentionDisplayName: string, githubPrMentionTitle: string, githubPrMentionSenderGithubLogin: string | null, githubPrMentionSenderGithubUserId: string | null, githubPrMentionSenderGithubAvatarUrl: string | null, githubPrMentionLocation: GraphqlGithubPrMentionLocation, githubPrMentionCommentGithubId: string | null, githubPrMentionCommentUrl: string | null, githubPrMentionTextSnippet: string }
+ | { __typename: 'GraphqlGithubPrReviewMetadata', githubPrReviewForeignEntityId: string, githubPrReviewGithubKey: string, githubPrReviewOwner: string, githubPrReviewRepo: string, githubPrReviewNumber: string, githubPrReviewUrl: string, githubPrReviewDisplayName: string, githubPrReviewTitle: string, githubPrReviewSenderGithubLogin: string | null, githubPrReviewSenderGithubUserId: string | null, githubPrReviewSenderGithubAvatarUrl: string | null, githubPrReviewReviewGithubId: string | null, githubPrReviewReviewUrl: string | null, githubPrReviewState: GraphqlGithubPrReviewState, githubPrReviewReviewSnippet: string | null }
+ | { __typename: 'GraphqlGithubPrStatusChangedMetadata', githubPrStatusChangedForeignEntityId: string, githubPrStatusChangedGithubKey: string, githubPrStatusChangedOwner: string, githubPrStatusChangedRepo: string, githubPrStatusChangedNumber: string, githubPrStatusChangedUrl: string, githubPrStatusChangedDisplayName: string, githubPrStatusChangedTitle: string, githubPrStatusChangedSenderGithubLogin: string | null, githubPrStatusChangedSenderGithubUserId: string | null, githubPrStatusChangedSenderGithubAvatarUrl: string | null, githubPrStatusChangedStatus: GraphqlGithubPrEventStatus, githubPrStatusChangedAction: GraphqlGithubPrEventAction, githubPrStatusChangedPreviousStatus: GraphqlGithubPrEventStatus | null, githubPrStatusChangedHeadBranch: string | null, githubPrStatusChangedBaseBranch: string | null, githubPrStatusChangedMergedAt: string | null }
+ | { __typename: 'GraphqlGithubReviewRequestedMetadata', githubReviewRequestedForeignEntityId: string, githubReviewRequestedGithubKey: string, githubReviewRequestedOwner: string, githubReviewRequestedRepo: string, githubReviewRequestedNumber: string, githubReviewRequestedUrl: string, githubReviewRequestedDisplayName: string, githubReviewRequestedTitle: string, githubReviewRequestedSenderGithubLogin: string | null, githubReviewRequestedSenderGithubUserId: string | null, githubReviewRequestedSenderGithubAvatarUrl: string | null, githubReviewRequestedRequestedReviewerGithubLogin: string | null, githubReviewRequestedRequestedReviewerGithubUserId: string | null }
+ | { __typename: 'GraphqlInboxReauthRequiredMetadata', inboxReauthRequiredEmailAddress: string }
+ | { __typename: 'GraphqlInviteToTeamMetadata', inviteToTeamTeamName: string, inviteToTeamTeamId: string, inviteToTeamTeamInviteId: string, inviteToTeamInvitedBy: string, inviteToTeamRole: string | null, inviteToTeamSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlMentionedInDocumentCommentMetadata', mentionedInDocumentCommentDocumentName: string, mentionedInDocumentCommentOwner: string, mentionedInDocumentCommentFileType: string | null, mentionedInDocumentCommentSubType: GraphqlNotificationDocumentSubType | null, mentionedInDocumentCommentMentionId: string, mentionedInDocumentCommentCommentId: number, mentionedInDocumentCommentThreadId: number, mentionedInDocumentCommentText: string, mentionedInDocumentCommentSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlNewEmailMetadata', newEmailSender: string | null, newEmailToEmail: string, newEmailThreadId: string, newEmailSubject: string, newEmailSnippet: string }
+ | { __typename: 'GraphqlReminderMetadata', reminderReminderId: string, reminderDescription: string }
+ | { __typename: 'GraphqlRepliedToDocumentCommentThreadMetadata', repliedToDocumentCommentThreadDocumentName: string, repliedToDocumentCommentThreadOwner: string, repliedToDocumentCommentThreadFileType: string | null, repliedToDocumentCommentThreadSubType: GraphqlNotificationDocumentSubType | null, repliedToDocumentCommentThreadCommentId: number, repliedToDocumentCommentThreadThreadId: number, repliedToDocumentCommentThreadText: string, repliedToDocumentCommentThreadSenderProfilePictureUrl: string | null }
+ | { __typename: 'GraphqlTaskAssignedMetadata', taskAssignedTaskId: string, taskAssignedTaskName: string | null, taskAssignedSubType: GraphqlNotificationDocumentSubType | null, taskAssignedAssignedBy: string, taskAssignedSenderProfilePictureUrl: string | null }
+ }
+ };
export type SetEntityPropertyMutationVariables = Exact<{
input: SetEntityPropertyInput;
@@ -8072,7 +8075,7 @@ export const SetEntityFavoriteDocument = {"kind":"Document","definitions":[{"kin
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 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":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"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"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"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":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"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":"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","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":"__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","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":"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"}}]}}]}}]}}]} as unknown as DocumentNode<GroupSoupQuery, GroupSoupQueryVariables>;
-export const NotificationUpdatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"NotificationUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notificationUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"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"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}}]} as unknown as DocumentNode<NotificationUpdatesSubscription, NotificationUpdatesSubscriptionVariables>;
+export const NotificationUpdatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"NotificationUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"notificationUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","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","alias":{"kind":"Name","value":"notificationEntityId"},"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"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"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":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode<NotificationUpdatesSubscription, NotificationUpdatesSubscriptionVariables>;
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 SoupUpdatesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"SoupUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"soupUpdates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupPatchFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"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"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"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":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"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":"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","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":"__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","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":"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":"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"}}]}}]}}]} as unknown as DocumentNode<SoupUpdatesSubscription, SoupUpdatesSubscriptionVariables>;
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":"FragmentSpread","name":{"kind":"Name","value":"SoupItemFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"nextCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationMetadataFields"},"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":"channelMentionHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionThreadId"},"name":{"kind":"Name","value":"threadId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMentionChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"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":"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":"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":"channelMessageSendSenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendMessageId"},"name":{"kind":"Name","value":"messageId"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"kind":"Field","alias":{"kind":"Name","value":"channelMessageSendChannelType"},"name":{"kind":"Name","value":"channelType"}},{"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":"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":"channelReplySenderDisplayName"},"name":{"kind":"Name","value":"senderDisplayName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyMessageContent"},"name":{"kind":"Name","value":"messageContent"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplyHasAttachments"},"name":{"kind":"Name","value":"hasAttachments"}},{"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":"Field","alias":{"kind":"Name","value":"channelReplyChannelName"},"name":{"kind":"Name","value":"channelName"}},{"kind":"Field","alias":{"kind":"Name","value":"channelReplySenderProfilePictureUrl"},"name":{"kind":"Name","value":"senderProfilePictureUrl"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SoupNotificationFields"},"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":"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"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationMetadataFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SoupEntityCoreFields"},"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":"Field","name":{"kind":"Name","value":"notifications"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupNotificationFields"}}]}}]}},{"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":"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":"SoupItemFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GraphqlSoupEntity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SoupEntityCoreFields"}},{"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":"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","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":"__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","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":"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"}}]}}]}}]}}]} as unknown as DocumentNode<SoupQuery, SoupQueryVariables>;
diff --git a/apps/web/src/lib/service-clients/service-storage/graphql/notification-updates.graphql b/apps/web/src/lib/service-clients/service-storage/graphql/notification-updates.graphql
index 9166af8d52..612e68aa83 100644
--- a/apps/web/src/lib/service-clients/service-storage/graphql/notification-updates.graphql
+++ b/apps/web/src/lib/service-clients/service-storage/graphql/notification-updates.graphql
@@ -1,5 +1,25 @@
subscription NotificationUpdates {
notificationUpdates {
- ...SoupNotificationFields
+ __typename
+ ... on GraphqlNotification {
+ id
+ eventType
+ entityType
+ notificationEntityId: entityId
+ sent
+ done
+ seen
+ createdAt
+ viewedAt
+ updatedAt
+ senderId
+ metadata {
+ ...SoupNotificationMetadataFields
+ }
+ }
+ ... on GraphqlCacheDeletion {
+ graphqlTypeName
+ entityId
+ }
}
}
diff --git a/crates/complete_graph/src/schema.rs b/crates/complete_graph/src/schema.rs
index e2f6b1ab0c..8cb7428e4f 100644
--- a/crates/complete_graph/src/schema.rs
+++ b/crates/complete_graph/src/schema.rs
@@ -43,7 +43,7 @@ use macro_authorization::{
use macro_user_id::user_id::MacroUserIdStr;
use model_notifications::NotifEvent;
use notification::domain::{
- models::queue_message::RealtimeNotif,
+ models::NotificationSubscriptionUpdate,
ports::{
NoopWebSocketNotificationSubscriptionService, WebSocketNotificationSubscriptionService,
},
@@ -103,7 +103,7 @@ pub struct CompleteSubscriptionRoot<R, NS, Auth, St, NR, PR, ER, FR, AR>(
)
where
R: SoupRealtimeSubscriptionService,
- NS: WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>,
+ NS: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>,
Auth: MacroAuthorizationService,
St: Clone + Send + Sync + 'static,
MacroAuthorizationState<Auth>: FromRef<St>,
@@ -317,7 +317,8 @@ pub fn build_schema_with_services<S, R, NS, E, EAS, Auth, St, W, M, C, N, NR, PR
where
S: SoupService + Clone,
R: SoupRealtimeSubscriptionService + Clone,
- NS: WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>> + Clone,
+ NS: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>
+ + Clone,
E: EmailService + EmailUserService,
EAS: EntityAccessService,
Auth: MacroAuthorizationService,
@@ -400,7 +401,7 @@ pub fn build_schema_from_arcs<S, R, NS, E, EAS, Auth, St, W, M, C, N, NR, PR, ER
where
S: SoupService,
R: SoupRealtimeSubscriptionService,
- NS: WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>,
+ NS: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>,
E: EmailService + EmailUserService,
EAS: EntityAccessService,
Auth: MacroAuthorizationService,
diff --git a/crates/complete_graph/src/sdl_test.rs b/crates/complete_graph/src/sdl_test.rs
index bd0929b3b5..aac804db0b 100644
--- a/crates/complete_graph/src/sdl_test.rs
+++ b/crates/complete_graph/src/sdl_test.rs
@@ -88,7 +88,8 @@ fn soup_response_schema_exposes_frontend_fields() {
"MARK_UNDONE",
"type CompleteSubscriptionRoot {",
"soupUpdates: [SoupPatch!]!",
- "notificationUpdates: GraphqlNotification!",
+ "notificationUpdates: GraphqlNotificationPatch!",
+ "union GraphqlNotificationPatch = GraphqlNotification | GraphqlCacheDeletion",
"type GraphqlNotification {",
"metadata: GraphqlNotifEvent!",
] {
diff --git a/crates/graphql_notification/src/lib.rs b/crates/graphql_notification/src/lib.rs
index 802a1ed963..093c302fdb 100644
--- a/crates/graphql_notification/src/lib.rs
+++ b/crates/graphql_notification/src/lib.rs
@@ -24,4 +24,6 @@ pub use mutations::{
};
pub use notification_event::GraphqlNotifEvent;
pub use objects::{GraphqlNotification, load_entity_notifications};
-pub use subscriptions::{NotificationSubscriptionRoot, subscribe_to_notifications};
+pub use subscriptions::{
+ GraphqlNotificationPatch, NotificationSubscriptionRoot, subscribe_to_notifications,
+};
diff --git a/crates/graphql_notification/src/loaders.rs b/crates/graphql_notification/src/loaders.rs
index 97889897ca..c7359ae39e 100644
--- a/crates/graphql_notification/src/loaders.rs
+++ b/crates/graphql_notification/src/loaders.rs
@@ -2,6 +2,7 @@ use std::{collections::HashMap, sync::Arc};
use async_graphql::dataloader::{DataLoader, Loader};
use macro_user_id::user_id::MacroUserIdStr;
+use model_notifications::NotifEvent;
use notification::domain::models::{
UserNotificationRow,
request::{NotificationEntityRef, NotificationItemType},
@@ -67,7 +68,7 @@ pub trait SoupNotificationEdgeReader: Send + Sync + 'static {
keys: Vec<model_entity::Entity<'static>>,
) -> impl Future<
Output = Result<
- HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<serde_json::Value>>>,
+ HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<NotifEvent>>>,
rootcause::Report,
>,
> + Send
@@ -83,7 +84,7 @@ where
user_id: MacroUserIdStr<'static>,
keys: Vec<model_entity::Entity<'static>>,
) -> Result<
- HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<serde_json::Value>>>,
+ HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<NotifEvent>>>,
rootcause::Report,
> {
let mut result = keys
@@ -102,14 +103,14 @@ where
.map(|(_, entity_ref)| entity_ref.clone())
.collect();
- let notifications_by_entity = self
- .get_entity_notifications_batch(user_id, entity_refs)
+ let mut notifications_by_entity = self
+ .get_entity_notifications_batch::<NotifEvent>(user_id, entity_refs)
.await
.map_err(|err| rootcause::report!(err))?;
for (original_key, entity_ref) in requested_refs {
- if let Some(notifications) = notifications_by_entity.get(&entity_ref) {
- result.insert(original_key, notifications.clone());
+ if let Some(notifications) = notifications_by_entity.remove(&entity_ref) {
+ result.insert(original_key, notifications);
}
}
@@ -127,7 +128,7 @@ impl SoupNotificationEdgeReader for NoOpSoupNotificationEdgeReader {
_user_id: MacroUserIdStr<'static>,
keys: Vec<model_entity::Entity<'static>>,
) -> Result<
- HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<serde_json::Value>>>,
+ HashMap<model_entity::Entity<'static>, Vec<UserNotificationRow<NotifEvent>>>,
rootcause::Report,
> {
Ok(keys.iter().map(|key| (key.clone(), Vec::new())).collect())
@@ -153,7 +154,7 @@ impl<R> Loader<model_entity::OwnedEntity> for EntityNotificationsLoader<R>
where
R: SoupNotificationEdgeReader,
{
- type Value = Vec<UserNotificationRow<serde_json::Value>>;
+ type Value = Vec<UserNotificationRow<NotifEvent>>;
type Error = rootcause::Report<Dynamic, Cloneable>;
async fn load(
@@ -164,7 +165,7 @@ where
.iter()
.map(|key| key.as_entity().clone())
.collect::<Vec<_>>();
- let loaded = self
+ let mut loaded = self
.reader
.get_notifications(self.user_id.clone(), entities)
.await
@@ -174,7 +175,7 @@ where
.iter()
.cloned()
.map(|key| {
- let notifications = loaded.get(key.as_entity()).cloned().unwrap_or_default();
+ let notifications = loaded.remove(key.as_entity()).unwrap_or_default();
(key, notifications)
})
.collect())
diff --git a/crates/graphql_notification/src/objects.rs b/crates/graphql_notification/src/objects.rs
index 5dd602595c..03c57f1602 100644
--- a/crates/graphql_notification/src/objects.rs
+++ b/crates/graphql_notification/src/objects.rs
@@ -1,3 +1,5 @@
+use std::sync::Arc;
+
use async_graphql::{Context, ID, Object, dataloader::DataLoader};
use graphql_common::GraphqlSoupEntityType;
use model_notifications::NotifEvent;
@@ -11,50 +13,44 @@ use crate::{
loaders::{EntityNotificationsLoader, SoupNotificationEdgeReader},
};
-/// GraphQL notification attached to a Soup entity.
-pub struct GraphqlNotification(UserNotificationRow<NotifEvent>);
+/// GraphQL notification backed by either an owned or shared notification row.
+#[allow(clippy::large_enum_variant)] // The owned variant intentionally avoids heap allocation.
+pub enum GraphqlNotification {
+ /// A notification row owned directly by the GraphQL object.
+ Owned(UserNotificationRow<NotifEvent>),
+ /// A shared notification row received from a realtime subscription.
+ Shared(Arc<UserNotificationRow<NotifEvent>>),
+}
-impl TryFrom<UserNotificationRow<serde_json::Value>> for GraphqlNotification {
- type Error = serde_json::Error;
+impl AsRef<UserNotificationRow<NotifEvent>> for GraphqlNotification {
+ fn as_ref(&self) -> &UserNotificationRow<NotifEvent> {
+ match self {
+ Self::Owned(notification) => notification,
+ Self::Shared(notification) => notification,
+ }
+ }
+}
- fn try_from(value: UserNotificationRow<serde_json::Value>) -> Result<Self, Self::Error> {
- value.into_tagged().deserialize_metadata().map(Self)
+impl From<UserNotificationRow<NotifEvent>> for GraphqlNotification {
+ fn from(value: UserNotificationRow<NotifEvent>) -> Self {
+ Self::Owned(value)
}
}
-impl GraphqlNotification {
- /// Converts a recipient-scoped realtime payload into the shared notification GraphQL type.
- pub(crate) fn from_realtime(
- owner_id: macro_user_id::user_id::MacroUserIdStr<'static>,
- value: notification::domain::models::queue_message::RealtimeNotif<NotifEvent>,
- ) -> Self {
- let notification::domain::models::queue_message::RealtimeNotif {
- notification_id,
- notification_event_type,
- entity,
- sent,
- done,
- created_at,
- viewed_at,
- updated_at,
- deleted_at,
- notification_metadata,
- sender_id,
- } = value;
- Self(UserNotificationRow {
- owner_id,
- notification_id,
- notification_event_type,
- entity,
- sent,
- done,
- created_at,
- viewed_at,
- updated_at,
- deleted_at,
- notification_metadata,
- sender_id,
- })
+impl From<Arc<UserNotificationRow<NotifEvent>>> for GraphqlNotification {
+ fn from(value: Arc<UserNotificationRow<NotifEvent>>) -> Self {
+ Self::Shared(value)
+ }
+}
+
+impl TryFrom<UserNotificationRow<serde_json::Value>> for GraphqlNotification {
+ type Error = serde_json::Error;
+
+ fn try_from(value: UserNotificationRow<serde_json::Value>) -> Result<Self, Self::Error> {
+ value
+ .into_tagged()
+ .deserialize_metadata()
+ .map(GraphqlNotification::from)
}
}
@@ -63,62 +59,65 @@ impl GraphqlNotification {
impl GraphqlNotification {
/// The notification identifier.
async fn id(&self) -> ID {
- ID(self.0.notification_id.to_string())
+ ID(self.as_ref().notification_id.to_string())
}
/// The event that produced the notification.
async fn event_type(&self) -> &str {
- &self.0.notification_event_type
+ &self.as_ref().notification_event_type
}
/// The type of the associated entity.
async fn entity_type(&self) -> GraphqlSoupEntityType {
- GraphqlSoupEntityType::new(self.0.entity.entity_type)
+ GraphqlSoupEntityType::new(self.as_ref().entity.entity_type)
}
/// The identifier of the associated entity.
async fn entity_id(&self) -> &str {
- &self.0.entity.entity_id
+ &self.as_ref().entity.entity_id
}
/// Whether the notification has been sent.
async fn sent(&self) -> bool {
- self.0.sent
+ self.as_ref().sent
}
/// Whether notification processing is complete.
async fn done(&self) -> bool {
- self.0.done
+ self.as_ref().done
}
/// Whether the recipient has seen the notification.
async fn seen(&self) -> bool {
- self.0.viewed_at.is_some()
+ self.as_ref().viewed_at.is_some()
}
/// The notification creation time in RFC 3339 format.
async fn created_at(&self) -> String {
- self.0.created_at.to_rfc3339()
+ self.as_ref().created_at.to_rfc3339()
}
/// The time the notification was viewed, in RFC 3339 format.
async fn viewed_at(&self) -> Option<String> {
- self.0.viewed_at.map(|ts| ts.to_rfc3339())
+ self.as_ref().viewed_at.map(|ts| ts.to_rfc3339())
}
/// The notification's last update time in RFC 3339 format.
async fn updated_at(&self) -> String {
- self.0.updated_at.to_rfc3339()
+ self.as_ref().updated_at.to_rfc3339()
}
/// The identifier of the user who triggered the notification.
async fn sender_id(&self) -> Option<String> {
- self.0.sender_id.as_ref().map(|sender| sender.to_string())
+ self.as_ref()
+ .sender_id
+ .as_ref()
+ .map(|sender| sender.to_string())
}
/// Typed event-specific notification metadata.
async fn metadata(&self) -> GraphqlNotifEvent {
- self.0.notification_metadata.clone().into()
+ self.as_ref().notification_metadata.clone().into()
}
}
@@ -135,17 +134,13 @@ where
let notifications = loader
.load_one(model_entity::OwnedEntity::from(entity))
.await
- .map_err(|err| async_graphql::Error::new(err.to_string()))?
+ .map_err(|error| {
+ tracing::error!(error = ?error, "failed to load entity notifications");
+ async_graphql::Error::new("notifications are unavailable")
+ })?
.unwrap_or_default();
- notifications
+ Ok(notifications
.into_iter()
- .map(GraphqlNotification::try_from)
- .collect::<Result<Vec<_>, _>>()
- .map_err(|error| {
- tracing::error!(
- error = ?error,
- "failed to deserialize notification metadata"
- );
- async_graphql::Error::new("notification metadata is unavailable")
- })
+ .map(GraphqlNotification::from)
+ .collect())
}
diff --git a/crates/graphql_notification/src/objects/test.rs b/crates/graphql_notification/src/objects/test.rs
index 26a636be38..d5b6619976 100644
--- a/crates/graphql_notification/src/objects/test.rs
+++ b/crates/graphql_notification/src/objects/test.rs
@@ -49,6 +49,8 @@ async fn metadata_is_the_typed_notification_union() {
let notification =
GraphqlNotification::try_from(raw_notification(serde_json::to_value(metadata).unwrap()))
.unwrap();
+ assert!(matches!(&notification, GraphqlNotification::Owned(_)));
+
let schema = Schema::new(Query { notification }, EmptyMutation, EmptySubscription);
let response = schema
diff --git a/crates/graphql_notification/src/subscriptions.rs b/crates/graphql_notification/src/subscriptions.rs
index a1f96438ea..b41c7d6f92 100644
--- a/crates/graphql_notification/src/subscriptions.rs
+++ b/crates/graphql_notification/src/subscriptions.rs
@@ -1,36 +1,59 @@
#[cfg(test)]
mod test;
-use std::sync::Arc;
-
-use async_graphql::{Context, Subscription};
-use graphql_common::require_authenticated_user;
+use async_graphql::{Context, ID, OutputType, Subscription, Union};
+use graphql_common::{GraphqlCacheDeletion, require_authenticated_user};
use model_notifications::NotifEvent;
use notification::domain::{
- models::queue_message::RealtimeNotif,
+ models::NotificationSubscriptionUpdate,
ports::{WebSocketNotificationSubscriptionExit, WebSocketNotificationSubscriptionService},
};
use tokio_stream::Stream;
use crate::GraphqlNotification;
+/// Realtime notification patch represented as either an update or cache deletion.
+#[allow(clippy::large_enum_variant)] // Notification updates already carry shared rows without allocation.
+#[derive(Union)]
+pub enum GraphqlNotificationPatch {
+ /// A notification that was created or updated.
+ Updated(GraphqlNotification),
+ /// A normalized notification record that must be deleted.
+ Deleted(GraphqlCacheDeletion),
+}
+
+impl From<NotificationSubscriptionUpdate<NotifEvent>> for GraphqlNotificationPatch {
+ fn from(value: NotificationSubscriptionUpdate<NotifEvent>) -> Self {
+ match value {
+ NotificationSubscriptionUpdate::Updated(notification) => {
+ Self::Updated(GraphqlNotification::from(notification))
+ }
+ NotificationSubscriptionUpdate::Deleted(notification_id) => {
+ Self::Deleted(GraphqlCacheDeletion::new(
+ <GraphqlNotification as OutputType>::type_name(),
+ ID(notification_id.to_string()),
+ ))
+ }
+ }
+ }
+}
+
/// Subscribe to realtime notifications addressed to the authenticated user.
pub fn subscribe_to_notifications<S>(
service: &S,
ctx: &Context<'_>,
) -> async_graphql::Result<
- impl Stream<Item = async_graphql::Result<GraphqlNotification>> + Send + 'static,
+ impl Stream<Item = async_graphql::Result<GraphqlNotificationPatch>> + Send + 'static,
>
where
- S: WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>,
+ S: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>,
{
let user_id = require_authenticated_user(ctx)?;
let mut subscription = service.subscribe(user_id.clone());
Ok(async_stream::stream! {
- while let Some(notification) = subscription.recv().await {
- let notification = Arc::unwrap_or_clone(notification);
- yield Ok(GraphqlNotification::from_realtime(user_id.clone(), notification));
+ while let Some(update) = subscription.recv().await {
+ yield Ok(GraphqlNotificationPatch::from(update));
}
match subscription.exit_reason().await {
@@ -65,14 +88,14 @@ impl<S> NotificationSubscriptionRoot<S> {
#[Subscription]
impl<S> NotificationSubscriptionRoot<S>
where
- S: WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>,
+ S: WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>,
{
/// Subscribe to realtime notifications for the authenticated user.
async fn notification_updates(
&self,
ctx: &Context<'_>,
) -> async_graphql::Result<
- impl Stream<Item = async_graphql::Result<GraphqlNotification>> + 'static,
+ impl Stream<Item = async_graphql::Result<GraphqlNotificationPatch>> + 'static,
> {
subscribe_to_notifications(&self.service, ctx)
}
diff --git a/crates/graphql_notification/src/subscriptions/test.rs b/crates/graphql_notification/src/subscriptions/test.rs
index 59f30d7368..a06dddcda0 100644
--- a/crates/graphql_notification/src/subscriptions/test.rs
+++ b/crates/graphql_notification/src/subscriptions/test.rs
@@ -1,4 +1,7 @@
-use std::{collections::VecDeque, sync::Mutex};
+use std::{
+ collections::VecDeque,
+ sync::{Arc, Mutex},
+};
use async_graphql::{EmptyMutation, Object, Schema};
use chrono::Utc;
@@ -6,7 +9,7 @@ use macro_user_id::user_id::MacroUserIdStr;
use model_entity::EntityType;
use model_notifications::{NotifEvent, TaskAssignedMetadata};
use notification::domain::{
- models::queue_message::RealtimeNotif,
+ models::{NotificationSubscriptionUpdate, UserNotificationRow},
ports::{
WebSocketNotificationSubscription, WebSocketNotificationSubscriptionExit,
WebSocketNotificationSubscriptionService,
@@ -25,17 +28,18 @@ impl Query {
}
struct TestSubscriptionService {
- subscriptions:
- Mutex<VecDeque<WebSocketNotificationSubscription<Arc<RealtimeNotif<NotifEvent>>>>>,
+ subscriptions: Mutex<
+ VecDeque<WebSocketNotificationSubscription<NotificationSubscriptionUpdate<NotifEvent>>>,
+ >,
}
-impl WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>
+impl WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<NotifEvent>>
for TestSubscriptionService
{
fn subscribe(
&self,
_user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<Arc<RealtimeNotif<NotifEvent>>> {
+ ) -> WebSocketNotificationSubscription<NotificationSubscriptionUpdate<NotifEvent>> {
self.subscriptions
.lock()
.expect("subscription lock")
@@ -47,8 +51,8 @@ impl WebSocketNotificationSubscriptionService<RealtimeNotif<NotifEvent>>
fn subscription(
exit: WebSocketNotificationSubscriptionExit,
) -> (
- tokio::sync::mpsc::Sender<Arc<RealtimeNotif<NotifEvent>>>,
- WebSocketNotificationSubscription<Arc<RealtimeNotif<NotifEvent>>>,
+ tokio::sync::mpsc::Sender<NotificationSubscriptionUpdate<NotifEvent>>,
+ WebSocketNotificationSubscription<NotificationSubscriptionUpdate<NotifEvent>>,
) {
let (sender, receiver) = tokio::sync::mpsc::channel(1);
let (exit_sender, exit_receiver) = tokio::sync::oneshot::channel();
@@ -74,32 +78,35 @@ async fn notification_updates_streams_realtime_notifications() {
);
let mut responses = Box::pin(schema.execute_stream(
async_graphql::Request::new(
- "subscription { notificationUpdates { id eventType entityType entityId metadata { __typename ... on GraphqlTaskAssignedMetadata { taskId taskName assignedBy } } } }",
+ "subscription { notificationUpdates { __typename ... on GraphqlNotification { id eventType entityType entityId metadata { __typename ... on GraphqlTaskAssignedMetadata { taskId taskName assignedBy } } } } }",
)
- .data(user_id),
+ .data(user_id.clone()),
));
let notification_id = uuid::Uuid::from_u128(42);
sender
- .send(Arc::new(RealtimeNotif {
- notification_id,
- notification_event_type: "task_assigned".to_string(),
- entity: EntityType::Document.with_entity_string("task-1".to_string()),
- sent: true,
- done: false,
- created_at: Utc::now(),
- viewed_at: None,
- updated_at: Utc::now(),
- deleted_at: None,
- notification_metadata: NotifEvent::TaskAssigned(TaskAssignedMetadata {
- task_id: "task-1".to_string(),
- task_name: Some("Test task".to_string()),
- sub_type: None,
- assigned_by,
- sender_profile_picture_url: None,
- }),
- sender_id: None,
- }))
+ .send(NotificationSubscriptionUpdate::Updated(Arc::new(
+ UserNotificationRow {
+ owner_id: user_id,
+ notification_id,
+ notification_event_type: "task_assigned".to_string(),
+ entity: EntityType::Document.with_entity_string("task-1".to_string()),
+ sent: true,
+ done: false,
+ created_at: Utc::now(),
+ viewed_at: None,
+ updated_at: Utc::now(),
+ deleted_at: None,
+ notification_metadata: NotifEvent::TaskAssigned(TaskAssignedMetadata {
+ task_id: "task-1".to_string(),
+ task_name: Some("Test task".to_string()),
+ sub_type: None,
+ assigned_by,
+ sender_profile_picture_url: None,
+ }),
+ sender_id: None,
+ },
+ )))
.await
.expect("subscription remains open");
@@ -130,6 +137,50 @@ async fn notification_updates_streams_realtime_notifications() {
);
}
+#[tokio::test]
+async fn notification_updates_streams_cache_deletions() {
+ let user_id = MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap();
+ let (sender, subscription) = subscription(WebSocketNotificationSubscriptionExit::Closed);
+ let service = TestSubscriptionService {
+ subscriptions: Mutex::new(VecDeque::from([subscription])),
+ };
+ let schema = Schema::new(
+ Query,
+ EmptyMutation,
+ NotificationSubscriptionRoot::new(service),
+ );
+ let mut responses = Box::pin(schema.execute_stream(
+ async_graphql::Request::new(
+ "subscription { notificationUpdates { __typename ... on GraphqlCacheDeletion { graphqlTypeName entityId } } }",
+ )
+ .data(user_id),
+ ));
+
+ let notification_id = uuid::Uuid::from_u128(42);
+ sender
+ .send(NotificationSubscriptionUpdate::Deleted(notification_id))
+ .await
+ .expect("subscription remains open");
+
+ let response = futures::StreamExt::next(&mut responses)
+ .await
+ .expect("subscription response");
+ assert!(response.errors.is_empty(), "{:?}", response.errors);
+ let data = response.data.into_json().expect("response data is JSON");
+ assert_eq!(
+ data["notificationUpdates"]["__typename"],
+ "GraphqlCacheDeletion"
+ );
+ assert_eq!(
+ data["notificationUpdates"]["graphqlTypeName"],
+ "GraphqlNotification"
+ );
+ assert_eq!(
+ data["notificationUpdates"]["entityId"],
+ notification_id.to_string()
+ );
+}
+
#[tokio::test]
async fn notification_updates_reports_slow_consumers() {
let user_id = MacroUserIdStr::parse_from_str("macro|[email protected]").unwrap();
@@ -143,9 +194,12 @@ async fn notification_updates_reports_slow_consumers() {
EmptyMutation,
NotificationSubscriptionRoot::new(service),
);
- let mut responses = Box::pin(schema.execute_stream(
- async_graphql::Request::new("subscription { notificationUpdates { id } }").data(user_id),
- ));
+ let mut responses = Box::pin(
+ schema.execute_stream(
+ async_graphql::Request::new("subscription { notificationUpdates { __typename } }")
+ .data(user_id),
+ ),
+ );
let response = futures::StreamExt::next(&mut responses)
.await
@@ -167,7 +221,7 @@ async fn notification_updates_requires_an_authenticated_user() {
NotificationSubscriptionRoot::new(service),
);
let mut responses =
- Box::pin(schema.execute_stream("subscription { notificationUpdates { id } }"));
+ Box::pin(schema.execute_stream("subscription { notificationUpdates { __typename } }"));
let response = futures::StreamExt::next(&mut responses)
.await
diff --git a/crates/notification/Cargo.toml b/crates/notification/Cargo.toml
index 23ec7549b7..ef25384d83 100644
--- a/crates/notification/Cargo.toml
+++ b/crates/notification/Cargo.toml
@@ -78,6 +78,7 @@ workspace-hack = { version = "0.1", path = "../workspace-hack" }
[dev-dependencies]
http-body-util = { workspace = true }
macro_db_migrator = { path = "../macro_db_migrator" }
+model_notifications = { path = "../model_notifications" }
rate_limit = { path = "../rate_limit", features = ["testing"] }
tokio = { workspace = true, features = ["macros", "rt", "test-util"] }
tower = { workspace = true }
diff --git a/crates/notification/src/domain/models.rs b/crates/notification/src/domain/models.rs
index 65dd6d85bf..7f66c9c44a 100644
--- a/crates/notification/src/domain/models.rs
+++ b/crates/notification/src/domain/models.rs
@@ -58,14 +58,12 @@ pub struct NotificationStatusPatch {
}
/// A patch-or-delete update for an entity identified by `I`.
-#[derive(Debug, Clone, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "t", content = "c")]
pub enum PatchDelete<I, T> {
/// The value with id I should be patched with data T.
Patch {
- /// The id to patch.
- id: I,
- /// The data to patch.
+ /// The data to patch, including its identifier.
#[serde(flatten)]
diff: T,
},
@@ -76,33 +74,64 @@ pub enum PatchDelete<I, T> {
},
}
+/// A deletion update for an entity identified by `I`.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(tag = "t", content = "c")]
+pub enum NotificationDelete<I> {
+ /// The value with id `I` should be deleted.
+ Delete {
+ /// The id to delete.
+ id: I,
+ },
+}
+
+/// A user-scoped notification update delivered to realtime subscribers.
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum NotificationSubscriptionUpdate<T> {
+ /// A notification was created or updated.
+ Updated(Arc<UserNotificationRow<T>>),
+ /// A notification should be removed from the normalized cache.
+ Deleted(Uuid),
+}
+
/// Realtime payload emitted when notification seen/done state changes.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
-pub struct NotificationStatusUpdate {
+pub struct NotificationStatusUpdate<'a> {
/// Constant event discriminator for frontend consumers.
#[serde(rename = "type")]
pub event_type: String,
/// The changed notification rows.
- pub updates: Vec<PatchDelete<Uuid, NotificationStatusPatch>>,
+ pub updates: Vec<PatchDelete<Uuid, Cow<'a, UserNotificationRow<serde_json::Value>>>>,
}
-/// A realtime notification status update scoped to one user.
-#[derive(Debug, Clone, Serialize, Deserialize)]
-#[serde(rename_all = "camelCase")]
-pub struct UserNotificationStatusUpdate<'a> {
- /// The user who should receive the update.
- pub user: MacroUserIdStr<'a>,
- /// The status update payload for that user.
- pub update: NotificationStatusUpdate,
+/// A realtime notification status update with explicit user/notification cardinality.
+#[derive(Debug, Clone)]
+pub enum NotificationStatusPayload<'a> {
+ /// One notification deletion applied to many users.
+ NotificationForUsers {
+ /// Users who should receive the deletion.
+ users: Vec<MacroUserIdStr<'a>>,
+ /// The notification deletion shared by the users.
+ update: Box<NotificationDelete<Uuid>>,
+ },
+ /// Many notification updates applied to one user.
+ UserNotifications {
+ /// User who should receive the updates.
+ user: MacroUserIdStr<'a>,
+ /// Notification patches and deletions for the user.
+ updates: Vec<PatchDelete<Uuid, Cow<'a, UserNotificationRow<serde_json::Value>>>>,
+ },
}
-impl NotificationStatusUpdate {
+impl<'a> NotificationStatusUpdate<'a> {
/// The connection-gateway message type for notification status changes.
pub const MESSAGE_TYPE: &'static str = "notification_status_updated";
/// Build a realtime status update payload.
- pub fn new(updates: Vec<PatchDelete<Uuid, NotificationStatusPatch>>) -> Self {
+ pub fn new(
+ updates: Vec<PatchDelete<Uuid, Cow<'a, UserNotificationRow<serde_json::Value>>>>,
+ ) -> Self {
Self {
event_type: Self::MESSAGE_TYPE.to_string(),
updates,
@@ -114,7 +143,7 @@ impl NotificationStatusUpdate {
///
/// The metadata field is generic so callers can deserialize it into
/// whatever type they need without this crate depending on the caller's models.
-#[derive(Debug, Clone, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct UserNotificationRow<T> {
/// The user who owns this notification.
pub owner_id: MacroUserIdStr<'static>,
diff --git a/crates/notification/src/domain/models/websocket_notification_event.rs b/crates/notification/src/domain/models/websocket_notification_event.rs
index 03d614560c..3a6e0e1f72 100644
--- a/crates/notification/src/domain/models/websocket_notification_event.rs
+++ b/crates/notification/src/domain/models/websocket_notification_event.rs
@@ -1,71 +1,122 @@
-//! Broker event models for WebSocket notification delivery.
+//! Broker event models for realtime notification delivery.
+
+use std::borrow::Cow;
use macro_event_broker::{Event, MacroEvent, TopicEvent};
use macro_event_topics::MacroNotificationsTopic;
use macro_user_id::user_id::MacroUserIdStr;
use serde::{Deserialize, Serialize, de::DeserializeOwned};
+use uuid::Uuid;
+
+use crate::domain::models::{NotificationDelete, PatchDelete, UserNotificationRow};
-/// Recipients and payload for one WebSocket notification delivery request.
+/// User-scoped notification rows for WebSocket delivery.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct WebSocketNotificationMetadata<T> {
- /// Users who should receive the notification.
- pub recipients: Vec<MacroUserIdStr<'static>>,
- /// Notification payload forwarded to each recipient.
- pub notification: T,
+ /// Notification rows to deliver to their respective owners.
+ pub notifications: Vec<UserNotificationRow<T>>,
}
/// Events published to [`MacroNotificationsTopic`].
+///
+/// `T` is the notification metadata type carried inside each [`UserNotificationRow`], typically
+/// `NotifEvent` in application code.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(tag = "event_type", content = "metadata")]
-pub enum NotificationTopicEvent<T> {
+pub enum NotificationTopicEvent<'a, T: Clone> {
/// A notification should be delivered to active WebSocket connections.
#[serde(rename = "notification.websocket_delivery_requested")]
WebSocketDeliveryRequested(WebSocketNotificationMetadata<T>),
+ /// One notification was deleted for a set of users.
+ #[serde(rename = "notification.status_updated_for_users")]
+ NotificationStatusUpdatedForUsers {
+ /// Users who own the notification deletion.
+ users: Vec<MacroUserIdStr<'a>>,
+ /// Notification deletion shared by the users.
+ update: Box<NotificationDelete<Uuid>>,
+ },
+ /// Several notifications were patched or deleted for one user.
+ #[serde(rename = "notification.statuses_updated_for_user")]
+ NotificationStatusesUpdatedForUser {
+ /// User who owns the notification updates.
+ user: MacroUserIdStr<'a>,
+ /// Notification row patches and deletions for the user.
+ updates: Vec<PatchDelete<Uuid, Cow<'a, UserNotificationRow<T>>>>,
+ },
}
-impl<T: Serialize + DeserializeOwned + Send + Sync> TopicEvent for NotificationTopicEvent<T> {
+impl<'a, T: Clone + Serialize + DeserializeOwned + Send + Sync> TopicEvent
+ for NotificationTopicEvent<'a, T>
+{
type Topic = MacroNotificationsTopic;
const SCHEMA_VERSION: u8 = 1;
}
-/// Publishable WebSocket notification event.
-pub struct NotificationMacroEvent<T> {
+/// Publishable realtime notification event carrying notification metadata of type `T`.
+pub struct NotificationMacroEvent<'a, T: Clone> {
key: String,
- event: Event<NotificationTopicEvent<T>>,
+ event: Event<NotificationTopicEvent<'a, T>>,
}
-impl<T: Serialize + DeserializeOwned + Send + Sync> NotificationMacroEvent<T> {
- /// Creates a delivery event keyed by its generated event ID.
- pub fn new(recipients: Vec<MacroUserIdStr<'static>>, notification: T) -> Self {
- let metadata = WebSocketNotificationMetadata {
- recipients,
- notification,
- };
- let event = Event::new(NotificationTopicEvent::WebSocketDeliveryRequested(metadata));
+impl<'a, T: Clone + Serialize + DeserializeOwned + Send + Sync> NotificationMacroEvent<'a, T> {
+ /// Creates an event for one notification deletion shared by several users.
+ pub fn status_updated_for_users(
+ users: Vec<MacroUserIdStr<'a>>,
+ update: Box<NotificationDelete<Uuid>>,
+ ) -> Self {
+ let event =
+ Event::new(NotificationTopicEvent::NotificationStatusUpdatedForUsers { users, update });
+ let key = event.event_id.to_string();
+
+ Self::with_event(key, event)
+ }
+
+ /// Creates an event for several notification status updates belonging to one user.
+ pub fn statuses_updated_for_user(
+ user: MacroUserIdStr<'a>,
+ updates: Vec<PatchDelete<Uuid, Cow<'a, UserNotificationRow<T>>>>,
+ ) -> Self {
+ let event = Event::new(NotificationTopicEvent::NotificationStatusesUpdatedForUser {
+ user,
+ updates,
+ });
let key = event.event_id.to_string();
Self::with_event(key, event)
}
/// Builds an event from its Kafka key and pre-built envelope.
- pub fn with_event(key: impl Into<String>, event: Event<NotificationTopicEvent<T>>) -> Self {
+ pub fn with_event(key: impl Into<String>, event: Event<NotificationTopicEvent<'a, T>>) -> Self {
Self {
key: key.into(),
event,
}
}
- /// Returns the WebSocket delivery request carried by this event.
- pub fn into_message(self) -> WebSocketNotificationMetadata<T> {
- match self.event.event {
- NotificationTopicEvent::WebSocketDeliveryRequested(metadata) => metadata,
- }
+ /// Returns the topic event carried by this event.
+ pub fn into_topic_event(self) -> NotificationTopicEvent<'a, T> {
+ self.event.event
+ }
+}
+
+impl<T: Clone + Serialize + DeserializeOwned + Send + Sync + 'static>
+ NotificationMacroEvent<'static, T>
+{
+ /// Creates a WebSocket delivery event keyed by its generated event ID.
+ pub fn new(notifications: Vec<UserNotificationRow<T>>) -> Self {
+ let metadata = WebSocketNotificationMetadata { notifications };
+ let event = Event::new(NotificationTopicEvent::WebSocketDeliveryRequested(metadata));
+ let key = event.event_id.to_string();
+
+ Self::with_event(key, event)
}
}
-impl<T: Serialize + DeserializeOwned + Send + Sync> MacroEvent for NotificationMacroEvent<T> {
- type EventPayload = NotificationTopicEvent<T>;
+impl<'a, T: Clone + Serialize + DeserializeOwned + Send + Sync> MacroEvent
+ for NotificationMacroEvent<'a, T>
+{
+ type EventPayload = NotificationTopicEvent<'a, T>;
fn key(&self) -> &str {
&self.key
@@ -80,5 +131,5 @@ impl<T: Serialize + DeserializeOwned + Send + Sync> MacroEvent for NotificationM
}
}
-/// WebSocket notification event decoded with an arbitrary JSON payload.
-pub type JsonNotificationMacroEvent = NotificationMacroEvent<serde_json::Value>;
+/// Realtime notification event decoded with arbitrary JSON notification metadata.
+pub type JsonNotificationMacroEvent = NotificationMacroEvent<'static, serde_json::Value>;
diff --git a/crates/notification/src/domain/ports.rs b/crates/notification/src/domain/ports.rs
index 6c52a12dfb..bcf8061f85 100644
--- a/crates/notification/src/domain/ports.rs
+++ b/crates/notification/src/domain/ports.rs
@@ -16,7 +16,7 @@ use uuid::Uuid;
use models_pagination::{CreatedAt, Query};
use crate::domain::models::device::DeviceType;
-use crate::domain::models::{TaggedContent, UserNotificationStatusUpdate};
+use crate::domain::models::{NotificationStatusPayload, TaggedContent};
use crate::domain::models::email_notification_digest::ports::{ClaimResult, DigestBatch};
use crate::domain::models::request::{NotificationEntityRef, NotificationListFilters};
@@ -274,7 +274,7 @@ pub trait NotificationRealtimePublisher: Send + Sync + 'static {
/// Publish notification status updates to the users who own the notifications.
fn publish_updates(
&self,
- updates: &[UserNotificationStatusUpdate<'_>],
+ payload: &NotificationStatusPayload<'_>,
) -> impl Future<Output = Result<(), Report>> + Send;
}
@@ -283,14 +283,14 @@ pub trait NotificationRealtimePublisher: Send + Sync + 'static {
pub struct NoopNotificationRealtimePublisher;
impl NotificationRealtimePublisher for NoopNotificationRealtimePublisher {
- async fn publish_updates(&self, _: &[UserNotificationStatusUpdate<'_>]) -> Result<(), Report> {
+ async fn publish_updates(&self, _: &NotificationStatusPayload<'_>) -> Result<(), Report> {
Ok(())
}
}
-/// Port for WebSocket delivery via connection gateway.
-pub trait WebSocketSender: Send + Sync + 'static {
- /// Send notifications to users via WebSocket.
+/// Port for realtime notification delivery.
+pub trait RealtimeSender: Send + Sync + 'static {
+ /// Send notifications to users in realtime.
///
/// Returns the set of users who successfully received the notification
/// (i.e., they were online and the message was delivered).
@@ -301,14 +301,14 @@ pub trait WebSocketSender: Send + Sync + 'static {
) -> impl Future<Output = Result<HashSet<MacroUserIdStr<'static>>, Report>> + Send;
}
-/// Receives WebSocket notification delivery requests with payloads decoded as `T`.
-pub trait WebSocketNotificationConsumer<T>: Send + Sync + 'static {
- /// Waits for and returns the next WebSocket notification delivery request.
+/// Receives events from the notifications topic with notification metadata decoded as `T`.
+pub trait NotificationTopicEventConsumer<T: Clone + 'static>: Send + Sync + 'static {
+ /// Waits for and returns the next notification topic event.
fn recv(
&self,
) -> impl Future<
Output = Result<
- crate::domain::models::websocket_notification_event::WebSocketNotificationMetadata<T>,
+ crate::domain::models::websocket_notification_event::NotificationTopicEvent<'static, T>,
Report,
>,
> + Send;
@@ -359,23 +359,17 @@ impl<T> WebSocketNotificationSubscription<T> {
}
}
-/// Provides user-scoped subscriptions to received WebSocket notifications decoded as `T`.
+/// Provides user-scoped subscriptions to received WebSocket notification updates of type `T`.
pub trait WebSocketNotificationSubscriptionService<T>: Send + Sync + 'static {
- /// Subscribes to WebSocket notifications addressed to `user_id`.
- fn subscribe(
- &self,
- user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<std::sync::Arc<T>>;
+ /// Subscribes to WebSocket notification updates addressed to `user_id`.
+ fn subscribe(&self, user_id: MacroUserIdStr<'static>) -> WebSocketNotificationSubscription<T>;
}
impl<S, T> WebSocketNotificationSubscriptionService<T> for std::sync::Arc<S>
where
S: WebSocketNotificationSubscriptionService<T>,
{
- fn subscribe(
- &self,
- user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<std::sync::Arc<T>> {
+ fn subscribe(&self, user_id: MacroUserIdStr<'static>) -> WebSocketNotificationSubscription<T> {
self.as_ref().subscribe(user_id)
}
}
@@ -384,13 +378,10 @@ where
#[derive(Clone, Copy, Debug, Default)]
pub struct NoopWebSocketNotificationSubscriptionService;
-impl<T: Send + Sync + 'static> WebSocketNotificationSubscriptionService<T>
+impl<T: Send + 'static> WebSocketNotificationSubscriptionService<T>
for NoopWebSocketNotificationSubscriptionService
{
- fn subscribe(
- &self,
- _user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<std::sync::Arc<T>> {
+ fn subscribe(&self, _user_id: MacroUserIdStr<'static>) -> WebSocketNotificationSubscription<T> {
let (_sender, receiver) = tokio::sync::mpsc::channel(1);
let (exit_reason_sender, exit_reason) = tokio::sync::oneshot::channel();
let _ = exit_reason_sender.send(WebSocketNotificationSubscriptionExit::Closed);
diff --git a/crates/notification/src/domain/service/egress.rs b/crates/notification/src/domain/service/egress.rs
index bf2c126d35..3732fbdb4a 100644
--- a/crates/notification/src/domain/service/egress.rs
+++ b/crates/notification/src/domain/service/egress.rs
@@ -1,7 +1,7 @@
//! Egress service for delivering notifications.
//!
//! This service handles the worker-facing side of notifications:
-//! consuming from the queue and delivering via WebSocket, push, and email.
+//! consuming from the queue and delivering via realtime, push, and email.
use crate::domain::models::apple::APNSPushNotification;
use crate::domain::models::email_notification_digest::ports::{
@@ -18,7 +18,7 @@ use crate::domain::models::queue_message::{
use crate::domain::models::{NotificationExtEmail, NotificationTypeName, RateLimitResult};
use crate::domain::ports::{
EmailSender, NotificationEgress, NotificationQueue, NotificationRepository, NotificationSender,
- RateLimitService, WebSocketSender,
+ RateLimitService, RealtimeSender,
};
use cowlike::CowLike;
use either::Either;
@@ -60,14 +60,14 @@ impl<M: NotificationSender> NotificationSendChecker for IosPushSend<'_, M> {
/// Service for delivering notifications (egress side).
///
-/// Handles consuming from queue and delivering via WebSocket, push, and email.
-pub struct NotificationEgressService<Q, N, W, M, E, R, S, D> {
+/// Handles consuming from queue and delivering via realtime, push, and email.
+pub struct NotificationEgressService<Q, N, RT, M, E, R, S, D> {
/// Queue for receiving notification messages.
pub queue: Q,
/// Notification repository for DB operations.
pub repository: N,
- /// WebSocket sender for real-time delivery.
- pub websocket: W,
+ /// Realtime notification sender.
+ pub realtime: RT,
/// Mobile push sender (APNS/FCM).
pub mobile: M,
/// Email sender.
@@ -80,11 +80,11 @@ pub struct NotificationEgressService<Q, N, W, M, E, R, S, D> {
pub digest_batcher: D,
}
-impl<Q, N, W, M, E, R, S, D> NotificationEgressService<Q, N, W, M, E, R, S, D>
+impl<Q, N, RT, M, E, R, S, D> NotificationEgressService<Q, N, RT, M, E, R, S, D>
where
Q: NotificationQueue,
N: NotificationRepository,
- W: WebSocketSender,
+ RT: RealtimeSender,
M: NotificationSender,
E: EmailSender,
R: RateLimitService,
@@ -126,7 +126,7 @@ where
&self,
conn: &ConnGatewayNotification<'static, serde_json::Value>,
) -> Result<DeliverySuccess, Report> {
- self.websocket
+ self.realtime
.send_notifications(&conn.recipients, &conn.notif)
.await?;
Ok(DeliverySuccess::ConnGateway)
@@ -251,12 +251,12 @@ where
}
}
-impl<Q, N, W, M, E, R, S, D> NotificationEgress
- for NotificationEgressService<Q, N, W, M, E, R, S, D>
+impl<Q, N, RT, M, E, R, S, D> NotificationEgress
+ for NotificationEgressService<Q, N, RT, M, E, R, S, D>
where
Q: NotificationQueue,
N: NotificationRepository,
- W: WebSocketSender,
+ RT: RealtimeSender,
M: NotificationSender,
E: EmailSender,
R: RateLimitService,
diff --git a/crates/notification/src/domain/service/ingress.rs b/crates/notification/src/domain/service/ingress.rs
index 124b76dfc4..8587c9e6d6 100644
--- a/crates/notification/src/domain/service/ingress.rs
+++ b/crates/notification/src/domain/service/ingress.rs
@@ -19,8 +19,7 @@ use crate::domain::models::request::{
};
use crate::domain::models::{
DeviceEndpoint, DisabledNotificationType, Notification, NotificationResult,
- NotificationStatusPatch, NotificationStatusUpdate, NotificationTypeName, PatchDelete,
- UserNotificationRow, UserNotificationStatusUpdate,
+ NotificationStatusPayload, NotificationTypeName, PatchDelete, UserNotificationRow,
};
use crate::domain::ports::{
NoopNotificationRealtimePublisher, NotificationIngressQueue, NotificationQueue,
@@ -35,6 +34,7 @@ use rootcause::Report;
use rootcause::prelude::ResultExt;
use serde::Serialize;
use serde::de::DeserializeOwned;
+use std::borrow::Cow;
use std::collections::{HashMap, HashSet};
use uuid::Uuid;
@@ -87,15 +87,14 @@ pub trait NotificationReader: Send + Sync + 'static {
) -> impl Future<Output = Result<Paginated<UserNotificationRow<T>, String>, Report>> + Send;
/// Get a user's active notifications for multiple entities, grouped by requested entity.
- fn get_entity_notifications_batch(
+ ///
+ /// Metadata is deserialized from the event-type-tagged notification representation.
+ fn get_entity_notifications_batch<T: DeserializeOwned + Send>(
&self,
user_id: MacroUserIdStr<'_>,
entity_refs: Vec<NotificationEntityRef>,
) -> impl Future<
- Output = Result<
- HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>,
- Report,
- >,
+ Output = Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<T>>>, Report>,
> + Send;
/// Get a single user notification by ID.
@@ -517,19 +516,14 @@ where
let updates = changed
.iter()
.map(|notification| PatchDelete::Patch {
- id: notification.notification_id,
- diff: NotificationStatusPatch {
- done: notification.done,
- viewed_at: notification.viewed_at,
- updated_at: notification.updated_at,
- },
+ diff: Cow::Borrowed(notification),
})
.collect();
- let update = UserNotificationStatusUpdate {
+ let payload = NotificationStatusPayload::UserNotifications {
user: req.user_id.copied(),
- update: NotificationStatusUpdate::new(updates),
+ updates,
};
- if let Err(err) = self.realtime.publish_updates(&[update]).await {
+ if let Err(err) = self.realtime.publish_updates(&payload).await {
tracing::warn!(error = ?err, "failed to publish notification status realtime update");
}
}
@@ -693,15 +687,42 @@ where
}
#[tracing::instrument(err, skip(self))]
- async fn get_entity_notifications_batch(
+ async fn get_entity_notifications_batch<T: DeserializeOwned + Send>(
&self,
user_id: MacroUserIdStr<'_>,
entity_refs: Vec<NotificationEntityRef>,
- ) -> Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>, Report>
- {
- self.repository
+ ) -> Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<T>>>, Report> {
+ Ok(self
+ .repository
.get_entity_notifications_batch(user_id, entity_refs)
- .await
+ .await?
+ .into_iter()
+ .map(|(entity_ref, notifications)| {
+ let notifications = notifications
+ .into_iter()
+ .filter_map(|notification| {
+ let notification_id = notification.notification_id;
+ let notification_event_type = notification.notification_event_type.clone();
+ match notification.into_tagged().deserialize_metadata::<T>() {
+ Ok(notification) => Some(notification),
+ Err(error) => {
+ tracing::warn!(
+ error = ?error,
+ %notification_id,
+ notification_event_type,
+ entity_type = ?entity_ref.entity_type,
+ entity_id = %entity_ref.id,
+ "skipping notification with invalid metadata"
+ );
+ None
+ }
+ }
+ })
+ .collect();
+
+ (entity_ref, notifications)
+ })
+ .collect())
}
#[tracing::instrument(err, skip(self))]
diff --git a/crates/notification/src/domain/service/realtime.rs b/crates/notification/src/domain/service/realtime.rs
index b9e5c6e882..4fb24e96ca 100644
--- a/crates/notification/src/domain/service/realtime.rs
+++ b/crates/notification/src/domain/service/realtime.rs
@@ -3,7 +3,7 @@
#[cfg(test)]
mod test;
-use std::{num::NonZeroUsize, sync::Arc, time::Duration};
+use std::{borrow::Cow, num::NonZeroUsize, sync::Arc, time::Duration};
use broadcast::{BroadcastManager, GlobalSpawner};
use macro_user_id::user_id::MacroUserIdStr;
@@ -11,9 +11,12 @@ use rootcause::prelude::{Report, ResultExt as _};
use tokio_retry::{Retry, strategy::ExponentialBackoff};
use crate::domain::{
- models::websocket_notification_event::WebSocketNotificationMetadata,
+ models::{
+ NotificationDelete, NotificationSubscriptionUpdate, PatchDelete, UserNotificationRow,
+ websocket_notification_event::{NotificationTopicEvent, WebSocketNotificationMetadata},
+ },
ports::{
- WebSocketNotificationConsumer, WebSocketNotificationSubscription,
+ NotificationTopicEventConsumer, WebSocketNotificationSubscription,
WebSocketNotificationSubscriptionService,
},
};
@@ -32,21 +35,21 @@ fn receive_retry_strategy() -> impl Iterator<Item = Duration> {
.take(MAX_RECEIVE_ATTEMPTS - 1)
}
-/// Service for distributing received WebSocket notifications decoded as `T` to user-scoped
-/// subscribers.
+/// Service for distributing received notification rows to user-scoped subscribers.
pub struct WebSocketNotificationConsumerService<C, T>
where
- C: WebSocketNotificationConsumer<T>,
- T: Send + Sync + 'static,
+ C: NotificationTopicEventConsumer<T>,
+ T: Clone + Send + Sync + 'static,
{
consumer: C,
- broadcasts: BroadcastManager<GlobalSpawner, MacroUserIdStr<'static>, Arc<T>>,
+ broadcasts:
+ BroadcastManager<GlobalSpawner, MacroUserIdStr<'static>, NotificationSubscriptionUpdate<T>>,
}
impl<C, T> WebSocketNotificationConsumerService<C, T>
where
- C: WebSocketNotificationConsumer<T>,
- T: Send + Sync + 'static,
+ C: NotificationTopicEventConsumer<T>,
+ T: Clone + Send + Sync + 'static,
{
/// Creates a WebSocket notification consumer service backed by `consumer`.
pub fn new(consumer: C) -> Self {
@@ -56,7 +59,7 @@ where
}
}
- /// Subscribes to WebSocket notifications addressed to `user_id`.
+ /// Subscribes to notification updates owned by `user_id`.
///
/// The returned subscription reports if its buffer fills, ensuring a slow subscriber cannot
/// delay the shared consumer or other subscribers.
@@ -64,7 +67,7 @@ where
pub fn subscribe(
&self,
user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<Arc<T>> {
+ ) -> WebSocketNotificationSubscription<NotificationSubscriptionUpdate<T>> {
let (receiver, broadcast_exit_reason) = self
.broadcasts
.subscribe(user_id, SUBSCRIBER_BUFFER_CAPACITY)
@@ -88,53 +91,88 @@ where
WebSocketNotificationSubscription::from_parts(receiver, exit_reason)
}
- /// Receives notifications and distributes them to subscribers until reception fails.
+ /// Publishes one update to every active subscriber for `user_id`.
+ fn publish_update(
+ &self,
+ user_id: &MacroUserIdStr<'static>,
+ update: NotificationSubscriptionUpdate<T>,
+ ) {
+ match self.broadcasts.publish(user_id, update) {
+ Ok(subscriber_count) => tracing::trace!(
+ subscriber_count,
+ user_id = %user_id,
+ "distributed WebSocket notification update"
+ ),
+ Err(_) => tracing::trace!(
+ user_id = %user_id,
+ "dropping WebSocket notification update without subscribers"
+ ),
+ }
+ }
+
+ /// Converts a topic patch or deletion into a subscriber update.
+ fn subscription_update(
+ update: PatchDelete<uuid::Uuid, Cow<'static, UserNotificationRow<T>>>,
+ ) -> NotificationSubscriptionUpdate<T> {
+ match update {
+ PatchDelete::Patch { diff } => {
+ NotificationSubscriptionUpdate::Updated(Arc::new(diff.into_owned()))
+ }
+ PatchDelete::Delete { id } => NotificationSubscriptionUpdate::Deleted(id),
+ }
+ }
+
+ /// Receives topic events and distributes WebSocket notification updates until reception fails.
///
- /// Callers should run this future in a supervised task. Notifications for users without active
+ /// Callers should run this future in a supervised task. Updates for users without active
/// subscribers are intentionally dropped.
#[tracing::instrument(skip(self), err)]
pub async fn run(&self) -> Result<(), Report> {
loop {
- let WebSocketNotificationMetadata {
- recipients,
- notification,
- } = Retry::start(receive_retry_strategy(), || self.consumer.recv())
+ let event = Retry::start(receive_retry_strategy(), || self.consumer.recv())
.await
.context(format!(
- "failed to receive WebSocket notification after {MAX_RECEIVE_ATTEMPTS} attempts"
+ "failed to receive notification topic event after {MAX_RECEIVE_ATTEMPTS} attempts"
))?;
- let notification = Arc::new(notification);
- for recipient in recipients {
- match self
- .broadcasts
- .publish(&recipient, Arc::clone(&notification))
- {
- Ok(subscriber_count) => tracing::trace!(
- subscriber_count,
- user_id = %recipient,
- "distributed WebSocket notification"
- ),
- Err(_) => tracing::trace!(
- user_id = %recipient,
- "dropping WebSocket notification without subscribers"
- ),
+ match event {
+ NotificationTopicEvent::WebSocketDeliveryRequested(
+ WebSocketNotificationMetadata { notifications },
+ ) => {
+ for notification in notifications {
+ let owner_id = notification.owner_id.clone();
+ self.publish_update(
+ &owner_id,
+ NotificationSubscriptionUpdate::Updated(Arc::new(notification)),
+ );
+ }
+ }
+ NotificationTopicEvent::NotificationStatusUpdatedForUsers { users, update } => {
+ let NotificationDelete::Delete { id } = *update;
+ for user_id in users {
+ self.publish_update(&user_id, NotificationSubscriptionUpdate::Deleted(id));
+ }
+ }
+ NotificationTopicEvent::NotificationStatusesUpdatedForUser { user, updates } => {
+ for update in updates {
+ self.publish_update(&user, Self::subscription_update(update));
+ }
}
}
}
}
}
-impl<C, T> WebSocketNotificationSubscriptionService<T>
+impl<C, T> WebSocketNotificationSubscriptionService<NotificationSubscriptionUpdate<T>>
for WebSocketNotificationConsumerService<C, T>
where
- C: WebSocketNotificationConsumer<T>,
- T: Send + Sync + 'static,
+ C: NotificationTopicEventConsumer<T>,
+ T: Clone + Send + Sync + 'static,
{
fn subscribe(
&self,
user_id: MacroUserIdStr<'static>,
- ) -> WebSocketNotificationSubscription<Arc<T>> {
+ ) -> WebSocketNotificationSubscription<NotificationSubscriptionUpdate<T>> {
WebSocketNotificationConsumerService::subscribe(self, user_id)
}
}
diff --git a/crates/notification/src/domain/service/realtime/test.rs b/crates/notification/src/domain/service/realtime/test.rs
index 4a1dccbd8f..331bec944a 100644
--- a/crates/notification/src/domain/service/realtime/test.rs
+++ b/crates/notification/src/domain/service/realtime/test.rs
@@ -1,23 +1,28 @@
+use std::borrow::Cow;
use std::collections::VecDeque;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::{Arc, Mutex};
+use chrono::Utc;
+use model_entity::EntityType;
+use rootcause::Report;
use serde::{Deserialize, Serialize};
+use uuid::Uuid;
use super::*;
-#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
struct TestNotification {
kind: String,
}
struct FakeConsumer {
- messages: Mutex<VecDeque<Result<WebSocketNotificationMetadata<TestNotification>, Report>>>,
+ messages: Mutex<VecDeque<Result<NotificationTopicEvent<'static, TestNotification>, Report>>>,
calls: Arc<AtomicUsize>,
}
-impl WebSocketNotificationConsumer<TestNotification> for FakeConsumer {
- async fn recv(&self) -> Result<WebSocketNotificationMetadata<TestNotification>, Report> {
+impl NotificationTopicEventConsumer<TestNotification> for FakeConsumer {
+ async fn recv(&self) -> Result<NotificationTopicEvent<'static, TestNotification>, Report> {
self.calls.fetch_add(1, Ordering::SeqCst);
self.messages
.lock()
@@ -31,21 +36,48 @@ fn user(local: &str) -> MacroUserIdStr<'static> {
MacroUserIdStr::try_from(format!("macro|{local}@example.com")).expect("valid user ID")
}
+fn notification(
+ owner_id: MacroUserIdStr<'static>,
+ kind: &str,
+) -> UserNotificationRow<TestNotification> {
+ UserNotificationRow {
+ owner_id,
+ notification_id: Uuid::nil(),
+ notification_event_type: kind.to_string(),
+ entity: EntityType::Document.with_entity_string("document-id".to_string()),
+ sent: true,
+ done: false,
+ created_at: Utc::now(),
+ viewed_at: None,
+ updated_at: Utc::now(),
+ deleted_at: None,
+ notification_metadata: TestNotification {
+ kind: kind.to_string(),
+ },
+ sender_id: None,
+ }
+}
+
+fn websocket_event(
+ notifications: Vec<UserNotificationRow<TestNotification>>,
+) -> NotificationTopicEvent<'static, TestNotification> {
+ NotificationTopicEvent::WebSocketDeliveryRequested(WebSocketNotificationMetadata {
+ notifications,
+ })
+}
+
#[tokio::test(start_paused = true)]
-async fn distributes_notifications_to_every_recipient_subscription() {
+async fn distributes_notifications_to_owner_subscriptions() {
let one = user("one");
let two = user("two");
- let notification = TestNotification {
- kind: "channel_mention".to_string(),
- };
let receive_calls = Arc::new(AtomicUsize::new(0));
let consumer = FakeConsumer {
messages: Mutex::new(VecDeque::from([
Err(rootcause::report!("transient receive failure")),
- Ok(WebSocketNotificationMetadata {
- recipients: vec![one.clone(), two.clone()],
- notification,
- }),
+ Ok(websocket_event(vec![
+ notification(one.clone(), "channel_mention"),
+ notification(two.clone(), "channel_mention"),
+ ])),
])),
calls: Arc::clone(&receive_calls),
};
@@ -68,12 +100,82 @@ async fn distributes_notifications_to_every_recipient_subscription() {
2 + MAX_RECEIVE_ATTEMPTS,
"a successful notification resets the receive retry strategy"
);
- let one_first = one_first.recv().await.expect("first subscriber receives");
- let one_second = one_second.recv().await.expect("second subscriber receives");
- let two = two_receiver.recv().await.expect("other user receives");
- assert_eq!(one_first.kind, "channel_mention");
+ let NotificationSubscriptionUpdate::Updated(one_first) =
+ one_first.recv().await.expect("first subscriber receives")
+ else {
+ panic!("expected notification update");
+ };
+ let NotificationSubscriptionUpdate::Updated(one_second) =
+ one_second.recv().await.expect("second subscriber receives")
+ else {
+ panic!("expected notification update");
+ };
+ let NotificationSubscriptionUpdate::Updated(two) =
+ two_receiver.recv().await.expect("other user receives")
+ else {
+ panic!("expected notification update");
+ };
+ assert_eq!(one_first.notification_metadata.kind, "channel_mention");
+ assert_eq!(two.notification_metadata.kind, "channel_mention");
assert!(Arc::ptr_eq(&one_first, &one_second));
- assert!(Arc::ptr_eq(&one_first, &two));
+ assert!(!Arc::ptr_eq(&one_first, &two));
+}
+
+#[tokio::test(start_paused = true)]
+async fn distributes_status_updates_to_their_owners() {
+ let one = user("one");
+ let two = user("two");
+ let shared_delete_id = Uuid::from_u128(1);
+ let user_delete_id = Uuid::from_u128(2);
+ let consumer = FakeConsumer {
+ messages: Mutex::new(VecDeque::from([
+ Ok(NotificationTopicEvent::NotificationStatusUpdatedForUsers {
+ users: vec![one.clone(), two.clone()],
+ update: Box::new(NotificationDelete::Delete {
+ id: shared_delete_id,
+ }),
+ }),
+ Ok(NotificationTopicEvent::NotificationStatusesUpdatedForUser {
+ user: one.clone(),
+ updates: vec![
+ PatchDelete::Patch {
+ diff: Cow::Owned(notification(one.clone(), "status_changed")),
+ },
+ PatchDelete::Delete { id: user_delete_id },
+ ],
+ }),
+ ])),
+ calls: Arc::new(AtomicUsize::new(0)),
+ };
+ let service = Arc::new(WebSocketNotificationConsumerService::new(consumer));
+ let mut one_receiver = service.subscribe(one);
+ let mut two_receiver = service.subscribe(two);
+
+ let _ = tokio::spawn({
+ let service = Arc::clone(&service);
+ async move { service.run().await }
+ })
+ .await
+ .expect("consumer task joins")
+ .expect_err("fake consumer eventually stops");
+
+ assert_eq!(
+ one_receiver.recv().await,
+ Some(NotificationSubscriptionUpdate::Deleted(shared_delete_id))
+ );
+ let Some(NotificationSubscriptionUpdate::Updated(notification)) = one_receiver.recv().await
+ else {
+ panic!("expected patched notification");
+ };
+ assert_eq!(notification.notification_metadata.kind, "status_changed");
+ assert_eq!(
+ one_receiver.recv().await,
+ Some(NotificationSubscriptionUpdate::Deleted(user_delete_id))
+ );
+ assert_eq!(
+ two_receiver.recv().await,
+ Some(NotificationSubscriptionUpdate::Deleted(shared_delete_id))
+ );
}
#[tokio::test(start_paused = true)]
@@ -87,12 +189,13 @@ async fn reports_slow_consumer_subscription_exit() {
let subscription = service.subscribe(subscribed.clone());
for index in 0..=SUBSCRIBER_BUFFER_CAPACITY.get() {
- let notification = Arc::new(TestNotification {
- kind: index.to_string(),
- });
+ let update = NotificationSubscriptionUpdate::Updated(Arc::new(notification(
+ subscribed.clone(),
+ &index.to_string(),
+ )));
service
.broadcasts
- .publish(&subscribed, notification)
+ .publish(&subscribed, update)
.expect("subscriber remains until its buffer fills");
tokio::task::yield_now().await;
}
@@ -104,15 +207,13 @@ async fn reports_slow_consumer_subscription_exit() {
}
#[tokio::test(start_paused = true)]
-async fn ignores_recipients_without_subscribers() {
+async fn ignores_notifications_without_subscribers() {
let subscribed = user("subscribed");
let consumer = FakeConsumer {
- messages: Mutex::new(VecDeque::from([Ok(WebSocketNotificationMetadata {
- recipients: vec![user("unsubscribed"), subscribed.clone()],
- notification: TestNotification {
- kind: "test".to_string(),
- },
- })])),
+ messages: Mutex::new(VecDeque::from([Ok(websocket_event(vec![
+ notification(user("unsubscribed"), "ignored"),
+ notification(subscribed.clone(), "test"),
+ ]))])),
calls: Arc::new(AtomicUsize::new(0)),
};
let service = Arc::new(WebSocketNotificationConsumerService::new(consumer));
@@ -126,8 +227,10 @@ async fn ignores_recipients_without_subscribers() {
.expect("consumer task joins")
.expect_err("fake consumer eventually stops");
- assert_eq!(
- receiver.recv().await.expect("subscriber receives").kind,
- "test"
- );
+ let NotificationSubscriptionUpdate::Updated(notification) =
+ receiver.recv().await.expect("subscriber receives")
+ else {
+ panic!("expected notification update");
+ };
+ assert_eq!(notification.notification_metadata.kind, "test");
}
diff --git a/crates/notification/src/domain/service/test.rs b/crates/notification/src/domain/service/test.rs
index 1e2c1c8802..603284ab9c 100644
--- a/crates/notification/src/domain/service/test.rs
+++ b/crates/notification/src/domain/service/test.rs
@@ -10,7 +10,9 @@ use crate::domain::models::queue_message::{
ConnGatewayNotification, EmailContent, EmailCreateBundle, NotificationChannel, QueueMessage,
RawQueueMessage, RealtimeNotif,
};
-use crate::domain::models::request::{NotificationStatus, UpdateNotificationsRequest};
+use crate::domain::models::request::{
+ NotificationEntityRef, NotificationItemType, NotificationStatus, UpdateNotificationsRequest,
+};
use crate::domain::models::{
DeviceEndpoint, Notification, NotificationExtEmail, NotificationExtIos,
NotificationIdAndCollapseKey, RateLimitConfig, RateLimitExceeded, RateLimitKey,
@@ -18,7 +20,7 @@ use crate::domain::models::{
};
use crate::domain::ports::{
EmailSender, NotificationEgress, NotificationQueue, NotificationRepository, NotificationSender,
- SnsEndpointManager, WebSocketSender,
+ RealtimeSender, SnsEndpointManager,
};
use crate::domain::service::{
NotificationEgressService, NotificationIngress, NotificationIngressService, NotificationReader,
@@ -39,11 +41,17 @@ use std::time::Duration;
use uuid::Uuid;
/// A test notification type.
-#[derive(Debug, Clone, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
struct TestNotification {
message: String,
}
+#[derive(Debug, Deserialize, PartialEq)]
+#[serde(tag = "tag", content = "content", rename_all = "snake_case")]
+enum TestNotifEvent {
+ TestNotification(TestNotification),
+}
+
impl Notification for TestNotification {
const TYPE_NAME: &'static str = "test_notification";
}
@@ -103,6 +111,8 @@ struct MockRepository {
stored_collapse_keys: Mutex<Vec<(Uuid, Option<String>)>>,
basic_notifications: Vec<NotificationIdAndCollapseKey>,
digest_eligible_notification_ids: Option<HashSet<Uuid>>,
+ entity_notifications:
+ HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>,
mark_seen_calls: Mutex<Vec<(String, Vec<Uuid>)>>,
mark_done_calls: Mutex<Vec<(String, Vec<Uuid>, bool)>>,
}
@@ -118,6 +128,7 @@ impl MockRepository {
stored_collapse_keys: Mutex::new(Vec::new()),
basic_notifications: Vec::new(),
digest_eligible_notification_ids: None,
+ entity_notifications: HashMap::new(),
mark_seen_calls: Mutex::new(Vec::new()),
mark_done_calls: Mutex::new(Vec::new()),
}
@@ -139,6 +150,15 @@ impl MockRepository {
self
}
+ fn with_entity_notifications(
+ mut self,
+ entity_ref: NotificationEntityRef,
+ notifications: Vec<UserNotificationRow<serde_json::Value>>,
+ ) -> Self {
+ self.entity_notifications.insert(entity_ref, notifications);
+ self
+ }
+
fn with_muted_user(mut self, user_id: MacroUserIdStr<'static>) -> Self {
self.muted_users.insert(user_id);
self
@@ -348,17 +368,19 @@ impl NotificationRepository for MockRepository {
async fn get_entity_notifications_batch(
&self,
_user_id: MacroUserIdStr<'_>,
- entity_refs: Vec<crate::domain::models::request::NotificationEntityRef>,
- ) -> Result<
- std::collections::HashMap<
- crate::domain::models::request::NotificationEntityRef,
- Vec<UserNotificationRow<serde_json::Value>>,
- >,
- Report,
- > {
+ entity_refs: Vec<NotificationEntityRef>,
+ ) -> Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>, Report>
+ {
Ok(entity_refs
.into_iter()
- .map(|entity_ref| (entity_ref, Vec::new()))
+ .map(|entity_ref| {
+ let notifications = self
+ .entity_notifications
+ .get(&entity_ref)
+ .cloned()
+ .unwrap_or_default();
+ (entity_ref, notifications)
+ })
.collect())
}
@@ -579,19 +601,13 @@ impl NotificationRepository for std::sync::Arc<MockRepository> {
async fn get_entity_notifications_batch(
&self,
- _user_id: MacroUserIdStr<'_>,
- entity_refs: Vec<crate::domain::models::request::NotificationEntityRef>,
- ) -> Result<
- std::collections::HashMap<
- crate::domain::models::request::NotificationEntityRef,
- Vec<UserNotificationRow<serde_json::Value>>,
- >,
- Report,
- > {
- Ok(entity_refs
- .into_iter()
- .map(|entity_ref| (entity_ref, Vec::new()))
- .collect())
+ user_id: MacroUserIdStr<'_>,
+ entity_refs: Vec<NotificationEntityRef>,
+ ) -> Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>, Report>
+ {
+ (**self)
+ .get_entity_notifications_batch(user_id, entity_refs)
+ .await
}
async fn get_user_notification_by_id<T: DeserializeOwned + Send>(
@@ -1236,10 +1252,10 @@ async fn test_no_apns_collapse_key_when_apns_not_enabled() {
// Egress Service Tests
// ============================================================================
-/// Mock WebSocket sender that always succeeds.
-struct MockWebSocketSender;
+/// Mock realtime sender that always succeeds.
+struct MockRealtimeSender;
-impl WebSocketSender for MockWebSocketSender {
+impl RealtimeSender for MockRealtimeSender {
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
_recipients: &[MacroUserIdStr<'a>],
@@ -1396,7 +1412,7 @@ fn create_egress_service<R: rate_limit::RateLimitService>(
) -> NotificationEgressService<
MockQueue,
MockRepository,
- MockWebSocketSender,
+ MockRealtimeSender,
MockMobileSender,
MockEmailSender,
R,
@@ -1406,7 +1422,7 @@ fn create_egress_service<R: rate_limit::RateLimitService>(
NotificationEgressService {
queue: MockQueue::new(),
repository: MockRepository::new(),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter,
@@ -1505,6 +1521,89 @@ async fn test_egress_conn_gateway_not_rate_limited() {
assert!(results[0].is_ok());
}
+// ============================================================================
+// Notification Reader Tests
+// ============================================================================
+
+#[tokio::test]
+async fn test_get_entity_notifications_batch_skips_invalid_tagged_metadata() {
+ let user = test_user_id("[email protected]");
+ let entity_ref = NotificationEntityRef {
+ entity_type: NotificationItemType::Document,
+ id: "doc-1".to_string(),
+ };
+ let now = Utc::now();
+ let valid_id = Uuid::now_v7();
+ let invalid_id = Uuid::now_v7();
+ let mut valid = updated_notification(user.clone(), valid_id, false, None, now);
+ valid.notification_metadata = json!({ "message": "hello" });
+ let mut invalid = updated_notification(user.clone(), invalid_id, false, None, now);
+ invalid.notification_metadata = json!({ "unexpected": true });
+
+ let service = NotificationReaderService {
+ repository: Arc::new(
+ MockRepository::new()
+ .with_entity_notifications(entity_ref.clone(), vec![invalid, valid]),
+ ),
+ queue: Arc::new(MockQueue::new()),
+ sns_endpoint: MockSnsEndpoint,
+ platform_config: test_platform_config(),
+ realtime: crate::domain::ports::NoopNotificationRealtimePublisher,
+ };
+
+ let notifications = service
+ .get_entity_notifications_batch::<TestNotifEvent>(user, vec![entity_ref.clone()])
+ .await
+ .expect("invalid metadata does not fail the batch");
+
+ assert_eq!(notifications[&entity_ref].len(), 1);
+ let notification = &notifications[&entity_ref][0];
+ assert_eq!(notification.notification_id, valid_id);
+ assert_eq!(
+ notification.notification_metadata,
+ TestNotifEvent::TestNotification(TestNotification {
+ message: "hello".to_string(),
+ })
+ );
+}
+
+#[tokio::test]
+async fn test_get_entity_notifications_batch_deserializes_tagged_metadata() {
+ let user = test_user_id("[email protected]");
+ let entity_ref = NotificationEntityRef {
+ entity_type: NotificationItemType::Document,
+ id: "doc-1".to_string(),
+ };
+ let notification_id = Uuid::now_v7();
+ let now = Utc::now();
+ let mut notification = updated_notification(user.clone(), notification_id, false, None, now);
+ notification.notification_metadata = json!({ "message": "hello" });
+
+ let service = NotificationReaderService {
+ repository: Arc::new(
+ MockRepository::new().with_entity_notifications(entity_ref.clone(), vec![notification]),
+ ),
+ queue: Arc::new(MockQueue::new()),
+ sns_endpoint: MockSnsEndpoint,
+ platform_config: test_platform_config(),
+ realtime: crate::domain::ports::NoopNotificationRealtimePublisher,
+ };
+
+ let notifications = service
+ .get_entity_notifications_batch::<TestNotifEvent>(user, vec![entity_ref.clone()])
+ .await
+ .expect("tagged notification metadata deserializes");
+
+ let notification = &notifications[&entity_ref][0];
+ assert_eq!(notification.notification_id, notification_id);
+ assert_eq!(
+ notification.notification_metadata,
+ TestNotifEvent::TestNotification(TestNotification {
+ message: "hello".to_string(),
+ })
+ );
+}
+
// ============================================================================
// Mark Notifications Seen Tests
// ============================================================================
@@ -1886,7 +1985,7 @@ async fn test_egress_ios_attempts_all_endpoints_even_if_some_fail() {
let service = NotificationEgressService {
queue: MockQueue::new(),
repository: MockRepository::new(),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: mobile_sender.clone(),
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2022,7 +2121,7 @@ async fn test_poll_email_digests_sends_email_for_ready_batch() {
let service = NotificationEgressService {
queue: queue.clone(),
repository: MockRepository::new(),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2077,7 +2176,7 @@ async fn test_poll_email_digests_skips_when_all_notifications_ineligible() {
let service = NotificationEgressService {
queue: queue.clone(),
repository: MockRepository::new().with_digest_eligible_notification_ids([]),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2145,7 +2244,7 @@ async fn test_poll_email_digests_filters_ineligible_notifications_before_renderi
let service = NotificationEgressService {
queue: queue.clone(),
repository: MockRepository::new().with_digest_eligible_notification_ids([eligible_id]),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2215,10 +2314,10 @@ impl NotificationQueue for EgressTestQueue {
}
}
-/// WebSocket sender that hangs indefinitely (simulates a stuck connection).
-struct HangingWebSocketSender;
+/// Realtime sender that hangs indefinitely (simulates a stuck connection).
+struct HangingRealtimeSender;
-impl WebSocketSender for HangingWebSocketSender {
+impl RealtimeSender for HangingRealtimeSender {
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
_recipients: &[MacroUserIdStr<'a>],
@@ -2272,7 +2371,7 @@ async fn test_poll_and_deliver_deletes_rate_limited_message() {
let service = NotificationEgressService {
queue,
repository: MockRepository::new(),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: exceeding_rate_limiter(),
@@ -2317,7 +2416,7 @@ async fn test_poll_and_deliver_times_out_slow_delivery() {
let service = NotificationEgressService {
queue,
repository: MockRepository::new(),
- websocket: HangingWebSocketSender,
+ realtime: HangingRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2385,7 +2484,7 @@ async fn test_poll_and_deliver_deletes_message_when_all_ios_failures() {
let service = NotificationEgressService {
queue,
repository: MockRepository::new(),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: FailingMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2603,7 +2702,7 @@ async fn test_poll_email_digests_skips_publish_when_user_disabled_type() {
let service = NotificationEgressService {
queue: queue.clone(),
repository: MockRepository::new().with_type_disabled_user(user),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
@@ -2665,7 +2764,7 @@ async fn test_poll_email_digests_publishes_when_user_has_not_disabled_type() {
let service = NotificationEgressService {
queue: queue.clone(),
repository: MockRepository::new().with_type_disabled_user(other_user),
- websocket: MockWebSocketSender,
+ realtime: MockRealtimeSender,
mobile: MockMobileSender,
email: MockEmailSender,
rate_limiter: allowing_rate_limiter(),
diff --git a/crates/notification/src/inbound/http/test.rs b/crates/notification/src/inbound/http/test.rs
index 18c92f77ff..0e03273f87 100644
--- a/crates/notification/src/inbound/http/test.rs
+++ b/crates/notification/src/inbound/http/test.rs
@@ -118,15 +118,12 @@ impl NotificationReader for AuthenticationTestService {
async { unreachable!("should not be called") }
}
- fn get_entity_notifications_batch(
+ fn get_entity_notifications_batch<T: DeserializeOwned + Send>(
&self,
_user_id: MacroUserIdStr<'_>,
_entity_refs: Vec<NotificationEntityRef>,
) -> impl Future<
- Output = Result<
- HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>,
- Report,
- >,
+ Output = Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<T>>>, Report>,
> + Send {
async { unreachable!("should not be called") }
}
@@ -600,15 +597,12 @@ impl NotificationReader for PresignedTestService {
async { unreachable!() }
}
- fn get_entity_notifications_batch(
+ fn get_entity_notifications_batch<T: DeserializeOwned + Send>(
&self,
_user_id: MacroUserIdStr<'_>,
_entity_refs: Vec<NotificationEntityRef>,
) -> impl Future<
- Output = Result<
- HashMap<NotificationEntityRef, Vec<UserNotificationRow<serde_json::Value>>>,
- Report,
- >,
+ Output = Result<HashMap<NotificationEntityRef, Vec<UserNotificationRow<T>>>, Report>,
> + Send {
async { unreachable!() }
}
diff --git a/crates/notification/src/inbound/notification_events_listener.rs b/crates/notification/src/inbound/notification_events_listener.rs
index 2c4c302ff2..d36b60c61b 100644
--- a/crates/notification/src/inbound/notification_events_listener.rs
+++ b/crates/notification/src/inbound/notification_events_listener.rs
@@ -7,7 +7,7 @@ use macro_user_id::user_id::MacroUserIdStr;
use serde::Deserialize;
use uuid::Uuid;
-use crate::domain::models::{NotificationStatusUpdate, PatchDelete, UserNotificationStatusUpdate};
+use crate::domain::models::{NotificationDelete, NotificationStatusPayload};
use crate::domain::ports::{NotificationEventsReceiver, NotificationRealtimePublisher};
/// Worker that listens for notification database events and forwards them to realtime clients.
@@ -68,17 +68,14 @@ where
return;
}
- let updates = user_ids
- .iter()
- .map(|user| UserNotificationStatusUpdate {
- user: user.copied(),
- update: NotificationStatusUpdate::new(vec![PatchDelete::Delete {
- id: notification_id,
- }]),
- })
- .collect::<Vec<_>>();
+ let payload = NotificationStatusPayload::NotificationForUsers {
+ users: user_ids.iter().map(|user| user.copied()).collect(),
+ update: Box::new(NotificationDelete::Delete {
+ id: notification_id,
+ }),
+ };
- if let Err(err) = self.realtime.publish_updates(&updates).await {
+ if let Err(err) = self.realtime.publish_updates(&payload).await {
tracing::warn!(error = ?err, "failed to publish notification delete realtime update");
}
}
diff --git a/crates/notification/src/outbound.rs b/crates/notification/src/outbound.rs
index 7d67caf0a2..8bbec1ce2d 100644
--- a/crates/notification/src/outbound.rs
+++ b/crates/notification/src/outbound.rs
@@ -6,10 +6,14 @@
pub mod device_registration;
pub mod digest_batcher;
pub mod email;
-/// WebSocket notification fanout across multiple delivery adapters.
-pub mod fanout_websocket;
-/// Kafka-backed WebSocket notification delivery.
-pub mod kafka_websocket;
+/// Notification status update fanout across multiple realtime publishers.
+pub mod fanout_notification_realtime;
+/// Realtime notification fanout across multiple delivery adapters.
+pub mod fanout_realtime;
+/// Kafka-backed notification status update publication.
+pub mod kafka_notification_realtime;
+/// Kafka-backed realtime notification delivery.
+pub mod kafka_realtime;
pub mod last_online_checker;
pub mod message_receipt_repository;
pub mod mobile;
diff --git a/crates/notification/src/outbound/fanout_notification_realtime.rs b/crates/notification/src/outbound/fanout_notification_realtime.rs
new file mode 100644
index 0000000000..8045d2828a
--- /dev/null
+++ b/crates/notification/src/outbound/fanout_notification_realtime.rs
@@ -0,0 +1,43 @@
+//! Notification realtime publisher that fans each update out to two adapters.
+
+#[cfg(test)]
+mod test;
+
+use rootcause::Report;
+
+use crate::domain::models::NotificationStatusPayload;
+use crate::domain::ports::NotificationRealtimePublisher;
+
+/// Notification realtime publisher that publishes through two underlying adapters.
+///
+/// Both publishes are awaited concurrently. An error from either publisher fails the combined
+/// publish after both attempts complete.
+pub struct FanoutNotificationRealtimePublisher<A, B> {
+ first: A,
+ second: B,
+}
+
+impl<A, B> FanoutNotificationRealtimePublisher<A, B> {
+ /// Creates a publisher that fans each update out to `first` and `second`.
+ pub fn new(first: A, second: B) -> Self {
+ Self { first, second }
+ }
+}
+
+impl<A, B> NotificationRealtimePublisher for FanoutNotificationRealtimePublisher<A, B>
+where
+ A: NotificationRealtimePublisher,
+ B: NotificationRealtimePublisher,
+{
+ #[tracing::instrument(err, skip_all)]
+ async fn publish_updates(&self, payload: &NotificationStatusPayload<'_>) -> Result<(), Report> {
+ let (first, second) = futures::future::join(
+ self.first.publish_updates(payload),
+ self.second.publish_updates(payload),
+ )
+ .await;
+
+ first?;
+ second
+ }
+}
diff --git a/crates/notification/src/outbound/fanout_notification_realtime/test.rs b/crates/notification/src/outbound/fanout_notification_realtime/test.rs
new file mode 100644
index 0000000000..a6645fafe5
--- /dev/null
+++ b/crates/notification/src/outbound/fanout_notification_realtime/test.rs
@@ -0,0 +1,82 @@
+use std::sync::Arc;
+use std::sync::atomic::{AtomicUsize, Ordering};
+
+use super::*;
+
+struct RecordingPublisher {
+ calls: Arc<AtomicUsize>,
+ fail: bool,
+}
+
+impl NotificationRealtimePublisher for RecordingPublisher {
+ async fn publish_updates(
+ &self,
+ _payload: &NotificationStatusPayload<'_>,
+ ) -> Result<(), Report> {
+ self.calls.fetch_add(1, Ordering::SeqCst);
+
+ if self.fail {
+ rootcause::bail!("publish failed");
+ }
+
+ Ok(())
+ }
+}
+
+fn payload() -> NotificationStatusPayload<'static> {
+ NotificationStatusPayload::UserNotifications {
+ user: macro_user_id::user_id::MacroUserIdStr::try_from(
+ "macro|[email protected]".to_string(),
+ )
+ .expect("valid user ID"),
+ updates: Vec::new(),
+ }
+}
+
+#[tokio::test]
+async fn publishes_through_both_adapters() {
+ let first_calls = Arc::new(AtomicUsize::new(0));
+ let second_calls = Arc::new(AtomicUsize::new(0));
+ let publisher = FanoutNotificationRealtimePublisher::new(
+ RecordingPublisher {
+ calls: Arc::clone(&first_calls),
+ fail: false,
+ },
+ RecordingPublisher {
+ calls: Arc::clone(&second_calls),
+ fail: false,
+ },
+ );
+
+ publisher
+ .publish_updates(&payload())
+ .await
+ .expect("both publishes succeed");
+
+ assert_eq!(first_calls.load(Ordering::SeqCst), 1);
+ assert_eq!(second_calls.load(Ordering::SeqCst), 1);
+}
+
+#[tokio::test]
+async fn attempts_both_adapters_when_one_fails() {
+ let first_calls = Arc::new(AtomicUsize::new(0));
+ let second_calls = Arc::new(AtomicUsize::new(0));
+ let publisher = FanoutNotificationRealtimePublisher::new(
+ RecordingPublisher {
+ calls: Arc::clone(&first_calls),
+ fail: true,
+ },
+ RecordingPublisher {
+ calls: Arc::clone(&second_calls),
+ fail: false,
+ },
+ );
+
+ publisher
+ .publish_updates(&payload())
+ .await
+ .expect_err("one failed publish fails the fanout");
+
+ assert_eq!(first_calls.load(Ordering::SeqCst), 1);
+ assert_eq!(second_calls.load(Ordering::SeqCst), 1);
+}
diff --git a/crates/notification/src/outbound/fanout_websocket.rs b/crates/notification/src/outbound/fanout_realtime.rs
similarity index 76%
rename from crates/notification/src/outbound/fanout_websocket.rs
rename to crates/notification/src/outbound/fanout_realtime.rs
index 86042c1643..22eb217b22 100644
--- a/crates/notification/src/outbound/fanout_websocket.rs
+++ b/crates/notification/src/outbound/fanout_realtime.rs
@@ -1,4 +1,4 @@
-//! WebSocket sender that fans each delivery out to two adapters.
+//! Realtime sender that fans each delivery out to two adapters.
#[cfg(test)]
mod test;
@@ -9,25 +9,25 @@ use macro_user_id::user_id::MacroUserIdStr;
use rootcause::Report;
use serde::Serialize;
-use crate::domain::ports::WebSocketSender;
+use crate::domain::ports::RealtimeSender;
-/// WebSocket sender that delivers through two underlying senders.
+/// Realtime sender that delivers through two underlying senders.
///
/// Both sends are awaited concurrently. The delivery receipts are combined when both sends
/// succeed; an error from either sender fails the combined send after both attempts complete.
-pub struct FanoutWebSocketSender<A, B> {
+pub struct FanoutRealtimeSender<A, B> {
first: A,
second: B,
}
-impl<A, B> FanoutWebSocketSender<A, B> {
+impl<A, B> FanoutRealtimeSender<A, B> {
/// Creates a sender that fans each delivery out to `first` and `second`.
pub fn new(first: A, second: B) -> Self {
Self { first, second }
}
}
-impl<A: WebSocketSender, B: WebSocketSender> WebSocketSender for FanoutWebSocketSender<A, B> {
+impl<A: RealtimeSender, B: RealtimeSender> RealtimeSender for FanoutRealtimeSender<A, B> {
#[tracing::instrument(err, skip_all, fields(recipient_count = recipients.len()))]
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
diff --git a/crates/notification/src/outbound/fanout_websocket/test.rs b/crates/notification/src/outbound/fanout_realtime/test.rs
similarity index 95%
rename from crates/notification/src/outbound/fanout_websocket/test.rs
rename to crates/notification/src/outbound/fanout_realtime/test.rs
index cd57de564b..c27e3ce330 100644
--- a/crates/notification/src/outbound/fanout_websocket/test.rs
+++ b/crates/notification/src/outbound/fanout_realtime/test.rs
@@ -10,7 +10,7 @@ struct RecordingSender {
fail: bool,
}
-impl WebSocketSender for RecordingSender {
+impl RealtimeSender for RecordingSender {
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
_recipients: &[MacroUserIdStr<'a>],
@@ -39,7 +39,7 @@ async fn sends_through_both_adapters_and_combines_receipts() {
let second_calls = Arc::new(Mutex::new(Vec::new()));
let first_user = user("macro|[email protected]");
let second_user = user("macro|[email protected]");
- let sender = FanoutWebSocketSender::new(
+ let sender = FanoutRealtimeSender::new(
RecordingSender {
calls: first_calls.clone(),
delivered: vec![first_user.clone()],
@@ -75,7 +75,7 @@ async fn sends_through_both_adapters_and_combines_receipts() {
async fn attempts_both_adapters_when_one_fails() {
let first_calls = Arc::new(Mutex::new(Vec::new()));
let second_calls = Arc::new(Mutex::new(Vec::new()));
- let sender = FanoutWebSocketSender::new(
+ let sender = FanoutRealtimeSender::new(
RecordingSender {
calls: first_calls.clone(),
delivered: Vec::new(),
diff --git a/crates/notification/src/outbound/kafka_notification_realtime.rs b/crates/notification/src/outbound/kafka_notification_realtime.rs
new file mode 100644
index 0000000000..5e4219ab0d
--- /dev/null
+++ b/crates/notification/src/outbound/kafka_notification_realtime.rs
@@ -0,0 +1,75 @@
+//! Kafka adapter for notification status update publication.
+
+#[cfg(test)]
+mod test;
+
+use std::borrow::Cow;
+
+use macro_event_broker::MacroEventBroker;
+use macro_user_id::cowlike::CowLike as _;
+use rootcause::Report;
+use rootcause::prelude::ResultExt as _;
+
+use crate::domain::models::websocket_notification_event::NotificationMacroEvent;
+use crate::domain::models::{NotificationStatusPayload, PatchDelete};
+use crate::domain::ports::NotificationRealtimePublisher;
+
+/// Kafka-backed notification realtime publisher.
+///
+/// Each call publishes one typed status update event on the `macro.notifications` topic.
+pub struct KafkaNotificationRealtimePublisher<B> {
+ broker: B,
+}
+
+impl<B> KafkaNotificationRealtimePublisher<B> {
+ /// Creates a notification realtime publisher backed by `broker`.
+ pub fn new(broker: B) -> Self {
+ Self { broker }
+ }
+}
+
+impl<B: MacroEventBroker> NotificationRealtimePublisher for KafkaNotificationRealtimePublisher<B> {
+ #[tracing::instrument(err, skip_all, fields(topic = "macro.notifications"))]
+ async fn publish_updates(&self, payload: &NotificationStatusPayload<'_>) -> Result<(), Report> {
+ let event = match payload {
+ NotificationStatusPayload::NotificationForUsers { users, update } => {
+ NotificationMacroEvent::status_updated_for_users(
+ users.iter().map(|user| user.copied()).collect(),
+ update.clone(),
+ )
+ }
+ NotificationStatusPayload::UserNotifications { user, updates } => {
+ NotificationMacroEvent::statuses_updated_for_user(
+ user.copied(),
+ updates.iter().map(borrow_update).collect(),
+ )
+ }
+ };
+
+ let publish = self
+ .broker
+ .send_event(&event)
+ .context("failed to dispatch notification status update Kafka event")?;
+ publish
+ .await
+ .context("notification status update Kafka publish task failed")?
+ .context("failed to publish notification status update to Kafka")?;
+
+ Ok(())
+ }
+}
+
+fn borrow_update<'a>(
+ update: &'a PatchDelete<
+ uuid::Uuid,
+ Cow<'_, crate::domain::models::UserNotificationRow<serde_json::Value>>,
+ >,
+) -> PatchDelete<uuid::Uuid, Cow<'a, crate::domain::models::UserNotificationRow<serde_json::Value>>>
+{
+ match update {
+ PatchDelete::Patch { diff } => PatchDelete::Patch {
+ diff: Cow::Borrowed(diff.as_ref()),
+ },
+ PatchDelete::Delete { id } => PatchDelete::Delete { id: *id },
+ }
+}
diff --git a/crates/notification/src/outbound/kafka_notification_realtime/test.rs b/crates/notification/src/outbound/kafka_notification_realtime/test.rs
new file mode 100644
index 0000000000..cccf40d00f
--- /dev/null
+++ b/crates/notification/src/outbound/kafka_notification_realtime/test.rs
@@ -0,0 +1,219 @@
+use std::borrow::Cow;
+use std::sync::{Arc, Mutex};
+
+use chrono::Utc;
+use macro_event_broker::{
+ EventBrokerError, EventPublisher, MacroEvent, MacroEventBrokerService, Spawner,
+};
+use macro_event_topics::Topic;
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::EntityType;
+
+use super::*;
+use crate::domain::models::websocket_notification_event::NotificationTopicEvent;
+use crate::domain::models::{NotificationDelete, UserNotificationRow};
+
+#[derive(Debug)]
+struct PublishedRecord {
+ topic: String,
+ key: String,
+ payload: Vec<u8>,
+}
+
+struct RecordingPublisher {
+ records: Arc<Mutex<Vec<PublishedRecord>>>,
+ fail: bool,
+}
+
+impl EventPublisher for RecordingPublisher {
+ async fn publish<T: Topic>(&self, key: &str, payload: &[u8]) -> Result<(), EventBrokerError> {
+ self.records
+ .lock()
+ .expect("records lock")
+ .push(PublishedRecord {
+ topic: T::TOPIC_STR.to_string(),
+ key: key.to_string(),
+ payload: payload.to_vec(),
+ });
+
+ if self.fail {
+ Err(EventBrokerError::Publish("broker unavailable".to_string()))
+ } else {
+ Ok(())
+ }
+ }
+}
+
+#[derive(Clone, Copy)]
+struct TokioSpawner;
+
+impl Spawner for TokioSpawner {
+ fn spawn<F>(&self, future: F) -> tokio::task::JoinHandle<F::Output>
+ where
+ F: Future + Send + 'static,
+ F::Output: Send + 'static,
+ {
+ tokio::spawn(future)
+ }
+}
+
+fn user(id: &str) -> MacroUserIdStr<'static> {
+ MacroUserIdStr::try_from(id.to_string()).expect("valid user ID")
+}
+
+fn row(
+ owner_id: MacroUserIdStr<'static>,
+ notification_id: uuid::Uuid,
+) -> UserNotificationRow<serde_json::Value> {
+ UserNotificationRow {
+ owner_id,
+ notification_id,
+ notification_event_type: "test".to_string(),
+ entity: EntityType::Document.with_entity_string("document-id".to_string()),
+ sent: true,
+ done: false,
+ created_at: Utc::now(),
+ viewed_at: None,
+ updated_at: Utc::now(),
+ deleted_at: None,
+ notification_metadata: serde_json::json!({ "kind": "test" }),
+ sender_id: None,
+ }
+}
+
+fn publisher(
+ records: Arc<Mutex<Vec<PublishedRecord>>>,
+ fail: bool,
+) -> KafkaNotificationRealtimePublisher<MacroEventBrokerService<RecordingPublisher, TokioSpawner>> {
+ KafkaNotificationRealtimePublisher::new(MacroEventBrokerService::new(
+ RecordingPublisher { records, fail },
+ TokioSpawner,
+ ))
+}
+
+fn assert_envelope(record: &PublishedRecord, event_type: &str) -> serde_json::Value {
+ assert_eq!(record.topic, "macro.notifications");
+ let payload: serde_json::Value =
+ serde_json::from_slice(&record.payload).expect("payload is valid JSON");
+ assert_eq!(
+ record.key,
+ payload["event_id"].as_str().expect("event ID is a string")
+ );
+ assert_eq!(payload["schema_version"], 1);
+ assert_eq!(payload["event_type"], event_type);
+ payload
+}
+
+#[tokio::test]
+async fn publishes_one_notification_for_many_users_event() {
+ let records = Arc::new(Mutex::new(Vec::new()));
+ let publisher = publisher(Arc::clone(&records), false);
+ let first_user = user("macro|[email protected]");
+ let second_user = user("macro|[email protected]");
+ let notification_id = uuid::Uuid::parse_str("0193b1ea-c742-7589-893b-2b4a509c1e77")
+ .expect("valid notification ID");
+ let payload = NotificationStatusPayload::NotificationForUsers {
+ users: vec![first_user.clone(), second_user.clone()],
+ update: Box::new(NotificationDelete::Delete {
+ id: notification_id,
+ }),
+ };
+
+ publisher
+ .publish_updates(&payload)
+ .await
+ .expect("publish succeeds");
+
+ let records = records.lock().expect("records lock");
+ assert_eq!(records.len(), 1);
+ let record = &records[0];
+ let payload = assert_envelope(record, "notification.status_updated_for_users");
+ assert_eq!(
+ payload["metadata"]["users"],
+ serde_json::json!([first_user.as_ref(), second_user.as_ref()])
+ );
+
+ let decoded =
+ NotificationMacroEvent::<serde_json::Value>::decode(record.key.clone(), &record.payload)
+ .expect("event round-trips");
+ let NotificationTopicEvent::NotificationStatusUpdatedForUsers { users, update } =
+ decoded.into_topic_event()
+ else {
+ panic!("expected notification status update for users event");
+ };
+ assert_eq!(users, vec![first_user, second_user]);
+ assert_eq!(
+ *update,
+ NotificationDelete::Delete {
+ id: notification_id,
+ }
+ );
+}
+
+#[tokio::test]
+async fn publishes_many_notifications_for_one_user_event() {
+ let records = Arc::new(Mutex::new(Vec::new()));
+ let publisher = publisher(Arc::clone(&records), false);
+ let recipient = user("macro|[email protected]");
+ let first_id = uuid::Uuid::parse_str("0193b1ea-c742-7589-893b-2b4a509c1e77")
+ .expect("valid notification ID");
+ let second_id = uuid::Uuid::parse_str("0193b1ea-c742-7589-893b-2b4a509c1e78")
+ .expect("valid notification ID");
+ let first_row = row(recipient.clone(), first_id);
+ let payload = NotificationStatusPayload::UserNotifications {
+ user: recipient.clone(),
+ updates: vec![
+ PatchDelete::Patch {
+ diff: Cow::Borrowed(&first_row),
+ },
+ PatchDelete::Delete { id: second_id },
+ ],
+ };
+
+ publisher
+ .publish_updates(&payload)
+ .await
+ .expect("publish succeeds");
+
+ let records = records.lock().expect("records lock");
+ assert_eq!(records.len(), 1);
+ let record = &records[0];
+ let payload = assert_envelope(record, "notification.statuses_updated_for_user");
+ assert_eq!(payload["metadata"]["user"], recipient.as_ref());
+ assert_eq!(payload["metadata"]["updates"].as_array().unwrap().len(), 2);
+
+ let decoded =
+ NotificationMacroEvent::<serde_json::Value>::decode(record.key.clone(), &record.payload)
+ .expect("event round-trips");
+ let NotificationTopicEvent::NotificationStatusesUpdatedForUser { user, updates } =
+ decoded.into_topic_event()
+ else {
+ panic!("expected notification statuses update for user event");
+ };
+ assert_eq!(user, recipient);
+ assert_eq!(
+ updates,
+ vec![
+ PatchDelete::Patch {
+ diff: Cow::Owned(first_row),
+ },
+ PatchDelete::Delete { id: second_id },
+ ]
+ );
+}
+
+#[tokio::test]
+async fn propagates_publish_failures() {
+ let publisher = publisher(Arc::new(Mutex::new(Vec::new())), true);
+ let payload = NotificationStatusPayload::UserNotifications {
+ user: user("macro|[email protected]"),
+ updates: vec![PatchDelete::Delete {
+ id: uuid::Uuid::nil(),
+ }],
+ };
+
+ publisher
+ .publish_updates(&payload)
+ .await
+ .expect_err("publish failure propagates");
+}
diff --git a/crates/notification/src/outbound/kafka_realtime.rs b/crates/notification/src/outbound/kafka_realtime.rs
new file mode 100644
index 0000000000..89129b0078
--- /dev/null
+++ b/crates/notification/src/outbound/kafka_realtime.rs
@@ -0,0 +1,95 @@
+//! Kafka adapter for asynchronous realtime notification delivery.
+
+#[cfg(test)]
+mod test;
+
+use std::collections::HashSet;
+
+use macro_event_broker::MacroEventBroker;
+use macro_user_id::cowlike::CowLike as _;
+use macro_user_id::user_id::MacroUserIdStr;
+use rootcause::Report;
+use rootcause::prelude::ResultExt as _;
+use serde::Serialize;
+
+use crate::domain::models::UserNotificationRow;
+use crate::domain::models::queue_message::RealtimeNotif;
+use crate::domain::models::websocket_notification_event::NotificationMacroEvent;
+use crate::domain::ports::RealtimeSender;
+
+/// Kafka-backed implementation of the realtime sender port.
+///
+/// Each call publishes one message containing a user-scoped notification row per recipient.
+pub struct KafkaRealtimeSender<B> {
+ broker: B,
+}
+
+impl<B> KafkaRealtimeSender<B> {
+ /// Creates a realtime sender backed by `broker`.
+ pub fn new(broker: B) -> Self {
+ Self { broker }
+ }
+}
+
+impl<B: MacroEventBroker> RealtimeSender for KafkaRealtimeSender<B> {
+ #[tracing::instrument(
+ err,
+ skip_all,
+ fields(recipient_count = recipients.len(), topic = "macro.notifications")
+ )]
+ async fn send_notifications<'a, T: Serialize + Send + Sync>(
+ &self,
+ recipients: &[MacroUserIdStr<'a>],
+ notification: &T,
+ ) -> Result<HashSet<MacroUserIdStr<'static>>, Report> {
+ let notifications = if recipients.is_empty() {
+ Vec::new()
+ } else {
+ let notification: RealtimeNotif<serde_json::Value> = serde_json::from_value(
+ serde_json::to_value(notification)
+ .context("failed to serialize realtime notification for Kafka")?,
+ )
+ .context("failed to decode realtime notification for Kafka")?;
+
+ recipients
+ .iter()
+ .map(|recipient| {
+ user_notification_row(recipient.clone().into_owned(), &notification)
+ })
+ .collect()
+ };
+ let event = NotificationMacroEvent::new(notifications);
+
+ let publish = self
+ .broker
+ .send_event(&event)
+ .context("failed to dispatch realtime notification Kafka event")?;
+ publish
+ .await
+ .context("realtime notification Kafka publish task failed")?
+ .context("failed to publish realtime notification to Kafka")?;
+
+ // Kafka acknowledges durable publication, not delivery to an active WebSocket connection.
+ Ok(HashSet::new())
+ }
+}
+
+fn user_notification_row(
+ owner_id: MacroUserIdStr<'static>,
+ notification: &RealtimeNotif<serde_json::Value>,
+) -> UserNotificationRow<serde_json::Value> {
+ UserNotificationRow {
+ owner_id,
+ notification_id: notification.notification_id,
+ notification_event_type: notification.notification_event_type.clone(),
+ entity: notification.entity.clone(),
+ sent: notification.sent,
+ done: notification.done,
+ created_at: notification.created_at,
+ viewed_at: notification.viewed_at,
+ updated_at: notification.updated_at,
+ deleted_at: notification.deleted_at,
+ notification_metadata: notification.notification_metadata.clone(),
+ sender_id: notification.sender_id.clone(),
+ }
+}
diff --git a/crates/notification/src/outbound/kafka_websocket/test.rs b/crates/notification/src/outbound/kafka_realtime/test.rs
similarity index 68%
rename from crates/notification/src/outbound/kafka_websocket/test.rs
rename to crates/notification/src/outbound/kafka_realtime/test.rs
index c0394b98e1..b1105bfff9 100644
--- a/crates/notification/src/outbound/kafka_websocket/test.rs
+++ b/crates/notification/src/outbound/kafka_realtime/test.rs
@@ -1,10 +1,13 @@
use std::sync::{Arc, Mutex};
+use chrono::Utc;
use macro_event_broker::{
EventBrokerError, EventPublisher, MacroEvent, MacroEventBrokerService, Spawner,
};
use macro_event_topics::Topic;
+use model_entity::EntityType;
use serde::ser::Error as _;
+use uuid::Uuid;
use super::*;
use crate::domain::models::websocket_notification_event::{
@@ -59,10 +62,30 @@ fn user(id: &str) -> MacroUserIdStr<'static> {
MacroUserIdStr::try_from(id.to_string()).expect("valid user id")
}
+fn notification() -> RealtimeNotif<serde_json::Value> {
+ RealtimeNotif {
+ notification_id: Uuid::parse_str("01952f4d-6890-7df2-8598-89d4e18c07db")
+ .expect("valid notification ID"),
+ notification_event_type: "channel_mention".to_string(),
+ entity: EntityType::Channel.with_entity_string("channel-id".to_string()),
+ sent: true,
+ done: false,
+ created_at: Utc::now(),
+ viewed_at: None,
+ updated_at: Utc::now(),
+ deleted_at: None,
+ notification_metadata: serde_json::json!({
+ "tag": "channel_mention",
+ "content": { "message": "test" }
+ }),
+ sender_id: None,
+ }
+}
+
#[tokio::test]
async fn publishes_one_event_per_call_with_all_recipients() {
let records = Arc::new(Mutex::new(Vec::new()));
- let sender = KafkaWebSocketSender::new(MacroEventBrokerService::new(
+ let sender = KafkaRealtimeSender::new(MacroEventBrokerService::new(
RecordingPublisher {
records: records.clone(),
fail: false,
@@ -73,10 +96,7 @@ async fn publishes_one_event_per_call_with_all_recipients() {
user("macro|[email protected]"),
user("macro|[email protected]"),
];
- let notification = serde_json::json!({
- "notification_id": "01952f4d-6890-7df2-8598-89d4e18c07db",
- "notification_event_type": "channel_mention",
- });
+ let notification = notification();
let delivered = sender
.send_notifications(&recipients, &notification)
@@ -90,8 +110,11 @@ async fn publishes_one_event_per_call_with_all_recipients() {
let record = &records[0];
assert_eq!(record.topic, "macro.notifications");
let expected_metadata = WebSocketNotificationMetadata {
- recipients: recipients.to_vec(),
- notification: notification.clone(),
+ notifications: recipients
+ .iter()
+ .cloned()
+ .map(|recipient| user_notification_row(recipient, &notification))
+ .collect(),
};
let payload: serde_json::Value =
@@ -106,23 +129,35 @@ async fn publishes_one_event_per_call_with_all_recipients() {
"notification.websocket_delivery_requested"
);
assert_eq!(
- payload["metadata"]["recipients"],
- serde_json::json!(["macro|[email protected]", "macro|[email protected]"])
+ payload["metadata"]["notifications"]
+ .as_array()
+ .unwrap()
+ .len(),
+ 2
+ );
+ assert_eq!(
+ payload["metadata"]["notifications"][0]["owner_id"],
+ );
+ assert_eq!(
+ payload["metadata"]["notifications"][1]["owner_id"],
);
- assert_eq!(payload["metadata"]["notification"], notification);
let decoded = NotificationMacroEvent::decode(record.key.clone(), &record.payload)
.expect("event round-trips");
- assert_eq!(
- decoded.event().event,
- NotificationTopicEvent::WebSocketDeliveryRequested(expected_metadata)
- );
+ let NotificationTopicEvent::WebSocketDeliveryRequested(actual_metadata) =
+ decoded.into_topic_event()
+ else {
+ panic!("expected WebSocket delivery event");
+ };
+ assert_eq!(actual_metadata, expected_metadata);
}
#[tokio::test]
async fn empty_recipients_still_publishes_one_event() {
let records = Arc::new(Mutex::new(Vec::new()));
- let sender = KafkaWebSocketSender::new(MacroEventBrokerService::new(
+ let sender = KafkaRealtimeSender::new(MacroEventBrokerService::new(
RecordingPublisher {
records: records.clone(),
fail: false,
@@ -131,7 +166,7 @@ async fn empty_recipients_still_publishes_one_event() {
));
sender
- .send_notifications(&[], &serde_json::json!({ "kind": "test" }))
+ .send_notifications(&[], &notification())
.await
.expect("publish succeeds");
@@ -139,12 +174,12 @@ async fn empty_recipients_still_publishes_one_event() {
assert_eq!(records.len(), 1);
let payload: serde_json::Value =
serde_json::from_slice(&records[0].payload).expect("payload is valid JSON");
- assert_eq!(payload["metadata"]["recipients"], serde_json::json!([]));
+ assert_eq!(payload["metadata"]["notifications"], serde_json::json!([]));
}
#[tokio::test]
async fn propagates_publish_failures() {
- let sender = KafkaWebSocketSender::new(MacroEventBrokerService::new(
+ let sender = KafkaRealtimeSender::new(MacroEventBrokerService::new(
RecordingPublisher {
records: Arc::new(Mutex::new(Vec::new())),
fail: true,
@@ -153,10 +188,7 @@ async fn propagates_publish_failures() {
));
sender
- .send_notifications(
- &[user("macro|[email protected]")],
- &serde_json::json!({ "kind": "test" }),
- )
+ .send_notifications(&[user("macro|[email protected]")], &notification())
.await
.expect_err("publish failure propagates");
}
@@ -175,7 +207,7 @@ impl Serialize for SerializationFailure {
#[tokio::test]
async fn propagates_serialization_failures_without_publishing() {
let records = Arc::new(Mutex::new(Vec::new()));
- let sender = KafkaWebSocketSender::new(MacroEventBrokerService::new(
+ let sender = KafkaRealtimeSender::new(MacroEventBrokerService::new(
RecordingPublisher {
records: records.clone(),
fail: false,
diff --git a/crates/notification/src/outbound/kafka_websocket.rs b/crates/notification/src/outbound/kafka_websocket.rs
deleted file mode 100644
index 6006fb8975..0000000000
--- a/crates/notification/src/outbound/kafka_websocket.rs
+++ /dev/null
@@ -1,65 +0,0 @@
-//! Kafka adapter for asynchronous WebSocket notification delivery.
-
-#[cfg(test)]
-mod test;
-
-use std::collections::HashSet;
-
-use macro_event_broker::MacroEventBroker;
-use macro_user_id::cowlike::CowLike as _;
-use macro_user_id::user_id::MacroUserIdStr;
-use rootcause::Report;
-use rootcause::prelude::ResultExt as _;
-use serde::Serialize;
-
-use crate::domain::models::websocket_notification_event::NotificationMacroEvent;
-use crate::domain::ports::WebSocketSender;
-
-/// Kafka-backed implementation of the WebSocket sender port.
-///
-/// Each call publishes one message containing the full recipient list and notification payload.
-pub struct KafkaWebSocketSender<B> {
- broker: B,
-}
-
-impl<B> KafkaWebSocketSender<B> {
- /// Creates a WebSocket sender backed by `broker`.
- pub fn new(broker: B) -> Self {
- Self { broker }
- }
-}
-
-impl<B: MacroEventBroker> WebSocketSender for KafkaWebSocketSender<B> {
- #[tracing::instrument(
- err,
- skip_all,
- fields(recipient_count = recipients.len(), topic = "macro.notifications")
- )]
- async fn send_notifications<'a, T: Serialize + Send + Sync>(
- &self,
- recipients: &[MacroUserIdStr<'a>],
- notification: &T,
- ) -> Result<HashSet<MacroUserIdStr<'static>>, Report> {
- let notification = serde_json::to_value(notification)
- .context("failed to serialize websocket notification for Kafka")?;
- let event = NotificationMacroEvent::new(
- recipients
- .iter()
- .map(|recipient| recipient.clone().into_owned())
- .collect(),
- notification,
- );
-
- let publish = self
- .broker
- .send_event(&event)
- .context("failed to dispatch websocket notification Kafka event")?;
- publish
- .await
- .context("websocket notification Kafka publish task failed")?
- .context("failed to publish websocket notification to Kafka")?;
-
- // Kafka acknowledges durable publication, not delivery to an active WebSocket connection.
- Ok(HashSet::new())
- }
-}
diff --git a/crates/notification/src/outbound/notification_consumer.rs b/crates/notification/src/outbound/notification_consumer.rs
index 3870454f87..01e3bba9b0 100644
--- a/crates/notification/src/outbound/notification_consumer.rs
+++ b/crates/notification/src/outbound/notification_consumer.rs
@@ -1,4 +1,4 @@
-//! Independent Kafka consumer for WebSocket notification delivery requests.
+//! Independent Kafka consumer for notification topic events.
//!
//! Every process receives every message published after it starts because this adapter manually
//! assigns all `macro.notifications` partitions without joining a durable consumer group. It does
@@ -7,7 +7,7 @@
#[cfg(test)]
mod test;
-use std::{marker::PhantomData, time::Duration};
+use std::{borrow::Cow, marker::PhantomData, time::Duration};
use kafka_util::{InitialOffset, KafkaEventConsumer, Ungrouped};
use macro_event_broker::{
@@ -18,10 +18,13 @@ use rootcause::prelude::{Report, ResultExt as _};
use serde::{Serialize, de::DeserializeOwned};
use crate::domain::{
- models::websocket_notification_event::{
- JsonNotificationMacroEvent, WebSocketNotificationMetadata,
+ models::{
+ PatchDelete, UserNotificationRow,
+ websocket_notification_event::{
+ JsonNotificationMacroEvent, NotificationTopicEvent, WebSocketNotificationMetadata,
+ },
},
- ports::WebSocketNotificationConsumer,
+ ports::NotificationTopicEventConsumer,
};
/// Maximum time to wait for notification topic metadata during partition assignment.
@@ -33,14 +36,17 @@ type NotificationEventConsumer =
macro_event_broker::declare_topics!(DeclaredMacroEvent: JsonNotificationMacroEvent);
-/// Independent consumer of WebSocket notification delivery requests decoded as `T`.
+/// Independent consumer of all notification topic event variants decoded as `T`.
+///
+/// `T` is the notification metadata type carried by every notification row, typically
+/// `NotifEvent` in application code.
///
/// This consumer starts at the end of every current `macro.notifications` partition, so it receives
/// only messages published after construction. It does not join a durable consumer group or persist
/// offsets. Partitions added after construction require a new consumer so they can be assigned.
pub struct NotificationTopicConsumer<T>
where
- T: Serialize + DeserializeOwned + Send + Sync + 'static,
+ T: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
{
consumer: NotificationEventConsumer,
payload: PhantomData<fn() -> T>,
@@ -48,20 +54,20 @@ where
impl<T> NotificationTopicConsumer<T>
where
- T: Serialize + DeserializeOwned + Send + Sync + 'static,
+ T: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
{
/// Creates a consumer and assigns every current notification topic partition.
#[tracing::instrument(fields(brokers), err)]
pub fn from_env(brokers: &str) -> Result<Self, Report> {
let consumer = KafkaEventConsumer::<Ungrouped>::from_env(brokers)
- .context("failed to create independent WebSocket notification consumer")?;
+ .context("failed to create independent notification topic consumer")?;
let consumer =
IndependentKafkaConsumer::new(consumer, InitialOffset::Latest, TOPIC_METADATA_TIMEOUT)
- .context("failed to assign WebSocket notification topic partitions")?;
+ .context("failed to assign notification topic partitions")?;
tracing::info!(
topics = ?DeclaredMacroEvent::topics(),
- "independent WebSocket notification consumer listening"
+ "independent notification topic consumer listening"
);
Ok(Self {
@@ -70,17 +76,17 @@ where
})
}
- /// Receives and decodes the next typed WebSocket notification event.
+ /// Receives and decodes the next notification topic event as `T`.
///
/// This operation is cancel-safe. Unsupported schema versions are poison records and are
- /// skipped. Other missing or malformed payload data is returned as an error.
- pub async fn recv(&self) -> Result<WebSocketNotificationMetadata<T>, Report> {
+ /// skipped. Other missing, malformed, or incompatible payload data is returned as an error.
+ pub async fn recv(&self) -> Result<NotificationTopicEvent<'static, T>, Report> {
loop {
let message = self
.consumer
.recv()
.await
- .context("failed to receive WebSocket notification event")?;
+ .context("failed to receive notification topic event")?;
let event = match message.decode_payload() {
Ok(event) => event,
Err(EventBrokerError::UnsupportedSchemaVersion {
@@ -95,41 +101,101 @@ where
actual,
partition = kafka_message.partition(),
offset = kafka_message.offset(),
- "dropping WebSocket notification event with unsupported schema version"
+ "dropping notification topic event with unsupported schema version"
);
continue;
}
Err(error) => {
return Err(Report::new(error)
- .context("failed to decode WebSocket notification event")
+ .context("failed to decode notification topic event")
.into_dynamic());
}
};
return match event {
DeclaredMacroEvent::JsonNotificationMacroEvent(event) => {
- let WebSocketNotificationMetadata {
- recipients,
- notification,
- } = event.into_message();
- let notification = serde_json::from_value(notification)
- .context("failed to decode WebSocket notification payload")?;
- Ok(WebSocketNotificationMetadata {
- recipients,
- notification,
- })
+ decode_typed_event(event.into_topic_event())
}
};
}
}
}
-impl<T> WebSocketNotificationConsumer<T> for NotificationTopicConsumer<T>
+fn decode_typed_event<T>(
+ event: NotificationTopicEvent<'static, serde_json::Value>,
+) -> Result<NotificationTopicEvent<'static, T>, Report>
+where
+ T: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
+{
+ match event {
+ NotificationTopicEvent::WebSocketDeliveryRequested(WebSocketNotificationMetadata {
+ notifications,
+ }) => Ok(NotificationTopicEvent::WebSocketDeliveryRequested(
+ WebSocketNotificationMetadata {
+ notifications: notifications
+ .into_iter()
+ .map(decode_notification_row)
+ .collect::<Result<Vec<_>, _>>()?,
+ },
+ )),
+ NotificationTopicEvent::NotificationStatusUpdatedForUsers { users, update } => {
+ Ok(NotificationTopicEvent::NotificationStatusUpdatedForUsers { users, update })
+ }
+ NotificationTopicEvent::NotificationStatusesUpdatedForUser { user, updates } => {
+ Ok(NotificationTopicEvent::NotificationStatusesUpdatedForUser {
+ user,
+ updates: updates
+ .into_iter()
+ .map(decode_update)
+ .collect::<Result<Vec<_>, _>>()?,
+ })
+ }
+ }
+}
+
+fn decode_notification_row<T>(
+ row: UserNotificationRow<serde_json::Value>,
+) -> Result<UserNotificationRow<T>, Report>
+where
+ T: DeserializeOwned,
+{
+ Ok(row.try_map(|metadata| {
+ serde_json::from_value(metadata).context("failed to decode notification metadata")
+ })?)
+}
+
+fn decode_status_notification_row<T>(
+ row: UserNotificationRow<serde_json::Value>,
+) -> Result<UserNotificationRow<T>, Report>
+where
+ T: DeserializeOwned,
+{
+ Ok(row
+ .into_tagged()
+ .deserialize_metadata::<T>()
+ .context("failed to decode tagged notification status metadata")?)
+}
+
+fn decode_update<T>(
+ update: PatchDelete<uuid::Uuid, Cow<'static, UserNotificationRow<serde_json::Value>>>,
+) -> Result<PatchDelete<uuid::Uuid, Cow<'static, UserNotificationRow<T>>>, Report>
+where
+ T: Clone + DeserializeOwned + 'static,
+{
+ match update {
+ PatchDelete::Patch { diff } => Ok(PatchDelete::Patch {
+ diff: Cow::Owned(decode_status_notification_row(diff.into_owned())?),
+ }),
+ PatchDelete::Delete { id } => Ok(PatchDelete::Delete { id }),
+ }
+}
+
+impl<T> NotificationTopicEventConsumer<T> for NotificationTopicConsumer<T>
where
- T: Serialize + DeserializeOwned + Send + Sync + 'static,
+ T: Clone + Serialize + DeserializeOwned + Send + Sync + 'static,
{
#[tracing::instrument(err, skip(self))]
- async fn recv(&self) -> Result<WebSocketNotificationMetadata<T>, Report> {
+ async fn recv(&self) -> Result<NotificationTopicEvent<'static, T>, Report> {
NotificationTopicConsumer::recv(self).await
}
}
diff --git a/crates/notification/src/outbound/notification_consumer/test.rs b/crates/notification/src/outbound/notification_consumer/test.rs
index fb644079b6..5fff0ee2fd 100644
--- a/crates/notification/src/outbound/notification_consumer/test.rs
+++ b/crates/notification/src/outbound/notification_consumer/test.rs
@@ -1,8 +1,19 @@
+use std::borrow::Cow;
+
+use chrono::Utc;
use macro_event_broker::{
EventBrokerError, MacroEventCollection as _, MessageParts, MessageWrapper,
};
+use macro_user_id::user_id::MacroUserIdStr;
+use model_entity::EntityType;
+use model_notifications::{NotifEvent, TaskAssignedMetadata};
+use uuid::Uuid;
-use super::DeclaredMacroEvent;
+use super::{DeclaredMacroEvent, decode_typed_event};
+use crate::domain::models::websocket_notification_event::{
+ NotificationTopicEvent, WebSocketNotificationMetadata,
+};
+use crate::domain::models::{NotificationDelete, PatchDelete, UserNotificationRow};
struct TestMessage {
payload: Vec<u8>,
@@ -35,8 +46,7 @@ fn declared_topic_decoder_rejects_unsupported_schema_versions() {
"schema_version": 2,
"event_type": "notification.websocket_delivery_requested",
"metadata": {
- "recipients": [],
- "notification": {}
+ "notifications": []
}
}))
.expect("serializable event"),
@@ -51,3 +61,104 @@ fn declared_topic_decoder_rejects_unsupported_schema_versions() {
})
));
}
+
+fn row() -> UserNotificationRow<serde_json::Value> {
+ UserNotificationRow {
+ owner_id: MacroUserIdStr::try_from("macro|[email protected]".to_string())
+ .expect("valid user ID"),
+ notification_id: Uuid::nil(),
+ notification_event_type: "test".to_string(),
+ entity: EntityType::Document.with_entity_string("document-id".to_string()),
+ sent: true,
+ done: false,
+ created_at: Utc::now(),
+ viewed_at: None,
+ updated_at: Utc::now(),
+ deleted_at: None,
+ notification_metadata: serde_json::json!({ "kind": "test" }),
+ sender_id: None,
+ }
+}
+
+#[test]
+fn status_patch_decodes_tagged_notification_metadata() {
+ let mut row = row();
+ let user = row.owner_id.clone();
+ let assigned_by = MacroUserIdStr::try_from("macro|[email protected]".to_string())
+ .expect("valid assigner ID");
+ row.notification_event_type = "task_assigned".to_string();
+ row.notification_metadata = serde_json::json!({
+ "taskId": "task-1",
+ "taskName": "Test task",
+ "assignedBy": assigned_by.as_ref(),
+ });
+ let event = NotificationTopicEvent::NotificationStatusesUpdatedForUser {
+ user,
+ updates: vec![PatchDelete::Patch {
+ diff: Cow::Owned(row),
+ }],
+ };
+
+ let NotificationTopicEvent::NotificationStatusesUpdatedForUser { updates, .. } =
+ decode_typed_event::<NotifEvent>(event).expect("tagged status patch metadata decodes")
+ else {
+ panic!("expected user notification statuses event");
+ };
+ let PatchDelete::Patch { diff } = &updates[0] else {
+ panic!("expected status patch");
+ };
+ let NotifEvent::TaskAssigned(TaskAssignedMetadata {
+ task_id,
+ task_name,
+ assigned_by: decoded_assigned_by,
+ ..
+ }) = &diff.notification_metadata
+ else {
+ panic!("expected task assigned metadata");
+ };
+ assert_eq!(task_id, "task-1");
+ assert_eq!(task_name.as_deref(), Some("Test task"));
+ assert_eq!(decoded_assigned_by, &assigned_by);
+}
+
+#[test]
+fn typed_decoder_returns_every_variant_with_notification_rows() {
+ let row = row();
+ let user = row.owner_id.clone();
+ let events = [
+ NotificationTopicEvent::WebSocketDeliveryRequested(WebSocketNotificationMetadata {
+ notifications: vec![row.clone()],
+ }),
+ NotificationTopicEvent::NotificationStatusUpdatedForUsers {
+ users: vec![user.clone()],
+ update: Box::new(NotificationDelete::Delete {
+ id: row.notification_id,
+ }),
+ },
+ NotificationTopicEvent::NotificationStatusesUpdatedForUser {
+ user,
+ updates: vec![PatchDelete::Patch {
+ diff: Cow::Owned(row),
+ }],
+ },
+ ];
+
+ let decoded = events
+ .into_iter()
+ .map(decode_typed_event::<serde_json::Value>)
+ .collect::<Result<Vec<_>, _>>()
+ .expect("all variants decode as notification rows");
+
+ assert!(matches!(
+ decoded[0],
+ NotificationTopicEvent::WebSocketDeliveryRequested(_)
+ ));
+ assert!(matches!(
+ decoded[1],
+ NotificationTopicEvent::NotificationStatusUpdatedForUsers { .. }
+ ));
+ assert!(matches!(
+ decoded[2],
+ NotificationTopicEvent::NotificationStatusesUpdatedForUser { .. }
+ ));
+}
diff --git a/crates/notification/src/outbound/websocket.rs b/crates/notification/src/outbound/websocket.rs
index f893178df4..1259158036 100644
--- a/crates/notification/src/outbound/websocket.rs
+++ b/crates/notification/src/outbound/websocket.rs
@@ -8,10 +8,12 @@ use model_entity::{Entity, EntityType};
use rootcause::Report;
use serde::Serialize;
-use crate::domain::models::{NotificationStatusUpdate, UserNotificationStatusUpdate};
-use crate::domain::ports::{NotificationRealtimePublisher, WebSocketSender};
+use crate::domain::models::{
+ NotificationDelete, NotificationStatusPayload, NotificationStatusUpdate, PatchDelete,
+};
+use crate::domain::ports::{NotificationRealtimePublisher, RealtimeSender};
-/// WebSocket gateway implementation of the WebSocket sender port.
+/// WebSocket gateway implementation of the realtime sender port.
///
/// This adapter sends notifications to users via WebSocket connections
/// through the connection gateway service.
@@ -196,9 +198,7 @@ impl WebSocketGatewayOps for ConnectionGatewayClient {
}
}
-impl<W: WebSocketGatewayOps + Send + Sync + 'static> WebSocketSender
- for WebSocketGatewayAdapter<W>
-{
+impl<W: WebSocketGatewayOps + Send + Sync + 'static> RealtimeSender for WebSocketGatewayAdapter<W> {
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
recipients: &[MacroUserIdStr<'a>],
@@ -209,20 +209,32 @@ impl<W: WebSocketGatewayOps + Send + Sync + 'static> WebSocketSender
}
impl NotificationRealtimePublisher for WebSocketGatewayAdapter<ConnectionGatewayClient> {
- async fn publish_updates(
- &self,
- updates: &[UserNotificationStatusUpdate<'_>],
- ) -> Result<(), Report> {
- let messages = updates
- .iter()
- .map(|update| {
- Ok(UniqueMessage {
+ async fn publish_updates(&self, payload: &NotificationStatusPayload<'_>) -> Result<(), Report> {
+ let messages = match payload {
+ NotificationStatusPayload::NotificationForUsers { users, update } => {
+ let NotificationDelete::Delete { id } = **update;
+ let message_content = serde_json::to_value(NotificationStatusUpdate::new(vec![
+ PatchDelete::Delete { id },
+ ]))?;
+ users
+ .iter()
+ .map(|user| UniqueMessage {
+ message_type: NotificationStatusUpdate::MESSAGE_TYPE,
+ message_content: message_content.clone(),
+ entity: EntityType::User.with_entity_str(user.as_ref()),
+ })
+ .collect()
+ }
+ NotificationStatusPayload::UserNotifications { user, updates } => {
+ vec![UniqueMessage {
message_type: NotificationStatusUpdate::MESSAGE_TYPE,
- message_content: serde_json::to_value(&update.update)?,
- entity: EntityType::User.with_entity_str(update.user.as_ref()),
- })
- })
- .collect::<Result<Vec<_>, serde_json::Error>>()?;
+ message_content: serde_json::to_value(NotificationStatusUpdate::new(
+ updates.clone(),
+ ))?,
+ entity: EntityType::User.with_entity_str(user.as_ref()),
+ }]
+ }
+ };
self.gateway.batch_send_unique_messages(messages).await?;
Ok(())
diff --git a/services/document_storage_service/src/api/context.rs b/services/document_storage_service/src/api/context.rs
index d952e02beb..a277f12a1b 100644
--- a/services/document_storage_service/src/api/context.rs
+++ b/services/document_storage_service/src/api/context.rs
@@ -168,11 +168,9 @@ pub(crate) type DssSoupRealtimeService = SoupRealtimeConsumerService<SoupTopicCo
pub(crate) type DssNotificationRealtimeService =
notification::domain::service::WebSocketNotificationConsumerService<
notification::outbound::notification_consumer::NotificationTopicConsumer<
- notification::domain::models::queue_message::RealtimeNotif<
- model_notifications::NotifEvent,
- >,
+ model_notifications::NotifEvent,
>,
- notification::domain::models::queue_message::RealtimeNotif<model_notifications::NotifEvent>,
+ model_notifications::NotifEvent,
>;
/// GraphQL Soup schema wired to the DSS services; the `ApiContext` state
diff --git a/services/document_storage_service/src/main.rs b/services/document_storage_service/src/main.rs
index 21f145584e..3ddf951be6 100644
--- a/services/document_storage_service/src/main.rs
+++ b/services/document_storage_service/src/main.rs
@@ -93,12 +93,9 @@ use macro_event_broker::{KafkaEventPublisher, MacroEventBrokerService};
use macro_service_urls::AiEditingWorkerUrl;
use macro_service_urls::{ConnectionGatewayUrl, LexicalServiceUrl, SyncServiceUrl};
use macro_sha_count_client::Redis;
-use notification::domain::{
- models::queue_message::RealtimeNotif,
- service::{
- NotificationReaderService, PlatformArnConfig, SqsNotificationIngress,
- WebSocketNotificationConsumerService,
- },
+use notification::domain::service::{
+ NotificationReaderService, PlatformArnConfig, SqsNotificationIngress,
+ WebSocketNotificationConsumerService,
};
use notification::outbound::{notification_consumer::NotificationTopicConsumer, queue::SqsQueue};
use opensearch_client::OpensearchClient;
@@ -965,7 +962,7 @@ async fn main() -> anyhow::Result<()> {
let websocket_notification_consumer_service =
Arc::new(WebSocketNotificationConsumerService::new(
- NotificationTopicConsumer::<RealtimeNotif<model_notifications::NotifEvent>>::from_env(
+ NotificationTopicConsumer::<model_notifications::NotifEvent>::from_env(
config.kafka_brokers.as_ref(),
)
.map_err(|error| {
diff --git a/services/notification_service/src/main.rs b/services/notification_service/src/main.rs
index 8f0c451c25..48871201f8 100644
--- a/services/notification_service/src/main.rs
+++ b/services/notification_service/src/main.rs
@@ -6,8 +6,10 @@ use ::notification::domain::service::NotificationEgressService;
use ::notification::inbound::notification_events_listener::NotificationEventsListener;
use ::notification::inbound::worker::NotificationWorker;
use ::notification::outbound::email::EmailAdapter;
-use ::notification::outbound::fanout_websocket::FanoutWebSocketSender;
-use ::notification::outbound::kafka_websocket::KafkaWebSocketSender;
+use ::notification::outbound::fanout_notification_realtime::FanoutNotificationRealtimePublisher;
+use ::notification::outbound::fanout_realtime::FanoutRealtimeSender;
+use ::notification::outbound::kafka_notification_realtime::KafkaNotificationRealtimePublisher;
+use ::notification::outbound::kafka_realtime::KafkaRealtimeSender;
use ::notification::outbound::mobile::MobilePushAdapter;
use ::notification::outbound::notification_events::PgNotificationEventsReceiver;
use ::notification::outbound::rate_limit::RedisRateLimitAdapter;
@@ -158,18 +160,29 @@ pub async fn main() -> anyhow::Result<()> {
fcm_platform_arn: config.sns_fcm_platform_arn.as_ref().to_string(),
apns_voip_platform_arn: config.sns_apns_voip_platform_arn().to_string(),
};
- let reader_realtime_adapter = WebSocketGatewayAdapter {
- gateway: ConnectionGatewayClient::new(
- config.internal_api_key.as_ref().to_string(),
- connection_gateway_url.clone(),
- ),
- };
- let notification_events_realtime_adapter = WebSocketGatewayAdapter {
- gateway: ConnectionGatewayClient::new(
- config.internal_api_key.as_ref().to_string(),
- connection_gateway_url.clone(),
- ),
- };
+ let realtime_event_broker = MacroEventBrokerService::new(
+ KafkaEventPublisher::new(config.kafka_brokers.as_ref())
+ .context("failed to create Kafka realtime notification publisher")?,
+ GlobalSpawner,
+ );
+ let reader_realtime_adapter = FanoutNotificationRealtimePublisher::new(
+ WebSocketGatewayAdapter {
+ gateway: ConnectionGatewayClient::new(
+ config.internal_api_key.as_ref().to_string(),
+ connection_gateway_url.clone(),
+ ),
+ },
+ KafkaNotificationRealtimePublisher::new(realtime_event_broker.clone()),
+ );
+ let notification_events_realtime_adapter = FanoutNotificationRealtimePublisher::new(
+ WebSocketGatewayAdapter {
+ gateway: ConnectionGatewayClient::new(
+ config.internal_api_key.as_ref().to_string(),
+ connection_gateway_url.clone(),
+ ),
+ },
+ KafkaNotificationRealtimePublisher::new(realtime_event_broker.clone()),
+ );
let notification_events_receiver = PgNotificationEventsReceiver::new(db.clone());
let mut notification_events_listener = NotificationEventsListener::new(
notification_events_receiver,
@@ -198,18 +211,14 @@ pub async fn main() -> anyhow::Result<()> {
let egress_repository =
::notification::outbound::repository::DbNotificationRepository::new(db.clone());
- let websocket_adapter = FanoutWebSocketSender::new(
+ let realtime_adapter = FanoutRealtimeSender::new(
WebSocketGatewayAdapter {
gateway: ConnectionGatewayClient::new(
config.internal_api_key.as_ref().to_string(),
connection_gateway_url,
),
},
- KafkaWebSocketSender::new(MacroEventBrokerService::new(
- KafkaEventPublisher::new(config.kafka_brokers.as_ref())
- .context("failed to create Kafka WebSocket notification publisher")?,
- GlobalSpawner,
- )),
+ KafkaRealtimeSender::new(realtime_event_broker),
);
let mobile_adapter = MobilePushAdapter {
@@ -249,7 +258,7 @@ pub async fn main() -> anyhow::Result<()> {
let egress_service = NotificationEgressService {
queue: notification_queue,
repository: egress_repository,
- websocket: websocket_adapter,
+ realtime: realtime_adapter,
mobile: mobile_adapter,
email: email_adapter,
rate_limiter: rate_limit_adapter,
diff --git a/static_assets/schema.graphql b/static_assets/schema.graphql
index a0228ea136..9250787e4e 100644
--- a/static_assets/schema.graphql
+++ b/static_assets/schema.graphql
@@ -99,7 +99,7 @@ type CompleteSubscriptionRoot {
"""
Subscribe to realtime notifications for the authenticated user.
"""
- notificationUpdates: GraphqlNotification!
+ notificationUpdates: GraphqlNotificationPatch!
}
"""
@@ -2598,6 +2598,11 @@ enum GraphqlNotificationDocumentSubType {
SKILL
}
+"""
+Realtime notification patch represented as either an update or cache deletion.
+"""
+union GraphqlNotificationPatch = GraphqlNotification | GraphqlCacheDeletion
+
"""
A numeric property value.
"""
diff --git a/tooling/notification_sandbox/src/adapters/logging_websocket.rs b/tooling/notification_sandbox/src/adapters/logging_realtime.rs
similarity index 65%
rename from tooling/notification_sandbox/src/adapters/logging_websocket.rs
rename to tooling/notification_sandbox/src/adapters/logging_realtime.rs
index 01ec71f354..303a056fee 100644
--- a/tooling/notification_sandbox/src/adapters/logging_websocket.rs
+++ b/tooling/notification_sandbox/src/adapters/logging_realtime.rs
@@ -2,21 +2,21 @@ use std::collections::HashSet;
use macro_user_id::cowlike::CowLike;
use macro_user_id::user_id::MacroUserIdStr;
-use notification::domain::ports::WebSocketSender;
+use notification::domain::ports::RealtimeSender;
use rootcause::Report;
use serde::Serialize;
-/// WebSocket sender that logs delivery info instead of sending.
-pub struct LoggingWebSocketSender;
+/// Realtime sender that logs delivery info instead of sending.
+pub struct LoggingRealtimeSender;
-impl WebSocketSender for LoggingWebSocketSender {
+impl RealtimeSender for LoggingRealtimeSender {
async fn send_notifications<'a, T: Serialize + Send + Sync>(
&self,
recipients: &[MacroUserIdStr<'a>],
_notification: &T,
) -> Result<HashSet<MacroUserIdStr<'static>>, Report> {
println!(
- " [egress] WebSocket: delivered to {} recipient(s)",
+ " [egress] Realtime: delivered to {} recipient(s)",
recipients.len()
);
Ok(recipients.iter().map(|r| r.clone().into_owned()).collect())
diff --git a/tooling/notification_sandbox/src/adapters/mod.rs b/tooling/notification_sandbox/src/adapters/mod.rs
index ddf05adbb1..92c19f04c6 100644
--- a/tooling/notification_sandbox/src/adapters/mod.rs
+++ b/tooling/notification_sandbox/src/adapters/mod.rs
@@ -1,7 +1,7 @@
/// Interactive mobile push sender for sandbox.
pub mod interactive_mobile;
-/// WebSocket sender that logs delivery info.
-pub mod logging_websocket;
+/// Realtime sender that logs delivery info.
+pub mod logging_realtime;
/// Tokio mpsc-backed notification queue.
pub mod mpsc_queue;
/// Rate limiter that always allows.
diff --git a/tooling/notification_sandbox/src/main.rs b/tooling/notification_sandbox/src/main.rs
index 34182e6c2f..8a79d3acd6 100644
--- a/tooling/notification_sandbox/src/main.rs
+++ b/tooling/notification_sandbox/src/main.rs
@@ -36,7 +36,7 @@ use sqlx::postgres::PgPoolOptions;
use adapters::interactive_mobile::{
InteractiveMobileSender, PushPromptRequest, SandboxMobileSender,
};
-use adapters::logging_websocket::LoggingWebSocketSender;
+use adapters::logging_realtime::LoggingRealtimeSender;
use adapters::mpsc_queue::MpscQueue;
use adapters::noop_rate_limiter::NoOpRateLimitPort;
use adapters::sandbox_repository::SandboxNotificationRepository;
@@ -154,7 +154,7 @@ async fn main() -> Result<(), Report> {
let egress_service = Arc::new(NotificationEgressService {
queue: queue.clone(),
repository: DbNotificationRepository::new(db.clone()),
- websocket: LoggingWebSocketSender,
+ realtime: LoggingRealtimeSender,
mobile: mobile_sender,
email: email_adapter,
rate_limiter: rate_limit::RateLimitServiceImpl {