@aura-stack/auth 0.1.0-rc.7 → 0.1.0-rc.9

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 (117) hide show
  1. package/dist/@types/index.cjs +15 -15
  2. package/dist/@types/index.d.ts +31 -7
  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 +20 -15
  11. package/dist/actions/callback/access-token.js +4 -8
  12. package/dist/actions/callback/callback.cjs +455 -437
  13. package/dist/actions/callback/callback.d.ts +12 -10
  14. package/dist/actions/callback/callback.js +12 -16
  15. package/dist/actions/callback/userinfo.cjs +134 -131
  16. package/dist/actions/callback/userinfo.d.ts +9 -9
  17. package/dist/actions/callback/userinfo.js +6 -10
  18. package/dist/actions/csrfToken/csrfToken.cjs +171 -162
  19. package/dist/actions/csrfToken/csrfToken.d.ts +3 -3
  20. package/dist/actions/csrfToken/csrfToken.js +8 -12
  21. package/dist/actions/index.cjs +773 -746
  22. package/dist/actions/index.d.ts +13 -13
  23. package/dist/actions/index.js +18 -34
  24. package/dist/actions/session/session.cjs +155 -149
  25. package/dist/actions/session/session.d.ts +3 -3
  26. package/dist/actions/session/session.js +7 -11
  27. package/dist/actions/signIn/authorization.cjs +249 -231
  28. package/dist/actions/signIn/authorization.d.ts +18 -12
  29. package/dist/actions/signIn/authorization.js +6 -16
  30. package/dist/actions/signIn/signIn.cjs +423 -396
  31. package/dist/actions/signIn/signIn.d.ts +10 -10
  32. package/dist/actions/signIn/signIn.js +10 -14
  33. package/dist/actions/signOut/signOut.cjs +440 -417
  34. package/dist/actions/signOut/signOut.d.ts +3 -3
  35. package/dist/actions/signOut/signOut.js +11 -15
  36. package/dist/assert.cjs +36 -35
  37. package/dist/assert.d.ts +4 -4
  38. package/dist/assert.js +2 -10
  39. package/dist/chunk-256KIVJL.js +96 -85
  40. package/dist/chunk-42XB3YCW.js +17 -19
  41. package/dist/chunk-6SM22VVJ.js +10 -13
  42. package/dist/chunk-CAKJT3KS.js +69 -84
  43. package/dist/chunk-E3OXBRYF.js +17 -19
  44. package/dist/chunk-EBPE35JT.js +26 -28
  45. package/dist/chunk-FIPU4MLT.js +16 -18
  46. package/dist/chunk-FJUDBLCP.js +43 -50
  47. package/dist/chunk-FKRDCWBF.js +17 -19
  48. package/dist/chunk-GZU3RBTB.js +40 -51
  49. package/dist/chunk-HGJ4TXY4.js +100 -132
  50. package/dist/chunk-HMRKN75I.js +63 -63
  51. package/dist/chunk-IKHPGFCW.js +9 -11
  52. package/dist/chunk-JAPMIE6S.js +5 -7
  53. package/dist/chunk-KRNOMBXQ.js +17 -19
  54. package/dist/chunk-LLR722CL.js +70 -91
  55. package/dist/chunk-RLT4RFKV.js +30 -39
  56. package/dist/chunk-SJPDVKUS.js +88 -107
  57. package/dist/chunk-SMQO5WD7.js +16 -26
  58. package/dist/chunk-STHEPPUZ.js +6 -8
  59. package/dist/chunk-UJJ7R56J.js +37 -47
  60. package/dist/chunk-UTDLUEEG.js +25 -0
  61. package/dist/chunk-VFTYH33W.js +37 -54
  62. package/dist/chunk-XXJKNKGQ.js +23 -33
  63. package/dist/chunk-ZV4BH47P.js +134 -132
  64. package/dist/cookie.cjs +175 -169
  65. package/dist/cookie.d.ts +51 -23
  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 +8 -15
  70. package/dist/headers.cjs +28 -28
  71. package/dist/headers.d.ts +2 -2
  72. package/dist/headers.js +2 -6
  73. package/dist/index-DpfbvTZ_.d.ts +298 -249
  74. package/dist/index.cjs +969 -933
  75. package/dist/index.d.ts +31 -10
  76. package/dist/index.js +50 -70
  77. package/dist/jose.cjs +67 -52
  78. package/dist/jose.d.ts +8 -8
  79. package/dist/jose.js +5 -9
  80. package/dist/oauth/bitbucket.cjs +38 -38
  81. package/dist/oauth/bitbucket.d.ts +7 -7
  82. package/dist/oauth/bitbucket.js +2 -6
  83. package/dist/oauth/discord.cjs +48 -48
  84. package/dist/oauth/discord.d.ts +7 -7
  85. package/dist/oauth/discord.js +2 -6
  86. package/dist/oauth/figma.cjs +39 -39
  87. package/dist/oauth/figma.d.ts +7 -7
  88. package/dist/oauth/figma.js +2 -6
  89. package/dist/oauth/github.cjs +31 -31
  90. package/dist/oauth/github.d.ts +7 -7
  91. package/dist/oauth/github.js +2 -6
  92. package/dist/oauth/gitlab.cjs +39 -39
  93. package/dist/oauth/gitlab.d.ts +7 -7
  94. package/dist/oauth/gitlab.js +2 -6
  95. package/dist/oauth/index.cjs +180 -180
  96. package/dist/oauth/index.d.ts +26 -7
  97. package/dist/oauth/index.js +9 -36
  98. package/dist/oauth/spotify.cjs +39 -39
  99. package/dist/oauth/spotify.d.ts +7 -7
  100. package/dist/oauth/spotify.js +2 -6
  101. package/dist/oauth/x.cjs +39 -39
  102. package/dist/oauth/x.d.ts +7 -7
  103. package/dist/oauth/x.js +2 -6
  104. package/dist/response.cjs +27 -27
  105. package/dist/response.d.ts +2 -2
  106. package/dist/response.js +2 -6
  107. package/dist/schemas.cjs +91 -91
  108. package/dist/schemas.d.ts +126 -93
  109. package/dist/schemas.js +18 -18
  110. package/dist/secure.cjs +98 -95
  111. package/dist/secure.d.ts +17 -17
  112. package/dist/secure.js +4 -18
  113. package/dist/utils.cjs +132 -119
  114. package/dist/utils.d.ts +26 -11
  115. package/dist/utils.js +21 -21
  116. package/package.json +1 -1
  117. package/dist/chunk-X7M4CQTN.js +0 -25
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)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
7
+ for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
8
+ }
10
9
  var __copyProps = (to, from, except, desc) => {
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);
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)
19
18
 
20
19
  // src/oauth/x.ts
21
- var x_exports = {};
20
+ var x_exports = {}
22
21
  __export(x_exports, {
23
- x: () => x
24
- });
25
- module.exports = __toCommonJS(x_exports);
22
+ x: () => x,
23
+ })
24
+ module.exports = __toCommonJS(x_exports)
26
25
  var x = {
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
- };
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
+ }
43
42
  // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- x
46
- });
43
+ 0 &&
44
+ (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,6 +1,2 @@
1
- import {
2
- x
3
- } from "../chunk-42XB3YCW.js";
4
- export {
5
- x
6
- };
1
+ import { x } from "../chunk-42XB3YCW.js"
2
+ export { x }
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)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
7
+ for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
8
+ }
10
9
  var __copyProps = (to, from, except, desc) => {
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);
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)
19
18
 
20
19
  // src/response.ts
21
- var response_exports = {};
20
+ var response_exports = {}
22
21
  __export(response_exports, {
23
- AuraResponse: () => AuraResponse
24
- });
25
- module.exports = __toCommonJS(response_exports);
22
+ AuraResponse: () => AuraResponse,
23
+ })
24
+ module.exports = __toCommonJS(response_exports)
26
25
  var AuraResponse = class extends Response {
27
- static json(body, init) {
28
- return Response.json(body, init);
29
- }
30
- };
26
+ static json(body, init) {
27
+ return Response.json(body, init)
28
+ }
29
+ }
31
30
  // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- AuraResponse
34
- });
31
+ 0 &&
32
+ (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,6 +1,2 @@
1
- import {
2
- AuraResponse
3
- } from "./chunk-JAPMIE6S.js";
4
- export {
5
- AuraResponse
6
- };
1
+ import { AuraResponse } from "./chunk-JAPMIE6S.js"
2
+ export { AuraResponse }
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)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
7
+ for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
8
+ }
10
9
  var __copyProps = (to, from, except, desc) => {
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);
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)
19
18
 
20
19
  // src/schemas.ts
21
- var schemas_exports = {};
20
+ var schemas_exports = {}
22
21
  __export(schemas_exports, {
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");
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")
34
33
  var OAuthProviderConfigSchema = (0, import_v4.object)({
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
- });
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
+ })
43
42
  var OAuthAuthorization = OAuthProviderConfigSchema.extend({
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
- });
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
+ })
49
48
  var OAuthAuthorizationResponse = (0, import_v4.object)({
50
- state: (0, import_v4.string)(),
51
- code: (0, import_v4.string)()
52
- });
49
+ state: (0, import_v4.string)(),
50
+ code: (0, import_v4.string)(),
51
+ })
53
52
  var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
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
- });
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
+ })
67
66
  var OAuthAccessToken = OAuthProviderConfigSchema.extend({
68
- redirectURI: (0, import_v4.string)(),
69
- code: (0, import_v4.string)(),
70
- codeVerifier: (0, import_v4.string)().min(43).max(128)
71
- });
67
+ redirectURI: (0, import_v4.string)(),
68
+ code: (0, import_v4.string)(),
69
+ codeVerifier: (0, import_v4.string)().min(43).max(128),
70
+ })
72
71
  var OAuthAccessTokenResponse = (0, import_v4.object)({
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
- });
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
+ })
79
78
  var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
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
- });
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
+ })
91
90
  var OAuthErrorResponse = (0, import_v4.object)({
92
- error: (0, import_v4.string)(),
93
- error_description: (0, import_v4.string)().optional()
94
- });
91
+ error: (0, import_v4.string)(),
92
+ error_description: (0, import_v4.string)().optional(),
93
+ })
95
94
  // Annotate the CommonJS export names for ESM import in node:
96
- 0 && (module.exports = {
97
- OAuthAccessToken,
98
- OAuthAccessTokenErrorResponse,
99
- OAuthAccessTokenResponse,
100
- OAuthAuthorization,
101
- OAuthAuthorizationErrorResponse,
102
- OAuthAuthorizationResponse,
103
- OAuthErrorResponse,
104
- OAuthProviderConfigSchema
105
- });
95
+ 0 &&
96
+ (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,130 +1,163 @@
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
- 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>;
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
+ >
20
23
  /**
21
24
  * Schema used to create the authorization URL for the OAuth flow and verify the
22
25
  * OAuth configuration.
23
26
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1
24
27
  */
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>;
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
+ >
45
51
  /**
46
52
  * Schema used in the callback action to validate the authorization response when the resource owner
47
53
  * has granted.
48
54
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2
49
55
  */
50
- declare const OAuthAuthorizationResponse: zod_v4.ZodObject<{
51
- state: zod_v4.ZodString;
52
- code: zod_v4.ZodString;
53
- }, zod_v4_core.$strip>;
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
+ >
54
63
  /**
55
64
  * Schema used in the callback action to validate the authorization error response when the resource owner
56
65
  * has denied the authorization request.
57
66
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1
58
67
  */
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>;
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
+ >
73
85
  /**
74
86
  * Schema for OAuth Access Token Request and OAuth Configuration
75
87
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.3
76
88
  */
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>;
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
+ >
93
108
  /**
94
109
  * Schema for OAuth Access Token Response
95
110
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
96
111
  * @see https://datatracker.ietf.org/doc/html/rfc7636#section-4
97
112
  */
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>;
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
+ >
105
123
  /**
106
124
  * Schema for OAuth Access Token Error Response
107
125
  * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
108
126
  */
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>;
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
+ >
121
142
  /**
122
143
  * @todo: verify if this schema is still needed
123
144
  * @deprecated
124
145
  */
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>;
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
+ >
129
153
 
130
- export { OAuthAccessToken, OAuthAccessTokenErrorResponse, OAuthAccessTokenResponse, OAuthAuthorization, OAuthAuthorizationErrorResponse, OAuthAuthorizationResponse, OAuthErrorResponse, OAuthProviderConfigSchema };
154
+ export {
155
+ OAuthAccessToken,
156
+ OAuthAccessTokenErrorResponse,
157
+ OAuthAccessTokenResponse,
158
+ OAuthAuthorization,
159
+ OAuthAuthorizationErrorResponse,
160
+ OAuthAuthorizationResponse,
161
+ OAuthErrorResponse,
162
+ OAuthProviderConfigSchema,
163
+ }