Skip to content

Commit

Permalink
Update types for AlertPayloads (#1087)
Browse files Browse the repository at this point in the history
* Update types for AlertPayloads

This commit updates the typing for the AlertPayloads.

There was a discrepency between the type definitions and what
prod was returning.

* From: `com.google.firebase.firebasealerts.*`
* To: `type.googleapis.com/google.events.firebase.firebasealerts.v1.*`


Co-authored-by: Daniel Lee <taeold@gmail.com>
  • Loading branch information
TheIronDev and taeold committed Apr 29, 2022
1 parent c91fd9b commit c4f63c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/v2/providers/alerts/billing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as options from '../../options';
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface PlanUpdatePayload {
['@type']: 'com.google.firebase.firebasealerts.PlanUpdatePayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.BillingPlanUpdatePayload';
billingPlan: string;
principalEmail: string;
}
Expand All @@ -17,7 +17,7 @@ export interface PlanUpdatePayload {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface PlanAutomatedUpdatePayload {
['@type']: 'com.google.firebase.firebasealerts.PlanAutomatedUpdatePayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.BillingPlanAutomatedUpdatePayload';
billingPlan: string;
}

Expand Down
12 changes: 6 additions & 6 deletions src/v2/providers/alerts/crashlytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface Issue {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface NewFatalIssuePayload {
['@type']: 'com.google.firebase.firebasealerts.CrashlyticsNewFatalIssuePayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsNewFatalIssuePayload';
issue: Issue;
}

Expand All @@ -24,7 +24,7 @@ export interface NewFatalIssuePayload {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface NewNonfatalIssuePayload {
['@type']: 'com.google.firebase.firebasealerts.CrashlyticsNewNonfatalIssuePayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsNewNonfatalIssuePayload';
issue: Issue;
}

Expand All @@ -33,7 +33,7 @@ export interface NewNonfatalIssuePayload {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface RegressionAlertPayload {
['@type']: 'com.google.firebase.firebasealerts.CrashlyticsRegressionAlertPayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsRegressionAlertPayload';
type: string;
issue: Issue;
resolveTime: string;
Expand All @@ -52,7 +52,7 @@ interface TrendingIssueDetails {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface StabilityDigestPayload {
['@type']: 'com.google.firebase.firebasealerts.CrashlyticsStabilityDigestPayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsStabilityDigestPayload';
digestDate: string;
trendingIssues: TrendingIssueDetails[];
}
Expand All @@ -62,7 +62,7 @@ export interface StabilityDigestPayload {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface VelocityAlertPayload {
['@type']: 'com.google.firebase.firebasealerts.VelocityAlertPayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsVelocityAlertPayload';
issue: Issue;
createTime: string;
crashCount: number;
Expand All @@ -75,7 +75,7 @@ export interface VelocityAlertPayload {
* Payload is wrapped inside a FirebaseAlertData object.
*/
export interface NewAnrIssuePayload {
['@type']: 'com.google.firebase.firebasealerts.NewAnrIssuePayload';
['@type']: 'type.googleapis.com/google.events.firebase.firebasealerts.v1.CrashlyticsNewAnrIssuePayload';
issue: Issue;
}

Expand Down

0 comments on commit c4f63c7

Please sign in to comment.