import { BackendError , BackendErrorLabel , StatusCode , SyntheticErrorLabel } from '../../http' ; export class InvitationError extends BackendError { constructor ( message , label , code ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationError' ; } } export class InvitationInvalidEmailError extends InvitationError { constructor ( message , label = BackendErrorLabel . INVALID_EMAIL , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationInvalidEmailError' ; } } export class InvitationInvalidPhoneError extends InvitationError { constructor ( message , label = BackendErrorLabel . INVALID_PHONE , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationInvalidPhoneError' ; } } export class InvitationEmailExistsError extends InvitationError { constructor ( message , label = BackendErrorLabel . INVITE_EMAIL_EXISTS , code = StatusCode . BAD_REQUEST ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationEmailExistsError' ; } } export class InvitationPhoneExistsError extends InvitationError { constructor ( message , label = BackendErrorLabel . PHONE_EXISTS , code = StatusCode . CONFLICT ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationPhoneExistsError' ; } } export class InvitationNotFoundError extends InvitationError { constructor ( message , label = SyntheticErrorLabel . INVITATION_NOT_FOUND , code = StatusCode . NOT_FOUND ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationNotFoundError' ; } } export class InvitationMultipleError extends InvitationError { constructor ( message , label = SyntheticErrorLabel . INVITATION_MULTIPLE_FOUND , code = StatusCode . CONFLICT ) { super ( message , label , code ) ; Object . setPrototypeOf ( this , new . target . prototype ) ; this . name = 'InvitationMultipleError' ; } }