@amedia/user 1.5.0 → 1.5.1
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/CHANGELOG.md +30 -0
- package/index.d.ts +70 -5
- package/package.json +1 -1
- package/user.node.d.ts +216 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @amedia/user
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1297](https://github.com/amedia/amedia-user-js/pull/1297) [`cd6b9a2`](https://github.com/amedia/amedia-user-js/commit/cd6b9a29d9f698676eee2f6208148442d1bb5bed) Thanks [@hennikul](https://github.com/hennikul)! - Point the CDN bundle's type reference at the declaration file that is actually published.
|
|
8
|
+
|
|
9
|
+
The browser bundle opened with `/// <reference types="./types.d.ts" />`, but `eik.files` publishes the declarations as `user.d.ts`. No `types.d.ts` has ever existed, so the reference resolved to a 404 at every released version.
|
|
10
|
+
|
|
11
|
+
TypeScript consumers were not affected, because TypeScript locates types for `user.js` through the sibling `user.d.ts` filename convention rather than through the reference directive. The directive only mattered to resolvers that treat it as a self-types pointer, and it was a dangling reference in every case. It now names the published file.
|
|
12
|
+
|
|
13
|
+
- [#1297](https://github.com/amedia/amedia-user-js/pull/1297) [`cd6b9a2`](https://github.com/amedia/amedia-user-js/commit/cd6b9a29d9f698676eee2f6208148442d1bb5bed) Thanks [@hennikul](https://github.com/hennikul)! - Fix unresolvable `@amedia/user-core` imports in the published type declarations.
|
|
14
|
+
|
|
15
|
+
Both `index.d.ts` and `user.node.d.ts` opened with an import from `@amedia/user-core`. That package is `private: true` and never published, so consumers hit `error TS2307: Cannot find module '@amedia/user-core'` on the first line of the declaration file and lost type safety for the whole package.
|
|
16
|
+
|
|
17
|
+
`rollup-plugin-dts` resolved the workspace package through its `node_modules` symlink, which makes TypeScript report the module as an external library import. The plugin then treats it as external and emits the bare specifier instead of inlining the types. A `paths` mapping to the package source keeps resolution out of `node_modules`, so the types are bundled into the declaration output.
|
|
18
|
+
|
|
19
|
+
The published declarations now import only `jose` and `valibot`, both of which are declared dependencies and resolve for consumers.
|
|
20
|
+
|
|
21
|
+
- [#1289](https://github.com/amedia/amedia-user-js/pull/1289) [`926a8ff`](https://github.com/amedia/amedia-user-js/commit/926a8ff960f8cfc7043da8909be6275c847386ed) Thanks [@mortenlocka](https://github.com/mortenlocka)! - Log something useful when a caught value is not an `Error`. Three `catch` blocks read `.message` off the caught value without checking it: the cache's schema-parse failure logged `undefined` as its message, the navigation handler did the same, and the FedCM job already had a `'Not an Error object'` fallback but never reached it. All three now narrow the value first, so a non-`Error` throw is logged as its string form instead of disappearing.
|
|
22
|
+
|
|
23
|
+
- [#1290](https://github.com/amedia/amedia-user-js/pull/1290) [`e4bde08`](https://github.com/amedia/amedia-user-js/commit/e4bde08004050637ad59f3c80f9a4ba1d97f8163) Thanks [@mortenlocka](https://github.com/mortenlocka)! - Fix a fetcher signature that was narrower than the contract it implemented. `CoreFetcher` accepts `string | URL | Request`, but the browser fetcher declared only `RequestInfo`, so a `URL` passed through core would have been handed to a function whose type said it could not take one. The implementation always could — it forwards straight to `fetch()` — so the signature was the thing that was wrong.
|
|
24
|
+
|
|
25
|
+
- [#1291](https://github.com/amedia/amedia-user-js/pull/1291) [`00456c5`](https://github.com/amedia/amedia-user-js/commit/00456c55440189153c38f3ff3e2728f99ef9c056) Thanks [@mortenlocka](https://github.com/mortenlocka)! - Fix two latent bugs found by turning on `strictNullChecks`.
|
|
26
|
+
|
|
27
|
+
`Debouncer`'s `deepCopy` reached `Object.entries()` for anything that was not a string or an array. That throws on `null` and returns `[]` for numbers and booleans, so a primitive inside debounced parameters was silently replaced by `{}` and a `null` crashed the copy outright. Primitives and `null` are now returned as they are.
|
|
28
|
+
|
|
29
|
+
`listenForAllEvents` read the module-level root element again inside the unsubscribe function it returns. If `setRootElement` ran in between, unsubscribing removed the listener from the wrong element and left the original attached. It now captures the element it subscribed to.
|
|
30
|
+
|
|
31
|
+
The published type surface is unchanged apart from one optional constructor parameter that now spells out `| undefined`.
|
|
32
|
+
|
|
3
33
|
## 1.5.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
|
|
3
|
+
type AccessFeatures = string[];
|
|
4
|
+
interface UserAttributes {
|
|
5
|
+
uuid: string | null;
|
|
6
|
+
name: string | null;
|
|
7
|
+
trackingKey: string | null;
|
|
8
|
+
avatar: string | null;
|
|
9
|
+
/** @deprecated Always returns empty. Use data from [@amedia/user-datapoints](https://github.com/amedia/amedia-user-datapoints) instead. */
|
|
10
|
+
extraData: {
|
|
11
|
+
[index: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
access: AccessFeatures;
|
|
14
|
+
/** @deprecated Returns false for all keys. CMP data is now used. */
|
|
15
|
+
privacyPreferences: PrivacyPreferences | null;
|
|
16
|
+
sessionTrackingKey: string | null;
|
|
17
|
+
}
|
|
18
|
+
interface State {
|
|
19
|
+
isLoggedIn: boolean;
|
|
20
|
+
isCircuitBreakerTripped?: boolean;
|
|
21
|
+
emergencyMode?: string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated This is set to false as default. CMP data is now used.
|
|
25
|
+
*/
|
|
26
|
+
declare class PrivacyPreferences {
|
|
27
|
+
readonly allowResearchUsage: boolean;
|
|
28
|
+
readonly personalizedContent: boolean;
|
|
29
|
+
constructor(data: {
|
|
30
|
+
allowResearchUsage: boolean;
|
|
31
|
+
personalizedContent: boolean;
|
|
32
|
+
});
|
|
33
|
+
static default(): PrivacyPreferences;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare class ValidationError extends Error {
|
|
37
|
+
readonly code: string;
|
|
38
|
+
constructor(code: string, message: string);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class FetchTimeoutError extends Error {
|
|
42
|
+
partialData: Record<string, unknown>;
|
|
43
|
+
constructor(message: string, partialData: Record<string, unknown>);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
declare class PaywallError extends Error {
|
|
47
|
+
code: string;
|
|
48
|
+
static ERROR_RELOADED_NO_ACCESS: string;
|
|
49
|
+
static ERROR_ENABLING_ACCESS_FAILED: string;
|
|
50
|
+
static ERROR_NO_ACCESS_AFTER_SUCCESSFUL_ACTIVATION_WITH_REQUESTED_ACCESS_FEATURES: string;
|
|
51
|
+
constructor(message: string, code: string);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
declare enum AffiliationType {
|
|
55
|
+
ACCESS = "access",
|
|
56
|
+
FAMILY = "family",
|
|
57
|
+
SUBSCRIPTION = "subscription"
|
|
58
|
+
}
|
|
59
|
+
declare const PrimarySiteSchema: v.ObjectSchema<{
|
|
60
|
+
readonly domain: v.StringSchema<undefined>;
|
|
61
|
+
readonly name: v.StringSchema<undefined>;
|
|
62
|
+
readonly affiliation: v.LiteralSchema<AffiliationType.ACCESS, undefined>;
|
|
63
|
+
readonly affiliations: v.ArraySchema<v.UnionSchema<[v.LiteralSchema<AffiliationType.ACCESS, undefined>, v.LiteralSchema<AffiliationType.FAMILY, undefined>, v.LiteralSchema<AffiliationType.SUBSCRIPTION, undefined>], undefined>, undefined>;
|
|
64
|
+
}, undefined>;
|
|
65
|
+
type PrimarySite = v.InferOutput<typeof PrimarySiteSchema>;
|
|
66
|
+
|
|
67
|
+
type ClientId = string;
|
|
3
68
|
|
|
4
69
|
type NamespaceList = Array<string>;
|
|
5
70
|
|
|
@@ -19,7 +84,7 @@ declare class UserDataRequest<TUserAttributes extends UserAttributes, TStorage e
|
|
|
19
84
|
private fetchTimeoutId;
|
|
20
85
|
private lastReceivedData?;
|
|
21
86
|
private subscriptionEventListeners;
|
|
22
|
-
constructor(requestedAttributes?: TAttributes, requestedStorage?: TRequestedStorage, requestedNonUserAccess?: boolean, context?: string);
|
|
87
|
+
constructor(requestedAttributes?: TAttributes | undefined, requestedStorage?: TRequestedStorage | undefined, requestedNonUserAccess?: boolean, context?: string);
|
|
23
88
|
withContext(context: string): this;
|
|
24
89
|
withAttributes<NewAttributes extends Array<keyof TUserAttributes>>(attributes: NewAttributes): UserDataRequest<TUserAttributes, TStorage, (TAttributes[number] & NewAttributes[number])[], TRequestedStorage, TSubscribeResponse & {
|
|
25
90
|
attributes: Pick<TUserAttributes, TAttributes[number] & NewAttributes[number]>;
|
|
@@ -196,5 +261,5 @@ declare const aidUrls: {
|
|
|
196
261
|
sites: URL;
|
|
197
262
|
};
|
|
198
263
|
|
|
199
|
-
export { EmergencyModeError, PaywallUnlockRequest, SiteAccessRequest, SiteAccessResponse, TimeoutError, UserDataRequest, aidUrls, getLoginUrl, getVerificationOutcome, getVerificationUrl, goToLoginPage, logout, pollForAccess, requestDataRefresh, requireVerification };
|
|
200
|
-
export type { PaywallUnlockResponse, VerifiableAttribute, VerificationError, VerificationOutcome, VerificationRequirement, VerificationSource, VerificationStatus };
|
|
264
|
+
export { EmergencyModeError, FetchTimeoutError, PaywallError, PaywallUnlockRequest, PrivacyPreferences, SiteAccessRequest, SiteAccessResponse, TimeoutError, UserDataRequest, ValidationError, aidUrls, getLoginUrl, getVerificationOutcome, getVerificationUrl, goToLoginPage, logout, pollForAccess, requestDataRefresh, requireVerification };
|
|
265
|
+
export type { PaywallUnlockResponse, State, UserAttributes, VerifiableAttribute, VerificationError, VerificationOutcome, VerificationRequirement, VerificationSource, VerificationStatus };
|
package/package.json
CHANGED
package/user.node.d.ts
CHANGED
|
@@ -1,7 +1,219 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { AccessFeatures, AffiliationType, DEFAULT_CLIENT_ID, FetchTimeoutError, IgnoredNetworkError, LoginStatus, PrimarySite, ProblemJsonError, ResponseError, ServerError, ServiceUser, State, UserAttributes, ValidationError } from '@amedia/user-core';
|
|
1
|
+
import * as v from 'valibot';
|
|
3
2
|
import { JWTPayload } from 'jose';
|
|
4
3
|
|
|
4
|
+
type AccessFeatures = string[];
|
|
5
|
+
interface UserAttributes {
|
|
6
|
+
uuid: string | null;
|
|
7
|
+
name: string | null;
|
|
8
|
+
trackingKey: string | null;
|
|
9
|
+
avatar: string | null;
|
|
10
|
+
/** @deprecated Always returns empty. Use data from [@amedia/user-datapoints](https://github.com/amedia/amedia-user-datapoints) instead. */
|
|
11
|
+
extraData: {
|
|
12
|
+
[index: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
access: AccessFeatures;
|
|
15
|
+
/** @deprecated Returns false for all keys. CMP data is now used. */
|
|
16
|
+
privacyPreferences: PrivacyPreferences | null;
|
|
17
|
+
sessionTrackingKey: string | null;
|
|
18
|
+
}
|
|
19
|
+
interface State {
|
|
20
|
+
isLoggedIn: boolean;
|
|
21
|
+
isCircuitBreakerTripped?: boolean;
|
|
22
|
+
emergencyMode?: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated This is set to false as default. CMP data is now used.
|
|
26
|
+
*/
|
|
27
|
+
declare class PrivacyPreferences {
|
|
28
|
+
readonly allowResearchUsage: boolean;
|
|
29
|
+
readonly personalizedContent: boolean;
|
|
30
|
+
constructor(data: {
|
|
31
|
+
allowResearchUsage: boolean;
|
|
32
|
+
personalizedContent: boolean;
|
|
33
|
+
});
|
|
34
|
+
static default(): PrivacyPreferences;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare class ResponseError extends Error {
|
|
38
|
+
body: string;
|
|
39
|
+
response: Response;
|
|
40
|
+
nestedException?: Error | undefined;
|
|
41
|
+
constructor(body: string, response: Response, nestedException?: Error | undefined);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare class ProblemJson {
|
|
45
|
+
readonly type: string;
|
|
46
|
+
readonly title: string;
|
|
47
|
+
readonly detail: string;
|
|
48
|
+
readonly status: number;
|
|
49
|
+
constructor(data: {
|
|
50
|
+
type: string;
|
|
51
|
+
title: string;
|
|
52
|
+
detail: string;
|
|
53
|
+
status: number;
|
|
54
|
+
});
|
|
55
|
+
static unknown(body: string, status: number): ProblemJson;
|
|
56
|
+
}
|
|
57
|
+
declare class ProblemJsonError extends ResponseError {
|
|
58
|
+
readonly problem: ProblemJson;
|
|
59
|
+
constructor(body: string, response: Response);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare class ValidationError extends Error {
|
|
63
|
+
readonly code: string;
|
|
64
|
+
constructor(code: string, message: string);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare class ServerError extends Error {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
declare class FetchTimeoutError extends Error {
|
|
71
|
+
partialData: Record<string, unknown>;
|
|
72
|
+
constructor(message: string, partialData: Record<string, unknown>);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class IgnoredNetworkError extends Error {
|
|
76
|
+
originalError?: unknown | undefined;
|
|
77
|
+
constructor(originalError?: unknown | undefined);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare const ServiceUserSchema: Omit<v.ObjectSchema<{
|
|
81
|
+
readonly uuid: v.StringSchema<undefined>;
|
|
82
|
+
readonly name: v.StringSchema<undefined>;
|
|
83
|
+
readonly name_verified_at: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
84
|
+
readonly tracking_key: v.StringSchema<undefined>;
|
|
85
|
+
readonly avatar: v.StringSchema<undefined>;
|
|
86
|
+
readonly access: v.ArraySchema<v.ObjectSchema<{
|
|
87
|
+
readonly site_domain: v.StringSchema<undefined>;
|
|
88
|
+
readonly access_features: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
89
|
+
}, undefined>, undefined>;
|
|
90
|
+
readonly privacy_preferences: v.ObjectSchema<{
|
|
91
|
+
readonly allow_research_usage: v.BooleanSchema<undefined>;
|
|
92
|
+
readonly personalized_content: v.BooleanSchema<undefined>;
|
|
93
|
+
}, undefined>;
|
|
94
|
+
readonly session_tracking_key: v.StringSchema<undefined>;
|
|
95
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
96
|
+
readonly entries: {
|
|
97
|
+
readonly uuid: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
99
|
+
readonly name_verified_at: v.OptionalSchema<v.NullishSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
100
|
+
readonly tracking_key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
101
|
+
readonly avatar: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
102
|
+
readonly access: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
103
|
+
readonly site_domain: v.StringSchema<undefined>;
|
|
104
|
+
readonly access_features: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
105
|
+
}, undefined>, undefined>, undefined>;
|
|
106
|
+
readonly privacy_preferences: v.OptionalSchema<v.ObjectSchema<{
|
|
107
|
+
readonly allow_research_usage: v.BooleanSchema<undefined>;
|
|
108
|
+
readonly personalized_content: v.BooleanSchema<undefined>;
|
|
109
|
+
}, undefined>, undefined>;
|
|
110
|
+
readonly session_tracking_key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
111
|
+
};
|
|
112
|
+
readonly "~standard": v.StandardProps<{
|
|
113
|
+
uuid?: string | undefined;
|
|
114
|
+
name?: string | undefined;
|
|
115
|
+
name_verified_at?: string | null | undefined;
|
|
116
|
+
tracking_key?: string | undefined;
|
|
117
|
+
avatar?: string | undefined;
|
|
118
|
+
access?: {
|
|
119
|
+
site_domain: string;
|
|
120
|
+
access_features: string[];
|
|
121
|
+
}[] | undefined;
|
|
122
|
+
privacy_preferences?: {
|
|
123
|
+
allow_research_usage: boolean;
|
|
124
|
+
personalized_content: boolean;
|
|
125
|
+
} | undefined;
|
|
126
|
+
session_tracking_key?: string | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
uuid?: string | undefined;
|
|
129
|
+
name?: string | undefined;
|
|
130
|
+
name_verified_at?: string | null | undefined;
|
|
131
|
+
tracking_key?: string | undefined;
|
|
132
|
+
avatar?: string | undefined;
|
|
133
|
+
access?: {
|
|
134
|
+
site_domain: string;
|
|
135
|
+
access_features: string[];
|
|
136
|
+
}[] | undefined;
|
|
137
|
+
privacy_preferences?: {
|
|
138
|
+
allow_research_usage: boolean;
|
|
139
|
+
personalized_content: boolean;
|
|
140
|
+
} | undefined;
|
|
141
|
+
session_tracking_key?: string | undefined;
|
|
142
|
+
}>;
|
|
143
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
144
|
+
uuid?: string | undefined;
|
|
145
|
+
name?: string | undefined;
|
|
146
|
+
name_verified_at?: string | null | undefined;
|
|
147
|
+
tracking_key?: string | undefined;
|
|
148
|
+
avatar?: string | undefined;
|
|
149
|
+
access?: {
|
|
150
|
+
site_domain: string;
|
|
151
|
+
access_features: string[];
|
|
152
|
+
}[] | undefined;
|
|
153
|
+
privacy_preferences?: {
|
|
154
|
+
allow_research_usage: boolean;
|
|
155
|
+
personalized_content: boolean;
|
|
156
|
+
} | undefined;
|
|
157
|
+
session_tracking_key?: string | undefined;
|
|
158
|
+
}, v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.BooleanIssue>;
|
|
159
|
+
readonly "~types"?: {
|
|
160
|
+
readonly input: {
|
|
161
|
+
uuid?: string | undefined;
|
|
162
|
+
name?: string | undefined;
|
|
163
|
+
name_verified_at?: string | null | undefined;
|
|
164
|
+
tracking_key?: string | undefined;
|
|
165
|
+
avatar?: string | undefined;
|
|
166
|
+
access?: {
|
|
167
|
+
site_domain: string;
|
|
168
|
+
access_features: string[];
|
|
169
|
+
}[] | undefined;
|
|
170
|
+
privacy_preferences?: {
|
|
171
|
+
allow_research_usage: boolean;
|
|
172
|
+
personalized_content: boolean;
|
|
173
|
+
} | undefined;
|
|
174
|
+
session_tracking_key?: string | undefined;
|
|
175
|
+
};
|
|
176
|
+
readonly output: {
|
|
177
|
+
uuid?: string | undefined;
|
|
178
|
+
name?: string | undefined;
|
|
179
|
+
name_verified_at?: string | null | undefined;
|
|
180
|
+
tracking_key?: string | undefined;
|
|
181
|
+
avatar?: string | undefined;
|
|
182
|
+
access?: {
|
|
183
|
+
site_domain: string;
|
|
184
|
+
access_features: string[];
|
|
185
|
+
}[] | undefined;
|
|
186
|
+
privacy_preferences?: {
|
|
187
|
+
allow_research_usage: boolean;
|
|
188
|
+
personalized_content: boolean;
|
|
189
|
+
} | undefined;
|
|
190
|
+
session_tracking_key?: string | undefined;
|
|
191
|
+
};
|
|
192
|
+
readonly issue: v.StringIssue | v.ArrayIssue | v.ObjectIssue | v.BooleanIssue;
|
|
193
|
+
} | undefined;
|
|
194
|
+
};
|
|
195
|
+
type ServiceUser = v.InferOutput<typeof ServiceUserSchema>;
|
|
196
|
+
declare enum LoginStatus {
|
|
197
|
+
INITIATED = "INITIATED",
|
|
198
|
+
COMPLETED = "COMPLETED",
|
|
199
|
+
ERROR = "ERROR"
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare enum AffiliationType {
|
|
203
|
+
ACCESS = "access",
|
|
204
|
+
FAMILY = "family",
|
|
205
|
+
SUBSCRIPTION = "subscription"
|
|
206
|
+
}
|
|
207
|
+
declare const PrimarySiteSchema: v.ObjectSchema<{
|
|
208
|
+
readonly domain: v.StringSchema<undefined>;
|
|
209
|
+
readonly name: v.StringSchema<undefined>;
|
|
210
|
+
readonly affiliation: v.LiteralSchema<AffiliationType.ACCESS, undefined>;
|
|
211
|
+
readonly affiliations: v.ArraySchema<v.UnionSchema<[v.LiteralSchema<AffiliationType.ACCESS, undefined>, v.LiteralSchema<AffiliationType.FAMILY, undefined>, v.LiteralSchema<AffiliationType.SUBSCRIPTION, undefined>], undefined>, undefined>;
|
|
212
|
+
}, undefined>;
|
|
213
|
+
type PrimarySite = v.InferOutput<typeof PrimarySiteSchema>;
|
|
214
|
+
|
|
215
|
+
declare const DEFAULT_CLIENT_ID = "default";
|
|
216
|
+
|
|
5
217
|
interface AidClientOptions {
|
|
6
218
|
/** Absolute base URL for aID (e.g. "https://aid.example.no"). Required. */
|
|
7
219
|
baseUrl: string;
|
|
@@ -110,5 +322,5 @@ interface ValidatedToken {
|
|
|
110
322
|
*/
|
|
111
323
|
declare const validateToken: (jwt: string, options: ValidateTokenOptions) => Promise<ValidatedToken>;
|
|
112
324
|
|
|
113
|
-
export { clearJwksCache, createAidClient, createShamoClient, validateToken };
|
|
114
|
-
export type { AidClient, AidClientOptions, JwksOptions, ShamoClient, ShamoClientOptions, ValidateTokenOptions, ValidatedToken };
|
|
325
|
+
export { AffiliationType, DEFAULT_CLIENT_ID, FetchTimeoutError, IgnoredNetworkError, LoginStatus, ProblemJsonError, ResponseError, ServerError, ValidationError, clearJwksCache, createAidClient, createShamoClient, validateToken };
|
|
326
|
+
export type { AccessFeatures, AidClient, AidClientOptions, JwksOptions, PrimarySite, ServiceUser, ShamoClient, ShamoClientOptions, State, UserAttributes, ValidateTokenOptions, ValidatedToken };
|