UNPKG

@coko/server

Version:

Reusable server for use by Coko's projects

84 lines 2.77 kB
import User from './user.model'; import Identity from '../identity/identity.model'; import Team from '../team/team.model'; import { QueryResult } from '../base.model'; import { LoginResponse } from './user.controller'; type UserUpdatedPayload = { userUpdated: User; }; declare const resolvers: { Query: { user: (_: any, { id }: { id: any; }) => Promise<User>; users: (_: any, { filter, pagination }: { filter: any; pagination: any; }) => Promise<QueryResult<User>>; currentUser: (_: any, __: any, ctx: any) => Promise<User>; }; Mutation: { activateUser: (_: any, { id }: { id: any; }) => Promise<User>; activateUsers: (_: any, { ids }: { ids: any; }) => Promise<User[]>; deleteUser: (_: any, { id }: { id: any; }) => Promise<number>; deleteUsers: (_: any, { ids }: { ids: any; }) => Promise<number>; deactivateUser: (_: any, { id }: { id: any; }) => Promise<User>; deactivateUsers: (_: any, { ids }: { ids: any; }) => Promise<User[]>; updateUser: (_: any, { id, input }: { id: any; input: any; }) => Promise<User>; login: (_: any, { input }: { input: any; }) => Promise<LoginResponse>; signUp: (_: any, { input }: { input: any; }) => Promise<string>; setDefaultIdentity: (_: any, { userId, identityId }: { userId: any; identityId: any; }) => Promise<User>; verifyEmail: (_: any, { token }: { token: any; }) => Promise<boolean>; resendVerificationEmail: (_: any, { token }: { token: any; }) => Promise<boolean>; resendVerificationEmailAfterLogin: (_: any, __: any, ctx: any) => Promise<boolean>; updatePassword: (_: any, { input }: { input: any; }) => Promise<boolean>; sendPasswordResetEmail: (_: any, { email }: { email: any; }) => Promise<boolean>; resetPassword: (_: any, { token, password }: { token: any; password: any; }) => Promise<boolean>; }; User: { identities: (user: any, _: any) => Promise<Identity[]>; defaultIdentity: (user: any) => Promise<Identity>; displayName: (user: any) => string; teams: (user: any) => Promise<Team[]>; }; Subscription: { userUpdated: { subscribe: (...args: any[]) => Promise<AsyncIterator<UserUpdatedPayload>>; }; }; }; export default resolvers; //# sourceMappingURL=user.resolvers.d.ts.map