@vunexa/lixa 0.1.4 → 0.1.6-alpha.10
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 +530 -15
- package/README.template.md +288 -44
- package/dist/dao/session-cache.d.ts +2 -1
- package/dist/dao/session-cache.d.ts.map +1 -1
- package/dist/dao/state-cache.d.ts +4 -0
- package/dist/dao/state-cache.d.ts.map +1 -1
- package/dist/dao/types.d.ts +68 -75
- package/dist/dao/types.d.ts.map +1 -1
- package/dist/errors.d.ts +90 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/export-types/index.d.ts +435 -107
- package/dist/index.cjs +590 -95
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +411 -108
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +569 -94
- package/dist/index.js.map +1 -1
- package/dist/lixa.d.ts +57 -21
- package/dist/lixa.d.ts.map +1 -1
- package/dist/models/session.d.ts +17 -11
- package/dist/models/session.d.ts.map +1 -1
- package/dist/types.d.ts +39 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cookies.d.ts +142 -0
- package/dist/utils/cookies.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base error class for all Lixa authentication and authorization errors.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare class LixaError extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* Standard error code string.
|
|
9
|
+
*/
|
|
10
|
+
readonly code: string;
|
|
11
|
+
/**
|
|
12
|
+
* Additional error context data.
|
|
13
|
+
*/
|
|
14
|
+
readonly details: Record<string, unknown> | undefined;
|
|
15
|
+
constructor(message: string, code?: string, details?: Record<string, unknown>);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Thrown when an OAuth state parameter is invalid, missing, or has expired.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare class InvalidStateError extends LixaError {
|
|
23
|
+
constructor(message?: string, details?: Record<string, unknown>);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Thrown when attempting to use a provider that is not configured in the Lixa instance.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare class ProviderNotConfiguredError extends LixaError {
|
|
31
|
+
constructor(provider: string, details?: Record<string, unknown>);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Thrown when a provider configuration is invalid or missing required credentials.
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare class InvalidProviderConfigError extends LixaError {
|
|
39
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Thrown when OAuth callback parameters (e.g. authorization code or state) are missing or malformed.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare class InvalidOAuthCallbackError extends LixaError {
|
|
47
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Thrown when exchanging an authorization code for OAuth tokens fails at the provider endpoint.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare class TokenExchangeError extends LixaError {
|
|
55
|
+
readonly status: number | undefined;
|
|
56
|
+
constructor(message: string, status?: number, details?: Record<string, unknown>);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Thrown when a user session is not found or has expired.
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export declare class SessionNotFoundError extends LixaError {
|
|
64
|
+
constructor(message?: string, details?: Record<string, unknown>);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Thrown when account linking fails, e.g. when unverified email linking is rejected.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare class EmailNotVerifiedError extends LixaError {
|
|
72
|
+
constructor(email?: string, details?: Record<string, unknown>);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Thrown when unlinking an account violates security constraints (e.g. unlinking the only login provider).
|
|
76
|
+
*
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
export declare class AccountUnlinkError extends LixaError {
|
|
80
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Thrown when a refresh token is missing or token refresh fails for a connected resource.
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
export declare class RefreshTokenError extends LixaError {
|
|
88
|
+
constructor(message: string, details?: Record<string, unknown>);
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,SAAU,SAAQ,KAAK;IAClC;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,SAAgB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAEjD,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAqB,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAS5F;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;gBAClC,OAAO,GAAE,MAAmC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAG5F;AAED;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,SAAS;gBAC3C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EA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