@aura-stack/auth 0.1.0-rc.9 → 0.2.0-rc.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.
Files changed (153) hide show
  1. package/dist/@types/index.cjs +15 -15
  2. package/dist/@types/index.d.ts +7 -31
  3. package/dist/@types/index.js +1 -1
  4. package/dist/@types/router.d.cjs +1 -1
  5. package/dist/@types/router.d.d.ts +7 -7
  6. package/dist/@types/utility.cjs +15 -15
  7. package/dist/@types/utility.d.ts +4 -8
  8. package/dist/@types/utility.js +1 -1
  9. package/dist/actions/callback/access-token.cjs +176 -155
  10. package/dist/actions/callback/access-token.d.ts +15 -20
  11. package/dist/actions/callback/access-token.js +10 -4
  12. package/dist/actions/callback/callback.cjs +394 -490
  13. package/dist/actions/callback/callback.d.ts +10 -12
  14. package/dist/actions/callback/callback.js +16 -12
  15. package/dist/actions/callback/userinfo.cjs +166 -145
  16. package/dist/actions/callback/userinfo.d.ts +9 -9
  17. package/dist/actions/callback/userinfo.js +12 -6
  18. package/dist/actions/csrfToken/csrfToken.cjs +112 -190
  19. package/dist/actions/csrfToken/csrfToken.d.ts +3 -3
  20. package/dist/actions/csrfToken/csrfToken.js +12 -8
  21. package/dist/actions/index.cjs +652 -814
  22. package/dist/actions/index.d.ts +13 -13
  23. package/dist/actions/index.js +34 -18
  24. package/dist/actions/session/session.cjs +86 -176
  25. package/dist/actions/session/session.d.ts +3 -3
  26. package/dist/actions/session/session.js +10 -7
  27. package/dist/actions/signIn/authorization.cjs +254 -263
  28. package/dist/actions/signIn/authorization.d.ts +12 -18
  29. package/dist/actions/signIn/authorization.js +16 -6
  30. package/dist/actions/signIn/signIn.cjs +320 -456
  31. package/dist/actions/signIn/signIn.d.ts +10 -10
  32. package/dist/actions/signIn/signIn.js +13 -10
  33. package/dist/actions/signOut/signOut.cjs +304 -473
  34. package/dist/actions/signOut/signOut.d.ts +3 -3
  35. package/dist/actions/signOut/signOut.js +14 -11
  36. package/dist/assert.cjs +40 -36
  37. package/dist/assert.d.ts +13 -4
  38. package/dist/assert.js +12 -2
  39. package/dist/chunk-3EUWD5BB.js +63 -0
  40. package/dist/chunk-42XB3YCW.js +19 -17
  41. package/dist/chunk-6R2YZ4AC.js +22 -0
  42. package/dist/chunk-A3N4PVAT.js +70 -0
  43. package/dist/chunk-B737EUJV.js +22 -0
  44. package/dist/chunk-CXLATHS5.js +143 -0
  45. package/dist/chunk-E3OXBRYF.js +19 -17
  46. package/dist/chunk-EIL2FPSS.js +22 -0
  47. package/dist/chunk-EMKJA2GJ.js +89 -0
  48. package/dist/chunk-FIPU4MLT.js +18 -16
  49. package/dist/chunk-FKRDCWBF.js +19 -17
  50. package/dist/chunk-GA2SMTJO.js +58 -0
  51. package/dist/chunk-HP34YGGJ.js +22 -0
  52. package/dist/chunk-HT4YLL7N.js +35 -0
  53. package/dist/chunk-IKHPGFCW.js +11 -9
  54. package/dist/chunk-IUYZQTJV.js +30 -0
  55. package/dist/chunk-IVET23KF.js +58 -0
  56. package/dist/chunk-JVFTCTTE.js +33 -0
  57. package/dist/chunk-KRNOMBXQ.js +19 -17
  58. package/dist/chunk-KSWLO5ZU.js +102 -0
  59. package/dist/chunk-N2APGLXA.js +71 -0
  60. package/dist/chunk-N4SX7TZT.js +96 -0
  61. package/dist/chunk-RRLIF4PQ.js +55 -0
  62. package/dist/chunk-STHEPPUZ.js +8 -6
  63. package/dist/chunk-TLE4PXY3.js +39 -0
  64. package/dist/chunk-W6LG7BFW.js +197 -0
  65. package/dist/chunk-YRCB5FLE.js +79 -0
  66. package/dist/chunk-ZNCZVF6U.js +14 -0
  67. package/dist/cookie.cjs +222 -187
  68. package/dist/cookie.d.ts +39 -76
  69. package/dist/cookie.js +27 -34
  70. package/dist/errors.cjs +85 -0
  71. package/dist/errors.d.ts +49 -0
  72. package/dist/errors.js +18 -0
  73. package/dist/headers.cjs +28 -28
  74. package/dist/headers.d.ts +2 -2
  75. package/dist/headers.js +6 -2
  76. package/dist/index-DkaLJFn8.d.ts +679 -0
  77. package/dist/index.cjs +1074 -1007
  78. package/dist/index.d.ts +10 -31
  79. package/dist/index.js +85 -51
  80. package/dist/jose.cjs +74 -66
  81. package/dist/jose.d.ts +11 -8
  82. package/dist/jose.js +10 -5
  83. package/dist/oauth/bitbucket.cjs +38 -38
  84. package/dist/oauth/bitbucket.d.ts +7 -7
  85. package/dist/oauth/bitbucket.js +6 -2
  86. package/dist/oauth/discord.cjs +47 -48
  87. package/dist/oauth/discord.d.ts +7 -7
  88. package/dist/oauth/discord.js +6 -2
  89. package/dist/oauth/figma.cjs +39 -39
  90. package/dist/oauth/figma.d.ts +7 -7
  91. package/dist/oauth/figma.js +6 -2
  92. package/dist/oauth/github.cjs +31 -31
  93. package/dist/oauth/github.d.ts +7 -7
  94. package/dist/oauth/github.js +6 -2
  95. package/dist/oauth/gitlab.cjs +39 -39
  96. package/dist/oauth/gitlab.d.ts +7 -7
  97. package/dist/oauth/gitlab.js +6 -2
  98. package/dist/oauth/index.cjs +350 -180
  99. package/dist/oauth/index.d.ts +7 -26
  100. package/dist/oauth/index.js +51 -9
  101. package/dist/oauth/mailchimp.cjs +46 -0
  102. package/dist/oauth/mailchimp.d.ts +7 -0
  103. package/dist/oauth/mailchimp.js +6 -0
  104. package/dist/oauth/pinterest.cjs +46 -0
  105. package/dist/oauth/pinterest.d.ts +7 -0
  106. package/dist/oauth/pinterest.js +6 -0
  107. package/dist/oauth/spotify.cjs +39 -39
  108. package/dist/oauth/spotify.d.ts +7 -7
  109. package/dist/oauth/spotify.js +6 -2
  110. package/dist/oauth/strava.cjs +46 -0
  111. package/dist/oauth/strava.d.ts +7 -0
  112. package/dist/oauth/strava.js +6 -0
  113. package/dist/oauth/x.cjs +39 -39
  114. package/dist/oauth/x.d.ts +7 -7
  115. package/dist/oauth/x.js +6 -2
  116. package/dist/request.cjs +38 -0
  117. package/dist/request.d.ts +13 -0
  118. package/dist/request.js +6 -0
  119. package/dist/schemas.cjs +103 -97
  120. package/dist/schemas.d.ts +96 -126
  121. package/dist/schemas.js +20 -18
  122. package/dist/secure.cjs +106 -101
  123. package/dist/secure.d.ts +17 -17
  124. package/dist/secure.js +19 -4
  125. package/dist/utils.cjs +197 -135
  126. package/dist/utils.d.ts +20 -26
  127. package/dist/utils.js +25 -21
  128. package/package.json +8 -7
  129. package/dist/chunk-256KIVJL.js +0 -110
  130. package/dist/chunk-6SM22VVJ.js +0 -15
  131. package/dist/chunk-CAKJT3KS.js +0 -77
  132. package/dist/chunk-EBPE35JT.js +0 -29
  133. package/dist/chunk-FJUDBLCP.js +0 -52
  134. package/dist/chunk-GZU3RBTB.js +0 -51
  135. package/dist/chunk-HGJ4TXY4.js +0 -105
  136. package/dist/chunk-HMRKN75I.js +0 -74
  137. package/dist/chunk-JAPMIE6S.js +0 -8
  138. package/dist/chunk-LLR722CL.js +0 -75
  139. package/dist/chunk-RLT4RFKV.js +0 -36
  140. package/dist/chunk-SJPDVKUS.js +0 -93
  141. package/dist/chunk-SMQO5WD7.js +0 -20
  142. package/dist/chunk-UJJ7R56J.js +0 -42
  143. package/dist/chunk-UTDLUEEG.js +0 -25
  144. package/dist/chunk-VFTYH33W.js +0 -44
  145. package/dist/chunk-XXJKNKGQ.js +0 -27
  146. package/dist/chunk-ZV4BH47P.js +0 -156
  147. package/dist/error.cjs +0 -88
  148. package/dist/error.d.ts +0 -62
  149. package/dist/error.js +0 -9
  150. package/dist/index-DpfbvTZ_.d.ts +0 -597
  151. package/dist/response.cjs +0 -34
  152. package/dist/response.d.ts +0 -10
  153. package/dist/response.js +0 -2
package/dist/schemas.cjs CHANGED
@@ -1,105 +1,111 @@
1
- "use strict"
2
- var __defProp = Object.defineProperty
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor
4
- var __getOwnPropNames = Object.getOwnPropertyNames
5
- var __hasOwnProp = Object.prototype.hasOwnProperty
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
6
  var __export = (target, all) => {
7
- for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
8
- }
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
9
10
  var __copyProps = (to, from, except, desc) => {
10
- if ((from && typeof from === "object") || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable })
14
- }
15
- return to
16
- }
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod)
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
19
 
19
20
  // src/schemas.ts
20
- var schemas_exports = {}
21
+ var schemas_exports = {};
21
22
  __export(schemas_exports, {
22
- OAuthAccessToken: () => OAuthAccessToken,
23
- OAuthAccessTokenErrorResponse: () => OAuthAccessTokenErrorResponse,
24
- OAuthAccessTokenResponse: () => OAuthAccessTokenResponse,
25
- OAuthAuthorization: () => OAuthAuthorization,
26
- OAuthAuthorizationErrorResponse: () => OAuthAuthorizationErrorResponse,
27
- OAuthAuthorizationResponse: () => OAuthAuthorizationResponse,
28
- OAuthErrorResponse: () => OAuthErrorResponse,
29
- OAuthProviderConfigSchema: () => OAuthProviderConfigSchema,
30
- })
31
- module.exports = __toCommonJS(schemas_exports)
32
- var import_v4 = require("zod/v4")
33
- var OAuthProviderConfigSchema = (0, import_v4.object)({
34
- authorizeURL: (0, import_v4.url)(),
35
- accessToken: (0, import_v4.url)(),
36
- scope: (0, import_v4.string)().optional(),
37
- userInfo: (0, import_v4.url)(),
38
- responseType: (0, import_v4.enum)(["code", "token", "id_token"]),
39
- clientId: (0, import_v4.string)(),
40
- clientSecret: (0, import_v4.string)(),
41
- })
23
+ OAuthAccessToken: () => OAuthAccessToken,
24
+ OAuthAccessTokenErrorResponse: () => OAuthAccessTokenErrorResponse,
25
+ OAuthAccessTokenResponse: () => OAuthAccessTokenResponse,
26
+ OAuthAuthorization: () => OAuthAuthorization,
27
+ OAuthAuthorizationErrorResponse: () => OAuthAuthorizationErrorResponse,
28
+ OAuthAuthorizationResponse: () => OAuthAuthorizationResponse,
29
+ OAuthEnvSchema: () => OAuthEnvSchema,
30
+ OAuthErrorResponse: () => OAuthErrorResponse,
31
+ OAuthProviderConfigSchema: () => OAuthProviderConfigSchema
32
+ });
33
+ module.exports = __toCommonJS(schemas_exports);
34
+ var import_zod = require("zod");
35
+ var OAuthProviderConfigSchema = (0, import_zod.object)({
36
+ authorizeURL: (0, import_zod.string)().url(),
37
+ accessToken: (0, import_zod.string)().url(),
38
+ scope: (0, import_zod.string)().optional(),
39
+ userInfo: (0, import_zod.string)().url(),
40
+ responseType: (0, import_zod.enum)(["code", "token", "id_token"]),
41
+ clientId: (0, import_zod.string)(),
42
+ clientSecret: (0, import_zod.string)()
43
+ });
42
44
  var OAuthAuthorization = OAuthProviderConfigSchema.extend({
43
- redirectURI: (0, import_v4.string)(),
44
- state: (0, import_v4.string)(),
45
- codeChallenge: (0, import_v4.string)(),
46
- codeChallengeMethod: (0, import_v4.enum)(["plain", "S256"]),
47
- })
48
- var OAuthAuthorizationResponse = (0, import_v4.object)({
49
- state: (0, import_v4.string)(),
50
- code: (0, import_v4.string)(),
51
- })
52
- var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
53
- error: (0, import_v4.enum)([
54
- "invalid_request",
55
- "unauthorized_client",
56
- "access_denied",
57
- "unsupported_response_type",
58
- "invalid_scope",
59
- "server_error",
60
- "temporarily_unavailable",
61
- ]),
62
- error_description: (0, import_v4.string)().optional(),
63
- error_uri: (0, import_v4.string)().optional(),
64
- state: (0, import_v4.string)(),
65
- })
45
+ redirectURI: (0, import_zod.string)(),
46
+ state: (0, import_zod.string)(),
47
+ codeChallenge: (0, import_zod.string)(),
48
+ codeChallengeMethod: (0, import_zod.enum)(["plain", "S256"])
49
+ });
50
+ var OAuthAuthorizationResponse = (0, import_zod.object)({
51
+ state: (0, import_zod.string)({ message: "Missing state parameter in the OAuth authorization response." }),
52
+ code: (0, import_zod.string)({ message: "Missing code parameter in the OAuth authorization response." })
53
+ });
54
+ var OAuthAuthorizationErrorResponse = (0, import_zod.object)({
55
+ error: (0, import_zod.enum)([
56
+ "invalid_request",
57
+ "unauthorized_client",
58
+ "access_denied",
59
+ "unsupported_response_type",
60
+ "invalid_scope",
61
+ "server_error",
62
+ "temporarily_unavailable"
63
+ ]),
64
+ error_description: (0, import_zod.string)().optional(),
65
+ error_uri: (0, import_zod.string)().optional(),
66
+ state: (0, import_zod.string)()
67
+ });
66
68
  var OAuthAccessToken = OAuthProviderConfigSchema.extend({
67
- redirectURI: (0, import_v4.string)(),
68
- code: (0, import_v4.string)(),
69
- codeVerifier: (0, import_v4.string)().min(43).max(128),
70
- })
71
- var OAuthAccessTokenResponse = (0, import_v4.object)({
72
- access_token: (0, import_v4.string)(),
73
- token_type: (0, import_v4.string)(),
74
- expires_in: (0, import_v4.number)().optional(),
75
- refresh_token: (0, import_v4.string)().optional(),
76
- scope: (0, import_v4.string)().optional(),
77
- })
78
- var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
79
- error: (0, import_v4.enum)([
80
- "invalid_request",
81
- "invalid_client",
82
- "invalid_grant",
83
- "unauthorized_client",
84
- "unsupported_grant_type",
85
- "invalid_scope",
86
- ]),
87
- error_description: (0, import_v4.string)().optional(),
88
- error_uri: (0, import_v4.string)().optional(),
89
- })
90
- var OAuthErrorResponse = (0, import_v4.object)({
91
- error: (0, import_v4.string)(),
92
- error_description: (0, import_v4.string)().optional(),
93
- })
69
+ redirectURI: (0, import_zod.string)(),
70
+ code: (0, import_zod.string)(),
71
+ codeVerifier: (0, import_zod.string)().min(43).max(128)
72
+ });
73
+ var OAuthAccessTokenResponse = (0, import_zod.object)({
74
+ access_token: (0, import_zod.string)(),
75
+ token_type: (0, import_zod.string)().optional(),
76
+ expires_in: (0, import_zod.number)().optional(),
77
+ refresh_token: (0, import_zod.string)().optional(),
78
+ scope: (0, import_zod.string)().optional().or((0, import_zod.null)())
79
+ });
80
+ var OAuthAccessTokenErrorResponse = (0, import_zod.object)({
81
+ error: (0, import_zod.enum)([
82
+ "invalid_request",
83
+ "invalid_client",
84
+ "invalid_grant",
85
+ "unauthorized_client",
86
+ "unsupported_grant_type",
87
+ "invalid_scope"
88
+ ]),
89
+ error_description: (0, import_zod.string)().optional(),
90
+ error_uri: (0, import_zod.string)().optional()
91
+ });
92
+ var OAuthErrorResponse = (0, import_zod.object)({
93
+ error: (0, import_zod.string)(),
94
+ error_description: (0, import_zod.string)().optional()
95
+ });
96
+ var OAuthEnvSchema = (0, import_zod.object)({
97
+ clientId: import_zod.z.string().min(1, "OAuth Client ID is required in the environment variables."),
98
+ clientSecret: import_zod.z.string().min(1, "OAuth Client Secret is required in the environment variables.")
99
+ });
94
100
  // Annotate the CommonJS export names for ESM import in node:
95
- 0 &&
96
- (module.exports = {
97
- OAuthAccessToken,
98
- OAuthAccessTokenErrorResponse,
99
- OAuthAccessTokenResponse,
100
- OAuthAuthorization,
101
- OAuthAuthorizationErrorResponse,
102
- OAuthAuthorizationResponse,
103
- OAuthErrorResponse,
104
- OAuthProviderConfigSchema,
105
- })
101
+ 0 && (module.exports = {
102
+ OAuthAccessToken,
103
+ OAuthAccessTokenErrorResponse,
104
+ OAuthAccessTokenResponse,
105
+ OAuthAuthorization,
106
+ OAuthAuthorizationErrorResponse,
107
+ OAuthAuthorizationResponse,
108
+ OAuthEnvSchema,
109
+ OAuthErrorResponse,
110
+ OAuthProviderConfigSchema
111
+ });
package/dist/schemas.d.ts CHANGED
@@ -1,163 +1,133 @@
1
- import * as zod_v4_core from "zod/v4/core"
2
- import * as zod_v4 from "zod/v4"
1
+ import { z } from 'zod';
3
2
 
4
3
  /**
5
4
  * Schema for OAuth Provider Configuration
6
5
  */
7
- declare const OAuthProviderConfigSchema: zod_v4.ZodObject<
8
- {
9
- authorizeURL: zod_v4.ZodURL
10
- accessToken: zod_v4.ZodURL
11
- scope: zod_v4.ZodOptional<zod_v4.ZodString>
12
- userInfo: zod_v4.ZodURL
13
- responseType: zod_v4.ZodEnum<{
14
- token: "token"
15
- code: "code"
16
- id_token: "id_token"
17
- }>
18
- clientId: zod_v4.ZodString
19
- clientSecret: zod_v4.ZodString
20
- },
21
- zod_v4_core.$strip
22
- >
6
+ declare const OAuthProviderConfigSchema: z.ZodObject<{
7
+ authorizeURL: z.ZodString;
8
+ accessToken: z.ZodString;
9
+ scope: z.ZodOptional<z.ZodString>;
10
+ userInfo: z.ZodString;
11
+ responseType: z.ZodEnum<{
12
+ token: "token";
13
+ code: "code";
14
+ id_token: "id_token";
15
+ }>;
16
+ clientId: z.ZodString;
17
+ clientSecret: z.ZodString;
18
+ }, z.core.$strip>;
23
19
  /**
24
20
  * Schema used to create the authorization URL for the OAuth flow and verify the
25
21
  * OAuth configuration.
26
22
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
27
23
  */
28
- declare const OAuthAuthorization: zod_v4.ZodObject<
29
- {
30
- authorizeURL: zod_v4.ZodURL
31
- accessToken: zod_v4.ZodURL
32
- scope: zod_v4.ZodOptional<zod_v4.ZodString>
33
- userInfo: zod_v4.ZodURL
34
- responseType: zod_v4.ZodEnum<{
35
- token: "token"
36
- code: "code"
37
- id_token: "id_token"
38
- }>
39
- clientId: zod_v4.ZodString
40
- clientSecret: zod_v4.ZodString
41
- redirectURI: zod_v4.ZodString
42
- state: zod_v4.ZodString
43
- codeChallenge: zod_v4.ZodString
44
- codeChallengeMethod: zod_v4.ZodEnum<{
45
- S256: "S256"
46
- plain: "plain"
47
- }>
48
- },
49
- zod_v4_core.$strip
50
- >
24
+ declare const OAuthAuthorization: z.ZodObject<{
25
+ authorizeURL: z.ZodString;
26
+ accessToken: z.ZodString;
27
+ scope: z.ZodOptional<z.ZodString>;
28
+ userInfo: z.ZodString;
29
+ responseType: z.ZodEnum<{
30
+ token: "token";
31
+ code: "code";
32
+ id_token: "id_token";
33
+ }>;
34
+ clientId: z.ZodString;
35
+ clientSecret: z.ZodString;
36
+ redirectURI: z.ZodString;
37
+ state: z.ZodString;
38
+ codeChallenge: z.ZodString;
39
+ codeChallengeMethod: z.ZodEnum<{
40
+ plain: "plain";
41
+ S256: "S256";
42
+ }>;
43
+ }, z.core.$strip>;
51
44
  /**
52
45
  * Schema used in the callback action to validate the authorization response when the resource owner
53
46
  * has granted.
54
47
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2
55
48
  */
56
- declare const OAuthAuthorizationResponse: zod_v4.ZodObject<
57
- {
58
- state: zod_v4.ZodString
59
- code: zod_v4.ZodString
60
- },
61
- zod_v4_core.$strip
62
- >
49
+ declare const OAuthAuthorizationResponse: z.ZodObject<{
50
+ state: z.ZodString;
51
+ code: z.ZodString;
52
+ }, z.core.$strip>;
63
53
  /**
64
54
  * Schema used in the callback action to validate the authorization error response when the resource owner
65
55
  * has denied the authorization request.
66
56
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
67
57
  */
68
- declare const OAuthAuthorizationErrorResponse: zod_v4.ZodObject<
69
- {
70
- error: zod_v4.ZodEnum<{
71
- invalid_request: "invalid_request"
72
- unauthorized_client: "unauthorized_client"
73
- access_denied: "access_denied"
74
- unsupported_response_type: "unsupported_response_type"
75
- invalid_scope: "invalid_scope"
76
- server_error: "server_error"
77
- temporarily_unavailable: "temporarily_unavailable"
78
- }>
79
- error_description: zod_v4.ZodOptional<zod_v4.ZodString>
80
- error_uri: zod_v4.ZodOptional<zod_v4.ZodString>
81
- state: zod_v4.ZodString
82
- },
83
- zod_v4_core.$strip
84
- >
58
+ declare const OAuthAuthorizationErrorResponse: z.ZodObject<{
59
+ error: z.ZodEnum<{
60
+ invalid_request: "invalid_request";
61
+ unauthorized_client: "unauthorized_client";
62
+ access_denied: "access_denied";
63
+ unsupported_response_type: "unsupported_response_type";
64
+ invalid_scope: "invalid_scope";
65
+ server_error: "server_error";
66
+ temporarily_unavailable: "temporarily_unavailable";
67
+ }>;
68
+ error_description: z.ZodOptional<z.ZodString>;
69
+ error_uri: z.ZodOptional<z.ZodString>;
70
+ state: z.ZodString;
71
+ }, z.core.$strip>;
85
72
  /**
86
73
  * Schema for OAuth Access Token Request and OAuth Configuration
87
74
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
88
75
  */
89
- declare const OAuthAccessToken: zod_v4.ZodObject<
90
- {
91
- authorizeURL: zod_v4.ZodURL
92
- accessToken: zod_v4.ZodURL
93
- scope: zod_v4.ZodOptional<zod_v4.ZodString>
94
- userInfo: zod_v4.ZodURL
95
- responseType: zod_v4.ZodEnum<{
96
- token: "token"
97
- code: "code"
98
- id_token: "id_token"
99
- }>
100
- clientId: zod_v4.ZodString
101
- clientSecret: zod_v4.ZodString
102
- redirectURI: zod_v4.ZodString
103
- code: zod_v4.ZodString
104
- codeVerifier: zod_v4.ZodString
105
- },
106
- zod_v4_core.$strip
107
- >
76
+ declare const OAuthAccessToken: z.ZodObject<{
77
+ authorizeURL: z.ZodString;
78
+ accessToken: z.ZodString;
79
+ scope: z.ZodOptional<z.ZodString>;
80
+ userInfo: z.ZodString;
81
+ responseType: z.ZodEnum<{
82
+ token: "token";
83
+ code: "code";
84
+ id_token: "id_token";
85
+ }>;
86
+ clientId: z.ZodString;
87
+ clientSecret: z.ZodString;
88
+ redirectURI: z.ZodString;
89
+ code: z.ZodString;
90
+ codeVerifier: z.ZodString;
91
+ }, z.core.$strip>;
108
92
  /**
109
93
  * Schema for OAuth Access Token Response
110
94
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
111
95
  * @see https://datatracker.ietf.org/doc/html/rfc7636#section-4
112
96
  */
113
- declare const OAuthAccessTokenResponse: zod_v4.ZodObject<
114
- {
115
- access_token: zod_v4.ZodString
116
- token_type: zod_v4.ZodString
117
- expires_in: zod_v4.ZodOptional<zod_v4.ZodNumber>
118
- refresh_token: zod_v4.ZodOptional<zod_v4.ZodString>
119
- scope: zod_v4.ZodOptional<zod_v4.ZodString>
120
- },
121
- zod_v4_core.$strip
122
- >
97
+ declare const OAuthAccessTokenResponse: z.ZodObject<{
98
+ access_token: z.ZodString;
99
+ token_type: z.ZodOptional<z.ZodString>;
100
+ expires_in: z.ZodOptional<z.ZodNumber>;
101
+ refresh_token: z.ZodOptional<z.ZodString>;
102
+ scope: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodNull]>;
103
+ }, z.core.$strip>;
123
104
  /**
124
105
  * Schema for OAuth Access Token Error Response
125
106
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
126
107
  */
127
- declare const OAuthAccessTokenErrorResponse: zod_v4.ZodObject<
128
- {
129
- error: zod_v4.ZodEnum<{
130
- invalid_request: "invalid_request"
131
- unauthorized_client: "unauthorized_client"
132
- invalid_scope: "invalid_scope"
133
- invalid_client: "invalid_client"
134
- invalid_grant: "invalid_grant"
135
- unsupported_grant_type: "unsupported_grant_type"
136
- }>
137
- error_description: zod_v4.ZodOptional<zod_v4.ZodString>
138
- error_uri: zod_v4.ZodOptional<zod_v4.ZodString>
139
- },
140
- zod_v4_core.$strip
141
- >
108
+ declare const OAuthAccessTokenErrorResponse: z.ZodObject<{
109
+ error: z.ZodEnum<{
110
+ invalid_request: "invalid_request";
111
+ unauthorized_client: "unauthorized_client";
112
+ invalid_scope: "invalid_scope";
113
+ invalid_client: "invalid_client";
114
+ invalid_grant: "invalid_grant";
115
+ unsupported_grant_type: "unsupported_grant_type";
116
+ }>;
117
+ error_description: z.ZodOptional<z.ZodString>;
118
+ error_uri: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$strip>;
142
120
  /**
143
121
  * @todo: verify if this schema is still needed
144
122
  * @deprecated
145
123
  */
146
- declare const OAuthErrorResponse: zod_v4.ZodObject<
147
- {
148
- error: zod_v4.ZodString
149
- error_description: zod_v4.ZodOptional<zod_v4.ZodString>
150
- },
151
- zod_v4_core.$strip
152
- >
124
+ declare const OAuthErrorResponse: z.ZodObject<{
125
+ error: z.ZodString;
126
+ error_description: z.ZodOptional<z.ZodString>;
127
+ }, z.core.$strip>;
128
+ declare const OAuthEnvSchema: z.ZodObject<{
129
+ clientId: z.ZodString;
130
+ clientSecret: z.ZodString;
131
+ }, z.core.$strip>;
153
132
 
154
- export {
155
- OAuthAccessToken,
156
- OAuthAccessTokenErrorResponse,
157
- OAuthAccessTokenResponse,
158
- OAuthAuthorization,
159
- OAuthAuthorizationErrorResponse,
160
- OAuthAuthorizationResponse,
161
- OAuthErrorResponse,
162
- OAuthProviderConfigSchema,
163
- }
133
+ export { OAuthAccessToken, OAuthAccessTokenErrorResponse, OAuthAccessTokenResponse, OAuthAuthorization, OAuthAuthorizationErrorResponse, OAuthAuthorizationResponse, OAuthEnvSchema, OAuthErrorResponse, OAuthProviderConfigSchema };
package/dist/schemas.js CHANGED
@@ -1,20 +1,22 @@
1
1
  import {
2
- OAuthAccessToken,
3
- OAuthAccessTokenErrorResponse,
4
- OAuthAccessTokenResponse,
5
- OAuthAuthorization,
6
- OAuthAuthorizationErrorResponse,
7
- OAuthAuthorizationResponse,
8
- OAuthErrorResponse,
9
- OAuthProviderConfigSchema,
10
- } from "./chunk-HMRKN75I.js"
2
+ OAuthAccessToken,
3
+ OAuthAccessTokenErrorResponse,
4
+ OAuthAccessTokenResponse,
5
+ OAuthAuthorization,
6
+ OAuthAuthorizationErrorResponse,
7
+ OAuthAuthorizationResponse,
8
+ OAuthEnvSchema,
9
+ OAuthErrorResponse,
10
+ OAuthProviderConfigSchema
11
+ } from "./chunk-YRCB5FLE.js";
11
12
  export {
12
- OAuthAccessToken,
13
- OAuthAccessTokenErrorResponse,
14
- OAuthAccessTokenResponse,
15
- OAuthAuthorization,
16
- OAuthAuthorizationErrorResponse,
17
- OAuthAuthorizationResponse,
18
- OAuthErrorResponse,
19
- OAuthProviderConfigSchema,
20
- }
13
+ OAuthAccessToken,
14
+ OAuthAccessTokenErrorResponse,
15
+ OAuthAccessTokenResponse,
16
+ OAuthAuthorization,
17
+ OAuthAuthorizationErrorResponse,
18
+ OAuthAuthorizationResponse,
19
+ OAuthEnvSchema,
20
+ OAuthErrorResponse,
21
+ OAuthProviderConfigSchema
22
+ };