mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-11-16 00:25:11 +01:00
[docx] split commit for file 3000
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
This commit is contained in:
parent
af50481590
commit
23cec12533
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.util.Time
|
||||
|
||||
trait HasExpirationTime {
|
||||
def expirationTime: Option[Time] = None
|
||||
|
||||
final def expirationTimeInMillis: Option[Long] = expirationTime.map(_.inMillis)
|
||||
}
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
trait HasSortIndex { timelineEntry: TimelineEntry =>
|
||||
def sortIndex: Option[Long]
|
||||
|
||||
def withSortIndex(sortIndex: Long): TimelineEntry
|
||||
}
|
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleDisplayType
|
||||
|
||||
case class ModuleItemTreeDisplay(
|
||||
parentModuleEntryItemId: Option[String],
|
||||
indentFromParent: Option[Boolean],
|
||||
displayType: Option[ModuleDisplayType],
|
||||
isAnchorChild: Option[Boolean])
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import metadata.Url
|
||||
|
||||
case class ReaderModeConfig(isReaderModeAvailable: Boolean, landingUrl: Url)
|
Binary file not shown.
@ -1,46 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.ShowAlert.ShowAlertEntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertColorConfiguration
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertDisplayLocation
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertIconDisplayInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertNavigationMetadata
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.alert.ShowAlertType
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText
|
||||
import com.twitter.util.Duration
|
||||
|
||||
/**
|
||||
* Domain model for the URT ShowAlert [[https://docbird.twitter.biz/unified_rich_timelines_urt/gen/com/twitter/timelines/render/thriftscala/ShowAlert.html]]
|
||||
*
|
||||
* @note the text field (id: 2) has been deliberately excluded as it's been deprecated since 2018. Use RichText instead.
|
||||
*/
|
||||
case class ShowAlert(
|
||||
override val id: String,
|
||||
override val sortIndex: Option[Long],
|
||||
alertType: ShowAlertType,
|
||||
triggerDelay: Option[Duration],
|
||||
displayDuration: Option[Duration],
|
||||
clientEventInfo: Option[ClientEventInfo],
|
||||
collapseDelay: Option[Duration],
|
||||
userIds: Option[Seq[Long]],
|
||||
richText: Option[RichText],
|
||||
iconDisplayInfo: Option[ShowAlertIconDisplayInfo],
|
||||
colorConfig: ShowAlertColorConfiguration,
|
||||
displayLocation: ShowAlertDisplayLocation,
|
||||
navigationMetadata: Option[ShowAlertNavigationMetadata],
|
||||
) extends TimelineItem {
|
||||
override val entryNamespace: EntryNamespace = ShowAlertEntryNamespace
|
||||
|
||||
// Note that sort index is not used for ShowAlerts, as they are not TimelineEntry and do not have entryId
|
||||
override def withSortIndex(newSortIndex: Long): TimelineEntry =
|
||||
copy(sortIndex = Some(newSortIndex))
|
||||
|
||||
// Not used for ShowAlerts
|
||||
override def feedbackActionInfo: Option[FeedbackActionInfo] = None
|
||||
}
|
||||
|
||||
object ShowAlert {
|
||||
val ShowAlertEntryNamespace: EntryNamespace = EntryNamespace("show-alert")
|
||||
}
|
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.HasMarshalling
|
||||
|
||||
case class Timeline(
|
||||
id: String,
|
||||
instructions: Seq[TimelineInstruction],
|
||||
// responseObjects::feedbackActions actions are populated implicitly, see UrtTransportMarshaller
|
||||
metadata: Option[TimelineMetadata] = None)
|
||||
extends HasMarshalling
|
Binary file not shown.
@ -1,56 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ContainsFeedbackActionInfos
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasFeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.PinnableEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ReplaceableEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.MarkUnreadableEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleDisplayType
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleFooter
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleHeader
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleMetadata
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.timeline_module.ModuleShowMoreBehavior
|
||||
|
||||
sealed trait TimelineEntry
|
||||
extends HasEntryIdentifier
|
||||
with HasSortIndex
|
||||
with HasExpirationTime
|
||||
with PinnableEntry
|
||||
with ReplaceableEntry
|
||||
with MarkUnreadableEntry
|
||||
|
||||
trait TimelineItem extends TimelineEntry with HasClientEventInfo with HasFeedbackActionInfo
|
||||
|
||||
case class ModuleItem(
|
||||
item: TimelineItem,
|
||||
dispensable: Option[Boolean],
|
||||
treeDisplay: Option[ModuleItemTreeDisplay])
|
||||
|
||||
case class TimelineModule(
|
||||
override val id: Long,
|
||||
override val sortIndex: Option[Long],
|
||||
override val entryNamespace: EntryNamespace,
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo],
|
||||
override val isPinned: Option[Boolean],
|
||||
items: Seq[ModuleItem],
|
||||
displayType: ModuleDisplayType,
|
||||
header: Option[ModuleHeader],
|
||||
footer: Option[ModuleFooter],
|
||||
metadata: Option[ModuleMetadata],
|
||||
showMoreBehavior: Option[ModuleShowMoreBehavior])
|
||||
extends TimelineEntry
|
||||
with HasClientEventInfo
|
||||
with HasFeedbackActionInfo
|
||||
with ContainsFeedbackActionInfos {
|
||||
override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] = {
|
||||
items.map(_.item.feedbackActionInfo) :+ feedbackActionInfo
|
||||
}
|
||||
|
||||
override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
||||
|
||||
trait TimelineOperation extends TimelineEntry
|
Binary file not shown.
@ -1,65 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ContainsFeedbackActionInfos
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.HasFeedbackActionInfo
|
||||
|
||||
sealed trait TimelineInstruction
|
||||
|
||||
case class AddEntriesTimelineInstruction(entries: Seq[TimelineEntry])
|
||||
extends TimelineInstruction
|
||||
with ContainsFeedbackActionInfos {
|
||||
override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] =
|
||||
entries.flatMap {
|
||||
// Order is important, as entries that implement both ContainsFeedbackActionInfos and
|
||||
// HasFeedbackActionInfo are expected to include both when implementing ContainsFeedbackActionInfos
|
||||
case containsFeedbackActionInfos: ContainsFeedbackActionInfos =>
|
||||
containsFeedbackActionInfos.feedbackActionInfos
|
||||
case hasFeedbackActionInfo: HasFeedbackActionInfo =>
|
||||
Seq(hasFeedbackActionInfo.feedbackActionInfo)
|
||||
case _ => Seq.empty
|
||||
}
|
||||
}
|
||||
|
||||
case class ReplaceEntryTimelineInstruction(entry: TimelineEntry)
|
||||
extends TimelineInstruction
|
||||
with ContainsFeedbackActionInfos {
|
||||
override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] =
|
||||
entry match {
|
||||
// Order is important, as entries that implement both ContainsFeedbackActionInfos and
|
||||
// HasFeedbackActionInfo are expected to include both when implementing ContainsFeedbackActionInfos
|
||||
case containsFeedbackActionInfos: ContainsFeedbackActionInfos =>
|
||||
containsFeedbackActionInfos.feedbackActionInfos
|
||||
case hasFeedbackActionInfo: HasFeedbackActionInfo =>
|
||||
Seq(hasFeedbackActionInfo.feedbackActionInfo)
|
||||
case _ => Seq.empty
|
||||
}
|
||||
}
|
||||
|
||||
case class AddToModuleTimelineInstruction(
|
||||
moduleItems: Seq[ModuleItem],
|
||||
moduleEntryId: String,
|
||||
moduleItemEntryId: Option[String],
|
||||
prepend: Option[Boolean])
|
||||
extends TimelineInstruction
|
||||
with ContainsFeedbackActionInfos {
|
||||
override def feedbackActionInfos: Seq[Option[FeedbackActionInfo]] =
|
||||
moduleItems.map(_.item.feedbackActionInfo)
|
||||
}
|
||||
|
||||
case class PinEntryTimelineInstruction(entry: TimelineEntry) extends TimelineInstruction
|
||||
|
||||
case class MarkEntriesUnreadInstruction(entryIds: Seq[String]) extends TimelineInstruction
|
||||
|
||||
case class ClearCacheTimelineInstruction() extends TimelineInstruction
|
||||
|
||||
sealed trait TimelineTerminationDirection
|
||||
case object TopTermination extends TimelineTerminationDirection
|
||||
case object BottomTermination extends TimelineTerminationDirection
|
||||
case object TopAndBottomTermination extends TimelineTerminationDirection
|
||||
case class TerminateTimelineInstruction(terminateTimelineDirection: TimelineTerminationDirection)
|
||||
extends TimelineInstruction
|
||||
|
||||
case class ShowCoverInstruction(cover: Cover) extends TimelineInstruction
|
||||
|
||||
case class ShowAlertInstruction(showAlert: ShowAlert) extends TimelineInstruction
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
case class TimelineMetadata(
|
||||
title: Option[String],
|
||||
scribeConfig: Option[TimelineScribeConfig],
|
||||
readerModeConfig: Option[ReaderModeConfig] = None)
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt
|
||||
|
||||
case class TimelineScribeConfig(
|
||||
page: Option[String],
|
||||
section: Option[String],
|
||||
entityToken: Option[String])
|
@ -1,19 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext",
|
||||
"util/util-core:scala",
|
||||
],
|
||||
exports = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/color",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext",
|
||||
"util/util-core:scala",
|
||||
],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor
|
||||
|
||||
case class ShowAlertColorConfiguration(
|
||||
background: RosettaColor,
|
||||
text: RosettaColor,
|
||||
border: Option[RosettaColor],
|
||||
)
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
sealed trait ShowAlertDisplayLocation
|
||||
case object Top extends ShowAlertDisplayLocation
|
||||
case object Bottom extends ShowAlertDisplayLocation
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
sealed trait ShowAlertIcon
|
||||
case object UpArrow extends ShowAlertIcon
|
||||
case object DownArrow extends ShowAlertIcon
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.color.RosettaColor
|
||||
|
||||
case class ShowAlertIconDisplayInfo(icon: ShowAlertIcon, tint: RosettaColor)
|
Binary file not shown.
@ -1,3 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
case class ShowAlertNavigationMetadata(navigateToEntryId: String)
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.alert
|
||||
|
||||
sealed trait ShowAlertType
|
||||
case object NewTweets extends ShowAlertType
|
||||
case object Navigate extends ShowAlertType
|
@ -1,15 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
],
|
||||
exports = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/icon",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.button
|
||||
|
||||
sealed trait ButtonStyle
|
||||
|
||||
case object Default extends ButtonStyle
|
||||
case object Primary extends ButtonStyle
|
||||
case object Secondary extends ButtonStyle
|
||||
case object Text extends ButtonStyle
|
||||
case object Destructive extends ButtonStyle
|
||||
case object Neutral extends ButtonStyle
|
||||
case object DestructiveSecondary extends ButtonStyle
|
||||
case object DestructiveText extends ButtonStyle
|
Binary file not shown.
@ -1,11 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.button
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url
|
||||
|
||||
sealed trait CtaButton
|
||||
|
||||
case class TextCtaButton(buttonText: String, url: Url) extends CtaButton
|
||||
|
||||
case class IconCtaButton(buttonIcon: HorizonIcon, accessibilityLabel: String, url: Url)
|
||||
extends CtaButton
|
@ -1,8 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.color
|
||||
|
||||
case class Color(
|
||||
red: Short,
|
||||
green: Short,
|
||||
blue: Short,
|
||||
opacity: Option[Short])
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.color
|
||||
|
||||
case class ColorPalette(
|
||||
rgb: Color,
|
||||
percentage: Double)
|
Binary file not shown.
@ -1,47 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.color
|
||||
|
||||
sealed trait RosettaColor
|
||||
|
||||
case object WhiteRosettaColor extends RosettaColor
|
||||
case object BlackRosettaColor extends RosettaColor
|
||||
case object ClearRosettaColor extends RosettaColor
|
||||
|
||||
case object TextBlackRosettaColor extends RosettaColor
|
||||
case object TextBlueRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepGrayRosettaColor extends RosettaColor
|
||||
case object MediumGrayRosettaColor extends RosettaColor
|
||||
case object LightGrayRosettaColor extends RosettaColor
|
||||
case object FadedGrayRosettaColor extends RosettaColor
|
||||
case object FaintGrayRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepOrangeRosettaColor extends RosettaColor
|
||||
case object MediumOrangeRosettaColor extends RosettaColor
|
||||
case object LightOrangeRosettaColor extends RosettaColor
|
||||
case object FadedOrangeRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepYellowRosettaColor extends RosettaColor
|
||||
case object MediumYellowRosettaColor extends RosettaColor
|
||||
case object LightYellowRosettaColor extends RosettaColor
|
||||
case object FadedYellowRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepGreenRosettaColor extends RosettaColor
|
||||
case object MediumGreenRosettaColor extends RosettaColor
|
||||
case object LightGreenRosettaColor extends RosettaColor
|
||||
case object FadedGreenRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepBlueRosettaColor extends RosettaColor
|
||||
case object TwitterBlueRosettaColor extends RosettaColor
|
||||
case object LightBlueRosettaColor extends RosettaColor
|
||||
case object FadedBlueRosettaColor extends RosettaColor
|
||||
case object FaintBlueRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepPurpleRosettaColor extends RosettaColor
|
||||
case object MediumPurpleRosettaColor extends RosettaColor
|
||||
case object LightPurpleRosettaColor extends RosettaColor
|
||||
case object FadedPurpleRosettaColor extends RosettaColor
|
||||
|
||||
case object DeepRedRosettaColor extends RosettaColor
|
||||
case object MediumRedRosettaColor extends RosettaColor
|
||||
case object LightRedRosettaColor extends RosettaColor
|
||||
case object FadedRedRosettaColor extends RosettaColor
|
@ -1,15 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/rtf/safety_level",
|
||||
],
|
||||
exports = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/rtf/safety_level",
|
||||
],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref
|
||||
|
||||
case class ContextualTweetRef(
|
||||
id: Long,
|
||||
hydrationContext: Option[TweetHydrationContext])
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref
|
||||
|
||||
sealed trait OuterTweetContext
|
||||
|
||||
case class QuoteTweetId(id: Long) extends OuterTweetContext
|
||||
case class RetweetId(id: Long) extends OuterTweetContext
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.contextual_ref
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.rtf.safety_level.SafetyLevel
|
||||
|
||||
case class TweetHydrationContext(
|
||||
safetyLevelOverride: Option[SafetyLevel],
|
||||
outerTweetContext: Option[OuterTweetContext])
|
@ -1,16 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
],
|
||||
exports = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/metadata",
|
||||
],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,34 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.DismissInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageDisplayType
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText
|
||||
|
||||
sealed trait CoverContent
|
||||
|
||||
case class FullCoverContent(
|
||||
displayType: FullCoverDisplayType,
|
||||
primaryText: RichText,
|
||||
primaryCoverCta: CoverCta,
|
||||
secondaryCoverCta: Option[CoverCta],
|
||||
secondaryText: Option[RichText],
|
||||
imageVariant: Option[ImageVariant],
|
||||
details: Option[RichText],
|
||||
dismissInfo: Option[DismissInfo],
|
||||
imageDisplayType: Option[ImageDisplayType],
|
||||
impressionCallbacks: Option[List[Callback]])
|
||||
extends CoverContent
|
||||
|
||||
case class HalfCoverContent(
|
||||
displayType: HalfCoverDisplayType,
|
||||
primaryText: RichText,
|
||||
primaryCoverCta: CoverCta,
|
||||
secondaryCoverCta: Option[CoverCta],
|
||||
secondaryText: Option[RichText],
|
||||
impressionCallbacks: Option[List[Callback]],
|
||||
dismissible: Option[Boolean],
|
||||
coverImage: Option[CoverImage],
|
||||
dismissInfo: Option[DismissInfo])
|
||||
extends CoverContent
|
Binary file not shown.
@ -1,14 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.button.ButtonStyle
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.icon.HorizonIcon
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Callback
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
|
||||
case class CoverCta(
|
||||
text: String,
|
||||
ctaBehavior: CoverCtaBehavior,
|
||||
callbacks: Option[List[Callback]],
|
||||
clientEventInfo: Option[ClientEventInfo],
|
||||
icon: Option[HorizonIcon],
|
||||
buttonStyle: Option[ButtonStyle])
|
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText
|
||||
|
||||
sealed trait CoverCtaBehavior
|
||||
|
||||
case class CoverBehaviorNavigate(url: Url) extends CoverCtaBehavior
|
||||
case class CoverBehaviorDismiss(feedbackMessage: Option[RichText]) extends CoverCtaBehavior
|
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageAnimationType
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageDisplayType
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ImageVariant
|
||||
|
||||
case class CoverImage(
|
||||
imageVariant: ImageVariant,
|
||||
imageDisplayType: ImageDisplayType,
|
||||
imageAnimationType: Option[ImageAnimationType])
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
sealed trait FullCoverDisplayType
|
||||
|
||||
case object CoverFullCoverDisplayType extends FullCoverDisplayType
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
sealed trait HalfCoverDisplayType
|
||||
|
||||
case object CoverHalfCoverDisplayType extends HalfCoverDisplayType
|
||||
case object CenterCoverHalfCoverDisplayType extends HalfCoverDisplayType
|
Binary file not shown.
@ -1,49 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.cover
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.Cover
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.cover.FullCover.FullCoverEntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.cover.HalfCover.HalfCoverEntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
|
||||
object HalfCover {
|
||||
val HalfCoverEntryNamespace = EntryNamespace("half-cover")
|
||||
}
|
||||
case class HalfCover(
|
||||
override val id: String,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
content: HalfCoverContent)
|
||||
extends Cover {
|
||||
|
||||
override val entryNamespace: EntryNamespace = HalfCoverEntryNamespace
|
||||
|
||||
// Note that sort index is not used for Covers, as they are not TimelineEntry and do not have entryId
|
||||
override def withSortIndex(newSortIndex: Long): TimelineEntry =
|
||||
copy(sortIndex = Some(newSortIndex))
|
||||
|
||||
// Not used for covers
|
||||
override def feedbackActionInfo: Option[FeedbackActionInfo] = None
|
||||
}
|
||||
|
||||
object FullCover {
|
||||
val FullCoverEntryNamespace = EntryNamespace("full-cover")
|
||||
}
|
||||
case class FullCover(
|
||||
override val id: String,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
content: FullCoverContent)
|
||||
extends Cover {
|
||||
|
||||
override val entryNamespace: EntryNamespace = FullCoverEntryNamespace
|
||||
|
||||
// Note that sort index is not used for Covers, as they are not TimelineEntry and do not have entryId
|
||||
override def withSortIndex(newSortIndex: Long): TimelineEntry =
|
||||
copy(sortIndex = Some(newSortIndex))
|
||||
|
||||
// Not used for covers
|
||||
override def feedbackActionInfo: Option[FeedbackActionInfo] = None
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [],
|
||||
exports = [],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,43 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.icon
|
||||
|
||||
sealed trait HorizonIcon
|
||||
|
||||
case object Bookmark extends HorizonIcon
|
||||
case object Moment extends HorizonIcon
|
||||
case object Debug extends HorizonIcon
|
||||
case object Error extends HorizonIcon
|
||||
case object Follow extends HorizonIcon
|
||||
case object Unfollow extends HorizonIcon
|
||||
case object Smile extends HorizonIcon
|
||||
case object Frown extends HorizonIcon
|
||||
case object Help extends HorizonIcon
|
||||
case object Link extends HorizonIcon
|
||||
case object Message extends HorizonIcon
|
||||
case object No extends HorizonIcon
|
||||
case object Outgoing extends HorizonIcon
|
||||
case object Pin extends HorizonIcon
|
||||
case object Retweet extends HorizonIcon
|
||||
case object Speaker extends HorizonIcon
|
||||
case object Trashcan extends HorizonIcon
|
||||
case object Feedback extends HorizonIcon
|
||||
case object FeedbackClose extends HorizonIcon
|
||||
case object EyeOff extends HorizonIcon
|
||||
case object Moderation extends HorizonIcon
|
||||
case object Topic extends HorizonIcon
|
||||
case object TopicClose extends HorizonIcon
|
||||
case object Flag extends HorizonIcon
|
||||
case object TopicFilled extends HorizonIcon
|
||||
case object NotificationsFollow extends HorizonIcon
|
||||
case object Person extends HorizonIcon
|
||||
case object BalloonStroke extends HorizonIcon
|
||||
case object Calendar extends HorizonIcon
|
||||
case object LocationStroke extends HorizonIcon
|
||||
case object PersonStroke extends HorizonIcon
|
||||
case object Safety extends HorizonIcon
|
||||
case object Logo extends HorizonIcon
|
||||
case object SparkleOn extends HorizonIcon
|
||||
case object StarRising extends HorizonIcon
|
||||
case object CameraVideo extends HorizonIcon
|
||||
case object ShoppingClock extends HorizonIcon
|
||||
case object ArrowRight extends HorizonIcon
|
||||
case object SpeakerOff extends HorizonIcon
|
@ -1,24 +0,0 @@
|
||||
scala_library(
|
||||
sources = ["**/*.scala"],
|
||||
compiler_option_sets = ["fatal_warnings"],
|
||||
platform = "java8",
|
||||
strict_deps = True,
|
||||
tags = ["bazel-compatible"],
|
||||
dependencies = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/richtext",
|
||||
],
|
||||
exports = [
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/button",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/contextual_ref",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/media",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/promoted",
|
||||
"product-mixer/core/src/main/scala/com/twitter/product_mixer/core/model/marshalling/response/urt/reaction",
|
||||
],
|
||||
)
|
Binary file not shown.
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article
|
||||
|
||||
sealed trait ArticleDisplayType
|
||||
|
||||
case object Default extends ArticleDisplayType
|
Binary file not shown.
@ -1,26 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.SocialContext
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
||||
|
||||
object ArticleItem {
|
||||
val ArticleEntryNamespace = EntryNamespace("article")
|
||||
}
|
||||
|
||||
case class ArticleItem(
|
||||
override val id: Int,
|
||||
articleSeedType: ArticleSeedType,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo],
|
||||
displayType: Option[ArticleDisplayType],
|
||||
socialContext: Option[SocialContext])
|
||||
extends TimelineItem {
|
||||
override val entryNamespace: EntryNamespace = ArticleItem.ArticleEntryNamespace
|
||||
|
||||
override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.article
|
||||
|
||||
sealed trait ArticleSeedType
|
||||
|
||||
/**
|
||||
* Seed UTEG with a user's following list (1st degree network)
|
||||
*/
|
||||
case object FollowingListSeed extends ArticleSeedType
|
||||
|
||||
/**
|
||||
* Seed UTEG with a user's friends of friends (follow graph + 1) list
|
||||
*/
|
||||
case object FriendsOfFriendsSeed extends ArticleSeedType
|
||||
|
||||
/**
|
||||
* Seed UTEG with a given lists' members
|
||||
*/
|
||||
case object ListIdSeed extends ArticleSeedType
|
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.audio_space
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
||||
|
||||
object AudioSpaceItem {
|
||||
val SpaceEntryNamespace = EntryNamespace("audiospace")
|
||||
}
|
||||
|
||||
case class AudioSpaceItem(
|
||||
override val id: String,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo])
|
||||
extends TimelineItem {
|
||||
override val entryNamespace: EntryNamespace = AudioSpaceItem.SpaceEntryNamespace
|
||||
|
||||
override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.card
|
||||
|
||||
sealed trait CardDisplayType
|
||||
|
||||
case object HeroDisplayType extends CardDisplayType
|
||||
case object CellDisplayType extends CardDisplayType
|
||||
case object TweetCardDisplayType extends CardDisplayType
|
Binary file not shown.
@ -1,28 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.card
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.Url
|
||||
|
||||
object CardItem {
|
||||
val CardEntryNamespace = EntryNamespace("card")
|
||||
}
|
||||
|
||||
case class CardItem(
|
||||
override val id: String,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo],
|
||||
cardUrl: String,
|
||||
text: Option[String],
|
||||
subtext: Option[String],
|
||||
url: Option[Url],
|
||||
displayType: Option[CardDisplayType])
|
||||
extends TimelineItem {
|
||||
override val entryNamespace: EntryNamespace = CardItem.CardEntryNamespace
|
||||
|
||||
override def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
Binary file not shown.
@ -1,23 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce.CommerceProductGroupItem.CommerceProductGroupEntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
|
||||
object CommerceProductGroupItem {
|
||||
val CommerceProductGroupEntryNamespace: EntryNamespace = EntryNamespace("commerce-product-group")
|
||||
}
|
||||
|
||||
case class CommerceProductGroupItem(
|
||||
override val id: Long,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo])
|
||||
extends TimelineItem {
|
||||
|
||||
val entryNamespace: EntryNamespace = CommerceProductGroupEntryNamespace
|
||||
def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
Binary file not shown.
@ -1,23 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.EntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineEntry
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.TimelineItem
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.item.commerce.CommerceProductItem.CommerceProductEntryNamespace
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.ClientEventInfo
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.metadata.FeedbackActionInfo
|
||||
|
||||
object CommerceProductItem {
|
||||
val CommerceProductEntryNamespace: EntryNamespace = EntryNamespace("commerce-product")
|
||||
}
|
||||
|
||||
case class CommerceProductItem(
|
||||
override val id: Long,
|
||||
override val sortIndex: Option[Long],
|
||||
override val clientEventInfo: Option[ClientEventInfo],
|
||||
override val feedbackActionInfo: Option[FeedbackActionInfo])
|
||||
extends TimelineItem {
|
||||
|
||||
val entryNamespace: EntryNamespace = CommerceProductEntryNamespace
|
||||
def withSortIndex(sortIndex: Long): TimelineEntry = copy(sortIndex = Some(sortIndex))
|
||||
}
|
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.conversation_annotation
|
||||
|
||||
import com.twitter.product_mixer.core.model.marshalling.response.urt.richtext.RichText
|
||||
|
||||
case class ConversationAnnotation(
|
||||
conversationAnnotationType: ConversationAnnotationType,
|
||||
header: Option[RichText],
|
||||
description: Option[RichText])
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.conversation_annotation
|
||||
|
||||
sealed trait ConversationAnnotationType
|
||||
|
||||
case object Political extends ConversationAnnotationType
|
||||
case object Large extends ConversationAnnotationType
|
Binary file not shown.
@ -1,7 +0,0 @@
|
||||
package com.twitter.product_mixer.core.model.marshalling.response.urt.item.event
|
||||
|
||||
sealed trait EventSummaryDisplayType
|
||||
|
||||
case object CellEventSummaryDisplayType extends EventSummaryDisplayType
|
||||
case object HeroEventSummaryDisplayType extends EventSummaryDisplayType
|
||||
case object CellWithProminentSocialContextEventSummaryDisplayType extends EventSummaryDisplayType
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user