feat(mobile): adapt new endpoint (#14778)
#### PR Dependency Tree * **PR #14778** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
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 }"#
|
||||
#"fragment CopilotChatHistory on CopilotHistories { __typename sessionId workspaceId docId parentSessionId promptName model optionalModels action pinned title tokens messages { __typename id role content attachments streamObjects { __typename type textDelta toolCallId toolName args result } createdAt } createdAt updatedAt }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
@@ -29,6 +29,9 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CopilotChatHistory.self
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
@@ -57,7 +60,15 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ChatMessage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(CopilotChatMessage.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 static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CopilotChatHistory.Message.self
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID? { __data["id"] }
|
||||
@@ -67,13 +78,33 @@ public struct CopilotChatHistory: AffineGraphQL.SelectionSet, Fragment {
|
||||
public var streamObjects: [StreamObject]? { __data["streamObjects"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
/// Message.StreamObject
|
||||
///
|
||||
/// Parent Type: `StreamObject`
|
||||
public struct StreamObject: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var copilotChatMessage: CopilotChatMessage { _toFragment() }
|
||||
}
|
||||
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 static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CopilotChatHistory.Message.StreamObject.self
|
||||
] }
|
||||
|
||||
public typealias StreamObject = CopilotChatMessage.StreamObject
|
||||
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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
// @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"] }
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,9 @@ public struct CredentialsRequirements: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("__typename", String.self),
|
||||
.field("password", Password.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CredentialsRequirements.self
|
||||
] }
|
||||
|
||||
public var password: Password { __data["password"] }
|
||||
|
||||
@@ -31,6 +34,10 @@ public struct CredentialsRequirements: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("__typename", String.self),
|
||||
.fragment(PasswordLimits.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CredentialsRequirements.Password.self,
|
||||
PasswordLimits.self
|
||||
] }
|
||||
|
||||
public var minLength: Int { __data["minLength"] }
|
||||
public var maxLength: Int { __data["maxLength"] }
|
||||
|
||||
@@ -25,6 +25,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("quotaUsage", QuotaUsage.self),
|
||||
.field("copilot", Copilot.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.self
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
@@ -57,6 +60,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("receiveMentionEmail", Bool.self),
|
||||
.field("receiveCommentEmail", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Settings.self
|
||||
] }
|
||||
|
||||
/// Receive invitation email
|
||||
public var receiveInvitationEmail: Bool { __data["receiveInvitationEmail"] }
|
||||
@@ -83,6 +89,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("memberLimit", Int.self),
|
||||
.field("humanReadable", HumanReadable.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Quota.self
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: AffineGraphQL.SafeInt { __data["blobLimit"] }
|
||||
@@ -107,6 +116,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("historyPeriod", String.self),
|
||||
.field("memberLimit", String.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Quota.HumanReadable.self
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: String { __data["blobLimit"] }
|
||||
@@ -128,6 +140,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("__typename", String.self),
|
||||
.field("storageQuota", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.QuotaUsage.self
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "use `UserQuotaType[\'usedStorageQuota\']` instead")
|
||||
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
|
||||
@@ -145,6 +160,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("__typename", String.self),
|
||||
.field("quota", Quota.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Copilot.self
|
||||
] }
|
||||
|
||||
/// Get the quota of the user in the workspace
|
||||
public var quota: Quota { __data["quota"] }
|
||||
@@ -162,6 +180,9 @@ public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("limit", AffineGraphQL.SafeInt?.self),
|
||||
.field("used", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Copilot.Quota.self
|
||||
] }
|
||||
|
||||
public var limit: AffineGraphQL.SafeInt? { __data["limit"] }
|
||||
public var used: AffineGraphQL.SafeInt { __data["used"] }
|
||||
|
||||
@@ -21,6 +21,9 @@ public struct LicenseBody: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("validatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("variant", GraphQLEnum<AffineGraphQL.SubscriptionVariant>?.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
LicenseBody.self
|
||||
] }
|
||||
|
||||
public var expiredAt: AffineGraphQL.DateTime? { __data["expiredAt"] }
|
||||
public var installedAt: AffineGraphQL.DateTime { __data["installedAt"] }
|
||||
|
||||
@@ -17,6 +17,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("pageInfo", PageInfo.self),
|
||||
.field("edges", [Edge].self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
PaginatedCopilotChats.self
|
||||
] }
|
||||
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
@@ -36,6 +39,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("startCursor", String?.self),
|
||||
.field("endCursor", String?.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
PaginatedCopilotChats.PageInfo.self
|
||||
] }
|
||||
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
public var hasPreviousPage: Bool { __data["hasPreviousPage"] }
|
||||
@@ -56,6 +62,9 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("cursor", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
PaginatedCopilotChats.Edge.self
|
||||
] }
|
||||
|
||||
public var cursor: String { __data["cursor"] }
|
||||
public var node: Node { __data["node"] }
|
||||
@@ -72,6 +81,10 @@ public struct PaginatedCopilotChats: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("__typename", String.self),
|
||||
.fragment(CopilotChatHistory.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
PaginatedCopilotChats.Edge.Node.self,
|
||||
CopilotChatHistory.self
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var workspaceId: String { __data["workspaceId"] }
|
||||
|
||||
@@ -17,6 +17,9 @@ public struct PasswordLimits: AffineGraphQL.SelectionSet, Fragment {
|
||||
.field("minLength", Int.self),
|
||||
.field("maxLength", Int.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
PasswordLimits.self
|
||||
] }
|
||||
|
||||
public var minLength: Int { __data["minLength"] }
|
||||
public var maxLength: Int { __data["maxLength"] }
|
||||
|
||||
Reference in New Issue
Block a user