From 75fa6c4012b5e5039272b834ecd9d8080bb8e004 Mon Sep 17 00:00:00 2001 From: Yoginth Date: Sat, 21 Dec 2024 11:14:04 +0530 Subject: [PATCH] Migrate to Lens v3 --- packages/indexer/generated.ts | 268 ++++++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) diff --git a/packages/indexer/generated.ts b/packages/indexer/generated.ts index f9cc656265e..2711496d730 100644 --- a/packages/indexer/generated.ts +++ b/packages/indexer/generated.ts @@ -27,6 +27,7 @@ export type Scalars = { EvmAddress: { input: any; output: any; } GeneratedNotificationId: { input: any; output: any; } IdToken: { input: any; output: any; } + JSON: { input: any; output: any; } LegacyProfileId: { input: any; output: any; } LegacyPublicationId: { input: any; output: any; } LegacyRefreshToken: { input: any; output: any; } @@ -101,6 +102,16 @@ export type AccountBlocked = { blockedAt: Scalars['DateTime']['output']; }; +export type AccountBlockedNotificationAttributes = { + app?: InputMaybe; + graph?: InputMaybe; +}; + +export type AccountCreatedNotificationAttributes = { + app?: InputMaybe; + graph?: InputMaybe; +}; + export type AccountFeedsStats = { __typename?: 'AccountFeedsStats'; /** The total number of collects. */ @@ -126,6 +137,13 @@ export type AccountFeedsStatsRequest = { forFeeds?: Array; }; +export type AccountFollowedNotificationAttributes = { + app?: InputMaybe; + followedAccount?: InputMaybe; + follower?: InputMaybe; + graph?: InputMaybe; +}; + export type AccountGraphsFollowStats = { __typename?: 'AccountGraphsFollowStats'; /** The total number of followers. */ @@ -163,6 +181,11 @@ export type AccountManager = { permissions: AccountManagerPermissions; }; +export type AccountManagerAddedNotificationAttributes = { + managedAccount?: InputMaybe; + manager?: InputMaybe; +}; + export type AccountManagerChallengeRequest = { /** The address of the Lens Account. */ account: Scalars['EvmAddress']['input']; @@ -202,6 +225,16 @@ export type AccountManagerPermissionsInput = { canTransferTokens: Scalars['Boolean']['input']; }; +export type AccountManagerRemovedNotificationAttributes = { + managedAccount?: InputMaybe; + manager?: InputMaybe; +}; + +export type AccountManagerUpdatedNotificationAttributes = { + managedAccount?: InputMaybe; + manager?: InputMaybe; +}; + export type AccountManagersRequest = { /** The cursor. */ cursor?: InputMaybe; @@ -222,6 +255,14 @@ export type AccountMention = { replace: MentionReplace; }; +export type AccountMentionedNotificationAttributes = { + app?: InputMaybe; + author?: InputMaybe; + feed?: InputMaybe; + mentionedAccount?: InputMaybe; + mentionedUsername?: InputMaybe; +}; + export type AccountMetadata = { __typename?: 'AccountMetadata'; /** @@ -269,6 +310,10 @@ export type AccountOwnerChallengeRequest = { owner: Scalars['EvmAddress']['input']; }; +export type AccountOwnershipTransferredNotificationAttributes = { + account?: InputMaybe; +}; + export type AccountPostReaction = { __typename?: 'AccountPostReaction'; account: Account; @@ -281,6 +326,12 @@ export enum AccountReportReason { RepetitiveSpam = 'REPETITIVE_SPAM' } +export type AccountReportedNotificationAttributes = { + app?: InputMaybe; + reportedAccount?: InputMaybe; + reporter?: InputMaybe; +}; + export type AccountRequest = { /** The account address. */ address?: InputMaybe; @@ -309,11 +360,38 @@ export type AccountStatsRequest = { forGraphs?: Array; }; +export type AccountUnblockedNotificationAttributes = { + app?: InputMaybe; + graph?: InputMaybe; +}; + +export type AccountUnfollowedNotificationAttributes = { + app?: InputMaybe; + graph?: InputMaybe; + unfollowedAccount?: InputMaybe; + unfollower?: InputMaybe; +}; + +export type AccountUsernameAssignedNotificationAttributes = { + account?: InputMaybe; + namespace?: InputMaybe; +}; + +export type AccountUsernameCreatedNotificationAttributes = { + account?: InputMaybe; + namespace?: InputMaybe; +}; + export type AccountUsernameRequest = { /** The namespace to get account assigned username */ namespace?: Scalars['EvmAddress']['input']; }; +export type AccountUsernameUnassignedNotificationAttributes = { + namespace?: InputMaybe; + previousAccount?: InputMaybe; +}; + export type AccountsAvailableRequest = { /** The cursor. */ cursor?: InputMaybe; @@ -1093,6 +1171,22 @@ export type CreateRepostRequest = { post: Scalars['PostId']['input']; }; +export type CreateSnsSubscriptionRequest = { + /** The app to optionally assign this subscription to. */ + app?: InputMaybe; + /** + * The topics to subscribe to. You can subscribe to multiple topics at once. This cannot be + * changed once the subscription is created. + */ + topics: Array; + /** + * The webhook URL to send notifications to. It must be an HTTP or HTTPS URL that is + * accessible by the Lens API and is owned by you as it will be used to confirm the + * subscription. + */ + webhook: Scalars['String']['input']; +}; + export type CreateUnfollowRequest = { /** The account to unfollow. */ account: Scalars['EvmAddress']['input']; @@ -1170,6 +1264,10 @@ export type DeletePostResponse = { export type DeletePostResult = DeletePostResponse | SelfFundedTransactionRequest | SponsoredTransactionRequest | TransactionWillFail; +export type DeleteSnsSubscriptionRequest = { + id: Scalars['UUID']['input']; +}; + export type EditPostRequest = { contentUri: Scalars['URI']['input']; post: Scalars['PostId']['input']; @@ -1275,6 +1373,17 @@ export type EnableSignlessResult = SelfFundedTransactionRequest | SponsoredTrans export type EncryptionStrategy = LitProtocolEncryptionStrategy; +export type EntityId = { + account?: InputMaybe; + app?: InputMaybe; + feed?: InputMaybe; + graph?: InputMaybe; + group?: InputMaybe; + post?: InputMaybe; + sponsorship?: InputMaybe; + usernameNamespace?: InputMaybe; +}; + export enum EntityType { Account = 'ACCOUNT', App = 'APP', @@ -2062,6 +2171,14 @@ export type GenerateNewAppServerApiKeyRequest = { app: Scalars['EvmAddress']['input']; }; +export type GetSnsSubscriptionsRequest = { + /** + * The app to get subscriptions for. If not provided, all subscriptions owned by the logged in + * account will be returned. + */ + app?: InputMaybe; +}; + export type Graph = { __typename?: 'Graph'; address: Scalars['EvmAddress']['output']; @@ -2887,6 +3004,10 @@ export enum MediaImageType { XMsBmp = 'X_MS_BMP' } +export type MediaSnapshotNotificationAttributes = { + source?: InputMaybe; +}; + /** * MediaVideo * @@ -3072,6 +3193,10 @@ export enum MetadataLicenseType { TbnlNcNdPlLegal = 'TBNL_NC_ND_PL_LEGAL' } +export type MetadataSnapshotNotificationAttributes = { + source?: InputMaybe; +}; + export type MintMetadata = { __typename?: 'MintMetadata'; /** The other attachments you want to include with it. */ @@ -3240,6 +3365,7 @@ export type Mutation = { * You MUST be authenticated to use this mutation. */ createGroup: CreateGroupResult; + createSnsSubscriptions: Array; /** * Create a username. * @@ -3258,6 +3384,7 @@ export type Mutation = { * You MUST be authenticated as Account Owner or Account Manager to use this mutation. */ deletePost: DeletePostResult; + deleteSnsSubscription: Scalars['Void']['output']; /** * Edit a post. * @@ -3593,6 +3720,11 @@ export type MutationCreateGroupArgs = { }; +export type MutationCreateSnsSubscriptionsArgs = { + request: CreateSnsSubscriptionRequest; +}; + + export type MutationCreateUsernameArgs = { request: CreateUsernameRequest; }; @@ -3608,6 +3740,11 @@ export type MutationDeletePostArgs = { }; +export type MutationDeleteSnsSubscriptionArgs = { + request: DeleteSnsSubscriptionRequest; +}; + + export type MutationEditPostArgs = { request: EditPostRequest; }; @@ -4201,6 +4338,7 @@ export type Post = { quoteOf?: Maybe; root?: Maybe; rules: PostRulesConfig; + slug: Scalars['PostId']['output']; stats: PostStats; timestamp: Scalars['DateTime']['output']; }; @@ -4251,15 +4389,40 @@ export type PostBookmarksRequest = { pageSize?: PageSize; }; +export type PostCreatedNotificationAttributes = { + app?: InputMaybe; + author?: InputMaybe; + feed?: InputMaybe; + parentPostId?: InputMaybe; + postTypes?: InputMaybe>; +}; + +export type PostDeletedNotificationAttributes = { + app?: InputMaybe; + author?: InputMaybe; + feed?: InputMaybe; + parentPostId?: InputMaybe; + postTypes?: InputMaybe>; +}; + export type PostEdit = { __typename?: 'PostEdit'; metadata: PostMetadata; timestamp: Scalars['DateTime']['output']; }; +export type PostEditedNotificationAttributes = { + app?: InputMaybe; + author?: InputMaybe; + feed?: InputMaybe; + parentPostId?: InputMaybe; + postTypes?: InputMaybe>; +}; + export type PostEditsRequest = { cursor?: InputMaybe; pageSize?: PageSize; + /** The post ID. */ post: Scalars['PostId']['input']; }; @@ -4297,11 +4460,25 @@ export type PostReaction = { reaction: PostReactionType; }; +export type PostReactionAddedNotificationAttributes = { + app?: InputMaybe; + postId?: InputMaybe; + reactingAccount?: InputMaybe; + reactionType?: InputMaybe; +}; + export enum PostReactionOrderBy { AccountScore = 'ACCOUNT_SCORE', Default = 'DEFAULT' } +export type PostReactionRemovedNotificationAttributes = { + app?: InputMaybe; + postId?: InputMaybe; + reactingAccount?: InputMaybe; + reactionType?: InputMaybe; +}; + export type PostReactionStatus = { __typename?: 'PostReactionStatus'; account: Scalars['EvmAddress']['output']; @@ -4375,6 +4552,13 @@ export enum PostReportReason { Violence = 'VIOLENCE' } +export type PostReportedNotificationAttributes = { + app?: InputMaybe; + author?: InputMaybe; + feed?: InputMaybe; + reporter?: InputMaybe; +}; + /** You must provide either a txHash or a postId, not both. */ export type PostRequest = { /** The post ID. */ @@ -4541,6 +4725,7 @@ export type Query = { followers: PaginatedFollowersResult; followersYouKnow: PaginatedFollowersResult; following: PaginatedFollowingResult; + getSnsSubscriptions: Array; graph?: Maybe; /** Get the graphs. */ graphs: PaginatedGraphsResult; @@ -4731,6 +4916,11 @@ export type QueryFollowingArgs = { }; +export type QueryGetSnsSubscriptionsArgs = { + request: GetSnsSubscriptionsRequest; +}; + + export type QueryGraphArgs = { request: GraphRequest; }; @@ -4984,6 +5174,7 @@ export type Repost = { id: Scalars['PostId']['output']; isDeleted: Scalars['Boolean']['output']; repostOf: Post; + slug: Scalars['PostId']['output']; timestamp: Scalars['DateTime']['output']; }; @@ -5175,6 +5366,83 @@ export type SimplePaymentUsernameNamespaceRule = { rule: Scalars['EvmAddress']['output']; }; +export enum SnsNotificationType { + AccountBlocked = 'ACCOUNT_BLOCKED', + AccountContentConsumed = 'ACCOUNT_CONTENT_CONSUMED', + AccountCreated = 'ACCOUNT_CREATED', + AccountFollowed = 'ACCOUNT_FOLLOWED', + AccountFollowRulesUpdated = 'ACCOUNT_FOLLOW_RULES_UPDATED', + AccountManagerAdded = 'ACCOUNT_MANAGER_ADDED', + AccountManagerRemoved = 'ACCOUNT_MANAGER_REMOVED', + AccountManagerUpdated = 'ACCOUNT_MANAGER_UPDATED', + AccountMentioned = 'ACCOUNT_MENTIONED', + AccountMetadataUpdated = 'ACCOUNT_METADATA_UPDATED', + AccountOwnershipTransferred = 'ACCOUNT_OWNERSHIP_TRANSFERRED', + AccountReported = 'ACCOUNT_REPORTED', + AccountUnblocked = 'ACCOUNT_UNBLOCKED', + AccountUnfollowed = 'ACCOUNT_UNFOLLOWED', + AccountUsernameAssigned = 'ACCOUNT_USERNAME_ASSIGNED', + AccountUsernameCreated = 'ACCOUNT_USERNAME_CREATED', + AccountUsernameUnassigned = 'ACCOUNT_USERNAME_UNASSIGNED', + CommentCreated = 'COMMENT_CREATED', + MediaSnapshotError = 'MEDIA_SNAPSHOT_ERROR', + MediaSnapshotSuccess = 'MEDIA_SNAPSHOT_SUCCESS', + MetadataSnapshotError = 'METADATA_SNAPSHOT_ERROR', + MetadataSnapshotSuccess = 'METADATA_SNAPSHOT_SUCCESS', + MlProfileSignal = 'ML_PROFILE_SIGNAL', + PostActionCompleted = 'POST_ACTION_COMPLETED', + PostCollected = 'POST_COLLECTED', + PostCreated = 'POST_CREATED', + PostDeleted = 'POST_DELETED', + PostEdited = 'POST_EDITED', + PostReactionAdded = 'POST_REACTION_ADDED', + PostReactionRemoved = 'POST_REACTION_REMOVED', + PostReported = 'POST_REPORTED', + QuoteCreated = 'QUOTE_CREATED', + RepostCreated = 'REPOST_CREATED' +} + +export type SnsSubscription = { + __typename?: 'SnsSubscription'; + account: Scalars['EvmAddress']['output']; + app?: Maybe; + attributes: Scalars['JSON']['output']; + id: Scalars['UUID']['output']; + topic: SnsNotificationType; + topicArn: Scalars['String']['output']; + webhook: Scalars['URL']['output']; +}; + +export type SnsTopicInput = { + accountBlocked?: InputMaybe; + accountCreated?: InputMaybe; + accountFollowed?: InputMaybe; + accountManagerAdded?: InputMaybe; + accountManagerRemoved?: InputMaybe; + accountManagerUpdated?: InputMaybe; + accountMentioned?: InputMaybe; + accountOwnershipTransferred?: InputMaybe; + accountReported?: InputMaybe; + accountUnblocked?: InputMaybe; + accountUnfollowed?: InputMaybe; + accountUsernameAssigned?: InputMaybe; + accountUsernameCreated?: InputMaybe; + accountUsernameUnassigned?: InputMaybe; + commentCreated?: InputMaybe; + mediaSnapshotError?: InputMaybe; + mediaSnapshotSuccess?: InputMaybe; + metadataSnapshotError?: InputMaybe; + metadataSnapshotSuccess?: InputMaybe; + postCreated?: InputMaybe; + postDeleted?: InputMaybe; + postEdited?: InputMaybe; + postReactionAdded?: InputMaybe; + postReactionRemoved?: InputMaybe; + postReported?: InputMaybe; + quoteCreated?: InputMaybe; + repostCreated?: InputMaybe; +}; + export type SpaceMetadata = { __typename?: 'SpaceMetadata'; /** The other attachments you want to include with it. */