feat!: affine cloud support (#3813)

Co-authored-by: Hongtao Lye <codert.sn@gmail.com>
Co-authored-by: liuyi <forehalo@gmail.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
Co-authored-by: X1a0t <405028157@qq.com>
Co-authored-by: JimmFly <yangjinfei001@gmail.com>
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
Co-authored-by: xiaodong zuo <53252747+zuoxiaodong0815@users.noreply.github.com>
Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com>
Co-authored-by: Qi <474021214@qq.com>
Co-authored-by: danielchim <kahungchim@gmail.com>
This commit is contained in:
Alex Yang
2023-08-29 05:07:05 -05:00
committed by GitHub
parent d0145c6f38
commit 2f6c4e3696
414 changed files with 19469 additions and 7591 deletions
+507 -14
View File
@@ -32,6 +32,10 @@ export interface Scalars {
Upload: { input: File; output: File };
}
export enum NewFeaturesKind {
EarlyAccess = 'EarlyAccess',
}
/** User permission in workspace */
export enum Permission {
Admin = 'Admin',
@@ -46,6 +50,61 @@ export interface UpdateWorkspaceInput {
public: InputMaybe<Scalars['Boolean']['input']>;
}
export type DeleteBlobMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
hash: Scalars['String']['input'];
}>;
export type DeleteBlobMutation = {
__typename?: 'Mutation';
deleteBlob: boolean;
};
export type ListBlobsQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type ListBlobsQuery = { __typename?: 'Query'; listBlobs: Array<string> };
export type SetBlobMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
blob: Scalars['Upload']['input'];
}>;
export type SetBlobMutation = { __typename?: 'Mutation'; setBlob: string };
export type ChangeEmailMutationVariables = Exact<{
id: Scalars['String']['input'];
newEmail: Scalars['String']['input'];
}>;
export type ChangeEmailMutation = {
__typename?: 'Mutation';
changeEmail: {
__typename?: 'UserType';
id: string;
name: string;
avatarUrl: string | null;
email: string;
};
};
export type ChangePasswordMutationVariables = Exact<{
id: Scalars['String']['input'];
newPassword: Scalars['String']['input'];
}>;
export type ChangePasswordMutation = {
__typename?: 'Mutation';
changePassword: {
__typename?: 'UserType';
id: string;
name: string;
avatarUrl: string | null;
email: string;
};
};
export type CreateWorkspaceMutationVariables = Exact<{
init: Scalars['Upload']['input'];
}>;
@@ -60,6 +119,270 @@ export type CreateWorkspaceMutation = {
};
};
export type DeleteAccountMutationVariables = Exact<{ [key: string]: never }>;
export type DeleteAccountMutation = {
__typename?: 'Mutation';
deleteAccount: { __typename?: 'DeleteAccount'; success: boolean };
};
export type DeleteWorkspaceMutationVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type DeleteWorkspaceMutation = {
__typename?: 'Mutation';
deleteWorkspace: boolean;
};
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>;
export type GetCurrentUserQuery = {
__typename?: 'Query';
currentUser: {
__typename?: 'UserType';
id: string;
name: string;
email: string;
emailVerified: string | null;
avatarUrl: string | null;
createdAt: string | null;
};
};
export type GetInviteInfoQueryVariables = Exact<{
inviteId: Scalars['String']['input'];
}>;
export type GetInviteInfoQuery = {
__typename?: 'Query';
getInviteInfo: {
__typename?: 'InvitationType';
workspace: {
__typename?: 'InvitationWorkspaceType';
id: string;
name: string;
avatar: string;
};
user: {
__typename?: 'UserType';
id: string;
name: string;
avatarUrl: string | null;
};
};
};
export type GetIsOwnerQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type GetIsOwnerQuery = { __typename?: 'Query'; isOwner: boolean };
export type GetMembersByWorkspaceIdQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type GetMembersByWorkspaceIdQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
members: Array<{
__typename?: 'InviteUserType';
id: string;
name: string | null;
email: string | null;
avatarUrl: string | null;
permission: Permission;
inviteId: string;
accepted: boolean;
emailVerified: string | null;
}>;
};
};
export type GetPublicWorkspaceQueryVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type GetPublicWorkspaceQuery = {
__typename?: 'Query';
publicWorkspace: { __typename?: 'WorkspaceType'; id: string };
};
export type GetUserQueryVariables = Exact<{
email: Scalars['String']['input'];
}>;
export type GetUserQuery = {
__typename?: 'Query';
user: {
__typename?: 'UserType';
id: string;
name: string;
avatarUrl: string | null;
email: string;
hasPassword: boolean | null;
} | null;
};
export type GetWorkspacePublicByIdQueryVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type GetWorkspacePublicByIdQuery = {
__typename?: 'Query';
workspace: { __typename?: 'WorkspaceType'; public: boolean };
};
export type GetWorkspaceSharedPagesQueryVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type GetWorkspaceSharedPagesQuery = {
__typename?: 'Query';
workspace: { __typename?: 'WorkspaceType'; sharedPages: Array<string> };
};
export type GetWorkspaceQueryVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type GetWorkspaceQuery = {
__typename?: 'Query';
workspace: { __typename?: 'WorkspaceType'; id: string };
};
export type GetWorkspacesQueryVariables = Exact<{ [key: string]: never }>;
export type GetWorkspacesQuery = {
__typename?: 'Query';
workspaces: Array<{ __typename?: 'WorkspaceType'; id: string }>;
};
export type LeaveWorkspaceMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type LeaveWorkspaceMutation = {
__typename?: 'Mutation';
leaveWorkspace: boolean;
};
export type RevokeMemberPermissionMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
userId: Scalars['String']['input'];
}>;
export type RevokeMemberPermissionMutation = {
__typename?: 'Mutation';
revoke: boolean;
};
export type RevokePageMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
pageId: Scalars['String']['input'];
}>;
export type RevokePageMutation = {
__typename?: 'Mutation';
revokePage: boolean;
};
export type SendChangeEmailMutationVariables = Exact<{
email: Scalars['String']['input'];
callbackUrl: Scalars['String']['input'];
}>;
export type SendChangeEmailMutation = {
__typename?: 'Mutation';
sendChangeEmail: boolean;
};
export type SendChangePasswordEmailMutationVariables = Exact<{
email: Scalars['String']['input'];
callbackUrl: Scalars['String']['input'];
}>;
export type SendChangePasswordEmailMutation = {
__typename?: 'Mutation';
sendChangePasswordEmail: boolean;
};
export type SendSetPasswordEmailMutationVariables = Exact<{
email: Scalars['String']['input'];
callbackUrl: Scalars['String']['input'];
}>;
export type SendSetPasswordEmailMutation = {
__typename?: 'Mutation';
sendSetPasswordEmail: boolean;
};
export type SetRevokePageMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
pageId: Scalars['String']['input'];
}>;
export type SetRevokePageMutation = {
__typename?: 'Mutation';
revokePage: boolean;
};
export type SetSharePageMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
pageId: Scalars['String']['input'];
}>;
export type SetSharePageMutation = {
__typename?: 'Mutation';
sharePage: boolean;
};
export type SetWorkspacePublicByIdMutationVariables = Exact<{
id: Scalars['ID']['input'];
public: Scalars['Boolean']['input'];
}>;
export type SetWorkspacePublicByIdMutation = {
__typename?: 'Mutation';
updateWorkspace: { __typename?: 'WorkspaceType'; id: string };
};
export type SharePageMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
pageId: Scalars['String']['input'];
}>;
export type SharePageMutation = { __typename?: 'Mutation'; sharePage: boolean };
export type SignInMutationVariables = Exact<{
email: Scalars['String']['input'];
password: Scalars['String']['input'];
}>;
export type SignInMutation = {
__typename?: 'Mutation';
signIn: {
__typename?: 'UserType';
token: { __typename?: 'TokenType'; token: string };
};
};
export type SignUpMutationVariables = Exact<{
name: Scalars['String']['input'];
email: Scalars['String']['input'];
password: Scalars['String']['input'];
}>;
export type SignUpMutation = {
__typename?: 'Mutation';
signUp: {
__typename?: 'UserType';
token: { __typename?: 'TokenType'; token: string };
};
};
export type UploadAvatarMutationVariables = Exact<{
id: Scalars['String']['input'];
avatar: Scalars['Upload']['input'];
@@ -76,34 +399,204 @@ export type UploadAvatarMutation = {
};
};
export type WorkspaceByIdQueryVariables = Exact<{
id: Scalars['String']['input'];
export type InviteByEmailMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
email: Scalars['String']['input'];
permission: Permission;
sendInviteMail: InputMaybe<Scalars['Boolean']['input']>;
}>;
export type WorkspaceByIdQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
id: string;
public: boolean;
createdAt: string;
};
export type InviteByEmailMutation = { __typename?: 'Mutation'; invite: string };
export type AcceptInviteByInviteIdMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
inviteId: Scalars['String']['input'];
}>;
export type AcceptInviteByInviteIdMutation = {
__typename?: 'Mutation';
acceptInviteById: boolean;
};
export type Queries = {
name: 'workspaceByIdQuery';
variables: WorkspaceByIdQueryVariables;
response: WorkspaceByIdQuery;
export type AcceptInviteByWorkspaceIdMutationVariables = Exact<{
workspaceId: Scalars['String']['input'];
}>;
export type AcceptInviteByWorkspaceIdMutation = {
__typename?: 'Mutation';
acceptInvite: boolean;
};
export type Queries =
| {
name: 'listBlobsQuery';
variables: ListBlobsQueryVariables;
response: ListBlobsQuery;
}
| {
name: 'getCurrentUserQuery';
variables: GetCurrentUserQueryVariables;
response: GetCurrentUserQuery;
}
| {
name: 'getInviteInfoQuery';
variables: GetInviteInfoQueryVariables;
response: GetInviteInfoQuery;
}
| {
name: 'getIsOwnerQuery';
variables: GetIsOwnerQueryVariables;
response: GetIsOwnerQuery;
}
| {
name: 'getMembersByWorkspaceIdQuery';
variables: GetMembersByWorkspaceIdQueryVariables;
response: GetMembersByWorkspaceIdQuery;
}
| {
name: 'getPublicWorkspaceQuery';
variables: GetPublicWorkspaceQueryVariables;
response: GetPublicWorkspaceQuery;
}
| {
name: 'getUserQuery';
variables: GetUserQueryVariables;
response: GetUserQuery;
}
| {
name: 'getWorkspacePublicByIdQuery';
variables: GetWorkspacePublicByIdQueryVariables;
response: GetWorkspacePublicByIdQuery;
}
| {
name: 'getWorkspaceSharedPagesQuery';
variables: GetWorkspaceSharedPagesQueryVariables;
response: GetWorkspaceSharedPagesQuery;
}
| {
name: 'getWorkspaceQuery';
variables: GetWorkspaceQueryVariables;
response: GetWorkspaceQuery;
}
| {
name: 'getWorkspacesQuery';
variables: GetWorkspacesQueryVariables;
response: GetWorkspacesQuery;
};
export type Mutations =
| {
name: 'deleteBlobMutation';
variables: DeleteBlobMutationVariables;
response: DeleteBlobMutation;
}
| {
name: 'setBlobMutation';
variables: SetBlobMutationVariables;
response: SetBlobMutation;
}
| {
name: 'changeEmailMutation';
variables: ChangeEmailMutationVariables;
response: ChangeEmailMutation;
}
| {
name: 'changePasswordMutation';
variables: ChangePasswordMutationVariables;
response: ChangePasswordMutation;
}
| {
name: 'createWorkspaceMutation';
variables: CreateWorkspaceMutationVariables;
response: CreateWorkspaceMutation;
}
| {
name: 'deleteAccountMutation';
variables: DeleteAccountMutationVariables;
response: DeleteAccountMutation;
}
| {
name: 'deleteWorkspaceMutation';
variables: DeleteWorkspaceMutationVariables;
response: DeleteWorkspaceMutation;
}
| {
name: 'leaveWorkspaceMutation';
variables: LeaveWorkspaceMutationVariables;
response: LeaveWorkspaceMutation;
}
| {
name: 'revokeMemberPermissionMutation';
variables: RevokeMemberPermissionMutationVariables;
response: RevokeMemberPermissionMutation;
}
| {
name: 'revokePageMutation';
variables: RevokePageMutationVariables;
response: RevokePageMutation;
}
| {
name: 'sendChangeEmailMutation';
variables: SendChangeEmailMutationVariables;
response: SendChangeEmailMutation;
}
| {
name: 'sendChangePasswordEmailMutation';
variables: SendChangePasswordEmailMutationVariables;
response: SendChangePasswordEmailMutation;
}
| {
name: 'sendSetPasswordEmailMutation';
variables: SendSetPasswordEmailMutationVariables;
response: SendSetPasswordEmailMutation;
}
| {
name: 'setRevokePageMutation';
variables: SetRevokePageMutationVariables;
response: SetRevokePageMutation;
}
| {
name: 'setSharePageMutation';
variables: SetSharePageMutationVariables;
response: SetSharePageMutation;
}
| {
name: 'setWorkspacePublicByIdMutation';
variables: SetWorkspacePublicByIdMutationVariables;
response: SetWorkspacePublicByIdMutation;
}
| {
name: 'sharePageMutation';
variables: SharePageMutationVariables;
response: SharePageMutation;
}
| {
name: 'signInMutation';
variables: SignInMutationVariables;
response: SignInMutation;
}
| {
name: 'signUpMutation';
variables: SignUpMutationVariables;
response: SignUpMutation;
}
| {
name: 'uploadAvatarMutation';
variables: UploadAvatarMutationVariables;
response: UploadAvatarMutation;
}
| {
name: 'inviteByEmailMutation';
variables: InviteByEmailMutationVariables;
response: InviteByEmailMutation;
}
| {
name: 'acceptInviteByInviteIdMutation';
variables: AcceptInviteByInviteIdMutationVariables;
response: AcceptInviteByInviteIdMutation;
}
| {
name: 'acceptInviteByWorkspaceIdMutation';
variables: AcceptInviteByWorkspaceIdMutationVariables;
response: AcceptInviteByWorkspaceIdMutation;
};