@amedia/user 0.13.24 → 0.13.26
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/@types/amedia-frontend-rpc.d.ts +11 -0
- package/@types/browserid.d.ts +4 -0
- package/dist/actions/authorization.d.ts +5 -5
- package/dist/autologin/index.d.ts +4 -0
- package/dist/clients/mercuryLog.d.ts +5 -4
- package/dist/index.d.ts +43 -29
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/janitor/jobs/daxsubCookie.d.ts +2 -1
- package/dist/lib/PaywallUnlockRequest.d.ts +1 -1
- package/dist/lib/UserDataRequest.d.ts +1 -1
- package/dist/lib/rpc.d.ts +5 -5
- package/dist/utils/customEventWrapper.d.ts +5 -3
- package/dist/utils/deepEquals.d.ts +0 -3
- package/dist/utils/log.d.ts +4 -4
- package/dist/utils/queue.d.ts +2 -2
- package/dist/utils/type.d.ts +6 -0
- package/eik.json +1 -1
- package/package.json +1 -2
- package/src/actions/authorization.spec.ts +13 -9
- package/src/actions/authorization.ts +7 -5
- package/src/autologin/index.spec.ts +3 -3
- package/src/autologin/index.ts +6 -1
- package/src/cache/index.spec.ts +2 -2
- package/src/cache/index.ts +1 -2
- package/src/clients/europa.spec.ts +3 -3
- package/src/clients/europa.ts +9 -4
- package/src/clients/mercuryLog.ts +19 -11
- package/src/clients/pluto.spec.ts +4 -3
- package/src/eventHandlers/state.spec.ts +2 -2
- package/src/eventHandlers/storage.spec.ts +2 -2
- package/src/eventHandlers/userAttributes.spec.ts +2 -2
- package/src/index-authentcation.spec.ts +1 -1
- package/src/index-storage.spec.ts +3 -3
- package/src/index-subscription.spec.ts +1 -1
- package/src/index.ts +4 -8
- package/src/janitor/jobs/accessCookieRefresher.spec.ts +8 -2
- package/src/janitor/jobs/daxsubCookie.spec.ts +8 -2
- package/src/janitor/jobs/daxsubCookie.ts +4 -3
- package/src/lib/PaywallUnlockRequest.spec.ts +12 -12
- package/src/lib/PaywallUnlockRequest.ts +6 -3
- package/src/lib/UserDataRequest.spec.ts +3 -2
- package/src/lib/UserDataRequest.ts +4 -4
- package/src/lib/rpc.ts +7 -9
- package/src/store/index.ts +2 -0
- package/src/utils/customEventWrapper.ts +6 -6
- package/src/utils/deepEquals.ts +12 -11
- package/src/utils/getOrUpdate.ts +1 -1
- package/src/utils/log.spec.ts +4 -4
- package/src/utils/log.ts +24 -13
- package/src/utils/queue.ts +4 -4
- package/src/utils/type.ts +19 -0
- package/tsconfig.eslint.json +2 -0
- package/tsconfig.json +2 -1
- package/amedia-user-js.iml +0 -9
- package/dist/cache/engines/indexeddb.d.ts +0 -7
- package/dist/index.js.LICENSE.txt +0 -14
- package/dist/janitor/index.spec.d.ts +0 -4
- package/dist/lib/PaywallUnlocker.d.ts +0 -16
- package/dist/lib/PaywallUnlocker.spec.d.ts +0 -4
- package/dist/lib/User.d.ts +0 -21
- package/dist/utils/logValidationError.d.ts +0 -1
- package/esm/actions/authentication.d.ts +0 -5
- package/esm/actions/authentication.spec.d.ts +0 -4
- package/esm/actions/authorization.d.ts +0 -9
- package/esm/actions/preferences.d.ts +0 -9
- package/esm/actions/preferences.spec.d.ts +0 -1
- package/esm/actions/storage.d.ts +0 -4
- package/esm/actions/userData.d.ts +0 -2
- package/esm/autologin/index.d.ts +0 -1
- package/esm/autologin/thirdPartyCookie.d.ts +0 -3
- package/esm/autologin/thirdPartyCookie.spec.d.ts +0 -1
- package/esm/cache/engines/global.d.ts +0 -21
- package/esm/cache/engines/global.spec.d.ts +0 -1
- package/esm/cache/engines/indexeddb.d.ts +0 -7
- package/esm/cache/index.d.ts +0 -11
- package/esm/cache/index.spec.d.ts +0 -4
- package/esm/cache/types.d.ts +0 -11
- package/esm/clients/europa.d.ts +0 -28
- package/esm/clients/europa.spec.d.ts +0 -1
- package/esm/clients/jupiter.d.ts +0 -30
- package/esm/clients/jupiter.spec.d.ts +0 -1
- package/esm/clients/mercury.d.ts +0 -18
- package/esm/clients/mercury.spec.d.ts +0 -4
- package/esm/clients/nebula.d.ts +0 -2
- package/esm/clients/nebula.spec.d.ts +0 -1
- package/esm/clients/pluto.d.ts +0 -3
- package/esm/clients/pluto.spec.d.ts +0 -1
- package/esm/eventHandlers/activation.d.ts +0 -15
- package/esm/eventHandlers/authentication.d.ts +0 -17
- package/esm/eventHandlers/userAttributes.d.ts +0 -24
- package/esm/exceptions/PaywallError.d.ts +0 -7
- package/esm/index-authentcation.spec.d.ts +0 -4
- package/esm/index-storage.spec.d.ts +0 -4
- package/esm/index-subscription.spec.d.ts +0 -4
- package/esm/index.d.ts +0 -26
- package/esm/janitor/index.d.ts +0 -10
- package/esm/janitor/jobs/accessCookieRefresher.d.ts +0 -1
- package/esm/janitor/jobs/accessCookieRefresher.spec.d.ts +0 -4
- package/esm/lib/PaywallUnlocker.d.ts +0 -16
- package/esm/lib/PaywallUnlocker.spec.d.ts +0 -4
- package/esm/lib/User.d.ts +0 -21
- package/esm/lib/cookie.d.ts +0 -5
- package/esm/lib/rpc.d.ts +0 -6
- package/esm/store/index.d.ts +0 -22
- package/esm/store/index.spec.d.ts +0 -1
- package/esm/types.d.ts +0 -22
- package/esm/user.js +0 -2
- package/esm/user.js.map +0 -1
- package/esm/utils/customEventWrapper.d.ts +0 -17
- package/esm/utils/deepEquals.d.ts +0 -4
- package/esm/utils/getOrUpdate.d.ts +0 -6
- package/esm/utils/getOrUpdate.spec.d.ts +0 -1
- package/esm/utils/location.d.ts +0 -3
- package/esm/utils/log.d.ts +0 -26
- package/esm/utils/queue.d.ts +0 -12
- package/esm/utils/url.d.ts +0 -6
- package/esm/utils/url.spec.d.ts +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const setRootElement: (element: any) => void;
|
|
2
|
-
/**
|
|
3
|
-
* This listener MUST be used by all listeners in ../eventHandlers
|
|
4
|
-
* We want to ensure that only _one_ instance of this package actually
|
|
5
|
-
* orchestrates data and performs requests against backends.
|
|
6
|
-
* @param type
|
|
7
|
-
* @param listener
|
|
8
|
-
*/
|
|
9
|
-
export declare const listenWithExclusivity: <T extends keyof WindowEventMap>(type: T, listener: (this: Window, ev: WindowEventMap[T]) => void) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Use this for response listeners. (../index.ts) where we want
|
|
12
|
-
* all updates with data - no matter who sent the actual request
|
|
13
|
-
* @param type
|
|
14
|
-
* @param listener
|
|
15
|
-
*/
|
|
16
|
-
export declare const listenForAllEvents: <T extends keyof WindowEventMap>(type: T, listener: (this: Window, ev: WindowEventMap[T]) => void) => void;
|
|
17
|
-
export declare const dispatch: <T extends Event>(event: T) => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Runtype, Static } from 'runtypes';
|
|
2
|
-
export declare type DataFetcherWithCacheTTL<T extends Runtype> = Promise<{
|
|
3
|
-
ttl: number;
|
|
4
|
-
data: Static<T>;
|
|
5
|
-
}>;
|
|
6
|
-
export default function getOrUpdate<T extends Runtype>(key: string, schema: T, fetch: () => DataFetcherWithCacheTTL<T>, cacheQualifier?: (cacheData: Static<T>) => boolean): Promise<Static<T>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/esm/utils/location.d.ts
DELETED
package/esm/utils/log.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare type Logger = {
|
|
2
|
-
debug: (message: string | any, ...extra: any[]) => void;
|
|
3
|
-
info: (message: string | any, ...extra: any[]) => void;
|
|
4
|
-
warn: (message: string | any, ...extra: any[]) => void;
|
|
5
|
-
error: (message: string | any, ...extra: any[]) => void;
|
|
6
|
-
};
|
|
7
|
-
export declare const setLogger: (engine: Logger) => void;
|
|
8
|
-
declare const _default: {
|
|
9
|
-
debug: {
|
|
10
|
-
(...data: any[]): void;
|
|
11
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
12
|
-
};
|
|
13
|
-
info: {
|
|
14
|
-
(...data: any[]): void;
|
|
15
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
16
|
-
};
|
|
17
|
-
warn: {
|
|
18
|
-
(...data: any[]): void;
|
|
19
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
20
|
-
};
|
|
21
|
-
error: {
|
|
22
|
-
(...data: any[]): void;
|
|
23
|
-
(message?: any, ...optionalParams: any[]): void;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
package/esm/utils/queue.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
add: (key: string, promiseCallbacks: {
|
|
3
|
-
resolve: (PromiseLike: any) => void;
|
|
4
|
-
reject: (reason?: any) => void;
|
|
5
|
-
}) => void;
|
|
6
|
-
getAll: (key: string) => {
|
|
7
|
-
resolve: (PromiseLike: any) => void;
|
|
8
|
-
reject: (reason?: any) => void;
|
|
9
|
-
}[];
|
|
10
|
-
peekQueueSize: (key: string) => number;
|
|
11
|
-
};
|
|
12
|
-
export default _default;
|
package/esm/utils/url.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const setCurrentHostname: (hostname: string) => void;
|
|
2
|
-
export declare const getCurrentHostname: () => string;
|
|
3
|
-
export declare const getCurrentUrl: () => string;
|
|
4
|
-
export declare const getCurrentEnvironment: () => string | null;
|
|
5
|
-
export declare const getCurrentPublicationDomain: () => string;
|
|
6
|
-
export declare const getAidDomain: () => string;
|
package/esm/utils/url.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|