ag-common 0.0.398 → 0.0.399

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,12 +1,3 @@
1
1
  export type TOnMessage = (m: string, options?: {
2
2
  appearance: 'error' | 'success';
3
3
  }) => void;
4
- export interface ICognitoAuth {
5
- AWSRegion: string;
6
- identityPool?: string;
7
- UserPoolId: string;
8
- ClientId: string;
9
- cognitoEndpoint: string;
10
- cognitoRefresh: string;
11
- vendToken: string;
12
- }
@@ -61,18 +61,3 @@ export interface AxiosWrapperLite<T> {
61
61
  data: T | undefined;
62
62
  error?: AxiosError;
63
63
  }
64
- export interface AuthedUserContext {
65
- loading: boolean;
66
- isAuthenticated: boolean;
67
- /**
68
- * @param stateqs: must be base64'd
69
- */
70
- loginWithRedirect: (stateqs?: string) => Promise<void>;
71
- logout: () => Promise<void>;
72
- user?: User;
73
- error: Error | undefined;
74
- refreshToken: () => Promise<User | undefined>;
75
- }
76
- export declare const getBearerToken: (jwt?: {
77
- id_token?: string;
78
- }) => string | undefined;
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBearerToken = void 0;
4
- const getBearerToken = (jwt) => !(jwt === null || jwt === void 0 ? void 0 : jwt.id_token) ? undefined : `Bearer ${jwt.id_token}`;
5
- exports.getBearerToken = getBearerToken;
@@ -1,5 +1,4 @@
1
1
  import { TLang } from '../../common/helpers/i18n';
2
- import { ICognitoAuth } from './cognito';
3
2
  import { AxiosWrapperLite } from './jwt';
4
3
  export type TProtocol = 'http:' | 'https:';
5
4
  export interface LocationSubset {
@@ -51,7 +50,6 @@ export interface IRequestCommon {
51
50
  }
52
51
  export interface IStateCommon<TRequest extends IRequestCommon> extends IInitialStateCommon {
53
52
  request: TRequest;
54
- auth: ICognitoAuth;
55
53
  pushPath: (path: string) => Promise<void>;
56
54
  /**
57
55
  * set for ssr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.398",
3
+ "version": "0.0.399",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",