import gql from 'graphql-tag' export type Maybe = T | null export type InputMaybe = Maybe export type Exact = { [K in keyof T]: T[K] } export type MakeOptional = Omit & { [SubKey in K]?: Maybe } export type MakeMaybe = Omit & { [SubKey in K]: Maybe } /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string String: string Boolean: boolean Int: number Float: number DateTime: any } export type AuthResult = { error?: Maybe news?: Maybe token?: Maybe user?: Maybe } export type Author = { bio?: Maybe caption?: Maybe id: Scalars['Int'] lastSeen?: Maybe links?: Maybe>> name: Scalars['String'] roles?: Maybe>> slug: Scalars['String'] stat?: Maybe userpic?: Maybe } export type AuthorStat = { commented?: Maybe followers?: Maybe followings?: Maybe rating?: Maybe } export type AuthorsBy = { createdAt?: InputMaybe days?: InputMaybe lastSeen?: InputMaybe name?: InputMaybe order?: InputMaybe slug?: InputMaybe stat?: InputMaybe topic?: InputMaybe } export type Chat = { admins?: Maybe>> createdAt: Scalars['Int'] createdBy: User description?: Maybe id: Scalars['String'] messages: Array> private?: Maybe title?: Maybe unread?: Maybe updatedAt: Scalars['Int'] users: Array> } export type ChatInput = { description?: InputMaybe id: Scalars['String'] title?: InputMaybe } export type ChatMember = { invitedAt?: Maybe invitedBy?: Maybe name: Scalars['String'] slug: Scalars['String'] userpic?: Maybe } export type ChatUser = { id: Scalars['Int'] lastSeen?: Maybe name: Scalars['String'] slug: Scalars['String'] userpic?: Maybe } export type Collab = { authors: Array> body?: Maybe createdAt: Scalars['DateTime'] invites?: Maybe>> title?: Maybe } export type Collection = { amount?: Maybe createdAt: Scalars['DateTime'] createdBy: User desc?: Maybe id: Scalars['Int'] publishedAt?: Maybe slug: Scalars['String'] title: Scalars['String'] } export type Community = { createdAt: Scalars['DateTime'] createdBy: User desc?: Maybe id: Scalars['Int'] name: Scalars['String'] pic: Scalars['String'] slug: Scalars['String'] } export enum FollowingEntity { Author = 'AUTHOR', Community = 'COMMUNITY', Reactions = 'REACTIONS', Topic = 'TOPIC' } export type LoadShoutsFilters = { author?: InputMaybe body?: InputMaybe days?: InputMaybe layout?: InputMaybe reacted?: InputMaybe title?: InputMaybe topic?: InputMaybe visibility?: InputMaybe } export type LoadShoutsOptions = { filters?: InputMaybe limit: Scalars['Int'] offset?: InputMaybe order_by?: InputMaybe order_by_desc?: InputMaybe } export type Message = { author: Scalars['String'] body: Scalars['String'] chatId: Scalars['String'] createdAt: Scalars['Int'] id: Scalars['Int'] replyTo?: Maybe updatedAt?: Maybe } export enum MessageStatus { Deleted = 'DELETED', New = 'NEW', Updated = 'UPDATED' } export type MessagesBy = { author?: InputMaybe body?: InputMaybe chat?: InputMaybe days?: InputMaybe order?: InputMaybe stat?: InputMaybe } export type Mutation = { confirmEmail: AuthResult createChat: Result createMessage: Result createReaction: Result createShout: Result createTopic: Result deleteChat: Result deleteMessage: Result deleteReaction: Result deleteShout: Result destroyTopic: Result follow: Result inviteAuthor: Result inviteChat: Result markAsRead: Result rateUser: Result refreshSession: AuthResult registerUser: AuthResult removeAuthor: Result sendLink: Result unfollow: Result updateChat: Result updateMessage: Result updateOnlineStatus: Result updateProfile: Result updateReaction: Result updateShout: Result updateTopic: Result } export type MutationConfirmEmailArgs = { token: Scalars['String'] } export type MutationCreateChatArgs = { members: Array> title?: InputMaybe } export type MutationCreateMessageArgs = { body: Scalars['String'] chat: Scalars['String'] replyTo?: InputMaybe } export type MutationCreateReactionArgs = { reaction: ReactionInput } export type MutationCreateShoutArgs = { input: ShoutInput } export type MutationCreateTopicArgs = { input: TopicInput } export type MutationDeleteChatArgs = { chatId: Scalars['String'] } export type MutationDeleteMessageArgs = { chatId: Scalars['String'] id: Scalars['Int'] } export type MutationDeleteReactionArgs = { id: Scalars['Int'] } export type MutationDeleteShoutArgs = { slug: Scalars['String'] } export type MutationDestroyTopicArgs = { slug: Scalars['String'] } export type MutationFollowArgs = { slug: Scalars['String'] what: FollowingEntity } export type MutationInviteAuthorArgs = { author: Scalars['String'] shout: Scalars['String'] } export type MutationInviteChatArgs = { chatId: Scalars['String'] userslug: Scalars['String'] } export type MutationMarkAsReadArgs = { chatId: Scalars['String'] ids: Array> } export type MutationRateUserArgs = { slug: Scalars['String'] value: Scalars['Int'] } export type MutationRegisterUserArgs = { email: Scalars['String'] name?: InputMaybe password?: InputMaybe } export type MutationRemoveAuthorArgs = { author: Scalars['String'] shout: Scalars['String'] } export type MutationSendLinkArgs = { email: Scalars['String'] lang?: InputMaybe } export type MutationUnfollowArgs = { slug: Scalars['String'] what: FollowingEntity } export type MutationUpdateChatArgs = { chat: ChatInput } export type MutationUpdateMessageArgs = { body: Scalars['String'] chatId: Scalars['String'] id: Scalars['Int'] } export type MutationUpdateProfileArgs = { profile: ProfileInput } export type MutationUpdateReactionArgs = { reaction: ReactionInput } export type MutationUpdateShoutArgs = { input: ShoutInput } export type MutationUpdateTopicArgs = { input: TopicInput } export type Notification = { kind: Scalars['String'] template: Scalars['String'] variables?: Maybe>> } export type Operation = { id: Scalars['Int'] name: Scalars['String'] } export type Permission = { operation_id: Scalars['Int'] resource_id: Scalars['Int'] } export type ProfileInput = { bio?: InputMaybe links?: InputMaybe>> name?: InputMaybe userpic?: InputMaybe } export type Query = { authorsAll: Array> chatUsersAll: Array> getAuthor?: Maybe getCollabs: Array> getTopic?: Maybe isEmailUsed: Scalars['Boolean'] loadAuthorsBy: Array> loadChats: Result loadMessagesBy: Result loadReactionsBy: Array> loadShout?: Maybe loadShouts: Array> markdownBody: Scalars['String'] searchUsers: Result signIn: AuthResult signOut: AuthResult topicsAll: Array> topicsByAuthor: Array> topicsByCommunity: Array> topicsRandom: Array> userFollowedAuthors: Array> userFollowedTopics: Array> userFollowers: Array> } export type QueryGetAuthorArgs = { slug: Scalars['String'] } export type QueryGetTopicArgs = { slug: Scalars['String'] } export type QueryIsEmailUsedArgs = { email: Scalars['String'] } export type QueryLoadAuthorsByArgs = { by?: InputMaybe limit?: InputMaybe offset?: InputMaybe } export type QueryLoadChatsArgs = { limit?: InputMaybe offset?: InputMaybe } export type QueryLoadMessagesByArgs = { by: MessagesBy limit?: InputMaybe offset?: InputMaybe } export type QueryLoadReactionsByArgs = { by: ReactionBy limit?: InputMaybe offset?: InputMaybe } export type QueryLoadShoutArgs = { slug: Scalars['String'] } export type QueryLoadShoutsArgs = { options?: InputMaybe } export type QueryMarkdownBodyArgs = { body: Scalars['String'] } export type QuerySearchUsersArgs = { limit?: InputMaybe offset?: InputMaybe query: Scalars['String'] } export type QuerySignInArgs = { email: Scalars['String'] lang?: InputMaybe password?: InputMaybe } export type QueryTopicsByAuthorArgs = { author: Scalars['String'] } export type QueryTopicsByCommunityArgs = { community: Scalars['String'] } export type QueryTopicsRandomArgs = { amount?: InputMaybe } export type QueryUserFollowedAuthorsArgs = { slug: Scalars['String'] } export type QueryUserFollowedTopicsArgs = { slug: Scalars['String'] } export type QueryUserFollowersArgs = { slug: Scalars['String'] } export type Rating = { rater: Scalars['String'] value: Scalars['Int'] } export type Reaction = { body?: Maybe createdAt: Scalars['DateTime'] createdBy: User deletedAt?: Maybe deletedBy?: Maybe id: Scalars['Int'] kind: ReactionKind old_id?: Maybe old_thread?: Maybe range?: Maybe replyTo?: Maybe shout: Shout stat?: Maybe updatedAt?: Maybe } export type ReactionBy = { author?: InputMaybe body?: InputMaybe days?: InputMaybe order?: InputMaybe shout?: InputMaybe shouts?: InputMaybe>> stat?: InputMaybe topic?: InputMaybe } export type ReactionInput = { body?: InputMaybe kind: Scalars['Int'] range?: InputMaybe replyTo?: InputMaybe shout: Scalars['String'] } export enum ReactionKind { Accept = 'ACCEPT', Agree = 'AGREE', Ask = 'ASK', Comment = 'COMMENT', Disagree = 'DISAGREE', Dislike = 'DISLIKE', Disproof = 'DISPROOF', Like = 'LIKE', Proof = 'PROOF', Propose = 'PROPOSE', Quote = 'QUOTE', Reject = 'REJECT' } export enum ReactionStatus { Changed = 'CHANGED', Deleted = 'DELETED', Explained = 'EXPLAINED', New = 'NEW', Updated = 'UPDATED' } export type ReactionUpdating = { error?: Maybe reaction?: Maybe status?: Maybe } export type Resource = { id: Scalars['Int'] name: Scalars['String'] } export type Result = { author?: Maybe authors?: Maybe>> chat?: Maybe chats?: Maybe>> communities?: Maybe>> community?: Maybe error?: Maybe members?: Maybe>> message?: Maybe messages?: Maybe>> reaction?: Maybe reactions?: Maybe>> shout?: Maybe shouts?: Maybe>> slugs?: Maybe>> topic?: Maybe topics?: Maybe>> uids?: Maybe>> } export type Role = { community: Scalars['String'] desc?: Maybe id: Scalars['Int'] name: Scalars['String'] permissions: Array } export type Shout = { authors?: Maybe>> body: Scalars['String'] community?: Maybe cover?: Maybe createdAt: Scalars['DateTime'] deletedAt?: Maybe deletedBy?: Maybe id: Scalars['Int'] lang?: Maybe layout?: Maybe mainTopic?: Maybe media?: Maybe publishedAt?: Maybe publishedBy?: Maybe slug: Scalars['String'] stat?: Maybe subtitle?: Maybe title?: Maybe topics?: Maybe>> updatedAt?: Maybe updatedBy?: Maybe versionOf?: Maybe visibility?: Maybe } export type ShoutInput = { body: Scalars['String'] community: Scalars['String'] mainTopic?: InputMaybe slug: Scalars['String'] subtitle?: InputMaybe title?: InputMaybe topic_slugs?: InputMaybe>> versionOf?: InputMaybe visibleForRoles?: InputMaybe>> visibleForUsers?: InputMaybe>> } export type ShoutsFilterBy = { author?: InputMaybe authors?: InputMaybe>> body?: InputMaybe days?: InputMaybe layout?: InputMaybe slug?: InputMaybe stat?: InputMaybe title?: InputMaybe topic?: InputMaybe topics?: InputMaybe>> visibility?: InputMaybe } export type Stat = { commented?: Maybe ranking?: Maybe rating?: Maybe reacted?: Maybe viewed?: Maybe } export type Subscription = { newMessage: Message onlineUpdated: Array reactionUpdated: ReactionUpdating shoutUpdated: Shout userUpdated: User } export type SubscriptionNewMessageArgs = { chats?: InputMaybe> } export type SubscriptionReactionUpdatedArgs = { shout: Scalars['String'] } export type Token = { createdAt: Scalars['DateTime'] expiresAt?: Maybe id: Scalars['Int'] ownerId: Scalars['Int'] usedAt?: Maybe value: Scalars['String'] } export type Topic = { body?: Maybe children?: Maybe>> community: Community oid?: Maybe parents?: Maybe>> pic?: Maybe slug: Scalars['String'] stat?: Maybe title?: Maybe } export type TopicInput = { body?: InputMaybe children?: InputMaybe>> community: Scalars['String'] parents?: InputMaybe>> pic?: InputMaybe slug: Scalars['String'] title?: InputMaybe } export type TopicStat = { authors: Scalars['Int'] commented?: Maybe followers: Scalars['Int'] rating?: Maybe reacted: Scalars['Int'] shouts: Scalars['Int'] viewed: Scalars['Int'] } export type User = { bio?: Maybe communities?: Maybe>> createdAt: Scalars['DateTime'] email?: Maybe emailConfirmed?: Maybe id: Scalars['Int'] lastSeen?: Maybe links?: Maybe>> muted?: Maybe name?: Maybe notifications?: Maybe>> oauth?: Maybe oid?: Maybe password?: Maybe ratings?: Maybe>> slug: Scalars['String'] updatedAt?: Maybe username: Scalars['String'] userpic?: Maybe } export type UserFollowings = { authors?: Maybe>> communities?: Maybe>> reactions?: Maybe>> topics?: Maybe>> unread?: Maybe } export type UserNotification = { id: Scalars['Int'] kind: Scalars['String'] user: Scalars['Int'] values?: Maybe>> }