@gatwech/auth 1.0.0-beta.21 → 1.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.mjs +1 -1
- package/dist/{admin-BzUJL6tr.mjs → admin-rd-xHhnP.mjs} +1 -1
- package/dist/{anonymous-BjlTk4gl.mjs → anonymous-qSasVeIe.mjs} +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.mjs +1 -1
- package/dist/{api-Dk8Yj_J5.mjs → api-BV65Y-Rk.mjs} +5 -0
- package/dist/{audit-log-DgqHJ-uv.mjs → audit-log-DhRRCMrv.mjs} +21 -6
- package/dist/{auth-BoEA9bN7.mjs → auth-DtOjarwu.mjs} +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/plugins/index.d.mts +46 -46
- package/dist/client/react/index.d.mts +15 -15
- package/dist/{client-Da7tq8m6.d.mts → client-CDaFOX7A.d.mts} +4 -4
- package/dist/{client-B00gkznv.d.mts → client-D8XKNpua.d.mts} +1 -1
- package/dist/cookies/index.d.mts +2 -2
- package/dist/db/index.d.mts +1 -1
- package/dist/{email-otp-Dw0DypjQ.mjs → email-otp-BmgAht1S.mjs} +1 -1
- package/dist/{generic-oauth-DFj27JY8.mjs → generic-oauth-C5_AXj2z.mjs} +1 -1
- package/dist/{haveibeenpwned-CzNda7Tn.mjs → haveibeenpwned-_3a5amT-.mjs} +1 -1
- package/dist/{index-C-IDh5yy.d.mts → index-382PsmkK.d.mts} +2 -2
- package/dist/{index-BjCQ3jmE.d.mts → index-3lfPQHhX.d.mts} +118 -118
- package/dist/{index-CMG4Pnen.d.mts → index-B4aWSJEd.d.mts} +6 -6
- package/dist/{index-BWYXZVsV.d.mts → index-B5r4oL5q.d.mts} +5 -5
- package/dist/{index-BKy-8t2n.d.mts → index-B7iZf_Dl.d.mts} +449 -112
- package/dist/{index-VUyESU4p.d.mts → index-BhYE1_9j.d.mts} +1 -1
- package/dist/{index-IX1to9TB.d.mts → index-Blq8KrTy.d.mts} +33 -33
- package/dist/{index-oNlp4SvD.d.mts → index-C-z4TCHD.d.mts} +10 -10
- package/dist/{index-D1OZ2e4m.d.mts → index-C8F7PsET.d.mts} +13 -13
- package/dist/{index-TrOnY3pM.d.mts → index-CExSHSFz.d.mts} +169 -169
- package/dist/{index-iRoaTsOj.d.mts → index-CIxFDcfQ.d.mts} +2 -2
- package/dist/{index-BECNG13R.d.mts → index-COFPq-mg.d.mts} +13 -13
- package/dist/{index-YeXSxzhX.d.mts → index-CWwQ1Q7t.d.mts} +17 -17
- package/dist/{index-CbBQdS-u.d.mts → index-CWxKeTtE.d.mts} +6 -6
- package/dist/{index-cPt-00xm.d.mts → index-D0SgItjY.d.mts} +6 -6
- package/dist/{index-Bhc37y9F.d.mts → index-DCliG2n6.d.mts} +3 -3
- package/dist/{index-CM1rFdwV.d.mts → index-DPVukjga.d.mts} +9 -9
- package/dist/{index-WV7VzW2H.d.mts → index-DUu0ieh6.d.mts} +8 -8
- package/dist/{index-Bxive_YT.d.mts → index-De2a2OyC.d.mts} +9 -9
- package/dist/{index-CpH-1sse.d.mts → index-Dg6Ftb6f.d.mts} +9 -9
- package/dist/{index-Dt2I0G4X.d.mts → index-Dgyj1fTk.d.mts} +7 -7
- package/dist/{index-CTqynuxm.d.mts → index-DxIqV3rU.d.mts} +4 -4
- package/dist/{index-jEkJ2Zfk.d.mts → index-DxRAXHrZ.d.mts} +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/{jwt-DBN2mu0r.mjs → jwt-Czv-v097.mjs} +1 -1
- package/dist/{magic-link-D9Em1aOR.mjs → magic-link-CJgE0Ngn.mjs} +1 -1
- package/dist/{multi-session-Dno_8DxC.mjs → multi-session-bveCXtQW.mjs} +1 -1
- package/dist/{oauth-proxy-DW-zt8wv.mjs → oauth-proxy-69n1xA8L.mjs} +1 -1
- package/dist/oauth2/index.d.mts +1 -1
- package/dist/oauth2/index.mjs +1 -1
- package/dist/{one-tap-CodeyQb8.mjs → one-tap-Cm1eHuqi.mjs} +1 -1
- package/dist/{organization-D4QMpChF.mjs → organization-BK3ks97y.mjs} +1 -1
- package/dist/plugins/admin/index.d.mts +2 -2
- package/dist/plugins/admin/index.mjs +2 -2
- package/dist/plugins/anonymous/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.mjs +2 -2
- package/dist/plugins/audit-log/client.d.mts +23 -23
- package/dist/plugins/audit-log/index.d.mts +22 -22
- package/dist/plugins/audit-log/index.mjs +3 -3
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.mts +2 -2
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.mjs +2 -2
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/generic-oauth/index.mjs +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +2 -2
- package/dist/plugins/index.d.mts +22 -22
- package/dist/plugins/index.mjs +17 -17
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/jwt/index.mjs +2 -2
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +2 -2
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.mjs +2 -2
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +2 -2
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +2 -2
- package/dist/plugins/one-time-token/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.mjs +17 -17
- package/dist/plugins/organization/index.d.mts +2 -2
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.d.mts +2 -2
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/sentinel/client.d.mts +23 -23
- package/dist/plugins/sentinel/index.d.mts +22 -22
- package/dist/plugins/sentinel/index.mjs +4 -4
- package/dist/plugins/two-factor/index.d.mts +2 -2
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.mjs +2 -2
- package/dist/{plugins-yF8CFUDR.mjs → plugins-RSPSU3ro.mjs} +1 -1
- package/dist/{registry-CqG_3Qnx.mjs → registry-GztLf62p.mjs} +14 -2
- package/dist/{sentinel-B4Wo79HK.mjs → sentinel-CYtaI3eO.mjs} +264 -9
- package/dist/src/plugins/audit-log/events.d.ts +1 -0
- package/dist/src/plugins/audit-log/index.d.ts +45 -0
- package/dist/src/plugins/sentinel/actions.d.ts +2 -0
- package/dist/src/plugins/sentinel/geo.d.ts +11 -0
- package/dist/src/plugins/sentinel/index.d.ts +248 -3
- package/dist/src/plugins/sentinel/schema.d.ts +37 -0
- package/dist/src/plugins/sentinel/store.d.ts +34 -0
- package/dist/src/plugins/sentinel/types.d.ts +7 -0
- package/dist/src/utils/has-role.d.ts +5 -0
- package/dist/test-utils/index.d.mts +1044 -1044
- package/dist/test-utils/index.mjs +18 -18
- package/dist/types/index.d.mts +1 -1
- package/dist/{username-BHNvcvsY.mjs → username-DCp6yugu.mjs} +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as Prettify } from "../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { A as Where$1 } from "../index-
|
|
2
|
+
import { A as Where$1 } from "../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
|
@@ -121,7 +121,7 @@ const prismaAdapter = (prisma, config) => {
|
|
|
121
121
|
try {
|
|
122
122
|
await db[model].delete({ where: whereClause });
|
|
123
123
|
} catch (e) {
|
|
124
|
-
if (e?.meta?.cause === "Record to delete does not exist.") return;
|
|
124
|
+
if (e?.code === "P2025" || e?.meta?.cause === "Record to delete does not exist.") return;
|
|
125
125
|
console.log(e);
|
|
126
126
|
}
|
|
127
127
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
1
|
+
import { t as APIError } from "./api-BV65Y-Rk.mjs";
|
|
2
2
|
import { c as setSessionCookie, n as deleteSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
3
3
|
import { n as mergeSchema, t as getDate, u as parseUserOutput } from "./date-CMr04reD.mjs";
|
|
4
4
|
import { r as getSessionFromCtx } from "./session-BB3oqApE.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
2
|
import { r as getOrigin } from "./url-VB2gAbTI.mjs";
|
|
3
|
-
import { t as APIError } from "./api-
|
|
3
|
+
import { t as APIError } from "./api-BV65Y-Rk.mjs";
|
|
4
4
|
import { c as setSessionCookie, l as parseSetCookieHeader } from "./cookies-BuvlgcA-.mjs";
|
|
5
5
|
import { n as mergeSchema } from "./date-CMr04reD.mjs";
|
|
6
6
|
import { r as getSessionFromCtx } from "./session-BB3oqApE.mjs";
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { $ as AuthEndpoint, At as ok, Bt as listUserAccounts, Ct as revokeSession, Dt as requestPasswordReset, Et as sessionMiddleware, Ft as verifyEmail, Gt as originCheckMiddleware, Ht as unlinkAccount, It as callbackOAuth, Kt as getOAuthState, Lt as accountInfo, Mt as createEmailVerificationToken, Nt as sendVerificationEmail, Ot as requestPasswordResetCallback, Pt as sendVerificationEmailFn, Q as APIError, Rt as getAccessToken, St as revokeOtherSessions, Tt as sensitiveSessionMiddleware, Ut as isSimpleRequest, Vt as refreshToken, Wt as originCheck, _t as freshSessionMiddleware, at as optionsMiddleware, bt as listSessions, ct as changePassword, dt as setPassword, et as AuthMiddleware, ft as updateUser, gt as signInSocial, ht as signInEmail, it as getEndpoints, jt as error, kt as resetPassword, lt as deleteUser, mt as signOut, nt as createAuthEndpoint, ot as router, pt as signUpEmail, rt as createAuthMiddleware, st as changeEmail, tt as checkEndpointConflicts, ut as deleteUserCallback, vt as getSession, wt as revokeSessions, xt as requestOnlySessionMiddleware, yt as getSessionFromCtx, zt as linkSocialAccount } from "../index-
|
|
2
|
+
import { $ as AuthEndpoint, At as ok, Bt as listUserAccounts, Ct as revokeSession, Dt as requestPasswordReset, Et as sessionMiddleware, Ft as verifyEmail, Gt as originCheckMiddleware, Ht as unlinkAccount, It as callbackOAuth, Kt as getOAuthState, Lt as accountInfo, Mt as createEmailVerificationToken, Nt as sendVerificationEmail, Ot as requestPasswordResetCallback, Pt as sendVerificationEmailFn, Q as APIError, Rt as getAccessToken, St as revokeOtherSessions, Tt as sensitiveSessionMiddleware, Ut as isSimpleRequest, Vt as refreshToken, Wt as originCheck, _t as freshSessionMiddleware, at as optionsMiddleware, bt as listSessions, ct as changePassword, dt as setPassword, et as AuthMiddleware, ft as updateUser, gt as signInSocial, ht as signInEmail, it as getEndpoints, jt as error, kt as resetPassword, lt as deleteUser, mt as signOut, nt as createAuthEndpoint, ot as router, pt as signUpEmail, rt as createAuthMiddleware, st as changeEmail, tt as checkEndpointConflicts, ut as deleteUserCallback, vt as getSession, wt as revokeSessions, xt as requestOnlySessionMiddleware, yt as getSessionFromCtx, zt as linkSocialAccount } from "../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getOAuthState } from "../utils-B03WRaGi.mjs";
|
|
2
2
|
import "../url-VB2gAbTI.mjs";
|
|
3
|
-
import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, L as isSimpleRequest, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheck, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback, z as originCheckMiddleware } from "../api-
|
|
3
|
+
import { A as getAccessToken, C as createEmailVerificationToken, D as callbackOAuth, E as verifyEmail, L as isSimpleRequest, M as listUserAccounts, N as refreshToken, P as unlinkAccount, R as originCheck, S as error, T as sendVerificationEmailFn, _ as signInSocial, a as getEndpoints, b as resetPassword, c as changeEmail, d as deleteUserCallback, f as setPassword, g as signInEmail, h as signOut, i as createAuthMiddleware, j as linkSocialAccount, k as accountInfo, l as changePassword, m as signUpEmail, n as checkEndpointConflicts, o as optionsMiddleware, p as updateUser, r as createAuthEndpoint, s as router, t as APIError, u as deleteUser, v as requestPasswordReset, w as sendVerificationEmail, x as ok, y as requestPasswordResetCallback, z as originCheckMiddleware } from "../api-BV65Y-Rk.mjs";
|
|
4
4
|
import "../get-request-ip-DSjrEpGo.mjs";
|
|
5
5
|
import "../json-D0TBLy4q.mjs";
|
|
6
6
|
import "../crypto-CCyta8xj.mjs";
|
|
@@ -343,6 +343,11 @@ async function onRequestRateLimit(req, ctx) {
|
|
|
343
343
|
if (resolved === false) return;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
+
const secondaryStorage = ctx.options.secondaryStorage;
|
|
347
|
+
if (!ctx.options.rateLimit?.customStorage && ctx.rateLimit.storage === "secondary-storage" && secondaryStorage?.increment) {
|
|
348
|
+
if (await secondaryStorage.increment(`rate-limit:${key}`, window) > max) return rateLimitResponse(window);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
346
351
|
const storage = getRateLimitStorage(ctx, { window });
|
|
347
352
|
const data = await storage.get(key);
|
|
348
353
|
const now = Date.now();
|
|
@@ -2,7 +2,7 @@ import { t as getIp } from "./get-request-ip-DSjrEpGo.mjs";
|
|
|
2
2
|
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
3
3
|
import { n as mergeSchema } from "./date-CMr04reD.mjs";
|
|
4
4
|
import { r as getSessionFromCtx, u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
5
|
-
import { a as CREDENTIAL_SIGN_IN_PATHS, c as SIGN_IN_PATHS, i as AUDIT_EVENT_TYPES, l as VERIFICATION_PATHS, n as registerAuditRecorder, o as PATH_EVENTS, r as ALL_EVENT_TYPES, s as SECURITY_EVENT_TYPES } from "./registry-
|
|
5
|
+
import { a as CREDENTIAL_SIGN_IN_PATHS, c as SIGN_IN_PATHS, i as AUDIT_EVENT_TYPES, l as VERIFICATION_PATHS, n as registerAuditRecorder, o as PATH_EVENTS, r as ALL_EVENT_TYPES, s as SECURITY_EVENT_TYPES, u as hasRole } from "./registry-GztLf62p.mjs";
|
|
6
6
|
import { env } from "@gatwech/core/env";
|
|
7
7
|
import { defineErrorCodes } from "@gatwech/core/utils";
|
|
8
8
|
import { APIError } from "better-call";
|
|
@@ -453,10 +453,6 @@ const auditLog = (options) => {
|
|
|
453
453
|
return [];
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
function hasRole(roleField, roles) {
|
|
457
|
-
if (typeof roleField !== "string") return false;
|
|
458
|
-
return roleField.split(",").map((role) => role.trim()).some((role) => roles.includes(role));
|
|
459
|
-
}
|
|
460
456
|
async function runQuery(auth, query) {
|
|
461
457
|
try {
|
|
462
458
|
return await queryEvents(auth, query);
|
|
@@ -829,7 +825,26 @@ const auditLog = (options) => {
|
|
|
829
825
|
} } }
|
|
830
826
|
} }
|
|
831
827
|
} }
|
|
832
|
-
}, async (ctx) => ctx.json({ types: ALL_EVENT_TYPES }))
|
|
828
|
+
}, async (ctx) => ctx.json({ types: ALL_EVENT_TYPES })),
|
|
829
|
+
deleteOldEvents: createAuthEndpoint("/audit-log/delete-old-events", {
|
|
830
|
+
method: "POST",
|
|
831
|
+
body: z$1.object({ olderThanDays: z$1.number().int().min(1).meta({ description: "Delete events recorded more than this many days ago. There is no default: set it to your retention period." }) }),
|
|
832
|
+
metadata: {
|
|
833
|
+
SERVER_ONLY: true,
|
|
834
|
+
client: false
|
|
835
|
+
}
|
|
836
|
+
}, async (ctx) => {
|
|
837
|
+
if (!opts.database) return ctx.json({ deleted: 0 });
|
|
838
|
+
const deleted = await ctx.context.adapter.deleteMany({
|
|
839
|
+
model: "auditLog",
|
|
840
|
+
where: [{
|
|
841
|
+
field: "createdAt",
|
|
842
|
+
operator: "lt",
|
|
843
|
+
value: /* @__PURE__ */ new Date(Date.now() - ctx.body.olderThanDays * 864e5)
|
|
844
|
+
}]
|
|
845
|
+
});
|
|
846
|
+
return ctx.json({ deleted });
|
|
847
|
+
})
|
|
833
848
|
},
|
|
834
849
|
schema: mergedSchema,
|
|
835
850
|
$ERROR_CODES: AUDIT_LOG_ERROR_CODES,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as generateId } from "./utils-B03WRaGi.mjs";
|
|
2
2
|
import { r as getOrigin, t as getBaseURL } from "./url-VB2gAbTI.mjs";
|
|
3
|
-
import { a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-
|
|
3
|
+
import { a as getEndpoints, n as checkEndpointConflicts, s as router } from "./api-BV65Y-Rk.mjs";
|
|
4
4
|
import { i as verifyPassword, r as hashPassword } from "./crypto-CCyta8xj.mjs";
|
|
5
5
|
import { i as getCookies, t as createCookieGetter } from "./cookies-BuvlgcA-.mjs";
|
|
6
6
|
import { a as createInternalAdapter, r as getAdapter, s as getMigrations } from "./db-CV59HpEF.mjs";
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as PrettifyDeep, h as UnionToIntersection } from "../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { B as InferPluginsFromClient, F as ClientStore, G as PayvoAuthClientPlugin, H as InferUserFromClient, I as InferActions, K as SessionQueryParams, L as InferAdditionalFromClient, M as AtomListener, N as ClientAtomListener, P as ClientOptions, R as InferClientAPI, U as IsSignal, V as InferSessionFromClient, W as PayvoAuthClientOptions, q as Store, z as InferErrorCodes } from "../index-
|
|
2
|
+
import { B as InferPluginsFromClient, F as ClientStore, G as PayvoAuthClientPlugin, H as InferUserFromClient, I as InferActions, K as SessionQueryParams, L as InferAdditionalFromClient, M as AtomListener, N as ClientAtomListener, P as ClientOptions, R as InferClientAPI, U as IsSignal, V as InferSessionFromClient, W as PayvoAuthClientOptions, q as Store, z as InferErrorCodes } from "../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { a as LiteralNumber, c as OmitId, d as PrettifyDeep, f as Primitive, g as WithoutEmpty, h as UnionToIntersection, i as HasRequiredKeys, l as PreserveJSDoc, m as StripEmptyObjects, n as DeepPartial, o as LiteralString, p as RequiredKeysOf, r as Expand, s as LiteralUnion, t as Awaitable, u as Prettify } from "../../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { K as SessionQueryParams, Y as Auth, g as User$1, h as Session$1, i as PayvoAuthPlugin$1, mn as InferAdditionalFieldsFromPluginOptions, r as PayvoAuthOptions$1 } from "../../index-
|
|
2
|
+
import { K as SessionQueryParams, Y as Auth, g as User$1, h as Session$1, i as PayvoAuthPlugin$1, mn as InferAdditionalFieldsFromPluginOptions, r as PayvoAuthOptions$1 } from "../../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
import { a as Role, i as AccessControl, o as Statements } from "../../index-CxlWnL9c.mjs";
|
|
7
|
-
import { t as admin } from "../../index-
|
|
8
|
-
import { r as anonymous } from "../../index-
|
|
9
|
-
import { L as apiKey } from "../../index-
|
|
10
|
-
import "../../index-
|
|
11
|
-
import "../../index-
|
|
12
|
-
import "../../index-
|
|
13
|
-
import { i as deviceAuthorizationClient } from "../../index-
|
|
14
|
-
import { n as emailOTP } from "../../index-
|
|
15
|
-
import { n as genericOAuth } from "../../index-
|
|
16
|
-
import "../../index-
|
|
17
|
-
import { t as jwt } from "../../index-
|
|
18
|
-
import { t as magicLink } from "../../index-
|
|
19
|
-
import { t as multiSession } from "../../index-
|
|
20
|
-
import "../../index-
|
|
21
|
-
import "../../index-
|
|
22
|
-
import { t as oneTimeToken } from "../../index-
|
|
7
|
+
import { t as admin } from "../../index-Blq8KrTy.mjs";
|
|
8
|
+
import { r as anonymous } from "../../index-B4aWSJEd.mjs";
|
|
9
|
+
import { L as apiKey } from "../../index-B7iZf_Dl.mjs";
|
|
10
|
+
import "../../index-CWxKeTtE.mjs";
|
|
11
|
+
import "../../index-382PsmkK.mjs";
|
|
12
|
+
import "../../index-D0SgItjY.mjs";
|
|
13
|
+
import { i as deviceAuthorizationClient } from "../../index-DxRAXHrZ.mjs";
|
|
14
|
+
import { n as emailOTP } from "../../index-C8F7PsET.mjs";
|
|
15
|
+
import { n as genericOAuth } from "../../index-DUu0ieh6.mjs";
|
|
16
|
+
import "../../index-DCliG2n6.mjs";
|
|
17
|
+
import { t as jwt } from "../../index-DPVukjga.mjs";
|
|
18
|
+
import { t as magicLink } from "../../index-DxIqV3rU.mjs";
|
|
19
|
+
import { t as multiSession } from "../../index-Dg6Ftb6f.mjs";
|
|
20
|
+
import "../../index-C-z4TCHD.mjs";
|
|
21
|
+
import "../../index-CIxFDcfQ.mjs";
|
|
22
|
+
import { t as oneTimeToken } from "../../index-B5r4oL5q.mjs";
|
|
23
23
|
import "../../index-QmocqGM-.mjs";
|
|
24
|
-
import { F as OrganizationOptions, S as Team, b as OrganizationRole, c as InferMember, f as InferTeam, g as Member, l as InferOrganization, p as Invitation, r as OrganizationPlugin, s as InferInvitation, v as Organization, w as TeamMember } from "../../index-
|
|
25
|
-
import { r as phoneNumber } from "../../index-
|
|
26
|
-
import { n as twoFactorClient } from "../../index-
|
|
27
|
-
import { n as Passkey, t as passkey } from "../../index-
|
|
28
|
-
import { n as username } from "../../index-
|
|
29
|
-
import { t as auditLogClient } from "../../client-
|
|
30
|
-
import { t as sentinelClient } from "../../client-
|
|
31
|
-
import * as
|
|
24
|
+
import { F as OrganizationOptions, S as Team, b as OrganizationRole, c as InferMember, f as InferTeam, g as Member, l as InferOrganization, p as Invitation, r as OrganizationPlugin, s as InferInvitation, v as Organization, w as TeamMember } from "../../index-CExSHSFz.mjs";
|
|
25
|
+
import { r as phoneNumber } from "../../index-Dgyj1fTk.mjs";
|
|
26
|
+
import { n as twoFactorClient } from "../../index-CWwQ1Q7t.mjs";
|
|
27
|
+
import { n as Passkey, t as passkey } from "../../index-COFPq-mg.mjs";
|
|
28
|
+
import { n as username } from "../../index-De2a2OyC.mjs";
|
|
29
|
+
import { t as auditLogClient } from "../../client-D8XKNpua.mjs";
|
|
30
|
+
import { t as sentinelClient } from "../../client-CDaFOX7A.mjs";
|
|
31
|
+
import * as _gatwech_core54 from "@gatwech/core";
|
|
32
32
|
import { ClientStore, PayvoAuthOptions } from "@gatwech/core";
|
|
33
33
|
import { DBFieldAttribute } from "@gatwech/core/db";
|
|
34
|
-
import * as
|
|
34
|
+
import * as _better_fetch_fetch37 from "@better-fetch/fetch";
|
|
35
35
|
import { BetterFetch, BetterFetchOption } from "@better-fetch/fetch";
|
|
36
|
-
import * as
|
|
36
|
+
import * as nanostores1 from "nanostores";
|
|
37
37
|
import { atom } from "nanostores";
|
|
38
38
|
|
|
39
39
|
//#region src/plugins/additional-fields/client.d.ts
|
|
@@ -369,10 +369,10 @@ interface GoogleOneTapActionOptions extends Omit<GoogleOneTapOptions, "clientId"
|
|
|
369
369
|
}
|
|
370
370
|
declare const oneTapClient: (options: GoogleOneTapOptions) => {
|
|
371
371
|
id: "one-tap";
|
|
372
|
-
getActions: ($fetch:
|
|
372
|
+
getActions: ($fetch: _better_fetch_fetch37.BetterFetch, _: _gatwech_core54.ClientStore) => {
|
|
373
373
|
oneTap: (opts?: GoogleOneTapActionOptions | undefined, fetchOptions?: BetterFetchOption | undefined) => Promise<void>;
|
|
374
374
|
};
|
|
375
|
-
getAtoms($fetch:
|
|
375
|
+
getAtoms($fetch: _better_fetch_fetch37.BetterFetch): {};
|
|
376
376
|
};
|
|
377
377
|
//#endregion
|
|
378
378
|
//#region src/plugins/one-time-token/client.d.ts
|
|
@@ -471,7 +471,7 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
471
471
|
} ? true : false;
|
|
472
472
|
};
|
|
473
473
|
}>;
|
|
474
|
-
getActions: ($fetch:
|
|
474
|
+
getActions: ($fetch: _better_fetch_fetch37.BetterFetch, _$store: _gatwech_core54.ClientStore, co: _gatwech_core54.PayvoAuthClientOptions | undefined) => {
|
|
475
475
|
$Infer: {
|
|
476
476
|
ActiveOrganization: CO["teams"] extends {
|
|
477
477
|
enabled: true;
|
|
@@ -555,12 +555,12 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
555
555
|
}) => boolean;
|
|
556
556
|
};
|
|
557
557
|
};
|
|
558
|
-
getAtoms: ($fetch:
|
|
559
|
-
$listOrg:
|
|
560
|
-
$activeOrgSignal:
|
|
561
|
-
$activeMemberSignal:
|
|
562
|
-
$activeMemberRoleSignal:
|
|
563
|
-
activeOrganization:
|
|
558
|
+
getAtoms: ($fetch: _better_fetch_fetch37.BetterFetch) => {
|
|
559
|
+
$listOrg: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
560
|
+
$activeOrgSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
561
|
+
$activeMemberSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
562
|
+
$activeMemberRoleSignal: nanostores1.PreinitializedWritableAtom<boolean> & object;
|
|
563
|
+
activeOrganization: nanostores1.PreinitializedWritableAtom<{
|
|
564
564
|
data: Prettify<({
|
|
565
565
|
id: string;
|
|
566
566
|
name: string;
|
|
@@ -572,14 +572,14 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
572
572
|
members: InferMember<CO, false>[];
|
|
573
573
|
invitations: InferInvitation<CO, false>[];
|
|
574
574
|
}> | null;
|
|
575
|
-
error: null |
|
|
575
|
+
error: null | _better_fetch_fetch37.BetterFetchError;
|
|
576
576
|
isPending: boolean;
|
|
577
577
|
isRefetching: boolean;
|
|
578
578
|
refetch: (queryParams?: {
|
|
579
579
|
query?: SessionQueryParams;
|
|
580
580
|
} | undefined) => void;
|
|
581
581
|
}> & object;
|
|
582
|
-
listOrganizations:
|
|
582
|
+
listOrganizations: nanostores1.PreinitializedWritableAtom<{
|
|
583
583
|
data: ({
|
|
584
584
|
id: string;
|
|
585
585
|
name: string;
|
|
@@ -588,14 +588,14 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
588
588
|
logo?: string | null | undefined;
|
|
589
589
|
metadata?: any;
|
|
590
590
|
} & InferAdditionalFieldsFromPluginOptions<"organization", CO, false> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never)[] | null;
|
|
591
|
-
error: null |
|
|
591
|
+
error: null | _better_fetch_fetch37.BetterFetchError;
|
|
592
592
|
isPending: boolean;
|
|
593
593
|
isRefetching: boolean;
|
|
594
594
|
refetch: (queryParams?: {
|
|
595
595
|
query?: SessionQueryParams;
|
|
596
596
|
} | undefined) => void;
|
|
597
597
|
}> & object;
|
|
598
|
-
activeMember:
|
|
598
|
+
activeMember: nanostores1.PreinitializedWritableAtom<{
|
|
599
599
|
data: {
|
|
600
600
|
id: string;
|
|
601
601
|
organizationId: string;
|
|
@@ -603,18 +603,18 @@ declare const organizationClient: <CO extends OrganizationClientOptions>(options
|
|
|
603
603
|
role: string;
|
|
604
604
|
createdAt: Date;
|
|
605
605
|
} | null;
|
|
606
|
-
error: null |
|
|
606
|
+
error: null | _better_fetch_fetch37.BetterFetchError;
|
|
607
607
|
isPending: boolean;
|
|
608
608
|
isRefetching: boolean;
|
|
609
609
|
refetch: (queryParams?: {
|
|
610
610
|
query?: SessionQueryParams;
|
|
611
611
|
} | undefined) => void;
|
|
612
612
|
}> & object;
|
|
613
|
-
activeMemberRole:
|
|
613
|
+
activeMemberRole: nanostores1.PreinitializedWritableAtom<{
|
|
614
614
|
data: {
|
|
615
615
|
role: string;
|
|
616
616
|
} | null;
|
|
617
|
-
error: null |
|
|
617
|
+
error: null | _better_fetch_fetch37.BetterFetchError;
|
|
618
618
|
isPending: boolean;
|
|
619
619
|
isRefetching: boolean;
|
|
620
620
|
refetch: (queryParams?: {
|
|
@@ -912,16 +912,16 @@ declare const passkeyClient: () => {
|
|
|
912
912
|
};
|
|
913
913
|
};
|
|
914
914
|
getAtoms($fetch: BetterFetch): {
|
|
915
|
-
listPasskeys:
|
|
915
|
+
listPasskeys: nanostores1.PreinitializedWritableAtom<{
|
|
916
916
|
data: Passkey[] | null;
|
|
917
|
-
error: null |
|
|
917
|
+
error: null | _better_fetch_fetch37.BetterFetchError;
|
|
918
918
|
isPending: boolean;
|
|
919
919
|
isRefetching: boolean;
|
|
920
920
|
refetch: (queryParams?: {
|
|
921
921
|
query?: SessionQueryParams;
|
|
922
922
|
} | undefined) => void;
|
|
923
923
|
}> & object;
|
|
924
|
-
$listPasskeys:
|
|
924
|
+
$listPasskeys: nanostores1.PreinitializedWritableAtom<any> & object;
|
|
925
925
|
};
|
|
926
926
|
pathMethods: {
|
|
927
927
|
"/passkey/register": "POST";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { d as PrettifyDeep, h as UnionToIntersection } from "../../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { I as InferActions, K as SessionQueryParams, R as InferClientAPI, U as IsSignal, z as InferErrorCodes } from "../../index-
|
|
2
|
+
import { I as InferActions, K as SessionQueryParams, R as InferClientAPI, U as IsSignal, z as InferErrorCodes } from "../../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
import { PayvoAuthClientOptions, PayvoAuthClientPlugin } from "@gatwech/core";
|
|
7
7
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
8
|
-
import * as
|
|
8
|
+
import * as _better_fetch_fetch2 from "@better-fetch/fetch";
|
|
9
9
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
10
10
|
import * as nanostores0 from "nanostores";
|
|
11
11
|
import { Store, StoreValue } from "nanostores";
|
|
@@ -97,27 +97,27 @@ declare function createAuthClient<Option extends PayvoAuthClientOptions>(options
|
|
|
97
97
|
error: null;
|
|
98
98
|
} ? S : Res : never>;
|
|
99
99
|
};
|
|
100
|
-
$fetch:
|
|
101
|
-
plugins: (
|
|
100
|
+
$fetch: _better_fetch_fetch2.BetterFetch<{
|
|
101
|
+
plugins: (_better_fetch_fetch2.BetterFetchPlugin | {
|
|
102
102
|
id: string;
|
|
103
103
|
name: string;
|
|
104
104
|
hooks: {
|
|
105
|
-
onSuccess(context:
|
|
105
|
+
onSuccess(context: _better_fetch_fetch2.SuccessContext<any>): void;
|
|
106
106
|
};
|
|
107
107
|
} | {
|
|
108
108
|
id: string;
|
|
109
109
|
name: string;
|
|
110
110
|
hooks: {
|
|
111
|
-
onRequest<T extends Record<string, any>>(context:
|
|
111
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch2.RequestContext<T>): void;
|
|
112
112
|
};
|
|
113
113
|
} | {
|
|
114
114
|
id: string;
|
|
115
115
|
name: string;
|
|
116
116
|
hooks: {
|
|
117
|
-
onSuccess: ((context:
|
|
118
|
-
onError: ((context:
|
|
119
|
-
onRequest: (<T extends Record<string, any>>(context:
|
|
120
|
-
onResponse: ((context:
|
|
117
|
+
onSuccess: ((context: _better_fetch_fetch2.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
118
|
+
onError: ((context: _better_fetch_fetch2.ErrorContext) => Promise<void> | void) | undefined;
|
|
119
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch2.RequestContext<T>) => Promise<_better_fetch_fetch2.RequestContext | void> | _better_fetch_fetch2.RequestContext | void) | undefined;
|
|
120
|
+
onResponse: ((context: _better_fetch_fetch2.ResponseContext) => Promise<Response | void | _better_fetch_fetch2.ResponseContext> | Response | _better_fetch_fetch2.ResponseContext | void) | undefined;
|
|
121
121
|
};
|
|
122
122
|
})[];
|
|
123
123
|
method: string;
|
|
@@ -137,12 +137,12 @@ declare function createAuthClient<Option extends PayvoAuthClientOptions>(options
|
|
|
137
137
|
referrerPolicy?: ReferrerPolicy | undefined;
|
|
138
138
|
signal?: (AbortSignal | null) | undefined;
|
|
139
139
|
window?: null | undefined;
|
|
140
|
-
onRetry?: ((response:
|
|
140
|
+
onRetry?: ((response: _better_fetch_fetch2.ResponseContext) => Promise<void> | void) | undefined;
|
|
141
141
|
hookOptions?: {
|
|
142
142
|
cloneResponse?: boolean;
|
|
143
143
|
} | undefined;
|
|
144
144
|
timeout?: number | undefined;
|
|
145
|
-
customFetchImpl:
|
|
145
|
+
customFetchImpl: _better_fetch_fetch2.FetchEsque;
|
|
146
146
|
baseURL: string;
|
|
147
147
|
throw?: boolean | undefined;
|
|
148
148
|
auth?: ({
|
|
@@ -162,10 +162,10 @@ declare function createAuthClient<Option extends PayvoAuthClientOptions>(options
|
|
|
162
162
|
params?: any;
|
|
163
163
|
duplex?: "full" | "half" | undefined;
|
|
164
164
|
jsonParser: (text: string) => Promise<any> | any;
|
|
165
|
-
retry?:
|
|
165
|
+
retry?: _better_fetch_fetch2.RetryOptions | undefined;
|
|
166
166
|
retryAttempt?: number | undefined;
|
|
167
|
-
output?: (
|
|
168
|
-
errorSchema?:
|
|
167
|
+
output?: (_better_fetch_fetch2.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
168
|
+
errorSchema?: _better_fetch_fetch2.StandardSchemaV1 | undefined;
|
|
169
169
|
disableValidation?: boolean | undefined;
|
|
170
170
|
}, unknown, unknown, {}>;
|
|
171
171
|
$store: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as sentinel } from "./index-
|
|
2
|
-
import * as
|
|
1
|
+
import { c as sentinel } from "./index-B7iZf_Dl.mjs";
|
|
2
|
+
import * as _better_fetch_fetch0 from "@better-fetch/fetch";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/sentinel/client.d.ts
|
|
5
5
|
declare const sentinelClient: (options?: {
|
|
@@ -63,11 +63,11 @@ declare const sentinelClient: (options?: {
|
|
|
63
63
|
id: string;
|
|
64
64
|
name: string;
|
|
65
65
|
hooks: {
|
|
66
|
-
onRequest<T extends Record<string, any>>(context:
|
|
66
|
+
onRequest<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>): Promise<_better_fetch_fetch0.RequestContext<T>>;
|
|
67
67
|
onResponse({
|
|
68
68
|
response,
|
|
69
69
|
request
|
|
70
|
-
}:
|
|
70
|
+
}: _better_fetch_fetch0.ResponseContext): Promise<Response | undefined>;
|
|
71
71
|
};
|
|
72
72
|
}[];
|
|
73
73
|
};
|
package/dist/cookies/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../helper-BgOIGHsu.mjs";
|
|
2
|
-
import "../index-
|
|
2
|
+
import "../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
|
6
|
-
import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-
|
|
6
|
+
import { a as getCookies, c as setCookieCache, d as getChunkedCookie, f as parseSetCookieHeader, i as getCookieCache, l as setSessionCookie, n as createCookieGetter, o as getSessionCookie, p as setCookieToHeader, r as deleteSessionCookie, s as parseCookies, t as EligibleCookies, u as createSessionStore } from "../index-BhYE1_9j.mjs";
|
|
7
7
|
export { EligibleCookies, createCookieGetter, createSessionStore, deleteSessionCookie, getChunkedCookie, getCookieCache, getCookies, getSessionCookie, parseCookies, parseSetCookieHeader, setCookieCache, setCookieToHeader, setSessionCookie };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../helper-BgOIGHsu.mjs";
|
|
2
|
-
import { $t as mergeSchema, Jt as convertFromDB, Qt as toZodSchema, Sn as createFieldAttribute, Xt as getAdapter, Yt as convertToDB, Zt as FieldAttributeToSchema, _n as InferFieldsInput, an as parseSessionOutput, bn as InferValueType, cn as createInternalAdapter, dn as getMigrations, en as parseAccountInput, fn as matchType, gn as InferFieldsFromPlugins, hn as InferFieldsFromOptions, in as parseSessionInput, ln as getAuthTables, mn as InferAdditionalFieldsFromPluginOptions, nn as parseAdditionalUserInput, on as parseUserInput, pn as FieldAttributeToObject, qt as getWithHooks, rn as parseInputData, sn as parseUserOutput, tn as parseAccountOutput, un as getSchema, vn as InferFieldsInputClient, xn as PluginFieldAttribute, yn as InferFieldsOutput } from "../index-
|
|
2
|
+
import { $t as mergeSchema, Jt as convertFromDB, Qt as toZodSchema, Sn as createFieldAttribute, Xt as getAdapter, Yt as convertToDB, Zt as FieldAttributeToSchema, _n as InferFieldsInput, an as parseSessionOutput, bn as InferValueType, cn as createInternalAdapter, dn as getMigrations, en as parseAccountInput, fn as matchType, gn as InferFieldsFromPlugins, hn as InferFieldsFromOptions, in as parseSessionInput, ln as getAuthTables, mn as InferAdditionalFieldsFromPluginOptions, nn as parseAdditionalUserInput, on as parseUserInput, pn as FieldAttributeToObject, qt as getWithHooks, rn as parseInputData, sn as parseUserOutput, tn as parseAccountOutput, un as getSchema, vn as InferFieldsInputClient, xn as PluginFieldAttribute, yn as InferFieldsOutput } from "../index-3lfPQHhX.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
4
|
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as APIError } from "./api-
|
|
1
|
+
import { t as APIError } from "./api-BV65Y-Rk.mjs";
|
|
2
2
|
import { n as symmetricEncrypt, t as symmetricDecrypt } from "./crypto-CCyta8xj.mjs";
|
|
3
3
|
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
4
4
|
import { c as setSessionCookie, s as setCookieCache } from "./cookies-BuvlgcA-.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as parseState, r as generateState } from "./utils-B03WRaGi.mjs";
|
|
2
|
-
import { O as handleOAuthUserInfo } from "./api-
|
|
2
|
+
import { O as handleOAuthUserInfo } from "./api-BV65Y-Rk.mjs";
|
|
3
3
|
import { c as setSessionCookie } from "./cookies-BuvlgcA-.mjs";
|
|
4
4
|
import { u as sessionMiddleware } from "./session-BB3oqApE.mjs";
|
|
5
5
|
import { BASE_ERROR_CODES } from "@gatwech/core/error";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _gatwech_core30 from "@gatwech/core";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/captcha/constants.d.ts
|
|
4
4
|
declare const Providers: {
|
|
@@ -34,7 +34,7 @@ type CaptchaOptions = GoogleRecaptchaOptions | CloudflareTurnstileOptions | HCap
|
|
|
34
34
|
//#region src/plugins/captcha/index.d.ts
|
|
35
35
|
declare const captcha: (options: CaptchaOptions) => {
|
|
36
36
|
id: "captcha";
|
|
37
|
-
onRequest: (request: Request, ctx:
|
|
37
|
+
onRequest: (request: Request, ctx: _gatwech_core30.AuthContext<_gatwech_core30.PayvoAuthOptions>) => Promise<{
|
|
38
38
|
response: Response;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
};
|