Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ const getEmailBounceDescription = (
) => {
let description: string[] | string = HIDE_ROW;
switch (bounceType) {
case BounceType.Undetermined: {
if (bounceSubType === BounceSubType.Undetermined) {
description = BOUNCE_DESCRIPTIONS.undetermined;
}
break;
}

case BounceType.Permanent: {
if (bounceSubType === BounceSubType.General) {
description = BOUNCE_DESCRIPTIONS.permanentGeneral;
Expand Down Expand Up @@ -148,7 +141,11 @@ const getEmailBounceDescription = (
break;
}

case BounceType.Undetermined:
default: {
if (bounceSubType === BounceSubType.Undetermined) {
description = BOUNCE_DESCRIPTIONS.undetermined;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';

export enum BounceType {
unmapped,
Undetermined,
Permanent,
Transient,
Complaint,
Undetermined,
}

export enum BounceSubType {
unmapped,
Undetermined,
General,
NoEmail,
OnAccountSuppressionList,
Suppressed,
MailboxFull,
MessageTooLarge,
Expand All @@ -28,6 +27,7 @@ export enum BounceSubType {
NotSpam,
Other,
Virus,
OnAccountSuppressionList,
}

registerEnumType(BounceType, {
Expand Down
8 changes: 4 additions & 4 deletions packages/fxa-admin-server/src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@

export enum BounceType {
unmapped = "unmapped",
Undetermined = "Undetermined",
Permanent = "Permanent",
Transient = "Transient",
Complaint = "Complaint"
Complaint = "Complaint",
Undetermined = "Undetermined"
}

export enum BounceSubType {
unmapped = "unmapped",
Undetermined = "Undetermined",
General = "General",
NoEmail = "NoEmail",
OnAccountSuppressionList = "OnAccountSuppressionList",
Suppressed = "Suppressed",
MailboxFull = "MailboxFull",
MessageTooLarge = "MessageTooLarge",
Expand All @@ -32,7 +31,8 @@ export enum BounceSubType {
Fraud = "Fraud",
NotSpam = "NotSpam",
Other = "Other",
Virus = "Virus"
Virus = "Virus",
OnAccountSuppressionList = "OnAccountSuppressionList"
}

export enum ProviderId {
Expand Down
4 changes: 2 additions & 2 deletions packages/fxa-admin-server/src/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ type EmailBounce {

enum BounceType {
unmapped
Undetermined
Permanent
Transient
Complaint
Undetermined
}

enum BounceSubType {
unmapped
Undetermined
General
NoEmail
OnAccountSuppressionList
Suppressed
MailboxFull
MessageTooLarge
Expand All @@ -64,6 +63,7 @@ enum BounceSubType {
NotSpam
Other
Virus
OnAccountSuppressionList
}

type Email {
Expand Down
2 changes: 2 additions & 0 deletions packages/fxa-shared/db/models/auth/email-bounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const BOUNCE_TYPES = {
Permanent: 1,
Transient: 2,
Complaint: 3,
Undetermined: 4,
} as const;

export const BOUNCE_SUB_TYPES = {
Expand All @@ -28,6 +29,7 @@ export const BOUNCE_SUB_TYPES = {
'not-spam': 12,
other: 13,
virus: 14,
OnAccountSuppressionList: 15,
} as const;

export type BounceType = keyof typeof BOUNCE_TYPES;
Expand Down