@well-played.gg/react-sdk 1.0.0 → 1.1.1

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.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ApolloClient } from '@apollo/client';
1
2
  import { ApolloError } from '@apollo/client';
2
3
  import { ApolloQueryResult } from '@apollo/client';
3
4
  import { ErrorResponse } from '@apollo/client/link/error';
@@ -10,11 +11,13 @@ import { InvalidationPolicies } from '@nerdwallet/apollo-cache-policies/dist/pol
10
11
  import { JSX as JSX_2 } from 'react/jsx-runtime';
11
12
  import { LazyQueryHookOptions } from '@apollo/client/react/types/types';
12
13
  import { NoInfer as NoInfer_2 } from '@apollo/client/react/types/types';
14
+ import { NormalizedCacheObject } from '@apollo/client';
13
15
  import { OidcConfiguration } from '@axa-fr/oidc-client';
14
16
  import { OidcProviderProps } from '@axa-fr/react-oidc';
15
17
  import { PropsWithChildren } from 'react';
16
18
  import { readFragment } from 'gql.tada';
17
19
  import { ResultOf } from 'gql.tada';
20
+ import { StringMap } from '@axa-fr/react-oidc';
18
21
  import { TadaDocumentNode } from 'gql.tada';
19
22
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
20
23
  import { VariablesOf } from 'gql.tada';
@@ -403,6 +406,59 @@ after?: string | null | undefined;
403
406
  tournamentId: string;
404
407
  }, void>;
405
408
 
409
+ export declare const useConnectedPlayer: () => {
410
+ loading: boolean;
411
+ data: {
412
+ getMyAccount: {
413
+ id: string;
414
+ permissions: {
415
+ id: string;
416
+ resources: string[];
417
+ }[];
418
+ profiles: {
419
+ id: string;
420
+ username: string;
421
+ customFields: {
422
+ property: string;
423
+ value: string;
424
+ }[];
425
+ }[];
426
+ identities: {
427
+ properties: {
428
+ property: string;
429
+ value: string;
430
+ }[];
431
+ }[];
432
+ };
433
+ } | undefined;
434
+ refetch: (variables?: Partial<{}> | undefined) => Promise<ApolloQueryResult< {
435
+ getMyAccount: {
436
+ id: string;
437
+ permissions: {
438
+ id: string;
439
+ resources: string[];
440
+ }[];
441
+ profiles: {
442
+ id: string;
443
+ username: string;
444
+ customFields: {
445
+ property: string;
446
+ value: string;
447
+ }[];
448
+ }[];
449
+ identities: {
450
+ properties: {
451
+ property: string;
452
+ value: string;
453
+ }[];
454
+ }[];
455
+ };
456
+ }>>;
457
+ authenticated: boolean;
458
+ login: (callbackPath?: string | undefined, extras?: StringMap, silentLoginOnly?: boolean) => Promise<unknown>;
459
+ logout: (callbackPath?: string | null | undefined, extras?: StringMap) => Promise<void>;
460
+ };
461
+
406
462
  export declare const useOrganization: () => {
407
463
  loading: boolean;
408
464
  error: ApolloError | undefined;
@@ -500,6 +556,7 @@ export declare const useTournamentTeams: ({ tournamentId, skip, status, }: {
500
556
 
501
557
  export declare const useWellPlayed: () => {
502
558
  organizationId: string;
559
+ apiClient: ApolloClient<NormalizedCacheObject>;
503
560
  };
504
561
 
505
562
  export { VariablesOf }