@aura-stack/auth 0.1.0-rc.8 → 0.1.0

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 (116) 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 +6 -6
  8. package/dist/@types/utility.js +1 -1
  9. package/dist/actions/callback/access-token.cjs +143 -143
  10. package/dist/actions/callback/access-token.d.ts +15 -20
  11. package/dist/actions/callback/access-token.js +8 -4
  12. package/dist/actions/callback/callback.cjs +437 -455
  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 +131 -134
  16. package/dist/actions/callback/userinfo.d.ts +9 -9
  17. package/dist/actions/callback/userinfo.js +10 -6
  18. package/dist/actions/csrfToken/csrfToken.cjs +162 -171
  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 +746 -773
  22. package/dist/actions/index.d.ts +13 -13
  23. package/dist/actions/index.js +34 -18
  24. package/dist/actions/session/session.cjs +149 -155
  25. package/dist/actions/session/session.d.ts +3 -3
  26. package/dist/actions/session/session.js +11 -7
  27. package/dist/actions/signIn/authorization.cjs +231 -249
  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 +396 -423
  31. package/dist/actions/signIn/signIn.d.ts +10 -10
  32. package/dist/actions/signIn/signIn.js +14 -10
  33. package/dist/actions/signOut/signOut.cjs +417 -440
  34. package/dist/actions/signOut/signOut.d.ts +3 -3
  35. package/dist/actions/signOut/signOut.js +15 -11
  36. package/dist/assert.cjs +35 -36
  37. package/dist/assert.d.ts +4 -4
  38. package/dist/assert.js +10 -2
  39. package/dist/chunk-256KIVJL.js +85 -96
  40. package/dist/chunk-42XB3YCW.js +19 -17
  41. package/dist/chunk-6SM22VVJ.js +13 -10
  42. package/dist/chunk-CAKJT3KS.js +84 -69
  43. package/dist/chunk-E3OXBRYF.js +19 -17
  44. package/dist/chunk-EBPE35JT.js +28 -26
  45. package/dist/chunk-FIPU4MLT.js +18 -16
  46. package/dist/chunk-FJUDBLCP.js +50 -43
  47. package/dist/chunk-FKRDCWBF.js +19 -17
  48. package/dist/chunk-GZU3RBTB.js +51 -40
  49. package/dist/chunk-HGJ4TXY4.js +132 -100
  50. package/dist/chunk-HMRKN75I.js +63 -63
  51. package/dist/chunk-IKHPGFCW.js +11 -9
  52. package/dist/chunk-JAPMIE6S.js +7 -5
  53. package/dist/chunk-KRNOMBXQ.js +19 -17
  54. package/dist/chunk-LLR722CL.js +91 -70
  55. package/dist/chunk-RLT4RFKV.js +39 -30
  56. package/dist/chunk-SJPDVKUS.js +107 -88
  57. package/dist/chunk-SMQO5WD7.js +26 -16
  58. package/dist/chunk-STHEPPUZ.js +8 -6
  59. package/dist/chunk-UJJ7R56J.js +47 -37
  60. package/dist/chunk-UTDLUEEG.js +27 -21
  61. package/dist/chunk-VFTYH33W.js +54 -37
  62. package/dist/chunk-XXJKNKGQ.js +33 -23
  63. package/dist/chunk-ZV4BH47P.js +132 -134
  64. package/dist/cookie.cjs +169 -175
  65. package/dist/cookie.d.ts +23 -51
  66. package/dist/cookie.js +34 -34
  67. package/dist/error.cjs +75 -75
  68. package/dist/error.d.ts +30 -30
  69. package/dist/error.js +15 -8
  70. package/dist/headers.cjs +28 -28
  71. package/dist/headers.d.ts +2 -2
  72. package/dist/headers.js +6 -2
  73. package/dist/index-DpfbvTZ_.d.ts +249 -298
  74. package/dist/index.cjs +936 -969
  75. package/dist/index.d.ts +10 -31
  76. package/dist/index.js +70 -50
  77. package/dist/jose.cjs +61 -64
  78. package/dist/jose.d.ts +8 -8
  79. package/dist/jose.js +9 -5
  80. package/dist/oauth/bitbucket.cjs +38 -38
  81. package/dist/oauth/bitbucket.d.ts +7 -7
  82. package/dist/oauth/bitbucket.js +6 -2
  83. package/dist/oauth/discord.cjs +48 -48
  84. package/dist/oauth/discord.d.ts +7 -7
  85. package/dist/oauth/discord.js +6 -2
  86. package/dist/oauth/figma.cjs +39 -39
  87. package/dist/oauth/figma.d.ts +7 -7
  88. package/dist/oauth/figma.js +6 -2
  89. package/dist/oauth/github.cjs +31 -31
  90. package/dist/oauth/github.d.ts +7 -7
  91. package/dist/oauth/github.js +6 -2
  92. package/dist/oauth/gitlab.cjs +39 -39
  93. package/dist/oauth/gitlab.d.ts +7 -7
  94. package/dist/oauth/gitlab.js +6 -2
  95. package/dist/oauth/index.cjs +180 -180
  96. package/dist/oauth/index.d.ts +7 -26
  97. package/dist/oauth/index.js +36 -9
  98. package/dist/oauth/spotify.cjs +39 -39
  99. package/dist/oauth/spotify.d.ts +7 -7
  100. package/dist/oauth/spotify.js +6 -2
  101. package/dist/oauth/x.cjs +39 -39
  102. package/dist/oauth/x.d.ts +7 -7
  103. package/dist/oauth/x.js +6 -2
  104. package/dist/response.cjs +27 -27
  105. package/dist/response.d.ts +2 -2
  106. package/dist/response.js +6 -2
  107. package/dist/schemas.cjs +91 -91
  108. package/dist/schemas.d.ts +93 -126
  109. package/dist/schemas.js +18 -18
  110. package/dist/secure.cjs +95 -98
  111. package/dist/secure.d.ts +17 -17
  112. package/dist/secure.js +18 -4
  113. package/dist/utils.cjs +119 -132
  114. package/dist/utils.d.ts +11 -26
  115. package/dist/utils.js +21 -21
  116. package/package.json +2 -2
package/dist/oauth/x.cjs CHANGED
@@ -1,46 +1,46 @@
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/oauth/x.ts
20
- var x_exports = {}
21
+ var x_exports = {};
21
22
  __export(x_exports, {
22
- x: () => x,
23
- })
24
- module.exports = __toCommonJS(x_exports)
23
+ x: () => x
24
+ });
25
+ module.exports = __toCommonJS(x_exports);
25
26
  var x = {
26
- id: "x",
27
- name: "X",
28
- authorizeURL: "https://x.com/i/oauth2/authorize",
29
- accessToken: "https://api.x.com/2/oauth2/token",
30
- userInfo: "https://api.x.com/2/users/me?user.fields=profile_image_url",
31
- scope: "users.read users.email tweet.read offline.access",
32
- responseType: "code",
33
- profile({ data }) {
34
- return {
35
- sub: data.id,
36
- name: data.name,
37
- image: data.profile_image_url,
38
- email: "",
39
- }
40
- },
41
- }
27
+ id: "x",
28
+ name: "X",
29
+ authorizeURL: "https://x.com/i/oauth2/authorize",
30
+ accessToken: "https://api.x.com/2/oauth2/token",
31
+ userInfo: "https://api.x.com/2/users/me?user.fields=profile_image_url",
32
+ scope: "users.read users.email tweet.read offline.access",
33
+ responseType: "code",
34
+ profile({ data }) {
35
+ return {
36
+ sub: data.id,
37
+ name: data.name,
38
+ image: data.profile_image_url,
39
+ email: ""
40
+ };
41
+ }
42
+ };
42
43
  // Annotate the CommonJS export names for ESM import in node:
43
- 0 &&
44
- (module.exports = {
45
- x,
46
- })
44
+ 0 && (module.exports = {
45
+ x
46
+ });
package/dist/oauth/x.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { X as XProfile, x } from "../index-DpfbvTZ_.js"
2
- import "zod/v4"
3
- import "@aura-stack/jose/jose"
4
- import "../schemas.js"
5
- import "zod/v4/core"
6
- import "cookie"
7
- import "../@types/utility.js"
1
+ export { X as XProfile, x } from '../index-DpfbvTZ_.js';
2
+ import 'zod/v4';
3
+ import '@aura-stack/jose/jose';
4
+ import '../schemas.js';
5
+ import 'zod/v4/core';
6
+ import 'cookie';
7
+ import '../@types/utility.js';
package/dist/oauth/x.js CHANGED
@@ -1,2 +1,6 @@
1
- import { x } from "../chunk-42XB3YCW.js"
2
- export { x }
1
+ import {
2
+ x
3
+ } from "../chunk-42XB3YCW.js";
4
+ export {
5
+ x
6
+ };
package/dist/response.cjs CHANGED
@@ -1,34 +1,34 @@
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/response.ts
20
- var response_exports = {}
21
+ var response_exports = {};
21
22
  __export(response_exports, {
22
- AuraResponse: () => AuraResponse,
23
- })
24
- module.exports = __toCommonJS(response_exports)
23
+ AuraResponse: () => AuraResponse
24
+ });
25
+ module.exports = __toCommonJS(response_exports);
25
26
  var AuraResponse = class extends Response {
26
- static json(body, init) {
27
- return Response.json(body, init)
28
- }
29
- }
27
+ static json(body, init) {
28
+ return Response.json(body, init);
29
+ }
30
+ };
30
31
  // Annotate the CommonJS export names for ESM import in node:
31
- 0 &&
32
- (module.exports = {
33
- AuraResponse,
34
- })
32
+ 0 && (module.exports = {
33
+ AuraResponse
34
+ });
@@ -4,7 +4,7 @@
4
4
  * @experimental
5
5
  */
6
6
  declare class AuraResponse extends Response {
7
- static json<T>(body: T, init?: ResponseInit): Response
7
+ static json<T>(body: T, init?: ResponseInit): Response;
8
8
  }
9
9
 
10
- export { AuraResponse }
10
+ export { AuraResponse };
package/dist/response.js CHANGED
@@ -1,2 +1,6 @@
1
- import { AuraResponse } from "./chunk-JAPMIE6S.js"
2
- export { AuraResponse }
1
+ import {
2
+ AuraResponse
3
+ } from "./chunk-JAPMIE6S.js";
4
+ export {
5
+ AuraResponse
6
+ };
package/dist/schemas.cjs CHANGED
@@ -1,105 +1,105 @@
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")
23
+ OAuthAccessToken: () => OAuthAccessToken,
24
+ OAuthAccessTokenErrorResponse: () => OAuthAccessTokenErrorResponse,
25
+ OAuthAccessTokenResponse: () => OAuthAccessTokenResponse,
26
+ OAuthAuthorization: () => OAuthAuthorization,
27
+ OAuthAuthorizationErrorResponse: () => OAuthAuthorizationErrorResponse,
28
+ OAuthAuthorizationResponse: () => OAuthAuthorizationResponse,
29
+ OAuthErrorResponse: () => OAuthErrorResponse,
30
+ OAuthProviderConfigSchema: () => OAuthProviderConfigSchema
31
+ });
32
+ module.exports = __toCommonJS(schemas_exports);
33
+ var import_v4 = require("zod/v4");
33
34
  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
- })
35
+ authorizeURL: (0, import_v4.url)(),
36
+ accessToken: (0, import_v4.url)(),
37
+ scope: (0, import_v4.string)().optional(),
38
+ userInfo: (0, import_v4.url)(),
39
+ responseType: (0, import_v4.enum)(["code", "token", "id_token"]),
40
+ clientId: (0, import_v4.string)(),
41
+ clientSecret: (0, import_v4.string)()
42
+ });
42
43
  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
- })
44
+ redirectURI: (0, import_v4.string)(),
45
+ state: (0, import_v4.string)(),
46
+ codeChallenge: (0, import_v4.string)(),
47
+ codeChallengeMethod: (0, import_v4.enum)(["plain", "S256"])
48
+ });
48
49
  var OAuthAuthorizationResponse = (0, import_v4.object)({
49
- state: (0, import_v4.string)(),
50
- code: (0, import_v4.string)(),
51
- })
50
+ state: (0, import_v4.string)(),
51
+ code: (0, import_v4.string)()
52
+ });
52
53
  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
- })
54
+ error: (0, import_v4.enum)([
55
+ "invalid_request",
56
+ "unauthorized_client",
57
+ "access_denied",
58
+ "unsupported_response_type",
59
+ "invalid_scope",
60
+ "server_error",
61
+ "temporarily_unavailable"
62
+ ]),
63
+ error_description: (0, import_v4.string)().optional(),
64
+ error_uri: (0, import_v4.string)().optional(),
65
+ state: (0, import_v4.string)()
66
+ });
66
67
  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
- })
68
+ redirectURI: (0, import_v4.string)(),
69
+ code: (0, import_v4.string)(),
70
+ codeVerifier: (0, import_v4.string)().min(43).max(128)
71
+ });
71
72
  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
- })
73
+ access_token: (0, import_v4.string)(),
74
+ token_type: (0, import_v4.string)(),
75
+ expires_in: (0, import_v4.number)().optional(),
76
+ refresh_token: (0, import_v4.string)().optional(),
77
+ scope: (0, import_v4.string)().optional()
78
+ });
78
79
  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
- })
80
+ error: (0, import_v4.enum)([
81
+ "invalid_request",
82
+ "invalid_client",
83
+ "invalid_grant",
84
+ "unauthorized_client",
85
+ "unsupported_grant_type",
86
+ "invalid_scope"
87
+ ]),
88
+ error_description: (0, import_v4.string)().optional(),
89
+ error_uri: (0, import_v4.string)().optional()
90
+ });
90
91
  var OAuthErrorResponse = (0, import_v4.object)({
91
- error: (0, import_v4.string)(),
92
- error_description: (0, import_v4.string)().optional(),
93
- })
92
+ error: (0, import_v4.string)(),
93
+ error_description: (0, import_v4.string)().optional()
94
+ });
94
95
  // 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
- })
96
+ 0 && (module.exports = {
97
+ OAuthAccessToken,
98
+ OAuthAccessTokenErrorResponse,
99
+ OAuthAccessTokenResponse,
100
+ OAuthAuthorization,
101
+ OAuthAuthorizationErrorResponse,
102
+ OAuthAuthorizationResponse,
103
+ OAuthErrorResponse,
104
+ OAuthProviderConfigSchema
105
+ });
package/dist/schemas.d.ts CHANGED
@@ -1,163 +1,130 @@
1
- import * as zod_v4_core from "zod/v4/core"
2
- import * as zod_v4 from "zod/v4"
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod_v4 from 'zod/v4';
3
3
 
4
4
  /**
5
5
  * Schema for OAuth Provider Configuration
6
6
  */
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
- >
7
+ declare const OAuthProviderConfigSchema: zod_v4.ZodObject<{
8
+ authorizeURL: zod_v4.ZodURL;
9
+ accessToken: zod_v4.ZodURL;
10
+ scope: zod_v4.ZodOptional<zod_v4.ZodString>;
11
+ userInfo: zod_v4.ZodURL;
12
+ responseType: zod_v4.ZodEnum<{
13
+ token: "token";
14
+ code: "code";
15
+ id_token: "id_token";
16
+ }>;
17
+ clientId: zod_v4.ZodString;
18
+ clientSecret: zod_v4.ZodString;
19
+ }, zod_v4_core.$strip>;
23
20
  /**
24
21
  * Schema used to create the authorization URL for the OAuth flow and verify the
25
22
  * OAuth configuration.
26
23
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
27
24
  */
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
- >
25
+ declare const OAuthAuthorization: zod_v4.ZodObject<{
26
+ authorizeURL: zod_v4.ZodURL;
27
+ accessToken: zod_v4.ZodURL;
28
+ scope: zod_v4.ZodOptional<zod_v4.ZodString>;
29
+ userInfo: zod_v4.ZodURL;
30
+ responseType: zod_v4.ZodEnum<{
31
+ token: "token";
32
+ code: "code";
33
+ id_token: "id_token";
34
+ }>;
35
+ clientId: zod_v4.ZodString;
36
+ clientSecret: zod_v4.ZodString;
37
+ redirectURI: zod_v4.ZodString;
38
+ state: zod_v4.ZodString;
39
+ codeChallenge: zod_v4.ZodString;
40
+ codeChallengeMethod: zod_v4.ZodEnum<{
41
+ S256: "S256";
42
+ plain: "plain";
43
+ }>;
44
+ }, zod_v4_core.$strip>;
51
45
  /**
52
46
  * Schema used in the callback action to validate the authorization response when the resource owner
53
47
  * has granted.
54
48
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2
55
49
  */
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
- >
50
+ declare const OAuthAuthorizationResponse: zod_v4.ZodObject<{
51
+ state: zod_v4.ZodString;
52
+ code: zod_v4.ZodString;
53
+ }, zod_v4_core.$strip>;
63
54
  /**
64
55
  * Schema used in the callback action to validate the authorization error response when the resource owner
65
56
  * has denied the authorization request.
66
57
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
67
58
  */
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
- >
59
+ declare const OAuthAuthorizationErrorResponse: zod_v4.ZodObject<{
60
+ error: zod_v4.ZodEnum<{
61
+ invalid_request: "invalid_request";
62
+ unauthorized_client: "unauthorized_client";
63
+ access_denied: "access_denied";
64
+ unsupported_response_type: "unsupported_response_type";
65
+ invalid_scope: "invalid_scope";
66
+ server_error: "server_error";
67
+ temporarily_unavailable: "temporarily_unavailable";
68
+ }>;
69
+ error_description: zod_v4.ZodOptional<zod_v4.ZodString>;
70
+ error_uri: zod_v4.ZodOptional<zod_v4.ZodString>;
71
+ state: zod_v4.ZodString;
72
+ }, zod_v4_core.$strip>;
85
73
  /**
86
74
  * Schema for OAuth Access Token Request and OAuth Configuration
87
75
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
88
76
  */
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
- >
77
+ declare const OAuthAccessToken: zod_v4.ZodObject<{
78
+ authorizeURL: zod_v4.ZodURL;
79
+ accessToken: zod_v4.ZodURL;
80
+ scope: zod_v4.ZodOptional<zod_v4.ZodString>;
81
+ userInfo: zod_v4.ZodURL;
82
+ responseType: zod_v4.ZodEnum<{
83
+ token: "token";
84
+ code: "code";
85
+ id_token: "id_token";
86
+ }>;
87
+ clientId: zod_v4.ZodString;
88
+ clientSecret: zod_v4.ZodString;
89
+ redirectURI: zod_v4.ZodString;
90
+ code: zod_v4.ZodString;
91
+ codeVerifier: zod_v4.ZodString;
92
+ }, zod_v4_core.$strip>;
108
93
  /**
109
94
  * Schema for OAuth Access Token Response
110
95
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
111
96
  * @see https://datatracker.ietf.org/doc/html/rfc7636#section-4
112
97
  */
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
- >
98
+ declare const OAuthAccessTokenResponse: zod_v4.ZodObject<{
99
+ access_token: zod_v4.ZodString;
100
+ token_type: zod_v4.ZodString;
101
+ expires_in: zod_v4.ZodOptional<zod_v4.ZodNumber>;
102
+ refresh_token: zod_v4.ZodOptional<zod_v4.ZodString>;
103
+ scope: zod_v4.ZodOptional<zod_v4.ZodString>;
104
+ }, zod_v4_core.$strip>;
123
105
  /**
124
106
  * Schema for OAuth Access Token Error Response
125
107
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
126
108
  */
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
- >
109
+ declare const OAuthAccessTokenErrorResponse: zod_v4.ZodObject<{
110
+ error: zod_v4.ZodEnum<{
111
+ invalid_request: "invalid_request";
112
+ unauthorized_client: "unauthorized_client";
113
+ invalid_scope: "invalid_scope";
114
+ invalid_client: "invalid_client";
115
+ invalid_grant: "invalid_grant";
116
+ unsupported_grant_type: "unsupported_grant_type";
117
+ }>;
118
+ error_description: zod_v4.ZodOptional<zod_v4.ZodString>;
119
+ error_uri: zod_v4.ZodOptional<zod_v4.ZodString>;
120
+ }, zod_v4_core.$strip>;
142
121
  /**
143
122
  * @todo: verify if this schema is still needed
144
123
  * @deprecated
145
124
  */
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
- >
125
+ declare const OAuthErrorResponse: zod_v4.ZodObject<{
126
+ error: zod_v4.ZodString;
127
+ error_description: zod_v4.ZodOptional<zod_v4.ZodString>;
128
+ }, zod_v4_core.$strip>;
153
129
 
154
- export {
155
- OAuthAccessToken,
156
- OAuthAccessTokenErrorResponse,
157
- OAuthAccessTokenResponse,
158
- OAuthAuthorization,
159
- OAuthAuthorizationErrorResponse,
160
- OAuthAuthorizationResponse,
161
- OAuthErrorResponse,
162
- OAuthProviderConfigSchema,
163
- }
130
+ export { OAuthAccessToken, OAuthAccessTokenErrorResponse, OAuthAccessTokenResponse, OAuthAuthorization, OAuthAuthorizationErrorResponse, OAuthAuthorizationResponse, OAuthErrorResponse, OAuthProviderConfigSchema };