@ludo.ninja/api 3.2.21 → 3.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,12 @@ export type Scalars = {
19
19
  };
20
20
 
21
21
 
22
+ export type IAlertSubscription = {
23
+ userId: Scalars['String'];
24
+ projectId: Scalars['String'];
25
+ item: IProject;
26
+ };
27
+
22
28
  export type IAlertsSubscriptionInput = {
23
29
  blockchain: Scalars['String'];
24
30
  contract: Scalars['String'];
@@ -401,6 +407,14 @@ export type IProject = {
401
407
  shareLink?: Maybe<Scalars['String']>;
402
408
  };
403
409
 
410
+ export type IProjectAlerting = {
411
+ userId: Scalars['String'];
412
+ slotsFree: Scalars['Int'];
413
+ slotsLimit: Scalars['Int'];
414
+ activeUntil: Scalars['Long'];
415
+ subscriptions?: Maybe<Array<IAlertSubscription>>;
416
+ };
417
+
404
418
  export type IProjectCommunityVote = {
405
419
  calculatedAt: Scalars['Long'];
406
420
  communityVote: Scalars['Int'];
@@ -500,6 +514,7 @@ export type IQuery = {
500
514
  fetchProjectBySlug: IProject;
501
515
  fetchProject?: Maybe<IProject>;
502
516
  fetchProjectMonitoring?: Maybe<IProjectMonitoring>;
517
+ fetchProjectAlerting?: Maybe<IProjectAlerting>;
503
518
  fetchMonitorsCounter?: Maybe<IMonitorsCounter>;
504
519
  };
505
520
 
@@ -648,8 +663,9 @@ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs
648
663
 
649
664
  /** Mapping between all available schema types and the resolvers types */
650
665
  export type IResolversTypes = {
651
- AlertsSubscriptionInput: IAlertsSubscriptionInput;
666
+ AlertSubscription: ResolverTypeWrapper<IAlertSubscription>;
652
667
  String: ResolverTypeWrapper<Scalars['String']>;
668
+ AlertsSubscriptionInput: IAlertsSubscriptionInput;
653
669
  Brand: ResolverTypeWrapper<IBrand>;
654
670
  ID: ResolverTypeWrapper<Scalars['ID']>;
655
671
  Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
@@ -674,6 +690,7 @@ export type IResolversTypes = {
674
690
  OpportunityV2: ResolverTypeWrapper<IOpportunityV2>;
675
691
  ProfileOpportunities: ResolverTypeWrapper<IProfileOpportunities>;
676
692
  Project: ResolverTypeWrapper<IProject>;
693
+ ProjectAlerting: ResolverTypeWrapper<IProjectAlerting>;
677
694
  ProjectCommunityVote: ResolverTypeWrapper<IProjectCommunityVote>;
678
695
  ProjectLinkClickInput: IProjectLinkClickInput;
679
696
  ProjectMonitoring: ResolverTypeWrapper<IProjectMonitoring>;
@@ -694,8 +711,9 @@ export type IResolversTypes = {
694
711
 
695
712
  /** Mapping between all available schema types and the resolvers parents */
696
713
  export type IResolversParentTypes = {
697
- AlertsSubscriptionInput: IAlertsSubscriptionInput;
714
+ AlertSubscription: IAlertSubscription;
698
715
  String: Scalars['String'];
716
+ AlertsSubscriptionInput: IAlertsSubscriptionInput;
699
717
  Brand: IBrand;
700
718
  ID: Scalars['ID'];
701
719
  Boolean: Scalars['Boolean'];
@@ -718,6 +736,7 @@ export type IResolversParentTypes = {
718
736
  OpportunityV2: IOpportunityV2;
719
737
  ProfileOpportunities: IProfileOpportunities;
720
738
  Project: IProject;
739
+ ProjectAlerting: IProjectAlerting;
721
740
  ProjectCommunityVote: IProjectCommunityVote;
722
741
  ProjectLinkClickInput: IProjectLinkClickInput;
723
742
  ProjectMonitoring: IProjectMonitoring;
@@ -737,6 +756,13 @@ export type IOneOfDirectiveArgs = { };
737
756
 
738
757
  export type IOneOfDirectiveResolver<Result, Parent, ContextType = any, Args = IOneOfDirectiveArgs> = DirectiveResolverFn<Result, Parent, ContextType, Args>;
739
758
 
759
+ export type IAlertSubscriptionResolvers<ContextType = any, ParentType extends IResolversParentTypes['AlertSubscription'] = IResolversParentTypes['AlertSubscription']> = {
760
+ userId?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
761
+ projectId?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
762
+ item?: Resolver<IResolversTypes['Project'], ParentType, ContextType>;
763
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
764
+ };
765
+
740
766
  export type IBrandResolvers<ContextType = any, ParentType extends IResolversParentTypes['Brand'] = IResolversParentTypes['Brand']> = {
741
767
  brandId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
742
768
  name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
@@ -961,6 +987,15 @@ export type IProjectResolvers<ContextType = any, ParentType extends IResolversPa
961
987
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
962
988
  };
963
989
 
990
+ export type IProjectAlertingResolvers<ContextType = any, ParentType extends IResolversParentTypes['ProjectAlerting'] = IResolversParentTypes['ProjectAlerting']> = {
991
+ userId?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
992
+ slotsFree?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
993
+ slotsLimit?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
994
+ activeUntil?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
995
+ subscriptions?: Resolver<Maybe<Array<IResolversTypes['AlertSubscription']>>, ParentType, ContextType>;
996
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
997
+ };
998
+
964
999
  export type IProjectCommunityVoteResolvers<ContextType = any, ParentType extends IResolversParentTypes['ProjectCommunityVote'] = IResolversParentTypes['ProjectCommunityVote']> = {
965
1000
  calculatedAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
966
1001
  communityVote?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
@@ -1040,6 +1075,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
1040
1075
  fetchProjectBySlug?: Resolver<IResolversTypes['Project'], ParentType, ContextType, RequireFields<IQueryFetchProjectBySlugArgs, 'slug'>>;
1041
1076
  fetchProject?: Resolver<Maybe<IResolversTypes['Project']>, ParentType, ContextType, RequireFields<IQueryFetchProjectArgs, 'blockchain' | 'contract'>>;
1042
1077
  fetchProjectMonitoring?: Resolver<Maybe<IResolversTypes['ProjectMonitoring']>, ParentType, ContextType>;
1078
+ fetchProjectAlerting?: Resolver<Maybe<IResolversTypes['ProjectAlerting']>, ParentType, ContextType>;
1043
1079
  fetchMonitorsCounter?: Resolver<Maybe<IResolversTypes['MonitorsCounter']>, ParentType, ContextType>;
1044
1080
  };
1045
1081
 
@@ -1051,6 +1087,7 @@ export type IVotesGeolocationResolvers<ContextType = any, ParentType extends IRe
1051
1087
  };
1052
1088
 
1053
1089
  export type IResolvers<ContextType = any> = {
1090
+ AlertSubscription?: IAlertSubscriptionResolvers<ContextType>;
1054
1091
  Brand?: IBrandResolvers<ContextType>;
1055
1092
  Category?: ICategoryResolvers<ContextType>;
1056
1093
  CommunityVoteDetails?: ICommunityVoteDetailsResolvers<ContextType>;
@@ -1065,6 +1102,7 @@ export type IResolvers<ContextType = any> = {
1065
1102
  OpportunityV2?: IOpportunityV2Resolvers<ContextType>;
1066
1103
  ProfileOpportunities?: IProfileOpportunitiesResolvers<ContextType>;
1067
1104
  Project?: IProjectResolvers<ContextType>;
1105
+ ProjectAlerting?: IProjectAlertingResolvers<ContextType>;
1068
1106
  ProjectCommunityVote?: IProjectCommunityVoteResolvers<ContextType>;
1069
1107
  ProjectMonitoring?: IProjectMonitoringResolvers<ContextType>;
1070
1108
  ProjectReactions?: IProjectReactionsResolvers<ContextType>;
@@ -1171,6 +1209,13 @@ export type IRegisterNewProjectMutation = { registerNewProject: (
1171
1209
  & { project?: Maybe<Pick<IProject, 'contract' | 'name' | 'slug' | 'symbol' | 'verified'>> }
1172
1210
  ) };
1173
1211
 
1212
+ export type ISubscribeOnAlertsMutationVariables = Exact<{
1213
+ input: IAlertsSubscriptionInput;
1214
+ }>;
1215
+
1216
+
1217
+ export type ISubscribeOnAlertsMutation = Pick<IMutation, 'subscribeOnAlerts'>;
1218
+
1174
1219
  export type IFetchAirdropRegistrationsCsvQueryVariables = Exact<{
1175
1220
  opportunityId: Scalars['ID'];
1176
1221
  }>;
@@ -1242,13 +1287,27 @@ export type IFetchProjectQuery = { fetchProject?: Maybe<(
1242
1287
  & { status?: Maybe<Pick<IProjectStatus, 'monitored' | 'removalReason' | 'removalDate'>> }
1243
1288
  )> };
1244
1289
 
1290
+ export type IFetchProjectAlertingQueryVariables = Exact<{ [key: string]: never; }>;
1291
+
1292
+
1293
+ export type IFetchProjectAlertingQuery = { fetchProjectAlerting?: Maybe<(
1294
+ Pick<IProjectAlerting, 'userId' | 'slotsFree' | 'slotsLimit' | 'activeUntil'>
1295
+ & { subscriptions?: Maybe<Array<(
1296
+ Pick<IAlertSubscription, 'userId' | 'projectId'>
1297
+ & { item: (
1298
+ Pick<IProject, 'blockchain' | 'contract' | 'name' | 'slug' | 'symbol' | 'type' | 'ludoRank' | 'price' | 'verified' | 'mediaUrl' | 'originalMediaUrl'>
1299
+ & { ludoRankDifference?: Maybe<Pick<ILudoRankDifference, 'hourDifference' | 'dayDifference' | 'weekDifference'>> }
1300
+ ) }
1301
+ )>> }
1302
+ )> };
1303
+
1245
1304
  export type IFetchProjectBySlugQueryVariables = Exact<{
1246
1305
  slug: Scalars['String'];
1247
1306
  }>;
1248
1307
 
1249
1308
 
1250
1309
  export type IFetchProjectBySlugQuery = { fetchProjectBySlug: (
1251
- Pick<IProject, 'blockchain' | 'contract' | 'name' | 'slug' | 'symbol' | 'website' | 'twitter' | 'type' | 'ludoRank' | 'investors' | 'holders' | 'volume' | 'marketCap' | 'liquidity' | 'price' | 'twitterFollowers' | 'twitterSentiment' | 'verified' | 'mediaUrl' | 'originalMediaUrl' | 'shareLink' | 'userReaction' | 'communityVote' | 'hideDiagrams'>
1310
+ Pick<IProject, 'blockchain' | 'contract' | 'name' | 'slug' | 'symbol' | 'website' | 'twitter' | 'type' | 'ludoRank' | 'investors' | 'holders' | 'volume' | 'marketCap' | 'liquidity' | 'price' | 'twitterFollowers' | 'twitterSentiment' | 'verified' | 'mediaUrl' | 'originalMediaUrl' | 'alertsSubscriptionIsActive' | 'shareLink' | 'userReaction' | 'communityVote' | 'hideDiagrams'>
1252
1311
  & { publisher?: Maybe<Pick<IPublisher, 'userId' | 'username' | 'userpic' | 'rank'>>, status?: Maybe<Pick<IProjectStatus, 'monitored' | 'removalReason' | 'removalDate'>>, snapshots?: Maybe<Array<Maybe<Pick<IProjectSnapshot, 'date' | 'contract' | 'blockchain' | 'volume' | 'marketCap' | 'price' | 'liquidity' | 'xFollowers' | 'holders' | 'ludoRank'>>>>, reactions: Pick<IProjectReactions, 'likes' | 'neutrals' | 'dislikes'>, votesGeo?: Maybe<Array<Maybe<Pick<IVotesGeolocation, 'country' | 'votes' | 'votesPercentage'>>>>, airdrops?: Maybe<Array<Maybe<Pick<IOpportunityV2, 'opportunityId' | 'projectId' | 'categoryId' | 'opportunityStatus' | 'opportunityType' | 'notificationType' | 'name' | 'description' | 'categoryName' | 'ludoUrl' | 'projectUrl' | 'activeFrom' | 'activeUntil' | 'minXpLevel' | 'maxXpLevel' | 'minRank' | 'maxRank' | 'media' | 'reportLink' | 'clicks' | 'views' | 'blockchain' | 'blockchains' | 'collection' | 'createdAt' | 'minWalletValue' | 'maxWalletValue' | 'shareLink' | 'liked' | 'geolocations' | 'subscribed' | 'participantsLimit' | 'availablePlacesForAirdrop'>>>>, opportunities?: Maybe<Array<Maybe<Pick<IOpportunityV2, 'opportunityId' | 'projectId' | 'categoryId' | 'opportunityStatus' | 'opportunityType' | 'notificationType' | 'name' | 'description' | 'categoryName' | 'ludoUrl' | 'projectUrl' | 'activeFrom' | 'activeUntil' | 'minXpLevel' | 'maxXpLevel' | 'minRank' | 'maxRank' | 'media' | 'reportLink' | 'clicks' | 'views' | 'blockchain' | 'blockchains' | 'collection' | 'createdAt' | 'minWalletValue' | 'maxWalletValue' | 'shareLink' | 'liked' | 'geolocations' | 'subscribed' | 'participantsLimit' | 'availablePlacesForAirdrop'>>>>, communityVotes?: Maybe<Array<Maybe<Pick<IProjectCommunityVote, 'calculatedAt' | 'communityVote' | 'likesRating' | 'neutralsRating' | 'dislikesRating'>>>>, holdersGeo?: Maybe<Array<Maybe<Pick<IHoldersGeolocation, 'country' | 'holders' | 'percentage'>>>>, communityVoteDetails?: Maybe<Array<(
1253
1312
  Pick<ICommunityVoteDetails, 'projectId' | 'voteType' | 'avgUserRank' | 'avgWealth' | 'avgUserXps'>
1254
1313
  & { votesGeo?: Maybe<Array<Pick<IVotesGeolocation, 'country' | 'votes' | 'votesPercentage'>>> }
@@ -1651,6 +1710,36 @@ export function useRegisterNewProjectMutation(baseOptions?: Apollo.MutationHookO
1651
1710
  export type RegisterNewProjectMutationHookResult = ReturnType<typeof useRegisterNewProjectMutation>;
1652
1711
  export type RegisterNewProjectMutationResult = Apollo.MutationResult<IRegisterNewProjectMutation>;
1653
1712
  export type RegisterNewProjectMutationOptions = Apollo.BaseMutationOptions<IRegisterNewProjectMutation, IRegisterNewProjectMutationVariables>;
1713
+ export const SubscribeOnAlertsDocument = gql`
1714
+ mutation SubscribeOnAlerts($input: AlertsSubscriptionInput!) {
1715
+ subscribeOnAlerts(input: $input)
1716
+ }
1717
+ `;
1718
+ export type ISubscribeOnAlertsMutationFn = Apollo.MutationFunction<ISubscribeOnAlertsMutation, ISubscribeOnAlertsMutationVariables>;
1719
+
1720
+ /**
1721
+ * __useSubscribeOnAlertsMutation__
1722
+ *
1723
+ * To run a mutation, you first call `useSubscribeOnAlertsMutation` within a React component and pass it any options that fit your needs.
1724
+ * When your component renders, `useSubscribeOnAlertsMutation` returns a tuple that includes:
1725
+ * - A mutate function that you can call at any time to execute the mutation
1726
+ * - An object with fields that represent the current status of the mutation's execution
1727
+ *
1728
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
1729
+ *
1730
+ * @example
1731
+ * const [subscribeOnAlertsMutation, { data, loading, error }] = useSubscribeOnAlertsMutation({
1732
+ * variables: {
1733
+ * input: // value for 'input'
1734
+ * },
1735
+ * });
1736
+ */
1737
+ export function useSubscribeOnAlertsMutation(baseOptions?: Apollo.MutationHookOptions<ISubscribeOnAlertsMutation, ISubscribeOnAlertsMutationVariables>) {
1738
+ return Apollo.useMutation<ISubscribeOnAlertsMutation, ISubscribeOnAlertsMutationVariables>(SubscribeOnAlertsDocument, baseOptions);
1739
+ }
1740
+ export type SubscribeOnAlertsMutationHookResult = ReturnType<typeof useSubscribeOnAlertsMutation>;
1741
+ export type SubscribeOnAlertsMutationResult = Apollo.MutationResult<ISubscribeOnAlertsMutation>;
1742
+ export type SubscribeOnAlertsMutationOptions = Apollo.BaseMutationOptions<ISubscribeOnAlertsMutation, ISubscribeOnAlertsMutationVariables>;
1654
1743
  export const FetchAirdropRegistrationsCsvDocument = gql`
1655
1744
  query FetchAirdropRegistrationsCsv($opportunityId: ID!) {
1656
1745
  fetchAirdropRegistrationsCsv(opportunityId: $opportunityId)
@@ -2399,6 +2488,63 @@ export function useFetchProjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptio
2399
2488
  export type FetchProjectQueryHookResult = ReturnType<typeof useFetchProjectQuery>;
2400
2489
  export type FetchProjectLazyQueryHookResult = ReturnType<typeof useFetchProjectLazyQuery>;
2401
2490
  export type FetchProjectQueryResult = Apollo.QueryResult<IFetchProjectQuery, IFetchProjectQueryVariables>;
2491
+ export const FetchProjectAlertingDocument = gql`
2492
+ query FetchProjectAlerting {
2493
+ fetchProjectAlerting {
2494
+ userId
2495
+ slotsFree
2496
+ slotsLimit
2497
+ activeUntil
2498
+ subscriptions {
2499
+ userId
2500
+ projectId
2501
+ item {
2502
+ blockchain
2503
+ contract
2504
+ name
2505
+ slug
2506
+ symbol
2507
+ type
2508
+ ludoRank
2509
+ price
2510
+ verified
2511
+ mediaUrl
2512
+ originalMediaUrl
2513
+ ludoRankDifference {
2514
+ hourDifference
2515
+ dayDifference
2516
+ weekDifference
2517
+ }
2518
+ }
2519
+ }
2520
+ }
2521
+ }
2522
+ `;
2523
+
2524
+ /**
2525
+ * __useFetchProjectAlertingQuery__
2526
+ *
2527
+ * To run a query within a React component, call `useFetchProjectAlertingQuery` and pass it any options that fit your needs.
2528
+ * When your component renders, `useFetchProjectAlertingQuery` returns an object from Apollo Client that contains loading, error, and data properties
2529
+ * you can use to render your UI.
2530
+ *
2531
+ * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
2532
+ *
2533
+ * @example
2534
+ * const { data, loading, error } = useFetchProjectAlertingQuery({
2535
+ * variables: {
2536
+ * },
2537
+ * });
2538
+ */
2539
+ export function useFetchProjectAlertingQuery(baseOptions?: Apollo.QueryHookOptions<IFetchProjectAlertingQuery, IFetchProjectAlertingQueryVariables>) {
2540
+ return Apollo.useQuery<IFetchProjectAlertingQuery, IFetchProjectAlertingQueryVariables>(FetchProjectAlertingDocument, baseOptions);
2541
+ }
2542
+ export function useFetchProjectAlertingLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchProjectAlertingQuery, IFetchProjectAlertingQueryVariables>) {
2543
+ return Apollo.useLazyQuery<IFetchProjectAlertingQuery, IFetchProjectAlertingQueryVariables>(FetchProjectAlertingDocument, baseOptions);
2544
+ }
2545
+ export type FetchProjectAlertingQueryHookResult = ReturnType<typeof useFetchProjectAlertingQuery>;
2546
+ export type FetchProjectAlertingLazyQueryHookResult = ReturnType<typeof useFetchProjectAlertingLazyQuery>;
2547
+ export type FetchProjectAlertingQueryResult = Apollo.QueryResult<IFetchProjectAlertingQuery, IFetchProjectAlertingQueryVariables>;
2402
2548
  export const FetchProjectBySlugDocument = gql`
2403
2549
  query FetchProjectBySlug($slug: String!) {
2404
2550
  fetchProjectBySlug(slug: $slug) {
@@ -2422,6 +2568,7 @@ export const FetchProjectBySlugDocument = gql`
2422
2568
  verified
2423
2569
  mediaUrl
2424
2570
  originalMediaUrl
2571
+ alertsSubscriptionIsActive
2425
2572
  publisher {
2426
2573
  userId
2427
2574
  username