Skip to content

Commit 4f2d47a

Browse files
Merge pull request #19516 from mozilla/FXA-11612
fix(admin-panel): fix incorrect bounce types
2 parents 4151fab + b95673a commit 4f2d47a

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

packages/fxa-admin-panel/src/components/PageAccountSearch/EmailBounces/getBounceDescription.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ const getEmailBounceDescription = (
9696
) => {
9797
let description: string[] | string = HIDE_ROW;
9898
switch (bounceType) {
99-
case BounceType.Undetermined: {
100-
if (bounceSubType === BounceSubType.Undetermined) {
101-
description = BOUNCE_DESCRIPTIONS.undetermined;
102-
}
103-
break;
104-
}
105-
10699
case BounceType.Permanent: {
107100
if (bounceSubType === BounceSubType.General) {
108101
description = BOUNCE_DESCRIPTIONS.permanentGeneral;
@@ -148,7 +141,11 @@ const getEmailBounceDescription = (
148141
break;
149142
}
150143

144+
case BounceType.Undetermined:
151145
default: {
146+
if (bounceSubType === BounceSubType.Undetermined) {
147+
description = BOUNCE_DESCRIPTIONS.undetermined;
148+
}
152149
}
153150
}
154151

packages/fxa-admin-server/src/gql/model/email-bounces.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
55

66
export enum BounceType {
77
unmapped,
8-
Undetermined,
98
Permanent,
109
Transient,
1110
Complaint,
11+
Undetermined,
1212
}
1313

1414
export enum BounceSubType {
1515
unmapped,
1616
Undetermined,
1717
General,
1818
NoEmail,
19-
OnAccountSuppressionList,
2019
Suppressed,
2120
MailboxFull,
2221
MessageTooLarge,
@@ -28,6 +27,7 @@ export enum BounceSubType {
2827
NotSpam,
2928
Other,
3029
Virus,
30+
OnAccountSuppressionList,
3131
}
3232

3333
registerEnumType(BounceType, {

packages/fxa-admin-server/src/graphql.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,17 @@
1010

1111
export enum BounceType {
1212
unmapped = "unmapped",
13-
Undetermined = "Undetermined",
1413
Permanent = "Permanent",
1514
Transient = "Transient",
16-
Complaint = "Complaint"
15+
Complaint = "Complaint",
16+
Undetermined = "Undetermined"
1717
}
1818

1919
export enum BounceSubType {
2020
unmapped = "unmapped",
2121
Undetermined = "Undetermined",
2222
General = "General",
2323
NoEmail = "NoEmail",
24-
OnAccountSuppressionList = "OnAccountSuppressionList",
2524
Suppressed = "Suppressed",
2625
MailboxFull = "MailboxFull",
2726
MessageTooLarge = "MessageTooLarge",
@@ -32,7 +31,8 @@ export enum BounceSubType {
3231
Fraud = "Fraud",
3332
NotSpam = "NotSpam",
3433
Other = "Other",
35-
Virus = "Virus"
34+
Virus = "Virus",
35+
OnAccountSuppressionList = "OnAccountSuppressionList"
3636
}
3737

3838
export enum ProviderId {

packages/fxa-admin-server/src/schema.gql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,17 @@ type EmailBounce {
4141

4242
enum BounceType {
4343
unmapped
44-
Undetermined
4544
Permanent
4645
Transient
4746
Complaint
47+
Undetermined
4848
}
4949

5050
enum BounceSubType {
5151
unmapped
5252
Undetermined
5353
General
5454
NoEmail
55-
OnAccountSuppressionList
5655
Suppressed
5756
MailboxFull
5857
MessageTooLarge
@@ -64,6 +63,7 @@ enum BounceSubType {
6463
NotSpam
6564
Other
6665
Virus
66+
OnAccountSuppressionList
6767
}
6868

6969
type Email {

packages/fxa-shared/db/models/auth/email-bounce.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const BOUNCE_TYPES = {
1010
Permanent: 1,
1111
Transient: 2,
1212
Complaint: 3,
13+
Undetermined: 4,
1314
} as const;
1415

1516
export const BOUNCE_SUB_TYPES = {
@@ -28,6 +29,7 @@ export const BOUNCE_SUB_TYPES = {
2829
'not-spam': 12,
2930
other: 13,
3031
virus: 14,
32+
OnAccountSuppressionList: 15,
3133
} as const;
3234

3335
export type BounceType = keyof typeof BOUNCE_TYPES;

0 commit comments

Comments
 (0)