diff --git a/packages/client/lens-v2.graphql b/packages/client/lens-v2.graphql index a0c13a6393..50ea2fde6f 100644 --- a/packages/client/lens-v2.graphql +++ b/packages/client/lens-v2.graphql @@ -429,7 +429,7 @@ type Post { metadata: PublicationMetadata! # The open action module - openActionModules: [OpenActionModule!] + openActionModules: [OpenActionModule!]! # The reference module referenceModule: ReferenceModule @@ -666,7 +666,7 @@ type VideoMetadataV1 implements MetadataV3Common { locale: Locale! - tags: [String!]! + tags: [String!] contentWarning: PublicationContentWarning @@ -696,7 +696,7 @@ type ImageMetadataV1 implements MetadataV3Common { locale: Locale! - tags: [String!]! + tags: [String!] contentWarning: PublicationContentWarning @@ -1293,7 +1293,7 @@ type MetadataV2 { attributes: [MarketplaceMetadataAttribute!] # The locale of the publication, - locale: Locale + locale: Locale! # The tags for the publication tags: [String!] diff --git a/packages/client/src/graphql/fragments.generated.ts b/packages/client/src/graphql/fragments.generated.ts index 04f1de98d0..99f8530393 100644 --- a/packages/client/src/graphql/fragments.generated.ts +++ b/packages/client/src/graphql/fragments.generated.ts @@ -45,11 +45,19 @@ export type NetworkAddressFragment = { address: string; chainId: string }; export type ImageFragment = { url: string; - mimeType: string | null; width: number | null; height: number | null; + imageMimeType: string | null; }; +export type VideoFragment = { url: string; videoMimeType: string | null }; + +export type VideoSetFragment = { rawURL: string; altTag: string | null; media: VideoFragment }; + +export type AudioFragment = { url: string; audioMimeType: string | null }; + +export type AudioSetFragment = { rawURL: string; media: AudioFragment }; + export type ProfileCoverSetFragment = { rawURL: string; altTag: string | null; @@ -115,14 +123,357 @@ export type AppFragment = { id: string }; export type MomokaInfoFragment = { proof: string }; +export type FollowOnlyReferenceModuleSettingsFragment = { contract: NetworkAddressFragment }; + +export type DegreesOfSeparationReferenceModuleSettingsFragment = { + commentsRestricted: boolean; + mirrorsRestricted: boolean; + degreesOfSeparation: number; + contract: NetworkAddressFragment; +}; + +export type UnknownReferenceModuleSettingsFragment = { + referenceModuleReturnData: string; + contract: NetworkAddressFragment; +}; + +export type SimpleCollectOpenActionSettingsFragment = { + recipient: string; + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type MultirecipientFeeCollectOpenActionSettingsFragment = { + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; + recipients: Array<{ recipient: string; split: number }>; +}; + +export type UnknownOpenActionSettingsFragment = { + openActionModuleReturnData: string; + contract: NetworkAddressFragment; +}; + +export type LegacyFreeCollectModuleSettingsFragment = { + followerOnly: boolean; + contract: NetworkAddressFragment; +}; + +export type LegacyFeeCollectModuleSettingsFragment = { + recipient: string; + referralFee: number; + followerOnly: boolean; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type LegacyLimitedFeeCollectModuleSettingsFragment = { + collectLimit: string; + recipient: string; + referralFee: number; + followerOnly: boolean; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type LegacyLimitedTimedFeeCollectModuleSettingsFragment = { + collectLimit: string; + recipient: string; + referralFee: number; + followerOnly: boolean; + endsAt: string; + contract: { address: string }; + amount: AmountFragment; +}; + +export type LegacyRevertCollectModuleSettingsFragment = { contract: NetworkAddressFragment }; + +export type LegacyTimedFeeCollectModuleSettingsFragment = { + recipient: string; + referralFee: number; + followerOnly: boolean; + endsAt: string; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type LegacyMultirecipientFeeCollectModuleSettingsFragment = { + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; + recipients: Array<{ recipient: string; split: number }>; +}; + +export type LegacySimpleCollectModuleSettingsFragment = { + recipient: string; + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type LegacyErc4626FeeCollectModuleSettingsFragment = { + vault: string; + recipient: string; + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type LegacyAaveFeeCollectModuleSettingsFragment = { + recipient: string; + referralFee: number; + followerOnly: boolean; + collectLimitOptional: string | null; + endsAtOptional: string | null; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type UnknownCollectModuleSettingsFragment = { + collectModuleReturnData: string; + contract: NetworkAddressFragment; +}; + +export type CollectOpenActionResultFragment = { type: Types.CollectOpenActionModules | null }; + +export type NftDropOpenActionFragment = { tokenMinted: number | null }; + +export type UnknownOpenActionResultFragment = { address: string | null; redeemData: string | null }; + +export type CanDecryptResponseFragment = { + result: boolean; + reasons: Array | null; + extraDetails: string | null; +}; + +export type PublicationOperationsFragment = { + isNotInterested: boolean; + hasBookmarked: boolean; + canComment: boolean; + canMirror: boolean; + hasMirrored: boolean; + hasUpvoted: boolean; + hasDownvoted: boolean; + hasActed: Array< + CollectOpenActionResultFragment | NftDropOpenActionFragment | UnknownOpenActionResultFragment + >; + canDecrypt: CanDecryptResponseFragment | null; +}; + +export type MetadataV3LitEncryptionFragment = { + encryptionKey: string; + accessCondition: + | AndConditionFragment + | CollectConditionFragment + | EoaOwnershipConditionFragment + | Erc20OwnershipConditionFragment + | FollowConditionFragment + | NftOwnershipConditionFragment + | OrConditionFragment + | ProfileOwnershipConditionFragment; +}; + +export type NftOwnershipConditionFragment = { + contractType: Types.NftContractType; + tokenIds: Array | null; + contract: NetworkAddressFragment; +}; + +export type Erc20OwnershipConditionFragment = { + condition: Types.ScalarOperator; + contract: NetworkAddressFragment; + amount: AmountFragment; +}; + +export type EoaOwnershipConditionFragment = { address: string }; + +export type ProfileOwnershipConditionFragment = { profileId: string }; + +export type FollowConditionFragment = { profileId: string }; + +export type CollectConditionFragment = { + publicationId: string | null; + thisPublication: boolean | null; +}; + +export type AndConditionFragment = { + criteria: Array< + | CollectConditionFragment + | EoaOwnershipConditionFragment + | Erc20OwnershipConditionFragment + | FollowConditionFragment + | NftOwnershipConditionFragment + | ProfileOwnershipConditionFragment + | {} + >; +}; + +export type OrConditionFragment = { + criteria: Array< + | CollectConditionFragment + | EoaOwnershipConditionFragment + | Erc20OwnershipConditionFragment + | FollowConditionFragment + | NftOwnershipConditionFragment + | ProfileOwnershipConditionFragment + | {} + >; +}; + +export type PublicationImageSetFragment = { + rawURL: string; + altTag: string | null; + media: ImageFragment; + transformed: ImageFragment | null; +}; + +export type MarketplaceMetadataAttributeFragment = { + displayType: Types.MarketplaceMetadataAttributeDisplayTypes | null; + traitType: string | null; + value: string | null; +}; + +export type MarketplaceMetadataFragment = { + description: string | null; + externalUrl: string | null; + name: string; + image: string | null; + animationUrl: string | null; + attributes: Array; +}; + +export type MetadataMediaVideoFragment = { + duration: number | null; + license: string | null; + videoMimeType: string; + videoItem: VideoSetFragment | null; + cover: PublicationImageSetFragment | null; +}; + +export type MetadataMediaImageFragment = { + license: string | null; + imageMimeType: string; + imageItem: PublicationImageSetFragment; +}; + +export type MetadataMediaAudioFragment = { + duration: number | null; + license: string | null; + credits: string | null; + artist: string | null; + genre: string | null; + recordLabel: string | null; + audioType: string; + lyrics: string | null; + audioMimeType: string; + audioItem: AudioSetFragment | null; + cover: PublicationImageSetFragment | null; +}; + +export type MetadataV2Fragment = { + name: string | null; + description: string | null; + content: string | null; + locale: string; + tags: Array | null; + contentWarning: Types.PublicationContentWarning | null; + animationUrl: string | null; + v2mainContentFocus: Types.MetadataV2MainFocus; + image: PublicationImageSetFragment | null; + media: Array; + attributes: Array | null; + encryptionInput: { + encryptionKey: string; + encryptedFields: { + content: string | null; + image: string | null; + animationUrl: string | null; + externalUrl: string | null; + media: Array<{ + url: string; + mimeType: string | null; + altTag: string | null; + cover: string | null; + }> | null; + }; + accessCondition: + | AndConditionFragment + | CollectConditionFragment + | EoaOwnershipConditionFragment + | Erc20OwnershipConditionFragment + | FollowConditionFragment + | NftOwnershipConditionFragment + | OrConditionFragment + | ProfileOwnershipConditionFragment; + } | null; +}; + +export type VideoMetadataV1Fragment = { + id: string; + rawURL: string; + content: string | null; + locale: string; + tags: Array | null; + contentWarning: Types.PublicationContentWarning | null; + hideFromFeed: boolean; + globalReach: boolean; + appId: string | null; + videoMainContentFocus: Types.VideoMetadataV1MainFocus; + video: MetadataMediaVideoFragment; + marketplace: MarketplaceMetadataFragment | null; + attachments: Array< + MetadataMediaAudioFragment | MetadataMediaImageFragment | MetadataMediaVideoFragment + > | null; + encryptedWith: MetadataV3LitEncryptionFragment | {} | null; +}; + export type PostFragment = { id: string; isHidden: boolean; isGated: boolean; createdAt: string; by: ProfileFieldsFragment; + metadata: MetadataV2Fragment | VideoMetadataV1Fragment | {}; + openActionModules: Array< + | LegacyAaveFeeCollectModuleSettingsFragment + | LegacyErc4626FeeCollectModuleSettingsFragment + | LegacyFeeCollectModuleSettingsFragment + | LegacyFreeCollectModuleSettingsFragment + | LegacyLimitedFeeCollectModuleSettingsFragment + | LegacyLimitedTimedFeeCollectModuleSettingsFragment + | LegacyMultirecipientFeeCollectModuleSettingsFragment + | LegacyRevertCollectModuleSettingsFragment + | LegacySimpleCollectModuleSettingsFragment + | LegacyTimedFeeCollectModuleSettingsFragment + | MultirecipientFeeCollectOpenActionSettingsFragment + | SimpleCollectOpenActionSettingsFragment + | UnknownOpenActionSettingsFragment + >; + referenceModule: + | DegreesOfSeparationReferenceModuleSettingsFragment + | FollowOnlyReferenceModuleSettingsFragment + | UnknownReferenceModuleSettingsFragment + | null; publishedOn: AppFragment | null; momoka: MomokaInfoFragment | null; + operations: PublicationOperationsFragment | null; }; export type CommentBaseFragment = { @@ -131,8 +482,29 @@ export type CommentBaseFragment = { isGated: boolean; createdAt: string; by: ProfileFieldsFragment; + openActionModules: Array< + | LegacyAaveFeeCollectModuleSettingsFragment + | LegacyErc4626FeeCollectModuleSettingsFragment + | LegacyFeeCollectModuleSettingsFragment + | LegacyFreeCollectModuleSettingsFragment + | LegacyLimitedFeeCollectModuleSettingsFragment + | LegacyLimitedTimedFeeCollectModuleSettingsFragment + | LegacyMultirecipientFeeCollectModuleSettingsFragment + | LegacyRevertCollectModuleSettingsFragment + | LegacySimpleCollectModuleSettingsFragment + | LegacyTimedFeeCollectModuleSettingsFragment + | MultirecipientFeeCollectOpenActionSettingsFragment + | SimpleCollectOpenActionSettingsFragment + | UnknownOpenActionSettingsFragment + >; + referenceModule: + | DegreesOfSeparationReferenceModuleSettingsFragment + | FollowOnlyReferenceModuleSettingsFragment + | UnknownReferenceModuleSettingsFragment + | null; publishedOn: AppFragment | null; momoka: MomokaInfoFragment | null; + operations: PublicationOperationsFragment | null; }; export type CommentFragment = { @@ -155,8 +527,29 @@ export type QuoteBaseFragment = { isGated: boolean; createdAt: string; by: ProfileFieldsFragment; + openActionModules: Array< + | LegacyAaveFeeCollectModuleSettingsFragment + | LegacyErc4626FeeCollectModuleSettingsFragment + | LegacyFeeCollectModuleSettingsFragment + | LegacyFreeCollectModuleSettingsFragment + | LegacyLimitedFeeCollectModuleSettingsFragment + | LegacyLimitedTimedFeeCollectModuleSettingsFragment + | LegacyMultirecipientFeeCollectModuleSettingsFragment + | LegacyRevertCollectModuleSettingsFragment + | LegacySimpleCollectModuleSettingsFragment + | LegacyTimedFeeCollectModuleSettingsFragment + | MultirecipientFeeCollectOpenActionSettingsFragment + | SimpleCollectOpenActionSettingsFragment + | UnknownOpenActionSettingsFragment + >; + referenceModule: + | DegreesOfSeparationReferenceModuleSettingsFragment + | FollowOnlyReferenceModuleSettingsFragment + | UnknownReferenceModuleSettingsFragment + | null; publishedOn: AppFragment | null; momoka: MomokaInfoFragment | null; + operations: PublicationOperationsFragment | null; }; export type QuoteFragment = { @@ -166,7 +559,7 @@ export type QuoteFragment = { export const ImageFragmentDoc = gql` fragment Image on Image { url - mimeType + imageMimeType: mimeType width height } @@ -409,22 +802,745 @@ export const PaginatedResultInfoFragmentDoc = gql` next } `; +export const UnknownCollectModuleSettingsFragmentDoc = gql` + fragment UnknownCollectModuleSettings on UnknownCollectModuleSettings { + contract { + ...NetworkAddress + } + collectModuleReturnData + } + ${NetworkAddressFragmentDoc} +`; export const MomokaInfoFragmentDoc = gql` fragment MomokaInfo on MomokaInfo { proof } `; +export const PublicationImageSetFragmentDoc = gql` + fragment PublicationImageSet on ImageSet { + rawURL + media { + ...Image + } + altTag + transformed(input: $publicationImageTransform) { + ...Image + } + } + ${ImageFragmentDoc} +`; +export const VideoFragmentDoc = gql` + fragment Video on Video { + url + videoMimeType: mimeType + } +`; +export const VideoSetFragmentDoc = gql` + fragment VideoSet on VideoSet { + rawURL + media { + ...Video + } + altTag + } + ${VideoFragmentDoc} +`; +export const AudioFragmentDoc = gql` + fragment Audio on Audio { + url + audioMimeType: mimeType + } +`; +export const AudioSetFragmentDoc = gql` + fragment AudioSet on AudioSet { + rawURL + media { + ...Audio + } + } + ${AudioFragmentDoc} +`; +export const MarketplaceMetadataAttributeFragmentDoc = gql` + fragment MarketplaceMetadataAttribute on MarketplaceMetadataAttribute { + displayType + traitType + value + } +`; +export const NftOwnershipConditionFragmentDoc = gql` + fragment NftOwnershipCondition on NftOwnershipCondition { + contract { + ...NetworkAddress + } + contractType + tokenIds + } + ${NetworkAddressFragmentDoc} +`; +export const Erc20OwnershipConditionFragmentDoc = gql` + fragment Erc20OwnershipCondition on Erc20OwnershipCondition { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + condition + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const EoaOwnershipConditionFragmentDoc = gql` + fragment EoaOwnershipCondition on EoaOwnershipCondition { + address + } +`; +export const ProfileOwnershipConditionFragmentDoc = gql` + fragment ProfileOwnershipCondition on ProfileOwnershipCondition { + profileId + } +`; +export const FollowConditionFragmentDoc = gql` + fragment FollowCondition on FollowCondition { + profileId + } +`; +export const CollectConditionFragmentDoc = gql` + fragment CollectCondition on CollectCondition { + publicationId + thisPublication + } +`; +export const AndConditionFragmentDoc = gql` + fragment AndCondition on AndCondition { + criteria { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + } + } + ${NftOwnershipConditionFragmentDoc} + ${Erc20OwnershipConditionFragmentDoc} + ${EoaOwnershipConditionFragmentDoc} + ${ProfileOwnershipConditionFragmentDoc} + ${FollowConditionFragmentDoc} + ${CollectConditionFragmentDoc} +`; +export const OrConditionFragmentDoc = gql` + fragment OrCondition on OrCondition { + criteria { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + } + } + ${NftOwnershipConditionFragmentDoc} + ${Erc20OwnershipConditionFragmentDoc} + ${EoaOwnershipConditionFragmentDoc} + ${ProfileOwnershipConditionFragmentDoc} + ${FollowConditionFragmentDoc} + ${CollectConditionFragmentDoc} +`; +export const MetadataV2FragmentDoc = gql` + fragment MetadataV2 on MetadataV2 { + name + description + content + image { + ...PublicationImageSet + } + media { + ... on VideoSet { + ...VideoSet + } + ... on AudioSet { + ...AudioSet + } + ... on ImageSet { + ...PublicationImageSet + } + } + attributes { + ...MarketplaceMetadataAttribute + } + locale + tags + contentWarning + v2mainContentFocus: mainContentFocus + animationUrl + encryptionInput { + encryptionKey + encryptedFields { + content + image + media { + url + mimeType + altTag + cover + } + animationUrl + externalUrl + } + accessCondition { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + ... on AndCondition { + ...AndCondition + } + ... on OrCondition { + ...OrCondition + } + } + } + } + ${PublicationImageSetFragmentDoc} + ${VideoSetFragmentDoc} + ${AudioSetFragmentDoc} + ${MarketplaceMetadataAttributeFragmentDoc} + ${NftOwnershipConditionFragmentDoc} + ${Erc20OwnershipConditionFragmentDoc} + ${EoaOwnershipConditionFragmentDoc} + ${ProfileOwnershipConditionFragmentDoc} + ${FollowConditionFragmentDoc} + ${CollectConditionFragmentDoc} + ${AndConditionFragmentDoc} + ${OrConditionFragmentDoc} +`; +export const MetadataMediaVideoFragmentDoc = gql` + fragment MetadataMediaVideo on MetadataMediaVideo { + videoMimeType: type + videoItem: item { + ...VideoSet + } + cover { + ...PublicationImageSet + } + duration + license + } + ${VideoSetFragmentDoc} + ${PublicationImageSetFragmentDoc} +`; +export const MarketplaceMetadataFragmentDoc = gql` + fragment MarketplaceMetadata on MarketplaceMetadata { + description + externalUrl + name + attributes { + ...MarketplaceMetadataAttribute + } + image + animationUrl + } + ${MarketplaceMetadataAttributeFragmentDoc} +`; +export const MetadataMediaImageFragmentDoc = gql` + fragment MetadataMediaImage on MetadataMediaImage { + imageMimeType: type + imageItem: item { + ...PublicationImageSet + } + license + } + ${PublicationImageSetFragmentDoc} +`; +export const MetadataMediaAudioFragmentDoc = gql` + fragment MetadataMediaAudio on MetadataMediaAudio { + audioMimeType: type + audioItem: item { + ...AudioSet + } + cover { + ...PublicationImageSet + } + duration + license + credits + artist + genre + recordLabel + audioType + lyrics + } + ${AudioSetFragmentDoc} + ${PublicationImageSetFragmentDoc} +`; +export const MetadataV3LitEncryptionFragmentDoc = gql` + fragment MetadataV3LitEncryption on MetadataV3LitEncryption { + encryptionKey + accessCondition { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + ... on AndCondition { + ...AndCondition + } + ... on OrCondition { + ...OrCondition + } + } + } + ${NftOwnershipConditionFragmentDoc} + ${Erc20OwnershipConditionFragmentDoc} + ${EoaOwnershipConditionFragmentDoc} + ${ProfileOwnershipConditionFragmentDoc} + ${FollowConditionFragmentDoc} + ${CollectConditionFragmentDoc} + ${AndConditionFragmentDoc} + ${OrConditionFragmentDoc} +`; +export const VideoMetadataV1FragmentDoc = gql` + fragment VideoMetadataV1 on VideoMetadataV1 { + id + rawURL + content + locale + tags + contentWarning + hideFromFeed + globalReach + appId + video { + ...MetadataMediaVideo + } + marketplace { + ...MarketplaceMetadata + } + videoMainContentFocus: mainContentFocus + attachments { + ... on MetadataMediaVideo { + ...MetadataMediaVideo + } + ... on MetadataMediaImage { + ...MetadataMediaImage + } + ... on MetadataMediaAudio { + ...MetadataMediaAudio + } + } + encryptedWith { + ... on MetadataV3LitEncryption { + ...MetadataV3LitEncryption + } + } + } + ${MetadataMediaVideoFragmentDoc} + ${MarketplaceMetadataFragmentDoc} + ${MetadataMediaImageFragmentDoc} + ${MetadataMediaAudioFragmentDoc} + ${MetadataV3LitEncryptionFragmentDoc} +`; +export const LegacyFreeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyFreeCollectModuleSettings on LegacyFreeCollectModuleSettings { + contract { + ...NetworkAddress + } + followerOnly + } + ${NetworkAddressFragmentDoc} +`; +export const LegacyFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyFeeCollectModuleSettings on LegacyFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacyLimitedFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyLimitedFeeCollectModuleSettings on LegacyLimitedFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + collectLimit + amount { + ...Amount + } + recipient + referralFee + followerOnly + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacyLimitedTimedFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyLimitedTimedFeeCollectModuleSettings on LegacyLimitedTimedFeeCollectModuleSettings { + contract { + address + } + collectLimit + amount { + ...Amount + } + recipient + referralFee + followerOnly + endsAt + } + ${AmountFragmentDoc} +`; +export const LegacyRevertCollectModuleSettingsFragmentDoc = gql` + fragment LegacyRevertCollectModuleSettings on LegacyRevertCollectModuleSettings { + contract { + ...NetworkAddress + } + } + ${NetworkAddressFragmentDoc} +`; +export const LegacyTimedFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyTimedFeeCollectModuleSettings on LegacyTimedFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacyMultirecipientFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyMultirecipientFeeCollectModuleSettings on LegacyMultirecipientFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipients { + recipient + split + } + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacySimpleCollectModuleSettingsFragmentDoc = gql` + fragment LegacySimpleCollectModuleSettings on LegacySimpleCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacyErc4626FeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyERC4626FeeCollectModuleSettings on LegacyERC4626FeeCollectModuleSettings { + contract { + ...NetworkAddress + } + vault + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const LegacyAaveFeeCollectModuleSettingsFragmentDoc = gql` + fragment LegacyAaveFeeCollectModuleSettings on LegacyAaveFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const MultirecipientFeeCollectOpenActionSettingsFragmentDoc = gql` + fragment MultirecipientFeeCollectOpenActionSettings on MultirecipientFeeCollectOpenActionSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipients { + recipient + split + } + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const SimpleCollectOpenActionSettingsFragmentDoc = gql` + fragment SimpleCollectOpenActionSettings on SimpleCollectOpenActionSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt + } + ${NetworkAddressFragmentDoc} + ${AmountFragmentDoc} +`; +export const UnknownOpenActionSettingsFragmentDoc = gql` + fragment UnknownOpenActionSettings on UnknownOpenActionSettings { + contract { + ...NetworkAddress + } + openActionModuleReturnData + } + ${NetworkAddressFragmentDoc} +`; +export const FollowOnlyReferenceModuleSettingsFragmentDoc = gql` + fragment FollowOnlyReferenceModuleSettings on FollowOnlyReferenceModuleSettings { + contract { + ...NetworkAddress + } + } + ${NetworkAddressFragmentDoc} +`; +export const DegreesOfSeparationReferenceModuleSettingsFragmentDoc = gql` + fragment DegreesOfSeparationReferenceModuleSettings on DegreesOfSeparationReferenceModuleSettings { + contract { + ...NetworkAddress + } + commentsRestricted + mirrorsRestricted + degreesOfSeparation + } + ${NetworkAddressFragmentDoc} +`; +export const UnknownReferenceModuleSettingsFragmentDoc = gql` + fragment UnknownReferenceModuleSettings on UnknownReferenceModuleSettings { + contract { + ...NetworkAddress + } + referenceModuleReturnData + } + ${NetworkAddressFragmentDoc} +`; export const AppFragmentDoc = gql` fragment App on App { id } `; +export const CollectOpenActionResultFragmentDoc = gql` + fragment CollectOpenActionResult on CollectOpenActionResult { + type + } +`; +export const NftDropOpenActionFragmentDoc = gql` + fragment NftDropOpenAction on NftDropOpenAction { + tokenMinted + } +`; +export const UnknownOpenActionResultFragmentDoc = gql` + fragment UnknownOpenActionResult on UnknownOpenActionResult { + address + redeemData + } +`; +export const CanDecryptResponseFragmentDoc = gql` + fragment CanDecryptResponse on CanDecryptResponse { + result + reasons + extraDetails + } +`; +export const PublicationOperationsFragmentDoc = gql` + fragment PublicationOperations on PublicationOperations { + hasUpvoted: hasReacted(type: UPVOTE) + hasDownvoted: hasReacted(type: DOWNVOTE) + isNotInterested + hasBookmarked + hasActed { + ... on CollectOpenActionResult { + ...CollectOpenActionResult + } + ... on NftDropOpenAction { + ...NftDropOpenAction + } + ... on UnknownOpenActionResult { + ...UnknownOpenActionResult + } + } + canComment + canMirror + hasMirrored + canDecrypt { + ...CanDecryptResponse + } + } + ${CollectOpenActionResultFragmentDoc} + ${NftDropOpenActionFragmentDoc} + ${UnknownOpenActionResultFragmentDoc} + ${CanDecryptResponseFragmentDoc} +`; export const PostFragmentDoc = gql` fragment Post on Post { id by { ...ProfileFields } + metadata { + ... on MetadataV2 { + ...MetadataV2 + } + ... on VideoMetadataV1 { + ...VideoMetadataV1 + } + } + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -433,11 +1549,33 @@ export const PostFragmentDoc = gql` momoka { ...MomokaInfo } + operations(by: ProfileId) { + ...PublicationOperations + } createdAt } ${ProfileFieldsFragmentDoc} + ${MetadataV2FragmentDoc} + ${VideoMetadataV1FragmentDoc} + ${LegacyFreeCollectModuleSettingsFragmentDoc} + ${LegacyFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyRevertCollectModuleSettingsFragmentDoc} + ${LegacyTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyMultirecipientFeeCollectModuleSettingsFragmentDoc} + ${LegacySimpleCollectModuleSettingsFragmentDoc} + ${LegacyErc4626FeeCollectModuleSettingsFragmentDoc} + ${LegacyAaveFeeCollectModuleSettingsFragmentDoc} + ${MultirecipientFeeCollectOpenActionSettingsFragmentDoc} + ${SimpleCollectOpenActionSettingsFragmentDoc} + ${UnknownOpenActionSettingsFragmentDoc} + ${FollowOnlyReferenceModuleSettingsFragmentDoc} + ${DegreesOfSeparationReferenceModuleSettingsFragmentDoc} + ${UnknownReferenceModuleSettingsFragmentDoc} ${AppFragmentDoc} ${MomokaInfoFragmentDoc} + ${PublicationOperationsFragmentDoc} `; export const CommentBaseFragmentDoc = gql` fragment CommentBase on Comment { @@ -445,6 +1583,58 @@ export const CommentBaseFragmentDoc = gql` by { ...ProfileFields } + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -453,11 +1643,31 @@ export const CommentBaseFragmentDoc = gql` momoka { ...MomokaInfo } + operations(by: ProfileId) { + ...PublicationOperations + } createdAt } ${ProfileFieldsFragmentDoc} + ${LegacyFreeCollectModuleSettingsFragmentDoc} + ${LegacyFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyRevertCollectModuleSettingsFragmentDoc} + ${LegacyTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyMultirecipientFeeCollectModuleSettingsFragmentDoc} + ${LegacySimpleCollectModuleSettingsFragmentDoc} + ${LegacyErc4626FeeCollectModuleSettingsFragmentDoc} + ${LegacyAaveFeeCollectModuleSettingsFragmentDoc} + ${MultirecipientFeeCollectOpenActionSettingsFragmentDoc} + ${SimpleCollectOpenActionSettingsFragmentDoc} + ${UnknownOpenActionSettingsFragmentDoc} + ${FollowOnlyReferenceModuleSettingsFragmentDoc} + ${DegreesOfSeparationReferenceModuleSettingsFragmentDoc} + ${UnknownReferenceModuleSettingsFragmentDoc} ${AppFragmentDoc} ${MomokaInfoFragmentDoc} + ${PublicationOperationsFragmentDoc} `; export const QuoteBaseFragmentDoc = gql` fragment QuoteBase on Quote { @@ -465,6 +1675,58 @@ export const QuoteBaseFragmentDoc = gql` by { ...ProfileFields } + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -473,11 +1735,31 @@ export const QuoteBaseFragmentDoc = gql` momoka { ...MomokaInfo } + operations(by: ProfileId) { + ...PublicationOperations + } createdAt } ${ProfileFieldsFragmentDoc} + ${LegacyFreeCollectModuleSettingsFragmentDoc} + ${LegacyFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedFeeCollectModuleSettingsFragmentDoc} + ${LegacyLimitedTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyRevertCollectModuleSettingsFragmentDoc} + ${LegacyTimedFeeCollectModuleSettingsFragmentDoc} + ${LegacyMultirecipientFeeCollectModuleSettingsFragmentDoc} + ${LegacySimpleCollectModuleSettingsFragmentDoc} + ${LegacyErc4626FeeCollectModuleSettingsFragmentDoc} + ${LegacyAaveFeeCollectModuleSettingsFragmentDoc} + ${MultirecipientFeeCollectOpenActionSettingsFragmentDoc} + ${SimpleCollectOpenActionSettingsFragmentDoc} + ${UnknownOpenActionSettingsFragmentDoc} + ${FollowOnlyReferenceModuleSettingsFragmentDoc} + ${DegreesOfSeparationReferenceModuleSettingsFragmentDoc} + ${UnknownReferenceModuleSettingsFragmentDoc} ${AppFragmentDoc} ${MomokaInfoFragmentDoc} + ${PublicationOperationsFragmentDoc} `; export const CommentFragmentDoc = gql` fragment Comment on Comment { diff --git a/packages/client/src/graphql/fragments.graphql b/packages/client/src/graphql/fragments.graphql index 2ca66197bb..7e307f5a81 100644 --- a/packages/client/src/graphql/fragments.graphql +++ b/packages/client/src/graphql/fragments.graphql @@ -76,13 +76,40 @@ fragment NetworkAddress on NetworkAddress { chainId } +# media fragment Image on Image { url - mimeType + imageMimeType: mimeType width height } +fragment Video on Video { + url + videoMimeType: mimeType +} + +fragment VideoSet on VideoSet { + rawURL + media { + ...Video + } + altTag +} + +fragment Audio on Audio { + url + audioMimeType: mimeType +} + +fragment AudioSet on AudioSet { + rawURL + media { + ...Audio + } +} + +# profile fragment ProfileCoverSet on ImageSet { rawURL media { @@ -214,21 +241,652 @@ fragment MomokaInfo on MomokaInfo { proof } +# reference modules +fragment FollowOnlyReferenceModuleSettings on FollowOnlyReferenceModuleSettings { + contract { + ...NetworkAddress + } +} + +fragment DegreesOfSeparationReferenceModuleSettings on DegreesOfSeparationReferenceModuleSettings { + contract { + ...NetworkAddress + } + commentsRestricted + mirrorsRestricted + degreesOfSeparation +} + +fragment UnknownReferenceModuleSettings on UnknownReferenceModuleSettings { + contract { + ...NetworkAddress + } + referenceModuleReturnData +} + +# open action modules +fragment SimpleCollectOpenActionSettings on SimpleCollectOpenActionSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment MultirecipientFeeCollectOpenActionSettings on MultirecipientFeeCollectOpenActionSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipients { + recipient + split + } + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment UnknownOpenActionSettings on UnknownOpenActionSettings { + contract { + ...NetworkAddress + } + openActionModuleReturnData +} + +fragment LegacyFreeCollectModuleSettings on LegacyFreeCollectModuleSettings { + contract { + ...NetworkAddress + } + followerOnly +} + +fragment LegacyFeeCollectModuleSettings on LegacyFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly +} + +fragment LegacyLimitedFeeCollectModuleSettings on LegacyLimitedFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + collectLimit + amount { + ...Amount + } + recipient + referralFee + followerOnly +} + +fragment LegacyLimitedTimedFeeCollectModuleSettings on LegacyLimitedTimedFeeCollectModuleSettings { + contract { + address + } + collectLimit + amount { + ...Amount + } + recipient + referralFee + followerOnly + endsAt +} + +fragment LegacyRevertCollectModuleSettings on LegacyRevertCollectModuleSettings { + contract { + ...NetworkAddress + } +} + +fragment LegacyTimedFeeCollectModuleSettings on LegacyTimedFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + endsAt +} + +fragment LegacyMultirecipientFeeCollectModuleSettings on LegacyMultirecipientFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipients { + recipient + split + } + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment LegacySimpleCollectModuleSettings on LegacySimpleCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment LegacyERC4626FeeCollectModuleSettings on LegacyERC4626FeeCollectModuleSettings { + contract { + ...NetworkAddress + } + vault + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment LegacyAaveFeeCollectModuleSettings on LegacyAaveFeeCollectModuleSettings { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + recipient + referralFee + followerOnly + collectLimitOptional: collectLimit + endsAtOptional: endsAt +} + +fragment UnknownCollectModuleSettings on UnknownCollectModuleSettings { + contract { + ...NetworkAddress + } + collectModuleReturnData +} + +# open action results +fragment CollectOpenActionResult on CollectOpenActionResult { + type +} + +fragment NftDropOpenAction on NftDropOpenAction { + tokenMinted +} + +fragment UnknownOpenActionResult on UnknownOpenActionResult { + address + redeemData +} + +fragment CanDecryptResponse on CanDecryptResponse { + result + reasons + extraDetails +} + +fragment PublicationOperations on PublicationOperations { + hasUpvoted: hasReacted(type: UPVOTE) + hasDownvoted: hasReacted(type: DOWNVOTE) + isNotInterested + hasBookmarked + hasActed { + ... on CollectOpenActionResult { + ...CollectOpenActionResult + } + ... on NftDropOpenAction { + ...NftDropOpenAction + } + ... on UnknownOpenActionResult { + ...UnknownOpenActionResult + } + } + canComment + canMirror + hasMirrored + canDecrypt { + ...CanDecryptResponse + } +} + +# gated content +fragment MetadataV3LitEncryption on MetadataV3LitEncryption { + encryptionKey + accessCondition { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + ... on AndCondition { + ...AndCondition + } + ... on OrCondition { + ...OrCondition + } + } +} + +fragment NftOwnershipCondition on NftOwnershipCondition { + contract { + ...NetworkAddress + } + contractType + tokenIds +} + +fragment Erc20OwnershipCondition on Erc20OwnershipCondition { + contract { + ...NetworkAddress + } + amount { + ...Amount + } + condition +} + +fragment EoaOwnershipCondition on EoaOwnershipCondition { + address +} + +fragment ProfileOwnershipCondition on ProfileOwnershipCondition { + profileId +} + +fragment FollowCondition on FollowCondition { + profileId +} + +fragment CollectCondition on CollectCondition { + publicationId + thisPublication +} + +fragment AndCondition on AndCondition { + criteria { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + } +} + +fragment OrCondition on OrCondition { + criteria { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + } +} + +# publication metadata +fragment PublicationImageSet on ImageSet { + rawURL + media { + ...Image + } + altTag + transformed(input: $publicationImageTransform) { + ...Image + } +} + +fragment MarketplaceMetadataAttribute on MarketplaceMetadataAttribute { + displayType + traitType + value +} + +fragment MarketplaceMetadata on MarketplaceMetadata { + description + externalUrl + name + attributes { + ...MarketplaceMetadataAttribute + } + image + animationUrl +} + +fragment MetadataMediaVideo on MetadataMediaVideo { + videoMimeType: type + videoItem: item { + ...VideoSet + } + cover { + ...PublicationImageSet + } + duration + license +} + +fragment MetadataMediaImage on MetadataMediaImage { + imageMimeType: type + imageItem: item { + ...PublicationImageSet + } + license +} + +fragment MetadataMediaAudio on MetadataMediaAudio { + audioMimeType: type + audioItem: item { + ...AudioSet + } + cover { + ...PublicationImageSet + } + duration + license + credits + artist + genre + recordLabel + audioType + lyrics +} + +fragment MetadataV2 on MetadataV2 { + name + description + content + image { + ...PublicationImageSet + } + media { + ... on VideoSet { + ...VideoSet + } + ... on AudioSet { + ...AudioSet + } + ... on ImageSet { + ...PublicationImageSet + } + } + attributes { + ...MarketplaceMetadataAttribute + } + locale + tags + contentWarning + v2mainContentFocus: mainContentFocus + animationUrl + encryptionInput { + encryptionKey + encryptedFields { + content + image + media { + url + mimeType + altTag + cover + } + animationUrl + externalUrl + } + accessCondition { + ... on NftOwnershipCondition { + ...NftOwnershipCondition + } + ... on Erc20OwnershipCondition { + ...Erc20OwnershipCondition + } + ... on EoaOwnershipCondition { + ...EoaOwnershipCondition + } + ... on ProfileOwnershipCondition { + ...ProfileOwnershipCondition + } + ... on FollowCondition { + ...FollowCondition + } + ... on CollectCondition { + ...CollectCondition + } + ... on AndCondition { + ...AndCondition + } + ... on OrCondition { + ...OrCondition + } + } + } +} + +fragment VideoMetadataV1 on VideoMetadataV1 { + id + rawURL + content + locale + tags + contentWarning + hideFromFeed + globalReach + appId + video { + ...MetadataMediaVideo + } + marketplace { + ...MarketplaceMetadata + } + videoMainContentFocus: mainContentFocus + attachments { + ... on MetadataMediaVideo { + ...MetadataMediaVideo + } + ... on MetadataMediaImage { + ...MetadataMediaImage + } + ... on MetadataMediaAudio { + ...MetadataMediaAudio + } + } + encryptedWith { + ... on MetadataV3LitEncryption { + ...MetadataV3LitEncryption + } + } +} + +# union PublicationMetadata = +# MetadataV2 +# | VideoMetadataV1 +# | ImageMetadataV1 +# | ArticleMetadataV1 +# | EventMetadataV1 +# | LinkMetadataV1 +# | EmbedMetadataV1 +# | CheckingInMetadataV1 +# | TextOnlyMetadataV1 +# | ThreeDMetadataV1 +# | StoryMetadataV1 +# | TransactionMetadataV1 +# | MintMetadataV1 +# | SpaceMetadataV1 +# | LiveStreamMetadataV1 +# | FutureProofMetadata + +# publication fragments fragment Post on Post { id by { ...ProfileFields } - # The metadata for the post - # metadata: PublicationMetadata! - - # # The open action module - # openActionModules: [OpenActionModule!] - - # # The reference module - # referenceModule: ReferenceModule + metadata { + ... on MetadataV2 { + ...MetadataV2 + } + ... on VideoMetadataV1 { + ...VideoMetadataV1 + } + # ... on ImageMetadataV1 { + # ...ImageMetadataV1 + # } + # ... on ArticleMetadataV1 { + # ...ArticleMetadataV1 + # } + # ... on EventMetadataV1 { + # ...EventMetadataV1 + # } + # ... on LinkMetadataV1 { + # ...LinkMetadataV1 + # } + # ... on EmbedMetadataV1 { + # ...EmbedMetadataV1 + # } + # ... on CheckingInMetadataV1 { + # ...CheckingInMetadataV1 + # } + # ... on TextOnlyMetadataV1 { + # ...TextOnlyMetadataV1 + # } + # ... on ThreeDMetadataV1 { + # ...ThreeDMetadataV1 + # } + # ... on StoryMetadataV1 { + # ...StoryMetadataV1 + # } + # ... on TransactionMetadataV1 { + # ...TransactionMetadataV1 + # } + # ... on MintMetadataV1 { + # ...MintMetadataV1 + # } + # ... on SpaceMetadataV1 { + # ...SpaceMetadataV1 + # } + # ... on LiveStreamMetadataV1 { + # ...LiveStreamMetadataV1 + # } + } + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -237,9 +895,9 @@ fragment Post on Post { momoka { ...MomokaInfo } - - # operations(by: ProfileId): PublicationOperations - + operations(by: ProfileId) { + ...PublicationOperations + } createdAt } @@ -252,12 +910,58 @@ fragment CommentBase on Comment { # The metadata for the post # metadata: PublicationMetadata! - # # The collect module - # openActionModules: [OpenActionModule!]! - - # # The reference module - # referenceModule: ReferenceModule - + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -266,9 +970,9 @@ fragment CommentBase on Comment { momoka { ...MomokaInfo } - - # operations(by: ProfileId): PublicationOperations - + operations(by: ProfileId) { + ...PublicationOperations + } createdAt } @@ -324,12 +1028,58 @@ fragment QuoteBase on Quote { # # The metadata for the post # metadata: PublicationMetadata! - # # The collect module - # openActionModules: [OpenActionModule!]! - - # # The reference module - # referenceModule: ReferenceModule - + openActionModules { + ... on LegacyFreeCollectModuleSettings { + ...LegacyFreeCollectModuleSettings + } + ... on LegacyFeeCollectModuleSettings { + ...LegacyFeeCollectModuleSettings + } + ... on LegacyLimitedFeeCollectModuleSettings { + ...LegacyLimitedFeeCollectModuleSettings + } + ... on LegacyLimitedTimedFeeCollectModuleSettings { + ...LegacyLimitedTimedFeeCollectModuleSettings + } + ... on LegacyRevertCollectModuleSettings { + ...LegacyRevertCollectModuleSettings + } + ... on LegacyTimedFeeCollectModuleSettings { + ...LegacyTimedFeeCollectModuleSettings + } + ... on LegacyMultirecipientFeeCollectModuleSettings { + ...LegacyMultirecipientFeeCollectModuleSettings + } + ... on LegacySimpleCollectModuleSettings { + ...LegacySimpleCollectModuleSettings + } + ... on LegacyERC4626FeeCollectModuleSettings { + ...LegacyERC4626FeeCollectModuleSettings + } + ... on LegacyAaveFeeCollectModuleSettings { + ...LegacyAaveFeeCollectModuleSettings + } + ... on MultirecipientFeeCollectOpenActionSettings { + ...MultirecipientFeeCollectOpenActionSettings + } + ... on SimpleCollectOpenActionSettings { + ...SimpleCollectOpenActionSettings + } + ... on UnknownOpenActionSettings { + ...UnknownOpenActionSettings + } + } + referenceModule { + ... on FollowOnlyReferenceModuleSettings { + ...FollowOnlyReferenceModuleSettings + } + ... on DegreesOfSeparationReferenceModuleSettings { + ...DegreesOfSeparationReferenceModuleSettings + } + ... on UnknownReferenceModuleSettings { + ...UnknownReferenceModuleSettings + } + } publishedOn { ...App } @@ -338,9 +1088,9 @@ fragment QuoteBase on Quote { momoka { ...MomokaInfo } - - # operations(by: ProfileId): PublicationOperations - + operations(by: ProfileId) { + ...PublicationOperations + } createdAt }