feat(ios): translate & continue to chat & clear history (#11347)

This commit is contained in:
Lakr
2025-04-01 18:03:48 +08:00
committed by GitHub
parent b74d40d45f
commit 032244ae61
43 changed files with 785 additions and 426 deletions

View File

@@ -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

View File

@@ -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)
}
}

View File

@@ -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"
}

View File

@@ -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 }
}
}

View File

@@ -3,7 +3,7 @@
import ApolloAPI
public struct UpdateSettingsInput: InputObject {
public struct UpdateUserSettingsInput: InputObject {
public private(set) var __data: InputDict
public init(_ data: InputDict) {

View File

@@ -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
)
}

View File

@@ -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
)
}

View File

@@ -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
)

View File

@@ -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