-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(content): simplify MonetizationLinkManager (#538)
- Rename MonetizationTagManager to MonetizationLinkManager (as we want to handle only links in this service) - Simplify and reorganize MonetizationLinkManager - TypeScript improvements (check more things) Co-authored-by: Radu-Cristian Popa <[email protected]>
- Loading branch information
1 parent
d8a4e01
commit 5df489f
Showing
12 changed files
with
601 additions
and
680 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
export enum ContentToContentAction { | ||
INITIALIZE_IFRAME = 'INITIALIZE_IFRAME', | ||
IS_MONETIZATION_ALLOWED_ON_START = 'IS_MONETIZATION_ALLOWED_ON_START', | ||
IS_MONETIZATION_ALLOWED_ON_RESUME = 'IS_MONETIZATION_ALLOWED_ON_RESUME', | ||
IS_MONETIZATION_ALLOWED_ON_STOP = 'IS_MONETIZATION_ALLOWED_ON_STOP', | ||
START_MONETIZATION = 'START_MONETIZATION', | ||
STOP_MONETIZATION = 'STOP_MONETIZATION', | ||
RESUME_MONETIZATION = 'RESUME_MONETIZATION', | ||
import type { | ||
ResumeMonetizationPayload, | ||
StartMonetizationPayload, | ||
StopMonetizationPayload, | ||
} from '@/shared/messages'; | ||
|
||
export interface ContentToContentMessageMap { | ||
INITIALIZE_IFRAME: void; | ||
IS_MONETIZATION_ALLOWED_ON_START: StartMonetizationPayload; | ||
IS_MONETIZATION_ALLOWED_ON_RESUME: ResumeMonetizationPayload; | ||
IS_MONETIZATION_ALLOWED_ON_STOP: StopMonetizationPayload; | ||
START_MONETIZATION: StartMonetizationPayload; | ||
STOP_MONETIZATION: StopMonetizationPayload; | ||
RESUME_MONETIZATION: ResumeMonetizationPayload; | ||
} | ||
|
||
export type ContentToContentMessage = { | ||
[K in keyof ContentToContentMessageMap]: { | ||
message: K; | ||
id: string; | ||
payload: ContentToContentMessageMap[K]; | ||
}; | ||
}[keyof ContentToContentMessageMap]; |
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
Oops, something went wrong.