@entur-partner/app-shell 4.0.0 → 5.0.1-alpha.0

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.
@@ -1,10 +1,10 @@
1
- import { ReactNode } from 'react';
2
- import { GetTokenSilentlyOptions } from '@auth0/auth0-spa-js';
1
+ import React, { ReactNode } from 'react';
2
+ import { GetTokenSilentlyOptions, Auth0ContextInterface } from '@auth0/auth0-react';
3
3
  import { User } from '@entur-partner/micro-frontend';
4
4
  import { Environment } from '@entur-partner/common';
5
5
  import { DecorateUserFn } from './UserTypes';
6
6
  export interface AppShellValues {
7
- logout: () => void;
7
+ logout: Auth0ContextInterface['logout'];
8
8
  user: User;
9
9
  getToken(options?: GetTokenSilentlyOptions): Promise<string>;
10
10
  }
@@ -17,4 +17,4 @@ export interface AppShellProps {
17
17
  redirectUri?: string;
18
18
  environment?: Environment;
19
19
  }
20
- export declare const AppShell: ({ children, audience, domain, clientId, redirectUri, decorateUser, environment, }: AppShellProps) => JSX.Element;
20
+ export declare const AppShell: ({ children, audience, domain, clientId, decorateUser, environment, }: AppShellProps) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { Environment } from '@entur-partner/common';
2
- declare type EnvironmentBannerProps = {
3
+ type EnvironmentBannerProps = {
3
4
  environment: Exclude<Environment, Environment.Production>;
4
5
  };
5
- export declare const EnvironmentBanner: ({ environment }: EnvironmentBannerProps) => JSX.Element;
6
+ export declare const EnvironmentBanner: ({ environment }: EnvironmentBannerProps) => React.JSX.Element;
6
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { GetTokenSilentlyOptions } from '@auth0/auth0-spa-js';
3
- export declare type GetOrganisationsFn = (token: string) => Promise<Organisation[]>;
3
+ export type GetOrganisationsFn = (token: string) => Promise<Organisation[]>;
4
4
  export interface Organisation {
5
5
  name: string;
6
6
  id: string;
@@ -1,3 +1,3 @@
1
1
  import { User } from '@entur-partner/micro-frontend';
2
- export declare type Auth0User = Omit<User, 'permissions' | 'enturPartnerPermissions'>;
3
- export declare type DecorateUserFn = (user: Auth0User, token: string) => Promise<User>;
2
+ export type Auth0User = Omit<User, 'permissions' | 'enturPartnerPermissions'>;
3
+ export type DecorateUserFn = (user: Auth0User, token: string) => Promise<User>;