mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(ios): implement chat function (#9482)
Co-authored-by: DarkSky <darksky2048@gmail.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
5039CC962D1D42C700874F32 /* AffineGraphQL */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AffineGraphQL; sourceTree = "<group>"; };
|
||||
504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
507513692D1924C600AD60C0 /* RootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = "<group>"; };
|
||||
5075136D2D1925BC00AD60C0 /* IntelligentsPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntelligentsPlugin.swift; sourceTree = "<group>"; };
|
||||
@@ -114,6 +115,7 @@
|
||||
50802D5F2D112F7D00694021 /* Packages */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5039CC962D1D42C700874F32 /* AffineGraphQL */,
|
||||
50802D5E2D112F7D00694021 /* Intelligents */,
|
||||
);
|
||||
path = Packages;
|
||||
@@ -131,7 +133,6 @@
|
||||
9D90BE192CCB9876006677DB /* Cookie */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9D1C07262CEC3E8200E1C502 /* IntelligentsPlugin.swift */,
|
||||
9D90BE172CCB9876006677DB /* CookieManager.swift */,
|
||||
9D90BE182CCB9876006677DB /* CookiePlugin.swift */,
|
||||
9D6A85322CCF6DA700DAB35F /* HashcashPlugin.swift */,
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
{
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "apollo-ios",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apollographql/apollo-ios.git",
|
||||
"state" : {
|
||||
"revision" : "c3f48d45ec1300bc95243bf19f67284f9dc0d14a",
|
||||
"version" : "1.15.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "msdisplaylink",
|
||||
"kind" : "remoteSourceControl",
|
||||
@@ -27,6 +36,15 @@
|
||||
"version" : "1.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "sqlite.swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/stephencelis/SQLite.swift.git",
|
||||
"state" : {
|
||||
"revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8",
|
||||
"version" : "0.15.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-cmark",
|
||||
"kind" : "remoteSourceControl",
|
||||
@@ -36,6 +54,15 @@
|
||||
"version" : "0.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-eventsource",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/LaunchDarkly/swift-eventsource.git",
|
||||
"state" : {
|
||||
"revision" : "57051701c58a93603ffa2051f8e9cf0c8cff7814",
|
||||
"version" : "3.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-markdown-ui",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
{
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "apollo-ios",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apollographql/apollo-ios.git",
|
||||
"state" : {
|
||||
"revision" : "c3f48d45ec1300bc95243bf19f67284f9dc0d14a",
|
||||
"version" : "1.15.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "msdisplaylink",
|
||||
"kind" : "remoteSourceControl",
|
||||
@@ -27,6 +36,15 @@
|
||||
"version" : "1.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "sqlite.swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/stephencelis/SQLite.swift.git",
|
||||
"state" : {
|
||||
"revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8",
|
||||
"version" : "0.15.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-cmark",
|
||||
"kind" : "remoteSourceControl",
|
||||
@@ -36,6 +54,15 @@
|
||||
"version" : "0.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-eventsource",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/LaunchDarkly/swift-eventsource.git",
|
||||
"state" : {
|
||||
"revision" : "57051701c58a93603ffa2051f8e9cf0c8cff7814",
|
||||
"version" : "3.3.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-markdown-ui",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
||||
@@ -44,30 +44,29 @@ extension AFFiNEViewController: IntelligentsButtonDelegate, IntelligentsFocusApe
|
||||
|
||||
button.beginProgress()
|
||||
|
||||
let script = "return await window.getCurrentDocContentInMarkdown();"
|
||||
webView.callAsyncJavaScript(
|
||||
script,
|
||||
arguments: [:],
|
||||
in: nil,
|
||||
in: .page
|
||||
) { result in
|
||||
button.stopProgress()
|
||||
webView.resignFirstResponder()
|
||||
|
||||
if case let .failure(error) = result {
|
||||
print("[?] \(self) script error: \(error.localizedDescription)")
|
||||
let upstreamReaderScript = "window.getCurrentServerBaseUrl();"
|
||||
webView.evaluateJavaScript(upstreamReaderScript) { result, _ in
|
||||
if let baseUrl = result as? String {
|
||||
Intelligents.setUpstreamEndpoint(baseUrl)
|
||||
}
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
if case let .success(content) = result,
|
||||
let res = content as? String
|
||||
{
|
||||
print("[*] \(self) received document with \(res.count) characters")
|
||||
DispatchQueue.main.async {
|
||||
let script = "return await window.getCurrentDocContentInMarkdown();"
|
||||
webView.callAsyncJavaScript(
|
||||
script,
|
||||
arguments: [:],
|
||||
in: nil,
|
||||
in: .page
|
||||
) { result in
|
||||
button.stopProgress()
|
||||
webView.resignFirstResponder()
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
if case let .success(content) = result,
|
||||
let res = content as? String
|
||||
{
|
||||
print("[*] \(self) received document with \(res.count) characters")
|
||||
self.openIntelligentsSheet(withContext: res)
|
||||
}
|
||||
} else {
|
||||
DispatchQueue.main.async {
|
||||
} else {
|
||||
self.openSimpleChat()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// swift-tools-version:5.9
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "AffineGraphQL",
|
||||
platforms: [
|
||||
.iOS(.v12),
|
||||
.macOS(.v10_14),
|
||||
.tvOS(.v12),
|
||||
.watchOS(.v5),
|
||||
],
|
||||
products: [
|
||||
.library(name: "AffineGraphQL", targets: ["AffineGraphQL"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "AffineGraphQL",
|
||||
dependencies: [
|
||||
.product(name: "ApolloAPI", package: "apollo-ios"),
|
||||
],
|
||||
path: "./Sources"
|
||||
),
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,45 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct CredentialsRequirements: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment CredentialsRequirements on CredentialsRequirementType { __typename password { __typename ...PasswordLimits } }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CredentialsRequirementType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("password", Password.self),
|
||||
] }
|
||||
|
||||
public var password: Password { __data["password"] }
|
||||
|
||||
/// Password
|
||||
///
|
||||
/// Parent Type: `PasswordLimitsType`
|
||||
public struct Password: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PasswordLimitsType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(PasswordLimits.self),
|
||||
] }
|
||||
|
||||
public var minLength: Int { __data["minLength"] }
|
||||
public var maxLength: Int { __data["maxLength"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var passwordLimits: PasswordLimits { _toFragment() }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct PasswordLimits: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment PasswordLimits on PasswordLimitsType { __typename minLength maxLength }"#
|
||||
}
|
||||
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PasswordLimitsType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("minLength", Int.self),
|
||||
.field("maxLength", Int.self),
|
||||
] }
|
||||
|
||||
public var minLength: Int { __data["minLength"] }
|
||||
public var maxLength: Int { __data["maxLength"] }
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class AcceptInviteByInviteIdMutation: GraphQLMutation {
|
||||
public static let operationName: String = "acceptInviteByInviteId"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation acceptInviteByInviteId($workspaceId: String!, $inviteId: String!, $sendAcceptMail: Boolean) { acceptInviteById( workspaceId: $workspaceId inviteId: $inviteId sendAcceptMail: $sendAcceptMail ) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var inviteId: String
|
||||
public var sendAcceptMail: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
inviteId: String,
|
||||
sendAcceptMail: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.inviteId = inviteId
|
||||
self.sendAcceptMail = sendAcceptMail
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"inviteId": inviteId,
|
||||
"sendAcceptMail": sendAcceptMail
|
||||
] }
|
||||
|
||||
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("acceptInviteById", Bool.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"inviteId": .variable("inviteId"),
|
||||
"sendAcceptMail": .variable("sendAcceptMail")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var acceptInviteById: Bool { __data["acceptInviteById"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class AddWorkspaceFeatureMutation: GraphQLMutation {
|
||||
public static let operationName: String = "addWorkspaceFeature"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation addWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) { addWorkspaceFeature(workspaceId: $workspaceId, feature: $feature) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var feature: GraphQLEnum<FeatureType>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
feature: GraphQLEnum<FeatureType>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.feature = feature
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"feature": feature
|
||||
] }
|
||||
|
||||
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("addWorkspaceFeature", Int.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"feature": .variable("feature")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var addWorkspaceFeature: Int { __data["addWorkspaceFeature"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ApproveWorkspaceTeamMemberMutation: GraphQLMutation {
|
||||
public static let operationName: String = "approveWorkspaceTeamMember"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation approveWorkspaceTeamMember($workspaceId: String!, $userId: String!) { approveMember(workspaceId: $workspaceId, userId: $userId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var userId: String
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
userId: String
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.userId = userId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"userId": userId
|
||||
] }
|
||||
|
||||
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("approveMember", String.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"userId": .variable("userId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var approveMember: String { __data["approveMember"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CancelSubscriptionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "cancelSubscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation cancelSubscription($plan: SubscriptionPlan = Pro, $workspaceId: String) { cancelSubscription(plan: $plan, workspaceId: $workspaceId) { __typename id status nextBillAt canceledAt } }"#
|
||||
))
|
||||
|
||||
public var plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>>
|
||||
public var workspaceId: GraphQLNullable<String>
|
||||
|
||||
public init(
|
||||
plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>> = .init(.pro),
|
||||
workspaceId: GraphQLNullable<String>
|
||||
) {
|
||||
self.plan = plan
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"plan": plan,
|
||||
"workspaceId": workspaceId
|
||||
] }
|
||||
|
||||
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("cancelSubscription", CancelSubscription.self, arguments: [
|
||||
"plan": .variable("plan"),
|
||||
"workspaceId": .variable("workspaceId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var cancelSubscription: CancelSubscription { __data["cancelSubscription"] }
|
||||
|
||||
/// CancelSubscription
|
||||
///
|
||||
/// Parent Type: `SubscriptionType`
|
||||
public struct CancelSubscription: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SubscriptionType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String?.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.SubscriptionStatus>.self),
|
||||
.field("nextBillAt", AffineGraphQL.DateTime?.self),
|
||||
.field("canceledAt", AffineGraphQL.DateTime?.self),
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "removed")
|
||||
public var id: String? { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.SubscriptionStatus> { __data["status"] }
|
||||
public var nextBillAt: AffineGraphQL.DateTime? { __data["nextBillAt"] }
|
||||
public var canceledAt: AffineGraphQL.DateTime? { __data["canceledAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ChangeEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "changeEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation changeEmail($token: String!, $email: String!) { changeEmail(token: $token, email: $email) { __typename id email } }"#
|
||||
))
|
||||
|
||||
public var token: String
|
||||
public var email: String
|
||||
|
||||
public init(
|
||||
token: String,
|
||||
email: String
|
||||
) {
|
||||
self.token = token
|
||||
self.email = email
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"token": token,
|
||||
"email": email
|
||||
] }
|
||||
|
||||
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("changeEmail", ChangeEmail.self, arguments: [
|
||||
"token": .variable("token"),
|
||||
"email": .variable("email")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var changeEmail: ChangeEmail { __data["changeEmail"] }
|
||||
|
||||
/// ChangeEmail
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct ChangeEmail: 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("id", AffineGraphQL.ID.self),
|
||||
.field("email", String.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ChangePasswordMutation: GraphQLMutation {
|
||||
public static let operationName: String = "changePassword"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation changePassword($token: String!, $userId: String!, $newPassword: String!) { changePassword(token: $token, userId: $userId, newPassword: $newPassword) }"#
|
||||
))
|
||||
|
||||
public var token: String
|
||||
public var userId: String
|
||||
public var newPassword: String
|
||||
|
||||
public init(
|
||||
token: String,
|
||||
userId: String,
|
||||
newPassword: String
|
||||
) {
|
||||
self.token = token
|
||||
self.userId = userId
|
||||
self.newPassword = newPassword
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"token": token,
|
||||
"userId": userId,
|
||||
"newPassword": newPassword
|
||||
] }
|
||||
|
||||
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("changePassword", Bool.self, arguments: [
|
||||
"token": .variable("token"),
|
||||
"userId": .variable("userId"),
|
||||
"newPassword": .variable("newPassword")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var changePassword: Bool { __data["changePassword"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CleanupCopilotSessionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "cleanupCopilotSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation cleanupCopilotSession($input: DeleteSessionInput!) { cleanupCopilotSession(options: $input) }"#
|
||||
))
|
||||
|
||||
public var input: DeleteSessionInput
|
||||
|
||||
public init(input: DeleteSessionInput) {
|
||||
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("cleanupCopilotSession", [String].self, arguments: ["options": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Cleanup sessions
|
||||
public var cleanupCopilotSession: [String] { __data["cleanupCopilotSession"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateChangePasswordUrlMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createChangePasswordUrl"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createChangePasswordUrl($callbackUrl: String!, $userId: String!) { createChangePasswordUrl(callbackUrl: $callbackUrl, userId: $userId) }"#
|
||||
))
|
||||
|
||||
public var callbackUrl: String
|
||||
public var userId: String
|
||||
|
||||
public init(
|
||||
callbackUrl: String,
|
||||
userId: String
|
||||
) {
|
||||
self.callbackUrl = callbackUrl
|
||||
self.userId = userId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"callbackUrl": callbackUrl,
|
||||
"userId": userId
|
||||
] }
|
||||
|
||||
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("createChangePasswordUrl", String.self, arguments: [
|
||||
"callbackUrl": .variable("callbackUrl"),
|
||||
"userId": .variable("userId")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Create change password url
|
||||
public var createChangePasswordUrl: String { __data["createChangePasswordUrl"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateCheckoutSessionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createCheckoutSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createCheckoutSession($input: CreateCheckoutSessionInput!) { createCheckoutSession(input: $input) }"#
|
||||
))
|
||||
|
||||
public var input: CreateCheckoutSessionInput
|
||||
|
||||
public init(input: CreateCheckoutSessionInput) {
|
||||
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("createCheckoutSession", String.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Create a subscription checkout link of stripe
|
||||
public var createCheckoutSession: String { __data["createCheckoutSession"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateCopilotMessageMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createCopilotMessage"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createCopilotMessage($options: CreateChatMessageInput!) { createCopilotMessage(options: $options) }"#
|
||||
))
|
||||
|
||||
public var options: CreateChatMessageInput
|
||||
|
||||
public init(options: CreateChatMessageInput) {
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["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.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("createCopilotMessage", String.self, arguments: ["options": .variable("options")]),
|
||||
] }
|
||||
|
||||
/// Create a chat message
|
||||
public var createCopilotMessage: String { __data["createCopilotMessage"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateCopilotSessionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createCopilotSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createCopilotSession($options: CreateChatSessionInput!) { createCopilotSession(options: $options) }"#
|
||||
))
|
||||
|
||||
public var options: CreateChatSessionInput
|
||||
|
||||
public init(options: CreateChatSessionInput) {
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["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.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("createCopilotSession", String.self, arguments: ["options": .variable("options")]),
|
||||
] }
|
||||
|
||||
/// Create a chat session
|
||||
public var createCopilotSession: String { __data["createCopilotSession"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateCustomerPortalMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createCustomerPortal"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createCustomerPortal { createCustomerPortal }"#
|
||||
))
|
||||
|
||||
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("createCustomerPortal", String.self),
|
||||
] }
|
||||
|
||||
/// Create a stripe customer portal to manage payment methods
|
||||
public var createCustomerPortal: String { __data["createCustomerPortal"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateInviteLinkMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createInviteLink"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createInviteLink($workspaceId: String!, $expireTime: WorkspaceInviteLinkExpireTime!) { createInviteLink(workspaceId: $workspaceId, expireTime: $expireTime) { __typename link expireTime } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var expireTime: GraphQLEnum<WorkspaceInviteLinkExpireTime>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
expireTime: GraphQLEnum<WorkspaceInviteLinkExpireTime>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.expireTime = expireTime
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"expireTime": expireTime
|
||||
] }
|
||||
|
||||
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("createInviteLink", CreateInviteLink.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"expireTime": .variable("expireTime")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var createInviteLink: CreateInviteLink { __data["createInviteLink"] }
|
||||
|
||||
/// CreateInviteLink
|
||||
///
|
||||
/// Parent Type: `InviteLink`
|
||||
public struct CreateInviteLink: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InviteLink }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("link", String.self),
|
||||
.field("expireTime", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
/// Invite link
|
||||
public var link: String { __data["link"] }
|
||||
/// Invite link expire time
|
||||
public var expireTime: AffineGraphQL.DateTime { __data["expireTime"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateUserMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createUser"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createUser($input: CreateUserInput!) { createUser(input: $input) { __typename id } }"#
|
||||
))
|
||||
|
||||
public var input: CreateUserInput
|
||||
|
||||
public init(input: CreateUserInput) {
|
||||
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("createUser", CreateUser.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
/// Create a new user
|
||||
public var createUser: CreateUser { __data["createUser"] }
|
||||
|
||||
/// CreateUser
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct CreateUser: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CreateWorkspaceMutation: GraphQLMutation {
|
||||
public static let operationName: String = "createWorkspace"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation createWorkspace { createWorkspace { __typename id public createdAt } }"#
|
||||
))
|
||||
|
||||
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("createWorkspace", CreateWorkspace.self),
|
||||
] }
|
||||
|
||||
/// Create a new workspace
|
||||
public var createWorkspace: CreateWorkspace { __data["createWorkspace"] }
|
||||
|
||||
/// CreateWorkspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct CreateWorkspace: 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("id", AffineGraphQL.ID.self),
|
||||
.field("public", Bool.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// is Public workspace
|
||||
public var `public`: Bool { __data["public"] }
|
||||
/// Workspace created date
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteAccountMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteAccount"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteAccount { deleteAccount { __typename success } }"#
|
||||
))
|
||||
|
||||
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("deleteAccount", DeleteAccount.self),
|
||||
] }
|
||||
|
||||
public var deleteAccount: DeleteAccount { __data["deleteAccount"] }
|
||||
|
||||
/// DeleteAccount
|
||||
///
|
||||
/// Parent Type: `DeleteAccount`
|
||||
public struct DeleteAccount: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.DeleteAccount }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("success", Bool.self),
|
||||
] }
|
||||
|
||||
public var success: Bool { __data["success"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteBlobMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteBlob"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteBlob($workspaceId: String!, $key: String!, $permanently: Boolean) { deleteBlob(workspaceId: $workspaceId, key: $key, permanently: $permanently) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var key: String
|
||||
public var permanently: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
key: String,
|
||||
permanently: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.key = key
|
||||
self.permanently = permanently
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"key": key,
|
||||
"permanently": permanently
|
||||
] }
|
||||
|
||||
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("deleteBlob", Bool.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"key": .variable("key"),
|
||||
"permanently": .variable("permanently")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var deleteBlob: Bool { __data["deleteBlob"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteUserMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteUser"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteUser($id: String!) { deleteUser(id: $id) { __typename success } }"#
|
||||
))
|
||||
|
||||
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("deleteUser", DeleteUser.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// Delete a user account
|
||||
public var deleteUser: DeleteUser { __data["deleteUser"] }
|
||||
|
||||
/// DeleteUser
|
||||
///
|
||||
/// Parent Type: `DeleteAccount`
|
||||
public struct DeleteUser: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.DeleteAccount }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("success", Bool.self),
|
||||
] }
|
||||
|
||||
public var success: Bool { __data["success"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class DeleteWorkspaceMutation: GraphQLMutation {
|
||||
public static let operationName: String = "deleteWorkspace"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation deleteWorkspace($id: String!) { deleteWorkspace(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("deleteWorkspace", Bool.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
public var deleteWorkspace: Bool { __data["deleteWorkspace"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ForkCopilotSessionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "forkCopilotSession"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation forkCopilotSession($options: ForkChatSessionInput!) { forkCopilotSession(options: $options) }"#
|
||||
))
|
||||
|
||||
public var options: ForkChatSessionInput
|
||||
|
||||
public init(options: ForkChatSessionInput) {
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["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.Mutation }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("forkCopilotSession", String.self, arguments: ["options": .variable("options")]),
|
||||
] }
|
||||
|
||||
/// Create a chat session
|
||||
public var forkCopilotSession: String { __data["forkCopilotSession"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GrantWorkspaceTeamMemberMutation: GraphQLMutation {
|
||||
public static let operationName: String = "grantWorkspaceTeamMember"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation grantWorkspaceTeamMember($workspaceId: String!, $userId: String!, $permission: Permission!) { grantMember(workspaceId: $workspaceId, userId: $userId, permission: $permission) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var userId: String
|
||||
public var permission: GraphQLEnum<Permission>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
userId: String,
|
||||
permission: GraphQLEnum<Permission>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.userId = userId
|
||||
self.permission = permission
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"userId": userId,
|
||||
"permission": permission
|
||||
] }
|
||||
|
||||
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("grantMember", String.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"userId": .variable("userId"),
|
||||
"permission": .variable("permission")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var grantMember: String { __data["grantMember"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class InviteBatchMutation: GraphQLMutation {
|
||||
public static let operationName: String = "inviteBatch"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation inviteBatch($workspaceId: String!, $emails: [String!]!, $sendInviteMail: Boolean) { inviteBatch( workspaceId: $workspaceId emails: $emails sendInviteMail: $sendInviteMail ) { __typename email inviteId sentSuccess } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var emails: [String]
|
||||
public var sendInviteMail: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
emails: [String],
|
||||
sendInviteMail: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.emails = emails
|
||||
self.sendInviteMail = sendInviteMail
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"emails": emails,
|
||||
"sendInviteMail": sendInviteMail
|
||||
] }
|
||||
|
||||
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("inviteBatch", [InviteBatch].self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"emails": .variable("emails"),
|
||||
"sendInviteMail": .variable("sendInviteMail")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var inviteBatch: [InviteBatch] { __data["inviteBatch"] }
|
||||
|
||||
/// InviteBatch
|
||||
///
|
||||
/// Parent Type: `InviteResult`
|
||||
public struct InviteBatch: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InviteResult }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("email", String.self),
|
||||
.field("inviteId", String?.self),
|
||||
.field("sentSuccess", Bool.self),
|
||||
] }
|
||||
|
||||
public var email: String { __data["email"] }
|
||||
/// Invite id, null if invite record create failed
|
||||
public var inviteId: String? { __data["inviteId"] }
|
||||
/// Invite email sent success
|
||||
public var sentSuccess: Bool { __data["sentSuccess"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class InviteByEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "inviteByEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation inviteByEmail($workspaceId: String!, $email: String!, $sendInviteMail: Boolean) { invite( workspaceId: $workspaceId email: $email sendInviteMail: $sendInviteMail ) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var email: String
|
||||
public var sendInviteMail: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
email: String,
|
||||
sendInviteMail: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.email = email
|
||||
self.sendInviteMail = sendInviteMail
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"email": email,
|
||||
"sendInviteMail": sendInviteMail
|
||||
] }
|
||||
|
||||
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("invite", String.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"email": .variable("email"),
|
||||
"sendInviteMail": .variable("sendInviteMail")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var invite: String { __data["invite"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class InviteByEmailsMutation: GraphQLMutation {
|
||||
public static let operationName: String = "inviteByEmails"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation inviteByEmails($workspaceId: String!, $emails: [String!]!, $sendInviteMail: Boolean) { inviteBatch( workspaceId: $workspaceId emails: $emails sendInviteMail: $sendInviteMail ) { __typename email inviteId sentSuccess } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var emails: [String]
|
||||
public var sendInviteMail: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
emails: [String],
|
||||
sendInviteMail: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.emails = emails
|
||||
self.sendInviteMail = sendInviteMail
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"emails": emails,
|
||||
"sendInviteMail": sendInviteMail
|
||||
] }
|
||||
|
||||
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("inviteBatch", [InviteBatch].self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"emails": .variable("emails"),
|
||||
"sendInviteMail": .variable("sendInviteMail")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var inviteBatch: [InviteBatch] { __data["inviteBatch"] }
|
||||
|
||||
/// InviteBatch
|
||||
///
|
||||
/// Parent Type: `InviteResult`
|
||||
public struct InviteBatch: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InviteResult }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("email", String.self),
|
||||
.field("inviteId", String?.self),
|
||||
.field("sentSuccess", Bool.self),
|
||||
] }
|
||||
|
||||
public var email: String { __data["email"] }
|
||||
/// Invite id, null if invite record create failed
|
||||
public var inviteId: String? { __data["inviteId"] }
|
||||
/// Invite email sent success
|
||||
public var sentSuccess: Bool { __data["sentSuccess"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class LeaveWorkspaceMutation: GraphQLMutation {
|
||||
public static let operationName: String = "leaveWorkspace"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation leaveWorkspace($workspaceId: String!, $sendLeaveMail: Boolean) { leaveWorkspace(workspaceId: $workspaceId, sendLeaveMail: $sendLeaveMail) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var sendLeaveMail: GraphQLNullable<Bool>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
sendLeaveMail: GraphQLNullable<Bool>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.sendLeaveMail = sendLeaveMail
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"sendLeaveMail": sendLeaveMail
|
||||
] }
|
||||
|
||||
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("leaveWorkspace", Bool.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"sendLeaveMail": .variable("sendLeaveMail")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var leaveWorkspace: Bool { __data["leaveWorkspace"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class PublishPageMutation: GraphQLMutation {
|
||||
public static let operationName: String = "publishPage"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation publishPage($workspaceId: String!, $pageId: String!, $mode: PublicPageMode = Page) { publishPage(workspaceId: $workspaceId, pageId: $pageId, mode: $mode) { __typename id mode } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pageId: String
|
||||
public var mode: GraphQLNullable<GraphQLEnum<PublicPageMode>>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pageId: String,
|
||||
mode: GraphQLNullable<GraphQLEnum<PublicPageMode>> = .init(.page)
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pageId = pageId
|
||||
self.mode = mode
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pageId": pageId,
|
||||
"mode": mode
|
||||
] }
|
||||
|
||||
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("publishPage", PublishPage.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"pageId": .variable("pageId"),
|
||||
"mode": .variable("mode")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var publishPage: PublishPage { __data["publishPage"] }
|
||||
|
||||
/// PublishPage
|
||||
///
|
||||
/// Parent Type: `WorkspacePage`
|
||||
public struct PublishPage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("mode", GraphQLEnum<AffineGraphQL.PublicPageMode>.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var mode: GraphQLEnum<AffineGraphQL.PublicPageMode> { __data["mode"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RecoverDocMutation: GraphQLMutation {
|
||||
public static let operationName: String = "recoverDoc"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation recoverDoc($workspaceId: String!, $docId: String!, $timestamp: DateTime!) { recoverDoc(workspaceId: $workspaceId, guid: $docId, timestamp: $timestamp) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
public var timestamp: DateTime
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String,
|
||||
timestamp: DateTime
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.timestamp = timestamp
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"timestamp": timestamp
|
||||
] }
|
||||
|
||||
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("recoverDoc", AffineGraphQL.DateTime.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"guid": .variable("docId"),
|
||||
"timestamp": .variable("timestamp")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var recoverDoc: AffineGraphQL.DateTime { __data["recoverDoc"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ReleaseDeletedBlobsMutation: GraphQLMutation {
|
||||
public static let operationName: String = "releaseDeletedBlobs"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation releaseDeletedBlobs($workspaceId: String!) { releaseDeletedBlobs(workspaceId: $workspaceId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("releaseDeletedBlobs", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
public var releaseDeletedBlobs: Bool { __data["releaseDeletedBlobs"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RemoveAvatarMutation: GraphQLMutation {
|
||||
public static let operationName: String = "removeAvatar"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation removeAvatar { removeAvatar { __typename success } }"#
|
||||
))
|
||||
|
||||
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("removeAvatar", RemoveAvatar.self),
|
||||
] }
|
||||
|
||||
/// Remove user avatar
|
||||
public var removeAvatar: RemoveAvatar { __data["removeAvatar"] }
|
||||
|
||||
/// RemoveAvatar
|
||||
///
|
||||
/// Parent Type: `RemoveAvatar`
|
||||
public struct RemoveAvatar: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.RemoveAvatar }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("success", Bool.self),
|
||||
] }
|
||||
|
||||
public var success: Bool { __data["success"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RemoveWorkspaceFeatureMutation: GraphQLMutation {
|
||||
public static let operationName: String = "removeWorkspaceFeature"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation removeWorkspaceFeature($workspaceId: String!, $feature: FeatureType!) { removeWorkspaceFeature(workspaceId: $workspaceId, feature: $feature) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var feature: GraphQLEnum<FeatureType>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
feature: GraphQLEnum<FeatureType>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.feature = feature
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"feature": feature
|
||||
] }
|
||||
|
||||
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("removeWorkspaceFeature", Int.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"feature": .variable("feature")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var removeWorkspaceFeature: Int { __data["removeWorkspaceFeature"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ResumeSubscriptionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "resumeSubscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation resumeSubscription($plan: SubscriptionPlan = Pro, $workspaceId: String) { resumeSubscription(plan: $plan, workspaceId: $workspaceId) { __typename id status nextBillAt start end } }"#
|
||||
))
|
||||
|
||||
public var plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>>
|
||||
public var workspaceId: GraphQLNullable<String>
|
||||
|
||||
public init(
|
||||
plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>> = .init(.pro),
|
||||
workspaceId: GraphQLNullable<String>
|
||||
) {
|
||||
self.plan = plan
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"plan": plan,
|
||||
"workspaceId": workspaceId
|
||||
] }
|
||||
|
||||
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("resumeSubscription", ResumeSubscription.self, arguments: [
|
||||
"plan": .variable("plan"),
|
||||
"workspaceId": .variable("workspaceId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var resumeSubscription: ResumeSubscription { __data["resumeSubscription"] }
|
||||
|
||||
/// ResumeSubscription
|
||||
///
|
||||
/// Parent Type: `SubscriptionType`
|
||||
public struct ResumeSubscription: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SubscriptionType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String?.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.SubscriptionStatus>.self),
|
||||
.field("nextBillAt", AffineGraphQL.DateTime?.self),
|
||||
.field("start", AffineGraphQL.DateTime.self),
|
||||
.field("end", AffineGraphQL.DateTime?.self),
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "removed")
|
||||
public var id: String? { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.SubscriptionStatus> { __data["status"] }
|
||||
public var nextBillAt: AffineGraphQL.DateTime? { __data["nextBillAt"] }
|
||||
public var start: AffineGraphQL.DateTime { __data["start"] }
|
||||
public var end: AffineGraphQL.DateTime? { __data["end"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RevokeInviteLinkMutation: GraphQLMutation {
|
||||
public static let operationName: String = "revokeInviteLink"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation revokeInviteLink($workspaceId: String!) { revokeInviteLink(workspaceId: $workspaceId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("revokeInviteLink", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
public var revokeInviteLink: Bool { __data["revokeInviteLink"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RevokeMemberPermissionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "revokeMemberPermission"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation revokeMemberPermission($workspaceId: String!, $userId: String!) { revoke(workspaceId: $workspaceId, userId: $userId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var userId: String
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
userId: String
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.userId = userId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"userId": userId
|
||||
] }
|
||||
|
||||
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("revoke", Bool.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"userId": .variable("userId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var revoke: Bool { __data["revoke"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class RevokePublicPageMutation: GraphQLMutation {
|
||||
public static let operationName: String = "revokePublicPage"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation revokePublicPage($workspaceId: String!, $pageId: String!) { revokePublicPage(workspaceId: $workspaceId, pageId: $pageId) { __typename id mode public } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pageId: String
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pageId: String
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pageId = pageId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pageId": pageId
|
||||
] }
|
||||
|
||||
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("revokePublicPage", RevokePublicPage.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"pageId": .variable("pageId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var revokePublicPage: RevokePublicPage { __data["revokePublicPage"] }
|
||||
|
||||
/// RevokePublicPage
|
||||
///
|
||||
/// Parent Type: `WorkspacePage`
|
||||
public struct RevokePublicPage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("mode", GraphQLEnum<AffineGraphQL.PublicPageMode>.self),
|
||||
.field("public", Bool.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var mode: GraphQLEnum<AffineGraphQL.PublicPageMode> { __data["mode"] }
|
||||
public var `public`: Bool { __data["public"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SendChangeEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "sendChangeEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation sendChangeEmail($callbackUrl: String!) { sendChangeEmail(callbackUrl: $callbackUrl) }"#
|
||||
))
|
||||
|
||||
public var callbackUrl: String
|
||||
|
||||
public init(callbackUrl: String) {
|
||||
self.callbackUrl = callbackUrl
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["callbackUrl": callbackUrl] }
|
||||
|
||||
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("sendChangeEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
|
||||
] }
|
||||
|
||||
public var sendChangeEmail: Bool { __data["sendChangeEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SendChangePasswordEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "sendChangePasswordEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation sendChangePasswordEmail($callbackUrl: String!) { sendChangePasswordEmail(callbackUrl: $callbackUrl) }"#
|
||||
))
|
||||
|
||||
public var callbackUrl: String
|
||||
|
||||
public init(callbackUrl: String) {
|
||||
self.callbackUrl = callbackUrl
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["callbackUrl": callbackUrl] }
|
||||
|
||||
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("sendChangePasswordEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
|
||||
] }
|
||||
|
||||
public var sendChangePasswordEmail: Bool { __data["sendChangePasswordEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SendSetPasswordEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "sendSetPasswordEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation sendSetPasswordEmail($callbackUrl: String!) { sendSetPasswordEmail(callbackUrl: $callbackUrl) }"#
|
||||
))
|
||||
|
||||
public var callbackUrl: String
|
||||
|
||||
public init(callbackUrl: String) {
|
||||
self.callbackUrl = callbackUrl
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["callbackUrl": callbackUrl] }
|
||||
|
||||
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("sendSetPasswordEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
|
||||
] }
|
||||
|
||||
public var sendSetPasswordEmail: Bool { __data["sendSetPasswordEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SendVerifyChangeEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "sendVerifyChangeEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation sendVerifyChangeEmail($token: String!, $email: String!, $callbackUrl: String!) { sendVerifyChangeEmail(token: $token, email: $email, callbackUrl: $callbackUrl) }"#
|
||||
))
|
||||
|
||||
public var token: String
|
||||
public var email: String
|
||||
public var callbackUrl: String
|
||||
|
||||
public init(
|
||||
token: String,
|
||||
email: String,
|
||||
callbackUrl: String
|
||||
) {
|
||||
self.token = token
|
||||
self.email = email
|
||||
self.callbackUrl = callbackUrl
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"token": token,
|
||||
"email": email,
|
||||
"callbackUrl": callbackUrl
|
||||
] }
|
||||
|
||||
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("sendVerifyChangeEmail", Bool.self, arguments: [
|
||||
"token": .variable("token"),
|
||||
"email": .variable("email"),
|
||||
"callbackUrl": .variable("callbackUrl")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var sendVerifyChangeEmail: Bool { __data["sendVerifyChangeEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SendVerifyEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "sendVerifyEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation sendVerifyEmail($callbackUrl: String!) { sendVerifyEmail(callbackUrl: $callbackUrl) }"#
|
||||
))
|
||||
|
||||
public var callbackUrl: String
|
||||
|
||||
public init(callbackUrl: String) {
|
||||
self.callbackUrl = callbackUrl
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["callbackUrl": callbackUrl] }
|
||||
|
||||
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("sendVerifyEmail", Bool.self, arguments: ["callbackUrl": .variable("callbackUrl")]),
|
||||
] }
|
||||
|
||||
public var sendVerifyEmail: Bool { __data["sendVerifyEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SetBlobMutation: GraphQLMutation {
|
||||
public static let operationName: String = "setBlob"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation setBlob($workspaceId: String!, $blob: Upload!) { setBlob(workspaceId: $workspaceId, blob: $blob) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var blob: Upload
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
blob: Upload
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.blob = blob
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"blob": blob
|
||||
] }
|
||||
|
||||
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("setBlob", String.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"blob": .variable("blob")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var setBlob: String { __data["setBlob"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SetEnableAiMutation: GraphQLMutation {
|
||||
public static let operationName: String = "setEnableAi"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation setEnableAi($id: ID!, $enableAi: Boolean!) { updateWorkspace(input: { id: $id, enableAi: $enableAi }) { __typename id } }"#
|
||||
))
|
||||
|
||||
public var id: ID
|
||||
public var enableAi: Bool
|
||||
|
||||
public init(
|
||||
id: ID,
|
||||
enableAi: Bool
|
||||
) {
|
||||
self.id = id
|
||||
self.enableAi = enableAi
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"id": id,
|
||||
"enableAi": enableAi
|
||||
] }
|
||||
|
||||
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("updateWorkspace", UpdateWorkspace.self, arguments: ["input": [
|
||||
"id": .variable("id"),
|
||||
"enableAi": .variable("enableAi")
|
||||
]]),
|
||||
] }
|
||||
|
||||
/// Update workspace
|
||||
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
|
||||
|
||||
/// UpdateWorkspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct UpdateWorkspace: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SetEnableUrlPreviewMutation: GraphQLMutation {
|
||||
public static let operationName: String = "setEnableUrlPreview"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation setEnableUrlPreview($id: ID!, $enableUrlPreview: Boolean!) { updateWorkspace(input: { id: $id, enableUrlPreview: $enableUrlPreview }) { __typename id } }"#
|
||||
))
|
||||
|
||||
public var id: ID
|
||||
public var enableUrlPreview: Bool
|
||||
|
||||
public init(
|
||||
id: ID,
|
||||
enableUrlPreview: Bool
|
||||
) {
|
||||
self.id = id
|
||||
self.enableUrlPreview = enableUrlPreview
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"id": id,
|
||||
"enableUrlPreview": enableUrlPreview
|
||||
] }
|
||||
|
||||
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("updateWorkspace", UpdateWorkspace.self, arguments: ["input": [
|
||||
"id": .variable("id"),
|
||||
"enableUrlPreview": .variable("enableUrlPreview")
|
||||
]]),
|
||||
] }
|
||||
|
||||
/// Update workspace
|
||||
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
|
||||
|
||||
/// UpdateWorkspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct UpdateWorkspace: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SetWorkspaceExperimentalFeatureMutation: GraphQLMutation {
|
||||
public static let operationName: String = "setWorkspaceExperimentalFeature"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation setWorkspaceExperimentalFeature($workspaceId: String!, $feature: FeatureType!, $enable: Boolean!) { setWorkspaceExperimentalFeature( workspaceId: $workspaceId feature: $feature enable: $enable ) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var feature: GraphQLEnum<FeatureType>
|
||||
public var enable: Bool
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
feature: GraphQLEnum<FeatureType>,
|
||||
enable: Bool
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.feature = feature
|
||||
self.enable = enable
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"feature": feature,
|
||||
"enable": enable
|
||||
] }
|
||||
|
||||
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("setWorkspaceExperimentalFeature", Bool.self, arguments: [
|
||||
"workspaceId": .variable("workspaceId"),
|
||||
"feature": .variable("feature"),
|
||||
"enable": .variable("enable")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var setWorkspaceExperimentalFeature: Bool { __data["setWorkspaceExperimentalFeature"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class SetWorkspacePublicByIdMutation: GraphQLMutation {
|
||||
public static let operationName: String = "setWorkspacePublicById"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation setWorkspacePublicById($id: ID!, $public: Boolean!) { updateWorkspace(input: { id: $id, public: $public }) { __typename id } }"#
|
||||
))
|
||||
|
||||
public var id: ID
|
||||
public var `public`: Bool
|
||||
|
||||
public init(
|
||||
id: ID,
|
||||
`public`: Bool
|
||||
) {
|
||||
self.id = id
|
||||
self.`public` = `public`
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"id": id,
|
||||
"public": `public`
|
||||
] }
|
||||
|
||||
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("updateWorkspace", UpdateWorkspace.self, arguments: ["input": [
|
||||
"id": .variable("id"),
|
||||
"public": .variable("public")
|
||||
]]),
|
||||
] }
|
||||
|
||||
/// Update workspace
|
||||
public var updateWorkspace: UpdateWorkspace { __data["updateWorkspace"] }
|
||||
|
||||
/// UpdateWorkspace
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct UpdateWorkspace: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateAccountFeaturesMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateAccountFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateAccountFeatures($userId: String!, $features: [FeatureType!]!) { updateUserFeatures(id: $userId, features: $features) }"#
|
||||
))
|
||||
|
||||
public var userId: String
|
||||
public var features: [GraphQLEnum<FeatureType>]
|
||||
|
||||
public init(
|
||||
userId: String,
|
||||
features: [GraphQLEnum<FeatureType>]
|
||||
) {
|
||||
self.userId = userId
|
||||
self.features = features
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"userId": userId,
|
||||
"features": features
|
||||
] }
|
||||
|
||||
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("updateUserFeatures", [GraphQLEnum<AffineGraphQL.FeatureType>].self, arguments: [
|
||||
"id": .variable("userId"),
|
||||
"features": .variable("features")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// update user enabled feature
|
||||
public var updateUserFeatures: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["updateUserFeatures"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateAccountMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateAccount"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateAccount($id: String!, $input: ManageUserInput!) { updateUser(id: $id, input: $input) { __typename id name email } }"#
|
||||
))
|
||||
|
||||
public var id: String
|
||||
public var input: ManageUserInput
|
||||
|
||||
public init(
|
||||
id: String,
|
||||
input: ManageUserInput
|
||||
) {
|
||||
self.id = id
|
||||
self.input = input
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"id": id,
|
||||
"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("updateUser", UpdateUser.self, arguments: [
|
||||
"id": .variable("id"),
|
||||
"input": .variable("input")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Update a user
|
||||
public var updateUser: UpdateUser { __data["updateUser"] }
|
||||
|
||||
/// UpdateUser
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct UpdateUser: 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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdatePromptMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updatePrompt"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updatePrompt($name: String!, $messages: [CopilotPromptMessageInput!]!) { updateCopilotPrompt(name: $name, messages: $messages) { __typename name model action config { __typename jsonMode frequencyPenalty presencePenalty temperature topP } messages { __typename role content params } } }"#
|
||||
))
|
||||
|
||||
public var name: String
|
||||
public var messages: [CopilotPromptMessageInput]
|
||||
|
||||
public init(
|
||||
name: String,
|
||||
messages: [CopilotPromptMessageInput]
|
||||
) {
|
||||
self.name = name
|
||||
self.messages = messages
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"name": name,
|
||||
"messages": messages
|
||||
] }
|
||||
|
||||
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("updateCopilotPrompt", UpdateCopilotPrompt.self, arguments: [
|
||||
"name": .variable("name"),
|
||||
"messages": .variable("messages")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Update a copilot prompt
|
||||
public var updateCopilotPrompt: UpdateCopilotPrompt { __data["updateCopilotPrompt"] }
|
||||
|
||||
/// UpdateCopilotPrompt
|
||||
///
|
||||
/// Parent Type: `CopilotPromptType`
|
||||
public struct UpdateCopilotPrompt: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("model", String.self),
|
||||
.field("action", String?.self),
|
||||
.field("config", Config?.self),
|
||||
.field("messages", [Message].self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var action: String? { __data["action"] }
|
||||
public var config: Config? { __data["config"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
|
||||
/// UpdateCopilotPrompt.Config
|
||||
///
|
||||
/// Parent Type: `CopilotPromptConfigType`
|
||||
public struct Config: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("jsonMode", Bool?.self),
|
||||
.field("frequencyPenalty", Double?.self),
|
||||
.field("presencePenalty", Double?.self),
|
||||
.field("temperature", Double?.self),
|
||||
.field("topP", Double?.self),
|
||||
] }
|
||||
|
||||
public var jsonMode: Bool? { __data["jsonMode"] }
|
||||
public var frequencyPenalty: Double? { __data["frequencyPenalty"] }
|
||||
public var presencePenalty: Double? { __data["presencePenalty"] }
|
||||
public var temperature: Double? { __data["temperature"] }
|
||||
public var topP: Double? { __data["topP"] }
|
||||
}
|
||||
|
||||
/// UpdateCopilotPrompt.Message
|
||||
///
|
||||
/// Parent Type: `CopilotPromptMessageType`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptMessageType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("role", GraphQLEnum<AffineGraphQL.CopilotPromptMessageRole>.self),
|
||||
.field("content", String.self),
|
||||
.field("params", AffineGraphQL.JSON?.self),
|
||||
] }
|
||||
|
||||
public var role: GraphQLEnum<AffineGraphQL.CopilotPromptMessageRole> { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var params: AffineGraphQL.JSON? { __data["params"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// @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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateSubscriptionMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateSubscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateSubscription($plan: SubscriptionPlan = Pro, $recurring: SubscriptionRecurring!, $workspaceId: String) { updateSubscriptionRecurring( plan: $plan recurring: $recurring workspaceId: $workspaceId ) { __typename id plan recurring nextBillAt } }"#
|
||||
))
|
||||
|
||||
public var plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>>
|
||||
public var recurring: GraphQLEnum<SubscriptionRecurring>
|
||||
public var workspaceId: GraphQLNullable<String>
|
||||
|
||||
public init(
|
||||
plan: GraphQLNullable<GraphQLEnum<SubscriptionPlan>> = .init(.pro),
|
||||
recurring: GraphQLEnum<SubscriptionRecurring>,
|
||||
workspaceId: GraphQLNullable<String>
|
||||
) {
|
||||
self.plan = plan
|
||||
self.recurring = recurring
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"plan": plan,
|
||||
"recurring": recurring,
|
||||
"workspaceId": workspaceId
|
||||
] }
|
||||
|
||||
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("updateSubscriptionRecurring", UpdateSubscriptionRecurring.self, arguments: [
|
||||
"plan": .variable("plan"),
|
||||
"recurring": .variable("recurring"),
|
||||
"workspaceId": .variable("workspaceId")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var updateSubscriptionRecurring: UpdateSubscriptionRecurring { __data["updateSubscriptionRecurring"] }
|
||||
|
||||
/// UpdateSubscriptionRecurring
|
||||
///
|
||||
/// Parent Type: `SubscriptionType`
|
||||
public struct UpdateSubscriptionRecurring: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SubscriptionType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String?.self),
|
||||
.field("plan", GraphQLEnum<AffineGraphQL.SubscriptionPlan>.self),
|
||||
.field("recurring", GraphQLEnum<AffineGraphQL.SubscriptionRecurring>.self),
|
||||
.field("nextBillAt", AffineGraphQL.DateTime?.self),
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "removed")
|
||||
public var id: String? { __data["id"] }
|
||||
/// The 'Free' plan just exists to be a placeholder and for the type convenience of frontend.
|
||||
/// There won't actually be a subscription with plan 'Free'
|
||||
public var plan: GraphQLEnum<AffineGraphQL.SubscriptionPlan> { __data["plan"] }
|
||||
public var recurring: GraphQLEnum<AffineGraphQL.SubscriptionRecurring> { __data["recurring"] }
|
||||
public var nextBillAt: AffineGraphQL.DateTime? { __data["nextBillAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UpdateUserProfileMutation: GraphQLMutation {
|
||||
public static let operationName: String = "updateUserProfile"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation updateUserProfile($input: UpdateUserInput!) { updateProfile(input: $input) { __typename id name } }"#
|
||||
))
|
||||
|
||||
public var input: UpdateUserInput
|
||||
|
||||
public init(input: UpdateUserInput) {
|
||||
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("updateProfile", UpdateProfile.self, arguments: ["input": .variable("input")]),
|
||||
] }
|
||||
|
||||
public var updateProfile: UpdateProfile { __data["updateProfile"] }
|
||||
|
||||
/// UpdateProfile
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct UpdateProfile: 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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class UploadAvatarMutation: GraphQLMutation {
|
||||
public static let operationName: String = "uploadAvatar"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation uploadAvatar($avatar: Upload!) { uploadAvatar(avatar: $avatar) { __typename id name avatarUrl email } }"#
|
||||
))
|
||||
|
||||
public var avatar: Upload
|
||||
|
||||
public init(avatar: Upload) {
|
||||
self.avatar = avatar
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["avatar": avatar] }
|
||||
|
||||
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("uploadAvatar", UploadAvatar.self, arguments: ["avatar": .variable("avatar")]),
|
||||
] }
|
||||
|
||||
/// Upload user avatar
|
||||
public var uploadAvatar: UploadAvatar { __data["uploadAvatar"] }
|
||||
|
||||
/// UploadAvatar
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct UploadAvatar: 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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("email", String.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class VerifyEmailMutation: GraphQLMutation {
|
||||
public static let operationName: String = "verifyEmail"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"mutation verifyEmail($token: String!) { verifyEmail(token: $token) }"#
|
||||
))
|
||||
|
||||
public var token: String
|
||||
|
||||
public init(token: String) {
|
||||
self.token = token
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["token": token] }
|
||||
|
||||
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("verifyEmail", Bool.self, arguments: ["token": .variable("token")]),
|
||||
] }
|
||||
|
||||
public var verifyEmail: Bool { __data["verifyEmail"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class AdminServerConfigQuery: GraphQLQuery {
|
||||
public static let operationName: String = "adminServerConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query adminServerConfig { serverConfig { __typename version baseUrl name features type initialized credentialsRequirement { __typename ...CredentialsRequirements } availableUserFeatures } }"#,
|
||||
fragments: [CredentialsRequirements.self, PasswordLimits.self]
|
||||
))
|
||||
|
||||
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("serverConfig", ServerConfig.self),
|
||||
] }
|
||||
|
||||
/// server config
|
||||
public var serverConfig: ServerConfig { __data["serverConfig"] }
|
||||
|
||||
/// ServerConfig
|
||||
///
|
||||
/// Parent Type: `ServerConfigType`
|
||||
public struct ServerConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("version", String.self),
|
||||
.field("baseUrl", String.self),
|
||||
.field("name", String.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.ServerFeature>].self),
|
||||
.field("type", GraphQLEnum<AffineGraphQL.ServerDeploymentType>.self),
|
||||
.field("initialized", Bool.self),
|
||||
.field("credentialsRequirement", CredentialsRequirement.self),
|
||||
.field("availableUserFeatures", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
/// server version
|
||||
public var version: String { __data["version"] }
|
||||
/// server base url
|
||||
public var baseUrl: String { __data["baseUrl"] }
|
||||
/// server identical name could be shown as badge on user interface
|
||||
public var name: String { __data["name"] }
|
||||
/// enabled server features
|
||||
public var features: [GraphQLEnum<AffineGraphQL.ServerFeature>] { __data["features"] }
|
||||
/// server type
|
||||
public var type: GraphQLEnum<AffineGraphQL.ServerDeploymentType> { __data["type"] }
|
||||
/// whether server has been initialized
|
||||
public var initialized: Bool { __data["initialized"] }
|
||||
/// credentials requirement
|
||||
public var credentialsRequirement: CredentialsRequirement { __data["credentialsRequirement"] }
|
||||
/// Features for user that can be configured
|
||||
public var availableUserFeatures: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["availableUserFeatures"] }
|
||||
|
||||
/// ServerConfig.CredentialsRequirement
|
||||
///
|
||||
/// Parent Type: `CredentialsRequirementType`
|
||||
public struct CredentialsRequirement: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CredentialsRequirementType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(CredentialsRequirements.self),
|
||||
] }
|
||||
|
||||
public var password: Password { __data["password"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var credentialsRequirements: CredentialsRequirements { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias Password = CredentialsRequirements.Password
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class AvailableFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "availableFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query availableFeatures($id: String!) { workspace(id: $id) { __typename availableFeatures } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// 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("availableFeatures", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
/// Available features of workspace
|
||||
public var availableFeatures: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["availableFeatures"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class CopilotQuotaQuery: GraphQLQuery {
|
||||
public static let operationName: String = "copilotQuota"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query copilotQuota { currentUser { __typename copilot { __typename quota { __typename limit used } } } }"#
|
||||
))
|
||||
|
||||
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("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("quota", Quota.self),
|
||||
] }
|
||||
|
||||
/// Get the quota of the user in the workspace
|
||||
public var quota: Quota { __data["quota"] }
|
||||
|
||||
/// CurrentUser.Copilot.Quota
|
||||
///
|
||||
/// Parent Type: `CopilotQuota`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotQuota }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("limit", AffineGraphQL.SafeInt?.self),
|
||||
.field("used", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
|
||||
public var limit: AffineGraphQL.SafeInt? { __data["limit"] }
|
||||
public var used: AffineGraphQL.SafeInt { __data["used"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class EnabledFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "enabledFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query enabledFeatures($id: String!) { workspace(id: $id) { __typename features } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// 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("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
/// Enabled features of workspace
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
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 tokens action createdAt messages { __typename id role content attachments createdAt } } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: GraphQLNullable<String>,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"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("histories", [History].self, arguments: [
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: 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("tokens", Int.self),
|
||||
.field("action", String?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("messages", [Message].self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
/// 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"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.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("content", String.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 attachments: [String]? { __data["attachments"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
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 messages { __typename id role createdAt } } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: GraphQLNullable<String>
|
||||
public var options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: GraphQLNullable<String>,
|
||||
options: GraphQLNullable<QueryChatHistoriesInput>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
self.options = options
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId,
|
||||
"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("histories", [History].self, arguments: [
|
||||
"docId": .variable("docId"),
|
||||
"options": .variable("options")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
|
||||
/// CurrentUser.Copilot.History
|
||||
///
|
||||
/// Parent Type: `CopilotHistories`
|
||||
public struct History: 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("messages", [Message].self),
|
||||
] }
|
||||
|
||||
public var sessionId: String { __data["sessionId"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
|
||||
/// CurrentUser.Copilot.History.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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCopilotSessionsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCopilotSessions"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCopilotSessions($workspaceId: String!) { currentUser { __typename copilot(workspaceId: $workspaceId) { __typename actions chats } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("actions", [String].self),
|
||||
.field("chats", [String].self),
|
||||
] }
|
||||
|
||||
/// Get the session list of actions in the workspace
|
||||
public var actions: [String] { __data["actions"] }
|
||||
/// Get the session list of chats in the workspace
|
||||
public var chats: [String] { __data["chats"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCurrentUserFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCurrentUserFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCurrentUserFeatures { currentUser { __typename id name email emailVerified avatarUrl features } }"#
|
||||
))
|
||||
|
||||
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("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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// User email verified
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCurrentUserQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCurrentUser"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCurrentUser { currentUser { __typename id name email emailVerified avatarUrl token { __typename sessionToken } } }"#
|
||||
))
|
||||
|
||||
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("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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("token", Token.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// User email verified
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
@available(*, deprecated, message: "use [/api/auth/sign-in?native=true] instead")
|
||||
public var token: Token { __data["token"] }
|
||||
|
||||
/// CurrentUser.Token
|
||||
///
|
||||
/// Parent Type: `TokenType`
|
||||
public struct Token: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.TokenType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("sessionToken", String?.self),
|
||||
] }
|
||||
|
||||
public var sessionToken: String? { __data["sessionToken"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
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 } } }"#
|
||||
))
|
||||
|
||||
public var inviteId: String
|
||||
|
||||
public init(inviteId: String) {
|
||||
self.inviteId = inviteId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["inviteId": inviteId] }
|
||||
|
||||
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("getInviteInfo", GetInviteInfo.self, arguments: ["inviteId": .variable("inviteId")]),
|
||||
] }
|
||||
|
||||
/// send workspace invitation
|
||||
public var getInviteInfo: GetInviteInfo { __data["getInviteInfo"] }
|
||||
|
||||
/// GetInviteInfo
|
||||
///
|
||||
/// Parent Type: `InvitationType`
|
||||
public struct GetInviteInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InvitationType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("workspace", Workspace.self),
|
||||
.field("user", User.self),
|
||||
] }
|
||||
|
||||
/// Workspace information
|
||||
public var workspace: Workspace { __data["workspace"] }
|
||||
/// User information
|
||||
public var user: User { __data["user"] }
|
||||
|
||||
/// GetInviteInfo.Workspace
|
||||
///
|
||||
/// Parent Type: `InvitationWorkspaceType`
|
||||
public struct Workspace: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InvitationWorkspaceType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("avatar", String.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// Workspace name
|
||||
public var name: String { __data["name"] }
|
||||
/// Base64 encoded avatar
|
||||
public var avatar: String { __data["avatar"] }
|
||||
}
|
||||
|
||||
/// GetInviteInfo.User
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
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 __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetInvoicesCountQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getInvoicesCount"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getInvoicesCount { currentUser { __typename invoiceCount } }"#
|
||||
))
|
||||
|
||||
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("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("invoiceCount", Int.self),
|
||||
] }
|
||||
|
||||
/// Get user invoice count
|
||||
public var invoiceCount: Int { __data["invoiceCount"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetIsAdminQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getIsAdmin"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getIsAdmin($workspaceId: String!) { isAdmin(workspaceId: $workspaceId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("isAdmin", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
/// Get is admin of workspace
|
||||
public var isAdmin: Bool { __data["isAdmin"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetIsOwnerQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getIsOwner"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getIsOwner($workspaceId: String!) { isOwner(workspaceId: $workspaceId) }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("isOwner", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
/// Get is owner of workspace
|
||||
public var isOwner: Bool { __data["isOwner"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetMemberCountByWorkspaceIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getMemberCountByWorkspaceId"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getMemberCountByWorkspaceId($workspaceId: String!) { workspace(id: $workspaceId) { __typename memberCount } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("memberCount", Int.self),
|
||||
] }
|
||||
|
||||
/// member count of workspace
|
||||
public var memberCount: Int { __data["memberCount"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetMembersByWorkspaceIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getMembersByWorkspaceId"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getMembersByWorkspaceId($workspaceId: String!, $skip: Int!, $take: Int!) { workspace(id: $workspaceId) { __typename memberCount members(skip: $skip, take: $take) { __typename id name email avatarUrl permission inviteId emailVerified status } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var skip: Int
|
||||
public var take: Int
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
skip: Int,
|
||||
take: Int
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.skip = skip
|
||||
self.take = take
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"skip": skip,
|
||||
"take": take
|
||||
] }
|
||||
|
||||
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("memberCount", Int.self),
|
||||
.field("members", [Member].self, arguments: [
|
||||
"skip": .variable("skip"),
|
||||
"take": .variable("take")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// member count of workspace
|
||||
public var memberCount: Int { __data["memberCount"] }
|
||||
/// Members of workspace
|
||||
public var members: [Member] { __data["members"] }
|
||||
|
||||
/// Workspace.Member
|
||||
///
|
||||
/// Parent Type: `InviteUserType`
|
||||
public struct Member: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InviteUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("name", String?.self),
|
||||
.field("email", String?.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("permission", GraphQLEnum<AffineGraphQL.Permission>.self),
|
||||
.field("inviteId", String.self),
|
||||
.field("emailVerified", Bool?.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.WorkspaceMemberStatus>.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String? { __data["name"] }
|
||||
/// User email
|
||||
public var email: String? { __data["email"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
/// User permission in workspace
|
||||
public var permission: GraphQLEnum<AffineGraphQL.Permission> { __data["permission"] }
|
||||
/// Invite id
|
||||
public var inviteId: String { __data["inviteId"] }
|
||||
/// User email verified
|
||||
public var emailVerified: Bool? { __data["emailVerified"] }
|
||||
/// Member invite status in workspace
|
||||
public var status: GraphQLEnum<AffineGraphQL.WorkspaceMemberStatus> { __data["status"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetPromptsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getPrompts"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getPrompts { listCopilotPrompts { __typename name model action config { __typename jsonMode frequencyPenalty presencePenalty temperature topP } messages { __typename role content params } } }"#
|
||||
))
|
||||
|
||||
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("listCopilotPrompts", [ListCopilotPrompt].self),
|
||||
] }
|
||||
|
||||
/// List all copilot prompts
|
||||
public var listCopilotPrompts: [ListCopilotPrompt] { __data["listCopilotPrompts"] }
|
||||
|
||||
/// ListCopilotPrompt
|
||||
///
|
||||
/// Parent Type: `CopilotPromptType`
|
||||
public struct ListCopilotPrompt: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("model", String.self),
|
||||
.field("action", String?.self),
|
||||
.field("config", Config?.self),
|
||||
.field("messages", [Message].self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var model: String { __data["model"] }
|
||||
public var action: String? { __data["action"] }
|
||||
public var config: Config? { __data["config"] }
|
||||
public var messages: [Message] { __data["messages"] }
|
||||
|
||||
/// ListCopilotPrompt.Config
|
||||
///
|
||||
/// Parent Type: `CopilotPromptConfigType`
|
||||
public struct Config: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("jsonMode", Bool?.self),
|
||||
.field("frequencyPenalty", Double?.self),
|
||||
.field("presencePenalty", Double?.self),
|
||||
.field("temperature", Double?.self),
|
||||
.field("topP", Double?.self),
|
||||
] }
|
||||
|
||||
public var jsonMode: Bool? { __data["jsonMode"] }
|
||||
public var frequencyPenalty: Double? { __data["frequencyPenalty"] }
|
||||
public var presencePenalty: Double? { __data["presencePenalty"] }
|
||||
public var temperature: Double? { __data["temperature"] }
|
||||
public var topP: Double? { __data["topP"] }
|
||||
}
|
||||
|
||||
/// ListCopilotPrompt.Message
|
||||
///
|
||||
/// Parent Type: `CopilotPromptMessageType`
|
||||
public struct Message: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CopilotPromptMessageType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("role", GraphQLEnum<AffineGraphQL.CopilotPromptMessageRole>.self),
|
||||
.field("content", String.self),
|
||||
.field("params", AffineGraphQL.JSON?.self),
|
||||
] }
|
||||
|
||||
public var role: GraphQLEnum<AffineGraphQL.CopilotPromptMessageRole> { __data["role"] }
|
||||
public var content: String { __data["content"] }
|
||||
public var params: AffineGraphQL.JSON? { __data["params"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
// @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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// @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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
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 } } } }"#
|
||||
))
|
||||
|
||||
public var email: String
|
||||
|
||||
public init(email: String) {
|
||||
self.email = email
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["email": email] }
|
||||
|
||||
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("userByEmail", UserByEmail?.self, arguments: ["email": .variable("email")]),
|
||||
] }
|
||||
|
||||
/// Get user by email for admin
|
||||
public var userByEmail: UserByEmail? { __data["userByEmail"] }
|
||||
|
||||
/// UserByEmail
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct UserByEmail: 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("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
.field("hasPassword", Bool?.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("quota", Quota?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
/// User password has been set
|
||||
public var hasPassword: Bool? { __data["hasPassword"] }
|
||||
/// User email verified
|
||||
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: `UserQuota`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuota }
|
||||
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: `UserQuotaHumanReadable`
|
||||
public struct HumanReadable: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaHumanReadable }
|
||||
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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetUserFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getUserFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getUserFeatures { currentUser { __typename id features } }"#
|
||||
))
|
||||
|
||||
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("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("id", AffineGraphQL.ID.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetUserQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getUser"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getUser($email: String!) { user(email: $email) { __typename ... on UserType { id name avatarUrl email hasPassword } ... on LimitedUserType { email hasPassword } } }"#
|
||||
))
|
||||
|
||||
public var email: String
|
||||
|
||||
public init(email: String) {
|
||||
self.email = email
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["email": email] }
|
||||
|
||||
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("user", User?.self, arguments: ["email": .variable("email")]),
|
||||
] }
|
||||
|
||||
/// Get user by email
|
||||
public var user: User? { __data["user"] }
|
||||
|
||||
/// User
|
||||
///
|
||||
/// Parent Type: `UserOrLimitedUser`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Unions.UserOrLimitedUser }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.inlineFragment(AsUserType.self),
|
||||
.inlineFragment(AsLimitedUserType.self),
|
||||
] }
|
||||
|
||||
public var asUserType: AsUserType? { _asInlineFragment() }
|
||||
public var asLimitedUserType: AsLimitedUserType? { _asInlineFragment() }
|
||||
|
||||
/// User.AsUserType
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct AsUserType: AffineGraphQL.InlineFragment {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public typealias RootEntityType = GetUserQuery.Data.User
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
.field("email", String.self),
|
||||
.field("hasPassword", Bool?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// User password has been set
|
||||
public var hasPassword: Bool? { __data["hasPassword"] }
|
||||
}
|
||||
|
||||
/// User.AsLimitedUserType
|
||||
///
|
||||
/// Parent Type: `LimitedUserType`
|
||||
public struct AsLimitedUserType: AffineGraphQL.InlineFragment {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public typealias RootEntityType = GetUserQuery.Data.User
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.LimitedUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("email", String.self),
|
||||
.field("hasPassword", Bool?.self),
|
||||
] }
|
||||
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// User password has been set
|
||||
public var hasPassword: Bool? { __data["hasPassword"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetUsersCountQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getUsersCount"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getUsersCount { usersCount }"#
|
||||
))
|
||||
|
||||
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("usersCount", Int.self),
|
||||
] }
|
||||
|
||||
/// Get users count
|
||||
public var usersCount: Int { __data["usersCount"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceConfigQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaceConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaceConfig($id: String!) { workspace(id: $id) { __typename enableAi enableUrlPreview inviteLink { __typename link expireTime } } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// 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("enableAi", Bool.self),
|
||||
.field("enableUrlPreview", Bool.self),
|
||||
.field("inviteLink", InviteLink?.self),
|
||||
] }
|
||||
|
||||
/// Enable AI
|
||||
public var enableAi: Bool { __data["enableAi"] }
|
||||
/// Enable url previous when sharing
|
||||
public var enableUrlPreview: Bool { __data["enableUrlPreview"] }
|
||||
/// invite link for workspace
|
||||
public var inviteLink: InviteLink? { __data["inviteLink"] }
|
||||
|
||||
/// Workspace.InviteLink
|
||||
///
|
||||
/// Parent Type: `InviteLink`
|
||||
public struct InviteLink: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InviteLink }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("link", String.self),
|
||||
.field("expireTime", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
/// Invite link
|
||||
public var link: String { __data["link"] }
|
||||
/// Invite link expire time
|
||||
public var expireTime: AffineGraphQL.DateTime { __data["expireTime"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaceFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaceFeatures($workspaceId: String!) { workspace(id: $workspaceId) { __typename features } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
/// Enabled features of workspace
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceInfoQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaceInfo"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaceInfo($workspaceId: String!) { isAdmin(workspaceId: $workspaceId) isOwner(workspaceId: $workspaceId) workspace(id: $workspaceId) { __typename team } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("isAdmin", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
.field("isOwner", Bool.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("workspaceId")]),
|
||||
] }
|
||||
|
||||
/// Get is admin of workspace
|
||||
public var isAdmin: Bool { __data["isAdmin"] }
|
||||
/// Get is owner of workspace
|
||||
public var isOwner: Bool { __data["isOwner"] }
|
||||
/// 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("team", Bool.self),
|
||||
] }
|
||||
|
||||
/// if workspace is team workspace
|
||||
public var team: Bool { __data["team"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspacePageMetaByIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspacePageMetaById"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspacePageMetaById($id: String!, $pageId: String!) { workspace(id: $id) { __typename pageMeta(pageId: $pageId) { __typename createdAt updatedAt createdBy { __typename name avatarUrl } updatedBy { __typename name avatarUrl } } } }"#
|
||||
))
|
||||
|
||||
public var id: String
|
||||
public var pageId: String
|
||||
|
||||
public init(
|
||||
id: String,
|
||||
pageId: String
|
||||
) {
|
||||
self.id = id
|
||||
self.pageId = pageId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"id": id,
|
||||
"pageId": pageId
|
||||
] }
|
||||
|
||||
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("id")]),
|
||||
] }
|
||||
|
||||
/// 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("pageMeta", PageMeta.self, arguments: ["pageId": .variable("pageId")]),
|
||||
] }
|
||||
|
||||
/// Cloud page metadata of workspace
|
||||
public var pageMeta: PageMeta { __data["pageMeta"] }
|
||||
|
||||
/// Workspace.PageMeta
|
||||
///
|
||||
/// Parent Type: `WorkspacePageMeta`
|
||||
public struct PageMeta: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePageMeta }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("updatedAt", AffineGraphQL.DateTime.self),
|
||||
.field("createdBy", CreatedBy?.self),
|
||||
.field("updatedBy", UpdatedBy?.self),
|
||||
] }
|
||||
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var updatedAt: AffineGraphQL.DateTime { __data["updatedAt"] }
|
||||
public var createdBy: CreatedBy? { __data["createdBy"] }
|
||||
public var updatedBy: UpdatedBy? { __data["updatedBy"] }
|
||||
|
||||
/// Workspace.PageMeta.CreatedBy
|
||||
///
|
||||
/// Parent Type: `EditorType`
|
||||
public struct CreatedBy: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.EditorType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
|
||||
/// Workspace.PageMeta.UpdatedBy
|
||||
///
|
||||
/// Parent Type: `EditorType`
|
||||
public struct UpdatedBy: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.EditorType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspacePublicByIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspacePublicById"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspacePublicById($id: String!) { workspace(id: $id) { __typename public } }"#
|
||||
))
|
||||
|
||||
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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// 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("public", Bool.self),
|
||||
] }
|
||||
|
||||
/// is Public workspace
|
||||
public var `public`: Bool { __data["public"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspacePublicPageByIdQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspacePublicPageById"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspacePublicPageById($workspaceId: String!, $pageId: String!) { workspace(id: $workspaceId) { __typename publicPage(pageId: $pageId) { __typename id mode } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pageId: String
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pageId: String
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pageId = pageId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pageId": pageId
|
||||
] }
|
||||
|
||||
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("publicPage", PublicPage?.self, arguments: ["pageId": .variable("pageId")]),
|
||||
] }
|
||||
|
||||
/// Get public page of a workspace by page id.
|
||||
public var publicPage: PublicPage? { __data["publicPage"] }
|
||||
|
||||
/// Workspace.PublicPage
|
||||
///
|
||||
/// Parent Type: `WorkspacePage`
|
||||
public struct PublicPage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("mode", GraphQLEnum<AffineGraphQL.PublicPageMode>.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var mode: GraphQLEnum<AffineGraphQL.PublicPageMode> { __data["mode"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspacePublicPagesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspacePublicPages"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspacePublicPages($workspaceId: String!) { workspace(id: $workspaceId) { __typename publicPages { __typename id mode } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("publicPages", [PublicPage].self),
|
||||
] }
|
||||
|
||||
/// Public pages of a workspace
|
||||
public var publicPages: [PublicPage] { __data["publicPages"] }
|
||||
|
||||
/// Workspace.PublicPage
|
||||
///
|
||||
/// Parent Type: `WorkspacePage`
|
||||
public struct PublicPage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("mode", GraphQLEnum<AffineGraphQL.PublicPageMode>.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var mode: GraphQLEnum<AffineGraphQL.PublicPageMode> { __data["mode"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspace"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspace($id: String!) { workspace(id: $id) { __typename 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.Query }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("workspace", Workspace.self, arguments: ["id": .variable("id")]),
|
||||
] }
|
||||
|
||||
/// 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceSubscriptionQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaceSubscription"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaceSubscription($workspaceId: String!) { workspace(id: $workspaceId) { __typename subscription { __typename id status plan recurring start end nextBillAt canceledAt variant } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("subscription", Subscription?.self),
|
||||
] }
|
||||
|
||||
/// The team subscription of the workspace, if exists.
|
||||
public var subscription: Subscription? { __data["subscription"] }
|
||||
|
||||
/// Workspace.Subscription
|
||||
///
|
||||
/// Parent Type: `SubscriptionType`
|
||||
public struct Subscription: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SubscriptionType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String?.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.SubscriptionStatus>.self),
|
||||
.field("plan", GraphQLEnum<AffineGraphQL.SubscriptionPlan>.self),
|
||||
.field("recurring", GraphQLEnum<AffineGraphQL.SubscriptionRecurring>.self),
|
||||
.field("start", AffineGraphQL.DateTime.self),
|
||||
.field("end", AffineGraphQL.DateTime?.self),
|
||||
.field("nextBillAt", AffineGraphQL.DateTime?.self),
|
||||
.field("canceledAt", AffineGraphQL.DateTime?.self),
|
||||
.field("variant", GraphQLEnum<AffineGraphQL.SubscriptionVariant>?.self),
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "removed")
|
||||
public var id: String? { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.SubscriptionStatus> { __data["status"] }
|
||||
/// The 'Free' plan just exists to be a placeholder and for the type convenience of frontend.
|
||||
/// There won't actually be a subscription with plan 'Free'
|
||||
public var plan: GraphQLEnum<AffineGraphQL.SubscriptionPlan> { __data["plan"] }
|
||||
public var recurring: GraphQLEnum<AffineGraphQL.SubscriptionRecurring> { __data["recurring"] }
|
||||
public var start: AffineGraphQL.DateTime { __data["start"] }
|
||||
public var end: AffineGraphQL.DateTime? { __data["end"] }
|
||||
public var nextBillAt: AffineGraphQL.DateTime? { __data["nextBillAt"] }
|
||||
public var canceledAt: AffineGraphQL.DateTime? { __data["canceledAt"] }
|
||||
public var variant: GraphQLEnum<AffineGraphQL.SubscriptionVariant>? { __data["variant"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspacesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaces"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaces { workspaces { __typename id initialized team owner { __typename id } } }"#
|
||||
))
|
||||
|
||||
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("workspaces", [Workspace].self),
|
||||
] }
|
||||
|
||||
/// Get all accessible workspaces for current user
|
||||
public var workspaces: [Workspace] { __data["workspaces"] }
|
||||
|
||||
/// 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("id", AffineGraphQL.ID.self),
|
||||
.field("initialized", Bool.self),
|
||||
.field("team", Bool.self),
|
||||
.field("owner", Owner.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// is current workspace initialized
|
||||
public var initialized: Bool { __data["initialized"] }
|
||||
/// if workspace is team workspace
|
||||
public var team: Bool { __data["team"] }
|
||||
/// Owner of workspace
|
||||
public var owner: Owner { __data["owner"] }
|
||||
|
||||
/// Workspace.Owner
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct Owner: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class InvoicesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "invoices"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query invoices($take: Int!, $skip: Int!) { currentUser { __typename invoiceCount invoices(take: $take, skip: $skip) { __typename id status currency amount reason lastPaymentError link createdAt } } }"#
|
||||
))
|
||||
|
||||
public var take: Int
|
||||
public var skip: Int
|
||||
|
||||
public init(
|
||||
take: Int,
|
||||
skip: Int
|
||||
) {
|
||||
self.take = take
|
||||
self.skip = skip
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"take": take,
|
||||
"skip": skip
|
||||
] }
|
||||
|
||||
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("invoiceCount", Int.self),
|
||||
.field("invoices", [Invoice].self, arguments: [
|
||||
"take": .variable("take"),
|
||||
"skip": .variable("skip")
|
||||
]),
|
||||
] }
|
||||
|
||||
/// Get user invoice count
|
||||
public var invoiceCount: Int { __data["invoiceCount"] }
|
||||
public var invoices: [Invoice] { __data["invoices"] }
|
||||
|
||||
/// CurrentUser.Invoice
|
||||
///
|
||||
/// Parent Type: `InvoiceType`
|
||||
public struct Invoice: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.InvoiceType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String?.self),
|
||||
.field("status", GraphQLEnum<AffineGraphQL.InvoiceStatus>.self),
|
||||
.field("currency", String.self),
|
||||
.field("amount", Int.self),
|
||||
.field("reason", String.self),
|
||||
.field("lastPaymentError", String?.self),
|
||||
.field("link", String?.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "removed")
|
||||
public var id: String? { __data["id"] }
|
||||
public var status: GraphQLEnum<AffineGraphQL.InvoiceStatus> { __data["status"] }
|
||||
public var currency: String { __data["currency"] }
|
||||
public var amount: Int { __data["amount"] }
|
||||
public var reason: String { __data["reason"] }
|
||||
public var lastPaymentError: String? { __data["lastPaymentError"] }
|
||||
public var link: String? { __data["link"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListBlobsQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listBlobs"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listBlobs($workspaceId: String!) { workspace(id: $workspaceId) { __typename blobs { __typename key size mime createdAt } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
|
||||
public init(workspaceId: String) {
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["workspaceId": workspaceId] }
|
||||
|
||||
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("blobs", [Blob].self),
|
||||
] }
|
||||
|
||||
/// List blobs of workspace
|
||||
public var blobs: [Blob] { __data["blobs"] }
|
||||
|
||||
/// Workspace.Blob
|
||||
///
|
||||
/// Parent Type: `ListedBlob`
|
||||
public struct Blob: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ListedBlob }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("key", String.self),
|
||||
.field("size", Int.self),
|
||||
.field("mime", String.self),
|
||||
.field("createdAt", String.self),
|
||||
] }
|
||||
|
||||
public var key: String { __data["key"] }
|
||||
public var size: Int { __data["size"] }
|
||||
public var mime: String { __data["mime"] }
|
||||
public var createdAt: String { __data["createdAt"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListHistoryQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listHistory"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listHistory($workspaceId: String!, $pageDocId: String!, $take: Int, $before: DateTime) { workspace(id: $workspaceId) { __typename histories(guid: $pageDocId, take: $take, before: $before) { __typename id timestamp editor { __typename name avatarUrl } } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var pageDocId: String
|
||||
public var take: GraphQLNullable<Int>
|
||||
public var before: GraphQLNullable<DateTime>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
pageDocId: String,
|
||||
take: GraphQLNullable<Int>,
|
||||
before: GraphQLNullable<DateTime>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.pageDocId = pageDocId
|
||||
self.take = take
|
||||
self.before = before
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"pageDocId": pageDocId,
|
||||
"take": take,
|
||||
"before": before
|
||||
] }
|
||||
|
||||
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("histories", [History].self, arguments: [
|
||||
"guid": .variable("pageDocId"),
|
||||
"take": .variable("take"),
|
||||
"before": .variable("before")
|
||||
]),
|
||||
] }
|
||||
|
||||
public var histories: [History] { __data["histories"] }
|
||||
|
||||
/// Workspace.History
|
||||
///
|
||||
/// Parent Type: `DocHistoryType`
|
||||
public struct History: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.DocHistoryType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("timestamp", AffineGraphQL.DateTime.self),
|
||||
.field("editor", Editor?.self),
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var timestamp: AffineGraphQL.DateTime { __data["timestamp"] }
|
||||
public var editor: Editor? { __data["editor"] }
|
||||
|
||||
/// Workspace.History.Editor
|
||||
///
|
||||
/// Parent Type: `EditorType`
|
||||
public struct Editor: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.EditorType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListUsersQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listUsers"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listUsers($filter: ListUserInput!) { users(filter: $filter) { __typename id name email features hasPassword emailVerified avatarUrl } }"#
|
||||
))
|
||||
|
||||
public var filter: ListUserInput
|
||||
|
||||
public init(filter: ListUserInput) {
|
||||
self.filter = filter
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["filter": filter] }
|
||||
|
||||
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("users", [User].self, arguments: ["filter": .variable("filter")]),
|
||||
] }
|
||||
|
||||
/// List registered users
|
||||
public var users: [User] { __data["users"] }
|
||||
|
||||
/// User
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
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 __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", AffineGraphQL.ID.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
.field("hasPassword", Bool?.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
/// User password has been set
|
||||
public var hasPassword: Bool? { __data["hasPassword"] }
|
||||
/// User email verified
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListWorkspaceFeaturesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listWorkspaceFeatures"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listWorkspaceFeatures($feature: FeatureType!) { listWorkspaceFeatures(feature: $feature) { __typename id public createdAt memberCount owner { __typename id } features } }"#
|
||||
))
|
||||
|
||||
public var feature: GraphQLEnum<FeatureType>
|
||||
|
||||
public init(feature: GraphQLEnum<FeatureType>) {
|
||||
self.feature = feature
|
||||
}
|
||||
|
||||
public var __variables: Variables? { ["feature": feature] }
|
||||
|
||||
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("listWorkspaceFeatures", [ListWorkspaceFeature].self, arguments: ["feature": .variable("feature")]),
|
||||
] }
|
||||
|
||||
public var listWorkspaceFeatures: [ListWorkspaceFeature] { __data["listWorkspaceFeatures"] }
|
||||
|
||||
/// ListWorkspaceFeature
|
||||
///
|
||||
/// Parent Type: `WorkspaceType`
|
||||
public struct ListWorkspaceFeature: 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("id", AffineGraphQL.ID.self),
|
||||
.field("public", Bool.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("memberCount", Int.self),
|
||||
.field("owner", Owner.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// is Public workspace
|
||||
public var `public`: Bool { __data["public"] }
|
||||
/// Workspace created date
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
/// member count of workspace
|
||||
public var memberCount: Int { __data["memberCount"] }
|
||||
/// Owner of workspace
|
||||
public var owner: Owner { __data["owner"] }
|
||||
/// Enabled features of workspace
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
|
||||
/// ListWorkspaceFeature.Owner
|
||||
///
|
||||
/// Parent Type: `UserType`
|
||||
public struct Owner: 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("id", AffineGraphQL.ID.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class OauthProvidersQuery: GraphQLQuery {
|
||||
public static let operationName: String = "oauthProviders"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query oauthProviders { serverConfig { __typename oauthProviders } }"#
|
||||
))
|
||||
|
||||
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("serverConfig", ServerConfig.self),
|
||||
] }
|
||||
|
||||
/// server config
|
||||
public var serverConfig: ServerConfig { __data["serverConfig"] }
|
||||
|
||||
/// ServerConfig
|
||||
///
|
||||
/// Parent Type: `ServerConfigType`
|
||||
public struct ServerConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("oauthProviders", [GraphQLEnum<AffineGraphQL.OAuthProviderType>].self),
|
||||
] }
|
||||
|
||||
public var oauthProviders: [GraphQLEnum<AffineGraphQL.OAuthProviderType>] { __data["oauthProviders"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class PricesQuery: GraphQLQuery {
|
||||
public static let operationName: String = "prices"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query prices { prices { __typename type plan currency amount yearlyAmount lifetimeAmount } }"#
|
||||
))
|
||||
|
||||
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("prices", [Price].self),
|
||||
] }
|
||||
|
||||
public var prices: [Price] { __data["prices"] }
|
||||
|
||||
/// Price
|
||||
///
|
||||
/// Parent Type: `SubscriptionPrice`
|
||||
public struct Price: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.SubscriptionPrice }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("type", String.self),
|
||||
.field("plan", GraphQLEnum<AffineGraphQL.SubscriptionPlan>.self),
|
||||
.field("currency", String.self),
|
||||
.field("amount", Int?.self),
|
||||
.field("yearlyAmount", Int?.self),
|
||||
.field("lifetimeAmount", Int?.self),
|
||||
] }
|
||||
|
||||
public var type: String { __data["type"] }
|
||||
public var plan: GraphQLEnum<AffineGraphQL.SubscriptionPlan> { __data["plan"] }
|
||||
public var currency: String { __data["currency"] }
|
||||
public var amount: Int? { __data["amount"] }
|
||||
public var yearlyAmount: Int? { __data["yearlyAmount"] }
|
||||
public var lifetimeAmount: Int? { __data["lifetimeAmount"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class QuotaQuery: GraphQLQuery {
|
||||
public static let operationName: String = "quota"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query quota { currentUser { __typename id quota { __typename name blobLimit storageQuota historyPeriod memberLimit humanReadable { __typename name blobLimit storageQuota historyPeriod memberLimit } } quotaUsage { __typename storageQuota } } }"#
|
||||
))
|
||||
|
||||
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("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("id", AffineGraphQL.ID.self),
|
||||
.field("quota", Quota?.self),
|
||||
.field("quotaUsage", QuotaUsage.self),
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
public var quota: Quota? { __data["quota"] }
|
||||
public var quotaUsage: QuotaUsage { __data["quotaUsage"] }
|
||||
|
||||
/// CurrentUser.Quota
|
||||
///
|
||||
/// Parent Type: `UserQuota`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuota }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("blobLimit", AffineGraphQL.SafeInt.self),
|
||||
.field("storageQuota", AffineGraphQL.SafeInt.self),
|
||||
.field("historyPeriod", AffineGraphQL.SafeInt.self),
|
||||
.field("memberLimit", Int.self),
|
||||
.field("humanReadable", HumanReadable.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: AffineGraphQL.SafeInt { __data["blobLimit"] }
|
||||
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
|
||||
public var historyPeriod: AffineGraphQL.SafeInt { __data["historyPeriod"] }
|
||||
public var memberLimit: Int { __data["memberLimit"] }
|
||||
public var humanReadable: HumanReadable { __data["humanReadable"] }
|
||||
|
||||
/// CurrentUser.Quota.HumanReadable
|
||||
///
|
||||
/// Parent Type: `UserQuotaHumanReadable`
|
||||
public struct HumanReadable: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaHumanReadable }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("blobLimit", String.self),
|
||||
.field("storageQuota", String.self),
|
||||
.field("historyPeriod", String.self),
|
||||
.field("memberLimit", String.self),
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: String { __data["blobLimit"] }
|
||||
public var storageQuota: String { __data["storageQuota"] }
|
||||
public var historyPeriod: String { __data["historyPeriod"] }
|
||||
public var memberLimit: String { __data["memberLimit"] }
|
||||
}
|
||||
}
|
||||
|
||||
/// CurrentUser.QuotaUsage
|
||||
///
|
||||
/// Parent Type: `UserQuotaUsage`
|
||||
public struct QuotaUsage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaUsage }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("storageQuota", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
|
||||
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ServerConfigQuery: GraphQLQuery {
|
||||
public static let operationName: String = "serverConfig"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query serverConfig { serverConfig { __typename version baseUrl name features type initialized credentialsRequirement { __typename ...CredentialsRequirements } } }"#,
|
||||
fragments: [CredentialsRequirements.self, PasswordLimits.self]
|
||||
))
|
||||
|
||||
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("serverConfig", ServerConfig.self),
|
||||
] }
|
||||
|
||||
/// server config
|
||||
public var serverConfig: ServerConfig { __data["serverConfig"] }
|
||||
|
||||
/// ServerConfig
|
||||
///
|
||||
/// Parent Type: `ServerConfigType`
|
||||
public struct ServerConfig: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ServerConfigType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("version", String.self),
|
||||
.field("baseUrl", String.self),
|
||||
.field("name", String.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.ServerFeature>].self),
|
||||
.field("type", GraphQLEnum<AffineGraphQL.ServerDeploymentType>.self),
|
||||
.field("initialized", Bool.self),
|
||||
.field("credentialsRequirement", CredentialsRequirement.self),
|
||||
] }
|
||||
|
||||
/// server version
|
||||
public var version: String { __data["version"] }
|
||||
/// server base url
|
||||
public var baseUrl: String { __data["baseUrl"] }
|
||||
/// server identical name could be shown as badge on user interface
|
||||
public var name: String { __data["name"] }
|
||||
/// enabled server features
|
||||
public var features: [GraphQLEnum<AffineGraphQL.ServerFeature>] { __data["features"] }
|
||||
/// server type
|
||||
public var type: GraphQLEnum<AffineGraphQL.ServerDeploymentType> { __data["type"] }
|
||||
/// whether server has been initialized
|
||||
public var initialized: Bool { __data["initialized"] }
|
||||
/// credentials requirement
|
||||
public var credentialsRequirement: CredentialsRequirement { __data["credentialsRequirement"] }
|
||||
|
||||
/// ServerConfig.CredentialsRequirement
|
||||
///
|
||||
/// Parent Type: `CredentialsRequirementType`
|
||||
public struct CredentialsRequirement: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.CredentialsRequirementType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.fragment(CredentialsRequirements.self),
|
||||
] }
|
||||
|
||||
public var password: Password { __data["password"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var credentialsRequirements: CredentialsRequirements { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias Password = CredentialsRequirements.Password
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user