@gatwech/auth 1.0.0-beta.18 → 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/README.md +8 -14
- package/dist/{access-C6O_osEz.mjs → access-CrwEFPHE.mjs} +1 -1
- package/dist/{access-DT1f6l5k.mjs → access-bhklJd7m.mjs} +1 -1
- package/dist/{adapter-factory-BZ2Qiqpn.mjs → adapter-factory-xbLUJt85.mjs} +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +6 -5
- package/dist/adapters/index.d.mts +5 -5
- package/dist/adapters/index.mjs +6 -5
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.mjs +8 -7
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +6 -5
- package/dist/adapters/mongodb-adapter/index.mjs +6 -5
- package/dist/adapters/prisma-adapter/index.mjs +6 -5
- package/dist/adapters/test.mjs +4 -3
- package/dist/{admin-Bcq53Nwj.mjs → admin-BzUJL6tr.mjs} +6 -6
- package/dist/{anonymous-CRt1imBW.mjs → anonymous-BjlTk4gl.mjs} +5 -5
- package/dist/api/index.d.mts +5 -5
- package/dist/api/index.mjs +12 -11
- package/dist/{api-0pR_I-Nx.mjs → api-Dk8Yj_J5.mjs} +15 -5
- package/dist/audit-log-DKsUWR8O.mjs +772 -0
- package/dist/{auth-CBUoBX6o.mjs → auth-vfCyIIeV.mjs} +8 -8
- package/dist/{bearer-Djf_awfo.mjs → bearer-DvQLM00l.mjs} +2 -2
- package/dist/client/index.d.mts +19 -19
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.d.mts +42 -34
- package/dist/client/plugins/index.mjs +16 -12
- package/dist/client/react/index.d.mts +5 -5
- package/dist/client/react/index.mjs +2 -2
- package/dist/client-4QEb0rUr.mjs +95 -0
- package/dist/client-C_qmyez2.d.mts +75 -0
- package/dist/client-DzOqXJUm.mjs +15 -0
- package/dist/client-F67q-Lbi.d.mts +14 -0
- package/dist/{client-aExCkfwm.mjs → client-xga7yFIX.mjs} +2 -2
- package/dist/cookies/index.d.mts +6 -6
- package/dist/cookies/index.mjs +2 -2
- package/dist/{cookies-cJObLwn1.mjs → cookies-BuvlgcA-.mjs} +1 -1
- package/dist/crypto/index.mjs +2 -1
- package/dist/{crypto-Bb42eMrH.mjs → crypto-CCyta8xj.mjs} +1 -6
- package/dist/{custom-session-L3t7ecsd.mjs → custom-session-DN_-pfi_.mjs} +2 -2
- package/dist/db/index.d.mts +5 -5
- package/dist/db/index.mjs +9 -8
- package/dist/{db-BrstmDhc.mjs → db-7vHnL1XA.mjs} +15 -9
- package/dist/{device-authorization-V4s3h4Mj.mjs → device-authorization-BKnNhlsz.mjs} +4 -4
- package/dist/{dialect-CeddeGHf.mjs → dialect-HsWUfpYY.mjs} +2 -2
- package/dist/{email-otp-BtDHSw14.mjs → email-otp-Dw0DypjQ.mjs} +7 -6
- package/dist/{generic-oauth-CL5X27ZI.mjs → generic-oauth-DFj27JY8.mjs} +4 -4
- package/dist/{has-permission-BpAr7uCn.mjs → has-permission-Bvg8de8g.mjs} +1 -1
- package/dist/{haveibeenpwned-cMpJvmzI.mjs → haveibeenpwned-CzNda7Tn.mjs} +28 -15
- package/dist/{index-BYMI9r_d.d.mts → index-4I1YhYhk.d.mts} +4 -4
- package/dist/{index-Cxi7TbLE.d.mts → index-BNhJglHC.d.mts} +122 -122
- package/dist/{index-DlaMq1nb.d.mts → index-BX7rl07Z.d.mts} +14 -14
- package/dist/{client-BOX93C3d.d.mts → index-Bml-PCqP.d.mts} +52 -52
- package/dist/{index-zjjNBRY2.d.mts → index-BsSKcKgO.d.mts} +6 -6
- package/dist/{index-Buhn3hkR.d.mts → index-CBiGsvDd.d.mts} +8 -8
- package/dist/{index-D_k662QG.d.mts → index-CC920PPp.d.mts} +14 -14
- package/dist/{index-B3n8e37d.d.mts → index-CNd5jqLl.d.mts} +7 -7
- package/dist/{index-BqhKCbPH.d.mts → index-CP8x1TFq.d.mts} +6 -6
- package/dist/{index-DKNNV1kb.d.mts → index-CofuaNMl.d.mts} +8 -8
- package/dist/{index-DR0xXno9.d.mts → index-CsxtcAO0.d.mts} +1 -1
- package/dist/{index-C7fQuk-V.d.mts → index-CxlWnL9c.d.mts} +1 -1
- package/dist/{index-CuFzhoS6.d.mts → index-CzpdkTdv.d.mts} +10 -10
- package/dist/index-D57DuhZR.d.mts +3769 -0
- package/dist/{index-C-u1h_WX.d.mts → index-D6ku0rUC.d.mts} +5 -5
- package/dist/{client-CNY0tn9g.d.mts → index-DFSRYWFI.d.mts} +21 -21
- package/dist/{index-BBm8nQ9Q.d.mts → index-DGeoJ4gu.d.mts} +2 -2
- package/dist/{index-G6V0Z_Mn.d.mts → index-DTkcY7xH.d.mts} +10 -10
- package/dist/{index-65G5U5DB-DSdjzreF.d.mts → index-Df0KhQRf-BEa5tdwJ.d.mts} +3 -2
- package/dist/{index-34ONrP8l.d.mts → index-Dnd8S4S4.d.mts} +11 -11
- package/dist/{index-B-XKqFvY.d.mts → index-DwPAddfE.d.mts} +11 -4
- package/dist/{index-DoXZYQpq.d.mts → index-DyXi7S2M.d.mts} +10 -10
- package/dist/{index-BHoQlf7a.d.mts → index-KhbNmMmG.d.mts} +178 -178
- package/dist/{index-z0KSvE5i.d.mts → index-QmocqGM-.d.mts} +1 -1
- package/dist/{admin-DtfO1PLg.d.mts → index-XfE0WjTN.d.mts} +36 -36
- package/dist/{index-DaBcikv9.d.mts → index-sb-UFLuo.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +16 -15
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.mts +5 -5
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/{jwt-lHV4QHpD.mjs → jwt-DBN2mu0r.mjs} +4 -4
- package/dist/{kysely-adapter-DpzYO8Yf.mjs → kysely-adapter-Bkm1liPW.mjs} +1 -1
- package/dist/{magic-link-Bk-ueorR.mjs → magic-link-D9Em1aOR.mjs} +3 -3
- package/dist/{multi-session-DRrLKrg9.mjs → multi-session-Dno_8DxC.mjs} +5 -5
- package/dist/{oauth-proxy-D1sWh9B_.mjs → oauth-proxy-DW-zt8wv.mjs} +2 -2
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.mjs +12 -11
- package/dist/{one-tap-DMswkTEc.mjs → one-tap-CodeyQb8.mjs} +2 -2
- package/dist/{organization-BArHO_5v.mjs → organization-CkTKs7bx.mjs} +9 -9
- package/dist/{passkey-CcD4CnhM.mjs → passkey-JNQTz5a0.mjs} +5 -5
- package/dist/{phone-number-rHDIlh-2.mjs → phone-number-Dqz8aeyF.mjs} +4 -4
- package/dist/plugins/access/index.d.mts +2 -2
- package/dist/plugins/access/index.mjs +1 -1
- package/dist/plugins/admin/access/index.d.mts +2 -2
- package/dist/plugins/admin/access/index.mjs +2 -2
- package/dist/plugins/admin/index.d.mts +7 -8
- package/dist/plugins/admin/index.mjs +17 -16
- package/dist/plugins/anonymous/index.d.mts +6 -6
- package/dist/plugins/anonymous/index.mjs +13 -12
- package/dist/plugins/audit-log/client.d.mts +30 -0
- package/dist/plugins/audit-log/client.mjs +3 -0
- package/dist/plugins/audit-log/index.d.mts +29 -0
- package/dist/plugins/audit-log/index.mjs +20 -0
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/captcha/index.mjs +1 -1
- package/dist/plugins/custom-session/index.d.mts +6 -6
- package/dist/plugins/custom-session/index.mjs +14 -13
- package/dist/plugins/device-authorization/index.d.mts +3 -3
- package/dist/plugins/device-authorization/index.mjs +13 -12
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.mjs +14 -13
- package/dist/plugins/generic-oauth/index.d.mts +6 -6
- package/dist/plugins/generic-oauth/index.mjs +13 -12
- package/dist/plugins/haveibeenpwned/index.d.mts +2 -2
- package/dist/plugins/haveibeenpwned/index.mjs +14 -13
- package/dist/plugins/index.d.mts +29 -139
- package/dist/plugins/index.mjs +47 -42
- package/dist/plugins/jwt/index.d.mts +6 -6
- package/dist/plugins/jwt/index.mjs +13 -12
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +13 -12
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +13 -12
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +13 -12
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +13 -12
- package/dist/plugins/one-time-token/index.d.mts +6 -6
- package/dist/plugins/one-time-token/index.mjs +46 -41
- package/dist/plugins/organization/access/index.d.mts +3 -3
- package/dist/plugins/organization/access/index.mjs +2 -2
- package/dist/plugins/organization/index.d.mts +8 -8
- package/dist/plugins/organization/index.mjs +17 -16
- package/dist/plugins/passkey/index.d.mts +6 -6
- package/dist/plugins/passkey/index.mjs +13 -12
- package/dist/plugins/phone-number/index.d.mts +6 -6
- package/dist/plugins/phone-number/index.mjs +13 -12
- package/dist/plugins/sentinel/client.d.mts +30 -0
- package/dist/plugins/sentinel/client.mjs +5 -0
- package/dist/plugins/sentinel/index.d.mts +29 -0
- package/dist/plugins/sentinel/index.mjs +22 -0
- package/dist/plugins/two-factor/index.d.mts +6 -6
- package/dist/plugins/two-factor/index.mjs +15 -14
- package/dist/plugins/username/index.d.mts +3 -3
- package/dist/plugins/username/index.mjs +13 -12
- package/dist/{plugins-hFZT3hmK.d.mts → plugins-Dy_FrD4Y.d.mts} +1 -1
- package/dist/{plugins-3jfNste3.mjs → plugins-yF8CFUDR.mjs} +11 -8
- package/dist/pow-OK01yPG3.mjs +61 -0
- package/dist/{proxy-CL9PZXJA.mjs → proxy-C_KXfOhk.mjs} +1 -1
- package/dist/random-32E3cU5o.mjs +7 -0
- package/dist/registry-CqG_3Qnx.mjs +194 -0
- package/dist/sentinel-DiPqydKG.mjs +1426 -0
- package/dist/{session-Dgp133Yt.mjs → session-BB3oqApE.mjs} +2 -2
- 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 +1 -1
- package/dist/src/adapters/tests/number-id.d.ts +3 -3
- 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/client/plugins/index.d.ts +2 -0
- 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/client.d.ts +10 -0
- package/dist/src/plugins/audit-log/events.d.ts +90 -0
- package/dist/src/plugins/audit-log/index.d.ts +614 -0
- package/dist/src/plugins/audit-log/registry.d.ts +13 -0
- package/dist/src/plugins/audit-log/remote.d.ts +34 -0
- package/dist/src/plugins/audit-log/schema.d.ts +50 -0
- package/dist/src/plugins/audit-log/types.d.ts +117 -0
- package/dist/src/plugins/email-otp/index.d.ts +1 -1
- package/dist/src/plugins/haveibeenpwned/index.d.ts +6 -0
- package/dist/src/plugins/index.d.ts +2 -0
- package/dist/src/plugins/multi-session/index.d.ts +8 -8
- package/dist/src/plugins/organization/organization.d.ts +5 -5
- 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/actions.d.ts +64 -0
- package/dist/src/plugins/sentinel/client.d.ts +67 -0
- package/dist/src/plugins/sentinel/email.d.ts +28 -0
- package/dist/src/plugins/sentinel/geo.d.ts +22 -0
- package/dist/src/plugins/sentinel/index.d.ts +326 -0
- package/dist/src/plugins/sentinel/intel.d.ts +45 -0
- package/dist/src/plugins/sentinel/pow.d.ts +21 -0
- package/dist/src/plugins/sentinel/schema.d.ts +110 -0
- package/dist/src/plugins/sentinel/store.d.ts +37 -0
- package/dist/src/plugins/sentinel/types.d.ts +412 -0
- package/dist/src/test-utils/memory-secondary-storage.d.ts +16 -0
- package/dist/src/test-utils/password.d.ts +12 -0
- 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 +53 -48
- package/dist/{two-factor-ClUXxom2.mjs → two-factor-CDVjxx4f.mjs} +6 -5
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -1
- package/dist/{username-DiGklOGl.mjs → username-BHNvcvsY.mjs} +3 -3
- package/dist/{utils-SOMB4Px5.mjs → utils-B03WRaGi.mjs} +2 -1
- package/package.json +36 -3
- package/dist/index-CM-CFWwr.d.mts +0 -1919
- package/dist/index-DB7t8whN.d.mts +0 -1
- /package/dist/{access-BO2g7QVe.mjs → access-BM6jSA5j.mjs} +0 -0
- /package/dist/{bun-sqlite-dialect-CeNvMaZz.mjs → bun-sqlite-dialect-CDGusFqF.mjs} +0 -0
- /package/dist/{captcha-BqaMxlKC.mjs → captcha-DGP9lCRe.mjs} +0 -0
- /package/dist/{client-CygJhqeB.mjs → client-BuveH3MN.mjs} +0 -0
- /package/dist/{client-WiN43tAS.mjs → client-cBiytuOL.mjs} +0 -0
- /package/dist/{date-Cx2yCiC4.mjs → date-CMr04reD.mjs} +0 -0
- /package/dist/{esm-C-QicDNz.mjs → esm-BbvI87Z2.mjs} +0 -0
- /package/dist/{get-tables-BQP7YW9c.mjs → get-tables-CKvSyDST.mjs} +0 -0
- /package/dist/{helper-tmxW3BHj.d.mts → helper-BgOIGHsu.d.mts} +0 -0
- /package/dist/{misc-beA1w3XV.mjs → misc-fKH4d5XQ.mjs} +0 -0
- /package/dist/{node-sqlite-dialect-BcKxBQnm.mjs → node-sqlite-dialect-CIOjcg31.mjs} +0 -0
- /package/dist/{parser-DcrIEuXE.mjs → parser-D7EkhAjZ.mjs} +0 -0
- /package/dist/{password-sVC4nePO.mjs → password-5CdcAVaH.mjs} +0 -0
- /package/dist/{permission-DLYUF3cW.mjs → permission-CDDWgA_O.mjs} +0 -0
- /package/dist/{plugin-helper-4L-lzsjZ.mjs → plugin-helper-RJJBTOba.mjs} +0 -0
- /package/dist/{promise-8rrEHRXd.mjs → promise-D7Oo6_cY.mjs} +0 -0
- /package/dist/{types-Bjn15Uy6.mjs → types-DCPpFKUB.mjs} +0 -0
- /package/dist/{types-B1OL7hyf.d.mts → types-DNQ9XQrB.d.mts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as User, h as Session } from "./index-
|
|
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
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
2
|
-
import * as
|
|
1
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
2
|
+
import * as better_call29 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
import { StringValue } from "ms";
|
|
5
5
|
|
|
@@ -47,6 +47,19 @@ declare const schema: {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
//#endregion
|
|
50
|
+
//#region src/plugins/device-authorization/client.d.ts
|
|
51
|
+
declare const deviceAuthorizationClient: () => {
|
|
52
|
+
id: "device-authorization";
|
|
53
|
+
$InferServerPlugin: ReturnType<typeof deviceAuthorization>;
|
|
54
|
+
pathMethods: {
|
|
55
|
+
"/device/code": "POST";
|
|
56
|
+
"/device/token": "POST";
|
|
57
|
+
"/device": "GET";
|
|
58
|
+
"/device/approve": "POST";
|
|
59
|
+
"/device/deny": "POST";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
50
63
|
//#region src/plugins/device-authorization/index.d.ts
|
|
51
64
|
declare const $deviceAuthorizationOptionsSchema: z$1.ZodObject<{
|
|
52
65
|
expiresIn: z$1.ZodDefault<z$1.ZodCustom<StringValue, StringValue>>;
|
|
@@ -167,7 +180,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
167
180
|
} & {
|
|
168
181
|
asResponse?: boolean;
|
|
169
182
|
returnHeaders?: boolean;
|
|
170
|
-
use?:
|
|
183
|
+
use?: better_call29.Middleware[];
|
|
171
184
|
path?: string;
|
|
172
185
|
} & {
|
|
173
186
|
asResponse?: AsResponse | undefined;
|
|
@@ -290,7 +303,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
290
303
|
} & {
|
|
291
304
|
asResponse?: boolean;
|
|
292
305
|
returnHeaders?: boolean;
|
|
293
|
-
use?:
|
|
306
|
+
use?: better_call29.Middleware[];
|
|
294
307
|
path?: string;
|
|
295
308
|
} & {
|
|
296
309
|
asResponse?: AsResponse | undefined;
|
|
@@ -394,7 +407,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
394
407
|
} & {
|
|
395
408
|
asResponse?: boolean;
|
|
396
409
|
returnHeaders?: boolean;
|
|
397
|
-
use?:
|
|
410
|
+
use?: better_call29.Middleware[];
|
|
398
411
|
path?: string;
|
|
399
412
|
} & {
|
|
400
413
|
asResponse?: AsResponse | undefined;
|
|
@@ -471,7 +484,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
471
484
|
} & {
|
|
472
485
|
asResponse?: boolean;
|
|
473
486
|
returnHeaders?: boolean;
|
|
474
|
-
use?:
|
|
487
|
+
use?: better_call29.Middleware[];
|
|
475
488
|
path?: string;
|
|
476
489
|
} & {
|
|
477
490
|
asResponse?: AsResponse | undefined;
|
|
@@ -543,7 +556,7 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
543
556
|
} & {
|
|
544
557
|
asResponse?: boolean;
|
|
545
558
|
returnHeaders?: boolean;
|
|
546
|
-
use?:
|
|
559
|
+
use?: better_call29.Middleware[];
|
|
547
560
|
path?: string;
|
|
548
561
|
} & {
|
|
549
562
|
asResponse?: AsResponse | undefined;
|
|
@@ -612,17 +625,4 @@ declare const deviceAuthorization: (options?: Partial<DeviceAuthorizationOptions
|
|
|
612
625
|
};
|
|
613
626
|
};
|
|
614
627
|
//#endregion
|
|
615
|
-
|
|
616
|
-
declare const deviceAuthorizationClient: () => {
|
|
617
|
-
id: "device-authorization";
|
|
618
|
-
$InferServerPlugin: ReturnType<typeof deviceAuthorization>;
|
|
619
|
-
pathMethods: {
|
|
620
|
-
"/device/code": "POST";
|
|
621
|
-
"/device/token": "POST";
|
|
622
|
-
"/device": "GET";
|
|
623
|
-
"/device/approve": "POST";
|
|
624
|
-
"/device/deny": "POST";
|
|
625
|
-
};
|
|
626
|
-
};
|
|
627
|
-
//#endregion
|
|
628
|
-
export { deviceAuthorization as i, $deviceAuthorizationOptionsSchema as n, DeviceAuthorizationOptions as r, deviceAuthorizationClient as t };
|
|
628
|
+
export { deviceAuthorizationClient as i, DeviceAuthorizationOptions as n, deviceAuthorization as r, $deviceAuthorizationOptionsSchema as t };
|
|
@@ -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
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _gatwech_core23 from "@gatwech/core";
|
|
2
|
+
import * as better_call60 from "better-call";
|
|
3
3
|
import * as z$1 from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/oauth-proxy/index.d.ts
|
|
@@ -48,7 +48,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
48
48
|
} & {
|
|
49
49
|
asResponse?: boolean;
|
|
50
50
|
returnHeaders?: boolean;
|
|
51
|
-
use?:
|
|
51
|
+
use?: better_call60.Middleware[];
|
|
52
52
|
path?: string;
|
|
53
53
|
} & {
|
|
54
54
|
asResponse?: AsResponse | undefined;
|
|
@@ -63,7 +63,7 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
63
63
|
callbackURL: z$1.ZodString;
|
|
64
64
|
cookies: z$1.ZodString;
|
|
65
65
|
}, z$1.core.$strip>;
|
|
66
|
-
use: ((inputContext:
|
|
66
|
+
use: ((inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>)[];
|
|
67
67
|
metadata: {
|
|
68
68
|
openapi: {
|
|
69
69
|
description: string;
|
|
@@ -96,12 +96,12 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
96
96
|
};
|
|
97
97
|
hooks: {
|
|
98
98
|
after: {
|
|
99
|
-
matcher(context:
|
|
100
|
-
handler: (inputContext:
|
|
99
|
+
matcher(context: _gatwech_core23.HookEndpointContext): boolean;
|
|
100
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<void>;
|
|
101
101
|
}[];
|
|
102
102
|
before: ({
|
|
103
103
|
matcher(): true;
|
|
104
|
-
handler: (inputContext:
|
|
104
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
|
|
105
105
|
context: {
|
|
106
106
|
context: {
|
|
107
107
|
oauthConfig: {
|
|
@@ -111,9 +111,9 @@ declare const oAuthProxy: (opts?: OAuthProxyOptions | undefined) => {
|
|
|
111
111
|
};
|
|
112
112
|
} | undefined>;
|
|
113
113
|
} | {
|
|
114
|
-
matcher(context:
|
|
115
|
-
handler: (inputContext:
|
|
116
|
-
context:
|
|
114
|
+
matcher(context: _gatwech_core23.HookEndpointContext): boolean;
|
|
115
|
+
handler: (inputContext: better_call60.MiddlewareInputContext<better_call60.MiddlewareOptions>) => Promise<{
|
|
116
|
+
context: better_call60.MiddlewareContext<better_call60.MiddlewareOptions, _gatwech_core23.AuthContext<_gatwech_core23.PayvoAuthOptions> & {
|
|
117
117
|
returned?: unknown | undefined;
|
|
118
118
|
responseHeaders?: Headers | undefined;
|
|
119
119
|
}>;
|
|
@@ -9,13 +9,14 @@ import { StandardSchemaV1 as StandardSchemaV1$1 } from "@standard-schema/spec";
|
|
|
9
9
|
import { Database } from "bun:sqlite";
|
|
10
10
|
import { DatabaseSync } from "node:sqlite";
|
|
11
11
|
|
|
12
|
-
//#region ../core/dist/index-
|
|
12
|
+
//#region ../core/dist/index-CNtOUpmF.d.mts
|
|
13
13
|
|
|
14
14
|
type LogLevel = "info" | "success" | "warn" | "error" | "debug";
|
|
15
15
|
interface Logger {
|
|
16
16
|
disabled?: boolean | undefined;
|
|
17
17
|
disableColors?: boolean | undefined;
|
|
18
18
|
level?: Exclude<LogLevel, "success"> | undefined;
|
|
19
|
+
tag?: string | undefined;
|
|
19
20
|
log?: ((level: Exclude<LogLevel, "success">, message: string, ...args: any[]) => void) | undefined;
|
|
20
21
|
}
|
|
21
22
|
type LogHandlerParams = Parameters<NonNullable<Logger["log"]>> extends [LogLevel, ...infer Rest] ? Rest : never;
|
|
@@ -24,7 +25,7 @@ type InternalLogger = { [K in LogLevel]: (...params: LogHandlerParams) => void }
|
|
|
24
25
|
};
|
|
25
26
|
declare const createLogger: (options?: Logger | undefined) => InternalLogger;
|
|
26
27
|
//#endregion
|
|
27
|
-
//#region ../core/dist/index-
|
|
28
|
+
//#region ../core/dist/index-Df0KhQRf.d.mts
|
|
28
29
|
//#region src/db/type.d.ts
|
|
29
30
|
type DBPreservedModels = "user" | "account" | "session" | "verification" | "rate-limit" | "organization" | "member" | "invitation" | "jwks" | "passkey" | "two-factor";
|
|
30
31
|
type DBFieldType = "string" | "number" | "boolean" | "date" | "json" | `${"string" | "number"}[]` | Array<LiteralString>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { t as Awaitable } from "./helper-
|
|
2
|
-
import { On as index_d_exports, g as User, h as Session } from "./index-
|
|
3
|
-
import { t as InferOptionSchema } from "./plugins-
|
|
4
|
-
import * as
|
|
1
|
+
import { t as Awaitable } from "./helper-BgOIGHsu.mjs";
|
|
2
|
+
import { On as index_d_exports, g as User, h as Session } from "./index-BNhJglHC.mjs";
|
|
3
|
+
import { t as InferOptionSchema } from "./plugins-Dy_FrD4Y.mjs";
|
|
4
|
+
import * as _gatwech_core48 from "@gatwech/core";
|
|
5
5
|
import { GenericEndpointContext } from "@gatwech/core";
|
|
6
|
-
import * as
|
|
6
|
+
import * as better_call114 from "better-call";
|
|
7
7
|
import * as z$1 from "zod";
|
|
8
8
|
import * as jose0 from "jose";
|
|
9
9
|
import { JSONWebKeySet, JWTPayload } from "jose";
|
|
@@ -250,7 +250,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
250
250
|
} & {
|
|
251
251
|
asResponse?: boolean;
|
|
252
252
|
returnHeaders?: boolean;
|
|
253
|
-
use?:
|
|
253
|
+
use?: better_call114.Middleware[];
|
|
254
254
|
path?: string;
|
|
255
255
|
} & {
|
|
256
256
|
asResponse?: AsResponse | undefined;
|
|
@@ -355,7 +355,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
355
355
|
} & {
|
|
356
356
|
asResponse?: boolean;
|
|
357
357
|
returnHeaders?: boolean;
|
|
358
|
-
use?:
|
|
358
|
+
use?: better_call114.Middleware[];
|
|
359
359
|
path?: string;
|
|
360
360
|
} & {
|
|
361
361
|
asResponse?: AsResponse | undefined;
|
|
@@ -371,7 +371,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
371
371
|
options: {
|
|
372
372
|
method: "GET";
|
|
373
373
|
requireHeaders: true;
|
|
374
|
-
use: ((inputContext:
|
|
374
|
+
use: ((inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<{
|
|
375
375
|
session: {
|
|
376
376
|
session: Record<string, any> & {
|
|
377
377
|
id: string;
|
|
@@ -440,7 +440,7 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
440
440
|
} & {
|
|
441
441
|
asResponse?: boolean;
|
|
442
442
|
returnHeaders?: boolean;
|
|
443
|
-
use?:
|
|
443
|
+
use?: better_call114.Middleware[];
|
|
444
444
|
path?: string;
|
|
445
445
|
} & {
|
|
446
446
|
asResponse?: AsResponse | undefined;
|
|
@@ -476,8 +476,8 @@ declare const jwt: (options?: JwtOptions | undefined) => {
|
|
|
476
476
|
};
|
|
477
477
|
hooks: {
|
|
478
478
|
after: {
|
|
479
|
-
matcher(context:
|
|
480
|
-
handler: (inputContext:
|
|
479
|
+
matcher(context: _gatwech_core48.HookEndpointContext): boolean;
|
|
480
|
+
handler: (inputContext: better_call114.MiddlewareInputContext<better_call114.MiddlewareOptions>) => Promise<void>;
|
|
481
481
|
}[];
|
|
482
482
|
};
|
|
483
483
|
schema: {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _gatwech_core11 from "@gatwech/core";
|
|
2
2
|
|
|
3
3
|
//#region src/plugins/haveibeenpwned/index.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns how many times a password appears in known breaches, using the
|
|
7
|
+
* k-anonymity range API: only the first 5 characters of the password's SHA-1
|
|
8
|
+
* hash are sent. Throws if the API can't be reached.
|
|
9
|
+
*/
|
|
10
|
+
declare function getPasswordBreachCount(password: string): Promise<number>;
|
|
4
11
|
interface HaveIBeenPwnedOptions {
|
|
5
12
|
customPasswordCompromisedMessage?: string | undefined;
|
|
6
13
|
}
|
|
7
14
|
declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
8
15
|
id: "haveIBeenPwned";
|
|
9
|
-
init(ctx:
|
|
16
|
+
init(ctx: _gatwech_core11.AuthContext<_gatwech_core11.PayvoAuthOptions>): {
|
|
10
17
|
context: {
|
|
11
18
|
password: {
|
|
12
19
|
hash(password: string): Promise<string>;
|
|
@@ -18,7 +25,7 @@ declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
|
18
25
|
minPasswordLength: number;
|
|
19
26
|
maxPasswordLength: number;
|
|
20
27
|
};
|
|
21
|
-
checkPassword: (userId: string, ctx:
|
|
28
|
+
checkPassword: (userId: string, ctx: _gatwech_core11.GenericEndpointContext<_gatwech_core11.PayvoAuthOptions>) => Promise<boolean>;
|
|
22
29
|
};
|
|
23
30
|
};
|
|
24
31
|
};
|
|
@@ -27,4 +34,4 @@ declare const haveIBeenPwned: (options?: HaveIBeenPwnedOptions | undefined) => {
|
|
|
27
34
|
};
|
|
28
35
|
};
|
|
29
36
|
//#endregion
|
|
30
|
-
export {
|
|
37
|
+
export { getPasswordBreachCount as n, haveIBeenPwned as r, HaveIBeenPwnedOptions as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as Session, s as User } from "./index-
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { o as Session, s as User } from "./index-Df0KhQRf-BEa5tdwJ.mjs";
|
|
2
|
+
import * as _gatwech_core30 from "@gatwech/core";
|
|
3
|
+
import * as better_call83 from "better-call";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/plugins/multi-session/index.d.ts
|
|
@@ -46,7 +46,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
46
46
|
} & {
|
|
47
47
|
asResponse?: boolean;
|
|
48
48
|
returnHeaders?: boolean;
|
|
49
|
-
use?:
|
|
49
|
+
use?: better_call83.Middleware[];
|
|
50
50
|
path?: string;
|
|
51
51
|
} & {
|
|
52
52
|
asResponse?: AsResponse | undefined;
|
|
@@ -102,7 +102,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
102
102
|
} & {
|
|
103
103
|
asResponse?: boolean;
|
|
104
104
|
returnHeaders?: boolean;
|
|
105
|
-
use?:
|
|
105
|
+
use?: better_call83.Middleware[];
|
|
106
106
|
path?: string;
|
|
107
107
|
} & {
|
|
108
108
|
asResponse?: AsResponse | undefined;
|
|
@@ -123,7 +123,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
123
123
|
sessionToken: z$1.ZodString;
|
|
124
124
|
}, z$1.core.$strip>;
|
|
125
125
|
requireHeaders: true;
|
|
126
|
-
use: ((inputContext:
|
|
126
|
+
use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
|
|
127
127
|
session: {
|
|
128
128
|
session: Record<string, any> & {
|
|
129
129
|
id: string;
|
|
@@ -206,7 +206,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
206
206
|
} & {
|
|
207
207
|
asResponse?: boolean;
|
|
208
208
|
returnHeaders?: boolean;
|
|
209
|
-
use?:
|
|
209
|
+
use?: better_call83.Middleware[];
|
|
210
210
|
path?: string;
|
|
211
211
|
} & {
|
|
212
212
|
asResponse?: AsResponse | undefined;
|
|
@@ -225,7 +225,7 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
225
225
|
sessionToken: z$1.ZodString;
|
|
226
226
|
}, z$1.core.$strip>;
|
|
227
227
|
requireHeaders: true;
|
|
228
|
-
use: ((inputContext:
|
|
228
|
+
use: ((inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<{
|
|
229
229
|
session: {
|
|
230
230
|
session: Record<string, any> & {
|
|
231
231
|
id: string;
|
|
@@ -278,8 +278,8 @@ declare const multiSession: (options?: MultiSessionConfig | undefined) => {
|
|
|
278
278
|
};
|
|
279
279
|
hooks: {
|
|
280
280
|
after: {
|
|
281
|
-
matcher: (context:
|
|
282
|
-
handler: (inputContext:
|
|
281
|
+
matcher: (context: _gatwech_core30.HookEndpointContext) => boolean;
|
|
282
|
+
handler: (inputContext: better_call83.MiddlewareInputContext<better_call83.MiddlewareOptions>) => Promise<void>;
|
|
283
283
|
}[];
|
|
284
284
|
};
|
|
285
285
|
$ERROR_CODES: {
|