@accounter/server
Version:
Accounter GraphQL server
15 lines (14 loc) • 817 B
TypeScript
import { GraphQLError } from 'graphql';
export declare const ALLOWED_ROLES: Set<string>;
export declare function mapAuth0Error(error: unknown): GraphQLError;
export declare function invalidTokenError(): GraphQLError;
/**
* The claim path's rejection: no token is involved there, so the message must not
* mention one. It deliberately keeps the TOKEN_INVALID code and stays vague about
* which precondition failed — an unverified email, a wrong recipient, an expired
* or already-accepted invitation, or an id that never existed all report the same
* thing, so the mutation cannot be used to probe for invitation ids.
*/
export declare function unavailableInvitationError(): GraphQLError;
export declare function expiredTokenError(): GraphQLError;
export declare function alreadyAcceptedError(): GraphQLError;