@absolutejs/auth 0.29.0-beta.2 → 0.29.0-beta.4

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.
@@ -24,6 +24,7 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
24
24
  query: unknown;
25
25
  headers: unknown;
26
26
  response: {
27
+ 401: "Invalid or expired setup link";
27
28
  200: {
28
29
  readonly capabilities: import("./types").SetupCapability[];
29
30
  readonly configured: {
@@ -44,7 +45,6 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
44
45
  baseUrl: string;
45
46
  } | undefined;
46
47
  };
47
- 401: "Invalid or expired setup link";
48
48
  };
49
49
  };
50
50
  };
@@ -64,12 +64,13 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
64
64
  query: unknown;
65
65
  headers: unknown;
66
66
  response: {
67
+ 401: "Invalid or expired setup link";
68
+ 403: "This setup link cannot configure SAML";
69
+ 501: "SSO is not configured";
67
70
  200: {
68
71
  readonly configured: true;
69
72
  readonly type: "saml";
70
73
  };
71
- 401: "Invalid or expired setup link";
72
- 403: "This setup link cannot configure SAML";
73
74
  422: {
74
75
  type: "validation";
75
76
  on: string;
@@ -79,7 +80,6 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
79
80
  property?: string;
80
81
  expected?: string;
81
82
  };
82
- 501: "SSO is not configured";
83
83
  };
84
84
  };
85
85
  };
@@ -101,12 +101,13 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
101
101
  query: unknown;
102
102
  headers: unknown;
103
103
  response: {
104
+ 401: "Invalid or expired setup link";
105
+ 403: "This setup link cannot configure OIDC";
106
+ 501: "SSO is not configured";
104
107
  200: {
105
108
  readonly configured: true;
106
109
  readonly type: "oidc";
107
110
  };
108
- 401: "Invalid or expired setup link";
109
- 403: "This setup link cannot configure OIDC";
110
111
  422: {
111
112
  type: "validation";
112
113
  on: string;
@@ -116,7 +117,6 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
116
117
  property?: string;
117
118
  expected?: string;
118
119
  };
119
- 501: "SSO is not configured";
120
120
  };
121
121
  };
122
122
  };
@@ -132,14 +132,14 @@ export declare const portalRoutes: ({ emit, onScimTokenCreated, onSsoConnectionC
132
132
  query: unknown;
133
133
  headers: unknown;
134
134
  response: {
135
+ 401: "Invalid or expired setup link";
136
+ 403: "This setup link cannot configure SCIM";
137
+ 501: "SCIM is not configured";
135
138
  200: {
136
139
  readonly baseUrl: `${string}/${string}`;
137
140
  readonly token: string;
138
141
  readonly tokenId: string;
139
142
  };
140
- 401: "Invalid or expired setup link";
141
- 403: "This setup link cannot configure SCIM";
142
- 501: "SCIM is not configured";
143
143
  };
144
144
  };
145
145
  };
@@ -30,7 +30,7 @@ export declare const resolveClientProviderEntry: ({ clientName, clientProviders,
30
30
  entry?: undefined;
31
31
  } | {
32
32
  entry: ClientProviderEntry;
33
- error?: undefined;
33
+ readonly error?: undefined;
34
34
  } | {
35
35
  error: "Client variant is required";
36
36
  entry?: undefined;
@@ -47,7 +47,7 @@ export declare const resolveProviderClientConfiguration: ({ clientName, provider
47
47
  config?: undefined;
48
48
  } | {
49
49
  config: OAuth2ProviderClientConfiguration<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom"> | undefined;
50
- error?: undefined;
50
+ readonly error?: undefined;
51
51
  } | {
52
52
  error: "Client variant is required";
53
53
  config?: undefined;
@@ -30,11 +30,11 @@ export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles,
30
30
  query: unknown;
31
31
  headers: unknown;
32
32
  response: {
33
+ 401: "Authentication required";
34
+ 403: "Cannot manage roles";
33
35
  200: {
34
36
  readonly roles: readonly import("./types").Role[];
35
37
  };
36
- 401: "Authentication required";
37
- 403: "Cannot manage roles";
38
38
  422: {
39
39
  type: "validation";
40
40
  on: string;
@@ -64,12 +64,12 @@ export declare const roleRoutes: <UserType>({ authSessionStore, canManageRoles,
64
64
  query: unknown;
65
65
  headers: unknown;
66
66
  response: {
67
- 200: {
68
- readonly roles: string[];
69
- };
70
67
  401: "Authentication required";
71
68
  403: "Cannot manage roles";
72
69
  404: "Membership not found";
70
+ 200: {
71
+ readonly roles: string[];
72
+ };
73
73
  422: {
74
74
  type: "validation";
75
75
  on: string;
@@ -35,9 +35,9 @@ export declare const authorize: ({ clientProviders, authorizeRoute, onAuthorizeS
35
35
  };
36
36
  headers: unknown;
37
37
  response: {
38
- 200: Response;
39
38
  400: "Cookies are missing" | "Provider is required";
40
39
  401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found";
40
+ 200: Response;
41
41
  422: {
42
42
  type: "validation";
43
43
  on: string;
@@ -67,9 +67,9 @@ export declare const authorize: ({ clientProviders, authorizeRoute, onAuthorizeS
67
67
  };
68
68
  headers: unknown;
69
69
  response: {
70
- 200: Response;
71
70
  400: "Cookies are missing" | "Provider is required";
72
71
  401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found";
72
+ 200: Response;
73
73
  422: {
74
74
  type: "validation";
75
75
  on: string;
@@ -32,9 +32,9 @@ export declare const profile: <UserType>({ clientProviders, profileRoute, onProf
32
32
  query: unknown;
33
33
  headers: unknown;
34
34
  response: {
35
- 200: Response;
36
35
  400: "Cookies are missing" | "Session has no access token to fetch a profile";
37
36
  401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "Invalid provider" | "No user session found";
37
+ 200: Response;
38
38
  422: {
39
39
  type: "validation";
40
40
  on: string;
@@ -35,9 +35,10 @@ export declare const refresh: <UserType>({ authSessionStore, clientProviders, re
35
35
  query: unknown;
36
36
  headers: unknown;
37
37
  response: {
38
- 200: Response;
39
38
  400: "Cookies are missing" | "Invalid provider" | "No refresh token found";
40
39
  401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
40
+ 501: "Provider is not refreshable";
41
+ 200: Response;
41
42
  422: {
42
43
  type: "validation";
43
44
  on: string;
@@ -48,7 +49,6 @@ export declare const refresh: <UserType>({ authSessionStore, clientProviders, re
48
49
  expected?: string;
49
50
  };
50
51
  500: "Failed to refresh token";
51
- 501: "Provider is not refreshable";
52
52
  };
53
53
  };
54
54
  };
@@ -34,9 +34,10 @@ export declare const revoke: <UserType>({ authSessionStore, clientProviders, rev
34
34
  query: unknown;
35
35
  headers: unknown;
36
36
  response: {
37
- 200: Response;
38
37
  400: "Cookies are missing" | "Invalid provider" | "Session has no access token to revoke";
39
38
  401: "Provider is required" | "Client provider not found" | "Client variant is required" | "Client variant not found" | "No auth provider found" | "No user session found";
39
+ 501: "Provider does not support revocation";
40
+ 200: Response;
40
41
  422: {
41
42
  type: "validation";
42
43
  on: string;
@@ -47,7 +48,6 @@ export declare const revoke: <UserType>({ authSessionStore, clientProviders, rev
47
48
  expected?: string;
48
49
  };
49
50
  500: "Failed to revoke token";
50
- 501: "Provider does not support revocation";
51
51
  };
52
52
  };
53
53
  };
@@ -33,10 +33,11 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
33
33
  query: unknown;
34
34
  headers: unknown;
35
35
  response: {
36
+ 401: "Authentication required";
37
+ 501: "Session management requires an authSessionStore";
36
38
  200: {
37
39
  readonly sessions: SessionSummary[];
38
40
  };
39
- 401: "Authentication required";
40
41
  422: {
41
42
  type: "validation";
42
43
  on: string;
@@ -46,7 +47,6 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
46
47
  property?: string;
47
48
  expected?: string;
48
49
  };
49
- 501: "Session management requires an authSessionStore";
50
50
  };
51
51
  };
52
52
  };
@@ -61,12 +61,13 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
61
61
  query: unknown;
62
62
  headers: unknown;
63
63
  response: {
64
- 200: {
65
- readonly revoked: `${string}-${string}-${string}-${string}-${string}`;
66
- };
67
64
  400: "Invalid session id";
68
65
  401: "Authentication required";
66
+ 501: "Session management requires an authSessionStore";
69
67
  404: "Session not found";
68
+ 200: {
69
+ readonly revoked: `${string}-${string}-${string}-${string}-${string}`;
70
+ };
70
71
  422: {
71
72
  type: "validation";
72
73
  on: string;
@@ -76,7 +77,6 @@ export declare const sessionRoutes: <UserType>({ authSessionStore, getUserId, se
76
77
  property?: string;
77
78
  expected?: string;
78
79
  };
79
- 501: "Session management requires an authSessionStore";
80
80
  };
81
81
  };
82
82
  };
@@ -32,9 +32,9 @@ export declare const signout: <UserType>({ authSessionStore, signoutRoute, onSig
32
32
  query: unknown;
33
33
  headers: unknown;
34
34
  response: {
35
- 200: Response;
36
35
  400: "Cookies are missing";
37
36
  401: "No auth provider found" | "No user session id found";
37
+ 200: Response;
38
38
  422: {
39
39
  type: "validation";
40
40
  on: string;
@@ -32,10 +32,10 @@ export declare const userStatus: <UserType>({ authSessionStore, statusRoute, onS
32
32
  query: unknown;
33
33
  headers: unknown;
34
34
  response: {
35
+ 400: "Cookies are missing";
35
36
  200: {
36
37
  user: NonNullable<UserType> | null;
37
38
  };
38
- 400: "Cookies are missing";
39
39
  422: {
40
40
  type: "validation";
41
41
  on: string;
@@ -32,9 +32,9 @@ export declare const ssoDiscoveryRoute: ({ getOrganizationByEmailDomain, ssoConn
32
32
  };
33
33
  headers: unknown;
34
34
  response: {
35
- 200: Response;
36
35
  400: "An \"email\" query parameter is required" | "A valid email address is required";
37
36
  404: "No SSO organization is configured for this email domain" | "No SSO connection is configured for this organization";
37
+ 200: Response;
38
38
  422: {
39
39
  type: "validation";
40
40
  on: string;
@@ -32,8 +32,8 @@ export declare const oidcSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
32
32
  query: unknown;
33
33
  headers: unknown;
34
34
  response: {
35
- 200: Response;
36
35
  404: "No OIDC connection is configured for this organization";
36
+ 200: Response;
37
37
  422: {
38
38
  type: "validation";
39
39
  on: string;
@@ -59,9 +59,9 @@ export declare const oidcSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
59
59
  };
60
60
  headers: unknown;
61
61
  response: {
62
- 200: Response;
63
62
  400: "SSO session cookies are missing" | "Invalid SSO callback request" | "SSO organization mismatch" | "OIDC token response is missing an id_token";
64
63
  404: "No OIDC connection is configured for this organization";
64
+ 200: Response;
65
65
  422: {
66
66
  type: "validation";
67
67
  on: string;
@@ -34,8 +34,8 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
34
34
  query: unknown;
35
35
  headers: unknown;
36
36
  response: {
37
- 200: Response;
38
37
  404: "No SAML connection is configured for this organization";
38
+ 200: Response;
39
39
  422: {
40
40
  type: "validation";
41
41
  on: string;
@@ -61,8 +61,8 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
61
61
  query: unknown;
62
62
  headers: unknown;
63
63
  response: {
64
- 200: Response;
65
64
  404: "No SAML connection is configured for this organization";
65
+ 200: Response;
66
66
  422: {
67
67
  type: "validation";
68
68
  on: string;
@@ -86,8 +86,8 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
86
86
  query: unknown;
87
87
  headers: unknown;
88
88
  response: {
89
- 200: Response;
90
89
  404: "No SAML connection is configured for this organization";
90
+ 200: Response;
91
91
  422: {
92
92
  type: "validation";
93
93
  on: string;
@@ -137,9 +137,10 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
137
137
  };
138
138
  headers: unknown;
139
139
  response: {
140
- 200: Response;
141
140
  400: "Missing SAMLRequest or SAMLResponse" | "Invalid SAML LogoutRequest";
141
+ 501: "SAML Single Logout is not configured";
142
142
  404: "No SAML connection is configured for this organization";
143
+ 200: Response;
143
144
  422: {
144
145
  type: "validation";
145
146
  on: string;
@@ -150,7 +151,6 @@ export declare const samlSsoRoutes: <UserType>({ authSessionStore, getSsoUser, o
150
151
  expected?: string;
151
152
  };
152
153
  500: "SAML logout failed";
153
- 501: "SAML Single Logout is not configured";
154
154
  };
155
155
  };
156
156
  };
@@ -28,10 +28,10 @@ export declare const webauthnRoutes: <UserType>({ authSessionStore, challengeDur
28
28
  query: unknown;
29
29
  headers: unknown;
30
30
  response: {
31
+ 401: "Authentication required";
31
32
  200: {
32
33
  [x: string]: unknown;
33
34
  };
34
- 401: "Authentication required";
35
35
  422: {
36
36
  type: "validation";
37
37
  on: string;
@@ -56,12 +56,12 @@ export declare const webauthnRoutes: <UserType>({ authSessionStore, challengeDur
56
56
  query: unknown;
57
57
  headers: unknown;
58
58
  response: {
59
+ 400: "No registration challenge in progress" | "WebAuthn registration failed";
60
+ 401: "Authentication required";
59
61
  200: {
60
62
  readonly credentialId: string;
61
63
  readonly verified: true;
62
64
  };
63
- 400: "No registration challenge in progress" | "WebAuthn registration failed";
64
- 401: "Authentication required";
65
65
  422: {
66
66
  type: "validation";
67
67
  on: string;
@@ -115,11 +115,11 @@ export declare const webauthnRoutes: <UserType>({ authSessionStore, challengeDur
115
115
  query: unknown;
116
116
  headers: unknown;
117
117
  response: {
118
+ 400: "No authentication challenge in progress";
119
+ 401: "Unknown credential" | "WebAuthn authentication failed";
118
120
  200: {
119
121
  readonly status: "authenticated";
120
122
  };
121
- 400: "No authentication challenge in progress";
122
- 401: "Unknown credential" | "WebAuthn authentication failed";
123
123
  422: {
124
124
  type: "validation";
125
125
  on: string;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.29.0-beta.2",
2
+ "version": "0.29.0-beta.4",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {