From 0dfcc97c52cfa353fb0466db6403bf140824d8f2 Mon Sep 17 00:00:00 2001 From: darkskygit Date: Wed, 29 May 2024 07:34:08 +0000 Subject: [PATCH] chore: update cleanup history gql (#7103) --- .../src/graphql/create-checkout-link copy.gql | 3 ++ .../frontend/graphql/src/graphql/index.ts | 11 +++++ packages/frontend/graphql/src/schema.ts | 49 +++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 packages/frontend/graphql/src/graphql/create-checkout-link copy.gql 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 000000000..3c303091e --- /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 3ab0d2e1a..f5a117cb5 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 3e800c932..bfe9381f9 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; output: Record }; + /** 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; + role: CopilotPromptMessageRole; +} + +export enum CopilotPromptMessageRole { + assistant = 'assistant', + system = 'system', + user = 'user', +} + export interface CreateChatMessageInput { attachments: InputMaybe>; blobs: InputMaybe>; @@ -59,6 +86,13 @@ export interface CreateCheckoutSessionInput { successCallbackLink: Scalars['String']['input']; } +export interface CreateCopilotPromptInput { + action: InputMaybe; + messages: Array; + model: CopilotModels; + name: Scalars['String']['input']; +} + export interface DeleteSessionInput { docId: Scalars['String']['input']; sessionIds: Array; @@ -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;