-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor element-util.ts and common.ts
- Import generateUUID from @dhruv-techapps/core-common - Replace crypto.randomUUID() with generateUUID() for generating UUIDs - Remove unused RANDOM_UUID type from common.ts - Update imports in action-model.ts and config-model.ts to use generateUUID from @dhruv-techapps/core-common - Update imports in notifications.service.ts to use generateUUID from @dhruv-techapps/core-common - Update imports in google-analytics-background.ts and sandbox.ts to use generateUUID from @dhruv-techapps/core-common
- Loading branch information
1 parent
5d58967
commit ee09fd7
Showing
8 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
import { generateUUID } from '@dhruv-techapps/core-common'; | ||
import { NotificationsRequest } from '@dhruv-techapps/core-extension'; | ||
import { CoreService } from './service'; | ||
|
||
export class NotificationsService extends CoreService { | ||
static async create(options: chrome.notifications.NotificationOptions<true>, notificationId: string = crypto.randomUUID()) { | ||
static async create(options: chrome.notifications.NotificationOptions<true>, notificationId: string = generateUUID()) { | ||
return await this.message<NotificationsRequest>({ messenger: 'notifications', message: { notificationId, options }, methodName: 'create' }); | ||
} | ||
|
||
static async update(options: chrome.notifications.NotificationOptions<false>, notificationId: string = crypto.randomUUID()) { | ||
static async update(options: chrome.notifications.NotificationOptions<false>, notificationId: string = generateUUID()) { | ||
return await this.message<NotificationsRequest>({ messenger: 'notifications', message: { notificationId, options }, methodName: 'update' }); | ||
} | ||
|
||
static async clear(notificationId: string = crypto.randomUUID()) { | ||
static async clear(notificationId: string = generateUUID()) { | ||
return await this.message<NotificationsRequest>({ messenger: 'notifications', message: { notificationId }, methodName: 'clear' }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters