diff --git a/data/schema.graphql b/data/schema.graphql index 40615d21be7..a4ddeb0c68e 100644 --- a/data/schema.graphql +++ b/data/schema.graphql @@ -675,7 +675,7 @@ enum AnalyticsGroupedStatsObjectTypeEnum { # A grouped stat item: country or device etc. union AnalyticsGroupedStatsUnion = - | AnalyticsVisitorsByCountry + AnalyticsVisitorsByCountry | AnalyticsVisitorsByDevice | AnalyticsVisitorsByLandingPage | AnalyticsVisitorsByReferral @@ -1115,7 +1115,7 @@ enum AnalyticsRankedStatsObjectTypeEnum { # An artwork, artist, show, or viewing room union AnalyticsRankedStatsUnion = - | AnalyticsArtist + AnalyticsArtist | AnalyticsArtwork | AnalyticsShow | AnalyticsViewingRoom @@ -1380,7 +1380,7 @@ type ArticleSectionImageCollection { } union ArticleSectionImageCollectionFigure = - | ArticleImageSection + ArticleImageSection | ArticleUnpublishedArtwork | Artwork @@ -1438,7 +1438,7 @@ enum ArticleSectionVideoLayout { } union ArticleSections = - | ArticleSectionCallout + ArticleSectionCallout | ArticleSectionEmbed | ArticleSectionImageCollection | ArticleSectionImageSet @@ -2960,7 +2960,7 @@ type ArtworkMutationFailure { } union ArtworkMutationType = - | ArtworkMutationDeleteSuccess + ArtworkMutationDeleteSuccess | ArtworkMutationFailure union ArtworkOrEditionSetType = Artwork | EditionSet @@ -3139,7 +3139,7 @@ type ArtworksCollectionsBatchUpdatePayload { } union ArtworksCollectionsBatchUpdateResponseOrError = - | ArtworksCollectionsBatchUpdateFailure + ArtworksCollectionsBatchUpdateFailure | ArtworksCollectionsBatchUpdateSuccess type ArtworksCollectionsBatchUpdateSuccess { @@ -3848,7 +3848,7 @@ type BankAccountMutationSuccess { } union BankAccountMutationType = - | BankAccountMutationFailure + BankAccountMutationFailure | BankAccountMutationSuccess enum BankAccountTypes { @@ -4015,7 +4015,7 @@ type BulkUpdatePartnerArtworksMutationSuccess { } union BulkUpdatePartnerArtworksMutationType = - | BulkUpdatePartnerArtworksMutationFailure + BulkUpdatePartnerArtworksMutationFailure | BulkUpdatePartnerArtworksMutationSuccess type BulkUpdatePartnerArtworksResponse { @@ -4504,7 +4504,7 @@ type CollectorSignals { # Represents either an action or a potential failure union CommerceActionOrFailureUnion = - | CommerceOrderRequiresAction + CommerceOrderRequiresAction | CommerceOrderWithMutationFailure # Autogenerated input type of AddInitialOfferToOrder @@ -5725,7 +5725,7 @@ type CommerceOptInReportMutationPayload { } union CommerceOptInReportMutationType = - | CommerceOptInReportFailure + CommerceOptInReportFailure | CommerceOptInReportSuccess type CommerceOptInReportResponse { @@ -6023,7 +6023,7 @@ type CommerceOrderEdge { # Represents either a state change or new offer union CommerceOrderEventUnion = - | CommerceOfferSubmittedEvent + CommerceOfferSubmittedEvent | CommerceOrderStateChangedEvent enum CommerceOrderFulfillmentTypeEnum { @@ -6047,7 +6047,7 @@ enum CommerceOrderModeEnum { # Represents either a resolved Order or a potential failure union CommerceOrderOrFailureUnion = - | CommerceOrderRequiresAction + CommerceOrderRequiresAction | CommerceOrderWithMutationFailure | CommerceOrderWithMutationSuccess @@ -6196,7 +6196,7 @@ type CommercePickup { # Represents either a shipping information or pickup union CommerceRequestedFulfillmentUnion = - | CommercePickup + CommercePickup | CommerceShip | CommerceShipArta @@ -7998,7 +7998,7 @@ type CreateAccountRequestMutationSuccess { } union CreateAccountRequestMutationType = - | CreateAccountRequestMutationFailure + CreateAccountRequestMutationFailure | CreateAccountRequestMutationSuccess type CreateAlertFailure { @@ -8121,7 +8121,7 @@ type CreateCanonicalArtistSuccess { } union CreateCanonicalArtistSuccessOrErrorType = - | CreateCanonicalArtistFailure + CreateCanonicalArtistFailure | CreateCanonicalArtistSuccess type CreateCareerHighlightFailure { @@ -8148,7 +8148,7 @@ type CreateCareerHighlightSuccess { } union CreateCareerHighlightSuccessResponseOrError = - | CreateCareerHighlightFailure + CreateCareerHighlightFailure | CreateCareerHighlightSuccess type CreateCollectionFailure { @@ -8156,7 +8156,7 @@ type CreateCollectionFailure { } union CreateCollectionResponseOrError = - | CreateCollectionFailure + CreateCollectionFailure | CreateCollectionSuccess type CreateCollectionSuccess { @@ -8179,7 +8179,7 @@ type CreateConsignmentInquiryMutationPayload { } union CreateConsignmentInquiryMutationType = - | ConsignmentInquiryMutationFailure + ConsignmentInquiryMutationFailure | ConsignmentInquiryMutationSuccess type CreateFeatureFailure { @@ -8227,7 +8227,7 @@ type CreateFeaturedLinkMutationPayload { } union CreateFeaturedLinkResponseOrError = - | CreateFeaturedLinkFailure + CreateFeaturedLinkFailure | CreateFeaturedLinkSuccess type CreateFeaturedLinkSuccess { @@ -8301,7 +8301,7 @@ type CreateIdentityVerificationOverrideMutationPayload { } union CreateIdentityVerificationOverrideResponseOrError = - | IdentityVerificationOverrideMutationFailure + IdentityVerificationOverrideMutationFailure | IdentityVerificationOverrideMutationSuccess # Autogenerated input type of CreateImage @@ -8342,7 +8342,7 @@ type CreateInvoicePaymentPayload { } union CreateInvoicePaymentResponseOrError = - | CreateInvoicePaymentFailure + CreateInvoicePaymentFailure | CreateInvoicePaymentSuccess type CreateInvoicePaymentSuccess { @@ -8463,7 +8463,7 @@ type CreateSaleAgreementMutationPayload { } union CreateSaleAgreementResponseOrError = - | CreateSaleAgreementFailure + CreateSaleAgreementFailure | CreateSaleAgreementSuccess type CreateSaleAgreementSuccess { @@ -8632,7 +8632,7 @@ type CreateUserSaleProfileMutationPayload { } union CreateUserSaleProfileResponseOrError = - | CreateUserSaleProfileFailure + CreateUserSaleProfileFailure | CreateUserSaleProfileSuccess type CreateUserSaleProfileSuccess { @@ -8657,7 +8657,7 @@ type CreateVerifiedRepresentativePayload { } union CreateVerifiedRepresentativeResponseOrError = - | CreateVerifiedRepresentativeFailure + CreateVerifiedRepresentativeFailure | CreateVerifiedRepresentativeSuccess type CreateVerifiedRepresentativeSuccess { @@ -8790,7 +8790,7 @@ type CreditCardMutationSuccess { } union CreditCardMutationType = - | CreditCardMutationFailure + CreditCardMutationFailure | CreditCardMutationSuccess type CreditCardPayload { @@ -8950,7 +8950,7 @@ type DeleteCareerHighlightSuccess { } union DeleteCareerHighlightSuccessOrErrorType = - | DeleteCareerHighlightFailure + DeleteCareerHighlightFailure | DeleteCareerHighlightSuccess type DeleteCollectionFailure { @@ -8958,7 +8958,7 @@ type DeleteCollectionFailure { } union DeleteCollectionResponseOrError = - | DeleteCollectionFailure + DeleteCollectionFailure | DeleteCollectionSuccess type DeleteCollectionSuccess { @@ -8984,7 +8984,7 @@ type DeleteConversationMutationPayload { } union DeleteConversationResponseOrError = - | DeleteConversationFailure + DeleteConversationFailure | DeleteConversationSuccess type DeleteConversationSuccess { @@ -9037,7 +9037,7 @@ type DeleteFeaturedLinkMutationPayload { } union DeleteFeaturedLinkResponseOrError = - | DeleteFeaturedLinkFailure + DeleteFeaturedLinkFailure | DeleteFeaturedLinkSuccess type DeleteFeaturedLinkSuccess { @@ -9176,7 +9176,7 @@ type DeleteVerifiedRepresentativeMutationPayload { } union DeleteVerifiedRepresentativeResponseOrError = - | DeleteVerifiedRepresentativeFailure + DeleteVerifiedRepresentativeFailure | DeleteVerifiedRepresentativeSuccess type DeleteVerifiedRepresentativeSuccess { @@ -10360,6 +10360,17 @@ type FollowGenePayload { gene: Gene } +input FollowMarketingCollectionInput { + clientMutationId: String + marketingCollectionID: String + unfollow: Boolean = false +} + +type FollowMarketingCollectionPayload { + clientMutationId: String + marketingCollection: MarketingCollection +} + input FollowProfileInput { clientMutationId: String profileID: String @@ -11027,7 +11038,7 @@ type HomePageArtworkModule implements Node { } union HomePageArtworkModuleContext = - | Fair + Fair | FollowArtists | Gene | HomePageFollowedArtistArtworkModule @@ -11719,7 +11730,7 @@ type IdentityVerificationEmailMutationSuccessType { } union IdentityVerificationEmailMutationType = - | IdentityVerificationEmailMutationFailureType + IdentityVerificationEmailMutationFailureType | IdentityVerificationEmailMutationSuccessType type IdentityVerificationOverride { @@ -12372,7 +12383,7 @@ type MarkAllNotificationsAsReadPayload { } union MarkAllNotificationsAsReadResponseOrError = - | MarkAllNotificationsAsReadFailure + MarkAllNotificationsAsReadFailure | MarkAllNotificationsAsReadSuccess type MarkAllNotificationsAsReadSuccess { @@ -12395,7 +12406,7 @@ type MarkNotificationAsReadPayload { } union MarkNotificationAsReadResponseOrError = - | MarkNotificationAsReadFailure + MarkNotificationAsReadFailure | MarkNotificationAsReadSuccess type MarkNotificationAsReadSuccess { @@ -12420,7 +12431,7 @@ type MarkNotificationsAsSeenPayload { } union MarkNotificationsAsSeenResponseOrError = - | MarkNotificationsAsSeenFailure + MarkNotificationsAsSeenFailure | MarkNotificationsAsSeenSuccess type MarkNotificationsAsSeenSuccess { @@ -12589,6 +12600,7 @@ type MarketingCollection implements Node { internalID: ID! isDepartment: Boolean! isFeaturedArtistContent: Boolean! + isFollowed: Boolean keyword: String # Linked Collections @@ -12655,6 +12667,16 @@ enum MarketingCollectionGroupTypeEnum { OtherCollections } +type MarketingCollectionHitNotificationItem { + artworksConnection( + after: String + before: String + first: Int + last: Int + ): ArtworkConnection + marketingCollection: MarketingCollection +} + type MarketingCollectionQuery { artistIDs: [String] geneIDs: [String] @@ -12673,7 +12695,7 @@ enum MarketingCollectionsSorts { } union Match = - | Article + Article | Artist | Artwork | Fair @@ -14005,6 +14027,11 @@ type Mutation { # Follow (or unfollow) an gene followGene(input: FollowGeneInput!): FollowGenePayload + # Follow (or unfollow) a marketing collection + followMarketingCollection( + input: FollowMarketingCollectionInput! + ): FollowMarketingCollectionPayload + # Follow (or unfollow) a profile followProfile(input: FollowProfileInput!): FollowProfilePayload @@ -14298,7 +14325,7 @@ type MyCollectionArtworkMutationSuccess { } union MyCollectionArtworkMutationType = - | MyCollectionArtworkMutationDeleteSuccess + MyCollectionArtworkMutationDeleteSuccess | MyCollectionArtworkMutationFailure | MyCollectionArtworkMutationSuccess @@ -14608,10 +14635,11 @@ type NotificationEdge { } union NotificationItem = - | AlertNotificationItem + AlertNotificationItem | ArticleFeaturedArtistNotificationItem | ArtworkPublishedNotificationItem | CollectorProfileUpdatePromptNotificationItem + | MarketingCollectionHitNotificationItem | PartnerOfferCreatedNotificationItem | ShowOpenedNotificationItem | ViewingRoomPublishedNotificationItem @@ -14636,6 +14664,7 @@ enum NotificationTypesEnum { ARTWORK_ALERT ARTWORK_PUBLISHED COLLECTOR_PROFILE_UPDATE_PROMPT + MARKETING_COLLECTION_HIT PARTNER_OFFER_CREATED PARTNER_SHOW_OPENED VIEWING_ROOM_PUBLISHED @@ -14732,7 +14761,7 @@ type OrderedSetEdge { } union OrderedSetItem = - | Artist + Artist | Artwork | FeaturedLink | Gene @@ -16857,7 +16886,7 @@ type Query { first: Int # Which index to use to display initial batch of artworks - initialArtworksIndexName: String = "infinite_discovery_initial_artworks" + initialArtworksIndexName: String last: Int # These artworks are used to calculate the taste profile vector. Such artworks are excluded from the response @@ -17836,7 +17865,7 @@ input RequestPriceEstimateInput { } union RequestPriceEstimateMutationType = - | RequestPriceEstimatedMutationFailure + RequestPriceEstimatedMutationFailure | RequestPriceEstimatedMutationSuccess type RequestPriceEstimatePayload { @@ -18693,7 +18722,7 @@ type SendConfirmationEmailMutationSuccess { } union SendConfirmationEmailMutationType = - | SendConfirmationEmailMutationFailure + SendConfirmationEmailMutationFailure | SendConfirmationEmailMutationSuccess input SendConversationMessageMutationInput { @@ -18762,7 +18791,7 @@ type SendFeedbackMutationSuccess { } union SendFeedbackMutationType = - | SendFeedbackMutationFailure + SendFeedbackMutationFailure | SendFeedbackMutationSuccess input SendIdentityVerificationEmailMutationInput { @@ -19220,7 +19249,7 @@ type StartIdentityVerificationFailure { } union StartIdentityVerificationResponseOrError = - | StartIdentityVerificationFailure + StartIdentityVerificationFailure | StartIdentityVerificationSuccess type StartIdentityVerificationSuccess { @@ -19567,7 +19596,7 @@ type TransferMyCollectionSuccess { # A transfer My Collection success or errors object union TransferMyCollectionSuccessOrErrorsUnion = - | Errors + Errors | TransferMyCollectionSuccess type TrendingArtists { @@ -19596,7 +19625,7 @@ type TriggerCampaignMutationSuccess { } union TriggerCampaignMutationSuccessOrError = - | TriggerCampaignMutationFailure + TriggerCampaignMutationFailure | TriggerCampaignMutationSuccess type TriggerCampaignPayload { @@ -19723,7 +19752,7 @@ type UpdateCMSLastAccessTimestampMutationPayload { } union UpdateCMSLastAccessTimestampResponseOrError = - | UpdateCMSLastAccessTimestampFailure + UpdateCMSLastAccessTimestampFailure | UpdateCMSLastAccessTimestampSuccess type UpdateCMSLastAccessTimestampSuccess { @@ -19753,7 +19782,7 @@ type UpdateCareerHighlightSuccess { } union UpdateCareerHighlightsSuccessResponseOrError = - | UpdateCareerHighlightFailure + UpdateCareerHighlightFailure | UpdateCareerHighlightSuccess type UpdateCollectionFailure { @@ -19761,7 +19790,7 @@ type UpdateCollectionFailure { } union UpdateCollectionResponseOrError = - | UpdateCollectionFailure + UpdateCollectionFailure | UpdateCollectionSuccess type UpdateCollectionSuccess { @@ -19844,7 +19873,7 @@ type UpdateCollectorProfileWithIDPayload { } union UpdateCollectorProfileWithIDResponseOrError = - | UpdateCollectorProfileWithIDFailure + UpdateCollectorProfileWithIDFailure | UpdateCollectorProfileWithIDSuccess type UpdateCollectorProfileWithIDSuccess { @@ -19931,7 +19960,7 @@ type UpdateFeaturedLinkMutationPayload { } union UpdateFeaturedLinkResponseOrError = - | UpdateFeaturedLinkFailure + UpdateFeaturedLinkFailure | UpdateFeaturedLinkSuccess type UpdateFeaturedLinkSuccess { @@ -19974,7 +20003,7 @@ type UpdateMeCollectionsFailure { } union UpdateMeCollectionsResponseOrError = - | UpdateMeCollectionsFailure + UpdateMeCollectionsFailure | UpdateMeCollectionsSuccess type UpdateMeCollectionsSuccess { @@ -20131,7 +20160,7 @@ input UpdateMyProfileInput { } union UpdateMyProfileMutation = - | UpdateMyProfileMutationFailure + UpdateMyProfileMutationFailure | UpdateMyProfileMutationSuccess type UpdateMyProfileMutationFailure { @@ -20180,7 +20209,7 @@ type UpdateOrderedSetMutationPayload { } union UpdateOrderedSetResponseOrError = - | UpdateOrderedSetFailure + UpdateOrderedSetFailure | UpdateOrderedSetSuccess type UpdateOrderedSetSuccess { @@ -20238,7 +20267,7 @@ type UpdatePartnerShowMutationPayload { } union UpdatePartnerShowResponseOrError = - | UpdatePartnerShowFailure + UpdatePartnerShowFailure | UpdatePartnerShowSuccess type UpdatePartnerShowSuccess { @@ -20268,7 +20297,7 @@ type UpdateSaleAgreementMutationPayload { } union UpdateSaleAgreementResponseOrError = - | UpdateSaleAgreementFailure + UpdateSaleAgreementFailure | UpdateSaleAgreementSuccess type UpdateSaleAgreementSuccess { @@ -20397,7 +20426,7 @@ type UpdateUserInterestMutationPayload { union UpdateUserInterestOrError = UpdateUserInterestsFailure | UserInterest union UpdateUserInterestResponseOrError = - | UpdateUserInterestFailure + UpdateUserInterestFailure | UpdateUserInterestSuccess type UpdateUserInterestSuccess { @@ -20852,7 +20881,7 @@ type UserIconDeleteSuccessType { } union UserIconDeletionMutationType = - | UserIconDeleteFailureType + UserIconDeleteFailureType | UserIconDeleteSuccessType # A connection to a list of items. @@ -21515,7 +21544,7 @@ type Viewer { first: Int # Which index to use to display initial batch of artworks - initialArtworksIndexName: String = "infinite_discovery_initial_artworks" + initialArtworksIndexName: String last: Int # These artworks are used to calculate the taste profile vector. Such artworks are excluded from the response @@ -22434,7 +22463,7 @@ type addOrderedSetItemMutationPayload { } union addOrderedSetItemResponseOrError = - | addOrderedSetItemFailure + addOrderedSetItemFailure | addOrderedSetItemSuccess type addOrderedSetItemSuccess { @@ -22518,7 +22547,7 @@ type createHeroUnitFailure { } union createHeroUnitResponseOrError = - | createHeroUnitFailure + createHeroUnitFailure | createHeroUnitSuccess type createHeroUnitSuccess { @@ -22530,7 +22559,7 @@ type createOrderedSetFailure { } union createOrderedSetResponseOrError = - | createOrderedSetFailure + createOrderedSetFailure | createOrderedSetSuccess type createOrderedSetSuccess { @@ -22556,7 +22585,7 @@ type createPartnerOfferMutationPayload { } union createPartnerOfferResponseOrError = - | createPartnerOfferFailure + createPartnerOfferFailure | createPartnerOfferSuccess type createPartnerOfferSuccess { @@ -22581,7 +22610,7 @@ type createUserAdminNoteMutationPayload { } union createUserAdminNoteResponseOrError = - | createUserAdminNoteFailure + createUserAdminNoteFailure | createUserAdminNoteSuccess type createUserAdminNoteSuccess { @@ -22593,7 +22622,7 @@ type createUserInterestForUserFailure { } union createUserInterestForUserResponseOrError = - | createUserInterestForUserFailure + createUserInterestForUserFailure | createUserInterestForUserSuccess type createUserInterestForUserSuccess { @@ -22640,7 +22669,7 @@ type deleteHeroUnitMutationPayload { } union deleteHeroUnitResponseOrError = - | deleteHeroUnitFailure + deleteHeroUnitFailure | deleteHeroUnitSuccess type deleteHeroUnitSuccess { @@ -22669,7 +22698,7 @@ type deleteOrderedSetItemMutationPayload { } union deleteOrderedSetItemResponseOrError = - | deleteOrderedSetItemFailure + deleteOrderedSetItemFailure | deleteOrderedSetItemSuccess type deleteOrderedSetItemSuccess { @@ -22690,7 +22719,7 @@ type deleteOrderedSetMutationPayload { } union deleteOrderedSetResponseOrError = - | deleteOrderedSetFailure + deleteOrderedSetFailure | deleteOrderedSetSuccess type deleteOrderedSetSuccess { @@ -22714,7 +22743,7 @@ type deleteUserAdminNoteMutationPayload { } union deleteUserAdminNoteResponseOrError = - | deleteUserAdminNoteFailure + deleteUserAdminNoteFailure | deleteUserAdminNoteSuccess type deleteUserAdminNoteSuccess { @@ -22726,7 +22755,7 @@ type deleteUserInterestForUserFailure { } union deleteUserInterestForUserResponseOrError = - | deleteUserInterestForUserFailure + deleteUserInterestForUserFailure | deleteUserInterestForUserSuccess type deleteUserInterestForUserSuccess { @@ -22752,7 +22781,7 @@ type deleteUserRoleMutationPayload { } union deleteUserRoleResponseOrError = - | deleteUserRoleFailure + deleteUserRoleFailure | deleteUserRoleSuccess type deleteUserRoleSuccess { @@ -22849,7 +22878,7 @@ type updateCollectionPayload { } union updateCollectorProfileResponseOrError = - | UpdateCollectorProfileFailure + UpdateCollectorProfileFailure | UpdateCollectorProfileSuccess type updateHeroUnitFailure { @@ -22857,7 +22886,7 @@ type updateHeroUnitFailure { } union updateHeroUnitResponseOrError = - | updateHeroUnitFailure + updateHeroUnitFailure | updateHeroUnitSuccess type updateHeroUnitSuccess { diff --git a/src/Apps/Collect/Routes/Collection/Components/Header/index.tsx b/src/Apps/Collect/Routes/Collection/Components/Header/index.tsx index f1fe1345996..0f0770be363 100644 --- a/src/Apps/Collect/Routes/Collection/Components/Header/index.tsx +++ b/src/Apps/Collect/Routes/Collection/Components/Header/index.tsx @@ -7,6 +7,7 @@ import { Spacer, Text, } from "@artsy/palette" +import { FollowMarketingCollectionButtonQueryRenderer } from "Components/FollowButton/FollowMarketingCollectionButton" import type { Header_collection$data } from "__generated__/Header_collection.graphql" import { Link } from "found" import type * as React from "react" @@ -37,6 +38,11 @@ export const CollectionHeader: React.FC< {collection.category} + + {collection.description && ( diff --git a/src/Components/FollowButton/FollowMarketingCollectionButton.tsx b/src/Components/FollowButton/FollowMarketingCollectionButton.tsx new file mode 100644 index 00000000000..2cb2ae680c6 --- /dev/null +++ b/src/Components/FollowButton/FollowMarketingCollectionButton.tsx @@ -0,0 +1,163 @@ +import { type AuthContextModule, ContextModule, Intent } from "@artsy/cohesion" +import type { ButtonProps } from "@artsy/palette" +import { useAuthDialog } from "Components/AuthDialog" +import { useSystemContext } from "System/Hooks/useSystemContext" +import { SystemQueryRenderer } from "System/Relay/SystemQueryRenderer" +import { useMutation } from "Utils/Hooks/useMutation" +import type { FollowMarketingCollectionButtonQuery } from "__generated__/FollowMarketingCollectionButtonQuery.graphql" +import type { FollowMarketingCollectionButton_marketingCollection$data } from "__generated__/FollowMarketingCollectionButton_marketingCollection.graphql" +import type * as React from "react" +import { createFragmentContainer, graphql } from "react-relay" +import { FollowButton } from "./Button" + +interface FollowMarketingCollectionButtonProps + extends Omit { + children?: React.ReactNode + // FIXME: REACT_18_UPGRADE + // children?: FollowButtonRenderProps + marketingCollection: FollowMarketingCollectionButton_marketingCollection$data + contextModule?: AuthContextModule + onFollow?: (followed: boolean) => void +} + +const FollowMarketingCollectionButton: React.FC< + React.PropsWithChildren +> = ({ + marketingCollection, + contextModule = ContextModule.geneHeader, // TODO: Change to collection header + onFollow, + ...rest +}) => { + const { isLoggedIn } = useSystemContext() + + const { submitMutation } = useMutation({ + mutation: graphql` + mutation FollowMarketingCollectionButtonMutation( + $input: FollowMarketingCollectionInput! + ) { + followMarketingCollection(input: $input) { + marketingCollection { + id + isFollowed + } + } + } + `, + optimisticResponse: { + followMarketingCollection: { + marketingCollection: { + id: marketingCollection.id, + isFollowed: !marketingCollection.isFollowed, + }, + }, + }, + }) + + const { showAuthDialog } = useAuthDialog() + + const handleClick = ( + event: React.MouseEvent, + ) => { + event.preventDefault() + + if (!isLoggedIn) { + showAuthDialog({ + options: { + title: `Sign up or log in to follow ${marketingCollection.title}`, + afterAuthAction: { + action: "follow", + kind: "marketingCollection", + objectId: marketingCollection.slug, + }, + }, + analytics: { + intent: Intent.followGene, // TODO: add marketing collection intent + contextModule, + }, + }) + + return + } + + submitMutation({ + variables: { + input: { + marketingCollectionID: marketingCollection.internalID, + unfollow: marketingCollection.isFollowed, + }, + }, + }) + + onFollow?.(!marketingCollection.isFollowed) + } + + return ( + + ) +} + +export const FollowMarketingCollectionButtonFragmentContainer = + createFragmentContainer(FollowMarketingCollectionButton, { + marketingCollection: graphql` + fragment FollowMarketingCollectionButton_marketingCollection on MarketingCollection + @argumentDefinitions( + isLoggedIn: { type: "Boolean", defaultValue: false } + ) { + id + slug + title + internalID + isFollowed @include(if: $isLoggedIn) + } + `, + }) + +interface FollowMarketingCollectionButtonQueryRendererProps + extends Omit { + id: string +} + +export const FollowMarketingCollectionButtonQueryRenderer: React.FC< + React.PropsWithChildren +> = ({ id, ...rest }) => { + const { isLoggedIn } = useSystemContext() + return ( + + lazyLoad + query={graphql` + query FollowMarketingCollectionButtonQuery( + $id: String! + $isLoggedIn: Boolean! + ) { + marketingCollection(slug: $id) { + ...FollowMarketingCollectionButton_marketingCollection + @arguments(isLoggedIn: $isLoggedIn) + } + } + `} + placeholder={} + variables={{ id, isLoggedIn }} + render={({ error, props }) => { + if (error || !props?.marketingCollection) { + return + } + + return ( + + ) + }} + /> + ) +} diff --git a/src/Components/Notifications/MarketingCollectionHitNotification.tsx b/src/Components/Notifications/MarketingCollectionHitNotification.tsx new file mode 100644 index 00000000000..15bb69eacdd --- /dev/null +++ b/src/Components/Notifications/MarketingCollectionHitNotification.tsx @@ -0,0 +1,75 @@ +import { Flex, Spacer, Text } from "@artsy/palette" +import { NotificationArtworkList } from "Components/Notifications/NotificationArtworkList" +import { NotificationErrorMessage } from "Components/Notifications/NotificationErrorMessage" +import { NotificationTypeLabel } from "Components/Notifications/NotificationTypeLabel" +import { RouterLink } from "System/Components/RouterLink" +import type { MarketingCollectionHitNotification_notification$key } from "__generated__/MarketingCollectionHitNotification_notification.graphql" +import type { FC } from "react" +import { graphql, useFragment } from "react-relay" + +interface MarketingCollectionHitNotificationProps { + notification: MarketingCollectionHitNotification_notification$key +} + +export const MarketingCollectionHitNotification: FC< + React.PropsWithChildren +> = ({ notification }) => { + const notificationData = useFragment( + MarketingCollectionHitNotificationFragment, + notification, + ) + + const { artworksConnection, headline, item } = notificationData + + const marketingCollection = item?.marketingCollection + + if (!marketingCollection) { + return + } + + return ( + <> + + + {headline} + + + + + + + + + + + + + + + + View all works in "{marketingCollection.title}" + + + + ) +} + +export const MarketingCollectionHitNotificationFragment = graphql` + fragment MarketingCollectionHitNotification_notification on Notification { + artworksConnection(first: 10) { + ...NotificationArtworkList_artworksConnection + totalCount + } + headline + item { + ... on MarketingCollectionHitNotificationItem { + marketingCollection { + title + slug + } + } + } + notificationType + ...NotificationTypeLabel_notification + } +` diff --git a/src/Components/Notifications/Notification.tsx b/src/Components/Notifications/Notification.tsx index eab80a1d816..d713819d4b7 100644 --- a/src/Components/Notifications/Notification.tsx +++ b/src/Components/Notifications/Notification.tsx @@ -27,6 +27,7 @@ import type { } from "__generated__/NotificationQuery.graphql" import { Suspense, useEffect } from "react" import { graphql, useLazyLoadQuery } from "react-relay" +import { MarketingCollectionHitNotification } from "./MarketingCollectionHitNotification" const logger = createLogger("NotificationItem") @@ -40,6 +41,7 @@ export const SUPPORTED_NOTIFICATION_TYPES: NotificationTypesEnum[] = [ "VIEWING_ROOM_PUBLISHED", "PARTNER_SHOW_OPENED", "COLLECTOR_PROFILE_UPDATE_PROMPT", + "MARKETING_COLLECTION_HIT", ] interface NotificationProps { @@ -122,6 +124,9 @@ const Notification: React.FC> = ({ case "VIEWING_ROOM_PUBLISHED": return + case "MARKETING_COLLECTION_HIT": + return + default: return null } @@ -161,6 +166,7 @@ const notificationQuery = graphql` ...PartnerOfferCreatedNotification_notification ...PartnerShowOpenedNotification_notification ...ViewingRoomPublishedNotification_notification + ...MarketingCollectionHitNotification_notification id internalID notificationType diff --git a/src/Utils/Hooks/useAuthIntent/index.tsx b/src/Utils/Hooks/useAuthIntent/index.tsx index f1ab27fbb8c..8585716fd0d 100644 --- a/src/Utils/Hooks/useAuthIntent/index.tsx +++ b/src/Utils/Hooks/useAuthIntent/index.tsx @@ -10,6 +10,7 @@ import { createOfferOrderMutation } from "./mutations/AuthIntentCreateOfferOrder import { createOrderMutation } from "./mutations/AuthIntentCreateOrderMutation" import { followArtistMutation } from "./mutations/AuthIntentFollowArtistMutation" import { followGeneMutation } from "./mutations/AuthIntentFollowGeneMutation" +import { followMarketingCollectionMutation } from "./mutations/AuthIntentFollowMarketingCollectionMutation" import { followProfileMutation } from "./mutations/AuthIntentFollowProfileMutation" import { saveArtworkMutation } from "./mutations/AuthIntentSaveArtworkMutation" @@ -22,6 +23,7 @@ export type AfterAuthAction = | { action: "createAlert"; kind: "artworks"; objectId: string } | { action: "follow"; kind: "artist"; objectId: string } | { action: "follow"; kind: "gene"; objectId: string } + | { action: "follow"; kind: "marketingCollection"; objectId: string } | { action: "follow"; kind: "profile"; objectId: string } | { action: "save"; kind: "artworks"; objectId: string } | { action: "saveArtworkToLists"; kind: "artworks"; objectId: string } @@ -89,6 +91,11 @@ export const runAuthIntent = async ({ return followGeneMutation(relayEnvironment, value.objectId) case "profile": return followProfileMutation(relayEnvironment, value.objectId) + case "marketingCollection": + return followMarketingCollectionMutation( + relayEnvironment, + value.objectId, + ) } break diff --git a/src/Utils/Hooks/useAuthIntent/mutations/AuthIntentFollowMarketingCollectionMutation.ts b/src/Utils/Hooks/useAuthIntent/mutations/AuthIntentFollowMarketingCollectionMutation.ts new file mode 100644 index 00000000000..8be424d8d42 --- /dev/null +++ b/src/Utils/Hooks/useAuthIntent/mutations/AuthIntentFollowMarketingCollectionMutation.ts @@ -0,0 +1,49 @@ +import type { AuthIntentFollowMarketingCollectionMutation } from "__generated__/AuthIntentFollowMarketingCollectionMutation.graphql" +import { commitMutation, graphql } from "react-relay" +import type { Environment } from "react-relay" +import type { AuthIntentMutation } from "./types" +export const followMarketingCollectionMutation: AuthIntentMutation = ( + relayEnvironment: Environment, + id: string, +) => { + return new Promise((resolve, reject) => { + commitMutation( + relayEnvironment, + { + onCompleted: (res, errors) => { + if (errors !== null) { + reject(errors) + return + } + + resolve(res) + }, + mutation: graphql` + mutation AuthIntentFollowMarketingCollectionMutation( + $input: FollowMarketingCollectionInput! + ) @raw_response_type { + followMarketingCollection(input: $input) { + marketingCollection { + id + isFollowed + } + } + } + `, + optimisticResponse: { + followMarketingCollection: { + marketingCollection: { + id, + isFollowed: true, + }, + }, + }, + variables: { + input: { + marketingCollectionID: id, + }, + }, + }, + ) + }) +} diff --git a/src/__generated__/AlertNotification_notification.graphql.ts b/src/__generated__/AlertNotification_notification.graphql.ts index 201cbd4e7dd..be5d2626ef5 100644 --- a/src/__generated__/AlertNotification_notification.graphql.ts +++ b/src/__generated__/AlertNotification_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<9af59b4b5d37fa4ccebf8f8f5d4431b1>> + * @generated SignedSource<<4866e2913ef768366cbe994b089a83e5>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type AlertNotification_notification$data = { readonly artworksConnection: { diff --git a/src/__generated__/ArticleFeaturedArtistNotification_notification.graphql.ts b/src/__generated__/ArticleFeaturedArtistNotification_notification.graphql.ts index b2a4ef4fb8d..5e151ed004c 100644 --- a/src/__generated__/ArticleFeaturedArtistNotification_notification.graphql.ts +++ b/src/__generated__/ArticleFeaturedArtistNotification_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<8fe42553a477e7f2cee414003d03c32b>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type ArticleFeaturedArtistNotification_notification$data = { readonly headline: string; diff --git a/src/__generated__/ArtworkPublishedNotification_notification.graphql.ts b/src/__generated__/ArtworkPublishedNotification_notification.graphql.ts index 63af4890eda..a62232826a5 100644 --- a/src/__generated__/ArtworkPublishedNotification_notification.graphql.ts +++ b/src/__generated__/ArtworkPublishedNotification_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type ArtworkPublishedNotification_notification$data = { readonly artworksConnection: { diff --git a/src/__generated__/AuthIntentFollowMarketingCollectionMutation.graphql.ts b/src/__generated__/AuthIntentFollowMarketingCollectionMutation.graphql.ts new file mode 100644 index 00000000000..ebf60609c82 --- /dev/null +++ b/src/__generated__/AuthIntentFollowMarketingCollectionMutation.graphql.ts @@ -0,0 +1,124 @@ +/** + * @generated SignedSource<> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ConcreteRequest } from 'relay-runtime'; +export type FollowMarketingCollectionInput = { + clientMutationId?: string | null | undefined; + marketingCollectionID?: string | null | undefined; + unfollow?: boolean | null | undefined; +}; +export type AuthIntentFollowMarketingCollectionMutation$variables = { + input: FollowMarketingCollectionInput; +}; +export type AuthIntentFollowMarketingCollectionMutation$data = { + readonly followMarketingCollection: { + readonly marketingCollection: { + readonly id: string; + readonly isFollowed: boolean | null | undefined; + } | null | undefined; + } | null | undefined; +}; +export type AuthIntentFollowMarketingCollectionMutation$rawResponse = { + readonly followMarketingCollection: { + readonly marketingCollection: { + readonly id: string; + readonly isFollowed: boolean | null | undefined; + } | null | undefined; + } | null | undefined; +}; +export type AuthIntentFollowMarketingCollectionMutation = { + rawResponse: AuthIntentFollowMarketingCollectionMutation$rawResponse; + response: AuthIntentFollowMarketingCollectionMutation$data; + variables: AuthIntentFollowMarketingCollectionMutation$variables; +}; + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "input" + } +], +v1 = [ + { + "alias": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } + ], + "concreteType": "FollowMarketingCollectionPayload", + "kind": "LinkedField", + "name": "followMarketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isFollowed", + "storageKey": null + } + ], + "storageKey": null + } + ], + "storageKey": null + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "AuthIntentFollowMarketingCollectionMutation", + "selections": (v1/*: any*/), + "type": "Mutation", + "abstractKey": null + }, + "kind": "Request", + "operation": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Operation", + "name": "AuthIntentFollowMarketingCollectionMutation", + "selections": (v1/*: any*/) + }, + "params": { + "cacheID": "7c4c79c85af5012ded7cdd12f1a6a482", + "id": null, + "metadata": {}, + "name": "AuthIntentFollowMarketingCollectionMutation", + "operationKind": "mutation", + "text": "mutation AuthIntentFollowMarketingCollectionMutation(\n $input: FollowMarketingCollectionInput!\n) {\n followMarketingCollection(input: $input) {\n marketingCollection {\n id\n isFollowed\n }\n }\n}\n" + } +}; +})(); + +(node as any).hash = "04913bb37662f7cdd7f8f331f4958c94"; + +export default node; diff --git a/src/__generated__/FollowMarketingCollectionButtonMutation.graphql.ts b/src/__generated__/FollowMarketingCollectionButtonMutation.graphql.ts new file mode 100644 index 00000000000..7fd545c995c --- /dev/null +++ b/src/__generated__/FollowMarketingCollectionButtonMutation.graphql.ts @@ -0,0 +1,115 @@ +/** + * @generated SignedSource<> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ConcreteRequest } from 'relay-runtime'; +export type FollowMarketingCollectionInput = { + clientMutationId?: string | null | undefined; + marketingCollectionID?: string | null | undefined; + unfollow?: boolean | null | undefined; +}; +export type FollowMarketingCollectionButtonMutation$variables = { + input: FollowMarketingCollectionInput; +}; +export type FollowMarketingCollectionButtonMutation$data = { + readonly followMarketingCollection: { + readonly marketingCollection: { + readonly id: string; + readonly isFollowed: boolean | null | undefined; + } | null | undefined; + } | null | undefined; +}; +export type FollowMarketingCollectionButtonMutation = { + response: FollowMarketingCollectionButtonMutation$data; + variables: FollowMarketingCollectionButtonMutation$variables; +}; + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "input" + } +], +v1 = [ + { + "alias": null, + "args": [ + { + "kind": "Variable", + "name": "input", + "variableName": "input" + } + ], + "concreteType": "FollowMarketingCollectionPayload", + "kind": "LinkedField", + "name": "followMarketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isFollowed", + "storageKey": null + } + ], + "storageKey": null + } + ], + "storageKey": null + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "FollowMarketingCollectionButtonMutation", + "selections": (v1/*: any*/), + "type": "Mutation", + "abstractKey": null + }, + "kind": "Request", + "operation": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Operation", + "name": "FollowMarketingCollectionButtonMutation", + "selections": (v1/*: any*/) + }, + "params": { + "cacheID": "95fcc4e0373fb0cb24fdbd7fab876ee1", + "id": null, + "metadata": {}, + "name": "FollowMarketingCollectionButtonMutation", + "operationKind": "mutation", + "text": "mutation FollowMarketingCollectionButtonMutation(\n $input: FollowMarketingCollectionInput!\n) {\n followMarketingCollection(input: $input) {\n marketingCollection {\n id\n isFollowed\n }\n }\n}\n" + } +}; +})(); + +(node as any).hash = "900253fae6b623828661f9c0269c17ec"; + +export default node; diff --git a/src/__generated__/FollowMarketingCollectionButtonQuery.graphql.ts b/src/__generated__/FollowMarketingCollectionButtonQuery.graphql.ts new file mode 100644 index 00000000000..ed04deed670 --- /dev/null +++ b/src/__generated__/FollowMarketingCollectionButtonQuery.graphql.ts @@ -0,0 +1,154 @@ +/** + * @generated SignedSource<> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ConcreteRequest } from 'relay-runtime'; +import { FragmentRefs } from "relay-runtime"; +export type FollowMarketingCollectionButtonQuery$variables = { + id: string; + isLoggedIn: boolean; +}; +export type FollowMarketingCollectionButtonQuery$data = { + readonly marketingCollection: { + readonly " $fragmentSpreads": FragmentRefs<"FollowMarketingCollectionButton_marketingCollection">; + } | null | undefined; +}; +export type FollowMarketingCollectionButtonQuery = { + response: FollowMarketingCollectionButtonQuery$data; + variables: FollowMarketingCollectionButtonQuery$variables; +}; + +const node: ConcreteRequest = (function(){ +var v0 = [ + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "id" + }, + { + "defaultValue": null, + "kind": "LocalArgument", + "name": "isLoggedIn" + } +], +v1 = [ + { + "kind": "Variable", + "name": "slug", + "variableName": "id" + } +]; +return { + "fragment": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Fragment", + "metadata": null, + "name": "FollowMarketingCollectionButtonQuery", + "selections": [ + { + "alias": null, + "args": (v1/*: any*/), + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + { + "args": [ + { + "kind": "Variable", + "name": "isLoggedIn", + "variableName": "isLoggedIn" + } + ], + "kind": "FragmentSpread", + "name": "FollowMarketingCollectionButton_marketingCollection" + } + ], + "storageKey": null + } + ], + "type": "Query", + "abstractKey": null + }, + "kind": "Request", + "operation": { + "argumentDefinitions": (v0/*: any*/), + "kind": "Operation", + "name": "FollowMarketingCollectionButtonQuery", + "selections": [ + { + "alias": null, + "args": (v1/*: any*/), + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "slug", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "title", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "internalID", + "storageKey": null + }, + { + "condition": "isLoggedIn", + "kind": "Condition", + "passingValue": true, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isFollowed", + "storageKey": null + } + ] + } + ], + "storageKey": null + } + ] + }, + "params": { + "cacheID": "13487775aa8b2dcdc605af60fda09935", + "id": null, + "metadata": {}, + "name": "FollowMarketingCollectionButtonQuery", + "operationKind": "query", + "text": "query FollowMarketingCollectionButtonQuery(\n $id: String!\n $isLoggedIn: Boolean!\n) {\n marketingCollection(slug: $id) {\n ...FollowMarketingCollectionButton_marketingCollection_4dcqWc\n id\n }\n}\n\nfragment FollowMarketingCollectionButton_marketingCollection_4dcqWc on MarketingCollection {\n id\n slug\n title\n internalID\n isFollowed @include(if: $isLoggedIn)\n}\n" + } +}; +})(); + +(node as any).hash = "5ed68e9e22014ff84dbf24947bc6f39d"; + +export default node; diff --git a/src/__generated__/FollowMarketingCollectionButton_marketingCollection.graphql.ts b/src/__generated__/FollowMarketingCollectionButton_marketingCollection.graphql.ts new file mode 100644 index 00000000000..b72e9a9776d --- /dev/null +++ b/src/__generated__/FollowMarketingCollectionButton_marketingCollection.graphql.ts @@ -0,0 +1,87 @@ +/** + * @generated SignedSource<> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ReaderFragment } from 'relay-runtime'; +import { FragmentRefs } from "relay-runtime"; +export type FollowMarketingCollectionButton_marketingCollection$data = { + readonly id: string; + readonly internalID: string; + readonly isFollowed?: boolean | null | undefined; + readonly slug: string; + readonly title: string; + readonly " $fragmentType": "FollowMarketingCollectionButton_marketingCollection"; +}; +export type FollowMarketingCollectionButton_marketingCollection$key = { + readonly " $data"?: FollowMarketingCollectionButton_marketingCollection$data; + readonly " $fragmentSpreads": FragmentRefs<"FollowMarketingCollectionButton_marketingCollection">; +}; + +const node: ReaderFragment = { + "argumentDefinitions": [ + { + "defaultValue": false, + "kind": "LocalArgument", + "name": "isLoggedIn" + } + ], + "kind": "Fragment", + "metadata": null, + "name": "FollowMarketingCollectionButton_marketingCollection", + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "id", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "slug", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "title", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "internalID", + "storageKey": null + }, + { + "condition": "isLoggedIn", + "kind": "Condition", + "passingValue": true, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "isFollowed", + "storageKey": null + } + ] + } + ], + "type": "MarketingCollection", + "abstractKey": null +}; + +(node as any).hash = "47775ea579be36612b409e45b16c3bce"; + +export default node; diff --git a/src/__generated__/MarketingCollectionHitNotification_notification.graphql.ts b/src/__generated__/MarketingCollectionHitNotification_notification.graphql.ts new file mode 100644 index 00000000000..9e2480b414b --- /dev/null +++ b/src/__generated__/MarketingCollectionHitNotification_notification.graphql.ts @@ -0,0 +1,139 @@ +/** + * @generated SignedSource<> + * @lightSyntaxTransform + * @nogrep + */ + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + +import { ReaderFragment } from 'relay-runtime'; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +import { FragmentRefs } from "relay-runtime"; +export type MarketingCollectionHitNotification_notification$data = { + readonly artworksConnection: { + readonly totalCount: number | null | undefined; + readonly " $fragmentSpreads": FragmentRefs<"NotificationArtworkList_artworksConnection">; + } | null | undefined; + readonly headline: string; + readonly item: { + readonly marketingCollection?: { + readonly slug: string; + readonly title: string; + } | null | undefined; + } | null | undefined; + readonly notificationType: NotificationTypesEnum; + readonly " $fragmentSpreads": FragmentRefs<"NotificationTypeLabel_notification">; + readonly " $fragmentType": "MarketingCollectionHitNotification_notification"; +}; +export type MarketingCollectionHitNotification_notification$key = { + readonly " $data"?: MarketingCollectionHitNotification_notification$data; + readonly " $fragmentSpreads": FragmentRefs<"MarketingCollectionHitNotification_notification">; +}; + +const node: ReaderFragment = { + "argumentDefinitions": [], + "kind": "Fragment", + "metadata": null, + "name": "MarketingCollectionHitNotification_notification", + "selections": [ + { + "alias": null, + "args": [ + { + "kind": "Literal", + "name": "first", + "value": 10 + } + ], + "concreteType": "ArtworkConnection", + "kind": "LinkedField", + "name": "artworksConnection", + "plural": false, + "selections": [ + { + "args": null, + "kind": "FragmentSpread", + "name": "NotificationArtworkList_artworksConnection" + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "totalCount", + "storageKey": null + } + ], + "storageKey": "artworksConnection(first:10)" + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "headline", + "storageKey": null + }, + { + "alias": null, + "args": null, + "concreteType": null, + "kind": "LinkedField", + "name": "item", + "plural": false, + "selections": [ + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "title", + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "slug", + "storageKey": null + } + ], + "storageKey": null + } + ], + "type": "MarketingCollectionHitNotificationItem", + "abstractKey": null + } + ], + "storageKey": null + }, + { + "alias": null, + "args": null, + "kind": "ScalarField", + "name": "notificationType", + "storageKey": null + }, + { + "args": null, + "kind": "FragmentSpread", + "name": "NotificationTypeLabel_notification" + } + ], + "type": "Notification", + "abstractKey": null +}; + +(node as any).hash = "24fc8ce121dd3a98ece18a63d38535c8"; + +export default node; diff --git a/src/__generated__/NotificationItem_notification.graphql.ts b/src/__generated__/NotificationItem_notification.graphql.ts index 710c2259781..cca5689426f 100644 --- a/src/__generated__/NotificationItem_notification.graphql.ts +++ b/src/__generated__/NotificationItem_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type NotificationItem_notification$data = { readonly headline: string; diff --git a/src/__generated__/NotificationItem_test_Query.graphql.ts b/src/__generated__/NotificationItem_test_Query.graphql.ts index 74bf9fb530e..c93031ab0d0 100644 --- a/src/__generated__/NotificationItem_test_Query.graphql.ts +++ b/src/__generated__/NotificationItem_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<5658400ec4da1d92546f60aff3bd4307>> + * @generated SignedSource<<373f99789994c7f957b6c0e84eac430d>> * @lightSyntaxTransform * @nogrep */ @@ -369,6 +369,7 @@ return { "ARTWORK_ALERT", "ARTWORK_PUBLISHED", "COLLECTOR_PROFILE_UPDATE_PROMPT", + "MARKETING_COLLECTION_HIT", "PARTNER_OFFER_CREATED", "PARTNER_SHOW_OPENED", "VIEWING_ROOM_PUBLISHED" diff --git a/src/__generated__/NotificationQuery.graphql.ts b/src/__generated__/NotificationQuery.graphql.ts index 82c5328e2dd..5e65828b608 100644 --- a/src/__generated__/NotificationQuery.graphql.ts +++ b/src/__generated__/NotificationQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<4ab0a0a185aa737b889876e01515b479>> + * @generated SignedSource<<5e7dd63451e99a09fc7a7945709efde6>> * @lightSyntaxTransform * @nogrep */ @@ -10,7 +10,7 @@ import { ConcreteRequest } from 'relay-runtime'; import { FragmentRefs } from "relay-runtime"; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; export type NotificationQuery$variables = { internalID: string; }; @@ -21,7 +21,7 @@ export type NotificationQuery$data = { readonly internalID: string; readonly notificationType: NotificationTypesEnum; readonly targetHref: string; - readonly " $fragmentSpreads": FragmentRefs<"AlertNotification_notification" | "ArticleFeaturedArtistNotification_notification" | "ArtworkPublishedNotification_notification" | "PartnerOfferCreatedNotification_notification" | "PartnerShowOpenedNotification_notification" | "ViewingRoomPublishedNotification_notification">; + readonly " $fragmentSpreads": FragmentRefs<"AlertNotification_notification" | "ArticleFeaturedArtistNotification_notification" | "ArtworkPublishedNotification_notification" | "MarketingCollectionHitNotification_notification" | "PartnerOfferCreatedNotification_notification" | "PartnerShowOpenedNotification_notification" | "ViewingRoomPublishedNotification_notification">; } | null | undefined; } | null | undefined; }; @@ -599,6 +599,11 @@ return { "kind": "FragmentSpread", "name": "ViewingRoomPublishedNotification_notification" }, + { + "args": null, + "kind": "FragmentSpread", + "name": "MarketingCollectionHitNotification_notification" + }, (v2/*: any*/), (v3/*: any*/), (v4/*: any*/), @@ -1235,6 +1240,27 @@ return { ], "type": "ViewingRoomPublishedNotificationItem", "abstractKey": null + }, + { + "kind": "InlineFragment", + "selections": [ + { + "alias": null, + "args": null, + "concreteType": "MarketingCollection", + "kind": "LinkedField", + "name": "marketingCollection", + "plural": false, + "selections": [ + (v8/*: any*/), + (v36/*: any*/), + (v2/*: any*/) + ], + "storageKey": null + } + ], + "type": "MarketingCollectionHitNotificationItem", + "abstractKey": null } ], "storageKey": null @@ -1422,16 +1448,16 @@ return { ] }, "params": { - "cacheID": "f0d8905649b06226b5ac9f1ed743b2d5", + "cacheID": "129c8ace147d4b15fef6a75f24252883", "id": null, "metadata": {}, "name": "NotificationQuery", "operationKind": "query", - "text": "query NotificationQuery(\n $internalID: String!\n) {\n me {\n notification(id: $internalID) {\n ...AlertNotification_notification\n ...ArtworkPublishedNotification_notification\n ...ArticleFeaturedArtistNotification_notification\n ...PartnerOfferCreatedNotification_notification\n ...PartnerShowOpenedNotification_notification\n ...ViewingRoomPublishedNotification_notification\n id\n internalID\n notificationType\n targetHref\n }\n id\n }\n}\n\nfragment AlertNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on AlertNotificationItem {\n alert {\n internalID\n artists {\n name\n slug\n id\n }\n labels {\n displayValue\n }\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArticleFeaturedArtistNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n href\n thumbnailTitle\n byline\n publishedAt(format: \"MMM D, YYYY\")\n thumbnailImage {\n cropped(width: 910, height: 607) {\n src\n srcSet\n width\n height\n }\n }\n id\n }\n artistsConnection(first: 10) {\n edges {\n node {\n name\n slug\n internalID\n href\n id\n }\n }\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArtworkPublishedNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on ArtworkPublishedNotificationItem {\n artists {\n internalID\n isFollowed\n name\n slug\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment BidTimerLine_artwork on Artwork {\n saleArtwork {\n lotID\n id\n }\n collectorSignals {\n auction {\n lotClosesAt\n registrationEndsAt\n onlineBiddingExtended\n }\n }\n}\n\nfragment Details_artwork_1ZRKfT on Artwork {\n internalID\n href\n title\n date\n collectorSignals {\n primaryLabel\n auction {\n bidCount\n lotClosesAt\n liveBiddingStarted\n registrationEndsAt\n onlineBiddingExtended\n }\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n sale_message: saleMessage\n cultural_maker: culturalMaker\n artist(shallow: true) {\n targetSupply {\n isP1\n }\n id\n }\n marketPriceInsights {\n demandRank\n }\n artists(shallow: true) {\n id\n href\n name\n }\n collecting_institution: collectingInstitution\n partner(shallow: true) {\n name\n href\n id\n }\n sale {\n endAt\n cascadingEndTimeIntervalMinutes\n extendedBiddingIntervalMinutes\n startAt\n is_auction: isAuction\n is_closed: isClosed\n id\n }\n sale_artwork: saleArtwork {\n lotID\n lotLabel\n endAt\n extendedBiddingEndAt\n formattedEndDateTime\n counts {\n bidder_positions: bidderPositions\n }\n highest_bid: highestBid {\n display\n }\n opening_bid: openingBid {\n display\n }\n id\n }\n ...LegacyPrimaryLabelLine_artwork\n ...PrimaryLabelLine_artwork\n ...BidTimerLine_artwork\n ...HoverDetails_artwork\n}\n\nfragment ExclusiveAccessBadge_artwork on Artwork {\n isUnlisted\n}\n\nfragment HoverDetails_artwork on Artwork {\n internalID\n attributionClass {\n name\n id\n }\n mediumType {\n filterGene {\n name\n id\n }\n }\n}\n\nfragment LegacyPrimaryLabelLine_artwork on Artwork {\n collectorSignals {\n primaryLabel\n }\n}\n\nfragment Metadata_artwork on Artwork {\n ...Details_artwork_1ZRKfT\n internalID\n href\n sale {\n isOpen\n id\n }\n}\n\nfragment NotificationArtworkList_artworksConnection on ArtworkConnection {\n edges {\n node {\n ...NotificationArtwork_artwork\n internalID\n id\n }\n }\n}\n\nfragment NotificationArtwork_artwork on Artwork {\n ...ExclusiveAccessBadge_artwork\n ...Metadata_artwork\n artistNames\n href\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n title\n}\n\nfragment NotificationPartnerShow_show on Show {\n location {\n city\n id\n }\n exhibitionPeriod\n startAt\n endAt\n name\n description\n href\n coverImage {\n cropped(width: 600, height: 450, version: [\"larger\", \"large\"]) {\n src\n srcSet\n }\n }\n slug\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationViewingRoom_viewingRoom on ViewingRoom {\n title\n href\n introStatement\n image {\n imageURLs {\n normalized\n }\n width\n height\n }\n}\n\nfragment NotificationViewingRoomsList_viewingRoomsConnection on ViewingRoomsConnection {\n edges {\n node {\n ...NotificationViewingRoom_viewingRoom\n internalID\n }\n }\n}\n\nfragment PartnerOfferArtwork_artwork on Artwork {\n internalID\n slug\n href\n title\n artistNames\n price\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n partner(shallow: true) {\n profile {\n icon {\n url(version: \"square140\")\n }\n id\n }\n id\n }\n collectorSignals {\n partnerOffer {\n endAt\n id\n }\n increasedInterest\n curatorsPick\n }\n ...Metadata_artwork\n}\n\nfragment PartnerOfferCreatedNotification_notification on Notification {\n headline\n targetHref\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n partnerOffer {\n internalID\n endAt\n isAvailable\n note\n source\n priceWithDiscount {\n display\n }\n id\n }\n }\n }\n offerArtworksConnection: artworksConnection(first: 1) {\n edges {\n node {\n ...PartnerOfferArtwork_artwork\n id\n }\n }\n }\n}\n\nfragment PartnerShowOpenedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ShowOpenedNotificationItem {\n partner {\n href\n name\n profile {\n internalID\n id\n }\n id\n }\n showsConnection {\n edges {\n node {\n internalID\n ...NotificationPartnerShow_show\n id\n }\n }\n }\n }\n }\n ...NotificationTypeLabel_notification\n}\n\nfragment PrimaryLabelLine_artwork on Artwork {\n internalID\n collectorSignals {\n primaryLabel\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n}\n\nfragment ViewingRoomPublishedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n partner {\n name\n href\n profile {\n internalID\n id\n }\n id\n }\n viewingRoomsConnection(first: 10) {\n ...NotificationViewingRoomsList_viewingRoomsConnection\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n" + "text": "query NotificationQuery(\n $internalID: String!\n) {\n me {\n notification(id: $internalID) {\n ...AlertNotification_notification\n ...ArtworkPublishedNotification_notification\n ...ArticleFeaturedArtistNotification_notification\n ...PartnerOfferCreatedNotification_notification\n ...PartnerShowOpenedNotification_notification\n ...ViewingRoomPublishedNotification_notification\n ...MarketingCollectionHitNotification_notification\n id\n internalID\n notificationType\n targetHref\n }\n id\n }\n}\n\nfragment AlertNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on AlertNotificationItem {\n alert {\n internalID\n artists {\n name\n slug\n id\n }\n labels {\n displayValue\n }\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArticleFeaturedArtistNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ArticleFeaturedArtistNotificationItem {\n article {\n href\n thumbnailTitle\n byline\n publishedAt(format: \"MMM D, YYYY\")\n thumbnailImage {\n cropped(width: 910, height: 607) {\n src\n srcSet\n width\n height\n }\n }\n id\n }\n artistsConnection(first: 10) {\n edges {\n node {\n name\n slug\n internalID\n href\n id\n }\n }\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment ArtworkPublishedNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on ArtworkPublishedNotificationItem {\n artists {\n internalID\n isFollowed\n name\n slug\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment BidTimerLine_artwork on Artwork {\n saleArtwork {\n lotID\n id\n }\n collectorSignals {\n auction {\n lotClosesAt\n registrationEndsAt\n onlineBiddingExtended\n }\n }\n}\n\nfragment Details_artwork_1ZRKfT on Artwork {\n internalID\n href\n title\n date\n collectorSignals {\n primaryLabel\n auction {\n bidCount\n lotClosesAt\n liveBiddingStarted\n registrationEndsAt\n onlineBiddingExtended\n }\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n sale_message: saleMessage\n cultural_maker: culturalMaker\n artist(shallow: true) {\n targetSupply {\n isP1\n }\n id\n }\n marketPriceInsights {\n demandRank\n }\n artists(shallow: true) {\n id\n href\n name\n }\n collecting_institution: collectingInstitution\n partner(shallow: true) {\n name\n href\n id\n }\n sale {\n endAt\n cascadingEndTimeIntervalMinutes\n extendedBiddingIntervalMinutes\n startAt\n is_auction: isAuction\n is_closed: isClosed\n id\n }\n sale_artwork: saleArtwork {\n lotID\n lotLabel\n endAt\n extendedBiddingEndAt\n formattedEndDateTime\n counts {\n bidder_positions: bidderPositions\n }\n highest_bid: highestBid {\n display\n }\n opening_bid: openingBid {\n display\n }\n id\n }\n ...LegacyPrimaryLabelLine_artwork\n ...PrimaryLabelLine_artwork\n ...BidTimerLine_artwork\n ...HoverDetails_artwork\n}\n\nfragment ExclusiveAccessBadge_artwork on Artwork {\n isUnlisted\n}\n\nfragment HoverDetails_artwork on Artwork {\n internalID\n attributionClass {\n name\n id\n }\n mediumType {\n filterGene {\n name\n id\n }\n }\n}\n\nfragment LegacyPrimaryLabelLine_artwork on Artwork {\n collectorSignals {\n primaryLabel\n }\n}\n\nfragment MarketingCollectionHitNotification_notification on Notification {\n artworksConnection(first: 10) {\n ...NotificationArtworkList_artworksConnection\n totalCount\n }\n headline\n item {\n __typename\n ... on MarketingCollectionHitNotificationItem {\n marketingCollection {\n title\n slug\n id\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n\nfragment Metadata_artwork on Artwork {\n ...Details_artwork_1ZRKfT\n internalID\n href\n sale {\n isOpen\n id\n }\n}\n\nfragment NotificationArtworkList_artworksConnection on ArtworkConnection {\n edges {\n node {\n ...NotificationArtwork_artwork\n internalID\n id\n }\n }\n}\n\nfragment NotificationArtwork_artwork on Artwork {\n ...ExclusiveAccessBadge_artwork\n ...Metadata_artwork\n artistNames\n href\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n title\n}\n\nfragment NotificationPartnerShow_show on Show {\n location {\n city\n id\n }\n exhibitionPeriod\n startAt\n endAt\n name\n description\n href\n coverImage {\n cropped(width: 600, height: 450, version: [\"larger\", \"large\"]) {\n src\n srcSet\n }\n }\n slug\n}\n\nfragment NotificationTypeLabel_notification on Notification {\n notificationType\n publishedAt(format: \"RELATIVE\")\n}\n\nfragment NotificationViewingRoom_viewingRoom on ViewingRoom {\n title\n href\n introStatement\n image {\n imageURLs {\n normalized\n }\n width\n height\n }\n}\n\nfragment NotificationViewingRoomsList_viewingRoomsConnection on ViewingRoomsConnection {\n edges {\n node {\n ...NotificationViewingRoom_viewingRoom\n internalID\n }\n }\n}\n\nfragment PartnerOfferArtwork_artwork on Artwork {\n internalID\n slug\n href\n title\n artistNames\n price\n image {\n src: url(version: [\"larger\", \"large\"])\n width\n height\n }\n partner(shallow: true) {\n profile {\n icon {\n url(version: \"square140\")\n }\n id\n }\n id\n }\n collectorSignals {\n partnerOffer {\n endAt\n id\n }\n increasedInterest\n curatorsPick\n }\n ...Metadata_artwork\n}\n\nfragment PartnerOfferCreatedNotification_notification on Notification {\n headline\n targetHref\n item {\n __typename\n ... on PartnerOfferCreatedNotificationItem {\n partnerOffer {\n internalID\n endAt\n isAvailable\n note\n source\n priceWithDiscount {\n display\n }\n id\n }\n }\n }\n offerArtworksConnection: artworksConnection(first: 1) {\n edges {\n node {\n ...PartnerOfferArtwork_artwork\n id\n }\n }\n }\n}\n\nfragment PartnerShowOpenedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ShowOpenedNotificationItem {\n partner {\n href\n name\n profile {\n internalID\n id\n }\n id\n }\n showsConnection {\n edges {\n node {\n internalID\n ...NotificationPartnerShow_show\n id\n }\n }\n }\n }\n }\n ...NotificationTypeLabel_notification\n}\n\nfragment PrimaryLabelLine_artwork on Artwork {\n internalID\n collectorSignals {\n primaryLabel\n partnerOffer {\n endAt\n priceWithDiscount {\n display\n }\n id\n }\n }\n}\n\nfragment ViewingRoomPublishedNotification_notification on Notification {\n headline\n item {\n __typename\n ... on ViewingRoomPublishedNotificationItem {\n partner {\n name\n href\n profile {\n internalID\n id\n }\n id\n }\n viewingRoomsConnection(first: 10) {\n ...NotificationViewingRoomsList_viewingRoomsConnection\n }\n }\n }\n notificationType\n ...NotificationTypeLabel_notification\n}\n" } }; })(); -(node as any).hash = "c5aad69e50ff30717ac6b135b8b412c6"; +(node as any).hash = "9e25a86990b88eebf370dec34f75c0a2"; export default node; diff --git a/src/__generated__/NotificationTypeLabel_notification.graphql.ts b/src/__generated__/NotificationTypeLabel_notification.graphql.ts index 9bdd6419139..1831b1d40b0 100644 --- a/src/__generated__/NotificationTypeLabel_notification.graphql.ts +++ b/src/__generated__/NotificationTypeLabel_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type NotificationTypeLabel_notification$data = { readonly notificationType: NotificationTypesEnum; diff --git a/src/__generated__/NotificationsListNextQuery.graphql.ts b/src/__generated__/NotificationsListNextQuery.graphql.ts index 5bc619eed9c..99bd2230997 100644 --- a/src/__generated__/NotificationsListNextQuery.graphql.ts +++ b/src/__generated__/NotificationsListNextQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<2389485587e195bba889000620d2cb34>> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -10,7 +10,7 @@ import { ConcreteRequest } from 'relay-runtime'; import { FragmentRefs } from "relay-runtime"; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; export type NotificationsListNextQuery$variables = { count: number; cursor?: string | null | undefined; diff --git a/src/__generated__/NotificationsListQuery.graphql.ts b/src/__generated__/NotificationsListQuery.graphql.ts index 2e896055af9..4a26f6b246a 100644 --- a/src/__generated__/NotificationsListQuery.graphql.ts +++ b/src/__generated__/NotificationsListQuery.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<74f6255c9b8b0c1f3db84aaff23cb38a>> + * @generated SignedSource<<731a408d07aa9e69fe82be76ce96ce6c>> * @lightSyntaxTransform * @nogrep */ @@ -10,7 +10,7 @@ import { ConcreteRequest } from 'relay-runtime'; import { FragmentRefs } from "relay-runtime"; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; export type NotificationsListQuery$variables = { types?: ReadonlyArray | null | undefined; }; diff --git a/src/__generated__/NotificationsList_test_Query.graphql.ts b/src/__generated__/NotificationsList_test_Query.graphql.ts index 55dc615cb0a..de65f94fe75 100644 --- a/src/__generated__/NotificationsList_test_Query.graphql.ts +++ b/src/__generated__/NotificationsList_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<652788ace474e272d86c084c82268e82>> + * @generated SignedSource<<5df62b36a7633e904553ed8cbda82157>> * @lightSyntaxTransform * @nogrep */ @@ -497,6 +497,7 @@ return { "ARTWORK_ALERT", "ARTWORK_PUBLISHED", "COLLECTOR_PROFILE_UPDATE_PROMPT", + "MARKETING_COLLECTION_HIT", "PARTNER_OFFER_CREATED", "PARTNER_SHOW_OPENED", "VIEWING_ROOM_PUBLISHED" diff --git a/src/__generated__/NotificationsList_viewer.graphql.ts b/src/__generated__/NotificationsList_viewer.graphql.ts index ac02655a278..1f675419bbe 100644 --- a/src/__generated__/NotificationsList_viewer.graphql.ts +++ b/src/__generated__/NotificationsList_viewer.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<<72e4aef6a96cf1705687068c004e5d7d>> + * @generated SignedSource<<6d12afcc936edd9d5c942bc52ed091ef>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type NotificationsList_viewer$data = { readonly notifications: { diff --git a/src/__generated__/PartnerShowOpenedNotification_test_Query.graphql.ts b/src/__generated__/PartnerShowOpenedNotification_test_Query.graphql.ts index c9a31718c91..09e85398a26 100644 --- a/src/__generated__/PartnerShowOpenedNotification_test_Query.graphql.ts +++ b/src/__generated__/PartnerShowOpenedNotification_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<73c657fc07f93c3a0115bc54c560b2d3>> * @lightSyntaxTransform * @nogrep */ @@ -499,6 +499,7 @@ return { "ARTWORK_ALERT", "ARTWORK_PUBLISHED", "COLLECTOR_PROFILE_UPDATE_PROMPT", + "MARKETING_COLLECTION_HIT", "PARTNER_OFFER_CREATED", "PARTNER_SHOW_OPENED", "VIEWING_ROOM_PUBLISHED" diff --git a/src/__generated__/ViewingRoomPublishedNotification_notification.graphql.ts b/src/__generated__/ViewingRoomPublishedNotification_notification.graphql.ts index ecdd3223bb3..d62c6669da4 100644 --- a/src/__generated__/ViewingRoomPublishedNotification_notification.graphql.ts +++ b/src/__generated__/ViewingRoomPublishedNotification_notification.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<412c470c24eb07918f6c5d4119535aee>> * @lightSyntaxTransform * @nogrep */ @@ -9,7 +9,7 @@ // @ts-nocheck import { ReaderFragment } from 'relay-runtime'; -export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; +export type NotificationTypesEnum = "ARTICLE_FEATURED_ARTIST" | "ARTWORK_ALERT" | "ARTWORK_PUBLISHED" | "COLLECTOR_PROFILE_UPDATE_PROMPT" | "MARKETING_COLLECTION_HIT" | "PARTNER_OFFER_CREATED" | "PARTNER_SHOW_OPENED" | "VIEWING_ROOM_PUBLISHED" | "%future added value"; import { FragmentRefs } from "relay-runtime"; export type ViewingRoomPublishedNotification_notification$data = { readonly headline: string; diff --git a/src/__generated__/ViewingRoomPublishedNotification_test_Query.graphql.ts b/src/__generated__/ViewingRoomPublishedNotification_test_Query.graphql.ts index 21fcebf3a13..b0ca32d2fca 100644 --- a/src/__generated__/ViewingRoomPublishedNotification_test_Query.graphql.ts +++ b/src/__generated__/ViewingRoomPublishedNotification_test_Query.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<<694e59bc4ea4857aa7582a3f9606d34e>> * @lightSyntaxTransform * @nogrep */ @@ -444,6 +444,7 @@ return { "ARTWORK_ALERT", "ARTWORK_PUBLISHED", "COLLECTOR_PROFILE_UPDATE_PROMPT", + "MARKETING_COLLECTION_HIT", "PARTNER_OFFER_CREATED", "PARTNER_SHOW_OPENED", "VIEWING_ROOM_PUBLISHED"