From 7de5ff25f6c166c87c10a490db6ab652b2d50d11 Mon Sep 17 00:00:00 2001 From: Cole Rogers Date: Mon, 21 Feb 2022 09:44:47 -0500 Subject: [PATCH 1/3] fixing typo --- spec/v2/providers/alerts/billing.spec.ts | 4 ++-- src/v2/providers/alerts/billing.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/v2/providers/alerts/billing.spec.ts b/spec/v2/providers/alerts/billing.spec.ts index a9e4e173d..33d304089 100644 --- a/spec/v2/providers/alerts/billing.spec.ts +++ b/spec/v2/providers/alerts/billing.spec.ts @@ -45,7 +45,7 @@ describe('billing', () => { describe('onAutomatedPlanUpdatePublished', () => { it('should create a function with only handler', () => { - const func = billing.onAutomatedPlanUpdatePublished(myHandler); + const func = billing.onPlanAutomatedUpdatePublished(myHandler); expect(func.__endpoint).to.deep.equal({ platform: 'gcfv2', @@ -61,7 +61,7 @@ describe('billing', () => { }); it('should create a function with opts & handler', () => { - const func = billing.onAutomatedPlanUpdatePublished( + const func = billing.onPlanAutomatedUpdatePublished( { ...FULL_OPTIONS }, myHandler ); diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index f2ecd4289..1c6b2204b 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -60,18 +60,18 @@ export function onPlanUpdatePublished( /** * Declares a function that can handle an automated billing plan update event. */ -export function onAutomatedPlanUpdatePublished( +export function onPlanAutomatedUpdatePublished( handler: ( event: BillingEvent ) => any | Promise ): CloudFunction>; -export function onAutomatedPlanUpdatePublished( +export function onPlanAutomatedUpdatePublished( opts: options.EventHandlerOptions, handler: ( event: BillingEvent ) => any | Promise ): CloudFunction>; -export function onAutomatedPlanUpdatePublished( +export function onPlanAutomatedUpdatePublished( optsOrHandler: | options.EventHandlerOptions | ((event: BillingEvent) => any | Promise), From 16e8e12f02e54867e4ce4d432066910b362826e3 Mon Sep 17 00:00:00 2001 From: Cole Rogers Date: Mon, 21 Feb 2022 13:25:48 -0500 Subject: [PATCH 2/3] changing var name & fixing describe title --- spec/v2/providers/alerts/billing.spec.ts | 6 +++--- src/v2/providers/alerts/billing.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/v2/providers/alerts/billing.spec.ts b/spec/v2/providers/alerts/billing.spec.ts index 33d304089..71e695fc7 100644 --- a/spec/v2/providers/alerts/billing.spec.ts +++ b/spec/v2/providers/alerts/billing.spec.ts @@ -43,7 +43,7 @@ describe('billing', () => { }); }); - describe('onAutomatedPlanUpdatePublished', () => { + describe('onPlanAutomatedUpdatePublished', () => { it('should create a function with only handler', () => { const func = billing.onPlanAutomatedUpdatePublished(myHandler); @@ -53,7 +53,7 @@ describe('billing', () => { eventTrigger: { eventType: alerts.eventType, eventFilters: { - alertType: billing.automatedPlanUpdateAlert, + alertType: billing.planAutomatedUpdateAlert, }, retry: false, }, @@ -71,7 +71,7 @@ describe('billing', () => { eventTrigger: { eventType: alerts.eventType, eventFilters: { - alertType: billing.automatedPlanUpdateAlert, + alertType: billing.planAutomatedUpdateAlert, }, retry: false, }, diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index 1c6b2204b..9f6703ed8 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -32,7 +32,7 @@ export type BillingEvent = CloudEvent, WithAlertType>; /** @internal */ export const planUpdateAlert = 'billing.planUpdate'; /** @internal */ -export const automatedPlanUpdateAlert = 'billing.automatedPlanUpdate'; +export const planAutomatedUpdateAlert = 'billing.automatedPlanUpdate'; /** * Declares a function that can handle a billing plan update event. @@ -80,7 +80,7 @@ export function onPlanAutomatedUpdatePublished( ) => any | Promise ): CloudFunction> { return onOperation( - automatedPlanUpdateAlert, + planAutomatedUpdateAlert, optsOrHandler, handler ); From affd78b2f606dfe58d62e85b24074e5313c17794 Mon Sep 17 00:00:00 2001 From: Cole Rogers Date: Thu, 3 Mar 2022 19:18:14 -0500 Subject: [PATCH 3/3] updating alerttype --- src/v2/providers/alerts/billing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/providers/alerts/billing.ts b/src/v2/providers/alerts/billing.ts index 9f6703ed8..dd8ccb2c5 100644 --- a/src/v2/providers/alerts/billing.ts +++ b/src/v2/providers/alerts/billing.ts @@ -32,7 +32,7 @@ export type BillingEvent = CloudEvent, WithAlertType>; /** @internal */ export const planUpdateAlert = 'billing.planUpdate'; /** @internal */ -export const planAutomatedUpdateAlert = 'billing.automatedPlanUpdate'; +export const planAutomatedUpdateAlert = 'billing.planAutomatedUpdate'; /** * Declares a function that can handle a billing plan update event.