@ludo.ninja/api 3.2.13 → 3.2.16

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.
@@ -69,23 +69,15 @@ const handleTokenRefresh = (operation, forward, onErrorAuth) => {
69
69
  };
70
70
  const errorLink = (0, error_1.onError)(({ graphQLErrors, networkError, operation, forward }) => {
71
71
  const { authToken } = (0, cookies_1.getCookies)();
72
- if (graphQLErrors) {
73
- graphQLErrors.forEach(({ message, locations, path }) => console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`));
74
- for (const err of graphQLErrors) {
75
- if (err.message.includes("Auth token not found") && authToken) {
76
- return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
77
- }
78
- }
79
- }
80
- if (networkError) {
81
- console.warn(`[Network error]: ${networkError}`);
82
- if (networkError.message.includes("503")) {
83
- console.error(`[503 Service Unavailable]: ${networkError.message}`);
84
- }
85
- if (networkError.message.includes("401") && authToken) {
72
+ for (const err of graphQLErrors ?? []) {
73
+ if (err.message.includes("Auth token not found") && authToken) {
86
74
  return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
87
75
  }
88
76
  }
77
+ if (networkError && networkError.message.includes("401") && authToken) {
78
+ return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
79
+ }
80
+ return;
89
81
  });
90
82
  const authLink = (0, context_1.setContext)(async (operation, { headers }) => {
91
83
  const { authToken } = (0, cookies_1.getCookies)();
@@ -64,6 +64,14 @@ export type ICategoryInput = {
64
64
  name: Scalars['String'];
65
65
  matchingWords: Array<Maybe<Scalars['String']>>;
66
66
  };
67
+ export type ICommunityVoteDetails = {
68
+ projectId: Scalars['String'];
69
+ voteType: IVoteType;
70
+ avgUserRank?: Maybe<Scalars['Int']>;
71
+ avgWealth?: Maybe<Scalars['Int']>;
72
+ avgUserXps?: Maybe<Scalars['Int']>;
73
+ votesGeo?: Maybe<Array<IVotesGeolocation>>;
74
+ };
67
75
  export type IHoldersGeolocation = {
68
76
  country: Scalars['String'];
69
77
  holders: Scalars['Long'];
@@ -110,6 +118,7 @@ export type IMutation = {
110
118
  reactOnProject: Scalars['Boolean'];
111
119
  activateMonitoring: Scalars['Boolean'];
112
120
  subscribeOnAlerts: Scalars['Boolean'];
121
+ reconsiderProjectStatus: Scalars['Boolean'];
113
122
  };
114
123
  export type IMutationCreateBrandArgs = {
115
124
  input: IBrandInput;
@@ -177,6 +186,9 @@ export type IMutationActivateMonitoringArgs = {
177
186
  export type IMutationSubscribeOnAlertsArgs = {
178
187
  input: IAlertsSubscriptionInput;
179
188
  };
189
+ export type IMutationReconsiderProjectStatusArgs = {
190
+ input: IProjectReconsiderationInput;
191
+ };
180
192
  export type IOpportunitiesPage = {
181
193
  currentOpportunities?: Maybe<Array<Maybe<IOpportunity>>>;
182
194
  similarOpportunities?: Maybe<Array<Maybe<IOpportunity>>>;
@@ -321,10 +333,14 @@ export type IProject = {
321
333
  originalMediaUrl?: Maybe<Scalars['String']>;
322
334
  mediaUrl?: Maybe<Scalars['String']>;
323
335
  publisher?: Maybe<IPublisher>;
336
+ communityVoteDetails?: Maybe<Array<ICommunityVoteDetails>>;
324
337
  };
325
338
  export type IProjectCommunityVote = {
326
339
  calculatedAt: Scalars['Long'];
327
340
  communityVote: Scalars['Int'];
341
+ likesRating?: Maybe<Scalars['Int']>;
342
+ neutralsRating?: Maybe<Scalars['Int']>;
343
+ dislikesRating?: Maybe<Scalars['Int']>;
328
344
  };
329
345
  export type IProjectMonitoring = {
330
346
  userId: Scalars['String'];
@@ -343,6 +359,10 @@ export type IProjectReactions = {
343
359
  neutrals: Scalars['Int'];
344
360
  dislikes: Scalars['Int'];
345
361
  };
362
+ export type IProjectReconsiderationInput = {
363
+ blockchain: Scalars['String'];
364
+ contract: Scalars['String'];
365
+ };
346
366
  export type IProjectRegistrationInput = {
347
367
  blockchain: Scalars['String'];
348
368
  contract: Scalars['String'];
@@ -439,10 +459,16 @@ export declare enum IReactionType {
439
459
  Dislike = "DISLIKE",
440
460
  Neutral = "NEUTRAL"
441
461
  }
462
+ export declare enum IVoteType {
463
+ Common = "COMMON",
464
+ Positive = "POSITIVE",
465
+ Neutral = "NEUTRAL",
466
+ Negative = "NEGATIVE"
467
+ }
442
468
  export type IVotesGeolocation = {
443
469
  country: Scalars['String'];
444
470
  votes: Scalars['Int'];
445
- votesPercentage: Scalars['Float'];
471
+ votesPercentage: Scalars['Int'];
446
472
  };
447
473
  export type ResolverTypeWrapper<T> = Promise<T> | T;
448
474
  export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
@@ -480,6 +506,8 @@ export type IResolversTypes = {
480
506
  BrandInput: IBrandInput;
481
507
  Category: ResolverTypeWrapper<ICategory>;
482
508
  CategoryInput: ICategoryInput;
509
+ CommunityVoteDetails: ResolverTypeWrapper<ICommunityVoteDetails>;
510
+ Int: ResolverTypeWrapper<Scalars['Int']>;
483
511
  HoldersGeolocation: ResolverTypeWrapper<IHoldersGeolocation>;
484
512
  Float: ResolverTypeWrapper<Scalars['Float']>;
485
513
  Long: ResolverTypeWrapper<Scalars['Long']>;
@@ -487,7 +515,6 @@ export type IResolversTypes = {
487
515
  Monitor: ResolverTypeWrapper<IMonitor>;
488
516
  MonitoringActivationInput: IMonitoringActivationInput;
489
517
  MonitorsCounter: ResolverTypeWrapper<IMonitorsCounter>;
490
- Int: ResolverTypeWrapper<Scalars['Int']>;
491
518
  Mutation: ResolverTypeWrapper<{}>;
492
519
  OpportunitiesPage: ResolverTypeWrapper<IOpportunitiesPage>;
493
520
  Opportunity: ResolverTypeWrapper<IOpportunity>;
@@ -500,6 +527,7 @@ export type IResolversTypes = {
500
527
  ProjectMonitoring: ResolverTypeWrapper<IProjectMonitoring>;
501
528
  ProjectReactionInput: IProjectReactionInput;
502
529
  ProjectReactions: ResolverTypeWrapper<IProjectReactions>;
530
+ ProjectReconsiderationInput: IProjectReconsiderationInput;
503
531
  ProjectRegistrationInput: IProjectRegistrationInput;
504
532
  ProjectRegistrationResult: ResolverTypeWrapper<IProjectRegistrationResult>;
505
533
  ProjectRegistrationStatus: IProjectRegistrationStatus;
@@ -508,6 +536,7 @@ export type IResolversTypes = {
508
536
  Publisher: ResolverTypeWrapper<IPublisher>;
509
537
  Query: ResolverTypeWrapper<{}>;
510
538
  ReactionType: IReactionType;
539
+ VoteType: IVoteType;
511
540
  VotesGeolocation: ResolverTypeWrapper<IVotesGeolocation>;
512
541
  };
513
542
  /** Mapping between all available schema types and the resolvers parents */
@@ -520,6 +549,8 @@ export type IResolversParentTypes = {
520
549
  BrandInput: IBrandInput;
521
550
  Category: ICategory;
522
551
  CategoryInput: ICategoryInput;
552
+ CommunityVoteDetails: ICommunityVoteDetails;
553
+ Int: Scalars['Int'];
523
554
  HoldersGeolocation: IHoldersGeolocation;
524
555
  Float: Scalars['Float'];
525
556
  Long: Scalars['Long'];
@@ -527,7 +558,6 @@ export type IResolversParentTypes = {
527
558
  Monitor: IMonitor;
528
559
  MonitoringActivationInput: IMonitoringActivationInput;
529
560
  MonitorsCounter: IMonitorsCounter;
530
- Int: Scalars['Int'];
531
561
  Mutation: {};
532
562
  OpportunitiesPage: IOpportunitiesPage;
533
563
  Opportunity: IOpportunity;
@@ -539,6 +569,7 @@ export type IResolversParentTypes = {
539
569
  ProjectMonitoring: IProjectMonitoring;
540
570
  ProjectReactionInput: IProjectReactionInput;
541
571
  ProjectReactions: IProjectReactions;
572
+ ProjectReconsiderationInput: IProjectReconsiderationInput;
542
573
  ProjectRegistrationInput: IProjectRegistrationInput;
543
574
  ProjectRegistrationResult: IProjectRegistrationResult;
544
575
  ProjectSnapshot: IProjectSnapshot;
@@ -575,6 +606,15 @@ export type ICategoryResolvers<ContextType = any, ParentType extends IResolversP
575
606
  name?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
576
607
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
577
608
  };
609
+ export type ICommunityVoteDetailsResolvers<ContextType = any, ParentType extends IResolversParentTypes['CommunityVoteDetails'] = IResolversParentTypes['CommunityVoteDetails']> = {
610
+ projectId?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
611
+ voteType?: Resolver<IResolversTypes['VoteType'], ParentType, ContextType>;
612
+ avgUserRank?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
613
+ avgWealth?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
614
+ avgUserXps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
615
+ votesGeo?: Resolver<Maybe<Array<IResolversTypes['VotesGeolocation']>>, ParentType, ContextType>;
616
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
617
+ };
578
618
  export type IHoldersGeolocationResolvers<ContextType = any, ParentType extends IResolversParentTypes['HoldersGeolocation'] = IResolversParentTypes['HoldersGeolocation']> = {
579
619
  country?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
580
620
  holders?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
@@ -624,6 +664,7 @@ export type IMutationResolvers<ContextType = any, ParentType extends IResolversP
624
664
  reactOnProject?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationReactOnProjectArgs, 'input'>>;
625
665
  activateMonitoring?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationActivateMonitoringArgs, 'input'>>;
626
666
  subscribeOnAlerts?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationSubscribeOnAlertsArgs, 'input'>>;
667
+ reconsiderProjectStatus?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IMutationReconsiderProjectStatusArgs, 'input'>>;
627
668
  };
628
669
  export type IOpportunitiesPageResolvers<ContextType = any, ParentType extends IResolversParentTypes['OpportunitiesPage'] = IResolversParentTypes['OpportunitiesPage']> = {
629
670
  currentOpportunities?: Resolver<Maybe<Array<Maybe<IResolversTypes['Opportunity']>>>, ParentType, ContextType>;
@@ -744,11 +785,15 @@ export type IProjectResolvers<ContextType = any, ParentType extends IResolversPa
744
785
  originalMediaUrl?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
745
786
  mediaUrl?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
746
787
  publisher?: Resolver<Maybe<IResolversTypes['Publisher']>, ParentType, ContextType>;
788
+ communityVoteDetails?: Resolver<Maybe<Array<IResolversTypes['CommunityVoteDetails']>>, ParentType, ContextType>;
747
789
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
748
790
  };
749
791
  export type IProjectCommunityVoteResolvers<ContextType = any, ParentType extends IResolversParentTypes['ProjectCommunityVote'] = IResolversParentTypes['ProjectCommunityVote']> = {
750
792
  calculatedAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
751
793
  communityVote?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
794
+ likesRating?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
795
+ neutralsRating?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
796
+ dislikesRating?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
752
797
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
753
798
  };
754
799
  export type IProjectMonitoringResolvers<ContextType = any, ParentType extends IResolversParentTypes['ProjectMonitoring'] = IResolversParentTypes['ProjectMonitoring']> = {
@@ -820,12 +865,13 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
820
865
  export type IVotesGeolocationResolvers<ContextType = any, ParentType extends IResolversParentTypes['VotesGeolocation'] = IResolversParentTypes['VotesGeolocation']> = {
821
866
  country?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
822
867
  votes?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
823
- votesPercentage?: Resolver<IResolversTypes['Float'], ParentType, ContextType>;
868
+ votesPercentage?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
824
869
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
825
870
  };
826
871
  export type IResolvers<ContextType = any> = {
827
872
  Brand?: IBrandResolvers<ContextType>;
828
873
  Category?: ICategoryResolvers<ContextType>;
874
+ CommunityVoteDetails?: ICommunityVoteDetailsResolvers<ContextType>;
829
875
  HoldersGeolocation?: IHoldersGeolocationResolvers<ContextType>;
830
876
  Long?: GraphQLScalarType;
831
877
  LudoRankDifference?: ILudoRankDifferenceResolvers<ContextType>;
@@ -878,6 +924,10 @@ export type IReactOnProjectMutationVariables = Exact<{
878
924
  input: IProjectReactionInput;
879
925
  }>;
880
926
  export type IReactOnProjectMutation = Pick<IMutation, 'reactOnProject'>;
927
+ export type IReconsiderProjectStatusMutationVariables = Exact<{
928
+ input: IProjectReconsiderationInput;
929
+ }>;
930
+ export type IReconsiderProjectStatusMutation = Pick<IMutation, 'reconsiderProjectStatus'>;
881
931
  export type IRegisterForAirdropMutationVariables = Exact<{
882
932
  opportunityId: Scalars['String'];
883
933
  blockchain: Scalars['String'];
@@ -981,8 +1031,11 @@ export type IFetchProjectBySlugQuery = {
981
1031
  votesGeo?: Maybe<Array<Maybe<Pick<IVotesGeolocation, 'country' | 'votes' | 'votesPercentage'>>>>;
982
1032
  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'>>>>;
983
1033
  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'>>>>;
984
- communityVotes?: Maybe<Array<Maybe<Pick<IProjectCommunityVote, 'calculatedAt' | 'communityVote'>>>>;
1034
+ communityVotes?: Maybe<Array<Maybe<Pick<IProjectCommunityVote, 'calculatedAt' | 'communityVote' | 'likesRating' | 'neutralsRating' | 'dislikesRating'>>>>;
985
1035
  holdersGeo?: Maybe<Array<Maybe<Pick<IHoldersGeolocation, 'country' | 'holders' | 'percentage'>>>>;
1036
+ communityVoteDetails?: Maybe<Array<(Pick<ICommunityVoteDetails, 'projectId' | 'voteType' | 'avgUserRank' | 'avgWealth' | 'avgUserXps'> & {
1037
+ votesGeo?: Maybe<Array<Pick<IVotesGeolocation, 'country' | 'votes' | 'votesPercentage'>>>;
1038
+ })>>;
986
1039
  });
987
1040
  };
988
1041
  export type IFetchProjectMonitoringQueryVariables = Exact<{
@@ -1172,6 +1225,31 @@ export declare function useReactOnProjectMutation(baseOptions?: Apollo.MutationH
1172
1225
  export type ReactOnProjectMutationHookResult = ReturnType<typeof useReactOnProjectMutation>;
1173
1226
  export type ReactOnProjectMutationResult = Apollo.MutationResult<IReactOnProjectMutation>;
1174
1227
  export type ReactOnProjectMutationOptions = Apollo.BaseMutationOptions<IReactOnProjectMutation, IReactOnProjectMutationVariables>;
1228
+ export declare const ReconsiderProjectStatusDocument: Apollo.DocumentNode;
1229
+ export type IReconsiderProjectStatusMutationFn = Apollo.MutationFunction<IReconsiderProjectStatusMutation, IReconsiderProjectStatusMutationVariables>;
1230
+ /**
1231
+ * __useReconsiderProjectStatusMutation__
1232
+ *
1233
+ * To run a mutation, you first call `useReconsiderProjectStatusMutation` within a React component and pass it any options that fit your needs.
1234
+ * When your component renders, `useReconsiderProjectStatusMutation` returns a tuple that includes:
1235
+ * - A mutate function that you can call at any time to execute the mutation
1236
+ * - An object with fields that represent the current status of the mutation's execution
1237
+ *
1238
+ * @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;
1239
+ *
1240
+ * @example
1241
+ * const [reconsiderProjectStatusMutation, { data, loading, error }] = useReconsiderProjectStatusMutation({
1242
+ * variables: {
1243
+ * input: // value for 'input'
1244
+ * },
1245
+ * });
1246
+ */
1247
+ export declare function useReconsiderProjectStatusMutation(baseOptions?: Apollo.MutationHookOptions<IReconsiderProjectStatusMutation, IReconsiderProjectStatusMutationVariables>): Apollo.MutationTuple<IReconsiderProjectStatusMutation, Exact<{
1248
+ input: IProjectReconsiderationInput;
1249
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1250
+ export type ReconsiderProjectStatusMutationHookResult = ReturnType<typeof useReconsiderProjectStatusMutation>;
1251
+ export type ReconsiderProjectStatusMutationResult = Apollo.MutationResult<IReconsiderProjectStatusMutation>;
1252
+ export type ReconsiderProjectStatusMutationOptions = Apollo.BaseMutationOptions<IReconsiderProjectStatusMutation, IReconsiderProjectStatusMutationVariables>;
1175
1253
  export declare const RegisterForAirdropDocument: Apollo.DocumentNode;
1176
1254
  export type IRegisterForAirdropMutationFn = Apollo.MutationFunction<IRegisterForAirdropMutation, IRegisterForAirdropMutationVariables>;
1177
1255
  /**
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.useFetchProfileOpportunitiesLazyQuery = exports.useFetchProfileOpportunitiesQuery = exports.FetchProfileOpportunitiesDocument = exports.useFetchOpportunityBySlugLazyQuery = exports.useFetchOpportunityBySlugQuery = exports.FetchOpportunityBySlugDocument = exports.useFetchOpportunityLazyQuery = exports.useFetchOpportunityQuery = exports.FetchOpportunityDocument = exports.useFetchOpportunitiesLazyQuery = exports.useFetchOpportunitiesQuery = exports.FetchOpportunitiesDocument = exports.useFetchMonitorsCounterLazyQuery = exports.useFetchMonitorsCounterQuery = exports.FetchMonitorsCounterDocument = exports.useFetchBrandBySlugLazyQuery = exports.useFetchBrandBySlugQuery = exports.FetchBrandBySlugDocument = exports.useFetchOpportunitiesForProfileLazyQuery = exports.useFetchOpportunitiesForProfileQuery = exports.FetchOpportunitiesForProfileDocument = exports.useFetchOpportunitiesByIdsLazyQuery = exports.useFetchOpportunitiesByIdsQuery = exports.FetchOpportunitiesByIdsDocument = exports.useFetchAirdropRegistrationsCsvLazyQuery = exports.useFetchAirdropRegistrationsCsvQuery = exports.FetchAirdropRegistrationsCsvDocument = exports.useRegisterNewProjectMutation = exports.RegisterNewProjectDocument = exports.useRegisterForAirdrop2Mutation = exports.RegisterForAirdrop2Document = exports.useRegisterForAirdropMutation = exports.RegisterForAirdropDocument = exports.useReactOnProjectMutation = exports.ReactOnProjectDocument = exports.useOpenOpportunityMutation = exports.OpenOpportunityDocument = exports.useCreateOpportunityMutation = exports.CreateOpportunityDocument = exports.useCopyOpportunityShareLinkMutation = exports.CopyOpportunityShareLinkDocument = exports.useActivateMonitoringMutation = exports.ActivateMonitoringDocument = exports.useLikeOpportunityMutation = exports.LikeOpportunityDocument = exports.useDislikeOpportunityMutation = exports.DislikeOpportunityDocument = exports.IReactionType = exports.IProjectRegistrationStatus = exports.IOpportunityType = void 0;
27
- exports.useFetchProjectMonitoringLazyQuery = exports.useFetchProjectMonitoringQuery = exports.FetchProjectMonitoringDocument = exports.useFetchProjectBySlugLazyQuery = exports.useFetchProjectBySlugQuery = exports.FetchProjectBySlugDocument = exports.useFetchProjectLazyQuery = exports.useFetchProjectQuery = exports.FetchProjectDocument = void 0;
26
+ exports.useFetchOpportunityBySlugLazyQuery = exports.useFetchOpportunityBySlugQuery = exports.FetchOpportunityBySlugDocument = exports.useFetchOpportunityLazyQuery = exports.useFetchOpportunityQuery = exports.FetchOpportunityDocument = exports.useFetchOpportunitiesLazyQuery = exports.useFetchOpportunitiesQuery = exports.FetchOpportunitiesDocument = exports.useFetchMonitorsCounterLazyQuery = exports.useFetchMonitorsCounterQuery = exports.FetchMonitorsCounterDocument = exports.useFetchBrandBySlugLazyQuery = exports.useFetchBrandBySlugQuery = exports.FetchBrandBySlugDocument = exports.useFetchOpportunitiesForProfileLazyQuery = exports.useFetchOpportunitiesForProfileQuery = exports.FetchOpportunitiesForProfileDocument = exports.useFetchOpportunitiesByIdsLazyQuery = exports.useFetchOpportunitiesByIdsQuery = exports.FetchOpportunitiesByIdsDocument = exports.useFetchAirdropRegistrationsCsvLazyQuery = exports.useFetchAirdropRegistrationsCsvQuery = exports.FetchAirdropRegistrationsCsvDocument = exports.useRegisterNewProjectMutation = exports.RegisterNewProjectDocument = exports.useRegisterForAirdrop2Mutation = exports.RegisterForAirdrop2Document = exports.useRegisterForAirdropMutation = exports.RegisterForAirdropDocument = exports.useReconsiderProjectStatusMutation = exports.ReconsiderProjectStatusDocument = exports.useReactOnProjectMutation = exports.ReactOnProjectDocument = exports.useOpenOpportunityMutation = exports.OpenOpportunityDocument = exports.useCreateOpportunityMutation = exports.CreateOpportunityDocument = exports.useCopyOpportunityShareLinkMutation = exports.CopyOpportunityShareLinkDocument = exports.useActivateMonitoringMutation = exports.ActivateMonitoringDocument = exports.useLikeOpportunityMutation = exports.LikeOpportunityDocument = exports.useDislikeOpportunityMutation = exports.DislikeOpportunityDocument = exports.IVoteType = exports.IReactionType = exports.IProjectRegistrationStatus = exports.IOpportunityType = void 0;
27
+ exports.useFetchProjectMonitoringLazyQuery = exports.useFetchProjectMonitoringQuery = exports.FetchProjectMonitoringDocument = exports.useFetchProjectBySlugLazyQuery = exports.useFetchProjectBySlugQuery = exports.FetchProjectBySlugDocument = exports.useFetchProjectLazyQuery = exports.useFetchProjectQuery = exports.FetchProjectDocument = exports.useFetchProfileOpportunitiesLazyQuery = exports.useFetchProfileOpportunitiesQuery = exports.FetchProfileOpportunitiesDocument = void 0;
28
28
  const client_1 = require("@apollo/client");
29
29
  const Apollo = __importStar(require("@apollo/client"));
30
30
  var IOpportunityType;
@@ -45,6 +45,13 @@ var IReactionType;
45
45
  IReactionType["Dislike"] = "DISLIKE";
46
46
  IReactionType["Neutral"] = "NEUTRAL";
47
47
  })(IReactionType || (exports.IReactionType = IReactionType = {}));
48
+ var IVoteType;
49
+ (function (IVoteType) {
50
+ IVoteType["Common"] = "COMMON";
51
+ IVoteType["Positive"] = "POSITIVE";
52
+ IVoteType["Neutral"] = "NEUTRAL";
53
+ IVoteType["Negative"] = "NEGATIVE";
54
+ })(IVoteType || (exports.IVoteType = IVoteType = {}));
48
55
  exports.DislikeOpportunityDocument = (0, client_1.gql) `
49
56
  mutation DislikeOpportunity($opportunityId: String!) {
50
57
  dislikeOpportunity(opportunityId: $opportunityId)
@@ -227,6 +234,32 @@ function useReactOnProjectMutation(baseOptions) {
227
234
  return Apollo.useMutation(exports.ReactOnProjectDocument, baseOptions);
228
235
  }
229
236
  exports.useReactOnProjectMutation = useReactOnProjectMutation;
237
+ exports.ReconsiderProjectStatusDocument = (0, client_1.gql) `
238
+ mutation ReconsiderProjectStatus($input: ProjectReconsiderationInput!) {
239
+ reconsiderProjectStatus(input: $input)
240
+ }
241
+ `;
242
+ /**
243
+ * __useReconsiderProjectStatusMutation__
244
+ *
245
+ * To run a mutation, you first call `useReconsiderProjectStatusMutation` within a React component and pass it any options that fit your needs.
246
+ * When your component renders, `useReconsiderProjectStatusMutation` returns a tuple that includes:
247
+ * - A mutate function that you can call at any time to execute the mutation
248
+ * - An object with fields that represent the current status of the mutation's execution
249
+ *
250
+ * @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;
251
+ *
252
+ * @example
253
+ * const [reconsiderProjectStatusMutation, { data, loading, error }] = useReconsiderProjectStatusMutation({
254
+ * variables: {
255
+ * input: // value for 'input'
256
+ * },
257
+ * });
258
+ */
259
+ function useReconsiderProjectStatusMutation(baseOptions) {
260
+ return Apollo.useMutation(exports.ReconsiderProjectStatusDocument, baseOptions);
261
+ }
262
+ exports.useReconsiderProjectStatusMutation = useReconsiderProjectStatusMutation;
230
263
  exports.RegisterForAirdropDocument = (0, client_1.gql) `
231
264
  mutation RegisterForAirdrop($opportunityId: String!, $blockchain: String!, $address: String!) {
232
265
  registerForAirdrop(
@@ -1185,6 +1218,9 @@ exports.FetchProjectBySlugDocument = (0, client_1.gql) `
1185
1218
  communityVotes {
1186
1219
  calculatedAt
1187
1220
  communityVote
1221
+ likesRating
1222
+ neutralsRating
1223
+ dislikesRating
1188
1224
  }
1189
1225
  hideDiagrams
1190
1226
  holdersGeo {
@@ -1192,6 +1228,18 @@ exports.FetchProjectBySlugDocument = (0, client_1.gql) `
1192
1228
  holders
1193
1229
  percentage
1194
1230
  }
1231
+ communityVoteDetails {
1232
+ projectId
1233
+ voteType
1234
+ avgUserRank
1235
+ avgWealth
1236
+ avgUserXps
1237
+ votesGeo {
1238
+ country
1239
+ votes
1240
+ votesPercentage
1241
+ }
1242
+ }
1195
1243
  }
1196
1244
  }
1197
1245
  `;
package/build/index.d.ts CHANGED
@@ -775,6 +775,11 @@ declare const schema: {
775
775
  }>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined): import("@apollo/client").MutationTuple<opportunitiesSchema.IReactOnProjectMutation, opportunitiesSchema.Exact<{
776
776
  input: opportunitiesSchema.IProjectReactionInput;
777
777
  }>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>>;
778
+ useReconsiderProjectStatusMutation(baseOptions?: import("@apollo/client").MutationHookOptions<opportunitiesSchema.IReconsiderProjectStatusMutation, opportunitiesSchema.Exact<{
779
+ input: opportunitiesSchema.IProjectReconsiderationInput;
780
+ }>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>> | undefined): import("@apollo/client").MutationTuple<opportunitiesSchema.IReconsiderProjectStatusMutation, opportunitiesSchema.Exact<{
781
+ input: opportunitiesSchema.IProjectReconsiderationInput;
782
+ }>, import("@apollo/client").DefaultContext, import("@apollo/client").ApolloCache<any>>;
778
783
  useRegisterForAirdropMutation(baseOptions?: import("@apollo/client").MutationHookOptions<opportunitiesSchema.IRegisterForAirdropMutation, opportunitiesSchema.Exact<{
779
784
  opportunityId: string;
780
785
  blockchain: string;
@@ -904,6 +909,7 @@ declare const schema: {
904
909
  }>>;
905
910
  IProjectRegistrationStatus: typeof opportunitiesSchema.IProjectRegistrationStatus;
906
911
  IReactionType: typeof opportunitiesSchema.IReactionType;
912
+ IVoteType: typeof opportunitiesSchema.IVoteType;
907
913
  DislikeOpportunityDocument: import("graphql").DocumentNode;
908
914
  LikeOpportunityDocument: import("graphql").DocumentNode;
909
915
  ActivateMonitoringDocument: import("graphql").DocumentNode;
@@ -911,6 +917,7 @@ declare const schema: {
911
917
  CreateOpportunityDocument: import("graphql").DocumentNode;
912
918
  OpenOpportunityDocument: import("graphql").DocumentNode;
913
919
  ReactOnProjectDocument: import("graphql").DocumentNode;
920
+ ReconsiderProjectStatusDocument: import("graphql").DocumentNode;
914
921
  RegisterForAirdropDocument: import("graphql").DocumentNode;
915
922
  RegisterForAirdrop2Document: import("graphql").DocumentNode;
916
923
  RegisterNewProjectDocument: import("graphql").DocumentNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "3.2.13",
3
+ "version": "3.2.16",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -80,29 +80,17 @@ const handleTokenRefresh = (operation: any, forward: any, onErrorAuth?: () => vo
80
80
  const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) => {
81
81
  const { authToken } = getCookies();
82
82
 
83
- if (graphQLErrors) {
84
- graphQLErrors.forEach(({ message, locations, path }) =>
85
- console.warn(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`),
86
- );
87
-
88
- for (const err of graphQLErrors) {
89
- if (err.message.includes("Auth token not found") && authToken) {
90
- return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
91
- }
83
+ for (const err of graphQLErrors ?? []) {
84
+ if (err.message.includes("Auth token not found") && authToken) {
85
+ return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
92
86
  }
93
87
  }
94
88
 
95
- if (networkError) {
96
- console.warn(`[Network error]: ${networkError}`);
97
-
98
- if (networkError.message.includes("503")) {
99
- console.error(`[503 Service Unavailable]: ${networkError.message}`);
100
- }
101
-
102
- if (networkError.message.includes("401") && authToken) {
103
- return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
104
- }
89
+ if (networkError && networkError.message.includes("401") && authToken) {
90
+ return handleTokenRefresh(operation, forward).flatMap(() => forward(operation));
105
91
  }
92
+
93
+ return;
106
94
  });
107
95
 
108
96
  const authLink = setContext(async (operation, { headers }) => {