@amedia/user 0.14.141 → 0.14.142
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/README.md +3 -3
- package/dist/user.d.ts +1 -13
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ NOTE2: ~If you need to know if the current user is an employee, you are encourag
|
|
|
76
76
|
|
|
77
77
|
#### Storage
|
|
78
78
|
|
|
79
|
-
Storage contains namespaces stored in Europa. A namespace is a named set of key value pairs stored for a specific user. An example could be favourite_teams, which could contain team_id as key and timestamp it was stored as favourite as value.
|
|
79
|
+
Storage contains namespaces stored in aID (Europa). A namespace is a named set of key value pairs stored for a specific user. An example could be favourite_teams, which could contain team_id as key and timestamp it was stored as favourite as value.
|
|
80
80
|
|
|
81
81
|
Storage is requested by calling `.withStorage(namespaces: Array<string>)` on a `UserDataRequest`. If a namespace does not exist it will be "created" in that you'll get an empty object back. Saving data to it will perform the actual creation.
|
|
82
82
|
|
|
@@ -289,7 +289,7 @@ Get various, environment aware, URLs to pages often linked to from other apps. T
|
|
|
289
289
|
### DEPRECATED: `~updateStorage(storage: Storage): void~`
|
|
290
290
|
|
|
291
291
|
[See: Writing-to-storage-namespaces](#writing-to-storage-namespaces)
|
|
292
|
-
The safest way to update a value is to use `updateStorage()`. This will send a `PATCH` to Europa to only update the specified attributes of a namespace, and keep the rest as it is. This reduces concurrency issues where someone could have updated a different attribute after you read the namespace.
|
|
292
|
+
The safest way to update a value is to use `updateStorage()`. This will send a `PATCH` to aID (Europa) to only update the specified attributes of a namespace, and keep the rest as it is. This reduces concurrency issues where someone could have updated a different attribute after you read the namespace.
|
|
293
293
|
|
|
294
294
|
Example of use:
|
|
295
295
|
|
|
@@ -304,7 +304,7 @@ updateStorage({
|
|
|
304
304
|
### DEPRECATED: `~saveStorage(storage: Storage): void~`
|
|
305
305
|
|
|
306
306
|
[See: Writing-to-storage-namespaces](#writing-to-storage-namespaces)
|
|
307
|
-
Will send a `PUT` to Europa to update the entire namespace/namespaces, deleting missing data in the process. Please be advised that you may be overwriting updates done by other apps to these namespaces, so it's best to save with a recent namespace if it sees heavy writes :)
|
|
307
|
+
Will send a `PUT` to aID (Europa) to update the entire namespace/namespaces, deleting missing data in the process. Please be advised that you may be overwriting updates done by other apps to these namespaces, so it's best to save with a recent namespace if it sees heavy writes :)
|
|
308
308
|
|
|
309
309
|
Example of use:
|
|
310
310
|
|
package/dist/user.d.ts
CHANGED
|
@@ -140,8 +140,6 @@ declare class ValidationError extends Error {
|
|
|
140
140
|
constructor(code: string, message: string);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
/** @deprecated Should be deleted when removing saveStorage and updateStorage */
|
|
144
|
-
type Storage = Record<string, Record<string, string>>;
|
|
145
143
|
type LoginPageParams = {
|
|
146
144
|
requestedUrl?: string;
|
|
147
145
|
context?: string;
|
|
@@ -154,16 +152,6 @@ type LoginPageParams = {
|
|
|
154
152
|
declare const goToLoginPage: (requestedUrlOrParams?: string | LoginPageParams) => void;
|
|
155
153
|
declare const getLoginUrl: (requestedUrlOrParams?: string | LoginPageParams) => URL;
|
|
156
154
|
declare const logout: () => Promise<void>;
|
|
157
|
-
/**
|
|
158
|
-
* @deprecated Use Namespace.save() instead
|
|
159
|
-
* No longer used by any active app. Can be removed
|
|
160
|
-
*/
|
|
161
|
-
declare const updateStorage: (storage: Storage) => void;
|
|
162
|
-
/**
|
|
163
|
-
* @deprecated Use Namespace.save() instead
|
|
164
|
-
* No longer used by any active app. Can be removed
|
|
165
|
-
*/
|
|
166
|
-
declare const saveStorage: (storage: Storage) => void;
|
|
167
155
|
declare const requestDataRefresh: () => void;
|
|
168
156
|
declare const aidUrls: {
|
|
169
157
|
mainPage: URL;
|
|
@@ -174,5 +162,5 @@ declare const aidUrls: {
|
|
|
174
162
|
sites: URL;
|
|
175
163
|
};
|
|
176
164
|
|
|
177
|
-
export { EmergencyModeError, FetchTimeoutError, PaywallError, PaywallUnlockRequest, SiteAccessRequest, UserDataRequest, ValidationError, aidUrls, getLoginUrl, goToLoginPage, logout, requestDataRefresh
|
|
165
|
+
export { EmergencyModeError, FetchTimeoutError, PaywallError, PaywallUnlockRequest, SiteAccessRequest, UserDataRequest, ValidationError, aidUrls, getLoginUrl, goToLoginPage, logout, requestDataRefresh };
|
|
178
166
|
export type { PaywallUnlockResponse, PrivacyPreferences, SiteAccessResponse, State, UserAttributes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amedia/user",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.142",
|
|
4
4
|
"description": "Client lib for working with aID user and associated data",
|
|
5
5
|
"repository": "https://github.com/amedia/amedia-user-js",
|
|
6
6
|
"author": "Amedia Utvikling (ID og data)",
|
|
@@ -46,20 +46,20 @@
|
|
|
46
46
|
"@amedia/browserid": "1.0.17",
|
|
47
47
|
"@amedia/frontend-rpc": "0.0.12",
|
|
48
48
|
"runtypes": "6.7.0",
|
|
49
|
-
"ts-deepmerge": "7.0.
|
|
49
|
+
"ts-deepmerge": "7.0.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@amedia/eslint-config": "4.0.4",
|
|
53
|
-
"@amedia/kragl": "5.0.
|
|
54
|
-
"@amedia/prettier-config": "2.0.
|
|
53
|
+
"@amedia/kragl": "5.0.6",
|
|
54
|
+
"@amedia/prettier-config": "2.0.1",
|
|
55
55
|
"@changesets/changelog-github": "0.5.1",
|
|
56
|
-
"@changesets/cli": "2.29.
|
|
56
|
+
"@changesets/cli": "2.29.3",
|
|
57
57
|
"@eik/esbuild-plugin": "1.1.54",
|
|
58
58
|
"@types/jest": "29.5.14",
|
|
59
|
-
"@types/node": "22.15.
|
|
59
|
+
"@types/node": "22.15.17",
|
|
60
60
|
"concurrently": "9.1.2",
|
|
61
61
|
"cors": "2.8.5",
|
|
62
|
-
"esbuild": "0.25.
|
|
62
|
+
"esbuild": "0.25.4",
|
|
63
63
|
"express": "4.21.2",
|
|
64
64
|
"jest": "29.7.0",
|
|
65
65
|
"jest-environment-jsdom": "29.7.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jest-fetch-mock": "3.0.3",
|
|
68
68
|
"mockdate": "3.0.5",
|
|
69
69
|
"npm-run-all": "4.1.5",
|
|
70
|
-
"rollup": "4.40.
|
|
70
|
+
"rollup": "4.40.2",
|
|
71
71
|
"rollup-plugin-dts": "6.2.1",
|
|
72
72
|
"ts-jest": "29.3.2",
|
|
73
73
|
"tslib": "2.8.1",
|