@amedia/user 0.7.1 → 0.7.3
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/actions/preferences.d.ts +1 -1
- package/dist/clients/europa.d.ts +12 -7
- package/dist/clients/jupiter.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +0 -9
- package/dist/types.d.ts +3 -0
- package/dist/utils/deepEquals.d.ts +4 -0
- package/dist/utils/getOrUpdate.d.ts +1 -1
- package/package.json +1 -2
- package/src/actions/authentication.ts +6 -5
- package/src/actions/authorization.ts +1 -44
- package/src/actions/preferences.spec.ts +2 -12
- package/src/actions/preferences.ts +26 -54
- package/src/clients/europa.spec.ts +51 -17
- package/src/clients/europa.ts +70 -53
- package/src/clients/jupiter.spec.ts +3 -1
- package/src/clients/jupiter.ts +3 -2
- package/src/index.ts +2 -3
- package/src/types.ts +1 -0
- package/src/utils/deepEquals.ts +41 -0
- package/src/utils/getOrUpdate.spec.ts +168 -0
- package/src/utils/getOrUpdate.ts +27 -3
- package/dist/index-userdata.spec.d.ts +0 -4
- package/dist/services/europa.d.ts +0 -12
- package/dist/services/jupiter.d.ts +0 -29
- package/dist/services/jupiter.spec.d.ts +0 -1
- package/dist/services/mercury.d.ts +0 -18
- package/dist/services/mercury.spec.d.ts +0 -4
- package/dist/services/nebula.d.ts +0 -22
- package/dist/services/nebula.spec.d.ts +0 -1
- package/dist/services/pluto.d.ts +0 -8
- package/dist/services/pluto.spec.d.ts +0 -1
- package/dist/store/store.d.ts +0 -13
- package/dist/store/store.spec.d.ts +0 -1
- /package/dist/{services/europa.spec.d.ts → utils/getOrUpdate.spec.d.ts} +0 -0
|
@@ -6,4 +6,4 @@ export declare const PrivacyPreferencesSchema: Record<{
|
|
|
6
6
|
personalizedAds: Boolean;
|
|
7
7
|
personalizedContent: Boolean;
|
|
8
8
|
}, false>;
|
|
9
|
-
export declare const getPrivacyPreferences: () => Promise<UserAttributes
|
|
9
|
+
export declare const getPrivacyPreferences: () => Promise<Pick<UserAttributes, 'privacyPreferences'>>;
|
package/dist/clients/europa.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { Record,
|
|
1
|
+
import { Record, Unknown, Dictionary } from 'runtypes';
|
|
2
|
+
import { UserAttributes } from '../types';
|
|
2
3
|
export declare const EuropaSchema: Record<{
|
|
3
|
-
namespaces:
|
|
4
|
+
namespaces: Dictionary<Unknown, string>;
|
|
4
5
|
}, false>;
|
|
5
6
|
export declare const clearLocalCache: () => Promise<void>;
|
|
6
7
|
export declare const updateNamespace: (namespace: string, data: Object) => Promise<void | {}>;
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const getNamespaces: (namespaces: string[], options?: {
|
|
8
9
|
ignoreCache: boolean;
|
|
9
|
-
}) => Promise<
|
|
10
|
-
export declare const saveNamespace: (namespace: string, data: Object) => Promise<
|
|
11
|
-
export declare const getAllNamespaces: () => Promise<{
|
|
12
|
-
|
|
10
|
+
}) => Promise<Pick<UserAttributes, 'storage'>>;
|
|
11
|
+
export declare const saveNamespace: (namespace: string, data: Object) => Promise<Pick<UserAttributes, "storage">>;
|
|
12
|
+
export declare const getAllNamespaces: () => Promise<{
|
|
13
|
+
namespaces: {
|
|
14
|
+
[x: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
export declare const deleteNamespaceKey: (namespace: string, key: string) => Promise<Pick<UserAttributes, "storage">>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array, Literal, Record, Static, String, Number, Union } from 'runtypes';
|
|
2
|
+
import { UserAttributes } from '../types';
|
|
2
3
|
export declare type AccessFeatures = string[];
|
|
3
4
|
export declare const CheckAccessForPaperSchema: Record<{
|
|
4
5
|
status: Literal<"success">;
|
|
@@ -23,7 +24,7 @@ declare const GetNonUserAccessSchema: Record<{
|
|
|
23
24
|
access_features: Array<String, false>;
|
|
24
25
|
}, false>;
|
|
25
26
|
export declare type GetNonUserAccess = Static<typeof GetNonUserAccessSchema>;
|
|
26
|
-
export declare const checkForAccess: (publicationDomain: string, accessFeatures: AccessFeatures) => Promise<
|
|
27
|
+
export declare const checkForAccess: (publicationDomain: string, accessFeatures: AccessFeatures) => Promise<Pick<UserAttributes, 'access'>>;
|
|
27
28
|
export declare const getVstoken: (publicationDomain: string) => Promise<GetVstoken>;
|
|
28
29
|
export declare const getNonUserAccess: (publicationDomain: string) => Promise<GetNonUserAccess>;
|
|
29
30
|
export {};
|