@gatwech/auth 1.0.0-beta.19 → 1.0.0-beta.21
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/drizzle-adapter/index.mjs +11 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.mjs +1 -1
- package/dist/{audit-log-DKsUWR8O.mjs → audit-log-DgqHJ-uv.mjs} +132 -63
- package/dist/{auth-vfCyIIeV.mjs → auth-BoEA9bN7.mjs} +14 -1
- package/dist/client/index.d.mts +18 -18
- package/dist/client/plugins/index.d.mts +28 -28
- package/dist/client/plugins/index.mjs +2 -2
- package/dist/client/react/index.d.mts +16 -16
- package/dist/{client-CSOs1YN7.d.mts → client-B00gkznv.d.mts} +1 -1
- package/dist/{client-4QEb0rUr.mjs → client-CMsC6-rl.mjs} +1 -1
- package/dist/{client-DZHNfxuR.d.mts → client-Da7tq8m6.d.mts} +4 -4
- package/dist/cookies/index.d.mts +3 -3
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{db-7vHnL1XA.mjs → db-CV59HpEF.mjs} +2 -2
- package/dist/{index-mxEUX2Gs.d.mts → index-BECNG13R.d.mts} +13 -13
- package/dist/{index-DRM35ir1.d.mts → index-BKy-8t2n.d.mts} +118 -65
- package/dist/{index-Df0KhQRf-BEa5tdwJ.d.mts → index-BL_t8cRp-C4QYBsac.d.mts} +56 -17
- package/dist/{index-DXVU0HGr.d.mts → index-BWYXZVsV.d.mts} +5 -5
- package/dist/{index-Df4SvZaE.d.mts → index-Bhc37y9F.d.mts} +3 -3
- package/dist/{index-BNhJglHC.d.mts → index-BjCQ3jmE.d.mts} +119 -119
- package/dist/{index-Cv9iMevV.d.mts → index-Bxive_YT.d.mts} +9 -9
- package/dist/{index-CgeC2eGC.d.mts → index-C-IDh5yy.d.mts} +2 -2
- package/dist/{index-COGe8UJx.d.mts → index-CM1rFdwV.d.mts} +9 -9
- package/dist/{index-zBdYQGaS.d.mts → index-CMG4Pnen.d.mts} +6 -6
- package/dist/{index-Blmhq6eA.d.mts → index-CTqynuxm.d.mts} +4 -4
- package/dist/{index-DS-R7st3.d.mts → index-CbBQdS-u.d.mts} +6 -6
- package/dist/{index-Db8jqUq2.d.mts → index-CpH-1sse.d.mts} +10 -10
- package/dist/{index-CUknVRZp.d.mts → index-D1OZ2e4m.d.mts} +14 -14
- package/dist/{index-CaqpCfE5.d.mts → index-Dt2I0G4X.d.mts} +7 -7
- package/dist/{index-EABwA_BH.d.mts → index-IX1to9TB.d.mts} +34 -34
- package/dist/{index-CKnPAS5n.d.mts → index-TrOnY3pM.d.mts} +170 -170
- package/dist/{index-CsxtcAO0.d.mts → index-VUyESU4p.d.mts} +1 -1
- package/dist/{index-CP3FNbOZ.d.mts → index-WV7VzW2H.d.mts} +8 -8
- package/dist/{index-xoYsoOiR.d.mts → index-YeXSxzhX.d.mts} +3 -3
- package/dist/{index-DG-X1PK5.d.mts → index-cPt-00xm.d.mts} +6 -6
- package/dist/{index-BNDRYfTF.d.mts → index-iRoaTsOj.d.mts} +2 -2
- package/dist/{index-BAVzFqII.d.mts → index-jEkJ2Zfk.d.mts} +6 -6
- package/dist/{index-DyH_CgmX.d.mts → index-oNlp4SvD.d.mts} +10 -10
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/{kysely-adapter-Bkm1liPW.mjs → kysely-adapter-BidlNTiV.mjs} +4 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.mjs +1 -1
- package/dist/{organization-CkTKs7bx.mjs → organization-D4QMpChF.mjs} +1 -1
- package/dist/plugins/admin/index.d.mts +3 -3
- package/dist/plugins/admin/index.mjs +1 -1
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/audit-log/client.d.mts +24 -24
- package/dist/plugins/audit-log/index.d.mts +23 -23
- 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 +3 -3
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.mjs +1 -1
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +3 -3
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.d.mts +23 -23
- package/dist/plugins/index.mjs +5 -5
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.d.mts +3 -3
- package/dist/plugins/one-time-token/index.mjs +5 -5
- package/dist/plugins/organization/index.d.mts +3 -3
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.d.mts +3 -3
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.d.mts +3 -3
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/sentinel/client.d.mts +24 -24
- package/dist/plugins/sentinel/client.mjs +2 -2
- package/dist/plugins/sentinel/index.d.mts +23 -23
- package/dist/plugins/sentinel/index.mjs +3 -3
- package/dist/plugins/two-factor/index.d.mts +3 -3
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/{pow-OK01yPG3.mjs → pow-DvkUopsK.mjs} +17 -1
- package/dist/{sentinel-C-D1IHJo.mjs → sentinel-B4Wo79HK.mjs} +326 -92
- package/dist/src/adapters/memory-adapter/memory-adapter.d.ts +1 -1
- package/dist/src/adapters/prisma-adapter/test/auth.d.ts +1 -1
- package/dist/src/adapters/tests/auth-flow.d.ts +3 -3
- package/dist/src/adapters/tests/normal.d.ts +10 -2
- package/dist/src/adapters/tests/number-id.d.ts +4 -4
- package/dist/src/adapters/tests/performance.d.ts +3 -3
- package/dist/src/adapters/tests/transactions.d.ts +3 -3
- package/dist/src/api/index.d.ts +8 -8
- package/dist/src/plugins/admin/admin.d.ts +2 -2
- package/dist/src/plugins/api-key/index.d.ts +2 -2
- package/dist/src/plugins/audit-log/index.d.ts +5 -14
- package/dist/src/plugins/audit-log/remote.d.ts +4 -4
- package/dist/src/plugins/audit-log/types.d.ts +22 -0
- package/dist/src/plugins/email-otp/index.d.ts +1 -1
- package/dist/src/plugins/multi-session/index.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-access-control.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-invites.d.ts +46 -46
- package/dist/src/plugins/organization/routes/crud-members.d.ts +40 -40
- package/dist/src/plugins/organization/routes/crud-org.d.ts +36 -36
- package/dist/src/plugins/organization/routes/crud-team.d.ts +50 -50
- package/dist/src/plugins/sentinel/email.d.ts +9 -3
- package/dist/src/plugins/sentinel/index.d.ts +10 -1
- package/dist/src/plugins/sentinel/intel.d.ts +8 -1
- package/dist/src/plugins/sentinel/memory-cache.d.ts +12 -0
- package/dist/src/plugins/sentinel/schema.d.ts +4 -0
- package/dist/src/plugins/sentinel/store.d.ts +7 -0
- package/dist/src/plugins/sentinel/types.d.ts +29 -1
- package/dist/src/test-utils/test-instance.d.ts +25 -25
- package/dist/test-utils/index.d.mts +293 -293
- package/dist/test-utils/index.mjs +7 -7
- package/dist/types/index.d.mts +2 -2
- package/package.json +3 -3
|
@@ -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-BjCQ3jmE.mjs";
|
|
3
3
|
import "../../types-DNQ9XQrB.mjs";
|
|
4
|
-
import "../../index-
|
|
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_fetch0 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_fetch0.BetterFetch<{
|
|
101
|
+
plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
|
|
102
102
|
id: string;
|
|
103
103
|
name: string;
|
|
104
104
|
hooks: {
|
|
105
|
-
onSuccess(context:
|
|
105
|
+
onSuccess(context: _better_fetch_fetch0.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_fetch0.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_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
118
|
+
onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
|
|
119
|
+
onRequest: (<T extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
|
|
120
|
+
onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.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_fetch0.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_fetch0.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_fetch0.RetryOptions | undefined;
|
|
166
166
|
retryAttempt?: number | undefined;
|
|
167
|
-
output?: (
|
|
168
|
-
errorSchema?:
|
|
167
|
+
output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
168
|
+
errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
|
|
169
169
|
disableValidation?: boolean | undefined;
|
|
170
170
|
}, unknown, unknown, {}>;
|
|
171
171
|
$store: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as generateRandomString } from "./random-32E3cU5o.mjs";
|
|
2
|
-
import { n as POW_REASON_HEADER, o as parsePowHeader, r as POW_SOLUTION_HEADER, s as solveChallenge, t as POW_CHALLENGE_HEADER } from "./pow-
|
|
2
|
+
import { n as POW_REASON_HEADER, o as parsePowHeader, r as POW_SOLUTION_HEADER, s as solveChallenge, t as POW_CHALLENGE_HEADER } from "./pow-DvkUopsK.mjs";
|
|
3
3
|
import { betterFetch } from "@better-fetch/fetch";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/sentinel/client.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as sentinel } from "./index-
|
|
2
|
-
import * as
|
|
1
|
+
import { c as sentinel } from "./index-BKy-8t2n.mjs";
|
|
2
|
+
import * as _better_fetch_fetch16 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_fetch16.RequestContext<T>): Promise<_better_fetch_fetch16.RequestContext<T>>;
|
|
67
67
|
onResponse({
|
|
68
68
|
response,
|
|
69
69
|
request
|
|
70
|
-
}:
|
|
70
|
+
}: _better_fetch_fetch16.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-BjCQ3jmE.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
|
-
import "../index-
|
|
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-VUyESU4p.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,7 +1,7 @@
|
|
|
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-BjCQ3jmE.mjs";
|
|
3
3
|
import "../types-DNQ9XQrB.mjs";
|
|
4
|
-
import "../index-
|
|
4
|
+
import "../index-BL_t8cRp-C4QYBsac.mjs";
|
|
5
5
|
import "../plugins-Dy_FrD4Y.mjs";
|
|
6
6
|
export * from "@gatwech/core/db";
|
|
7
7
|
export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
|
package/dist/db/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import "../crypto-CCyta8xj.mjs";
|
|
|
5
5
|
import "../jwt-CmxZAGe2.mjs";
|
|
6
6
|
import "../random-32E3cU5o.mjs";
|
|
7
7
|
import { a as parseAdditionalUserInput, c as parseSessionOutput, i as parseAccountOutput, l as parseUserInput, n as mergeSchema, o as parseInputData, r as parseAccountInput, s as parseSessionInput, u as parseUserOutput } from "../date-CMr04reD.mjs";
|
|
8
|
-
import { a as createInternalAdapter, c as matchType, i as toZodSchema, l as getSchema, n as convertToDB, o as getWithHooks, r as getAdapter, s as getMigrations, t as convertFromDB, u as createFieldAttribute } from "../db-
|
|
8
|
+
import { a as createInternalAdapter, c as matchType, i as toZodSchema, l as getSchema, n as convertToDB, o as getWithHooks, r as getAdapter, s as getMigrations, t as convertFromDB, u as createFieldAttribute } from "../db-CV59HpEF.mjs";
|
|
9
9
|
import "../dialect-HsWUfpYY.mjs";
|
|
10
10
|
import { t as getAuthTables } from "../get-tables-CKvSyDST.mjs";
|
|
11
11
|
import "../types-DCPpFKUB.mjs";
|
|
@@ -384,7 +384,7 @@ function getWithHooks(adapter, ctx) {
|
|
|
384
384
|
}) : customUpdated;
|
|
385
385
|
for (const hook of hooks || []) {
|
|
386
386
|
const toRun = hook[model]?.update?.after;
|
|
387
|
-
if (toRun) await toRun(updated, context);
|
|
387
|
+
if (toRun) await toRun(updated, context, actualData);
|
|
388
388
|
}
|
|
389
389
|
return updated;
|
|
390
390
|
}
|
|
@@ -410,7 +410,7 @@ function getWithHooks(adapter, ctx) {
|
|
|
410
410
|
}) : customUpdated;
|
|
411
411
|
for (const hook of hooks || []) {
|
|
412
412
|
const toRun = hook[model]?.update?.after;
|
|
413
|
-
if (toRun) await toRun(updated, context);
|
|
413
|
+
if (toRun) await toRun(updated, context, actualData);
|
|
414
414
|
}
|
|
415
415
|
return updated;
|
|
416
416
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_call192 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import * as _simplewebauthn_server0 from "@simplewebauthn/server";
|
|
5
5
|
import { AuthenticationResponseJSON, CredentialDeviceType, PublicKeyCredentialCreationOptionsJSON } from "@simplewebauthn/server";
|
|
@@ -139,7 +139,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
139
139
|
} & {
|
|
140
140
|
asResponse?: boolean;
|
|
141
141
|
returnHeaders?: boolean;
|
|
142
|
-
use?:
|
|
142
|
+
use?: better_call192.Middleware[];
|
|
143
143
|
path?: string;
|
|
144
144
|
} & {
|
|
145
145
|
asResponse?: AsResponse | undefined;
|
|
@@ -150,7 +150,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
150
150
|
} : PublicKeyCredentialCreationOptionsJSON>;
|
|
151
151
|
options: {
|
|
152
152
|
method: "GET";
|
|
153
|
-
use: ((inputContext:
|
|
153
|
+
use: ((inputContext: better_call192.MiddlewareInputContext<better_call192.MiddlewareOptions>) => Promise<{
|
|
154
154
|
session: {
|
|
155
155
|
session: Record<string, any> & {
|
|
156
156
|
id: string;
|
|
@@ -318,7 +318,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
318
318
|
} & {
|
|
319
319
|
asResponse?: boolean;
|
|
320
320
|
returnHeaders?: boolean;
|
|
321
|
-
use?:
|
|
321
|
+
use?: better_call192.Middleware[];
|
|
322
322
|
path?: string;
|
|
323
323
|
} & {
|
|
324
324
|
asResponse?: AsResponse | undefined;
|
|
@@ -443,7 +443,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
443
443
|
} & {
|
|
444
444
|
asResponse?: boolean;
|
|
445
445
|
returnHeaders?: boolean;
|
|
446
|
-
use?:
|
|
446
|
+
use?: better_call192.Middleware[];
|
|
447
447
|
path?: string;
|
|
448
448
|
} & {
|
|
449
449
|
asResponse?: AsResponse | undefined;
|
|
@@ -458,7 +458,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
458
458
|
response: z$1.ZodAny;
|
|
459
459
|
name: z$1.ZodOptional<z$1.ZodString>;
|
|
460
460
|
}, z$1.core.$strip>;
|
|
461
|
-
use: ((inputContext:
|
|
461
|
+
use: ((inputContext: better_call192.MiddlewareInputContext<better_call192.MiddlewareOptions>) => Promise<{
|
|
462
462
|
session: {
|
|
463
463
|
session: Record<string, any> & {
|
|
464
464
|
id: string;
|
|
@@ -524,7 +524,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
524
524
|
} & {
|
|
525
525
|
asResponse?: boolean;
|
|
526
526
|
returnHeaders?: boolean;
|
|
527
|
-
use?:
|
|
527
|
+
use?: better_call192.Middleware[];
|
|
528
528
|
path?: string;
|
|
529
529
|
} & {
|
|
530
530
|
asResponse?: AsResponse | undefined;
|
|
@@ -626,7 +626,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
626
626
|
} & {
|
|
627
627
|
asResponse?: boolean;
|
|
628
628
|
returnHeaders?: boolean;
|
|
629
|
-
use?:
|
|
629
|
+
use?: better_call192.Middleware[];
|
|
630
630
|
path?: string;
|
|
631
631
|
} & {
|
|
632
632
|
asResponse?: AsResponse | undefined;
|
|
@@ -637,7 +637,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
637
637
|
} : Passkey[]>;
|
|
638
638
|
options: {
|
|
639
639
|
method: "GET";
|
|
640
|
-
use: ((inputContext:
|
|
640
|
+
use: ((inputContext: better_call192.MiddlewareInputContext<better_call192.MiddlewareOptions>) => Promise<{
|
|
641
641
|
session: {
|
|
642
642
|
session: Record<string, any> & {
|
|
643
643
|
id: string;
|
|
@@ -720,7 +720,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
720
720
|
} & {
|
|
721
721
|
asResponse?: boolean;
|
|
722
722
|
returnHeaders?: boolean;
|
|
723
|
-
use?:
|
|
723
|
+
use?: better_call192.Middleware[];
|
|
724
724
|
path?: string;
|
|
725
725
|
} & {
|
|
726
726
|
asResponse?: AsResponse | undefined;
|
|
@@ -734,7 +734,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
734
734
|
body: z$1.ZodObject<{
|
|
735
735
|
id: z$1.ZodString;
|
|
736
736
|
}, z$1.core.$strip>;
|
|
737
|
-
use: ((inputContext:
|
|
737
|
+
use: ((inputContext: better_call192.MiddlewareInputContext<better_call192.MiddlewareOptions>) => Promise<{
|
|
738
738
|
session: {
|
|
739
739
|
session: Record<string, any> & {
|
|
740
740
|
id: string;
|
|
@@ -820,7 +820,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
820
820
|
} & {
|
|
821
821
|
asResponse?: boolean;
|
|
822
822
|
returnHeaders?: boolean;
|
|
823
|
-
use?:
|
|
823
|
+
use?: better_call192.Middleware[];
|
|
824
824
|
path?: string;
|
|
825
825
|
} & {
|
|
826
826
|
asResponse?: AsResponse | undefined;
|
|
@@ -839,7 +839,7 @@ declare const passkey: (options?: PasskeyOptions | undefined) => {
|
|
|
839
839
|
id: z$1.ZodString;
|
|
840
840
|
name: z$1.ZodString;
|
|
841
841
|
}, z$1.core.$strip>;
|
|
842
|
-
use: ((inputContext:
|
|
842
|
+
use: ((inputContext: better_call192.MiddlewareInputContext<better_call192.MiddlewareOptions>) => Promise<{
|
|
843
843
|
session: {
|
|
844
844
|
session: Record<string, any> & {
|
|
845
845
|
id: string;
|