mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
feat(ios): translate & continue to chat & clear history (#11347)
This commit is contained in:
+5
-3
@@ -7,7 +7,7 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "claimAudioTranscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation claimAudioTranscription($jobId: String!) { claimAudioTranscription(jobId: $jobId) { __typename id status transcription { __typename speaker start end transcription } summary } }"#
|
||||
#"mutation claimAudioTranscription($jobId: String!) { claimAudioTranscription(jobId: $jobId) { __typename id status title summary transcription { __typename speaker start end transcription } } }"#
|
||||
))
|
||||
|
||||
public var jobId: String
|
||||
@@ -41,14 +41,16 @@ public class ClaimAudioTranscriptionMutation: GraphQLMutation {
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.AiJobStatus>.self),
|
||||
.field("transcription", [Transcription]?.self),
|
||||
.field("title", String?.self),
|
||||
.field("summary", String?.self),
|
||||
.field("transcription", [Transcription]?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.AiJobStatus> { __data["status"] }
|
||||
public var transcription: [Transcription]? { __data["transcription"] }
|
||||
public var title: String? { __data["title"] }
|
||||
public var summary: String? { __data["summary"] }
|
||||
public var transcription: [Transcription]? { __data["transcription"] }
|
||||
|
||||
/// ClaimAudioTranscription.Transcription
|
||||
///
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateAppConfigMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateAppConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateAppConfig($updates: [UpdateAppConfigInput!]!) { updateAppConfig(updates: $updates) }"#
|
||||
))
|
||||
|
||||
public var updates: [UpdateAppConfigInput]
|
||||
|
||||
public init(updates: [UpdateAppConfigInput]) {
|
||||
self.updates = updates
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["updates": updates] }
|
||||
|
||||
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("updateAppConfig", AffineGraphQL.JSONObject.self, arguments: ["updates": .variable("updates")]),
|
||||
] }
|
||||
|
||||
/// update app configuration
|
||||
public var updateAppConfig: AffineGraphQL.JSONObject { __data["updateAppConfig"] }
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateServerRuntimeConfigsMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateServerRuntimeConfigs"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateServerRuntimeConfigs($updates: JSONObject!) { updateRuntimeConfigs(updates: $updates) { __typename key value } }"#
|
||||
))
|
||||
|
||||
public var updates: JSONObject
|
||||
|
||||
public init(updates: JSONObject) {
|
||||
self.updates = updates
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["updates": updates] }
|
||||
|
||||
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("updateRuntimeConfigs", [UpdateRuntimeConfig].self, arguments: ["updates": .variable("updates")]),
|
||||
] }
|
||||
|
||||
/// update multiple server runtime configurable settings
|
||||
public var updateRuntimeConfigs: [UpdateRuntimeConfig] { __data["updateRuntimeConfigs"] }
|
||||
|
||||
/// UpdateRuntimeConfig
|
||||
///
|
||||
/// Parent Type: `ServerRuntimeConfigType`
|
||||
public struct UpdateRuntimeConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerRuntimeConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("key", String.self),
|
||||
.field("value", AffineGraphQL.JSON.self),
|
||||
] }
|
||||
|
||||
public var key: String { __data["key"] }
|
||||
public var value: AffineGraphQL.JSON { __data["value"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -7,12 +7,12 @@ public class UpdateUserSettingsMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateUserSettings"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateUserSettings($input: UpdateSettingsInput!) { updateSettings(input: $input) }"#
|
||||
#"mutation updateUserSettings($input: UpdateUserSettingsInput!) { updateSettings(input: $input) }"#
|
||||
))
|
||||
|
||||
public var input: UpdateSettingsInput
|
||||
public var input: UpdateUserSettingsInput
|
||||
|
||||
public init(input: UpdateSettingsInput) {
|
||||
public init(input: UpdateUserSettingsInput) {
|
||||
self.input = input
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ public class AdminServerConfigQuery: GraphQLQuery {
|
||||
.field("type", GraphQLEnum<AffineGraphQL.ServerDeploymentType>.self),
|
||||
.field("initialized", Bool.self),
|
||||
.field("credentialsRequirement", CredentialsRequirement.self),
|
||||
.field("availableUpgrade", AvailableUpgrade.self),
|
||||
.field("availableUpgrade", AvailableUpgrade?.self),
|
||||
.field("availableUserFeatures", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
@@ -61,7 +61,7 @@ public class AdminServerConfigQuery: GraphQLQuery {
|
||||
/// credentials requirement
|
||||
public var credentialsRequirement: CredentialsRequirement { __data["credentialsRequirement"] }
|
||||
/// fetch latest available upgradable release of server
|
||||
public var availableUpgrade: AvailableUpgrade { __data["availableUpgrade"] }
|
||||
public var availableUpgrade: AvailableUpgrade? { __data["availableUpgrade"] }
|
||||
/// Features for user that can be configured
|
||||
public var availableUserFeatures: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["availableUserFeatures"] }
|
||||
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class AppConfigQuery: GraphQLQuery {
|
||||
public static let operationName: String = "appConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query appConfig { appConfig }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("appConfig", AffineGraphQL.JSONObject.self),
|
||||
] }
|
||||
|
||||
/// get the whole app configuration
|
||||
public var appConfig: AffineGraphQL.JSONObject { __data["appConfig"] }
|
||||
}
|
||||
}
|
||||
+17
-8
@@ -7,23 +7,27 @@ public class GetAudioTranscriptionQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getAudioTranscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getAudioTranscription($workspaceId: String!, $jobId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename audioTranscription(jobId: $jobId) { __typename id status transcription { __typename speaker start end transcription } summary } } } }"#
|
||||
#"query getAudioTranscription($workspaceId: String!, $jobId: String, $blobId: String) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename audioTranscription(jobId: $jobId, blobId: $blobId) { __typename id status title summary transcription { __typename speaker start end transcription } } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var jobId: String
|
||||
public var jobId: GraphQLNullable<String>
|
||||
public var blobId: GraphQLNullable<String>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
jobId: String
|
||||
jobId: GraphQLNullable<String>,
|
||||
blobId: GraphQLNullable<String>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.jobId = jobId
|
||||
self.blobId = blobId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"jobId": jobId
|
||||
"jobId": jobId,
|
||||
"blobId": blobId
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
@@ -63,10 +67,13 @@ public class GetAudioTranscriptionQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.Copilot }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("audioTranscription", [AudioTranscription].self, arguments: ["jobId": .variable("jobId")]),
|
||||
.field("audioTranscription", AudioTranscription?.self, arguments: [
|
||||
"jobId": .variable("jobId"),
|
||||
"blobId": .variable("blobId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var audioTranscription: [AudioTranscription] { __data["audioTranscription"] }
|
||||
public var audioTranscription: AudioTranscription? { __data["audioTranscription"] }
|
||||
|
||||
/// CurrentUser.Copilot.AudioTranscription
|
||||
///
|
||||
@@ -80,14 +87,16 @@ public class GetAudioTranscriptionQuery: GraphQLQuery {
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.AiJobStatus>.self),
|
||||
.field("transcription", [Transcription]?.self),
|
||||
.field("title", String?.self),
|
||||
.field("summary", String?.self),
|
||||
.field("transcription", [Transcription]?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.AiJobStatus> { __data["status"] }
|
||||
public var transcription: [Transcription]? { __data["transcription"] }
|
||||
public var title: String? { __data["title"] }
|
||||
public var summary: String? { __data["summary"] }
|
||||
public var transcription: [Transcription]? { __data["transcription"] }
|
||||
|
||||
/// CurrentUser.Copilot.AudioTranscription.Transcription
|
||||
///
|
||||
|
||||
+33
-7
@@ -7,7 +7,7 @@ public class GetInviteInfoQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getInviteInfo"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getInviteInfo($inviteId: String!) { getInviteInfo(inviteId: $inviteId) { __typename workspace { __typename id name avatar } user { __typename id name avatarUrl } } }"#
|
||||
#"query getInviteInfo($inviteId: String!) { getInviteInfo(inviteId: $inviteId) { __typename workspace { __typename id name avatar } user { __typename id name avatarUrl } status invitee { __typename id name email avatarUrl } } }"#
|
||||
))
|
||||
|
||||
public var inviteId: String
|
||||
@@ -42,12 +42,18 @@ public class GetInviteInfoQuery: GraphQLQuery {
|
||||
.field("__typename", String.self),
|
||||
.field("workspace", Workspace.self),
|
||||
.field("user", User.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.WorkspaceMemberStatus>?.self),
|
||||
.field("invitee", Invitee.self),
|
||||
] }
|
||||
|
||||
/// Workspace information
|
||||
public var workspace: Workspace { __data["workspace"] }
|
||||
/// User information
|
||||
public var user: User { __data["user"] }
|
||||
/// Invitation status in workspace
|
||||
public var status: GraphQLEnum<AffineGraphQL.WorkspaceMemberStatus>? { __data["status"] }
|
||||
/// Invitee information
|
||||
public var invitee: Invitee { __data["invitee"] }
|
||||
|
||||
/// GetInviteInfo.Workspace
|
||||
///
|
||||
@@ -73,23 +79,43 @@ public class GetInviteInfoQuery: GraphQLQuery {
|
||||
|
||||
/// GetInviteInfo.User
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
/// Parent Type: `WorkspaceUserType`
|
||||
public struct User: 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 __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
|
||||
/// GetInviteInfo.Invitee
|
||||
///
|
||||
/// Parent Type: `WorkspaceUserType`
|
||||
public struct Invitee: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var email: String { __data["email"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetServerRuntimeConfigQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getServerRuntimeConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getServerRuntimeConfig { serverRuntimeConfig { __typename id module key description value type updatedAt } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("serverRuntimeConfig", [ServerRuntimeConfig].self),
|
||||
] }
|
||||
|
||||
/// get all server runtime configurable settings
|
||||
public var serverRuntimeConfig: [ServerRuntimeConfig] { __data["serverRuntimeConfig"] }
|
||||
|
||||
/// ServerRuntimeConfig
|
||||
///
|
||||
/// Parent Type: `ServerRuntimeConfigType`
|
||||
public struct ServerRuntimeConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerRuntimeConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("module", String.self),
|
||||
.field("key", String.self),
|
||||
.field("description", String.self),
|
||||
.field("value", AffineGraphQL.JSON.self),
|
||||
.field("type", GraphQLEnum<AffineGraphQL.RuntimeConfigType>.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var module: String { __data["module"] }
|
||||
public var key: String { __data["key"] }
|
||||
public var description: String { __data["description"] }
|
||||
public var value: AffineGraphQL.JSON { __data["value"] }
|
||||
public var type: GraphQLEnum<AffineGraphQL.RuntimeConfigType> { __data["type"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetServerServiceConfigsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getServerServiceConfigs"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getServerServiceConfigs { serverServiceConfigs { __typename name config } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("serverServiceConfigs", [ServerServiceConfig].self),
|
||||
] }
|
||||
|
||||
public var serverServiceConfigs: [ServerServiceConfig] { __data["serverServiceConfigs"] }
|
||||
|
||||
/// ServerServiceConfig
|
||||
///
|
||||
/// Parent Type: `ServerServiceConfig`
|
||||
public struct ServerServiceConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerServiceConfig }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("config", AffineGraphQL.JSONObject.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var config: AffineGraphQL.JSONObject { __data["config"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-43
@@ -7,7 +7,7 @@ public class GetUserByEmailQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getUserByEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getUserByEmail($email: String!) { userByEmail(email: $email) { __typename id name email features hasPassword emailVerified avatarUrl quota { __typename humanReadable { __typename blobLimit historyPeriod memberLimit name storageQuota } } } }"#
|
||||
#"query getUserByEmail($email: String!) { userByEmail(email: $email) { __typename id name email features hasPassword emailVerified avatarUrl disabled } }"#
|
||||
))
|
||||
|
||||
public var email: String
|
||||
@@ -47,7 +47,7 @@ public class GetUserByEmailQuery: GraphQLQuery {
|
||||
.field("hasPassword", Bool?.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("quota", Quota.self),
|
||||
.field("disabled", Bool.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
@@ -63,47 +63,8 @@ public class GetUserByEmailQuery: GraphQLQuery {
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
public var quota: Quota { __data["quota"] }
|
||||
|
||||
/// UserByEmail.Quota
|
||||
///
|
||||
/// Parent Type: `UserQuotaType`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("humanReadable", HumanReadable.self),
|
||||
] }
|
||||
|
||||
public var humanReadable: HumanReadable { __data["humanReadable"] }
|
||||
|
||||
/// UserByEmail.Quota.HumanReadable
|
||||
///
|
||||
/// Parent Type: `UserQuotaHumanReadableType`
|
||||
public struct HumanReadable: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaHumanReadableType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("blobLimit", String.self),
|
||||
.field("historyPeriod", String.self),
|
||||
.field("memberLimit", String.self),
|
||||
.field("name", String.self),
|
||||
.field("storageQuota", String.self),
|
||||
] }
|
||||
|
||||
public var blobLimit: String { __data["blobLimit"] }
|
||||
public var historyPeriod: String { __data["historyPeriod"] }
|
||||
public var memberLimit: String { __data["memberLimit"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var storageQuota: String { __data["storageQuota"] }
|
||||
}
|
||||
}
|
||||
/// User is disabled
|
||||
public var disabled: Bool { __data["disabled"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -42,12 +42,12 @@ public class GetUserSettingsQuery: GraphQLQuery {
|
||||
|
||||
/// CurrentUser.Settings
|
||||
///
|
||||
/// Parent Type: `SettingsType`
|
||||
/// Parent Type: `UserSettingsType`
|
||||
public struct Settings: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SettingsType }
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserSettingsType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("receiveInvitationEmail", Bool.self),
|
||||
|
||||
+43
-9
@@ -7,27 +7,31 @@ public class MatchContextQuery: GraphQLQuery {
|
||||
public static let operationName: String = "matchContext"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query matchContext($contextId: String!, $content: String!, $limit: SafeInt) { currentUser { __typename copilot { __typename contexts(contextId: $contextId) { __typename matchContext(content: $content, limit: $limit) { __typename fileId chunk content distance } } } } }"#
|
||||
#"query matchContext($contextId: String!, $content: String!, $limit: SafeInt, $threshold: Float) { currentUser { __typename copilot { __typename contexts(contextId: $contextId) { __typename matchFiles(content: $content, limit: $limit, threshold: $threshold) { __typename fileId chunk content distance } matchWorkspaceDocs(content: $content, limit: $limit, threshold: $threshold) { __typename docId chunk content distance } } } } }"#
|
||||
))
|
||||
|
||||
public var contextId: String
|
||||
public var content: String
|
||||
public var limit: GraphQLNullable<SafeInt>
|
||||
public var threshold: GraphQLNullable<Double>
|
||||
|
||||
public init(
|
||||
contextId: String,
|
||||
content: String,
|
||||
limit: GraphQLNullable<SafeInt>
|
||||
limit: GraphQLNullable<SafeInt>,
|
||||
threshold: GraphQLNullable<Double>
|
||||
) {
|
||||
self.contextId = contextId
|
||||
self.content = content
|
||||
self.limit = limit
|
||||
self.threshold = threshold
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"contextId": contextId,
|
||||
"content": content,
|
||||
"limit": limit
|
||||
"limit": limit,
|
||||
"threshold": threshold
|
||||
] }
|
||||
|
||||
public struct Data: AffineGraphQL.SelectionSet {
|
||||
@@ -83,19 +87,27 @@ public class MatchContextQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotContext }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("matchContext", [MatchContext].self, arguments: [
|
||||
.field("matchFiles", [MatchFile].self, arguments: [
|
||||
"content": .variable("content"),
|
||||
"limit": .variable("limit")
|
||||
"limit": .variable("limit"),
|
||||
"threshold": .variable("threshold")
|
||||
]),
|
||||
.field("matchWorkspaceDocs", [MatchWorkspaceDoc].self, arguments: [
|
||||
"content": .variable("content"),
|
||||
"limit": .variable("limit"),
|
||||
"threshold": .variable("threshold")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// match file context
|
||||
public var matchContext: [MatchContext] { __data["matchContext"] }
|
||||
/// match file in context
|
||||
public var matchFiles: [MatchFile] { __data["matchFiles"] }
|
||||
/// match workspace docs
|
||||
public var matchWorkspaceDocs: [MatchWorkspaceDoc] { __data["matchWorkspaceDocs"] }
|
||||
|
||||
/// CurrentUser.Copilot.Context.MatchContext
|
||||
/// CurrentUser.Copilot.Context.MatchFile
|
||||
///
|
||||
/// Parent Type: `ContextMatchedFileChunk`
|
||||
public struct MatchContext: AffineGraphQL.SelectionSet {
|
||||
public struct MatchFile: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
@@ -113,6 +125,28 @@ public class MatchContextQuery: GraphQLQuery {
|
||||
public var content: String { __data["content"] }
|
||||
public var distance: Double? { __data["distance"] }
|
||||
}
|
||||
|
||||
/// CurrentUser.Copilot.Context.MatchWorkspaceDoc
|
||||
///
|
||||
/// Parent Type: `ContextMatchedDocChunk`
|
||||
public struct MatchWorkspaceDoc: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ContextMatchedDocChunk }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("docId", String.self),
|
||||
.field("chunk", AffineGraphQL.SafeInt.self),
|
||||
.field("content", String.self),
|
||||
.field("distance", Double?.self),
|
||||
] }
|
||||
|
||||
public var docId: String { __data["docId"] }
|
||||
public var chunk: AffineGraphQL.SafeInt { __data["chunk"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var distance: Double? { __data["distance"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class MatchFilesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "matchFiles"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query matchFiles($contextId: String!, $content: String!, $limit: SafeInt) { currentUser { __typename copilot { __typename contexts(contextId: $contextId) { __typename matchFiles(content: $content, limit: $limit) { __typename fileId chunk content distance } } } } }"#
|
||||
))
|
||||
|
||||
public var contextId: String
|
||||
public var content: String
|
||||
public var limit: GraphQLNullable<SafeInt>
|
||||
|
||||
public init(
|
||||
contextId: String,
|
||||
content: String,
|
||||
limit: GraphQLNullable<SafeInt>
|
||||
) {
|
||||
self.contextId = contextId
|
||||
self.content = content
|
||||
self.limit = limit
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"contextId": contextId,
|
||||
"content": content,
|
||||
"limit": limit
|
||||
] }
|
||||
|
||||
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),
|
||||
] }
|
||||
|
||||
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("contexts", [Context].self, arguments: ["contextId": .variable("contextId")]),
|
||||
] }
|
||||
|
||||
/// Get the context list of a session
|
||||
public var contexts: [Context] { __data["contexts"] }
|
||||
|
||||
/// CurrentUser.Copilot.Context
|
||||
///
|
||||
/// Parent Type: `CopilotContext`
|
||||
public struct Context: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotContext }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("matchFiles", [MatchFile].self, arguments: [
|
||||
"content": .variable("content"),
|
||||
"limit": .variable("limit")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// match file in context
|
||||
public var matchFiles: [MatchFile] { __data["matchFiles"] }
|
||||
|
||||
/// CurrentUser.Copilot.Context.MatchFile
|
||||
///
|
||||
/// Parent Type: `ContextMatchedFileChunk`
|
||||
public struct MatchFile: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ContextMatchedFileChunk }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("fileId", String.self),
|
||||
.field("chunk", AffineGraphQL.SafeInt.self),
|
||||
.field("content", String.self),
|
||||
.field("distance", Double?.self),
|
||||
] }
|
||||
|
||||
public var fileId: String { __data["fileId"] }
|
||||
public var chunk: AffineGraphQL.SafeInt { __data["chunk"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var distance: Double? { __data["distance"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -3,11 +3,11 @@
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class MatchWorkspaceContextQuery: GraphQLQuery {
|
||||
public static let operationName: String = "matchWorkspaceContext"
|
||||
public class MatchWorkspaceDocsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "matchWorkspaceDocs"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query matchWorkspaceContext($contextId: String!, $content: String!, $limit: SafeInt) { currentUser { __typename copilot { __typename contexts(contextId: $contextId) { __typename matchWorkspaceContext(content: $content, limit: $limit) { __typename docId chunk content distance } } } } }"#
|
||||
#"query matchWorkspaceDocs($contextId: String!, $content: String!, $limit: SafeInt) { currentUser { __typename copilot { __typename contexts(contextId: $contextId) { __typename matchWorkspaceDocs(content: $content, limit: $limit) { __typename docId chunk content distance } } } } }"#
|
||||
))
|
||||
|
||||
public var contextId: String
|
||||
@@ -83,19 +83,19 @@ public class MatchWorkspaceContextQuery: GraphQLQuery {
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotContext }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("matchWorkspaceContext", MatchWorkspaceContext.self, arguments: [
|
||||
.field("matchWorkspaceDocs", [MatchWorkspaceDoc].self, arguments: [
|
||||
"content": .variable("content"),
|
||||
"limit": .variable("limit")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// match workspace doc content
|
||||
public var matchWorkspaceContext: MatchWorkspaceContext { __data["matchWorkspaceContext"] }
|
||||
/// match workspace docs
|
||||
public var matchWorkspaceDocs: [MatchWorkspaceDoc] { __data["matchWorkspaceDocs"] }
|
||||
|
||||
/// CurrentUser.Copilot.Context.MatchWorkspaceContext
|
||||
/// CurrentUser.Copilot.Context.MatchWorkspaceDoc
|
||||
///
|
||||
/// Parent Type: `ContextMatchedDocChunk`
|
||||
public struct MatchWorkspaceContext: AffineGraphQL.SelectionSet {
|
||||
public struct MatchWorkspaceDoc: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
+1
-2
@@ -7,5 +7,4 @@
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
/// The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
||||
public typealias JSON = String
|
||||
public typealias JSON = JSONObject
|
||||
|
||||
+33
-2
@@ -7,5 +7,36 @@
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
/// The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
||||
public typealias JSONObject = String
|
||||
public typealias JSONObject = CustomJSON
|
||||
|
||||
public enum CustomJSON: CustomScalarType, Hashable {
|
||||
case dictionary([String: AnyHashable])
|
||||
case array([AnyHashable])
|
||||
|
||||
public init(_jsonValue value: JSONValue) throws {
|
||||
if let dict = value as? [String: AnyHashable] {
|
||||
self = .dictionary(dict)
|
||||
} else if let array = value as? [AnyHashable] {
|
||||
self = .array(array)
|
||||
} else {
|
||||
throw JSONDecodingError.couldNotConvert(value: value, to: CustomJSON.self)
|
||||
}
|
||||
}
|
||||
|
||||
public var _jsonValue: JSONValue {
|
||||
switch self {
|
||||
case let .dictionary(json as AnyHashable),
|
||||
let .array(json as AnyHashable):
|
||||
json
|
||||
}
|
||||
}
|
||||
|
||||
public static func == (lhs: CustomJSON, rhs: CustomJSON) -> Bool {
|
||||
lhs._jsonValue == rhs._jsonValue
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(_jsonValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public enum RuntimeConfigType: String, EnumType {
|
||||
case array = "Array"
|
||||
case boolean = "Boolean"
|
||||
case number = "Number"
|
||||
case object = "Object"
|
||||
case string = "String"
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct UpdateAppConfigInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
__data = data
|
||||
}
|
||||
|
||||
public init(
|
||||
key: String,
|
||||
module: String,
|
||||
value: JSON
|
||||
) {
|
||||
__data = InputDict([
|
||||
"key": key,
|
||||
"module": module,
|
||||
"value": value
|
||||
])
|
||||
}
|
||||
|
||||
public var key: String {
|
||||
get { __data["key"] }
|
||||
set { __data["key"] = newValue }
|
||||
}
|
||||
|
||||
public var module: String {
|
||||
get { __data["module"] }
|
||||
set { __data["module"] = newValue }
|
||||
}
|
||||
|
||||
public var value: JSON {
|
||||
get { __data["value"] }
|
||||
set { __data["value"] = newValue }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public struct UpdateSettingsInput: InputObject {
|
||||
public struct UpdateUserSettingsInput: InputObject {
|
||||
public private(set) var __data: InputDict
|
||||
|
||||
public init(_ data: InputDict) {
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let ServerRuntimeConfigType = ApolloAPI.Object(
|
||||
typename: "ServerRuntimeConfigType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let ServerServiceConfig = ApolloAPI.Object(
|
||||
typename: "ServerServiceConfig",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
}
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
import ApolloAPI
|
||||
|
||||
public extension Objects {
|
||||
static let SettingsType = ApolloAPI.Object(
|
||||
typename: "SettingsType",
|
||||
static let UserSettingsType = ApolloAPI.Object(
|
||||
typename: "UserSettingsType",
|
||||
implementedInterfaces: [],
|
||||
keyFields: nil
|
||||
)
|
||||
+1
-3
@@ -65,9 +65,6 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "ReleaseVersionType": return AffineGraphQL.Objects.ReleaseVersionType
|
||||
case "RemoveAvatar": return AffineGraphQL.Objects.RemoveAvatar
|
||||
case "ServerConfigType": return AffineGraphQL.Objects.ServerConfigType
|
||||
case "ServerRuntimeConfigType": return AffineGraphQL.Objects.ServerRuntimeConfigType
|
||||
case "ServerServiceConfig": return AffineGraphQL.Objects.ServerServiceConfig
|
||||
case "SettingsType": return AffineGraphQL.Objects.SettingsType
|
||||
case "SubscriptionPrice": return AffineGraphQL.Objects.SubscriptionPrice
|
||||
case "SubscriptionType": return AffineGraphQL.Objects.SubscriptionType
|
||||
case "TranscriptionItemType": return AffineGraphQL.Objects.TranscriptionItemType
|
||||
@@ -76,6 +73,7 @@ public enum SchemaMetadata: ApolloAPI.SchemaMetadata {
|
||||
case "UserQuotaHumanReadableType": return AffineGraphQL.Objects.UserQuotaHumanReadableType
|
||||
case "UserQuotaType": return AffineGraphQL.Objects.UserQuotaType
|
||||
case "UserQuotaUsageType": return AffineGraphQL.Objects.UserQuotaUsageType
|
||||
case "UserSettingsType": return AffineGraphQL.Objects.UserSettingsType
|
||||
case "UserType": return AffineGraphQL.Objects.UserType
|
||||
case "WorkspacePageMeta": return AffineGraphQL.Objects.WorkspacePageMeta
|
||||
case "WorkspacePermissions": return AffineGraphQL.Objects.WorkspacePermissions
|
||||
|
||||
Reference in New Issue
Block a user