@@ -16,6 +16,8 @@ export const FeedbackTypeOptions = {
1616// This is mock currently, fixed value of URL still to be decided
1717// referencing the url by name
1818export const FLAG_FEEDBACK_EVENT_URL = urls [ `${ 'flagged' } _${ 'list' } ` ] ;
19+ const RECCOMMENDATION_EVENT_URL = 'TBD' ;
20+ const RECCOMMENDATION_INTERACTION_EVENT_URL = 'TBD' ;
1921
2022/**
2123 * @typedef {Object } BaseFeedbackParams
@@ -133,6 +135,35 @@ export class FlagFeedbackEvent extends BaseFlagFeedback {
133135 }
134136}
135137
138+ /**
139+ * Initializes a new RecommendationsEvent object.
140+ *
141+ * @param {Object } params - Parameters for initializing the recommendations event.
142+ * @param {Object[] } params.content - An array of JSON objects,
143+ * each representing a recommended content item.
144+ */
145+ export class RecommendationsEvent extends BaseFeedbackEvent {
146+ constructor ( { content, ...basefeedbackEventParams } ) {
147+ super ( basefeedbackEventParams ) ;
148+ this . content = content ;
149+ this . URL = RECCOMMENDATION_EVENT_URL ;
150+ }
151+ }
152+
153+ /**
154+ * Initializes a new RecommendationsInteractionEvent object.
155+ *
156+ * @param {Object } params - Parameters for initializing the recommendations interaction event.
157+ * @param {BaseFeedbackParams } feedbackInteractionEventParams - Parameters inherited from the
158+ * base feedback interaction event class.
159+ */
160+ export class RecommendationsInteractionEvent extends BaseFeedbackInteractionEvent {
161+ constructor ( feedbackInteractionEventParams ) {
162+ super ( feedbackInteractionEventParams ) ;
163+ this . URL = RECCOMMENDATION_INTERACTION_EVENT_URL ;
164+ }
165+ }
166+
136167/**
137168 * Sends a request using the provided feedback object.
138169 *
0 commit comments