@amedia/user 0.14.144 → 0.14.146

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.
Files changed (2) hide show
  1. package/dist/user.d.ts +13 -10
  2. package/package.json +18 -19
package/dist/user.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as rt from 'runtypes';
1
+ import * as v from 'valibot';
2
2
 
3
3
  type AccessFeatures = string[];
4
4
  type UserAttributes = {
@@ -6,6 +6,7 @@ type UserAttributes = {
6
6
  name: string | null;
7
7
  trackingKey: string | null;
8
8
  avatar: string | null;
9
+ /** @deprecated use data from [@amedia/user-datapoints](https://github.com/amedia/amedia-user-datapoints) instead */
9
10
  extraData: {
10
11
  [index: string]: unknown;
11
12
  };
@@ -75,13 +76,13 @@ declare enum AffiliationType {
75
76
  FAMILY = "family",
76
77
  SUBSCRIPTION = "subscription"
77
78
  }
78
- declare const PrimarySiteSchema: rt.Record<{
79
- domain: rt.String;
80
- name: rt.String;
81
- affiliation: rt.Literal<AffiliationType.ACCESS>;
82
- affiliations: rt.Array<rt.Union<[rt.Literal<AffiliationType.ACCESS>, rt.Literal<AffiliationType.FAMILY>, rt.Literal<AffiliationType.SUBSCRIPTION>]>, false>;
83
- }, false>;
84
- type PrimarySite = rt.Static<typeof PrimarySiteSchema>;
79
+ declare const PrimarySiteSchema: v.ObjectSchema<{
80
+ readonly domain: v.StringSchema<undefined>;
81
+ readonly name: v.StringSchema<undefined>;
82
+ readonly affiliation: v.LiteralSchema<AffiliationType.ACCESS, undefined>;
83
+ readonly affiliations: v.ArraySchema<v.UnionSchema<[v.LiteralSchema<AffiliationType.ACCESS, undefined>, v.LiteralSchema<AffiliationType.FAMILY, undefined>, v.LiteralSchema<AffiliationType.SUBSCRIPTION, undefined>], undefined>, undefined>;
84
+ }, undefined>;
85
+ type PrimarySite = v.InferOutput<typeof PrimarySiteSchema>;
85
86
 
86
87
  type SiteAccessResponse = {
87
88
  isLoggedIn: boolean;
@@ -106,9 +107,11 @@ declare class PaywallUnlockRequest {
106
107
  private requestedAccessFeatures;
107
108
  private reload;
108
109
  private requestedUrl;
109
- private siteDomain;
110
110
  constructor(requestedAccessFeatures?: string[]);
111
- withSiteDomain(domain: string): this;
111
+ /**
112
+ * @deprecated Use SiteAccessRequest to check for access on another site.
113
+ */
114
+ withSiteDomain(siteDomain: string): this;
112
115
  /**
113
116
  * @deprecated Required now. Set in constructor
114
117
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amedia/user",
3
- "version": "0.14.144",
3
+ "version": "0.14.146",
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)",
@@ -43,33 +43,32 @@
43
43
  "postpublish": "npm run build && npx @eik/cli publish"
44
44
  },
45
45
  "dependencies": {
46
- "@amedia/browserid": "1.0.17",
47
- "@amedia/frontend-rpc": "0.0.12",
48
- "runtypes": "6.7.0",
49
- "ts-deepmerge": "7.0.3"
46
+ "@amedia/browserid": "1.1.9",
47
+ "@amedia/frontend-rpc": "0.0.14",
48
+ "ts-deepmerge": "7.0.3",
49
+ "valibot": "1.1.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@amedia/eslint-config": "4.0.4",
53
- "@amedia/kragl": "5.0.6",
52
+ "@amedia/eslint-config": "4.0.6",
53
+ "@amedia/kragl": "5.0.8",
54
54
  "@amedia/prettier-config": "2.0.1",
55
55
  "@changesets/changelog-github": "0.5.1",
56
- "@changesets/cli": "2.29.4",
57
- "@eik/esbuild-plugin": "2.0.1",
58
- "@types/jest": "29.5.14",
59
- "@types/node": "22.15.21",
60
- "concurrently": "9.1.2",
56
+ "@changesets/cli": "2.29.5",
57
+ "@eik/esbuild-plugin": "2.0.3",
58
+ "@types/jest": "30.0.0",
59
+ "@types/node": "24.0.10",
60
+ "concurrently": "9.2.0",
61
61
  "cors": "2.8.5",
62
- "esbuild": "0.25.4",
63
- "express": "4.21.2",
64
- "jest": "29.7.0",
65
- "jest-environment-jsdom": "29.7.0",
66
- "jest-extended": "4.0.2",
62
+ "esbuild": "0.25.6",
63
+ "jest": "30.0.4",
64
+ "jest-environment-jsdom": "30.0.4",
65
+ "jest-extended": "6.0.0",
67
66
  "jest-fetch-mock": "3.0.3",
68
67
  "mockdate": "3.0.5",
69
68
  "npm-run-all": "4.1.5",
70
- "rollup": "4.41.1",
69
+ "rollup": "4.44.2",
71
70
  "rollup-plugin-dts": "6.2.1",
72
- "ts-jest": "29.3.4",
71
+ "ts-jest": "29.4.0",
73
72
  "tslib": "2.8.1",
74
73
  "typescript": "5.8.3"
75
74
  }