Skip to content

Commit 5889a3a

Browse files
authored
Enable alarm notifications for new puzzles server side hub (#3310)
* add puzzles team and app * Update configSchema.ts * Update index.test.ts * Update indexScheduled.test.ts
1 parent e34a17e commit 5889a3a

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

handlers/alarms-handler/src/alarmMappings.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import { objectEntries } from '@modules/objectFunctions';
22

3-
type Team = 'VALUE' | 'GROWTH' | 'PORTFOLIO' | 'PLATFORM' | 'SRE' | 'ENGINE';
3+
type Team =
4+
| 'VALUE'
5+
| 'GROWTH'
6+
| 'PORTFOLIO'
7+
| 'PLATFORM'
8+
| 'SRE'
9+
| 'ENGINE'
10+
| 'PUZZLES';
411

512
const mobilePurchasesApps = [
613
'mobile-purchases-apple-pubsub',
@@ -135,6 +142,7 @@ const teamToAppMappings: Record<Team, string[]> = {
135142
'observer-data-export',
136143
],
137144
ENGINE: ['price-migration-engine-state-machine'],
145+
PUZZLES: ['puzzles-app'],
138146
};
139147

140148
const buildAppToTeamMappings = (

handlers/alarms-handler/src/configSchema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const WebhookUrlsSchema = z.object({
88
PORTFOLIO: z.string(),
99
PLATFORM: z.string(),
1010
ENGINE: z.string(),
11+
PUZZLES: z.string(),
1112
});
1213
export type WebhookUrls = z.infer<typeof WebhookUrlsSchema>;
1314

handlers/alarms-handler/test/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('Handler', () => {
1313
PORTFOLIO: 'portfolio-webhook-url',
1414
PLATFORM: 'platform-webhook-url',
1515
ENGINE: 'engine-webhook-url',
16+
PUZZLES: 'puzzles-webhook-url',
1617
};
1718

1819
const mockCloudWatchAlarmEvent = {

handlers/alarms-handler/test/indexScheduled.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ it('should convert some alarms into a chat message', async () => {
1414
PORTFOLIO: '',
1515
PLATFORM: '',
1616
ENGINE: '',
17+
PUZZLES: '',
1718
};
1819
const alarms = await getChatMessages(
1920
dayjs(new Date(2025, 4, 21, 16, 16)),

0 commit comments

Comments
 (0)