mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
feat(core): integrate realtime features (#15003)
This commit is contained in:
-191
@@ -1,191 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public struct CurrentUserProfile: AffineGraphQL.SelectionSet, Fragment {
|
||||
public static var fragmentDefinition: StaticString {
|
||||
#"fragment CurrentUserProfile on UserType { __typename id name email avatarUrl emailVerified features settings { __typename receiveInvitationEmail receiveMentionEmail receiveCommentEmail } quota { __typename name blobLimit storageQuota historyPeriod memberLimit humanReadable { __typename name blobLimit storageQuota historyPeriod memberLimit } } quotaUsage { __typename storageQuota } copilot { __typename quota { __typename limit used } } }"#
|
||||
}
|
||||
|
||||
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("avatarUrl", String?.self),
|
||||
.field("emailVerified", Bool.self),
|
||||
.field("features", [GraphQLEnum<AffineGraphQL.FeatureType>].self),
|
||||
.field("settings", Settings.self),
|
||||
.field("quota", Quota.self),
|
||||
.field("quotaUsage", QuotaUsage.self),
|
||||
.field("copilot", Copilot.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.self
|
||||
] }
|
||||
|
||||
public var id: AffineGraphQL.ID { __data["id"] }
|
||||
/// User name
|
||||
public var name: String { __data["name"] }
|
||||
/// User email
|
||||
public var email: String { __data["email"] }
|
||||
/// User avatar url
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
/// User email verified
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
/// Get user settings
|
||||
public var settings: Settings { __data["settings"] }
|
||||
public var quota: Quota { __data["quota"] }
|
||||
public var quotaUsage: QuotaUsage { __data["quotaUsage"] }
|
||||
public var copilot: Copilot { __data["copilot"] }
|
||||
|
||||
/// Settings
|
||||
///
|
||||
/// Parent Type: `UserSettingsType`
|
||||
public struct Settings: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserSettingsType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("receiveInvitationEmail", Bool.self),
|
||||
.field("receiveMentionEmail", Bool.self),
|
||||
.field("receiveCommentEmail", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Settings.self
|
||||
] }
|
||||
|
||||
/// Receive invitation email
|
||||
public var receiveInvitationEmail: Bool { __data["receiveInvitationEmail"] }
|
||||
/// Receive mention email
|
||||
public var receiveMentionEmail: Bool { __data["receiveMentionEmail"] }
|
||||
/// Receive comment email
|
||||
public var receiveCommentEmail: Bool { __data["receiveCommentEmail"] }
|
||||
}
|
||||
|
||||
/// Quota
|
||||
///
|
||||
/// Parent Type: `UserQuotaType`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("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 static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Quota.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"] }
|
||||
|
||||
/// Quota.HumanReadable
|
||||
///
|
||||
/// Parent Type: `UserQuotaHumanReadableType`
|
||||
public struct HumanReadable: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaHumanReadableType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("name", String.self),
|
||||
.field("blobLimit", String.self),
|
||||
.field("storageQuota", String.self),
|
||||
.field("historyPeriod", String.self),
|
||||
.field("memberLimit", String.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Quota.HumanReadable.self
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: String { __data["blobLimit"] }
|
||||
public var storageQuota: String { __data["storageQuota"] }
|
||||
public var historyPeriod: String { __data["historyPeriod"] }
|
||||
public var memberLimit: String { __data["memberLimit"] }
|
||||
}
|
||||
}
|
||||
|
||||
/// QuotaUsage
|
||||
///
|
||||
/// Parent Type: `UserQuotaUsageType`
|
||||
public struct QuotaUsage: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.UserQuotaUsageType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("storageQuota", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.QuotaUsage.self
|
||||
] }
|
||||
|
||||
@available(*, deprecated, message: "use `UserQuotaType[\'usedStorageQuota\']` instead")
|
||||
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
|
||||
}
|
||||
|
||||
/// 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),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Copilot.self
|
||||
] }
|
||||
|
||||
/// Get the quota of the user in the workspace
|
||||
public var quota: Quota { __data["quota"] }
|
||||
|
||||
/// 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 static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
CurrentUserProfile.Copilot.Quota.self
|
||||
] }
|
||||
|
||||
public var limit: AffineGraphQL.SafeInt? { __data["limit"] }
|
||||
public var used: AffineGraphQL.SafeInt { __data["used"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetCurrentUserProfileQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getCurrentUserProfile"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getCurrentUserProfile { currentUser { __typename ...CurrentUserProfile } }"#,
|
||||
fragments: [CurrentUserProfile.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("currentUser", CurrentUser?.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetCurrentUserProfileQuery.Data.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),
|
||||
.fragment(CurrentUserProfile.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetCurrentUserProfileQuery.Data.CurrentUser.self,
|
||||
CurrentUserProfile.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 email verified
|
||||
public var emailVerified: Bool { __data["emailVerified"] }
|
||||
/// Enabled features of a user
|
||||
public var features: [GraphQLEnum<AffineGraphQL.FeatureType>] { __data["features"] }
|
||||
/// Get user settings
|
||||
public var settings: Settings { __data["settings"] }
|
||||
public var quota: Quota { __data["quota"] }
|
||||
public var quotaUsage: QuotaUsage { __data["quotaUsage"] }
|
||||
public var copilot: Copilot { __data["copilot"] }
|
||||
|
||||
public struct Fragments: FragmentContainer {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public var currentUserProfile: CurrentUserProfile { _toFragment() }
|
||||
}
|
||||
|
||||
public typealias Settings = CurrentUserProfile.Settings
|
||||
|
||||
public typealias Quota = CurrentUserProfile.Quota
|
||||
|
||||
public typealias QuotaUsage = CurrentUserProfile.QuotaUsage
|
||||
|
||||
public typealias Copilot = CurrentUserProfile.Copilot
|
||||
}
|
||||
}
|
||||
}
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetDocDefaultRoleQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getDocDefaultRole"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getDocDefaultRole($workspaceId: String!, $docId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $docId) { __typename defaultRole } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var docId: String
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
docId: String
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.docId = docId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"docId": docId
|
||||
] }
|
||||
|
||||
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")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetDocDefaultRoleQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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("doc", Doc.self, arguments: ["docId": .variable("docId")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetDocDefaultRoleQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// Get get with given id
|
||||
public var doc: Doc { __data["doc"] }
|
||||
|
||||
/// Workspace.Doc
|
||||
///
|
||||
/// Parent Type: `DocType`
|
||||
public struct Doc: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.DocType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("defaultRole", GraphQLEnum<AffineGraphQL.DocRole>.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetDocDefaultRoleQuery.Data.Workspace.Doc.self
|
||||
] }
|
||||
|
||||
public var defaultRole: GraphQLEnum<AffineGraphQL.DocRole> { __data["defaultRole"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-120
@@ -1,120 +0,0 @@
|
||||
// @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, $query: String) { workspace(id: $workspaceId) { __typename memberCount members(skip: $skip, take: $take, query: $query) { __typename id name email avatarUrl permission inviteId emailVerified status } } }"#
|
||||
))
|
||||
|
||||
public var workspaceId: String
|
||||
public var skip: GraphQLNullable<Int>
|
||||
public var take: GraphQLNullable<Int>
|
||||
public var query: GraphQLNullable<String>
|
||||
|
||||
public init(
|
||||
workspaceId: String,
|
||||
skip: GraphQLNullable<Int>,
|
||||
take: GraphQLNullable<Int>,
|
||||
query: GraphQLNullable<String>
|
||||
) {
|
||||
self.workspaceId = workspaceId
|
||||
self.skip = skip
|
||||
self.take = take
|
||||
self.query = query
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"workspaceId": workspaceId,
|
||||
"skip": skip,
|
||||
"take": take,
|
||||
"query": query
|
||||
] }
|
||||
|
||||
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")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetMembersByWorkspaceIdQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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"),
|
||||
"query": .variable("query")
|
||||
]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetMembersByWorkspaceIdQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// 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 static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetMembersByWorkspaceIdQuery.Data.Workspace.Member.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
|
||||
@available(*, deprecated, message: "Use role instead")
|
||||
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"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-197
@@ -1,197 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetPageGrantedUsersListQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getPageGrantedUsersList"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getPageGrantedUsersList($pagination: PaginationInput!, $docId: String!, $workspaceId: String!) { workspace(id: $workspaceId) { __typename doc(docId: $docId) { __typename grantedUsersList(pagination: $pagination) { __typename totalCount pageInfo { __typename endCursor hasNextPage } edges { __typename node { __typename role user { __typename id name email avatarUrl } } } } } } }"#
|
||||
))
|
||||
|
||||
public var pagination: PaginationInput
|
||||
public var docId: String
|
||||
public var workspaceId: String
|
||||
|
||||
public init(
|
||||
pagination: PaginationInput,
|
||||
docId: String,
|
||||
workspaceId: String
|
||||
) {
|
||||
self.pagination = pagination
|
||||
self.docId = docId
|
||||
self.workspaceId = workspaceId
|
||||
}
|
||||
|
||||
public var __variables: Variables? { [
|
||||
"pagination": pagination,
|
||||
"docId": docId,
|
||||
"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")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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("doc", Doc.self, arguments: ["docId": .variable("docId")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// Get get with given id
|
||||
public var doc: Doc { __data["doc"] }
|
||||
|
||||
/// Workspace.Doc
|
||||
///
|
||||
/// Parent Type: `DocType`
|
||||
public struct Doc: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.DocType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("grantedUsersList", GrantedUsersList.self, arguments: ["pagination": .variable("pagination")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.self
|
||||
] }
|
||||
|
||||
/// paginated doc granted users list
|
||||
public var grantedUsersList: GrantedUsersList { __data["grantedUsersList"] }
|
||||
|
||||
/// Workspace.Doc.GrantedUsersList
|
||||
///
|
||||
/// Parent Type: `PaginatedGrantedDocUserType`
|
||||
public struct GrantedUsersList: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedGrantedDocUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("totalCount", Int.self),
|
||||
.field("pageInfo", PageInfo.self),
|
||||
.field("edges", [Edge].self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.GrantedUsersList.self
|
||||
] }
|
||||
|
||||
public var totalCount: Int { __data["totalCount"] }
|
||||
public var pageInfo: PageInfo { __data["pageInfo"] }
|
||||
public var edges: [Edge] { __data["edges"] }
|
||||
|
||||
/// Workspace.Doc.GrantedUsersList.PageInfo
|
||||
///
|
||||
/// Parent Type: `PageInfo`
|
||||
public struct PageInfo: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PageInfo }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("endCursor", String?.self),
|
||||
.field("hasNextPage", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.GrantedUsersList.PageInfo.self
|
||||
] }
|
||||
|
||||
public var endCursor: String? { __data["endCursor"] }
|
||||
public var hasNextPage: Bool { __data["hasNextPage"] }
|
||||
}
|
||||
|
||||
/// Workspace.Doc.GrantedUsersList.Edge
|
||||
///
|
||||
/// Parent Type: `GrantedDocUserTypeEdge`
|
||||
public struct Edge: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.GrantedDocUserTypeEdge }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("node", Node.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.GrantedUsersList.Edge.self
|
||||
] }
|
||||
|
||||
public var node: Node { __data["node"] }
|
||||
|
||||
/// Workspace.Doc.GrantedUsersList.Edge.Node
|
||||
///
|
||||
/// Parent Type: `GrantedDocUserType`
|
||||
public struct Node: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.GrantedDocUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("role", GraphQLEnum<AffineGraphQL.DocRole>.self),
|
||||
.field("user", User.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.GrantedUsersList.Edge.Node.self
|
||||
] }
|
||||
|
||||
public var role: GraphQLEnum<AffineGraphQL.DocRole> { __data["role"] }
|
||||
public var user: User { __data["user"] }
|
||||
|
||||
/// Workspace.Doc.GrantedUsersList.Edge.Node.User
|
||||
///
|
||||
/// Parent Type: `WorkspaceUserType`
|
||||
public struct User: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceUserType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("email", String.self),
|
||||
.field("avatarUrl", String?.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetPageGrantedUsersListQuery.Data.Workspace.Doc.GrantedUsersList.Edge.Node.User.self
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var email: String { __data["email"] }
|
||||
public var avatarUrl: String? { __data["avatarUrl"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
// @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 enableSharing enableUrlPreview enableDocEmbedding } }"#
|
||||
))
|
||||
|
||||
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")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceConfigQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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("enableSharing", Bool.self),
|
||||
.field("enableUrlPreview", Bool.self),
|
||||
.field("enableDocEmbedding", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceConfigQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// Enable AI
|
||||
public var enableAi: Bool { __data["enableAi"] }
|
||||
/// Enable workspace sharing
|
||||
public var enableSharing: Bool { __data["enableSharing"] }
|
||||
/// Enable url previous when sharing
|
||||
public var enableUrlPreview: Bool { __data["enableUrlPreview"] }
|
||||
/// Enable doc embedding
|
||||
public var enableDocEmbedding: Bool { __data["enableDocEmbedding"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class GetWorkspaceEmbeddingStatusQuery: GraphQLQuery {
|
||||
public static let operationName: String = "getWorkspaceEmbeddingStatus"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query getWorkspaceEmbeddingStatus($workspaceId: String!) { queryWorkspaceEmbeddingStatus(workspaceId: $workspaceId) { __typename total embedded } }"#
|
||||
))
|
||||
|
||||
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("queryWorkspaceEmbeddingStatus", QueryWorkspaceEmbeddingStatus.self, arguments: ["workspaceId": .variable("workspaceId")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceEmbeddingStatusQuery.Data.self
|
||||
] }
|
||||
|
||||
/// query workspace embedding status
|
||||
public var queryWorkspaceEmbeddingStatus: QueryWorkspaceEmbeddingStatus { __data["queryWorkspaceEmbeddingStatus"] }
|
||||
|
||||
/// QueryWorkspaceEmbeddingStatus
|
||||
///
|
||||
/// Parent Type: `ContextWorkspaceEmbeddingStatus`
|
||||
public struct QueryWorkspaceEmbeddingStatus: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.ContextWorkspaceEmbeddingStatus }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("total", AffineGraphQL.SafeInt.self),
|
||||
.field("embedded", AffineGraphQL.SafeInt.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceEmbeddingStatusQuery.Data.QueryWorkspaceEmbeddingStatus.self
|
||||
] }
|
||||
|
||||
public var total: AffineGraphQL.SafeInt { __data["total"] }
|
||||
public var embedded: AffineGraphQL.SafeInt { __data["embedded"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
-119
@@ -1,119 +0,0 @@
|
||||
// @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!) { workspace(id: $workspaceId) { __typename permissions { __typename Workspace_Administrators_Manage Workspace_Blobs_List Workspace_Blobs_Read Workspace_Blobs_Write Workspace_Copilot Workspace_CreateDoc Workspace_Delete Workspace_Organize_Read Workspace_Payment_Manage Workspace_Properties_Create Workspace_Properties_Delete Workspace_Properties_Read Workspace_Properties_Update Workspace_Read Workspace_Settings_Read Workspace_Settings_Update Workspace_Sync Workspace_TransferOwner Workspace_Users_Manage Workspace_Users_Read } role 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("workspace", Workspace.self, arguments: ["id": .variable("workspaceId")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceInfoQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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("permissions", Permissions.self),
|
||||
.field("role", GraphQLEnum<AffineGraphQL.Permission>.self),
|
||||
.field("team", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceInfoQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// map of action permissions
|
||||
public var permissions: Permissions { __data["permissions"] }
|
||||
/// Role of current signed in user in workspace
|
||||
public var role: GraphQLEnum<AffineGraphQL.Permission> { __data["role"] }
|
||||
/// if workspace is team workspace
|
||||
public var team: Bool { __data["team"] }
|
||||
|
||||
/// Workspace.Permissions
|
||||
///
|
||||
/// Parent Type: `WorkspacePermissions`
|
||||
public struct Permissions: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspacePermissions }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("Workspace_Administrators_Manage", Bool.self),
|
||||
.field("Workspace_Blobs_List", Bool.self),
|
||||
.field("Workspace_Blobs_Read", Bool.self),
|
||||
.field("Workspace_Blobs_Write", Bool.self),
|
||||
.field("Workspace_Copilot", Bool.self),
|
||||
.field("Workspace_CreateDoc", Bool.self),
|
||||
.field("Workspace_Delete", Bool.self),
|
||||
.field("Workspace_Organize_Read", Bool.self),
|
||||
.field("Workspace_Payment_Manage", Bool.self),
|
||||
.field("Workspace_Properties_Create", Bool.self),
|
||||
.field("Workspace_Properties_Delete", Bool.self),
|
||||
.field("Workspace_Properties_Read", Bool.self),
|
||||
.field("Workspace_Properties_Update", Bool.self),
|
||||
.field("Workspace_Read", Bool.self),
|
||||
.field("Workspace_Settings_Read", Bool.self),
|
||||
.field("Workspace_Settings_Update", Bool.self),
|
||||
.field("Workspace_Sync", Bool.self),
|
||||
.field("Workspace_TransferOwner", Bool.self),
|
||||
.field("Workspace_Users_Manage", Bool.self),
|
||||
.field("Workspace_Users_Read", Bool.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
GetWorkspaceInfoQuery.Data.Workspace.Permissions.self
|
||||
] }
|
||||
|
||||
public var workspace_Administrators_Manage: Bool { __data["Workspace_Administrators_Manage"] }
|
||||
public var workspace_Blobs_List: Bool { __data["Workspace_Blobs_List"] }
|
||||
public var workspace_Blobs_Read: Bool { __data["Workspace_Blobs_Read"] }
|
||||
public var workspace_Blobs_Write: Bool { __data["Workspace_Blobs_Write"] }
|
||||
public var workspace_Copilot: Bool { __data["Workspace_Copilot"] }
|
||||
public var workspace_CreateDoc: Bool { __data["Workspace_CreateDoc"] }
|
||||
public var workspace_Delete: Bool { __data["Workspace_Delete"] }
|
||||
public var workspace_Organize_Read: Bool { __data["Workspace_Organize_Read"] }
|
||||
public var workspace_Payment_Manage: Bool { __data["Workspace_Payment_Manage"] }
|
||||
public var workspace_Properties_Create: Bool { __data["Workspace_Properties_Create"] }
|
||||
public var workspace_Properties_Delete: Bool { __data["Workspace_Properties_Delete"] }
|
||||
public var workspace_Properties_Read: Bool { __data["Workspace_Properties_Read"] }
|
||||
public var workspace_Properties_Update: Bool { __data["Workspace_Properties_Update"] }
|
||||
public var workspace_Read: Bool { __data["Workspace_Read"] }
|
||||
public var workspace_Settings_Read: Bool { __data["Workspace_Settings_Read"] }
|
||||
public var workspace_Settings_Update: Bool { __data["Workspace_Settings_Update"] }
|
||||
public var workspace_Sync: Bool { __data["Workspace_Sync"] }
|
||||
public var workspace_TransferOwner: Bool { __data["Workspace_TransferOwner"] }
|
||||
public var workspace_Users_Manage: Bool { __data["Workspace_Users_Manage"] }
|
||||
public var workspace_Users_Read: Bool { __data["Workspace_Users_Read"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-76
@@ -1,76 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class ListUserAccessTokensQuery: GraphQLQuery {
|
||||
public static let operationName: String = "listUserAccessTokens"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query listUserAccessTokens { currentUser { __typename revealedAccessTokens { __typename id name createdAt expiresAt token } } }"#
|
||||
))
|
||||
|
||||
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),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
ListUserAccessTokensQuery.Data.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("revealedAccessTokens", [RevealedAccessToken].self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
ListUserAccessTokensQuery.Data.CurrentUser.self
|
||||
] }
|
||||
|
||||
public var revealedAccessTokens: [RevealedAccessToken] { __data["revealedAccessTokens"] }
|
||||
|
||||
/// CurrentUser.RevealedAccessToken
|
||||
///
|
||||
/// Parent Type: `RevealedAccessToken`
|
||||
public struct RevealedAccessToken: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.RevealedAccessToken }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("id", String.self),
|
||||
.field("name", String.self),
|
||||
.field("createdAt", AffineGraphQL.DateTime.self),
|
||||
.field("expiresAt", AffineGraphQL.DateTime?.self),
|
||||
.field("token", String.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
ListUserAccessTokensQuery.Data.CurrentUser.RevealedAccessToken.self
|
||||
] }
|
||||
|
||||
public var id: String { __data["id"] }
|
||||
public var name: String { __data["name"] }
|
||||
public var createdAt: AffineGraphQL.DateTime { __data["createdAt"] }
|
||||
public var expiresAt: AffineGraphQL.DateTime? { __data["expiresAt"] }
|
||||
public var token: String { __data["token"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class NotificationCountQuery: GraphQLQuery {
|
||||
public static let operationName: String = "notificationCount"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query notificationCount { currentUser { __typename notifications(pagination: { first: 1 }) { __typename totalCount } } }"#
|
||||
))
|
||||
|
||||
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),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
NotificationCountQuery.Data.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("notifications", Notifications.self, arguments: ["pagination": ["first": 1]]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
NotificationCountQuery.Data.CurrentUser.self
|
||||
] }
|
||||
|
||||
/// Get current user notifications
|
||||
public var notifications: Notifications { __data["notifications"] }
|
||||
|
||||
/// CurrentUser.Notifications
|
||||
///
|
||||
/// Parent Type: `PaginatedNotificationObjectType`
|
||||
public struct Notifications: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.PaginatedNotificationObjectType }
|
||||
public static var __selections: [ApolloAPI.Selection] { [
|
||||
.field("__typename", String.self),
|
||||
.field("totalCount", Int.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
NotificationCountQuery.Data.CurrentUser.Notifications.self
|
||||
] }
|
||||
|
||||
public var totalCount: Int { __data["totalCount"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-122
@@ -1,122 +0,0 @@
|
||||
// @generated
|
||||
// This file was automatically generated and should not be edited.
|
||||
|
||||
@_exported import ApolloAPI
|
||||
|
||||
public class WorkspaceQuotaQuery: GraphQLQuery {
|
||||
public static let operationName: String = "workspaceQuota"
|
||||
public static let operationDocument: ApolloAPI.OperationDocument = .init(
|
||||
definition: .init(
|
||||
#"query workspaceQuota($id: String!) { workspace(id: $id) { __typename quota { __typename name blobLimit storageQuota usedStorageQuota historyPeriod memberLimit memberCount overcapacityMemberCount humanReadable { __typename name blobLimit storageQuota historyPeriod memberLimit memberCount overcapacityMemberCount } } } }"#
|
||||
))
|
||||
|
||||
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")]),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
WorkspaceQuotaQuery.Data.self
|
||||
] }
|
||||
|
||||
/// 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("quota", Quota.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
WorkspaceQuotaQuery.Data.Workspace.self
|
||||
] }
|
||||
|
||||
/// quota of workspace
|
||||
public var quota: Quota { __data["quota"] }
|
||||
|
||||
/// Workspace.Quota
|
||||
///
|
||||
/// Parent Type: `WorkspaceQuotaType`
|
||||
public struct Quota: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceQuotaType }
|
||||
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("usedStorageQuota", AffineGraphQL.SafeInt.self),
|
||||
.field("historyPeriod", AffineGraphQL.SafeInt.self),
|
||||
.field("memberLimit", Int.self),
|
||||
.field("memberCount", Int.self),
|
||||
.field("overcapacityMemberCount", Int.self),
|
||||
.field("humanReadable", HumanReadable.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
WorkspaceQuotaQuery.Data.Workspace.Quota.self
|
||||
] }
|
||||
|
||||
public var name: String { __data["name"] }
|
||||
public var blobLimit: AffineGraphQL.SafeInt { __data["blobLimit"] }
|
||||
public var storageQuota: AffineGraphQL.SafeInt { __data["storageQuota"] }
|
||||
public var usedStorageQuota: AffineGraphQL.SafeInt { __data["usedStorageQuota"] }
|
||||
public var historyPeriod: AffineGraphQL.SafeInt { __data["historyPeriod"] }
|
||||
public var memberLimit: Int { __data["memberLimit"] }
|
||||
public var memberCount: Int { __data["memberCount"] }
|
||||
public var overcapacityMemberCount: Int { __data["overcapacityMemberCount"] }
|
||||
public var humanReadable: HumanReadable { __data["humanReadable"] }
|
||||
|
||||
/// Workspace.Quota.HumanReadable
|
||||
///
|
||||
/// Parent Type: `WorkspaceQuotaHumanReadableType`
|
||||
public struct HumanReadable: AffineGraphQL.SelectionSet {
|
||||
public let __data: DataDict
|
||||
public init(_dataDict: DataDict) { __data = _dataDict }
|
||||
|
||||
public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.WorkspaceQuotaHumanReadableType }
|
||||
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),
|
||||
.field("memberCount", String.self),
|
||||
.field("overcapacityMemberCount", String.self),
|
||||
] }
|
||||
public static var __fulfilledFragments: [any ApolloAPI.SelectionSet.Type] { [
|
||||
WorkspaceQuotaQuery.Data.Workspace.Quota.HumanReadable.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"] }
|
||||
public var memberCount: String { __data["memberCount"] }
|
||||
public var overcapacityMemberCount: String { __data["overcapacityMemberCount"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user