mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
@@ -0,0 +1,3 @@
|
||||
mutation createCopilotSession($options: CreateChatSessionInput!) {
|
||||
createCopilotSession(options: $options)
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
query getCopilotAnonymousHistories(
|
||||
$workspaceId: String!
|
||||
$docId: String
|
||||
$options: QueryChatHistoriesInput
|
||||
) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
query getCopilotAnonymousSessions($workspaceId: String!) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
query getCopilotHistories(
|
||||
$workspaceId: String!
|
||||
$docId: String
|
||||
$options: QueryChatHistoriesInput
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
query getCopilotSessions($workspaceId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,17 @@ mutation createCheckoutSession($input: CreateCheckoutSessionInput!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const createCopilotSessionMutation = {
|
||||
id: 'createCopilotSessionMutation' as const,
|
||||
operationName: 'createCopilotSession',
|
||||
definitionName: 'createCopilotSession',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation createCopilotSession($options: CreateChatSessionInput!) {
|
||||
createCopilotSession(options: $options)
|
||||
}`,
|
||||
};
|
||||
|
||||
export const createCustomerPortalMutation = {
|
||||
id: 'createCustomerPortalMutation' as const,
|
||||
operationName: 'createCustomerPortal',
|
||||
@@ -240,6 +251,80 @@ mutation removeEarlyAccess($email: String!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotAnonymousHistoriesQuery = {
|
||||
id: 'getCopilotAnonymousHistoriesQuery' as const,
|
||||
operationName: 'getCopilotAnonymousHistories',
|
||||
definitionName: 'copilotAnonymous',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotAnonymousHistories($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotAnonymousSessionsQuery = {
|
||||
id: 'getCopilotAnonymousSessionsQuery' as const,
|
||||
operationName: 'getCopilotAnonymousSessions',
|
||||
definitionName: 'copilotAnonymous',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotAnonymousSessions($workspaceId: String!) {
|
||||
copilotAnonymous(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotHistoriesQuery = {
|
||||
id: 'getCopilotHistoriesQuery' as const,
|
||||
operationName: 'getCopilotHistories',
|
||||
definitionName: 'currentUser',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotHistories($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
histories(docId: $docId, options: $options) {
|
||||
sessionId
|
||||
tokens
|
||||
messages {
|
||||
role
|
||||
content
|
||||
attachments
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCopilotSessionsQuery = {
|
||||
id: 'getCopilotSessionsQuery' as const,
|
||||
operationName: 'getCopilotSessions',
|
||||
definitionName: 'currentUser',
|
||||
containsFile: false,
|
||||
query: `
|
||||
query getCopilotSessions($workspaceId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats
|
||||
actions
|
||||
}
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const getCurrentUserQuery = {
|
||||
id: 'getCurrentUserQuery' as const,
|
||||
operationName: 'getCurrentUser',
|
||||
|
||||
@@ -34,6 +34,14 @@ export interface Scalars {
|
||||
Upload: { input: File; output: File };
|
||||
}
|
||||
|
||||
export interface CreateChatSessionInput {
|
||||
action: Scalars['Boolean']['input'];
|
||||
docId: Scalars['String']['input'];
|
||||
model: Scalars['String']['input'];
|
||||
promptName: Scalars['String']['input'];
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}
|
||||
|
||||
export interface CreateCheckoutSessionInput {
|
||||
coupon: InputMaybe<Scalars['String']['input']>;
|
||||
idempotencyKey: Scalars['String']['input'];
|
||||
@@ -76,6 +84,13 @@ export enum PublicPageMode {
|
||||
Page = 'Page',
|
||||
}
|
||||
|
||||
export interface QueryChatHistoriesInput {
|
||||
action: InputMaybe<Scalars['Boolean']['input']>;
|
||||
limit: InputMaybe<Scalars['Int']['input']>;
|
||||
sessionId: InputMaybe<Scalars['String']['input']>;
|
||||
skip: InputMaybe<Scalars['Int']['input']>;
|
||||
}
|
||||
|
||||
export enum ServerDeploymentType {
|
||||
Affine = 'Affine',
|
||||
Selfhosted = 'Selfhosted',
|
||||
@@ -217,6 +232,15 @@ export type CreateCheckoutSessionMutation = {
|
||||
createCheckoutSession: string;
|
||||
};
|
||||
|
||||
export type CreateCopilotSessionMutationVariables = Exact<{
|
||||
options: CreateChatSessionInput;
|
||||
}>;
|
||||
|
||||
export type CreateCopilotSessionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
createCopilotSession: string;
|
||||
};
|
||||
|
||||
export type CreateCustomerPortalMutationVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
@@ -309,6 +333,86 @@ export type PasswordLimitsFragment = {
|
||||
maxLength: number;
|
||||
};
|
||||
|
||||
export type GetCopilotAnonymousHistoriesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: InputMaybe<Scalars['String']['input']>;
|
||||
options: InputMaybe<QueryChatHistoriesInput>;
|
||||
}>;
|
||||
|
||||
export type GetCopilotAnonymousHistoriesQuery = {
|
||||
__typename?: 'Query';
|
||||
copilotAnonymous: {
|
||||
__typename?: 'Copilot';
|
||||
histories: Array<{
|
||||
__typename?: 'CopilotHistories';
|
||||
sessionId: string;
|
||||
tokens: number;
|
||||
messages: Array<{
|
||||
__typename?: 'ChatMessage';
|
||||
role: string;
|
||||
content: string;
|
||||
attachments: Array<string> | null;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetCopilotAnonymousSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetCopilotAnonymousSessionsQuery = {
|
||||
__typename?: 'Query';
|
||||
copilotAnonymous: {
|
||||
__typename?: 'Copilot';
|
||||
chats: Array<string>;
|
||||
actions: Array<string>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetCopilotHistoriesQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
docId: InputMaybe<Scalars['String']['input']>;
|
||||
options: InputMaybe<QueryChatHistoriesInput>;
|
||||
}>;
|
||||
|
||||
export type GetCopilotHistoriesQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
histories: Array<{
|
||||
__typename?: 'CopilotHistories';
|
||||
sessionId: string;
|
||||
tokens: number;
|
||||
messages: Array<{
|
||||
__typename?: 'ChatMessage';
|
||||
role: string;
|
||||
content: string;
|
||||
attachments: Array<string> | null;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCopilotSessionsQueryVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetCopilotSessionsQuery = {
|
||||
__typename?: 'Query';
|
||||
currentUser: {
|
||||
__typename?: 'UserType';
|
||||
copilot: {
|
||||
__typename?: 'Copilot';
|
||||
chats: Array<string>;
|
||||
actions: Array<string>;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>;
|
||||
|
||||
export type GetCurrentUserQuery = {
|
||||
@@ -953,6 +1057,26 @@ export type Queries =
|
||||
variables: EarlyAccessUsersQueryVariables;
|
||||
response: EarlyAccessUsersQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotAnonymousHistoriesQuery';
|
||||
variables: GetCopilotAnonymousHistoriesQueryVariables;
|
||||
response: GetCopilotAnonymousHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotAnonymousSessionsQuery';
|
||||
variables: GetCopilotAnonymousSessionsQueryVariables;
|
||||
response: GetCopilotAnonymousSessionsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotHistoriesQuery';
|
||||
variables: GetCopilotHistoriesQueryVariables;
|
||||
response: GetCopilotHistoriesQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCopilotSessionsQuery';
|
||||
variables: GetCopilotSessionsQueryVariables;
|
||||
response: GetCopilotSessionsQuery;
|
||||
}
|
||||
| {
|
||||
name: 'getCurrentUserQuery';
|
||||
variables: GetCurrentUserQueryVariables;
|
||||
@@ -1110,6 +1234,11 @@ export type Mutations =
|
||||
variables: CreateCheckoutSessionMutationVariables;
|
||||
response: CreateCheckoutSessionMutation;
|
||||
}
|
||||
| {
|
||||
name: 'createCopilotSessionMutation';
|
||||
variables: CreateCopilotSessionMutationVariables;
|
||||
response: CreateCopilotSessionMutation;
|
||||
}
|
||||
| {
|
||||
name: 'createCustomerPortalMutation';
|
||||
variables: CreateCustomerPortalMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user