@gatwech/auth 1.0.0-beta.19 → 1.0.0-beta.20
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/client/index.d.mts +16 -16
- package/dist/client/plugins/index.d.mts +45 -45
- package/dist/client/react/index.d.mts +14 -14
- package/dist/{client-DZHNfxuR.d.mts → client-C_qmyez2.d.mts} +4 -4
- package/dist/{client-CSOs1YN7.d.mts → client-F67q-Lbi.d.mts} +1 -1
- package/dist/{index-Blmhq6eA.d.mts → index-4I1YhYhk.d.mts} +4 -4
- package/dist/{index-mxEUX2Gs.d.mts → index-BX7rl07Z.d.mts} +13 -13
- package/dist/{index-xoYsoOiR.d.mts → index-Bml-PCqP.d.mts} +20 -20
- package/dist/{index-DG-X1PK5.d.mts → index-BsSKcKgO.d.mts} +5 -5
- package/dist/{index-CP3FNbOZ.d.mts → index-CBiGsvDd.d.mts} +7 -7
- package/dist/{index-CUknVRZp.d.mts → index-CC920PPp.d.mts} +13 -13
- package/dist/{index-zBdYQGaS.d.mts → index-CNd5jqLl.d.mts} +5 -5
- package/dist/{index-DS-R7st3.d.mts → index-CP8x1TFq.d.mts} +6 -6
- package/dist/{index-CaqpCfE5.d.mts → index-CofuaNMl.d.mts} +6 -6
- package/dist/{index-Cv9iMevV.d.mts → index-CzpdkTdv.d.mts} +9 -9
- package/dist/{index-DRM35ir1.d.mts → index-D57DuhZR.d.mts} +110 -110
- package/dist/{index-DXVU0HGr.d.mts → index-D6ku0rUC.d.mts} +4 -4
- package/dist/{index-BAVzFqII.d.mts → index-DFSRYWFI.d.mts} +6 -6
- package/dist/{index-CgeC2eGC.d.mts → index-DGeoJ4gu.d.mts} +2 -2
- package/dist/{index-DyH_CgmX.d.mts → index-DTkcY7xH.d.mts} +10 -10
- package/dist/{index-COGe8UJx.d.mts → index-Dnd8S4S4.d.mts} +8 -8
- package/dist/{index-Df4SvZaE.d.mts → index-DwPAddfE.d.mts} +3 -3
- package/dist/{index-Db8jqUq2.d.mts → index-DyXi7S2M.d.mts} +9 -9
- package/dist/{index-CKnPAS5n.d.mts → index-KhbNmMmG.d.mts} +165 -165
- package/dist/{index-EABwA_BH.d.mts → index-XfE0WjTN.d.mts} +32 -32
- package/dist/{index-BNDRYfTF.d.mts → index-sb-UFLuo.d.mts} +2 -2
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/plugins/admin/index.d.mts +1 -1
- package/dist/plugins/anonymous/index.d.mts +1 -1
- package/dist/plugins/audit-log/client.d.mts +22 -22
- package/dist/plugins/audit-log/index.d.mts +21 -21
- 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 +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/generic-oauth/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/index.d.mts +21 -21
- package/dist/plugins/index.mjs +1 -1
- package/dist/plugins/jwt/index.d.mts +1 -1
- 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 +1 -1
- package/dist/plugins/one-time-token/index.mjs +1 -1
- package/dist/plugins/organization/index.d.mts +1 -1
- package/dist/plugins/passkey/index.d.mts +1 -1
- package/dist/plugins/phone-number/index.d.mts +1 -1
- package/dist/plugins/sentinel/client.d.mts +22 -22
- package/dist/plugins/sentinel/index.d.mts +21 -21
- package/dist/plugins/sentinel/index.mjs +1 -1
- package/dist/plugins/two-factor/index.d.mts +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/{sentinel-C-D1IHJo.mjs → sentinel-DiPqydKG.mjs} +39 -8
- package/dist/src/plugins/sentinel/email.d.ts +9 -3
- package/dist/test-utils/index.d.mts +1042 -1042
- package/dist/test-utils/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -2,13 +2,13 @@ import { g as User$1 } from "./index-BNhJglHC.mjs";
|
|
|
2
2
|
import { n as DBPrimitive } from "./index-Df0KhQRf-BEa5tdwJ.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_core53 from "@gatwech/core";
|
|
6
6
|
import { AuthContext, GenericEndpointContext, HookEndpointContext } from "@gatwech/core";
|
|
7
|
-
import * as
|
|
7
|
+
import * as better_call229 from "better-call";
|
|
8
8
|
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint as createAuthEndpoint$1, createAuthMiddleware as createAuthMiddleware$1, optionsMiddleware } from "@gatwech/core/api";
|
|
9
|
-
import * as
|
|
9
|
+
import * as zod381 from "zod";
|
|
10
10
|
import * as _gatwech_core_db14 from "@gatwech/core/db";
|
|
11
|
-
import * as
|
|
11
|
+
import * as zod_v4_core51 from "zod/v4/core";
|
|
12
12
|
|
|
13
13
|
//#region src/plugins/api-key/schema.d.ts
|
|
14
14
|
declare const apiKeySchema: ({
|
|
@@ -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_core53.HookEndpointContext) => boolean;
|
|
551
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.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_call229.MiddlewareContext<better_call229.MiddlewareOptions, _gatwech_core53.AuthContext<_gatwech_core53.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_call229.Middleware[];
|
|
625
625
|
path?: string;
|
|
626
626
|
} & {
|
|
627
627
|
asResponse?: AsResponse | undefined;
|
|
@@ -676,20 +676,20 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
676
676
|
}>;
|
|
677
677
|
options: {
|
|
678
678
|
method: "POST";
|
|
679
|
-
body:
|
|
680
|
-
name:
|
|
681
|
-
expiresIn:
|
|
682
|
-
userId:
|
|
683
|
-
prefix:
|
|
684
|
-
remaining:
|
|
685
|
-
metadata:
|
|
686
|
-
refillAmount:
|
|
687
|
-
refillInterval:
|
|
688
|
-
rateLimitTimeWindow:
|
|
689
|
-
rateLimitMax:
|
|
690
|
-
rateLimitEnabled:
|
|
691
|
-
permissions:
|
|
692
|
-
},
|
|
679
|
+
body: zod381.ZodObject<{
|
|
680
|
+
name: zod381.ZodOptional<zod381.ZodString>;
|
|
681
|
+
expiresIn: zod381.ZodDefault<zod381.ZodNullable<zod381.ZodOptional<zod381.ZodNumber>>>;
|
|
682
|
+
userId: zod381.ZodOptional<zod381.ZodCoercedString<unknown>>;
|
|
683
|
+
prefix: zod381.ZodOptional<zod381.ZodString>;
|
|
684
|
+
remaining: zod381.ZodDefault<zod381.ZodNullable<zod381.ZodOptional<zod381.ZodNumber>>>;
|
|
685
|
+
metadata: zod381.ZodOptional<zod381.ZodAny>;
|
|
686
|
+
refillAmount: zod381.ZodOptional<zod381.ZodNumber>;
|
|
687
|
+
refillInterval: zod381.ZodOptional<zod381.ZodNumber>;
|
|
688
|
+
rateLimitTimeWindow: zod381.ZodOptional<zod381.ZodNumber>;
|
|
689
|
+
rateLimitMax: zod381.ZodOptional<zod381.ZodNumber>;
|
|
690
|
+
rateLimitEnabled: zod381.ZodOptional<zod381.ZodBoolean>;
|
|
691
|
+
permissions: zod381.ZodOptional<zod381.ZodRecord<zod381.ZodString, zod381.ZodArray<zod381.ZodString>>>;
|
|
692
|
+
}, zod_v4_core51.$strip>;
|
|
693
693
|
metadata: {
|
|
694
694
|
openapi: {
|
|
695
695
|
description: string;
|
|
@@ -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_call229.Middleware[];
|
|
859
859
|
path?: string;
|
|
860
860
|
} & {
|
|
861
861
|
asResponse?: AsResponse | undefined;
|
|
@@ -888,10 +888,10 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
888
888
|
}>;
|
|
889
889
|
options: {
|
|
890
890
|
method: "POST";
|
|
891
|
-
body:
|
|
892
|
-
key:
|
|
893
|
-
permissions:
|
|
894
|
-
},
|
|
891
|
+
body: zod381.ZodObject<{
|
|
892
|
+
key: zod381.ZodString;
|
|
893
|
+
permissions: zod381.ZodOptional<zod381.ZodRecord<zod381.ZodString, zod381.ZodArray<zod381.ZodString>>>;
|
|
894
|
+
}, zod_v4_core51.$strip>;
|
|
895
895
|
metadata: {
|
|
896
896
|
SERVER_ONLY: true;
|
|
897
897
|
};
|
|
@@ -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_call229.Middleware[];
|
|
937
937
|
path?: string;
|
|
938
938
|
} & {
|
|
939
939
|
asResponse?: AsResponse | undefined;
|
|
@@ -990,10 +990,10 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
990
990
|
}>;
|
|
991
991
|
options: {
|
|
992
992
|
method: "GET";
|
|
993
|
-
query:
|
|
994
|
-
id:
|
|
995
|
-
},
|
|
996
|
-
use: ((inputContext:
|
|
993
|
+
query: zod381.ZodObject<{
|
|
994
|
+
id: zod381.ZodString;
|
|
995
|
+
}, zod_v4_core51.$strip>;
|
|
996
|
+
use: ((inputContext: better_call229.MiddlewareInputContext<better_call229.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_call229.Middleware[];
|
|
1190
1190
|
path?: string;
|
|
1191
1191
|
} & {
|
|
1192
1192
|
asResponse?: AsResponse | undefined;
|
|
@@ -1243,21 +1243,21 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1243
1243
|
}>;
|
|
1244
1244
|
options: {
|
|
1245
1245
|
method: "POST";
|
|
1246
|
-
body:
|
|
1247
|
-
keyId:
|
|
1248
|
-
userId:
|
|
1249
|
-
name:
|
|
1250
|
-
enabled:
|
|
1251
|
-
remaining:
|
|
1252
|
-
refillAmount:
|
|
1253
|
-
refillInterval:
|
|
1254
|
-
metadata:
|
|
1255
|
-
expiresIn:
|
|
1256
|
-
rateLimitEnabled:
|
|
1257
|
-
rateLimitTimeWindow:
|
|
1258
|
-
rateLimitMax:
|
|
1259
|
-
permissions:
|
|
1260
|
-
},
|
|
1246
|
+
body: zod381.ZodObject<{
|
|
1247
|
+
keyId: zod381.ZodString;
|
|
1248
|
+
userId: zod381.ZodOptional<zod381.ZodCoercedString<unknown>>;
|
|
1249
|
+
name: zod381.ZodOptional<zod381.ZodString>;
|
|
1250
|
+
enabled: zod381.ZodOptional<zod381.ZodBoolean>;
|
|
1251
|
+
remaining: zod381.ZodOptional<zod381.ZodNumber>;
|
|
1252
|
+
refillAmount: zod381.ZodOptional<zod381.ZodNumber>;
|
|
1253
|
+
refillInterval: zod381.ZodOptional<zod381.ZodNumber>;
|
|
1254
|
+
metadata: zod381.ZodOptional<zod381.ZodAny>;
|
|
1255
|
+
expiresIn: zod381.ZodNullable<zod381.ZodOptional<zod381.ZodNumber>>;
|
|
1256
|
+
rateLimitEnabled: zod381.ZodOptional<zod381.ZodBoolean>;
|
|
1257
|
+
rateLimitTimeWindow: zod381.ZodOptional<zod381.ZodNumber>;
|
|
1258
|
+
rateLimitMax: zod381.ZodOptional<zod381.ZodNumber>;
|
|
1259
|
+
permissions: zod381.ZodNullable<zod381.ZodOptional<zod381.ZodRecord<zod381.ZodString, zod381.ZodArray<zod381.ZodString>>>>;
|
|
1260
|
+
}, zod_v4_core51.$strip>;
|
|
1261
1261
|
metadata: {
|
|
1262
1262
|
openapi: {
|
|
1263
1263
|
description: string;
|
|
@@ -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_call229.Middleware[];
|
|
1420
1420
|
path?: string;
|
|
1421
1421
|
} & {
|
|
1422
1422
|
asResponse?: AsResponse | undefined;
|
|
@@ -1431,10 +1431,10 @@ declare const apiKey: (options?: ApiKeyOptions | undefined) => {
|
|
|
1431
1431
|
}>;
|
|
1432
1432
|
options: {
|
|
1433
1433
|
method: "POST";
|
|
1434
|
-
body:
|
|
1435
|
-
keyId:
|
|
1436
|
-
},
|
|
1437
|
-
use: ((inputContext:
|
|
1434
|
+
body: zod381.ZodObject<{
|
|
1435
|
+
keyId: zod381.ZodString;
|
|
1436
|
+
}, zod_v4_core51.$strip>;
|
|
1437
|
+
use: ((inputContext: better_call229.MiddlewareInputContext<better_call229.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_call229.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_call229.MiddlewareInputContext<better_call229.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_call229.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_core53.AuthContext<_gatwech_core53.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_core53.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_core53.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_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<void>;
|
|
2010
2010
|
}[];
|
|
2011
2011
|
};
|
|
2012
2012
|
schema: O["storeInDatabase"] extends true ? {
|
|
@@ -2842,7 +2842,7 @@ declare function parsePowHeader(value: string | null | undefined): {
|
|
|
2842
2842
|
//#region src/plugins/sentinel/index.d.ts
|
|
2843
2843
|
declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
2844
2844
|
id: "sentinel";
|
|
2845
|
-
init(ctx: AuthContext<
|
|
2845
|
+
init(ctx: AuthContext<_gatwech_core53.PayvoAuthOptions>): {
|
|
2846
2846
|
options: {
|
|
2847
2847
|
databaseHooks: {
|
|
2848
2848
|
user: {
|
|
@@ -2855,7 +2855,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
2855
2855
|
emailVerified: boolean;
|
|
2856
2856
|
name: string;
|
|
2857
2857
|
image?: string | null | undefined;
|
|
2858
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
2858
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<{
|
|
2859
2859
|
data: {
|
|
2860
2860
|
normalizedEmail: string;
|
|
2861
2861
|
id: string;
|
|
@@ -2875,7 +2875,7 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
2875
2875
|
emailVerified: boolean;
|
|
2876
2876
|
name: string;
|
|
2877
2877
|
image?: string | null | undefined;
|
|
2878
|
-
} & Record<string, unknown>, context: GenericEndpointContext<
|
|
2878
|
+
} & Record<string, unknown>, context: GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
2879
2879
|
};
|
|
2880
2880
|
update: {
|
|
2881
2881
|
before(data: Partial<{
|
|
@@ -2903,28 +2903,28 @@ declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
2903
2903
|
};
|
|
2904
2904
|
};
|
|
2905
2905
|
} | undefined;
|
|
2906
|
-
onRequest(request: Request, ctx: AuthContext<
|
|
2906
|
+
onRequest(request: Request, ctx: AuthContext<_gatwech_core53.PayvoAuthOptions>): Promise<{
|
|
2907
2907
|
response: Response;
|
|
2908
2908
|
} | undefined>;
|
|
2909
2909
|
hooks: {
|
|
2910
2910
|
before: ({
|
|
2911
|
-
matcher(context:
|
|
2912
|
-
handler: (inputContext:
|
|
2911
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
2912
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<{
|
|
2913
2913
|
context: {
|
|
2914
2914
|
body: any;
|
|
2915
2915
|
};
|
|
2916
2916
|
} | undefined>;
|
|
2917
2917
|
} | {
|
|
2918
|
-
matcher(context:
|
|
2919
|
-
handler: (inputContext:
|
|
2918
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
2919
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<void>;
|
|
2920
2920
|
})[];
|
|
2921
2921
|
after: ({
|
|
2922
|
-
matcher(context:
|
|
2923
|
-
handler: (inputContext:
|
|
2922
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
2923
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<void>;
|
|
2924
2924
|
} | {
|
|
2925
|
-
matcher(context:
|
|
2926
|
-
handler: (inputContext:
|
|
2927
|
-
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") |
|
|
2925
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
2926
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<({
|
|
2927
|
+
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_call229.Status;
|
|
2928
2928
|
body: ({
|
|
2929
2929
|
message?: string;
|
|
2930
2930
|
code?: string;
|
|
@@ -3164,7 +3164,7 @@ declare const AUDIT_LOG_ERROR_CODES: {
|
|
|
3164
3164
|
};
|
|
3165
3165
|
declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
3166
3166
|
id: "audit-log";
|
|
3167
|
-
init(ctx: AuthContext<
|
|
3167
|
+
init(ctx: AuthContext<_gatwech_core53.PayvoAuthOptions>): {
|
|
3168
3168
|
options: {
|
|
3169
3169
|
databaseHooks: {
|
|
3170
3170
|
user: {
|
|
@@ -3177,7 +3177,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3177
3177
|
emailVerified: boolean;
|
|
3178
3178
|
name: string;
|
|
3179
3179
|
image?: string | null | undefined;
|
|
3180
|
-
} & Record<string, unknown>, context:
|
|
3180
|
+
} & Record<string, unknown>, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3181
3181
|
};
|
|
3182
3182
|
update: {
|
|
3183
3183
|
before(data: Partial<{
|
|
@@ -3188,7 +3188,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3188
3188
|
emailVerified: boolean;
|
|
3189
3189
|
name: string;
|
|
3190
3190
|
image?: string | null | undefined;
|
|
3191
|
-
}> & Record<string, unknown>, context:
|
|
3191
|
+
}> & Record<string, unknown>, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<{
|
|
3192
3192
|
data: Partial<{
|
|
3193
3193
|
id: string;
|
|
3194
3194
|
createdAt: Date;
|
|
@@ -3207,7 +3207,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3207
3207
|
emailVerified: boolean;
|
|
3208
3208
|
name: string;
|
|
3209
3209
|
image?: string | null | undefined;
|
|
3210
|
-
} & Record<string, unknown>, context:
|
|
3210
|
+
} & Record<string, unknown>, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3211
3211
|
};
|
|
3212
3212
|
delete: {
|
|
3213
3213
|
after(user: {
|
|
@@ -3218,7 +3218,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3218
3218
|
emailVerified: boolean;
|
|
3219
3219
|
name: string;
|
|
3220
3220
|
image?: string | null | undefined;
|
|
3221
|
-
} & Record<string, unknown>, context:
|
|
3221
|
+
} & Record<string, unknown>, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3222
3222
|
};
|
|
3223
3223
|
};
|
|
3224
3224
|
session: {
|
|
@@ -3232,7 +3232,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3232
3232
|
token: string;
|
|
3233
3233
|
ipAddress?: string | null | undefined;
|
|
3234
3234
|
userAgent?: string | null | undefined;
|
|
3235
|
-
} & Record<string, unknown>, context:
|
|
3235
|
+
} & Record<string, unknown>, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3236
3236
|
};
|
|
3237
3237
|
};
|
|
3238
3238
|
account: {
|
|
@@ -3251,7 +3251,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3251
3251
|
refreshTokenExpiresAt?: Date | null | undefined;
|
|
3252
3252
|
scope?: string | null | undefined;
|
|
3253
3253
|
password?: string | null | undefined;
|
|
3254
|
-
}, context:
|
|
3254
|
+
}, context: _gatwech_core53.GenericEndpointContext<_gatwech_core53.PayvoAuthOptions> | undefined): Promise<void>;
|
|
3255
3255
|
};
|
|
3256
3256
|
};
|
|
3257
3257
|
};
|
|
@@ -3259,12 +3259,12 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3259
3259
|
};
|
|
3260
3260
|
hooks: {
|
|
3261
3261
|
before: {
|
|
3262
|
-
matcher(context:
|
|
3263
|
-
handler: (inputContext:
|
|
3262
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
3263
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<void>;
|
|
3264
3264
|
}[];
|
|
3265
3265
|
after: {
|
|
3266
|
-
matcher(context:
|
|
3267
|
-
handler: (inputContext:
|
|
3266
|
+
matcher(context: _gatwech_core53.HookEndpointContext): boolean;
|
|
3267
|
+
handler: (inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<void>;
|
|
3268
3268
|
}[];
|
|
3269
3269
|
};
|
|
3270
3270
|
endpoints: {
|
|
@@ -3293,7 +3293,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3293
3293
|
} & {
|
|
3294
3294
|
asResponse?: boolean;
|
|
3295
3295
|
returnHeaders?: boolean;
|
|
3296
|
-
use?:
|
|
3296
|
+
use?: better_call229.Middleware[];
|
|
3297
3297
|
path?: string;
|
|
3298
3298
|
} & {
|
|
3299
3299
|
asResponse?: AsResponse | undefined;
|
|
@@ -3314,7 +3314,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3314
3314
|
}>;
|
|
3315
3315
|
options: {
|
|
3316
3316
|
method: "GET";
|
|
3317
|
-
use: ((inputContext:
|
|
3317
|
+
use: ((inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<{
|
|
3318
3318
|
session: {
|
|
3319
3319
|
session: Record<string, any> & {
|
|
3320
3320
|
id: string;
|
|
@@ -3337,16 +3337,16 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3337
3337
|
};
|
|
3338
3338
|
};
|
|
3339
3339
|
}>)[];
|
|
3340
|
-
query:
|
|
3341
|
-
limit:
|
|
3342
|
-
offset:
|
|
3343
|
-
eventType:
|
|
3344
|
-
identifier:
|
|
3345
|
-
organizationId:
|
|
3346
|
-
userId:
|
|
3347
|
-
startDate:
|
|
3348
|
-
endDate:
|
|
3349
|
-
},
|
|
3340
|
+
query: zod381.ZodOptional<zod381.ZodObject<{
|
|
3341
|
+
limit: zod381.ZodOptional<zod381.ZodUnion<[zod381.ZodString, zod381.ZodNumber]>>;
|
|
3342
|
+
offset: zod381.ZodOptional<zod381.ZodUnion<[zod381.ZodString, zod381.ZodNumber]>>;
|
|
3343
|
+
eventType: zod381.ZodOptional<zod381.ZodString>;
|
|
3344
|
+
identifier: zod381.ZodOptional<zod381.ZodString>;
|
|
3345
|
+
organizationId: zod381.ZodOptional<zod381.ZodString>;
|
|
3346
|
+
userId: zod381.ZodOptional<zod381.ZodString>;
|
|
3347
|
+
startDate: zod381.ZodOptional<zod381.ZodString>;
|
|
3348
|
+
endDate: zod381.ZodOptional<zod381.ZodString>;
|
|
3349
|
+
}, zod381.core.$strip>>;
|
|
3350
3350
|
metadata: {
|
|
3351
3351
|
openapi: {
|
|
3352
3352
|
operationId: string;
|
|
@@ -3461,7 +3461,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3461
3461
|
} & {
|
|
3462
3462
|
asResponse?: boolean;
|
|
3463
3463
|
returnHeaders?: boolean;
|
|
3464
|
-
use?:
|
|
3464
|
+
use?: better_call229.Middleware[];
|
|
3465
3465
|
path?: string;
|
|
3466
3466
|
} & {
|
|
3467
3467
|
asResponse?: AsResponse | undefined;
|
|
@@ -3482,7 +3482,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3482
3482
|
}>;
|
|
3483
3483
|
options: {
|
|
3484
3484
|
method: "GET";
|
|
3485
|
-
use: ((inputContext:
|
|
3485
|
+
use: ((inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<{
|
|
3486
3486
|
session: {
|
|
3487
3487
|
session: Record<string, any> & {
|
|
3488
3488
|
id: string;
|
|
@@ -3505,16 +3505,16 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3505
3505
|
};
|
|
3506
3506
|
};
|
|
3507
3507
|
}>)[];
|
|
3508
|
-
query:
|
|
3509
|
-
limit:
|
|
3510
|
-
offset:
|
|
3511
|
-
eventType:
|
|
3512
|
-
identifier:
|
|
3513
|
-
organizationId:
|
|
3514
|
-
userId:
|
|
3515
|
-
startDate:
|
|
3516
|
-
endDate:
|
|
3517
|
-
},
|
|
3508
|
+
query: zod381.ZodOptional<zod381.ZodObject<{
|
|
3509
|
+
limit: zod381.ZodOptional<zod381.ZodUnion<[zod381.ZodString, zod381.ZodNumber]>>;
|
|
3510
|
+
offset: zod381.ZodOptional<zod381.ZodUnion<[zod381.ZodString, zod381.ZodNumber]>>;
|
|
3511
|
+
eventType: zod381.ZodOptional<zod381.ZodString>;
|
|
3512
|
+
identifier: zod381.ZodOptional<zod381.ZodString>;
|
|
3513
|
+
organizationId: zod381.ZodOptional<zod381.ZodString>;
|
|
3514
|
+
userId: zod381.ZodOptional<zod381.ZodString>;
|
|
3515
|
+
startDate: zod381.ZodOptional<zod381.ZodString>;
|
|
3516
|
+
endDate: zod381.ZodOptional<zod381.ZodString>;
|
|
3517
|
+
}, zod381.core.$strip>>;
|
|
3518
3518
|
metadata: {
|
|
3519
3519
|
openapi: {
|
|
3520
3520
|
operationId: string;
|
|
@@ -3620,7 +3620,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3620
3620
|
} & {
|
|
3621
3621
|
asResponse?: boolean;
|
|
3622
3622
|
returnHeaders?: boolean;
|
|
3623
|
-
use?:
|
|
3623
|
+
use?: better_call229.Middleware[];
|
|
3624
3624
|
path?: string;
|
|
3625
3625
|
} & {
|
|
3626
3626
|
asResponse?: AsResponse | undefined;
|
|
@@ -3635,7 +3635,7 @@ declare const auditLog: (options?: AuditLogOptions | undefined) => {
|
|
|
3635
3635
|
}>;
|
|
3636
3636
|
options: {
|
|
3637
3637
|
method: "GET";
|
|
3638
|
-
use: ((inputContext:
|
|
3638
|
+
use: ((inputContext: better_call229.MiddlewareInputContext<better_call229.MiddlewareOptions>) => Promise<{
|
|
3639
3639
|
session: {
|
|
3640
3640
|
session: Record<string, any> & {
|
|
3641
3641
|
id: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as User, h as Session } from "./index-BNhJglHC.mjs";
|
|
2
2
|
import { GenericEndpointContext } from "@gatwech/core";
|
|
3
|
-
import * as
|
|
3
|
+
import * as better_call109 from "better-call";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/one-time-token/index.d.ts
|
|
@@ -67,7 +67,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
67
67
|
} & {
|
|
68
68
|
asResponse?: boolean;
|
|
69
69
|
returnHeaders?: boolean;
|
|
70
|
-
use?:
|
|
70
|
+
use?: better_call109.Middleware[];
|
|
71
71
|
path?: string;
|
|
72
72
|
} & {
|
|
73
73
|
asResponse?: AsResponse | undefined;
|
|
@@ -82,7 +82,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
82
82
|
}>;
|
|
83
83
|
options: {
|
|
84
84
|
method: "GET";
|
|
85
|
-
use: ((inputContext:
|
|
85
|
+
use: ((inputContext: better_call109.MiddlewareInputContext<better_call109.MiddlewareOptions>) => Promise<{
|
|
86
86
|
session: {
|
|
87
87
|
session: Record<string, any> & {
|
|
88
88
|
id: string;
|
|
@@ -143,7 +143,7 @@ declare const oneTimeToken: (options?: OneTimeTokenOptions | undefined) => {
|
|
|
143
143
|
} & {
|
|
144
144
|
asResponse?: boolean;
|
|
145
145
|
returnHeaders?: boolean;
|
|
146
|
-
use?:
|
|
146
|
+
use?: better_call109.Middleware[];
|
|
147
147
|
path?: string;
|
|
148
148
|
} & {
|
|
149
149
|
asResponse?: AsResponse | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as better_call29 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import { StringValue } from "ms";
|
|
5
5
|
|
|
@@ -180,7 +180,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
180
180
|
} & {
|
|
181
181
|
asResponse?: boolean;
|
|
182
182
|
returnHeaders?: boolean;
|
|
183
|
-
use?:
|
|
183
|
+
use?: better_call29.Middleware[];
|
|
184
184
|
path?: string;
|
|
185
185
|
} & {
|
|
186
186
|
asResponse?: AsResponse | undefined;
|
|
@@ -303,7 +303,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
303
303
|
} & {
|
|
304
304
|
asResponse?: boolean;
|
|
305
305
|
returnHeaders?: boolean;
|
|
306
|
-
use?:
|
|
306
|
+
use?: better_call29.Middleware[];
|
|
307
307
|
path?: string;
|
|
308
308
|
} & {
|
|
309
309
|
asResponse?: AsResponse | undefined;
|
|
@@ -407,7 +407,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
407
407
|
} & {
|
|
408
408
|
asResponse?: boolean;
|
|
409
409
|
returnHeaders?: boolean;
|
|
410
|
-
use?:
|
|
410
|
+
use?: better_call29.Middleware[];
|
|
411
411
|
path?: string;
|
|
412
412
|
} & {
|
|
413
413
|
asResponse?: AsResponse | undefined;
|
|
@@ -484,7 +484,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
484
484
|
} & {
|
|
485
485
|
asResponse?: boolean;
|
|
486
486
|
returnHeaders?: boolean;
|
|
487
|
-
use?:
|
|
487
|
+
use?: better_call29.Middleware[];
|
|
488
488
|
path?: string;
|
|
489
489
|
} & {
|
|
490
490
|
asResponse?: AsResponse | undefined;
|
|
@@ -556,7 +556,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
556
556
|
} & {
|
|
557
557
|
asResponse?: boolean;
|
|
558
558
|
returnHeaders?: boolean;
|
|
559
|
-
use?:
|
|
559
|
+
use?: better_call29.Middleware[];
|
|
560
560
|
path?: string;
|
|
561
561
|
} & {
|
|
562
562
|
asResponse?: AsResponse | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _gatwech_core9 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_core9.AuthContext<_gatwech_core9.PayvoAuthOptions>) => Promise<{
|
|
38
38
|
response: Response;
|
|
39
39
|
} | undefined>;
|
|
40
40
|
};
|