UNPKG

@artsy/cohesion

Version:
33 lines (32 loc) 1.65 kB
import { ClickedArtistGroup, ClickedArtworkGroup, ClickedAuctionGroup, ClickedCollectionGroup, ClickedFairGroup, ContextModule, EntityModuleType, OwnerType, PageOwnerType } from "../../Schema"; export declare type ClickedEntityDestinationType = OwnerType.artist | OwnerType.artwork | OwnerType.collection | OwnerType.fair | OwnerType.sale | OwnerType.auctions | OwnerType.gene | OwnerType.worksForYou; export interface ClickedEntityGroupArgs { contextModule: ContextModule; contextPageOwnerType: PageOwnerType; contextPageOwnerId?: string; contextPageOwnerSlug?: string; destinationPageOwnerType: ClickedEntityDestinationType; destinationPageOwnerId?: string; destinationPageOwnerSlug?: string; horizontalSlidePosition?: number; type: EntityModuleType; } /** * A user clicks a grouping of entities on web * * The `action` type is inferred from `destinationPageOwnerType` * * @example * ``` * clickedEntityGroup({ * contextModule: ContextModule.trendingArtistsRail, * contextPageOwnerType: OwnerType.home, * destinationPageOwnerType: OwnerType.artist, * destinationPageOwnerId: "5359794d1a1e86c3740001f7", * destinationPageOwnerSlug: "andy-warhol", * horizontalSlidePosition: 2, * type: "thumbnail" * }) * ``` */ export declare const clickedEntityGroup: ({ contextModule, contextPageOwnerType, contextPageOwnerId, contextPageOwnerSlug, destinationPageOwnerType, destinationPageOwnerId, destinationPageOwnerSlug, horizontalSlidePosition, type, }: ClickedEntityGroupArgs) => ClickedArtistGroup | ClickedArtworkGroup | ClickedAuctionGroup | ClickedCollectionGroup | ClickedFairGroup;