@ludo.ninja/api 2.8.55 → 2.8.57

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.
@@ -68,6 +68,17 @@ export type IInputSocial = {
68
68
  instagram?: Maybe<Scalars['String']>;
69
69
  website?: Maybe<Scalars['String']>;
70
70
  };
71
+ export type IInviteCode = {
72
+ inviteCode: Scalars['String'];
73
+ isUsed: Scalars['Boolean'];
74
+ maxUsagesLimit: Scalars['Int'];
75
+ codeUsers: Array<IInviteCodeUser>;
76
+ codeUsersNum: Scalars['Int'];
77
+ };
78
+ export type IInviteCodeUser = {
79
+ inviteeId: Scalars['ID'];
80
+ usedAt: Scalars['Long'];
81
+ };
71
82
  /** noinspection SpellCheckingInspection */
72
83
  export type IMultiversxAudit = {
73
84
  delegated?: Maybe<Scalars['Float']>;
@@ -213,6 +224,29 @@ export type IMyProfile = {
213
224
  levelMaxXps?: Maybe<Scalars['Int']>;
214
225
  inviteCodes?: Maybe<Array<Maybe<IUserInviteCode>>>;
215
226
  };
227
+ export type IMyProfileV2 = {
228
+ userId: Scalars['ID'];
229
+ username?: Maybe<Scalars['String']>;
230
+ about?: Maybe<Scalars['String']>;
231
+ userpic?: Maybe<Scalars['String']>;
232
+ following?: Maybe<Scalars['Boolean']>;
233
+ followings?: Maybe<Scalars['Int']>;
234
+ followers?: Maybe<Scalars['Int']>;
235
+ social?: Maybe<ISocial>;
236
+ views?: Maybe<Scalars['Int']>;
237
+ createdAt?: Maybe<Scalars['Long']>;
238
+ deletedAt?: Maybe<Scalars['Long']>;
239
+ visible?: Maybe<Scalars['Boolean']>;
240
+ deleted?: Maybe<Scalars['Boolean']>;
241
+ showNsfw?: Maybe<Scalars['Boolean']>;
242
+ rank?: Maybe<Scalars['Float']>;
243
+ wallets?: Maybe<Array<Maybe<IWallet>>>;
244
+ xps?: Maybe<Scalars['Int']>;
245
+ level?: Maybe<Scalars['Int']>;
246
+ levelMinXps?: Maybe<Scalars['Int']>;
247
+ levelMaxXps?: Maybe<Scalars['Int']>;
248
+ inviteCodes?: Maybe<Array<Maybe<IInviteCode>>>;
249
+ };
216
250
  export type IProfile = {
217
251
  userId: Scalars['ID'];
218
252
  username?: Maybe<Scalars['String']>;
@@ -240,6 +274,7 @@ export type IQuery = {
240
274
  isInviteCodeAvailable: Scalars['Boolean'];
241
275
  getMyInviteCodes: Array<IUserInviteCode>;
242
276
  fetchMyProfile: IMyProfile;
277
+ fetchMyProfileV2: IMyProfileV2;
243
278
  fetchProfile: IProfile;
244
279
  fetchFollowingStatus: IFollowingStatus;
245
280
  fetchFollowingStatuses: Array<Maybe<IFollowingStatus>>;
@@ -334,10 +369,13 @@ export type IResolversTypes = {
334
369
  Identity: ResolverTypeWrapper<IIdentity>;
335
370
  InputProfile: IInputProfile;
336
371
  InputSocial: IInputSocial;
372
+ InviteCode: ResolverTypeWrapper<IInviteCode>;
373
+ InviteCodeUser: ResolverTypeWrapper<IInviteCodeUser>;
337
374
  Long: ResolverTypeWrapper<Scalars['Long']>;
338
375
  MultiversxAudit: ResolverTypeWrapper<IMultiversxAudit>;
339
376
  Mutation: ResolverTypeWrapper<{}>;
340
377
  MyProfile: ResolverTypeWrapper<IMyProfile>;
378
+ MyProfileV2: ResolverTypeWrapper<IMyProfileV2>;
341
379
  Profile: ResolverTypeWrapper<IProfile>;
342
380
  Query: ResolverTypeWrapper<{}>;
343
381
  Role: IRole;
@@ -361,10 +399,13 @@ export type IResolversParentTypes = {
361
399
  Identity: IIdentity;
362
400
  InputProfile: IInputProfile;
363
401
  InputSocial: IInputSocial;
402
+ InviteCode: IInviteCode;
403
+ InviteCodeUser: IInviteCodeUser;
364
404
  Long: Scalars['Long'];
365
405
  MultiversxAudit: IMultiversxAudit;
366
406
  Mutation: {};
367
407
  MyProfile: IMyProfile;
408
+ MyProfileV2: IMyProfileV2;
368
409
  Profile: IProfile;
369
410
  Query: {};
370
411
  Social: ISocial;
@@ -431,6 +472,19 @@ export type IIdentityResolvers<ContextType = any, ParentType extends IResolversP
431
472
  inviteCode?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
432
473
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
433
474
  };
475
+ export type IInviteCodeResolvers<ContextType = any, ParentType extends IResolversParentTypes['InviteCode'] = IResolversParentTypes['InviteCode']> = {
476
+ inviteCode?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
477
+ isUsed?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType>;
478
+ maxUsagesLimit?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
479
+ codeUsers?: Resolver<Array<IResolversTypes['InviteCodeUser']>, ParentType, ContextType>;
480
+ codeUsersNum?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
481
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
482
+ };
483
+ export type IInviteCodeUserResolvers<ContextType = any, ParentType extends IResolversParentTypes['InviteCodeUser'] = IResolversParentTypes['InviteCodeUser']> = {
484
+ inviteeId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
485
+ usedAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
486
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
487
+ };
434
488
  export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
435
489
  name: 'Long';
436
490
  }
@@ -489,6 +543,30 @@ export type IMyProfileResolvers<ContextType = any, ParentType extends IResolvers
489
543
  inviteCodes?: Resolver<Maybe<Array<Maybe<IResolversTypes['UserInviteCode']>>>, ParentType, ContextType>;
490
544
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
491
545
  };
546
+ export type IMyProfileV2Resolvers<ContextType = any, ParentType extends IResolversParentTypes['MyProfileV2'] = IResolversParentTypes['MyProfileV2']> = {
547
+ userId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
548
+ username?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
549
+ about?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
550
+ userpic?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
551
+ following?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
552
+ followings?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
553
+ followers?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
554
+ social?: Resolver<Maybe<IResolversTypes['Social']>, ParentType, ContextType>;
555
+ views?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
556
+ createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
557
+ deletedAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
558
+ visible?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
559
+ deleted?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
560
+ showNsfw?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
561
+ rank?: Resolver<Maybe<IResolversTypes['Float']>, ParentType, ContextType>;
562
+ wallets?: Resolver<Maybe<Array<Maybe<IResolversTypes['Wallet']>>>, ParentType, ContextType>;
563
+ xps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
564
+ level?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
565
+ levelMinXps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
566
+ levelMaxXps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
567
+ inviteCodes?: Resolver<Maybe<Array<Maybe<IResolversTypes['InviteCode']>>>, ParentType, ContextType>;
568
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
569
+ };
492
570
  export type IProfileResolvers<ContextType = any, ParentType extends IResolversParentTypes['Profile'] = IResolversParentTypes['Profile']> = {
493
571
  userId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
494
572
  username?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
@@ -517,6 +595,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
517
595
  isInviteCodeAvailable?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IQueryIsInviteCodeAvailableArgs, 'inviteCode'>>;
518
596
  getMyInviteCodes?: Resolver<Array<IResolversTypes['UserInviteCode']>, ParentType, ContextType>;
519
597
  fetchMyProfile?: Resolver<IResolversTypes['MyProfile'], ParentType, ContextType>;
598
+ fetchMyProfileV2?: Resolver<IResolversTypes['MyProfileV2'], ParentType, ContextType>;
520
599
  fetchProfile?: Resolver<IResolversTypes['Profile'], ParentType, ContextType, RequireFields<IQueryFetchProfileArgs, 'userId'>>;
521
600
  fetchFollowingStatus?: Resolver<IResolversTypes['FollowingStatus'], ParentType, ContextType, RequireFields<IQueryFetchFollowingStatusArgs, 'userId'>>;
522
601
  fetchFollowingStatuses?: Resolver<Array<Maybe<IResolversTypes['FollowingStatus']>>, ParentType, ContextType, RequireFields<IQueryFetchFollowingStatusesArgs, 'userIds'>>;
@@ -560,10 +639,13 @@ export type IResolvers<ContextType = any> = {
560
639
  AuditNFTBalance?: IAuditNftBalanceResolvers<ContextType>;
561
640
  FollowingStatus?: IFollowingStatusResolvers<ContextType>;
562
641
  Identity?: IIdentityResolvers<ContextType>;
642
+ InviteCode?: IInviteCodeResolvers<ContextType>;
643
+ InviteCodeUser?: IInviteCodeUserResolvers<ContextType>;
563
644
  Long?: GraphQLScalarType;
564
645
  MultiversxAudit?: IMultiversxAuditResolvers<ContextType>;
565
646
  Mutation?: IMutationResolvers<ContextType>;
566
647
  MyProfile?: IMyProfileResolvers<ContextType>;
648
+ MyProfileV2?: IMyProfileV2Resolvers<ContextType>;
567
649
  Profile?: IProfileResolvers<ContextType>;
568
650
  Query?: IQueryResolvers<ContextType>;
569
651
  Social?: ISocialResolvers<ContextType>;
@@ -743,6 +825,18 @@ export type IFetchMyProfileQuery = {
743
825
  inviteCodes?: Maybe<Array<Maybe<Pick<IUserInviteCode, 'inviteCode' | 'inviteeId' | 'isUsed' | 'usedAt'>>>>;
744
826
  });
745
827
  };
828
+ export type IFetchMyProfileV2QueryVariables = Exact<{
829
+ [key: string]: never;
830
+ }>;
831
+ export type IFetchMyProfileV2Query = {
832
+ fetchMyProfileV2: (Pick<IMyProfileV2, 'userId' | 'username' | 'about' | 'userpic' | 'following' | 'followings' | 'followers' | 'views' | 'createdAt' | 'deletedAt' | 'visible' | 'deleted' | 'showNsfw' | 'rank' | 'xps' | 'level' | 'levelMinXps' | 'levelMaxXps'> & {
833
+ social?: Maybe<Pick<ISocial, 'facebook' | 'twitter' | 'instagram' | 'website'>>;
834
+ wallets?: Maybe<Array<Maybe<Pick<IWallet, 'userId' | 'address' | 'walletName' | 'blockchain' | 'chainId'>>>>;
835
+ inviteCodes?: Maybe<Array<Maybe<(Pick<IInviteCode, 'inviteCode' | 'isUsed' | 'maxUsagesLimit' | 'codeUsersNum'> & {
836
+ codeUsers: Array<Pick<IInviteCodeUser, 'inviteeId' | 'usedAt'>>;
837
+ })>>>;
838
+ });
839
+ };
746
840
  export type IFetchProfileQueryVariables = Exact<{
747
841
  userId: Scalars['ID'];
748
842
  }>;
@@ -1319,6 +1413,31 @@ export declare function useFetchMyProfileLazyQuery(baseOptions?: Apollo.LazyQuer
1319
1413
  export type FetchMyProfileQueryHookResult = ReturnType<typeof useFetchMyProfileQuery>;
1320
1414
  export type FetchMyProfileLazyQueryHookResult = ReturnType<typeof useFetchMyProfileLazyQuery>;
1321
1415
  export type FetchMyProfileQueryResult = Apollo.QueryResult<IFetchMyProfileQuery, IFetchMyProfileQueryVariables>;
1416
+ export declare const FetchMyProfileV2Document: Apollo.DocumentNode;
1417
+ /**
1418
+ * __useFetchMyProfileV2Query__
1419
+ *
1420
+ * To run a query within a React component, call `useFetchMyProfileV2Query` and pass it any options that fit your needs.
1421
+ * When your component renders, `useFetchMyProfileV2Query` returns an object from Apollo Client that contains loading, error, and data properties
1422
+ * you can use to render your UI.
1423
+ *
1424
+ * @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;
1425
+ *
1426
+ * @example
1427
+ * const { data, loading, error } = useFetchMyProfileV2Query({
1428
+ * variables: {
1429
+ * },
1430
+ * });
1431
+ */
1432
+ export declare function useFetchMyProfileV2Query(baseOptions?: Apollo.QueryHookOptions<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>): Apollo.QueryResult<IFetchMyProfileV2Query, Exact<{
1433
+ [key: string]: never;
1434
+ }>>;
1435
+ export declare function useFetchMyProfileV2LazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>): Apollo.LazyQueryResultTuple<IFetchMyProfileV2Query, Exact<{
1436
+ [key: string]: never;
1437
+ }>>;
1438
+ export type FetchMyProfileV2QueryHookResult = ReturnType<typeof useFetchMyProfileV2Query>;
1439
+ export type FetchMyProfileV2LazyQueryHookResult = ReturnType<typeof useFetchMyProfileV2LazyQuery>;
1440
+ export type FetchMyProfileV2QueryResult = Apollo.QueryResult<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>;
1322
1441
  export declare const FetchProfileDocument: Apollo.DocumentNode;
1323
1442
  /**
1324
1443
  * __useFetchProfileQuery__
@@ -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.GetMyInviteCodesDocument = exports.useFetchUserWalletsLazyQuery = exports.useFetchUserWalletsQuery = exports.FetchUserWalletsDocument = exports.useFetchProfileLazyQuery = exports.useFetchProfileQuery = exports.FetchProfileDocument = exports.useFetchMyProfileLazyQuery = exports.useFetchMyProfileQuery = exports.FetchMyProfileDocument = exports.useFetchMultiversXAuditLazyQuery = exports.useFetchMultiversXAuditQuery = exports.FetchMultiversXAuditDocument = exports.useUpdateProfileMutation = exports.UpdateProfileDocument = exports.useSignInTezosMutation = exports.SignInTezosDocument = exports.useSignInSolanaMutation = exports.SignInSolanaDocument = exports.useSignInMetamaskMutation = exports.SignInMetamaskDocument = exports.useSignInFlowMutation = exports.SignInFlowDocument = exports.useSignInElrondMutation = exports.SignInElrondDocument = exports.useSignInAdminMetamaskMutation = exports.SignInAdminMetamaskDocument = exports.useSetMainWalletMutation = exports.SetMainWalletDocument = exports.useSaveEmailOfJoinerMutation = exports.SaveEmailOfJoinerDocument = exports.useRemoveWalletMutation = exports.RemoveWalletDocument = exports.useUseInviteCodeMutation = exports.UseInviteCodeDocument = exports.useGenerateNewInviteCodesMutation = exports.GenerateNewInviteCodesDocument = exports.useCreateNonceMutation = exports.CreateNonceDocument = exports.useAddWalletTezosMutation = exports.AddWalletTezosDocument = exports.useAddWalletSolanaMutation = exports.AddWalletSolanaDocument = exports.useAddWalletMetamaskMutation = exports.AddWalletMetamaskDocument = exports.useAddWalletFlowMutation = exports.AddWalletFlowDocument = exports.useAddWalletElrondMutation = exports.AddWalletElrondDocument = exports.IRole = void 0;
27
- exports.useGetMyInviteCodesLazyQuery = exports.useGetMyInviteCodesQuery = void 0;
26
+ exports.FetchUserWalletsDocument = exports.useFetchProfileLazyQuery = exports.useFetchProfileQuery = exports.FetchProfileDocument = exports.useFetchMyProfileV2LazyQuery = exports.useFetchMyProfileV2Query = exports.FetchMyProfileV2Document = exports.useFetchMyProfileLazyQuery = exports.useFetchMyProfileQuery = exports.FetchMyProfileDocument = exports.useFetchMultiversXAuditLazyQuery = exports.useFetchMultiversXAuditQuery = exports.FetchMultiversXAuditDocument = exports.useUpdateProfileMutation = exports.UpdateProfileDocument = exports.useSignInTezosMutation = exports.SignInTezosDocument = exports.useSignInSolanaMutation = exports.SignInSolanaDocument = exports.useSignInMetamaskMutation = exports.SignInMetamaskDocument = exports.useSignInFlowMutation = exports.SignInFlowDocument = exports.useSignInElrondMutation = exports.SignInElrondDocument = exports.useSignInAdminMetamaskMutation = exports.SignInAdminMetamaskDocument = exports.useSetMainWalletMutation = exports.SetMainWalletDocument = exports.useSaveEmailOfJoinerMutation = exports.SaveEmailOfJoinerDocument = exports.useRemoveWalletMutation = exports.RemoveWalletDocument = exports.useUseInviteCodeMutation = exports.UseInviteCodeDocument = exports.useGenerateNewInviteCodesMutation = exports.GenerateNewInviteCodesDocument = exports.useCreateNonceMutation = exports.CreateNonceDocument = exports.useAddWalletTezosMutation = exports.AddWalletTezosDocument = exports.useAddWalletSolanaMutation = exports.AddWalletSolanaDocument = exports.useAddWalletMetamaskMutation = exports.AddWalletMetamaskDocument = exports.useAddWalletFlowMutation = exports.AddWalletFlowDocument = exports.useAddWalletElrondMutation = exports.AddWalletElrondDocument = exports.IRole = void 0;
27
+ exports.useGetMyInviteCodesLazyQuery = exports.useGetMyInviteCodesQuery = exports.GetMyInviteCodesDocument = exports.useFetchUserWalletsLazyQuery = exports.useFetchUserWalletsQuery = void 0;
28
28
  const client_1 = require("@apollo/client");
29
29
  const Apollo = __importStar(require("@apollo/client"));
30
30
  var IRole;
@@ -744,6 +744,76 @@ function useFetchMyProfileLazyQuery(baseOptions) {
744
744
  return Apollo.useLazyQuery(exports.FetchMyProfileDocument, baseOptions);
745
745
  }
746
746
  exports.useFetchMyProfileLazyQuery = useFetchMyProfileLazyQuery;
747
+ exports.FetchMyProfileV2Document = (0, client_1.gql) `
748
+ query FetchMyProfileV2 {
749
+ fetchMyProfileV2 {
750
+ userId
751
+ username
752
+ about
753
+ userpic
754
+ following
755
+ followings
756
+ followers
757
+ social {
758
+ facebook
759
+ twitter
760
+ instagram
761
+ website
762
+ }
763
+ views
764
+ createdAt
765
+ deletedAt
766
+ visible
767
+ deleted
768
+ showNsfw
769
+ rank
770
+ wallets {
771
+ userId
772
+ address
773
+ walletName
774
+ blockchain
775
+ chainId
776
+ }
777
+ xps
778
+ level
779
+ levelMinXps
780
+ levelMaxXps
781
+ inviteCodes {
782
+ inviteCode
783
+ isUsed
784
+ maxUsagesLimit
785
+ codeUsersNum
786
+ codeUsers {
787
+ inviteeId
788
+ usedAt
789
+ }
790
+ }
791
+ }
792
+ }
793
+ `;
794
+ /**
795
+ * __useFetchMyProfileV2Query__
796
+ *
797
+ * To run a query within a React component, call `useFetchMyProfileV2Query` and pass it any options that fit your needs.
798
+ * When your component renders, `useFetchMyProfileV2Query` returns an object from Apollo Client that contains loading, error, and data properties
799
+ * you can use to render your UI.
800
+ *
801
+ * @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;
802
+ *
803
+ * @example
804
+ * const { data, loading, error } = useFetchMyProfileV2Query({
805
+ * variables: {
806
+ * },
807
+ * });
808
+ */
809
+ function useFetchMyProfileV2Query(baseOptions) {
810
+ return Apollo.useQuery(exports.FetchMyProfileV2Document, baseOptions);
811
+ }
812
+ exports.useFetchMyProfileV2Query = useFetchMyProfileV2Query;
813
+ function useFetchMyProfileV2LazyQuery(baseOptions) {
814
+ return Apollo.useLazyQuery(exports.FetchMyProfileV2Document, baseOptions);
815
+ }
816
+ exports.useFetchMyProfileV2LazyQuery = useFetchMyProfileV2LazyQuery;
747
817
  exports.FetchProfileDocument = (0, client_1.gql) `
748
818
  query FetchProfile($userId: ID!) {
749
819
  fetchProfile(userId: $userId) {
package/build/index.d.ts CHANGED
@@ -649,6 +649,16 @@ declare const schema: {
649
649
  }>> | undefined): import("@apollo/client").LazyQueryResultTuple<identitySchema.IFetchMyProfileQuery, identitySchema.Exact<{
650
650
  [key: string]: never;
651
651
  }>>;
652
+ useFetchMyProfileV2Query(baseOptions?: import("@apollo/client").QueryHookOptions<identitySchema.IFetchMyProfileV2Query, identitySchema.Exact<{
653
+ [key: string]: never;
654
+ }>> | undefined): import("@apollo/client").QueryResult<identitySchema.IFetchMyProfileV2Query, identitySchema.Exact<{
655
+ [key: string]: never;
656
+ }>>;
657
+ useFetchMyProfileV2LazyQuery(baseOptions?: import("@apollo/client").LazyQueryHookOptions<identitySchema.IFetchMyProfileV2Query, identitySchema.Exact<{
658
+ [key: string]: never;
659
+ }>> | undefined): import("@apollo/client").LazyQueryResultTuple<identitySchema.IFetchMyProfileV2Query, identitySchema.Exact<{
660
+ [key: string]: never;
661
+ }>>;
652
662
  useFetchProfileQuery(baseOptions: import("@apollo/client").QueryHookOptions<identitySchema.IFetchProfileQuery, identitySchema.Exact<{
653
663
  userId: string;
654
664
  }>>): import("@apollo/client").QueryResult<identitySchema.IFetchProfileQuery, identitySchema.Exact<{
@@ -700,6 +710,7 @@ declare const schema: {
700
710
  UpdateProfileDocument: import("graphql").DocumentNode;
701
711
  FetchMultiversXAuditDocument: import("graphql").DocumentNode;
702
712
  FetchMyProfileDocument: import("graphql").DocumentNode;
713
+ FetchMyProfileV2Document: import("graphql").DocumentNode;
703
714
  FetchProfileDocument: import("graphql").DocumentNode;
704
715
  FetchUserWalletsDocument: import("graphql").DocumentNode;
705
716
  GetMyInviteCodesDocument: import("graphql").DocumentNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/api",
3
- "version": "2.8.55",
3
+ "version": "2.8.57",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -11,7 +11,7 @@
11
11
  "author": "Dan Akenford",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@apollo/client": "^3.8.10",
14
+ "@apollo/client": "^3.7.3",
15
15
  "apollo-upload-client": "^17.0.0",
16
16
  "deepmerge": "^4.3.1",
17
17
  "graphql": "^15.7.2",
@@ -73,6 +73,19 @@ export type IInputSocial = {
73
73
  website?: Maybe<Scalars['String']>;
74
74
  };
75
75
 
76
+ export type IInviteCode = {
77
+ inviteCode: Scalars['String'];
78
+ isUsed: Scalars['Boolean'];
79
+ maxUsagesLimit: Scalars['Int'];
80
+ codeUsers: Array<IInviteCodeUser>;
81
+ codeUsersNum: Scalars['Int'];
82
+ };
83
+
84
+ export type IInviteCodeUser = {
85
+ inviteeId: Scalars['ID'];
86
+ usedAt: Scalars['Long'];
87
+ };
88
+
76
89
 
77
90
  /** noinspection SpellCheckingInspection */
78
91
  export type IMultiversxAudit = {
@@ -262,6 +275,30 @@ export type IMyProfile = {
262
275
  inviteCodes?: Maybe<Array<Maybe<IUserInviteCode>>>;
263
276
  };
264
277
 
278
+ export type IMyProfileV2 = {
279
+ userId: Scalars['ID'];
280
+ username?: Maybe<Scalars['String']>;
281
+ about?: Maybe<Scalars['String']>;
282
+ userpic?: Maybe<Scalars['String']>;
283
+ following?: Maybe<Scalars['Boolean']>;
284
+ followings?: Maybe<Scalars['Int']>;
285
+ followers?: Maybe<Scalars['Int']>;
286
+ social?: Maybe<ISocial>;
287
+ views?: Maybe<Scalars['Int']>;
288
+ createdAt?: Maybe<Scalars['Long']>;
289
+ deletedAt?: Maybe<Scalars['Long']>;
290
+ visible?: Maybe<Scalars['Boolean']>;
291
+ deleted?: Maybe<Scalars['Boolean']>;
292
+ showNsfw?: Maybe<Scalars['Boolean']>;
293
+ rank?: Maybe<Scalars['Float']>;
294
+ wallets?: Maybe<Array<Maybe<IWallet>>>;
295
+ xps?: Maybe<Scalars['Int']>;
296
+ level?: Maybe<Scalars['Int']>;
297
+ levelMinXps?: Maybe<Scalars['Int']>;
298
+ levelMaxXps?: Maybe<Scalars['Int']>;
299
+ inviteCodes?: Maybe<Array<Maybe<IInviteCode>>>;
300
+ };
301
+
265
302
  export type IProfile = {
266
303
  userId: Scalars['ID'];
267
304
  username?: Maybe<Scalars['String']>;
@@ -290,6 +327,7 @@ export type IQuery = {
290
327
  isInviteCodeAvailable: Scalars['Boolean'];
291
328
  getMyInviteCodes: Array<IUserInviteCode>;
292
329
  fetchMyProfile: IMyProfile;
330
+ fetchMyProfileV2: IMyProfileV2;
293
331
  fetchProfile: IProfile;
294
332
  fetchFollowingStatus: IFollowingStatus;
295
333
  fetchFollowingStatuses: Array<Maybe<IFollowingStatus>>;
@@ -444,10 +482,13 @@ export type IResolversTypes = {
444
482
  Identity: ResolverTypeWrapper<IIdentity>;
445
483
  InputProfile: IInputProfile;
446
484
  InputSocial: IInputSocial;
485
+ InviteCode: ResolverTypeWrapper<IInviteCode>;
486
+ InviteCodeUser: ResolverTypeWrapper<IInviteCodeUser>;
447
487
  Long: ResolverTypeWrapper<Scalars['Long']>;
448
488
  MultiversxAudit: ResolverTypeWrapper<IMultiversxAudit>;
449
489
  Mutation: ResolverTypeWrapper<{}>;
450
490
  MyProfile: ResolverTypeWrapper<IMyProfile>;
491
+ MyProfileV2: ResolverTypeWrapper<IMyProfileV2>;
451
492
  Profile: ResolverTypeWrapper<IProfile>;
452
493
  Query: ResolverTypeWrapper<{}>;
453
494
  Role: IRole;
@@ -472,10 +513,13 @@ export type IResolversParentTypes = {
472
513
  Identity: IIdentity;
473
514
  InputProfile: IInputProfile;
474
515
  InputSocial: IInputSocial;
516
+ InviteCode: IInviteCode;
517
+ InviteCodeUser: IInviteCodeUser;
475
518
  Long: Scalars['Long'];
476
519
  MultiversxAudit: IMultiversxAudit;
477
520
  Mutation: {};
478
521
  MyProfile: IMyProfile;
522
+ MyProfileV2: IMyProfileV2;
479
523
  Profile: IProfile;
480
524
  Query: {};
481
525
  Social: ISocial;
@@ -558,6 +602,21 @@ export type IIdentityResolvers<ContextType = any, ParentType extends IResolversP
558
602
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
559
603
  };
560
604
 
605
+ export type IInviteCodeResolvers<ContextType = any, ParentType extends IResolversParentTypes['InviteCode'] = IResolversParentTypes['InviteCode']> = {
606
+ inviteCode?: Resolver<IResolversTypes['String'], ParentType, ContextType>;
607
+ isUsed?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType>;
608
+ maxUsagesLimit?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
609
+ codeUsers?: Resolver<Array<IResolversTypes['InviteCodeUser']>, ParentType, ContextType>;
610
+ codeUsersNum?: Resolver<IResolversTypes['Int'], ParentType, ContextType>;
611
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
612
+ };
613
+
614
+ export type IInviteCodeUserResolvers<ContextType = any, ParentType extends IResolversParentTypes['InviteCodeUser'] = IResolversParentTypes['InviteCodeUser']> = {
615
+ inviteeId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
616
+ usedAt?: Resolver<IResolversTypes['Long'], ParentType, ContextType>;
617
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
618
+ };
619
+
561
620
  export interface ILongScalarConfig extends GraphQLScalarTypeConfig<IResolversTypes['Long'], any> {
562
621
  name: 'Long';
563
622
  }
@@ -620,6 +679,31 @@ export type IMyProfileResolvers<ContextType = any, ParentType extends IResolvers
620
679
  __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
621
680
  };
622
681
 
682
+ export type IMyProfileV2Resolvers<ContextType = any, ParentType extends IResolversParentTypes['MyProfileV2'] = IResolversParentTypes['MyProfileV2']> = {
683
+ userId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
684
+ username?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
685
+ about?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
686
+ userpic?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
687
+ following?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
688
+ followings?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
689
+ followers?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
690
+ social?: Resolver<Maybe<IResolversTypes['Social']>, ParentType, ContextType>;
691
+ views?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
692
+ createdAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
693
+ deletedAt?: Resolver<Maybe<IResolversTypes['Long']>, ParentType, ContextType>;
694
+ visible?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
695
+ deleted?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
696
+ showNsfw?: Resolver<Maybe<IResolversTypes['Boolean']>, ParentType, ContextType>;
697
+ rank?: Resolver<Maybe<IResolversTypes['Float']>, ParentType, ContextType>;
698
+ wallets?: Resolver<Maybe<Array<Maybe<IResolversTypes['Wallet']>>>, ParentType, ContextType>;
699
+ xps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
700
+ level?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
701
+ levelMinXps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
702
+ levelMaxXps?: Resolver<Maybe<IResolversTypes['Int']>, ParentType, ContextType>;
703
+ inviteCodes?: Resolver<Maybe<Array<Maybe<IResolversTypes['InviteCode']>>>, ParentType, ContextType>;
704
+ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
705
+ };
706
+
623
707
  export type IProfileResolvers<ContextType = any, ParentType extends IResolversParentTypes['Profile'] = IResolversParentTypes['Profile']> = {
624
708
  userId?: Resolver<IResolversTypes['ID'], ParentType, ContextType>;
625
709
  username?: Resolver<Maybe<IResolversTypes['String']>, ParentType, ContextType>;
@@ -649,6 +733,7 @@ export type IQueryResolvers<ContextType = any, ParentType extends IResolversPare
649
733
  isInviteCodeAvailable?: Resolver<IResolversTypes['Boolean'], ParentType, ContextType, RequireFields<IQueryIsInviteCodeAvailableArgs, 'inviteCode'>>;
650
734
  getMyInviteCodes?: Resolver<Array<IResolversTypes['UserInviteCode']>, ParentType, ContextType>;
651
735
  fetchMyProfile?: Resolver<IResolversTypes['MyProfile'], ParentType, ContextType>;
736
+ fetchMyProfileV2?: Resolver<IResolversTypes['MyProfileV2'], ParentType, ContextType>;
652
737
  fetchProfile?: Resolver<IResolversTypes['Profile'], ParentType, ContextType, RequireFields<IQueryFetchProfileArgs, 'userId'>>;
653
738
  fetchFollowingStatus?: Resolver<IResolversTypes['FollowingStatus'], ParentType, ContextType, RequireFields<IQueryFetchFollowingStatusArgs, 'userId'>>;
654
739
  fetchFollowingStatuses?: Resolver<Array<Maybe<IResolversTypes['FollowingStatus']>>, ParentType, ContextType, RequireFields<IQueryFetchFollowingStatusesArgs, 'userIds'>>;
@@ -698,10 +783,13 @@ export type IResolvers<ContextType = any> = {
698
783
  AuditNFTBalance?: IAuditNftBalanceResolvers<ContextType>;
699
784
  FollowingStatus?: IFollowingStatusResolvers<ContextType>;
700
785
  Identity?: IIdentityResolvers<ContextType>;
786
+ InviteCode?: IInviteCodeResolvers<ContextType>;
787
+ InviteCodeUser?: IInviteCodeUserResolvers<ContextType>;
701
788
  Long?: GraphQLScalarType;
702
789
  MultiversxAudit?: IMultiversxAuditResolvers<ContextType>;
703
790
  Mutation?: IMutationResolvers<ContextType>;
704
791
  MyProfile?: IMyProfileResolvers<ContextType>;
792
+ MyProfileV2?: IMyProfileV2Resolvers<ContextType>;
705
793
  Profile?: IProfileResolvers<ContextType>;
706
794
  Query?: IQueryResolvers<ContextType>;
707
795
  Social?: ISocialResolvers<ContextType>;
@@ -911,6 +999,17 @@ export type IFetchMyProfileQuery = { fetchMyProfile: (
911
999
  & { social?: Maybe<Pick<ISocial, 'facebook' | 'twitter' | 'instagram' | 'website'>>, wallets?: Maybe<Array<Maybe<Pick<IWallet, 'userId' | 'address' | 'walletName' | 'blockchain' | 'chainId'>>>>, inviteCodes?: Maybe<Array<Maybe<Pick<IUserInviteCode, 'inviteCode' | 'inviteeId' | 'isUsed' | 'usedAt'>>>> }
912
1000
  ) };
913
1001
 
1002
+ export type IFetchMyProfileV2QueryVariables = Exact<{ [key: string]: never; }>;
1003
+
1004
+
1005
+ export type IFetchMyProfileV2Query = { fetchMyProfileV2: (
1006
+ Pick<IMyProfileV2, 'userId' | 'username' | 'about' | 'userpic' | 'following' | 'followings' | 'followers' | 'views' | 'createdAt' | 'deletedAt' | 'visible' | 'deleted' | 'showNsfw' | 'rank' | 'xps' | 'level' | 'levelMinXps' | 'levelMaxXps'>
1007
+ & { social?: Maybe<Pick<ISocial, 'facebook' | 'twitter' | 'instagram' | 'website'>>, wallets?: Maybe<Array<Maybe<Pick<IWallet, 'userId' | 'address' | 'walletName' | 'blockchain' | 'chainId'>>>>, inviteCodes?: Maybe<Array<Maybe<(
1008
+ Pick<IInviteCode, 'inviteCode' | 'isUsed' | 'maxUsagesLimit' | 'codeUsersNum'>
1009
+ & { codeUsers: Array<Pick<IInviteCodeUser, 'inviteeId' | 'usedAt'>> }
1010
+ )>>> }
1011
+ ) };
1012
+
914
1013
  export type IFetchProfileQueryVariables = Exact<{
915
1014
  userId: Scalars['ID'];
916
1015
  }>;
@@ -1722,6 +1821,78 @@ export function useFetchMyProfileLazyQuery(baseOptions?: Apollo.LazyQueryHookOpt
1722
1821
  export type FetchMyProfileQueryHookResult = ReturnType<typeof useFetchMyProfileQuery>;
1723
1822
  export type FetchMyProfileLazyQueryHookResult = ReturnType<typeof useFetchMyProfileLazyQuery>;
1724
1823
  export type FetchMyProfileQueryResult = Apollo.QueryResult<IFetchMyProfileQuery, IFetchMyProfileQueryVariables>;
1824
+ export const FetchMyProfileV2Document = gql`
1825
+ query FetchMyProfileV2 {
1826
+ fetchMyProfileV2 {
1827
+ userId
1828
+ username
1829
+ about
1830
+ userpic
1831
+ following
1832
+ followings
1833
+ followers
1834
+ social {
1835
+ facebook
1836
+ twitter
1837
+ instagram
1838
+ website
1839
+ }
1840
+ views
1841
+ createdAt
1842
+ deletedAt
1843
+ visible
1844
+ deleted
1845
+ showNsfw
1846
+ rank
1847
+ wallets {
1848
+ userId
1849
+ address
1850
+ walletName
1851
+ blockchain
1852
+ chainId
1853
+ }
1854
+ xps
1855
+ level
1856
+ levelMinXps
1857
+ levelMaxXps
1858
+ inviteCodes {
1859
+ inviteCode
1860
+ isUsed
1861
+ maxUsagesLimit
1862
+ codeUsersNum
1863
+ codeUsers {
1864
+ inviteeId
1865
+ usedAt
1866
+ }
1867
+ }
1868
+ }
1869
+ }
1870
+ `;
1871
+
1872
+ /**
1873
+ * __useFetchMyProfileV2Query__
1874
+ *
1875
+ * To run a query within a React component, call `useFetchMyProfileV2Query` and pass it any options that fit your needs.
1876
+ * When your component renders, `useFetchMyProfileV2Query` returns an object from Apollo Client that contains loading, error, and data properties
1877
+ * you can use to render your UI.
1878
+ *
1879
+ * @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;
1880
+ *
1881
+ * @example
1882
+ * const { data, loading, error } = useFetchMyProfileV2Query({
1883
+ * variables: {
1884
+ * },
1885
+ * });
1886
+ */
1887
+ export function useFetchMyProfileV2Query(baseOptions?: Apollo.QueryHookOptions<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>) {
1888
+ return Apollo.useQuery<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>(FetchMyProfileV2Document, baseOptions);
1889
+ }
1890
+ export function useFetchMyProfileV2LazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>) {
1891
+ return Apollo.useLazyQuery<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>(FetchMyProfileV2Document, baseOptions);
1892
+ }
1893
+ export type FetchMyProfileV2QueryHookResult = ReturnType<typeof useFetchMyProfileV2Query>;
1894
+ export type FetchMyProfileV2LazyQueryHookResult = ReturnType<typeof useFetchMyProfileV2LazyQuery>;
1895
+ export type FetchMyProfileV2QueryResult = Apollo.QueryResult<IFetchMyProfileV2Query, IFetchMyProfileV2QueryVariables>;
1725
1896
  export const FetchProfileDocument = gql`
1726
1897
  query FetchProfile($userId: ID!) {
1727
1898
  fetchProfile(userId: $userId) {