@medipha/feed 0.3.1 → 0.3.2

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,16 +1,9 @@
1
1
  export interface NewsfeedModuleProps {
2
2
  accessToken: string;
3
- /**
4
- * When the access token expires, in epoch seconds (the JWT `exp` claim). Before every request the
5
- * feed calls onRefreshToken if the token expires within 10 minutes, so the host must pass the new
6
- * expireTime together with the new accessToken after refreshing.
7
- */
8
- expireTime?: number;
9
3
  apiUrl: string;
10
4
  chatApiUrl: string;
11
5
  basePath: string;
12
6
  onUnauthorized?: () => void;
13
- onRefreshToken?: () => Promise<string>;
14
7
  onNavigateOutsideFeed?: (path: string) => void;
15
8
  /**
16
9
  * The feed never offers post creation (that lives in NewsfeedAdminModule).
@@ -1,6 +1,6 @@
1
1
  import { FeedApi } from '../../core';
2
2
  import { NewsfeedModuleProps } from '../newsfeed-module.types';
3
- type SessionProps = Pick<NewsfeedModuleProps, 'accessToken' | 'expireTime' | 'onRefreshToken' | 'onUnauthorized'>;
3
+ type SessionProps = Pick<NewsfeedModuleProps, 'accessToken' | 'onUnauthorized'>;
4
4
  export declare class FeedSession {
5
5
  readonly api: FeedApi;
6
6
  private props;
@@ -8,6 +8,5 @@ export declare class FeedSession {
8
8
  /** The chat service is a different API, so the share modal needs the current token itself. */
9
9
  getAccessToken: () => string;
10
10
  update(props: SessionProps): void;
11
- private refreshAccessToken;
12
11
  }
13
12
  export {};
@@ -2,9 +2,6 @@ import { QueryParams } from './query-string';
2
2
  export interface FeedApiConfig {
3
3
  apiBaseUrl: string;
4
4
  getAccessToken: () => string | null;
5
- /** Epoch seconds the host reports for the access token; unknown skips the early refresh. */
6
- getExpireTime?: () => number | undefined;
7
- onRefreshToken?: () => Promise<string>;
8
5
  onUnauthorized?: () => void;
9
6
  fetchImpl?: typeof fetch;
10
7
  }