Files
AFFiNE-Mirror/packages/graphql/src/schema.ts
2023-07-06 03:49:17 +00:00

110 lines
2.7 KiB
TypeScript

/* eslint-disable */
export type Maybe<T> = T | null;
export type InputMaybe<T> = T | null;
export type Exact<T extends { [key: string]: unknown }> = {
[K in keyof T]: T[K];
};
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]?: Maybe<T[SubKey]>;
};
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
[SubKey in K]: Maybe<T[SubKey]>;
};
export type MakeEmpty<
T extends { [key: string]: unknown },
K extends keyof T,
> = { [_ in K]?: never };
export type Incremental<T> =
| T
| {
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
};
/** All built-in and custom scalars, mapped to their actual values */
export interface Scalars {
ID: { input: string; output: string };
String: { input: string; output: string };
Boolean: { input: boolean; output: boolean };
Int: { input: number; output: number };
Float: { input: number; output: number };
/** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
DateTime: { input: string; output: string };
/** The `Upload` scalar type represents a file upload. */
Upload: { input: File; output: File };
}
/** User permission in workspace */
export enum Permission {
Admin = 'Admin',
Owner = 'Owner',
Read = 'Read',
Write = 'Write',
}
export interface UpdateWorkspaceInput {
id: Scalars['ID']['input'];
/** is Public workspace */
public: InputMaybe<Scalars['Boolean']['input']>;
}
export type CreateWorkspaceMutationVariables = Exact<{
init: Scalars['Upload']['input'];
}>;
export type CreateWorkspaceMutation = {
__typename?: 'Mutation';
createWorkspace: {
__typename?: 'WorkspaceType';
id: string;
public: boolean;
createdAt: string;
};
};
export type UploadAvatarMutationVariables = Exact<{
id: Scalars['String']['input'];
avatar: Scalars['Upload']['input'];
}>;
export type UploadAvatarMutation = {
__typename?: 'Mutation';
uploadAvatar: {
__typename?: 'UserType';
id: string;
name: string;
avatarUrl: string | null;
email: string;
};
};
export type WorkspaceByIdQueryVariables = Exact<{
id: Scalars['String']['input'];
}>;
export type WorkspaceByIdQuery = {
__typename?: 'Query';
workspace: {
__typename?: 'WorkspaceType';
id: string;
public: boolean;
createdAt: string;
};
};
export type Queries = {
name: 'workspaceByIdQuery';
variables: WorkspaceByIdQueryVariables;
response: WorkspaceByIdQuery;
};
export type Mutations =
| {
name: 'createWorkspaceMutation';
variables: CreateWorkspaceMutationVariables;
response: CreateWorkspaceMutation;
}
| {
name: 'uploadAvatarMutation';
variables: UploadAvatarMutationVariables;
response: UploadAvatarMutation;
};