@gatwech/auth 1.0.0-beta.22 → 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/api/index.d.mts +1 -1
- package/dist/{audit-log-DgqHJ-uv.mjs → audit-log-DhRRCMrv.mjs} +21 -6
- package/dist/client/index.d.mts +1 -1
- package/dist/client/plugins/index.d.mts +24 -24
- package/dist/client/react/index.d.mts +15 -15
- package/dist/{client-DO9MgP_0.d.mts → client-CDaFOX7A.d.mts} +4 -4
- package/dist/{client-ukvqpcbI.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/{index-DlS-HqZR.d.mts → index-382PsmkK.d.mts} +2 -2
- package/dist/{index-DngQlUSI.d.mts → index-3lfPQHhX.d.mts} +113 -113
- package/dist/{index-CRiKKdkb.d.mts → index-B4aWSJEd.d.mts} +6 -6
- package/dist/{index-hP8gvyp-.d.mts → index-B5r4oL5q.d.mts} +5 -5
- package/dist/{index-AiKdOFSd.d.mts → index-B7iZf_Dl.d.mts} +387 -49
- package/dist/{index-CTSeVJJB.d.mts → index-BhYE1_9j.d.mts} +1 -1
- package/dist/{index-D3uQsW8T.d.mts → index-Blq8KrTy.d.mts} +30 -30
- package/dist/{index-Dkm27DLN.d.mts → index-C-z4TCHD.d.mts} +10 -10
- package/dist/{index-Do8AV4PF.d.mts → index-C8F7PsET.d.mts} +13 -13
- package/dist/{index-DSoiUc1C.d.mts → index-CExSHSFz.d.mts} +166 -166
- package/dist/{index-CxhQu1HM.d.mts → index-CIxFDcfQ.d.mts} +2 -2
- package/dist/{index-eOfQxlQV.d.mts → index-COFPq-mg.d.mts} +13 -13
- package/dist/{index-B4hJVVRn.d.mts → index-CWwQ1Q7t.d.mts} +19 -19
- package/dist/{index-BzzhaGLe.d.mts → index-CWxKeTtE.d.mts} +6 -6
- package/dist/{index-Dl0bD1_6.d.mts → index-D0SgItjY.d.mts} +6 -6
- package/dist/{index-BC0aAKsT.d.mts → index-DCliG2n6.d.mts} +3 -3
- package/dist/{index-D-rjuF7p.d.mts → index-DPVukjga.d.mts} +9 -9
- package/dist/{index-SYRh5FW7.d.mts → index-DUu0ieh6.d.mts} +8 -8
- package/dist/{index-pdl9MzQu.d.mts → index-De2a2OyC.d.mts} +9 -9
- package/dist/{index-BfLofiXO.d.mts → index-Dg6Ftb6f.d.mts} +9 -9
- package/dist/{index-CRNh-5Tc.d.mts → index-Dgyj1fTk.d.mts} +7 -7
- package/dist/{index-DKirx_GW.d.mts → index-DxIqV3rU.d.mts} +4 -4
- package/dist/{index-CBGNX7W1.d.mts → index-DxRAXHrZ.d.mts} +6 -6
- package/dist/index.d.mts +1 -1
- 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/oauth2/index.d.mts +1 -1
- package/dist/plugins/admin/index.d.mts +2 -2
- package/dist/plugins/anonymous/index.d.mts +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 +2 -2
- 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/device-authorization/index.d.mts +1 -1
- package/dist/plugins/email-otp/index.d.mts +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/index.d.mts +22 -22
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/jwt/index.d.mts +2 -2
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/multi-session/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-time-token/index.d.mts +2 -2
- package/dist/plugins/one-time-token/index.mjs +3 -3
- package/dist/plugins/organization/index.d.mts +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/plugins/phone-number/index.d.mts +2 -2
- package/dist/plugins/sentinel/client.d.mts +23 -23
- package/dist/plugins/sentinel/index.d.mts +22 -22
- package/dist/plugins/sentinel/index.mjs +2 -2
- package/dist/plugins/two-factor/index.d.mts +2 -2
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/{registry-CqG_3Qnx.mjs → registry-GztLf62p.mjs} +14 -2
- package/dist/{sentinel-B-2jmmZh.mjs → sentinel-CYtaI3eO.mjs} +234 -3
- 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/index.d.ts +247 -0
- 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 +273 -273
- package/dist/test-utils/index.mjs +3 -3
- package/dist/types/index.d.mts +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";
|
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";
|
|
@@ -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,
|
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,33 +1,33 @@
|
|
|
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-
|
|
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
31
|
import * as _gatwech_core54 from "@gatwech/core";
|
|
32
32
|
import { ClientStore, PayvoAuthOptions } from "@gatwech/core";
|
|
33
33
|
import { DBFieldAttribute } from "@gatwech/core/db";
|
|
@@ -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 * 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
|
};
|