mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
refactor(infra): directory structure (#4615)
This commit is contained in:
@@ -0,0 +1,217 @@
|
||||
# ------------------------------------------------------
|
||||
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
|
||||
# ------------------------------------------------------
|
||||
|
||||
type UserType {
|
||||
id: ID!
|
||||
|
||||
"""User name"""
|
||||
name: String!
|
||||
|
||||
"""User email"""
|
||||
email: String!
|
||||
|
||||
"""User avatar url"""
|
||||
avatarUrl: String
|
||||
|
||||
"""User email verified"""
|
||||
emailVerified: DateTime
|
||||
|
||||
"""User created date"""
|
||||
createdAt: DateTime
|
||||
|
||||
"""User password has been set"""
|
||||
hasPassword: Boolean
|
||||
token: TokenType!
|
||||
}
|
||||
|
||||
"""
|
||||
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
|
||||
"""
|
||||
scalar DateTime
|
||||
|
||||
type DeleteAccount {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type RemoveAvatar {
|
||||
success: Boolean!
|
||||
}
|
||||
|
||||
type AddToNewFeaturesWaitingList {
|
||||
email: String!
|
||||
|
||||
"""New features kind"""
|
||||
type: NewFeaturesKind!
|
||||
}
|
||||
|
||||
enum NewFeaturesKind {
|
||||
EarlyAccess
|
||||
}
|
||||
|
||||
type TokenType {
|
||||
token: String!
|
||||
refresh: String!
|
||||
sessionToken: String
|
||||
}
|
||||
|
||||
type InviteUserType {
|
||||
"""User name"""
|
||||
name: String
|
||||
|
||||
"""User email"""
|
||||
email: String
|
||||
|
||||
"""User avatar url"""
|
||||
avatarUrl: String
|
||||
|
||||
"""User email verified"""
|
||||
emailVerified: DateTime
|
||||
|
||||
"""User created date"""
|
||||
createdAt: DateTime
|
||||
|
||||
"""User password has been set"""
|
||||
hasPassword: Boolean
|
||||
id: ID!
|
||||
|
||||
"""User permission in workspace"""
|
||||
permission: Permission!
|
||||
|
||||
"""Invite id"""
|
||||
inviteId: String!
|
||||
|
||||
"""User accepted"""
|
||||
accepted: Boolean!
|
||||
}
|
||||
|
||||
"""User permission in workspace"""
|
||||
enum Permission {
|
||||
Read
|
||||
Write
|
||||
Admin
|
||||
Owner
|
||||
}
|
||||
|
||||
type WorkspaceType {
|
||||
id: ID!
|
||||
|
||||
"""is Public workspace"""
|
||||
public: Boolean!
|
||||
|
||||
"""Workspace created date"""
|
||||
createdAt: DateTime!
|
||||
|
||||
"""Members of workspace"""
|
||||
members(skip: Int, take: Int): [InviteUserType!]!
|
||||
|
||||
"""Permission of current signed in user in workspace"""
|
||||
permission: Permission!
|
||||
|
||||
"""member count of workspace"""
|
||||
memberCount: Int!
|
||||
|
||||
"""Shared pages of workspace"""
|
||||
sharedPages: [String!]!
|
||||
|
||||
"""Owner of workspace"""
|
||||
owner: UserType!
|
||||
}
|
||||
|
||||
type InvitationWorkspaceType {
|
||||
id: ID!
|
||||
|
||||
"""Workspace name"""
|
||||
name: String!
|
||||
|
||||
"""Base64 encoded avatar"""
|
||||
avatar: String!
|
||||
}
|
||||
|
||||
type WorkspaceBlobSizes {
|
||||
size: Float!
|
||||
}
|
||||
|
||||
type InvitationType {
|
||||
"""Workspace information"""
|
||||
workspace: InvitationWorkspaceType!
|
||||
|
||||
"""User information"""
|
||||
user: UserType!
|
||||
|
||||
"""Invitee information"""
|
||||
invitee: UserType!
|
||||
}
|
||||
|
||||
type Query {
|
||||
"""Get is owner of workspace"""
|
||||
isOwner(workspaceId: String!): Boolean!
|
||||
|
||||
"""Get all accessible workspaces for current user"""
|
||||
workspaces: [WorkspaceType!]!
|
||||
|
||||
"""Get public workspace by id"""
|
||||
publicWorkspace(id: String!): WorkspaceType!
|
||||
|
||||
"""Get workspace by id"""
|
||||
workspace(id: String!): WorkspaceType!
|
||||
|
||||
"""Update workspace"""
|
||||
getInviteInfo(inviteId: String!): InvitationType!
|
||||
|
||||
"""List blobs of workspace"""
|
||||
listBlobs(workspaceId: String!): [String!]!
|
||||
collectBlobSizes(workspaceId: String!): WorkspaceBlobSizes!
|
||||
collectAllBlobSizes: WorkspaceBlobSizes!
|
||||
checkBlobSize(workspaceId: String!, size: Float!): WorkspaceBlobSizes!
|
||||
|
||||
"""Get current user"""
|
||||
currentUser: UserType!
|
||||
|
||||
"""Get user by email"""
|
||||
user(email: String!): UserType
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
signUp(name: String!, email: String!, password: String!): UserType!
|
||||
signIn(email: String!, password: String!): UserType!
|
||||
changePassword(token: String!, newPassword: String!): UserType!
|
||||
changeEmail(token: String!): UserType!
|
||||
sendChangePasswordEmail(email: String!, callbackUrl: String!): Boolean!
|
||||
sendSetPasswordEmail(email: String!, callbackUrl: String!): Boolean!
|
||||
sendChangeEmail(email: String!, callbackUrl: String!): Boolean!
|
||||
sendVerifyChangeEmail(token: String!, email: String!, callbackUrl: String!): Boolean!
|
||||
|
||||
"""Create a new workspace"""
|
||||
createWorkspace(init: Upload!): WorkspaceType!
|
||||
|
||||
"""Update workspace"""
|
||||
updateWorkspace(input: UpdateWorkspaceInput!): WorkspaceType!
|
||||
deleteWorkspace(id: String!): Boolean!
|
||||
invite(workspaceId: String!, email: String!, permission: Permission!, sendInviteMail: Boolean): String!
|
||||
revoke(workspaceId: String!, userId: String!): Boolean!
|
||||
acceptInviteById(workspaceId: String!, inviteId: String!, sendAcceptMail: Boolean): Boolean!
|
||||
acceptInvite(workspaceId: String!): Boolean!
|
||||
leaveWorkspace(workspaceId: String!, workspaceName: String!, sendLeaveMail: Boolean): Boolean!
|
||||
sharePage(workspaceId: String!, pageId: String!): Boolean!
|
||||
revokePage(workspaceId: String!, pageId: String!): Boolean!
|
||||
setBlob(workspaceId: String!, blob: Upload!): String!
|
||||
deleteBlob(workspaceId: String!, hash: String!): Boolean!
|
||||
|
||||
"""Upload user avatar"""
|
||||
uploadAvatar(avatar: Upload!): UserType!
|
||||
|
||||
"""Remove user avatar"""
|
||||
removeAvatar: RemoveAvatar!
|
||||
deleteAccount: DeleteAccount!
|
||||
addToNewFeaturesWaitingList(type: NewFeaturesKind!, email: String!): AddToNewFeaturesWaitingList!
|
||||
}
|
||||
|
||||
"""The `Upload` scalar type represents a file upload."""
|
||||
scalar Upload
|
||||
|
||||
input UpdateWorkspaceInput {
|
||||
"""is Public workspace"""
|
||||
public: Boolean
|
||||
id: ID!
|
||||
}
|
||||
Reference in New Issue
Block a user