mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
feat(server): realtime notification & task status (#14934)
#### PR Dependency Tree * **PR #14934** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Full realtime platform added: live notifications, comments, embedding progress, and transcription task updates via realtime subscriptions. * **Chores** * Frontend switched from polling/GraphQL queries to realtime channels; legacy query fields marked deprecated and client libs updated to use realtime APIs. [](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14934) <!-- end of auto-generated comment: release notes by coderabbit.ai --> #### PR Dependency Tree * **PR #14934** 👈 * **PR #14936** This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
@@ -1296,6 +1296,7 @@ export const getWorkspaceEmbeddingStatusQuery = {
|
||||
embedded
|
||||
}
|
||||
}`,
|
||||
deprecations: ["'queryWorkspaceEmbeddingStatus' is deprecated: Use realtime subscription \"workspace.embedding.progress.changed\" instead."],
|
||||
};
|
||||
|
||||
export const queueWorkspaceEmbeddingMutation = {
|
||||
@@ -1621,6 +1622,7 @@ export const getTranscriptTaskQuery = {
|
||||
}
|
||||
}
|
||||
}`,
|
||||
deprecations: ["'transcriptTask' is deprecated: Use realtime subscription \"copilot.transcript.task.changed\" instead."],
|
||||
};
|
||||
|
||||
export const retryTranscriptTaskMutation = {
|
||||
@@ -2646,11 +2648,10 @@ export const notificationCountQuery = {
|
||||
op: 'notificationCount',
|
||||
query: `query notificationCount {
|
||||
currentUser {
|
||||
notifications(pagination: {first: 1}) {
|
||||
totalCount
|
||||
}
|
||||
notificationCount
|
||||
}
|
||||
}`,
|
||||
deprecations: ["'notificationCount' is deprecated: Use realtime subscription \"notification.count.changed\" instead."],
|
||||
};
|
||||
|
||||
export const pricesQuery = {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
query notificationCount {
|
||||
currentUser {
|
||||
notifications(pagination: { first: 1 }) {
|
||||
totalCount
|
||||
}
|
||||
notificationCount
|
||||
}
|
||||
}
|
||||
|
||||
@@ -580,6 +580,7 @@ export interface Copilot {
|
||||
* @deprecated use `chats` instead
|
||||
*/
|
||||
sessions: Array<CopilotSessionType>;
|
||||
/** @deprecated Use realtime subscription "copilot.transcript.task.changed" instead. */
|
||||
transcriptTask: Maybe<TranscriptionResultType>;
|
||||
workspaceId: Maybe<Scalars['ID']['output']>;
|
||||
}
|
||||
@@ -2635,7 +2636,10 @@ export interface Query {
|
||||
prices: Array<SubscriptionPrice>;
|
||||
/** Get public user by id */
|
||||
publicUserById: Maybe<PublicUserType>;
|
||||
/** query workspace embedding status */
|
||||
/**
|
||||
* query workspace embedding status
|
||||
* @deprecated Use realtime subscription "workspace.embedding.progress.changed" instead.
|
||||
*/
|
||||
queryWorkspaceEmbeddingStatus: ContextWorkspaceEmbeddingStatus;
|
||||
/** @deprecated use currentUser.revealedAccessTokens */
|
||||
revealedAccessTokens: Array<RevealedAccessToken>;
|
||||
@@ -3390,7 +3394,10 @@ export interface UserType {
|
||||
invoices: Array<InvoiceType>;
|
||||
/** User name */
|
||||
name: Scalars['String']['output'];
|
||||
/** Get user notification count */
|
||||
/**
|
||||
* Get user notification count
|
||||
* @deprecated Use realtime subscription "notification.count.changed" instead.
|
||||
*/
|
||||
notificationCount: Scalars['Int']['output'];
|
||||
/** Get current user notifications */
|
||||
notifications: PaginatedNotificationObjectType;
|
||||
@@ -7263,13 +7270,7 @@ export type NotificationCountQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
export type NotificationCountQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
notifications: {
|
||||
__typename?: 'PaginatedNotificationObjectType';
|
||||
totalCount: number;
|
||||
};
|
||||
} | null;
|
||||
currentUser: { __typename?: 'UserType'; notificationCount: number } | null;
|
||||
};
|
||||
|
||||
export type PricesQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
Reference in New Issue
Block a user