@gatwech/auth 1.0.0-beta.23 → 1.0.0-beta.24
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/client/index.d.mts +1 -1
- package/dist/client/plugins/index.d.mts +27 -27
- package/dist/client/react/index.d.mts +15 -15
- package/dist/{client-D8XKNpua.d.mts → client-CGV_kj99.d.mts} +1 -1
- package/dist/{client-CDaFOX7A.d.mts → client-CT-acJeN.d.mts} +4 -4
- package/dist/cookies/index.d.mts +2 -2
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-Dg6Ftb6f.d.mts → index-B-i2ob-C.d.mts} +9 -9
- package/dist/{index-BhYE1_9j.d.mts → index-B6to9CaK.d.mts} +1 -1
- package/dist/{index-B5r4oL5q.d.mts → index-BRUQHEUF.d.mts} +5 -5
- package/dist/{index-Blq8KrTy.d.mts → index-BYxt8qOP.d.mts} +33 -33
- package/dist/{index-Dgyj1fTk.d.mts → index-CGGitykk.d.mts} +7 -7
- package/dist/{index-COFPq-mg.d.mts → index-CHMYUshk.d.mts} +13 -13
- package/dist/{index-D0SgItjY.d.mts → index-CLhlur69.d.mts} +6 -6
- package/dist/{index-3lfPQHhX.d.mts → index-CZtQ0rUe.d.mts} +113 -113
- package/dist/{index-C-z4TCHD.d.mts → index-Cl9ITXy1.d.mts} +10 -10
- package/dist/{index-DUu0ieh6.d.mts → index-Clwezlxm.d.mts} +8 -8
- package/dist/{index-CWxKeTtE.d.mts → index-Czr_eQFE.d.mts} +6 -6
- package/dist/{index-DxIqV3rU.d.mts → index-D5cyFBEb.d.mts} +4 -4
- package/dist/{index-DCliG2n6.d.mts → index-D85KXOKz.d.mts} +3 -3
- package/dist/{index-CIxFDcfQ.d.mts → index-DGRGLg16.d.mts} +2 -2
- package/dist/{index-CWwQ1Q7t.d.mts → index-DWGj7du8.d.mts} +19 -19
- package/dist/{index-B7iZf_Dl.d.mts → index-DWSbFJWU.d.mts} +55 -55
- package/dist/{index-C8F7PsET.d.mts → index-DYqQWdEv.d.mts} +13 -13
- package/dist/{index-382PsmkK.d.mts → index-Dmjw6re9.d.mts} +2 -2
- package/dist/{index-B4aWSJEd.d.mts → index-Dt6JhAV4.d.mts} +6 -6
- package/dist/{index-De2a2OyC.d.mts → index-Hoybqpnt.d.mts} +9 -9
- package/dist/{index-CExSHSFz.d.mts → index-JzSy-vFn.d.mts} +166 -166
- package/dist/{index-DPVukjga.d.mts → index-UDzaYKxq.d.mts} +9 -9
- package/dist/{index-DxRAXHrZ.d.mts → index-rcUKPBBy.d.mts} +6 -6
- package/dist/index.d.mts +1 -1
- package/dist/integrations/next-js.d.mts +2 -2
- 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/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/plugins/two-factor/index.d.mts +2 -2
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/{sentinel-CYtaI3eO.mjs → sentinel-b8XEetew.mjs} +39 -14
- package/dist/test-utils/index.d.mts +273 -273
- package/dist/test-utils/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as User$1 } from "./index-
|
|
1
|
+
import { g as User$1 } from "./index-CZtQ0rUe.mjs";
|
|
2
2
|
import { n as DBPrimitive } from "./index-BL_t8cRp-C4QYBsac.mjs";
|
|
3
3
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
4
4
|
import { o as Statements } from "./index-CxlWnL9c.mjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as _gatwech_core55 from "@gatwech/core";
|
|
6
6
|
import { AuthContext, GenericEndpointContext, HookEndpointContext } from "@gatwech/core";
|
|
7
|
-
import * as
|
|
7
|
+
import * as better_call239 from "better-call";
|
|
8
8
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint as createAuthEndpoint$1, createAuthMiddleware as createAuthMiddleware$1, optionsMiddleware } from "@gatwech/core/api";
|
|
9
9
|
import * as zod381 from "zod";
|
|
10
10
|
import * as _gatwech_core_db14 from "@gatwech/core/db";
|
|
@@ -547,8 +547,8 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
547
547
|
};
|
|
548
548
|
hooks: {
|
|
549
549
|
before: {
|
|
550
|
-
matcher: (ctx:
|
|
551
|
-
handler: (inputContext:
|
|
550
|
+
matcher: (ctx: _gatwech_core55.HookEndpointContext) => boolean;
|
|
551
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
552
552
|
user: {
|
|
553
553
|
id: string;
|
|
554
554
|
createdAt: Date;
|
|
@@ -569,7 +569,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
569
569
|
expiresAt: Date;
|
|
570
570
|
};
|
|
571
571
|
} | {
|
|
572
|
-
context:
|
|
572
|
+
context: better_call239.MiddlewareContext<better_call239.MiddlewareOptions, _gatwech_core55.AuthContext<_gatwech_core55.PayvoAuthOptions> & {
|
|
573
573
|
returned?: unknown | undefined;
|
|
574
574
|
responseHeaders?: Headers | undefined;
|
|
575
575
|
}>;
|
|
@@ -621,7 +621,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
621
621
|
} & {
|
|
622
622
|
asResponse?: boolean;
|
|
623
623
|
returnHeaders?: boolean;
|
|
624
|
-
use?:
|
|
624
|
+
use?: better_call239.Middleware[];
|
|
625
625
|
path?: string;
|
|
626
626
|
} & {
|
|
627
627
|
asResponse?: AsResponse | undefined;
|
|
@@ -855,7 +855,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
855
855
|
} & {
|
|
856
856
|
asResponse?: boolean;
|
|
857
857
|
returnHeaders?: boolean;
|
|
858
|
-
use?:
|
|
858
|
+
use?: better_call239.Middleware[];
|
|
859
859
|
path?: string;
|
|
860
860
|
} & {
|
|
861
861
|
asResponse?: AsResponse | undefined;
|
|
@@ -933,7 +933,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
933
933
|
} & {
|
|
934
934
|
asResponse?: boolean;
|
|
935
935
|
returnHeaders?: boolean;
|
|
936
|
-
use?:
|
|
936
|
+
use?: better_call239.Middleware[];
|
|
937
937
|
path?: string;
|
|
938
938
|
} & {
|
|
939
939
|
asResponse?: AsResponse | undefined;
|
|
@@ -993,7 +993,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
993
993
|
query: zod381.ZodObject<{
|
|
994
994
|
id: zod381.ZodString;
|
|
995
995
|
}, zod_v4_core51.$strip>;
|
|
996
|
-
use: ((inputContext:
|
|
996
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
997
997
|
session: {
|
|
998
998
|
session: Record<string, any> & {
|
|
999
999
|
id: string;
|
|
@@ -1186,7 +1186,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1186
1186
|
} & {
|
|
1187
1187
|
asResponse?: boolean;
|
|
1188
1188
|
returnHeaders?: boolean;
|
|
1189
|
-
use?:
|
|
1189
|
+
use?: better_call239.Middleware[];
|
|
1190
1190
|
path?: string;
|
|
1191
1191
|
} & {
|
|
1192
1192
|
asResponse?: AsResponse | undefined;
|
|
@@ -1416,7 +1416,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1416
1416
|
} & {
|
|
1417
1417
|
asResponse?: boolean;
|
|
1418
1418
|
returnHeaders?: boolean;
|
|
1419
|
-
use?:
|
|
1419
|
+
use?: better_call239.Middleware[];
|
|
1420
1420
|
path?: string;
|
|
1421
1421
|
} & {
|
|
1422
1422
|
asResponse?: AsResponse | undefined;
|
|
@@ -1434,7 +1434,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1434
1434
|
body: zod381.ZodObject<{
|
|
1435
1435
|
keyId: zod381.ZodString;
|
|
1436
1436
|
}, zod_v4_core51.$strip>;
|
|
1437
|
-
use: ((inputContext:
|
|
1437
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
1438
1438
|
session: {
|
|
1439
1439
|
session: Record<string, any> & {
|
|
1440
1440
|
id: string;
|
|
@@ -1533,7 +1533,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1533
1533
|
} & {
|
|
1534
1534
|
asResponse?: boolean;
|
|
1535
1535
|
returnHeaders?: boolean;
|
|
1536
|
-
use?:
|
|
1536
|
+
use?: better_call239.Middleware[];
|
|
1537
1537
|
path?: string;
|
|
1538
1538
|
} & {
|
|
1539
1539
|
asResponse?: AsResponse | undefined;
|
|
@@ -1590,7 +1590,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1590
1590
|
}[]>;
|
|
1591
1591
|
options: {
|
|
1592
1592
|
method: "GET";
|
|
1593
|
-
use: ((inputContext:
|
|
1593
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
1594
1594
|
session: {
|
|
1595
1595
|
session: Record<string, any> & {
|
|
1596
1596
|
id: string;
|
|
@@ -1769,7 +1769,7 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1769
1769
|
} & {
|
|
1770
1770
|
asResponse?: boolean;
|
|
1771
1771
|
returnHeaders?: boolean;
|
|
1772
|
-
use?:
|
|
1772
|
+
use?: better_call239.Middleware[];
|
|
1773
1773
|
path?: string;
|
|
1774
1774
|
} & {
|
|
1775
1775
|
asResponse?: AsResponse | undefined;
|
|
@@ -1959,7 +1959,7 @@ interface LastLoginMethodOptions {
|
|
|
1959
1959
|
*/
|
|
1960
1960
|
declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O | undefined) => {
|
|
1961
1961
|
id: "last-login-method";
|
|
1962
|
-
init(ctx:
|
|
1962
|
+
init(ctx: _gatwech_core55.AuthContext<_gatwech_core55.PayvoAuthOptions>): {
|
|
1963
1963
|
options: {
|
|
1964
1964
|
databaseHooks: {
|
|
1965
1965
|
user: {
|
|
@@ -1972,7 +1972,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
1972
1972
|
emailVerified: boolean;
|
|
1973
1973
|
name: string;
|
|
1974
1974
|
image?: string | null | undefined;
|
|
1975
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
1975
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<{
|
|
1976
1976
|
data: {
|
|
1977
1977
|
lastLoginMethod: any;
|
|
1978
1978
|
id: string;
|
|
@@ -1997,7 +1997,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
1997
1997
|
token: string;
|
|
1998
1998
|
ipAddress?: string | null | undefined;
|
|
1999
1999
|
userAgent?: string | null | undefined;
|
|
2000
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
2000
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
2001
2001
|
};
|
|
2002
2002
|
};
|
|
2003
2003
|
};
|
|
@@ -2006,7 +2006,7 @@ declare const lastLoginMethod: <O extends LastLoginMethodOptions>(userConfig?: O
|
|
|
2006
2006
|
hooks: {
|
|
2007
2007
|
after: {
|
|
2008
2008
|
matcher(): true;
|
|
2009
|
-
handler: (inputContext:
|
|
2009
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<void>;
|
|
2010
2010
|
}[];
|
|
2011
2011
|
};
|
|
2012
2012
|
schema: O["storeInDatabase"] extends true ? {
|
|
@@ -2943,7 +2943,7 @@ declare function parsePowHeader(value: string | null | undefined): {
|
|
|
2943
2943
|
//#region src/plugins/sentinel/index.d.ts
|
|
2944
2944
|
declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
2945
2945
|
id: "sentinel";
|
|
2946
|
-
init(ctx: AuthContext<
|
|
2946
|
+
init(ctx: AuthContext<_gatwech_core55.PayvoAuthOptions>): {
|
|
2947
2947
|
options: {
|
|
2948
2948
|
databaseHooks: {
|
|
2949
2949
|
user: {
|
|
@@ -2956,7 +2956,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
2956
2956
|
emailVerified: boolean;
|
|
2957
2957
|
name: string;
|
|
2958
2958
|
image?: string | null | undefined;
|
|
2959
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
2959
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<{
|
|
2960
2960
|
data: {
|
|
2961
2961
|
normalizedEmail: string;
|
|
2962
2962
|
id: string;
|
|
@@ -2976,7 +2976,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
2976
2976
|
emailVerified: boolean;
|
|
2977
2977
|
name: string;
|
|
2978
2978
|
image?: string | null | undefined;
|
|
2979
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
2979
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
2980
2980
|
};
|
|
2981
2981
|
update: {
|
|
2982
2982
|
before(data: Partial<{
|
|
@@ -3004,28 +3004,28 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3004
3004
|
};
|
|
3005
3005
|
};
|
|
3006
3006
|
} | undefined;
|
|
3007
|
-
onRequest(request: Request, ctx: AuthContext<
|
|
3007
|
+
onRequest(request: Request, ctx: AuthContext<_gatwech_core55.PayvoAuthOptions>): Promise<{
|
|
3008
3008
|
response: Response;
|
|
3009
3009
|
} | undefined>;
|
|
3010
3010
|
hooks: {
|
|
3011
3011
|
before: ({
|
|
3012
|
-
matcher(context:
|
|
3013
|
-
handler: (inputContext:
|
|
3012
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3013
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3014
3014
|
context: {
|
|
3015
3015
|
body: any;
|
|
3016
3016
|
};
|
|
3017
3017
|
} | undefined>;
|
|
3018
3018
|
} | {
|
|
3019
|
-
matcher(context:
|
|
3020
|
-
handler: (inputContext:
|
|
3019
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3020
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<void>;
|
|
3021
3021
|
})[];
|
|
3022
3022
|
after: ({
|
|
3023
|
-
matcher(context:
|
|
3024
|
-
handler: (inputContext:
|
|
3023
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3024
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<void>;
|
|
3025
3025
|
} | {
|
|
3026
|
-
matcher(context:
|
|
3027
|
-
handler: (inputContext:
|
|
3028
|
-
status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") |
|
|
3026
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3027
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<({
|
|
3028
|
+
status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call239.Status;
|
|
3029
3029
|
body: ({
|
|
3030
3030
|
message?: string;
|
|
3031
3031
|
code?: string;
|
|
@@ -3196,7 +3196,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3196
3196
|
} & {
|
|
3197
3197
|
asResponse?: boolean;
|
|
3198
3198
|
returnHeaders?: boolean;
|
|
3199
|
-
use?:
|
|
3199
|
+
use?: better_call239.Middleware[];
|
|
3200
3200
|
path?: string;
|
|
3201
3201
|
} & {
|
|
3202
3202
|
asResponse?: AsResponse | undefined;
|
|
@@ -3235,7 +3235,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3235
3235
|
}>;
|
|
3236
3236
|
options: {
|
|
3237
3237
|
method: "GET";
|
|
3238
|
-
use: ((inputContext:
|
|
3238
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3239
3239
|
session: {
|
|
3240
3240
|
session: Record<string, any> & {
|
|
3241
3241
|
id: string;
|
|
@@ -3292,7 +3292,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3292
3292
|
} & {
|
|
3293
3293
|
asResponse?: boolean;
|
|
3294
3294
|
returnHeaders?: boolean;
|
|
3295
|
-
use?:
|
|
3295
|
+
use?: better_call239.Middleware[];
|
|
3296
3296
|
path?: string;
|
|
3297
3297
|
} & {
|
|
3298
3298
|
asResponse?: AsResponse | undefined;
|
|
@@ -3307,7 +3307,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3307
3307
|
}>;
|
|
3308
3308
|
options: {
|
|
3309
3309
|
method: "POST";
|
|
3310
|
-
use: ((inputContext:
|
|
3310
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3311
3311
|
session: {
|
|
3312
3312
|
session: Record<string, any> & {
|
|
3313
3313
|
id: string;
|
|
@@ -3361,7 +3361,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
3361
3361
|
} & {
|
|
3362
3362
|
asResponse?: boolean;
|
|
3363
3363
|
returnHeaders?: boolean;
|
|
3364
|
-
use?:
|
|
3364
|
+
use?: better_call239.Middleware[];
|
|
3365
3365
|
path?: string;
|
|
3366
3366
|
} & {
|
|
3367
3367
|
asResponse?: AsResponse | undefined;
|
|
@@ -3518,7 +3518,7 @@ declare const AUDIT_LOG_ERROR_CODES: {
|
|
|
3518
3518
|
};
|
|
3519
3519
|
declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
3520
3520
|
id: "audit-log";
|
|
3521
|
-
init(ctx: AuthContext<
|
|
3521
|
+
init(ctx: AuthContext<_gatwech_core55.PayvoAuthOptions>): {
|
|
3522
3522
|
options: {
|
|
3523
3523
|
databaseHooks: {
|
|
3524
3524
|
user: {
|
|
@@ -3531,7 +3531,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3531
3531
|
emailVerified: boolean;
|
|
3532
3532
|
name: string;
|
|
3533
3533
|
image?: string | null | undefined;
|
|
3534
|
-
} & Record<string, unknown>, context:
|
|
3534
|
+
} & Record<string, unknown>, context: _gatwech_core55.GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3535
3535
|
};
|
|
3536
3536
|
update: {
|
|
3537
3537
|
after(user: {
|
|
@@ -3542,7 +3542,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3542
3542
|
emailVerified: boolean;
|
|
3543
3543
|
name: string;
|
|
3544
3544
|
image?: string | null | undefined;
|
|
3545
|
-
} & Record<string, unknown>, context:
|
|
3545
|
+
} & Record<string, unknown>, context: _gatwech_core55.GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined, data: (Partial<{
|
|
3546
3546
|
id: string;
|
|
3547
3547
|
createdAt: Date;
|
|
3548
3548
|
updatedAt: Date;
|
|
@@ -3561,7 +3561,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3561
3561
|
emailVerified: boolean;
|
|
3562
3562
|
name: string;
|
|
3563
3563
|
image?: string | null | undefined;
|
|
3564
|
-
} & Record<string, unknown>, context:
|
|
3564
|
+
} & Record<string, unknown>, context: _gatwech_core55.GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3565
3565
|
};
|
|
3566
3566
|
};
|
|
3567
3567
|
session: {
|
|
@@ -3575,7 +3575,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3575
3575
|
token: string;
|
|
3576
3576
|
ipAddress?: string | null | undefined;
|
|
3577
3577
|
userAgent?: string | null | undefined;
|
|
3578
|
-
} & Record<string, unknown>, context:
|
|
3578
|
+
} & Record<string, unknown>, context: _gatwech_core55.GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3579
3579
|
};
|
|
3580
3580
|
};
|
|
3581
3581
|
account: {
|
|
@@ -3594,7 +3594,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3594
3594
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
3595
3595
|
scope?: string | null | undefined;
|
|
3596
3596
|
password?: string | null | undefined;
|
|
3597
|
-
}, context:
|
|
3597
|
+
}, context: _gatwech_core55.GenericEndpointContext<_gatwech_core55.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3598
3598
|
};
|
|
3599
3599
|
};
|
|
3600
3600
|
};
|
|
@@ -3602,12 +3602,12 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3602
3602
|
};
|
|
3603
3603
|
hooks: {
|
|
3604
3604
|
before: {
|
|
3605
|
-
matcher(context:
|
|
3606
|
-
handler: (inputContext:
|
|
3605
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3606
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<void>;
|
|
3607
3607
|
}[];
|
|
3608
3608
|
after: {
|
|
3609
|
-
matcher(context:
|
|
3610
|
-
handler: (inputContext:
|
|
3609
|
+
matcher(context: _gatwech_core55.HookEndpointContext): boolean;
|
|
3610
|
+
handler: (inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<void>;
|
|
3611
3611
|
}[];
|
|
3612
3612
|
};
|
|
3613
3613
|
endpoints: {
|
|
@@ -3636,7 +3636,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3636
3636
|
} & {
|
|
3637
3637
|
asResponse?: boolean;
|
|
3638
3638
|
returnHeaders?: boolean;
|
|
3639
|
-
use?:
|
|
3639
|
+
use?: better_call239.Middleware[];
|
|
3640
3640
|
path?: string;
|
|
3641
3641
|
} & {
|
|
3642
3642
|
asResponse?: AsResponse | undefined;
|
|
@@ -3657,7 +3657,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3657
3657
|
}>;
|
|
3658
3658
|
options: {
|
|
3659
3659
|
method: "GET";
|
|
3660
|
-
use: ((inputContext:
|
|
3660
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3661
3661
|
session: {
|
|
3662
3662
|
session: Record<string, any> & {
|
|
3663
3663
|
id: string;
|
|
@@ -3804,7 +3804,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3804
3804
|
} & {
|
|
3805
3805
|
asResponse?: boolean;
|
|
3806
3806
|
returnHeaders?: boolean;
|
|
3807
|
-
use?:
|
|
3807
|
+
use?: better_call239.Middleware[];
|
|
3808
3808
|
path?: string;
|
|
3809
3809
|
} & {
|
|
3810
3810
|
asResponse?: AsResponse | undefined;
|
|
@@ -3825,7 +3825,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3825
3825
|
}>;
|
|
3826
3826
|
options: {
|
|
3827
3827
|
method: "GET";
|
|
3828
|
-
use: ((inputContext:
|
|
3828
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3829
3829
|
session: {
|
|
3830
3830
|
session: Record<string, any> & {
|
|
3831
3831
|
id: string;
|
|
@@ -3963,7 +3963,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3963
3963
|
} & {
|
|
3964
3964
|
asResponse?: boolean;
|
|
3965
3965
|
returnHeaders?: boolean;
|
|
3966
|
-
use?:
|
|
3966
|
+
use?: better_call239.Middleware[];
|
|
3967
3967
|
path?: string;
|
|
3968
3968
|
} & {
|
|
3969
3969
|
asResponse?: AsResponse | undefined;
|
|
@@ -3978,7 +3978,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3978
3978
|
}>;
|
|
3979
3979
|
options: {
|
|
3980
3980
|
method: "GET";
|
|
3981
|
-
use: ((inputContext:
|
|
3981
|
+
use: ((inputContext: better_call239.MiddlewareInputContext<better_call239.MiddlewareOptions>) => Promise<{
|
|
3982
3982
|
session: {
|
|
3983
3983
|
session: Record<string, any> & {
|
|
3984
3984
|
id: string;
|
|
@@ -4052,7 +4052,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
4052
4052
|
} & {
|
|
4053
4053
|
asResponse?: boolean;
|
|
4054
4054
|
returnHeaders?: boolean;
|
|
4055
|
-
use?:
|
|
4055
|
+
use?: better_call239.Middleware[];
|
|
4056
4056
|
path?: string;
|
|
4057
4057
|
} & {
|
|
4058
4058
|
asResponse?: AsResponse | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as User } from "./index-BL_t8cRp-C4QYBsac.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _gatwech_core18 from "@gatwech/core";
|
|
3
|
+
import * as better_call45 from "better-call";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/email-otp/index.d.ts
|
|
@@ -71,7 +71,7 @@ interface EmailOTPOptions {
|
|
|
71
71
|
}
|
|
72
72
|
declare const emailOTP: (options: EmailOTPOptions) => {
|
|
73
73
|
id: "email-otp";
|
|
74
|
-
init(ctx:
|
|
74
|
+
init(ctx: _gatwech_core18.AuthContext<_gatwech_core18.PayvoAuthOptions>): {
|
|
75
75
|
options: {
|
|
76
76
|
emailVerification: {
|
|
77
77
|
sendVerificationEmail(data: {
|
|
@@ -102,7 +102,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
102
102
|
} & {
|
|
103
103
|
asResponse?: boolean;
|
|
104
104
|
returnHeaders?: boolean;
|
|
105
|
-
use?:
|
|
105
|
+
use?: better_call45.Middleware[];
|
|
106
106
|
path?: string;
|
|
107
107
|
} & {
|
|
108
108
|
asResponse?: AsResponse | undefined;
|
|
@@ -175,7 +175,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
175
175
|
} & {
|
|
176
176
|
asResponse?: boolean;
|
|
177
177
|
returnHeaders?: boolean;
|
|
178
|
-
use?:
|
|
178
|
+
use?: better_call45.Middleware[];
|
|
179
179
|
path?: string;
|
|
180
180
|
} & {
|
|
181
181
|
asResponse?: AsResponse | undefined;
|
|
@@ -265,7 +265,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
265
265
|
} & {
|
|
266
266
|
asResponse?: boolean;
|
|
267
267
|
returnHeaders?: boolean;
|
|
268
|
-
use?:
|
|
268
|
+
use?: better_call45.Middleware[];
|
|
269
269
|
path?: string;
|
|
270
270
|
} & {
|
|
271
271
|
asResponse?: AsResponse | undefined;
|
|
@@ -350,7 +350,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
350
350
|
} & {
|
|
351
351
|
asResponse?: boolean;
|
|
352
352
|
returnHeaders?: boolean;
|
|
353
|
-
use?:
|
|
353
|
+
use?: better_call45.Middleware[];
|
|
354
354
|
path?: string;
|
|
355
355
|
} & {
|
|
356
356
|
asResponse?: AsResponse | undefined;
|
|
@@ -485,7 +485,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
485
485
|
} & {
|
|
486
486
|
asResponse?: boolean;
|
|
487
487
|
returnHeaders?: boolean;
|
|
488
|
-
use?:
|
|
488
|
+
use?: better_call45.Middleware[];
|
|
489
489
|
path?: string;
|
|
490
490
|
} & {
|
|
491
491
|
asResponse?: AsResponse | undefined;
|
|
@@ -587,7 +587,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
587
587
|
} & {
|
|
588
588
|
asResponse?: boolean;
|
|
589
589
|
returnHeaders?: boolean;
|
|
590
|
-
use?:
|
|
590
|
+
use?: better_call45.Middleware[];
|
|
591
591
|
path?: string;
|
|
592
592
|
} & {
|
|
593
593
|
asResponse?: AsResponse | undefined;
|
|
@@ -668,7 +668,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
668
668
|
} & {
|
|
669
669
|
asResponse?: boolean;
|
|
670
670
|
returnHeaders?: boolean;
|
|
671
|
-
use?:
|
|
671
|
+
use?: better_call45.Middleware[];
|
|
672
672
|
path?: string;
|
|
673
673
|
} & {
|
|
674
674
|
asResponse?: AsResponse | undefined;
|
|
@@ -749,7 +749,7 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
749
749
|
} & {
|
|
750
750
|
asResponse?: boolean;
|
|
751
751
|
returnHeaders?: boolean;
|
|
752
|
-
use?:
|
|
752
|
+
use?: better_call45.Middleware[];
|
|
753
753
|
path?: string;
|
|
754
754
|
} & {
|
|
755
755
|
asResponse?: AsResponse | undefined;
|
|
@@ -802,8 +802,8 @@ declare const emailOTP: (options: EmailOTPOptions) => {
|
|
|
802
802
|
};
|
|
803
803
|
hooks: {
|
|
804
804
|
after: {
|
|
805
|
-
matcher(context:
|
|
806
|
-
handler: (inputContext:
|
|
805
|
+
matcher(context: _gatwech_core18.HookEndpointContext): boolean;
|
|
806
|
+
handler: (inputContext: better_call45.MiddlewareInputContext<better_call45.MiddlewareOptions>) => Promise<void>;
|
|
807
807
|
}[];
|
|
808
808
|
};
|
|
809
809
|
$ERROR_CODES: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _gatwech_core34 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_core34.AuthContext<_gatwech_core34.PayvoAuthOptions>) => Promise<{
|
|
38
38
|
response: Response;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as User, h as Session } from "./index-
|
|
1
|
+
import { g as User, h as Session } from "./index-CZtQ0rUe.mjs";
|
|
2
2
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _gatwech_core21 from "@gatwech/core";
|
|
4
4
|
import { AuthContext, GenericEndpointContext } from "@gatwech/core";
|
|
5
|
-
import * as
|
|
5
|
+
import * as better_call55 from "better-call";
|
|
6
6
|
import { EndpointContext } from "better-call";
|
|
7
7
|
|
|
8
8
|
//#region src/plugins/anonymous/index.d.ts
|
|
@@ -77,7 +77,7 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
77
77
|
} & {
|
|
78
78
|
asResponse?: boolean;
|
|
79
79
|
returnHeaders?: boolean;
|
|
80
|
-
use?:
|
|
80
|
+
use?: better_call55.Middleware[];
|
|
81
81
|
path?: string;
|
|
82
82
|
} & {
|
|
83
83
|
asResponse?: AsResponse | undefined;
|
|
@@ -141,8 +141,8 @@ declare const anonymous: (options?: AnonymousOptions | undefined) => {
|
|
|
141
141
|
};
|
|
142
142
|
hooks: {
|
|
143
143
|
after: {
|
|
144
|
-
matcher(ctx:
|
|
145
|
-
handler: (inputContext:
|
|
144
|
+
matcher(ctx: _gatwech_core21.HookEndpointContext): boolean;
|
|
145
|
+
handler: (inputContext: better_call55.MiddlewareInputContext<better_call55.MiddlewareOptions>) => Promise<void>;
|
|
146
146
|
}[];
|
|
147
147
|
};
|
|
148
148
|
schema: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _gatwech_core22 from "@gatwech/core";
|
|
3
|
+
import * as better_call58 from "better-call";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
import * as _gatwech_core_db1 from "@gatwech/core/db";
|
|
6
6
|
|
|
@@ -106,7 +106,7 @@ type UsernameOptions = {
|
|
|
106
106
|
};
|
|
107
107
|
declare const username: (options?: UsernameOptions | undefined) => {
|
|
108
108
|
id: "username";
|
|
109
|
-
init(ctx:
|
|
109
|
+
init(ctx: _gatwech_core22.AuthContext<_gatwech_core22.PayvoAuthOptions>): {
|
|
110
110
|
options: {
|
|
111
111
|
databaseHooks: {
|
|
112
112
|
user: {
|
|
@@ -119,7 +119,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
119
119
|
emailVerified: boolean;
|
|
120
120
|
name: string;
|
|
121
121
|
image?: string | null | undefined;
|
|
122
|
-
} & Record<string, unknown>, context:
|
|
122
|
+
} & Record<string, unknown>, context: _gatwech_core22.GenericEndpointContext<_gatwech_core22.PayvoAuthOptions> | undefined): Promise<{
|
|
123
123
|
data: {
|
|
124
124
|
displayUsername?: string | undefined;
|
|
125
125
|
username?: string | undefined;
|
|
@@ -142,7 +142,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
142
142
|
emailVerified: boolean;
|
|
143
143
|
name: string;
|
|
144
144
|
image?: string | null | undefined;
|
|
145
|
-
}> & Record<string, unknown>, context:
|
|
145
|
+
}> & Record<string, unknown>, context: _gatwech_core22.GenericEndpointContext<_gatwech_core22.PayvoAuthOptions> | undefined): Promise<{
|
|
146
146
|
data: {
|
|
147
147
|
displayUsername?: string | undefined;
|
|
148
148
|
username?: string | undefined;
|
|
@@ -182,7 +182,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
182
182
|
} & {
|
|
183
183
|
asResponse?: boolean;
|
|
184
184
|
returnHeaders?: boolean;
|
|
185
|
-
use?:
|
|
185
|
+
use?: better_call58.Middleware[];
|
|
186
186
|
path?: string;
|
|
187
187
|
} & {
|
|
188
188
|
asResponse?: AsResponse | undefined;
|
|
@@ -291,7 +291,7 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
291
291
|
} & {
|
|
292
292
|
asResponse?: boolean;
|
|
293
293
|
returnHeaders?: boolean;
|
|
294
|
-
use?:
|
|
294
|
+
use?: better_call58.Middleware[];
|
|
295
295
|
path?: string;
|
|
296
296
|
} & {
|
|
297
297
|
asResponse?: AsResponse | undefined;
|
|
@@ -340,8 +340,8 @@ declare const username: (options?: UsernameOptions | undefined) => {
|
|
|
340
340
|
};
|
|
341
341
|
hooks: {
|
|
342
342
|
before: {
|
|
343
|
-
matcher(context:
|
|
344
|
-
handler: (inputContext:
|
|
343
|
+
matcher(context: _gatwech_core22.HookEndpointContext): boolean;
|
|
344
|
+
handler: (inputContext: better_call58.MiddlewareInputContext<better_call58.MiddlewareOptions>) => Promise<void>;
|
|
345
345
|
}[];
|
|
346
346
|
};
|
|
347
347
|
$ERROR_CODES: {
|