Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore: update cleanup history gql (#7103)

darkskygit0dfcc97c52cf
diff --git a/packages/frontend/graphql/src/graphql/create-checkout-link copy.gql b/packages/frontend/graphql/src/graphql/create-checkout-link copy.gql
new file mode 100644
index 0000000000..3c303091ee
--- /dev/null
+++ b/packages/frontend/graphql/src/graphql/create-checkout-link copy.gql
@@ -0,0 +1,3 @@
+mutation cleanupCopilotSession($input: DeleteSessionInput!) {
+ cleanupCopilotSession(options: $input)
+}
diff --git a/packages/frontend/graphql/src/graphql/index.ts b/packages/frontend/graphql/src/graphql/index.ts
index 3ab0d2e1ad..f5a117cb5f 100644
--- a/packages/frontend/graphql/src/graphql/index.ts
+++ b/packages/frontend/graphql/src/graphql/index.ts
@@ -112,6 +112,17 @@ query copilotQuota {
}`,
};
+export const cleanupCopilotSessionMutation = {
+ id: 'cleanupCopilotSessionMutation' as const,
+ operationName: 'cleanupCopilotSession',
+ definitionName: 'cleanupCopilotSession',
+ containsFile: false,
+ query: `
+mutation cleanupCopilotSession($input: DeleteSessionInput!) {
+ cleanupCopilotSession(options: $input)
+}`,
+};
+
export const createCheckoutSessionMutation = {
id: 'createCheckoutSessionMutation' as const,
operationName: 'createCheckoutSession',
diff --git a/packages/frontend/graphql/src/schema.ts b/packages/frontend/graphql/src/schema.ts
index 3e800c9326..bfe9381f93 100644
--- a/packages/frontend/graphql/src/schema.ts
+++ b/packages/frontend/graphql/src/schema.ts
@@ -30,12 +30,39 @@ export interface Scalars {
DateTime: { input: string; output: string };
/** The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
JSON: { input: Record<string, string>; output: Record<string, string> };
+ /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */
+ JSONObject: { input: any; output: any };
/** The `SafeInt` scalar type represents non-fractional signed whole numeric values that are considered safe as defined by the ECMAScript specification. */
SafeInt: { input: number; output: number };
/** The `Upload` scalar type represents a file upload. */
Upload: { input: File; output: File };
}
+export enum CopilotModels {
+ DallE3 = 'DallE3',
+ Gpt4Omni = 'Gpt4Omni',
+ Gpt4TurboPreview = 'Gpt4TurboPreview',
+ Gpt4VisionPreview = 'Gpt4VisionPreview',
+ Gpt35Turbo = 'Gpt35Turbo',
+ TextEmbedding3Large = 'TextEmbedding3Large',
+ TextEmbedding3Small = 'TextEmbedding3Small',
+ TextEmbeddingAda002 = 'TextEmbeddingAda002',
+ TextModerationLatest = 'TextModerationLatest',
+ TextModerationStable = 'TextModerationStable',
+}
+
+export interface CopilotPromptMessageInput {
+ content: Scalars['String']['input'];
+ params: InputMaybe<Scalars['JSON']['input']>;
+ role: CopilotPromptMessageRole;
+}
+
+export enum CopilotPromptMessageRole {
+ assistant = 'assistant',
+ system = 'system',
+ user = 'user',
+}
+
export interface CreateChatMessageInput {
attachments: InputMaybe<Array<Scalars['String']['input']>>;
blobs: InputMaybe<Array<Scalars['Upload']['input']>>;
@@ -59,6 +86,13 @@ export interface CreateCheckoutSessionInput {
successCallbackLink: Scalars['String']['input'];
}
+export interface CreateCopilotPromptInput {
+ action: InputMaybe<Scalars['String']['input']>;
+ messages: Array<CopilotPromptMessageInput>;
+ model: CopilotModels;
+ name: Scalars['String']['input'];
+}
+
export interface DeleteSessionInput {
docId: Scalars['String']['input'];
sessionIds: Array<Scalars['String']['input']>;
@@ -73,6 +107,7 @@ export enum EarlyAccessType {
/** The type of workspace feature */
export enum FeatureType {
AIEarlyAccess = 'AIEarlyAccess',
+ Admin = 'Admin',
Copilot = 'Copilot',
EarlyAccess = 'EarlyAccess',
UnlimitedCopilot = 'UnlimitedCopilot',
@@ -245,6 +280,15 @@ export type CopilotQuotaQuery = {
} | null;
};
+export type CleanupCopilotSessionMutationVariables = Exact<{
+ input: DeleteSessionInput;
+}>;
+
+export type CleanupCopilotSessionMutation = {
+ __typename?: 'Mutation';
+ cleanupCopilotSession: string;
+};
+
export type CreateCheckoutSessionMutationVariables = Exact<{
input: CreateCheckoutSessionInput;
}>;
@@ -1217,6 +1261,11 @@ export type Mutations =
variables: ChangePasswordMutationVariables;
response: ChangePasswordMutation;
}
+ | {
+ name: 'cleanupCopilotSessionMutation';
+ variables: CleanupCopilotSessionMutationVariables;
+ response: CleanupCopilotSessionMutation;
+ }
| {
name: 'createCheckoutSessionMutation';
variables: CreateCheckoutSessionMutationVariables;