@artsy/cohesion
Version:
Analytics schema
35 lines (34 loc) • 1.94 kB
TypeScript
import { ContextModule, EntityModuleHeight, EntityModuleType, OwnerType, ScreenOwnerType, TappedArticleGroup, TappedArtistGroup, TappedArtworkGroup, TappedAuctionGroup, TappedCollectionGroup, TappedExploreGroup, TappedFairGroup } from "../../Schema";
export declare type TappedEntityDestinationType = OwnerType.article | OwnerType.articles | OwnerType.artist | OwnerType.artwork | OwnerType.collection | OwnerType.explore | OwnerType.fair | OwnerType.sale | OwnerType.auctions | OwnerType.savesAndFollows | OwnerType.gene | OwnerType.worksForYou;
export interface TappedEntityGroupArgs {
contextModule: ContextModule;
contextScreenOwnerType: ScreenOwnerType;
contextScreenOwnerId?: string;
contextScreenOwnerSlug?: string;
destinationScreenOwnerType: TappedEntityDestinationType;
destinationScreenOwnerId?: string;
destinationScreenOwnerSlug?: string;
horizontalSlidePosition?: number;
moduleHeight?: EntityModuleHeight;
type: EntityModuleType;
}
/**
* A user taps a grouping of entities on iOS
*
* The `action` type is inferred from `destinationScreenOwnerType`
*
* @example
* ```
* tappedEntityGroup({
* contextModule: ContextModule.trendingArtistsRail,
* contextScreenOwnerType: OwnerType.home,
* destinationScreenOwnerType: OwnerType.artist,
* destinationScreenOwnerId: "5359794d1a1e86c3740001f7",
* destinationScreenOwnerSlug: "andy-warhol",
* horizontalSlidePosition: 2,
* moduleHeight: "double",
* type: "thumbnail"
* })
* ```
*/
export declare const tappedEntityGroup: ({ contextModule, contextScreenOwnerType, contextScreenOwnerId, contextScreenOwnerSlug, destinationScreenOwnerType, destinationScreenOwnerId, destinationScreenOwnerSlug, horizontalSlidePosition, moduleHeight, type, }: TappedEntityGroupArgs) => TappedArticleGroup | TappedArtistGroup | TappedArtworkGroup | TappedAuctionGroup | TappedCollectionGroup | TappedExploreGroup | TappedFairGroup;