mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 21:41:52 +08:00
fix: 🚑 compiler issue (#13114)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 77;
|
||||
objectVersion = 56;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -90,6 +90,8 @@
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
C45499AB2D140B5000E21978 /* NBStore */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
);
|
||||
path = NBStore;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -337,13 +339,9 @@
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AFFiNE/Pods-AFFiNE-frameworks.sh\"\n";
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment CopilotChatHistory on CopilotHistories { __typename sessionId workspaceId docId parentSessionId promptName model optionalModels action pinned title tokens messages { __typename ...CopilotChatMessage } createdAt updatedAt }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("workspaceId", String.self),
|
||||
.field("docId", String?.self),
|
||||
.field("parentSessionId", String?.self),
|
||||
.field("promptName", String.self),
|
||||
.field("model", String.self),
|
||||
.field("optionalModels", [String].self),
|
||||
.field("action", String?.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("title", String?.self),
|
||||
.field("tokens", Int.self),
|
||||
.field("messages", [Message].self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var parentSessionId: String? { __data["parentSessionId"] }
|
||||
public var promptName: String { __data["promptName"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var optionalModels: [String] { __data["optionalModels"] }
|
||||
/// An mark identifying which view to use to display the session
|
||||
public var action: String? { __data["action"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var title: String? { __data["title"] }
|
||||
/// The number of tokens used in the session
|
||||
public var tokens: Int { __data["tokens"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
|
||||
/// Message
|
||||
///
|
||||
/// Parent Type: `ChatMessage`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(CopilotChatMessage.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var attachments: [String]? { __data["attachments"] }
|
||||
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var copilotChatMessage: CopilotChatMessage { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias StreamObject = CopilotChatMessage.StreamObject
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct CopilotChatMessage: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment CopilotChatMessage on ChatMessage { __typename id role content attachments streamObjects { __typename type textDelta toolCallId toolName args result } createdAt }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID?.self),
|
||||
.field("role", String.self),
|
||||
.field("content", String.self),
|
||||
.field("attachments", [String]?.self),
|
||||
.field("streamObjects", [StreamObject]?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var attachments: [String]? { __data["attachments"] }
|
||||
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
|
||||
/// StreamObject
|
||||
///
|
||||
/// Parent Type: `StreamObject`
|
||||
public struct StreamObject: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.StreamObject }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("type", String.self),
|
||||
.field("textDelta", String?.self),
|
||||
.field("toolCallId", String?.self),
|
||||
.field("toolName", String?.self),
|
||||
.field("args", AffineGraphQL.JSON?.self),
|
||||
.field("result", AffineGraphQL.JSON?.self),
|
||||
] }
|
||||
|
||||
public var type: String { __data["type"] }
|
||||
public var textDelta: String? { __data["textDelta"] }
|
||||
public var toolCallId: String? { __data["toolCallId"] }
|
||||
public var toolName: String? { __data["toolName"] }
|
||||
public var args: AffineGraphQL.JSON? { __data["args"] }
|
||||
public var result: AffineGraphQL.JSON? { __data["result"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment PaginatedCopilotChats on PaginatedCopilotHistoriesType { __typename pageInfo { __typename hasNextPage hasPreviousPage startCursor endCursor } edges { __typename cursor node { __typename ...CopilotChatHistory } } }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("pageInfo", PageInfo.self),
|
||||
.field("edges", [Edge].self),
|
||||
] }
|
||||
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
/// PageInfo
|
||||
///
|
||||
/// Parent Type: `PageInfo`
|
||||
public struct PageInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PageInfo }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("hasNextPage", Bool.self),
|
||||
.field("hasPreviousPage", Bool.self),
|
||||
.field("startCursor", String?.self),
|
||||
.field("endCursor", String?.self),
|
||||
] }
|
||||
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
|
||||
public var startCursor: String? { __data["startCursor"] }
|
||||
public var endCursor: String? { __data["endCursor"] }
|
||||
}
|
||||
|
||||
/// Edge
|
||||
///
|
||||
/// Parent Type: `CopilotHistoriesTypeEdge`
|
||||
public struct Edge: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistoriesTypeEdge }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("cursor", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
|
||||
public var cursor: String { __data["cursor"] }
|
||||
public var node: Node { __data["node"] }
|
||||
|
||||
/// Edge.Node
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct Node: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(CopilotChatHistory.self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var parentSessionId: String? { __data["parentSessionId"] }
|
||||
public var promptName: String { __data["promptName"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var optionalModels: [String] { __data["optionalModels"] }
|
||||
/// An mark identifying which view to use to display the session
|
||||
public var action: String? { __data["action"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var title: String? { __data["title"] }
|
||||
/// The number of tokens used in the session
|
||||
public var tokens: Int { __data["tokens"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var copilotChatHistory: CopilotChatHistory { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias Message = CopilotChatHistory.Message
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateCommentMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createComment"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createComment($input: CommentCreateInput!) { createComment(input: $input) { __typename id content resolved createdAt updatedAt user { __typename id name avatarUrl } replies { __typename commentId id content createdAt updatedAt user { __typename id name avatarUrl } } } }"#
|
||||
))
|
||||
|
||||
public var input: CommentCreateInput
|
||||
|
||||
public init(input: CommentCreateInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["input": input] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("createComment", CreateComment.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
public var createComment: CreateComment { __data["createComment"] }
|
||||
|
||||
/// CreateComment
|
||||
///
|
||||
/// Parent Type: `CommentObjectType`
|
||||
public struct CreateComment: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CommentObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("content", AffineGraphQL.JSONObject.self),
|
||||
.field("resolved", Bool.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("user", User.self),
|
||||
.field("replies", [Reply].self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// The content of the comment
|
||||
public var content: AffineGraphQL.JSONObject { __data["content"] }
|
||||
/// Whether the comment is resolved
|
||||
public var resolved: Bool { __data["resolved"] }
|
||||
/// The created at time of the comment
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// The updated at time of the comment
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
/// The user who created the comment
|
||||
public var user: User { __data["user"] }
|
||||
/// The replies of the comment
|
||||
public var replies: [Reply] { __data["replies"] }
|
||||
|
||||
/// CreateComment.User
|
||||
///
|
||||
/// Parent Type: `PublicUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PublicUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
|
||||
/// CreateComment.Reply
|
||||
///
|
||||
/// Parent Type: `ReplyObjectType`
|
||||
public struct Reply: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ReplyObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("commentId", AffineGraphQL.ID.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("content", AffineGraphQL.JSONObject.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("user", User.self),
|
||||
] }
|
||||
|
||||
public var commentId: AffineGraphQL.ID { __data["commentId"] }
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// The content of the reply
|
||||
public var content: AffineGraphQL.JSONObject { __data["content"] }
|
||||
/// The created at time of the reply
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// The updated at time of the reply
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
/// The user who created the reply
|
||||
public var user: User { __data["user"] }
|
||||
|
||||
/// CreateComment.Reply.User
|
||||
///
|
||||
/// Parent Type: `PublicUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PublicUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateReplyMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createReply"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createReply($input: ReplyCreateInput!) { createReply(input: $input) { __typename commentId id content createdAt updatedAt user { __typename id name avatarUrl } } }"#
|
||||
))
|
||||
|
||||
public var input: ReplyCreateInput
|
||||
|
||||
public init(input: ReplyCreateInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["input": input] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("createReply", CreateReply.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
public var createReply: CreateReply { __data["createReply"] }
|
||||
|
||||
/// CreateReply
|
||||
///
|
||||
/// Parent Type: `ReplyObjectType`
|
||||
public struct CreateReply: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ReplyObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("commentId", AffineGraphQL.ID.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("content", AffineGraphQL.JSONObject.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("user", User.self),
|
||||
] }
|
||||
|
||||
public var commentId: AffineGraphQL.ID { __data["commentId"] }
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// The content of the reply
|
||||
public var content: AffineGraphQL.JSONObject { __data["content"] }
|
||||
/// The created at time of the reply
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// The updated at time of the reply
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
/// The user who created the reply
|
||||
public var user: User { __data["user"] }
|
||||
|
||||
/// CreateReply.User
|
||||
///
|
||||
/// Parent Type: `PublicUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PublicUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteCommentMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteComment"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteComment($id: String!) { deleteComment(id: $id) }"#
|
||||
))
|
||||
|
||||
public var id: String
|
||||
|
||||
public init(id: String) {
|
||||
self.id = id
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["id": id] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("deleteComment", Bool.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// Delete a comment
|
||||
public var deleteComment: Bool { __data["deleteComment"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteReplyMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteReply"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteReply($id: String!) { deleteReply(id: $id) }"#
|
||||
))
|
||||
|
||||
public var id: String
|
||||
|
||||
public init(id: String) {
|
||||
self.id = id
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["id": id] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("deleteReply", Bool.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// Delete a reply
|
||||
public var deleteReply: Bool { __data["deleteReply"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ReadAllNotificationsMutation: GraphQLMutation {
|
||||
public static let operationName: String = "readAllNotifications"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation readAllNotifications { readAllNotifications }"#
|
||||
))
|
||||
|
||||
public init() {}
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("readAllNotifications", Bool.self),
|
||||
] }
|
||||
|
||||
/// mark all notifications as read
|
||||
public var readAllNotifications: Bool { __data["readAllNotifications"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ResolveCommentMutation: GraphQLMutation {
|
||||
public static let operationName: String = "resolveComment"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation resolveComment($input: CommentResolveInput!) { resolveComment(input: $input) }"#
|
||||
))
|
||||
|
||||
public var input: CommentResolveInput
|
||||
|
||||
public init(input: CommentResolveInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["input": input] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("resolveComment", Bool.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Resolve a comment or not
|
||||
public var resolveComment: Bool { __data["resolveComment"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateCommentMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateComment"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateComment($input: CommentUpdateInput!) { updateComment(input: $input) }"#
|
||||
))
|
||||
|
||||
public var input: CommentUpdateInput
|
||||
|
||||
public init(input: CommentUpdateInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["input": input] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("updateComment", Bool.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Update a comment content
|
||||
public var updateComment: Bool { __data["updateComment"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateReplyMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateReply"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateReply($input: ReplyUpdateInput!) { updateReply(input: $input) }"#
|
||||
))
|
||||
|
||||
public var input: ReplyUpdateInput
|
||||
|
||||
public init(input: ReplyUpdateInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["input": input] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("updateReply", Bool.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Update a reply content
|
||||
public var updateReply: Bool { __data["updateReply"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UploadCommentAttachmentMutation: GraphQLMutation {
|
||||
public static let operationName: String = "uploadCommentAttachment"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation uploadCommentAttachment($workspaceId: String!, $docId: String!, $attachment: Upload!) { uploadCommentAttachment( workspaceId: $workspaceId docId: $docId attachment: $attachment ) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
public var attachment: Upload
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String,
|
||||
attachment: Upload
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.attachment = attachment
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"attachment": attachment
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("uploadCommentAttachment", String.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"docId": .variable("docId"),
|
||||
"attachment": .variable("attachment")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Upload a comment attachment and return the access url
|
||||
public var uploadCommentAttachment: String { __data["uploadCommentAttachment"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCopilotDocSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotDocSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotDocSessions($workspaceId: String!, $docId: String!, $pagination: PaginationInput!, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: $pagination, docId: $docId, options: $options) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
public var pagination: PaginationInput
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String,
|
||||
pagination: PaginationInput,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.pagination = pagination
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"pagination": pagination,
|
||||
"options": options
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("currentUser", CurrentUser?.self),
|
||||
] }
|
||||
|
||||
/// Get current user
|
||||
public var currentUser: CurrentUser? { __data["currentUser"] }
|
||||
|
||||
/// CurrentUser
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct CurrentUser: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("copilot", Copilot.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
public var copilot: Copilot { __data["copilot"] }
|
||||
|
||||
/// CurrentUser.Copilot
|
||||
///
|
||||
/// Parent Type: `Copilot`
|
||||
public struct Copilot: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": .variable("pagination"),
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,25 +7,30 @@ public class GetCopilotHistoriesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotHistories"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotHistories($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename histories(docId: $docId, options: $options) { __typename sessionId pinned tokens action createdAt messages { __typename id role content streamObjects { __typename type textDelta toolCallId toolName args result } attachments createdAt } } } } }"#
|
||||
#"query getCopilotHistories($workspaceId: String!, $pagination: PaginationInput!, $docId: String, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: $pagination, docId: $docId, options: $options) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pagination: PaginationInput
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pagination: PaginationInput,
|
||||
docId: GraphQLNullable<String>,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pagination = pagination
|
||||
self.docId = docId
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pagination": pagination,
|
||||
"docId": docId,
|
||||
"options": options
|
||||
] }
|
||||
@@ -67,92 +72,41 @@ public class GetCopilotHistoriesQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("histories", [History].self, arguments: [
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": .variable("pagination"),
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("tokens", Int.self),
|
||||
.field("action", String?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("messages", [Message].self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
/// The number of tokens used in the session
|
||||
public var tokens: Int { __data["tokens"] }
|
||||
/// An mark identifying which view to use to display the session
|
||||
public var action: String? { __data["action"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.Message
|
||||
///
|
||||
/// Parent Type: `ChatMessage`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID?.self),
|
||||
.field("role", String.self),
|
||||
.field("content", String.self),
|
||||
.field("streamObjects", [StreamObject]?.self),
|
||||
.field("attachments", [String]?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
|
||||
public var attachments: [String]? { __data["attachments"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.Message.StreamObject
|
||||
///
|
||||
/// Parent Type: `StreamObject`
|
||||
public struct StreamObject: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.StreamObject }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("type", String.self),
|
||||
.field("textDelta", String?.self),
|
||||
.field("toolCallId", String?.self),
|
||||
.field("toolName", String?.self),
|
||||
.field("args", AffineGraphQL.JSON?.self),
|
||||
.field("result", AffineGraphQL.JSON?.self),
|
||||
] }
|
||||
|
||||
public var type: String { __data["type"] }
|
||||
public var textDelta: String? { __data["textDelta"] }
|
||||
public var toolCallId: String? { __data["toolCallId"] }
|
||||
public var toolName: String? { __data["toolName"] }
|
||||
public var args: AffineGraphQL.JSON? { __data["args"] }
|
||||
public var result: AffineGraphQL.JSON? { __data["result"] }
|
||||
}
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,29 @@ public class GetCopilotHistoryIdsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotHistoryIds"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotHistoryIds($workspaceId: String!, $docId: String, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename histories(docId: $docId, options: $options) { __typename sessionId pinned messages { __typename id role createdAt } } } } }"#
|
||||
#"query getCopilotHistoryIds($workspaceId: String!, $pagination: PaginationInput!, $docId: String, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: $pagination, docId: $docId, options: $options) { __typename pageInfo { __typename hasNextPage hasPreviousPage startCursor endCursor } edges { __typename cursor node { __typename sessionId pinned messages { __typename id role createdAt } } } } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pagination: PaginationInput
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pagination: PaginationInput,
|
||||
docId: GraphQLNullable<String>,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pagination = pagination
|
||||
self.docId = docId
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pagination": pagination,
|
||||
"docId": docId,
|
||||
"options": options
|
||||
] }
|
||||
@@ -67,51 +71,110 @@ public class GetCopilotHistoryIdsQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("histories", [History].self, arguments: [
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": .variable("pagination"),
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("messages", [Message].self),
|
||||
.field("pageInfo", PageInfo.self),
|
||||
.field("edges", [Edge].self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.Message
|
||||
/// CurrentUser.Copilot.Chats.PageInfo
|
||||
///
|
||||
/// Parent Type: `ChatMessage`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PageInfo`
|
||||
public struct PageInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PageInfo }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID?.self),
|
||||
.field("role", String.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("hasNextPage", Bool.self),
|
||||
.field("hasPreviousPage", Bool.self),
|
||||
.field("startCursor", String?.self),
|
||||
.field("endCursor", String?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
|
||||
public var startCursor: String? { __data["startCursor"] }
|
||||
public var endCursor: String? { __data["endCursor"] }
|
||||
}
|
||||
|
||||
/// CurrentUser.Copilot.Chats.Edge
|
||||
///
|
||||
/// Parent Type: `CopilotHistoriesTypeEdge`
|
||||
public struct Edge: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistoriesTypeEdge }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("cursor", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
|
||||
public var cursor: String { __data["cursor"] }
|
||||
public var node: Node { __data["node"] }
|
||||
|
||||
/// CurrentUser.Copilot.Chats.Edge.Node
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct Node: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("messages", [Message].self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
|
||||
/// CurrentUser.Copilot.Chats.Edge.Node.Message
|
||||
///
|
||||
/// Parent Type: `ChatMessage`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID?.self),
|
||||
.field("role", String.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ public class GetCopilotLatestDocSessionQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotLatestDocSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotLatestDocSession($workspaceId: String!, $docId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename histories( docId: $docId options: { limit: 1, sessionOrder: desc, action: false, fork: false } ) { __typename sessionId workspaceId docId pinned action tokens createdAt updatedAt messages { __typename id role content attachments params createdAt } } } } }"#
|
||||
#"query getCopilotLatestDocSession($workspaceId: String!, $docId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats( pagination: { first: 1 } docId: $docId options: { sessionOrder: desc, action: false, fork: false, withMessages: true } ) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
@@ -63,77 +64,46 @@ public class GetCopilotLatestDocSessionQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("histories", [History].self, arguments: [
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": ["first": 1],
|
||||
"docId": .variable("docId"),
|
||||
"options": [
|
||||
"limit": 1,
|
||||
"sessionOrder": "desc",
|
||||
"action": false,
|
||||
"fork": false
|
||||
"fork": false,
|
||||
"withMessages": true
|
||||
]
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("workspaceId", String.self),
|
||||
.field("docId", String?.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("action", String?.self),
|
||||
.field("tokens", Int.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("messages", [Message].self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
/// An mark identifying which view to use to display the session
|
||||
public var action: String? { __data["action"] }
|
||||
/// The number of tokens used in the session
|
||||
public var tokens: Int { __data["tokens"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.Message
|
||||
///
|
||||
/// Parent Type: `ChatMessage`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID?.self),
|
||||
.field("role", String.self),
|
||||
.field("content", String.self),
|
||||
.field("attachments", [String]?.self),
|
||||
.field("params", AffineGraphQL.JSON?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
public var role: String { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var attachments: [String]? { __data["attachments"] }
|
||||
public var params: AffineGraphQL.JSON? { __data["params"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCopilotPinnedSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotPinnedSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotPinnedSessions($workspaceId: String!, $docId: String, $messageOrder: ChatHistoryOrder, $withPrompt: Boolean) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats( pagination: { first: 1 } docId: $docId options: { pinned: true, messageOrder: $messageOrder, withPrompt: $withPrompt } ) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var messageOrder: GraphQLNullable<GraphQLEnum<ChatHistoryOrder>>
|
||||
public var withPrompt: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: GraphQLNullable<String>,
|
||||
messageOrder: GraphQLNullable<GraphQLEnum<ChatHistoryOrder>>,
|
||||
withPrompt: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.messageOrder = messageOrder
|
||||
self.withPrompt = withPrompt
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"messageOrder": messageOrder,
|
||||
"withPrompt": withPrompt
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("currentUser", CurrentUser?.self),
|
||||
] }
|
||||
|
||||
/// Get current user
|
||||
public var currentUser: CurrentUser? { __data["currentUser"] }
|
||||
|
||||
/// CurrentUser
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct CurrentUser: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("copilot", Copilot.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
public var copilot: Copilot { __data["copilot"] }
|
||||
|
||||
/// CurrentUser.Copilot
|
||||
///
|
||||
/// Parent Type: `Copilot`
|
||||
public struct Copilot: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": ["first": 1],
|
||||
"docId": .variable("docId"),
|
||||
"options": [
|
||||
"pinned": true,
|
||||
"messageOrder": .variable("messageOrder"),
|
||||
"withPrompt": .variable("withPrompt")
|
||||
]
|
||||
]),
|
||||
] }
|
||||
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,8 @@ public class GetCopilotRecentSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotRecentSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename histories(options: { limit: $limit, sessionOrder: desc }) { __typename sessionId workspaceId docId pinned action tokens createdAt updatedAt } } } }"#
|
||||
#"query getCopilotRecentSessions($workspaceId: String!, $limit: Int = 10) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats( pagination: { first: $limit } options: { fork: false, sessionOrder: desc, withMessages: true } ) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
@@ -63,44 +64,44 @@ public class GetCopilotRecentSessionsQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("histories", [History].self, arguments: ["options": [
|
||||
"limit": .variable("limit"),
|
||||
"sessionOrder": "desc"
|
||||
]]),
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": ["first": .variable("limit")],
|
||||
"options": [
|
||||
"fork": false,
|
||||
"sessionOrder": "desc",
|
||||
"withMessages": true
|
||||
]
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotHistories }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionId", String.self),
|
||||
.field("workspaceId", String.self),
|
||||
.field("docId", String?.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("action", String?.self),
|
||||
.field("tokens", Int.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
/// An mark identifying which view to use to display the session
|
||||
public var action: String? { __data["action"] }
|
||||
/// The number of tokens used in the session
|
||||
public var tokens: Int { __data["tokens"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ public class GetCopilotSessionQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotSession($workspaceId: String!, $sessionId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename session(sessionId: $sessionId) { __typename id parentSessionId docId pinned promptName model optionalModels } } } }"#
|
||||
#"query getCopilotSession($workspaceId: String!, $sessionId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: { first: 1 }, options: { sessionId: $sessionId }) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
@@ -63,38 +64,40 @@ public class GetCopilotSessionQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("session", Session.self, arguments: ["sessionId": .variable("sessionId")]),
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": ["first": 1],
|
||||
"options": ["sessionId": .variable("sessionId")]
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Get the session by id
|
||||
public var session: Session { __data["session"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.Session
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotSessionType`
|
||||
public struct Session: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotSessionType }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("parentSessionId", AffineGraphQL.ID?.self),
|
||||
.field("docId", String?.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("promptName", String.self),
|
||||
.field("model", String.self),
|
||||
.field("optionalModels", [String].self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var parentSessionId: AffineGraphQL.ID? { __data["parentSessionId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var promptName: String { __data["promptName"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var optionalModels: [String] { __data["optionalModels"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,25 +7,30 @@ public class GetCopilotSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotSessions($workspaceId: String!, $docId: String, $options: QueryChatSessionsInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename sessions(docId: $docId, options: $options) { __typename id parentSessionId docId pinned promptName model optionalModels } } } }"#
|
||||
#"query getCopilotSessions($workspaceId: String!, $pagination: PaginationInput!, $docId: String, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: $pagination, docId: $docId, options: $options) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pagination: PaginationInput
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var options: GraphQLNullable<QueryChatSessionsInput>
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pagination: PaginationInput,
|
||||
docId: GraphQLNullable<String>,
|
||||
options: GraphQLNullable<QueryChatSessionsInput>
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pagination = pagination
|
||||
self.docId = docId
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pagination": pagination,
|
||||
"docId": docId,
|
||||
"options": options
|
||||
] }
|
||||
@@ -67,41 +72,41 @@ public class GetCopilotSessionsQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessions", [Session].self, arguments: [
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": .variable("pagination"),
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Get the session list in the workspace
|
||||
public var sessions: [Session] { __data["sessions"] }
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.Session
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `CopilotSessionType`
|
||||
public struct Session: AffineGraphQL.SelectionSet {
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotSessionType }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("parentSessionId", AffineGraphQL.ID?.self),
|
||||
.field("docId", String?.self),
|
||||
.field("pinned", Bool.self),
|
||||
.field("promptName", String.self),
|
||||
.field("model", String.self),
|
||||
.field("optionalModels", [String].self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var parentSessionId: AffineGraphQL.ID? { __data["parentSessionId"] }
|
||||
public var docId: String? { __data["docId"] }
|
||||
public var pinned: Bool { __data["pinned"] }
|
||||
public var promptName: String { __data["promptName"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var optionalModels: [String] { __data["optionalModels"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCopilotWorkspaceSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotWorkspaceSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotWorkspaceSessions($workspaceId: String!, $pagination: PaginationInput!, $options: QueryChatHistoriesInput) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename chats(pagination: $pagination, docId: null, options: $options) { __typename ...PaginatedCopilotChats } } } }"#,
|
||||
fragments: [CopilotChatHistory.self, CopilotChatMessage.self, PaginatedCopilotChats.self]
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pagination: PaginationInput
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pagination: PaginationInput,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pagination = pagination
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pagination": pagination,
|
||||
"options": options
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("currentUser", CurrentUser?.self),
|
||||
] }
|
||||
|
||||
/// Get current user
|
||||
public var currentUser: CurrentUser? { __data["currentUser"] }
|
||||
|
||||
/// CurrentUser
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct CurrentUser: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("copilot", Copilot.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
public var copilot: Copilot { __data["copilot"] }
|
||||
|
||||
/// CurrentUser.Copilot
|
||||
///
|
||||
/// Parent Type: `Copilot`
|
||||
public struct Copilot: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("chats", Chats.self, arguments: [
|
||||
"pagination": .variable("pagination"),
|
||||
"docId": .null,
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var chats: Chats { __data["chats"] }
|
||||
|
||||
/// CurrentUser.Copilot.Chats
|
||||
///
|
||||
/// Parent Type: `PaginatedCopilotHistoriesType`
|
||||
public struct Chats: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCopilotHistoriesType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(PaginatedCopilotChats.self),
|
||||
] }
|
||||
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var paginatedCopilotChats: PaginatedCopilotChats { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias PageInfo = PaginatedCopilotChats.PageInfo
|
||||
|
||||
public typealias Edge = PaginatedCopilotChats.Edge
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ public class GetDocRolePermissionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getDocRolePermissions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getDocRolePermissions($workspaceId: String!, $docId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $docId) { __typename permissions { __typename Doc_Copy Doc_Delete Doc_Duplicate Doc_Properties_Read Doc_Properties_Update Doc_Publish Doc_Read Doc_Restore Doc_TransferOwner Doc_Trash Doc_Update Doc_Users_Manage Doc_Users_Read } } } }"#
|
||||
#"query getDocRolePermissions($workspaceId: String!, $docId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $docId) { __typename permissions { __typename Doc_Copy Doc_Delete Doc_Duplicate Doc_Properties_Read Doc_Properties_Update Doc_Publish Doc_Read Doc_Restore Doc_TransferOwner Doc_Trash Doc_Update Doc_Users_Manage Doc_Users_Read Doc_Comments_Create Doc_Comments_Delete Doc_Comments_Read Doc_Comments_Resolve } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
@@ -92,6 +92,10 @@ public class GetDocRolePermissionsQuery: GraphQLQuery {
|
||||
.field("Doc_Update", Bool.self),
|
||||
.field("Doc_Users_Manage", Bool.self),
|
||||
.field("Doc_Users_Read", Bool.self),
|
||||
.field("Doc_Comments_Create", Bool.self),
|
||||
.field("Doc_Comments_Delete", Bool.self),
|
||||
.field("Doc_Comments_Read", Bool.self),
|
||||
.field("Doc_Comments_Resolve", Bool.self),
|
||||
] }
|
||||
|
||||
public var doc_Copy: Bool { __data["Doc_Copy"] }
|
||||
@@ -107,6 +111,10 @@ public class GetDocRolePermissionsQuery: GraphQLQuery {
|
||||
public var doc_Update: Bool { __data["Doc_Update"] }
|
||||
public var doc_Users_Manage: Bool { __data["Doc_Users_Manage"] }
|
||||
public var doc_Users_Read: Bool { __data["Doc_Users_Read"] }
|
||||
public var doc_Comments_Create: Bool { __data["Doc_Comments_Create"] }
|
||||
public var doc_Comments_Delete: Bool { __data["Doc_Comments_Delete"] }
|
||||
public var doc_Comments_Read: Bool { __data["Doc_Comments_Read"] }
|
||||
public var doc_Comments_Resolve: Bool { __data["Doc_Comments_Resolve"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public class GetUserSettingsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getUserSettings"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getUserSettings { currentUser { __typename settings { __typename receiveInvitationEmail receiveMentionEmail } } }"#
|
||||
#"query getUserSettings { currentUser { __typename settings { __typename receiveInvitationEmail receiveMentionEmail receiveCommentEmail } } }"#
|
||||
))
|
||||
|
||||
public init() {}
|
||||
@@ -52,12 +52,15 @@ public class GetUserSettingsQuery: GraphQLQuery {
|
||||
.field("__typename", String.self),
|
||||
.field("receiveInvitationEmail", Bool.self),
|
||||
.field("receiveMentionEmail", Bool.self),
|
||||
.field("receiveCommentEmail", Bool.self),
|
||||
] }
|
||||
|
||||
/// Receive invitation email
|
||||
public var receiveInvitationEmail: Bool { __data["receiveInvitationEmail"] }
|
||||
/// Receive mention email
|
||||
public var receiveMentionEmail: Bool { __data["receiveMentionEmail"] }
|
||||
/// Receive comment email
|
||||
public var receiveCommentEmail: Bool { __data["receiveCommentEmail"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListCommentChangesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listCommentChanges"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listCommentChanges($workspaceId: String!, $docId: String!, $pagination: PaginationInput!) { workspace(id: $workspaceId) { __typename commentChanges(docId: $docId, pagination: $pagination) { __typename totalCount edges { __typename cursor node { __typename action id commentId item } } pageInfo { __typename startCursor endCursor hasNextPage hasPreviousPage } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
public var pagination: PaginationInput
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String,
|
||||
pagination: PaginationInput
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.pagination = pagination
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"pagination": pagination
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
/// Get workspace by id
|
||||
public var workspace: Workspace { __data["workspace"] }
|
||||
|
||||
/// Workspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct Workspace: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("commentChanges", CommentChanges.self, arguments: [
|
||||
"docId": .variable("docId"),
|
||||
"pagination": .variable("pagination")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Get comment changes of a doc
|
||||
public var commentChanges: CommentChanges { __data["commentChanges"] }
|
||||
|
||||
/// Workspace.CommentChanges
|
||||
///
|
||||
/// Parent Type: `PaginatedCommentChangeObjectType`
|
||||
public struct CommentChanges: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCommentChangeObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("totalCount", Int.self),
|
||||
.field("edges", [Edge].self),
|
||||
.field("pageInfo", PageInfo.self),
|
||||
] }
|
||||
|
||||
public var totalCount: Int { __data["totalCount"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
|
||||
/// Workspace.CommentChanges.Edge
|
||||
///
|
||||
/// Parent Type: `CommentChangeObjectTypeEdge`
|
||||
public struct Edge: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CommentChangeObjectTypeEdge }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("cursor", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
|
||||
public var cursor: String { __data["cursor"] }
|
||||
public var node: Node { __data["node"] }
|
||||
|
||||
/// Workspace.CommentChanges.Edge.Node
|
||||
///
|
||||
/// Parent Type: `CommentChangeObjectType`
|
||||
public struct Node: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CommentChangeObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("action", GraphQLEnum<AffineGraphQL.CommentChangeAction>.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("commentId", AffineGraphQL.ID?.self),
|
||||
.field("item", AffineGraphQL.JSONObject.self),
|
||||
] }
|
||||
|
||||
/// The action of the comment change
|
||||
public var action: GraphQLEnum<AffineGraphQL.CommentChangeAction> { __data["action"] }
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var commentId: AffineGraphQL.ID? { __data["commentId"] }
|
||||
/// The item of the comment or reply, different types have different fields, see UnionCommentObjectType
|
||||
public var item: AffineGraphQL.JSONObject { __data["item"] }
|
||||
}
|
||||
}
|
||||
|
||||
/// Workspace.CommentChanges.PageInfo
|
||||
///
|
||||
/// Parent Type: `PageInfo`
|
||||
public struct PageInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PageInfo }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("startCursor", String?.self),
|
||||
.field("endCursor", String?.self),
|
||||
.field("hasNextPage", Bool.self),
|
||||
.field("hasPreviousPage", Bool.self),
|
||||
] }
|
||||
|
||||
public var startCursor: String? { __data["startCursor"] }
|
||||
public var endCursor: String? { __data["endCursor"] }
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListCommentsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listComments"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listComments($workspaceId: String!, $docId: String!, $pagination: PaginationInput) { workspace(id: $workspaceId) { __typename comments(docId: $docId, pagination: $pagination) { __typename totalCount edges { __typename cursor node { __typename id content resolved createdAt updatedAt user { __typename id name avatarUrl } replies { __typename commentId id content createdAt updatedAt user { __typename id name avatarUrl } } } } pageInfo { __typename startCursor endCursor hasNextPage hasPreviousPage } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
public var pagination: GraphQLNullable<PaginationInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String,
|
||||
pagination: GraphQLNullable<PaginationInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.pagination = pagination
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"pagination": pagination
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
/// Get workspace by id
|
||||
public var workspace: Workspace { __data["workspace"] }
|
||||
|
||||
/// Workspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct Workspace: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("comments", Comments.self, arguments: [
|
||||
"docId": .variable("docId"),
|
||||
"pagination": .variable("pagination")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Get comments of a doc
|
||||
public var comments: Comments { __data["comments"] }
|
||||
|
||||
/// Workspace.Comments
|
||||
///
|
||||
/// Parent Type: `PaginatedCommentObjectType`
|
||||
public struct Comments: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedCommentObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("totalCount", Int.self),
|
||||
.field("edges", [Edge].self),
|
||||
.field("pageInfo", PageInfo.self),
|
||||
] }
|
||||
|
||||
public var totalCount: Int { __data["totalCount"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
|
||||
/// Workspace.Comments.Edge
|
||||
///
|
||||
/// Parent Type: `CommentObjectTypeEdge`
|
||||
public struct Edge: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CommentObjectTypeEdge }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("cursor", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
|
||||
public var cursor: String { __data["cursor"] }
|
||||
public var node: Node { __data["node"] }
|
||||
|
||||
/// Workspace.Comments.Edge.Node
|
||||
///
|
||||
/// Parent Type: `CommentObjectType`
|
||||
public struct Node: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CommentObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("content", AffineGraphQL.JSONObject.self),
|
||||
.field("resolved", Bool.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("user", User.self),
|
||||
.field("replies", [Reply].self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// The content of the comment
|
||||
public var content: AffineGraphQL.JSONObject { __data["content"] }
|
||||
/// Whether the comment is resolved
|
||||
public var resolved: Bool { __data["resolved"] }
|
||||
/// The created at time of the comment
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// The updated at time of the comment
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
/// The user who created the comment
|
||||
public var user: User { __data["user"] }
|
||||
/// The replies of the comment
|
||||
public var replies: [Reply] { __data["replies"] }
|
||||
|
||||
/// Workspace.Comments.Edge.Node.User
|
||||
///
|
||||
/// Parent Type: `PublicUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PublicUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
|
||||
/// Workspace.Comments.Edge.Node.Reply
|
||||
///
|
||||
/// Parent Type: `ReplyObjectType`
|
||||
public struct Reply: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ReplyObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("commentId", AffineGraphQL.ID.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("content", AffineGraphQL.JSONObject.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("user", User.self),
|
||||
] }
|
||||
|
||||
public var commentId: AffineGraphQL.ID { __data["commentId"] }
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// The content of the reply
|
||||
public var content: AffineGraphQL.JSONObject { __data["content"] }
|
||||
/// The created at time of the reply
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// The updated at time of the reply
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
/// The user who created the reply
|
||||
public var user: User { __data["user"] }
|
||||
|
||||
/// Workspace.Comments.Edge.Node.Reply.User
|
||||
///
|
||||
/// Parent Type: `PublicUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PublicUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Workspace.Comments.PageInfo
|
||||
///
|
||||
/// Parent Type: `PageInfo`
|
||||
public struct PageInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PageInfo }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("startCursor", String?.self),
|
||||
.field("endCursor", String?.self),
|
||||
.field("hasNextPage", Bool.self),
|
||||
.field("hasPreviousPage", Bool.self),
|
||||
] }
|
||||
|
||||
public var startCursor: String? { __data["startCursor"] }
|
||||
public var endCursor: String? { __data["endCursor"] }
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
/// Comment change action
|
||||
public enum CommentChangeAction: String, EnumType {
|
||||
case delete = "delete"
|
||||
case update = "update"
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import ApolloAPI
|
||||
|
||||
/// User permission in doc
|
||||
public enum DocRole: String, EnumType {
|
||||
case commenter = "Commenter"
|
||||
case editor = "Editor"
|
||||
case external = "External"
|
||||
case manager = "Manager"
|
||||
|
||||
@@ -5,6 +5,8 @@ import ApolloAPI
|
||||
|
||||
/// Notification type
|
||||
public enum NotificationType: String, EnumType {
|
||||
case comment = "Comment"
|
||||
case commentMention = "CommentMention"
|
||||
case invitation = "Invitation"
|
||||
case invitationAccepted = "InvitationAccepted"
|
||||
case invitationBlocked = "InvitationBlocked"
|
||||
|
||||
@@ -5,9 +5,11 @@ import ApolloAPI
|
||||
|
||||
public enum ServerFeature: String, EnumType {
|
||||
case captcha = "Captcha"
|
||||
case comment = "Comment"
|
||||
case copilot = "Copilot"
|
||||
case copilotEmbedding = "CopilotEmbedding"
|
||||
case indexer = "Indexer"
|
||||
case localWorkspace = "LocalWorkspace"
|
||||
case oAuth = "OAuth"
|
||||
case payment = "Payment"
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public struct AddContextFileInput: InputObject {
|
||||
}
|
||||
|
||||
public init(
|
||||
blobId: String,
|
||||
blobId: GraphQLNullable<String> = nil,
|
||||
contextId: String
|
||||
) {
|
||||
__data = InputDict([
|
||||
@@ -20,7 +20,7 @@ public struct AddContextFileInput: InputObject {
|
||||
])
|
||||
}
|
||||
|
||||
public var blobId: String {
|
||||
public var blobId: GraphQLNullable<String> {
|
||||
get { __data["blobId"] }
|
||||
set { __data["blobId"] = newValue }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct CommentCreateInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
content: JSONObject,
|
||||
docId: ID,
|
||||
docMode: GraphQLEnum<DocMode>,
|
||||
docTitle: String,
|
||||
mentions: GraphQLNullable<[String]> = nil,
|
||||
workspaceId: ID
|
||||
) {
|
||||
__data = InputDict([
|
||||
"content": content,
|
||||
"docId": docId,
|
||||
"docMode": docMode,
|
||||
"docTitle": docTitle,
|
||||
"mentions": mentions,
|
||||
"workspaceId": workspaceId
|
||||
])
|
||||
}
|
||||
|
||||
public var content: JSONObject {
|
||||
get { __data["content"] }
|
||||
set { __data["content"] = newValue }
|
||||
}
|
||||
|
||||
public var docId: ID {
|
||||
get { __data["docId"] }
|
||||
set { __data["docId"] = newValue }
|
||||
}
|
||||
|
||||
public var docMode: GraphQLEnum<DocMode> {
|
||||
get { __data["docMode"] }
|
||||
set { __data["docMode"] = newValue }
|
||||
}
|
||||
|
||||
public var docTitle: String {
|
||||
get { __data["docTitle"] }
|
||||
set { __data["docTitle"] = newValue }
|
||||
}
|
||||
|
||||
/// The mention user ids, if not provided, the comment will not be mentioned
|
||||
public var mentions: GraphQLNullable<[String]> {
|
||||
get { __data["mentions"] }
|
||||
set { __data["mentions"] = newValue }
|
||||
}
|
||||
|
||||
public var workspaceId: ID {
|
||||
get { __data["workspaceId"] }
|
||||
set { __data["workspaceId"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct CommentResolveInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
id: ID,
|
||||
resolved: Bool
|
||||
) {
|
||||
__data = InputDict([
|
||||
"id": id,
|
||||
"resolved": resolved
|
||||
])
|
||||
}
|
||||
|
||||
public var id: ID {
|
||||
get { __data["id"] }
|
||||
set { __data["id"] = newValue }
|
||||
}
|
||||
|
||||
/// Whether the comment is resolved
|
||||
public var resolved: Bool {
|
||||
get { __data["resolved"] }
|
||||
set { __data["resolved"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct CommentUpdateInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
content: JSONObject,
|
||||
id: ID
|
||||
) {
|
||||
__data = InputDict([
|
||||
"content": content,
|
||||
"id": id
|
||||
])
|
||||
}
|
||||
|
||||
public var content: JSONObject {
|
||||
get { __data["content"] }
|
||||
set { __data["content"] = newValue }
|
||||
}
|
||||
|
||||
public var id: ID {
|
||||
get { __data["id"] }
|
||||
set { __data["id"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -14,12 +14,14 @@ public struct CreateChatSessionInput: InputObject {
|
||||
docId: GraphQLNullable<String> = nil,
|
||||
pinned: GraphQLNullable<Bool> = nil,
|
||||
promptName: String,
|
||||
reuseLatestChat: GraphQLNullable<Bool> = nil,
|
||||
workspaceId: String
|
||||
) {
|
||||
__data = InputDict([
|
||||
"docId": docId,
|
||||
"pinned": pinned,
|
||||
"promptName": promptName,
|
||||
"reuseLatestChat": reuseLatestChat,
|
||||
"workspaceId": workspaceId
|
||||
])
|
||||
}
|
||||
@@ -40,6 +42,12 @@ public struct CreateChatSessionInput: InputObject {
|
||||
set { __data["promptName"] = newValue }
|
||||
}
|
||||
|
||||
/// true by default, compliant for old version
|
||||
public var reuseLatestChat: GraphQLNullable<Bool> {
|
||||
get { __data["reuseLatestChat"] }
|
||||
set { __data["reuseLatestChat"] = newValue }
|
||||
}
|
||||
|
||||
public var workspaceId: String {
|
||||
get { __data["workspaceId"] }
|
||||
set { __data["workspaceId"] = newValue }
|
||||
|
||||
@@ -19,6 +19,7 @@ public struct QueryChatHistoriesInput: InputObject {
|
||||
sessionId: GraphQLNullable<String> = nil,
|
||||
sessionOrder: GraphQLNullable<GraphQLEnum<ChatHistoryOrder>> = nil,
|
||||
skip: GraphQLNullable<Int> = nil,
|
||||
withMessages: GraphQLNullable<Bool> = nil,
|
||||
withPrompt: GraphQLNullable<Bool> = nil
|
||||
) {
|
||||
__data = InputDict([
|
||||
@@ -30,6 +31,7 @@ public struct QueryChatHistoriesInput: InputObject {
|
||||
"sessionId": sessionId,
|
||||
"sessionOrder": sessionOrder,
|
||||
"skip": skip,
|
||||
"withMessages": withMessages,
|
||||
"withPrompt": withPrompt
|
||||
])
|
||||
}
|
||||
@@ -74,6 +76,11 @@ public struct QueryChatHistoriesInput: InputObject {
|
||||
set { __data["skip"] = newValue }
|
||||
}
|
||||
|
||||
public var withMessages: GraphQLNullable<Bool> {
|
||||
get { __data["withMessages"] }
|
||||
set { __data["withMessages"] = newValue }
|
||||
}
|
||||
|
||||
public var withPrompt: GraphQLNullable<Bool> {
|
||||
get { __data["withPrompt"] }
|
||||
set { __data["withPrompt"] = newValue }
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct QueryChatSessionsInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
action: GraphQLNullable<Bool> = nil,
|
||||
fork: GraphQLNullable<Bool> = nil,
|
||||
limit: GraphQLNullable<Int> = nil,
|
||||
pinned: GraphQLNullable<Bool> = nil,
|
||||
skip: GraphQLNullable<Int> = nil
|
||||
) {
|
||||
__data = InputDict([
|
||||
"action": action,
|
||||
"fork": fork,
|
||||
"limit": limit,
|
||||
"pinned": pinned,
|
||||
"skip": skip
|
||||
])
|
||||
}
|
||||
|
||||
public var action: GraphQLNullable<Bool> {
|
||||
get { __data["action"] }
|
||||
set { __data["action"] = newValue }
|
||||
}
|
||||
|
||||
public var fork: GraphQLNullable<Bool> {
|
||||
get { __data["fork"] }
|
||||
set { __data["fork"] = newValue }
|
||||
}
|
||||
|
||||
public var limit: GraphQLNullable<Int> {
|
||||
get { __data["limit"] }
|
||||
set { __data["limit"] = newValue }
|
||||
}
|
||||
|
||||
public var pinned: GraphQLNullable<Bool> {
|
||||
get { __data["pinned"] }
|
||||
set { __data["pinned"] = newValue }
|
||||
}
|
||||
|
||||
public var skip: GraphQLNullable<Int> {
|
||||
get { __data["skip"] }
|
||||
set { __data["skip"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct ReplyCreateInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
commentId: ID,
|
||||
content: JSONObject,
|
||||
docMode: GraphQLEnum<DocMode>,
|
||||
docTitle: String,
|
||||
mentions: GraphQLNullable<[String]> = nil
|
||||
) {
|
||||
__data = InputDict([
|
||||
"commentId": commentId,
|
||||
"content": content,
|
||||
"docMode": docMode,
|
||||
"docTitle": docTitle,
|
||||
"mentions": mentions
|
||||
])
|
||||
}
|
||||
|
||||
public var commentId: ID {
|
||||
get { __data["commentId"] }
|
||||
set { __data["commentId"] = newValue }
|
||||
}
|
||||
|
||||
public var content: JSONObject {
|
||||
get { __data["content"] }
|
||||
set { __data["content"] = newValue }
|
||||
}
|
||||
|
||||
public var docMode: GraphQLEnum<DocMode> {
|
||||
get { __data["docMode"] }
|
||||
set { __data["docMode"] = newValue }
|
||||
}
|
||||
|
||||
public var docTitle: String {
|
||||
get { __data["docTitle"] }
|
||||
set { __data["docTitle"] = newValue }
|
||||
}
|
||||
|
||||
/// The mention user ids, if not provided, the comment reply will not be mentioned
|
||||
public var mentions: GraphQLNullable<[String]> {
|
||||
get { __data["mentions"] }
|
||||
set { __data["mentions"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct ReplyUpdateInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
content: JSONObject,
|
||||
id: ID
|
||||
) {
|
||||
__data = InputDict([
|
||||
"content": content,
|
||||
"id": id
|
||||
])
|
||||
}
|
||||
|
||||
public var content: JSONObject {
|
||||
get { __data["content"] }
|
||||
set { __data["content"] = newValue }
|
||||
}
|
||||
|
||||
public var id: ID {
|
||||
get { __data["id"] }
|
||||
set { __data["id"] = newValue }
|
||||
}
|
||||
}
|
||||
@@ -11,15 +11,23 @@ public struct UpdateUserSettingsInput: InputObject {
|
||||
}
|
||||
|
||||
public init(
|
||||
receiveCommentEmail: GraphQLNullable<Bool> = nil,
|
||||
receiveInvitationEmail: GraphQLNullable<Bool> = nil,
|
||||
receiveMentionEmail: GraphQLNullable<Bool> = nil
|
||||
) {
|
||||
__data = InputDict([
|
||||
"receiveCommentEmail": receiveCommentEmail,
|
||||
"receiveInvitationEmail": receiveInvitationEmail,
|
||||
"receiveMentionEmail": receiveMentionEmail
|
||||
])
|
||||
}
|
||||
|
||||
/// Receive comment email
|
||||
public var receiveCommentEmail: GraphQLNullable<Bool> {
|
||||
get { __data["receiveCommentEmail"] }
|
||||
set { __data["receiveCommentEmail"] = newValue }
|
||||
}
|
||||
|
||||
/// Receive invitation email
|
||||
public var receiveInvitationEmail: GraphQLNullable<Bool> {
|
||||
get { __data["receiveInvitationEmail"] }
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let CommentChangeObjectType = ApolloAPI.Object(
|
||||
typename: "CommentChangeObjectType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let CommentChangeObjectTypeEdge = ApolloAPI.Object(
|
||||
typename: "CommentChangeObjectTypeEdge",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -4,8 +4,8 @@
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let CopilotSessionType = ApolloAPI.Object(
|
||||
typename: "CopilotSessionType",
|
||||
static let CommentObjectType = ApolloAPI.Object(
|
||||
typename: "CommentObjectType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let CommentObjectTypeEdge = ApolloAPI.Object(
|
||||
typename: "CommentObjectTypeEdge",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let CopilotHistoriesTypeEdge = ApolloAPI.Object(
|
||||
typename: "CopilotHistoriesTypeEdge",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let PaginatedCommentChangeObjectType = ApolloAPI.Object(
|
||||
typename: "PaginatedCommentChangeObjectType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let PaginatedCommentObjectType = ApolloAPI.Object(
|
||||
typename: "PaginatedCommentObjectType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let PaginatedCopilotHistoriesType = ApolloAPI.Object(
|
||||
typename: "PaginatedCopilotHistoriesType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let ReplyObjectType = ApolloAPI.Object(
|
||||
typename: "ReplyObjectType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
@@ -25,6 +25,10 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "AggregateResultObjectType": return AffineGraphQL.Objects.AggregateResultObjectType
|
||||
case "AppConfigValidateResult": return AffineGraphQL.Objects.AppConfigValidateResult
|
||||
case "ChatMessage": return AffineGraphQL.Objects.ChatMessage
|
||||
case "CommentChangeObjectType": return AffineGraphQL.Objects.CommentChangeObjectType
|
||||
case "CommentChangeObjectTypeEdge": return AffineGraphQL.Objects.CommentChangeObjectTypeEdge
|
||||
case "CommentObjectType": return AffineGraphQL.Objects.CommentObjectType
|
||||
case "CommentObjectTypeEdge": return AffineGraphQL.Objects.CommentObjectTypeEdge
|
||||
case "ContextMatchedDocChunk": return AffineGraphQL.Objects.ContextMatchedDocChunk
|
||||
case "ContextMatchedFileChunk": return AffineGraphQL.Objects.ContextMatchedFileChunk
|
||||
case "ContextWorkspaceEmbeddingStatus": return AffineGraphQL.Objects.ContextWorkspaceEmbeddingStatus
|
||||
@@ -35,11 +39,11 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "CopilotContextFile": return AffineGraphQL.Objects.CopilotContextFile
|
||||
case "CopilotDocType": return AffineGraphQL.Objects.CopilotDocType
|
||||
case "CopilotHistories": return AffineGraphQL.Objects.CopilotHistories
|
||||
case "CopilotHistoriesTypeEdge": return AffineGraphQL.Objects.CopilotHistoriesTypeEdge
|
||||
case "CopilotPromptConfigType": return AffineGraphQL.Objects.CopilotPromptConfigType
|
||||
case "CopilotPromptMessageType": return AffineGraphQL.Objects.CopilotPromptMessageType
|
||||
case "CopilotPromptType": return AffineGraphQL.Objects.CopilotPromptType
|
||||
case "CopilotQuota": return AffineGraphQL.Objects.CopilotQuota
|
||||
case "CopilotSessionType": return AffineGraphQL.Objects.CopilotSessionType
|
||||
case "CopilotWorkspaceConfig": return AffineGraphQL.Objects.CopilotWorkspaceConfig
|
||||
case "CopilotWorkspaceFile": return AffineGraphQL.Objects.CopilotWorkspaceFile
|
||||
case "CopilotWorkspaceFileTypeEdge": return AffineGraphQL.Objects.CopilotWorkspaceFileTypeEdge
|
||||
@@ -67,6 +71,9 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "NotificationObjectType": return AffineGraphQL.Objects.NotificationObjectType
|
||||
case "NotificationObjectTypeEdge": return AffineGraphQL.Objects.NotificationObjectTypeEdge
|
||||
case "PageInfo": return AffineGraphQL.Objects.PageInfo
|
||||
case "PaginatedCommentChangeObjectType": return AffineGraphQL.Objects.PaginatedCommentChangeObjectType
|
||||
case "PaginatedCommentObjectType": return AffineGraphQL.Objects.PaginatedCommentObjectType
|
||||
case "PaginatedCopilotHistoriesType": return AffineGraphQL.Objects.PaginatedCopilotHistoriesType
|
||||
case "PaginatedCopilotWorkspaceFileType": return AffineGraphQL.Objects.PaginatedCopilotWorkspaceFileType
|
||||
case "PaginatedDocType": return AffineGraphQL.Objects.PaginatedDocType
|
||||
case "PaginatedGrantedDocUserType": return AffineGraphQL.Objects.PaginatedGrantedDocUserType
|
||||
@@ -77,6 +84,7 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "Query": return AffineGraphQL.Objects.Query
|
||||
case "ReleaseVersionType": return AffineGraphQL.Objects.ReleaseVersionType
|
||||
case "RemoveAvatar": return AffineGraphQL.Objects.RemoveAvatar
|
||||
case "ReplyObjectType": return AffineGraphQL.Objects.ReplyObjectType
|
||||
case "SearchDocObjectType": return AffineGraphQL.Objects.SearchDocObjectType
|
||||
case "SearchNodeObjectType": return AffineGraphQL.Objects.SearchNodeObjectType
|
||||
case "SearchResultObjectType": return AffineGraphQL.Objects.SearchResultObjectType
|
||||
|
||||
@@ -33,7 +33,7 @@ extension ChatManager {
|
||||
append(sessionId: sessionId, UserMessageCellViewModel(
|
||||
id: .init(),
|
||||
content: inputBoxData.text,
|
||||
timestamp: .init(),
|
||||
timestamp: .init()
|
||||
))
|
||||
append(sessionId: sessionId, UserHintCellViewModel(
|
||||
id: .init(),
|
||||
|
||||
@@ -55,7 +55,7 @@ class AssistantMessageCell: ChatBaseCell {
|
||||
)
|
||||
markdownViewForSizeCalculation.setMarkdown(
|
||||
vm.documentBlocks,
|
||||
renderedContent: vm.documentRenderedContent,
|
||||
renderedContent: vm.documentRenderedContent
|
||||
)
|
||||
let boundingSize = markdownViewForSizeCalculation.boundingSize(for: width)
|
||||
return ceil(boundingSize.height)
|
||||
|
||||
Reference in New Issue
Block a user