@gatwech/auth 1.0.0-beta.19 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/drizzle-adapter/index.mjs +11 -2
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.mjs +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.mjs +2 -2
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.mjs +1 -1
- package/dist/{audit-log-DKsUWR8O.mjs → audit-log-DgqHJ-uv.mjs} +132 -63
- package/dist/{auth-vfCyIIeV.mjs → auth-BoEA9bN7.mjs} +14 -1
- package/dist/client/index.d.mts +18 -18
- package/dist/client/plugins/index.d.mts +28 -28
- package/dist/client/plugins/index.mjs +2 -2
- package/dist/client/react/index.d.mts +16 -16
- package/dist/{client-CSOs1YN7.d.mts → client-B00gkznv.d.mts} +1 -1
- package/dist/{client-4QEb0rUr.mjs → client-CMsC6-rl.mjs} +1 -1
- package/dist/{client-DZHNfxuR.d.mts → client-Da7tq8m6.d.mts} +4 -4
- package/dist/cookies/index.d.mts +3 -3
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{db-7vHnL1XA.mjs → db-CV59HpEF.mjs} +2 -2
- package/dist/{index-mxEUX2Gs.d.mts → index-BECNG13R.d.mts} +13 -13
- package/dist/{index-DRM35ir1.d.mts → index-BKy-8t2n.d.mts} +118 -65
- package/dist/{index-Df0KhQRf-BEa5tdwJ.d.mts → index-BL_t8cRp-C4QYBsac.d.mts} +56 -17
- package/dist/{index-DXVU0HGr.d.mts → index-BWYXZVsV.d.mts} +5 -5
- package/dist/{index-Df4SvZaE.d.mts → index-Bhc37y9F.d.mts} +3 -3
- package/dist/{index-BNhJglHC.d.mts → index-BjCQ3jmE.d.mts} +119 -119
- package/dist/{index-Cv9iMevV.d.mts → index-Bxive_YT.d.mts} +9 -9
- package/dist/{index-CgeC2eGC.d.mts → index-C-IDh5yy.d.mts} +2 -2
- package/dist/{index-COGe8UJx.d.mts → index-CM1rFdwV.d.mts} +9 -9
- package/dist/{index-zBdYQGaS.d.mts → index-CMG4Pnen.d.mts} +6 -6
- package/dist/{index-Blmhq6eA.d.mts → index-CTqynuxm.d.mts} +4 -4
- package/dist/{index-DS-R7st3.d.mts → index-CbBQdS-u.d.mts} +6 -6
- package/dist/{index-Db8jqUq2.d.mts → index-CpH-1sse.d.mts} +10 -10
- package/dist/{index-CUknVRZp.d.mts → index-D1OZ2e4m.d.mts} +14 -14
- package/dist/{index-CaqpCfE5.d.mts → index-Dt2I0G4X.d.mts} +7 -7
- package/dist/{index-EABwA_BH.d.mts → index-IX1to9TB.d.mts} +34 -34
- package/dist/{index-CKnPAS5n.d.mts → index-TrOnY3pM.d.mts} +170 -170
- package/dist/{index-CsxtcAO0.d.mts → index-VUyESU4p.d.mts} +1 -1
- package/dist/{index-CP3FNbOZ.d.mts → index-WV7VzW2H.d.mts} +8 -8
- package/dist/{index-xoYsoOiR.d.mts → index-YeXSxzhX.d.mts} +3 -3
- package/dist/{index-DG-X1PK5.d.mts → index-cPt-00xm.d.mts} +6 -6
- package/dist/{index-BNDRYfTF.d.mts → index-iRoaTsOj.d.mts} +2 -2
- package/dist/{index-BAVzFqII.d.mts → index-jEkJ2Zfk.d.mts} +6 -6
- package/dist/{index-DyH_CgmX.d.mts → index-oNlp4SvD.d.mts} +10 -10
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/integrations/next-js.d.mts +4 -4
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/react-start.d.mts +4 -4
- package/dist/{kysely-adapter-Bkm1liPW.mjs → kysely-adapter-BidlNTiV.mjs} +4 -2
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.mjs +1 -1
- package/dist/{organization-CkTKs7bx.mjs → organization-D4QMpChF.mjs} +1 -1
- package/dist/plugins/admin/index.d.mts +3 -3
- package/dist/plugins/admin/index.mjs +1 -1
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.mjs +1 -1
- package/dist/plugins/audit-log/client.d.mts +24 -24
- package/dist/plugins/audit-log/index.d.mts +23 -23
- package/dist/plugins/audit-log/index.mjs +2 -2
- package/dist/plugins/bearer/index.d.mts +1 -1
- package/dist/plugins/captcha/index.d.mts +1 -1
- package/dist/plugins/custom-session/index.d.mts +3 -3
- package/dist/plugins/custom-session/index.mjs +1 -1
- package/dist/plugins/device-authorization/index.d.mts +1 -1
- package/dist/plugins/device-authorization/index.mjs +1 -1
- package/dist/plugins/email-otp/index.d.mts +2 -2
- package/dist/plugins/email-otp/index.mjs +1 -1
- package/dist/plugins/generic-oauth/index.d.mts +3 -3
- package/dist/plugins/generic-oauth/index.mjs +1 -1
- package/dist/plugins/haveibeenpwned/index.d.mts +1 -1
- package/dist/plugins/haveibeenpwned/index.mjs +1 -1
- package/dist/plugins/index.d.mts +23 -23
- package/dist/plugins/index.mjs +5 -5
- package/dist/plugins/jwt/index.d.mts +3 -3
- package/dist/plugins/jwt/index.mjs +1 -1
- package/dist/plugins/magic-link/index.d.mts +1 -1
- package/dist/plugins/magic-link/index.mjs +1 -1
- package/dist/plugins/multi-session/index.d.mts +2 -2
- package/dist/plugins/multi-session/index.mjs +1 -1
- package/dist/plugins/oauth-proxy/index.d.mts +1 -1
- package/dist/plugins/oauth-proxy/index.mjs +1 -1
- package/dist/plugins/one-tap/index.d.mts +1 -1
- package/dist/plugins/one-tap/index.mjs +1 -1
- package/dist/plugins/one-time-token/index.d.mts +3 -3
- package/dist/plugins/one-time-token/index.mjs +5 -5
- package/dist/plugins/organization/index.d.mts +3 -3
- package/dist/plugins/organization/index.mjs +2 -2
- package/dist/plugins/passkey/index.d.mts +3 -3
- package/dist/plugins/passkey/index.mjs +1 -1
- package/dist/plugins/phone-number/index.d.mts +3 -3
- package/dist/plugins/phone-number/index.mjs +1 -1
- package/dist/plugins/sentinel/client.d.mts +24 -24
- package/dist/plugins/sentinel/client.mjs +2 -2
- package/dist/plugins/sentinel/index.d.mts +23 -23
- package/dist/plugins/sentinel/index.mjs +3 -3
- package/dist/plugins/two-factor/index.d.mts +3 -3
- package/dist/plugins/two-factor/index.mjs +1 -1
- package/dist/plugins/username/index.d.mts +1 -1
- package/dist/plugins/username/index.mjs +1 -1
- package/dist/{pow-OK01yPG3.mjs → pow-DvkUopsK.mjs} +17 -1
- package/dist/{sentinel-C-D1IHJo.mjs → sentinel-B4Wo79HK.mjs} +326 -92
- package/dist/src/adapters/memory-adapter/memory-adapter.d.ts +1 -1
- package/dist/src/adapters/prisma-adapter/test/auth.d.ts +1 -1
- package/dist/src/adapters/tests/auth-flow.d.ts +3 -3
- package/dist/src/adapters/tests/normal.d.ts +10 -2
- package/dist/src/adapters/tests/number-id.d.ts +4 -4
- package/dist/src/adapters/tests/performance.d.ts +3 -3
- package/dist/src/adapters/tests/transactions.d.ts +3 -3
- package/dist/src/api/index.d.ts +8 -8
- package/dist/src/plugins/admin/admin.d.ts +2 -2
- package/dist/src/plugins/api-key/index.d.ts +2 -2
- package/dist/src/plugins/audit-log/index.d.ts +5 -14
- package/dist/src/plugins/audit-log/remote.d.ts +4 -4
- package/dist/src/plugins/audit-log/types.d.ts +22 -0
- package/dist/src/plugins/email-otp/index.d.ts +1 -1
- package/dist/src/plugins/multi-session/index.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-access-control.d.ts +8 -8
- package/dist/src/plugins/organization/routes/crud-invites.d.ts +46 -46
- package/dist/src/plugins/organization/routes/crud-members.d.ts +40 -40
- package/dist/src/plugins/organization/routes/crud-org.d.ts +36 -36
- package/dist/src/plugins/organization/routes/crud-team.d.ts +50 -50
- package/dist/src/plugins/sentinel/email.d.ts +9 -3
- package/dist/src/plugins/sentinel/index.d.ts +10 -1
- package/dist/src/plugins/sentinel/intel.d.ts +8 -1
- package/dist/src/plugins/sentinel/memory-cache.d.ts +12 -0
- package/dist/src/plugins/sentinel/schema.d.ts +4 -0
- package/dist/src/plugins/sentinel/store.d.ts +7 -0
- package/dist/src/plugins/sentinel/types.d.ts +29 -1
- package/dist/src/test-utils/test-instance.d.ts +25 -25
- package/dist/test-utils/index.d.mts +293 -293
- package/dist/test-utils/index.mjs +7 -7
- package/dist/types/index.d.mts +2 -2
- package/package.json +3 -3
|
@@ -17,12 +17,12 @@ export declare const createOrganization: <O extends OrganizationOptions>(options
|
|
|
17
17
|
roles: typeof import("..").defaultRoles & {
|
|
18
18
|
[key: string]: import("../../access").Role<{}>;
|
|
19
19
|
};
|
|
20
|
-
getSession: (context: import("packages/core/dist/index-
|
|
21
|
-
session: import("packages/core/dist/index-
|
|
20
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
21
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
22
22
|
activeTeamId?: string | undefined;
|
|
23
23
|
activeOrganizationId?: string | undefined;
|
|
24
24
|
};
|
|
25
|
-
user: import("packages/core/dist/index-
|
|
25
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
26
26
|
}>;
|
|
27
27
|
}>)[];
|
|
28
28
|
metadata: {
|
|
@@ -71,12 +71,12 @@ export declare const createOrganization: <O extends OrganizationOptions>(options
|
|
|
71
71
|
roles: typeof import("..").defaultRoles & {
|
|
72
72
|
[key: string]: import("../../access").Role<{}>;
|
|
73
73
|
};
|
|
74
|
-
getSession: (context: import("packages/core/dist/index-
|
|
75
|
-
session: import("packages/core/dist/index-
|
|
74
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
75
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
76
76
|
activeTeamId?: string | undefined;
|
|
77
77
|
activeOrganizationId?: string | undefined;
|
|
78
78
|
};
|
|
79
|
-
user: import("packages/core/dist/index-
|
|
79
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
80
80
|
}>;
|
|
81
81
|
}>)[];
|
|
82
82
|
metadata: {
|
|
@@ -150,12 +150,12 @@ export declare const createOrganization: <O extends OrganizationOptions>(options
|
|
|
150
150
|
roles: typeof import("..").defaultRoles & {
|
|
151
151
|
[key: string]: import("../../access").Role<{}>;
|
|
152
152
|
};
|
|
153
|
-
getSession: (context: import("packages/core/dist/index-
|
|
154
|
-
session: import("packages/core/dist/index-
|
|
153
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
154
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
155
155
|
activeTeamId?: string | undefined;
|
|
156
156
|
activeOrganizationId?: string | undefined;
|
|
157
157
|
};
|
|
158
|
-
user: import("packages/core/dist/index-
|
|
158
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
159
159
|
}>;
|
|
160
160
|
}>)[];
|
|
161
161
|
metadata: {
|
|
@@ -265,12 +265,12 @@ export declare const createOrganization: <O extends OrganizationOptions>(options
|
|
|
265
265
|
roles: typeof import("..").defaultRoles & {
|
|
266
266
|
[key: string]: import("../../access").Role<{}>;
|
|
267
267
|
};
|
|
268
|
-
getSession: (context: import("packages/core/dist/index-
|
|
269
|
-
session: import("packages/core/dist/index-
|
|
268
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
269
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
270
270
|
activeTeamId?: string | undefined;
|
|
271
271
|
activeOrganizationId?: string | undefined;
|
|
272
272
|
};
|
|
273
|
-
user: import("packages/core/dist/index-
|
|
273
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
274
274
|
}>;
|
|
275
275
|
}>)[];
|
|
276
276
|
metadata: {
|
|
@@ -370,12 +370,12 @@ export declare const checkOrganizationSlug: <O extends OrganizationOptions>(opti
|
|
|
370
370
|
roles: typeof import("..").defaultRoles & {
|
|
371
371
|
[key: string]: import("../../access").Role<{}>;
|
|
372
372
|
};
|
|
373
|
-
getSession: (context: import("packages/core/dist/index-
|
|
374
|
-
session: import("packages/core/dist/index-
|
|
373
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
374
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
375
375
|
activeTeamId?: string | undefined;
|
|
376
376
|
activeOrganizationId?: string | undefined;
|
|
377
377
|
};
|
|
378
|
-
user: import("packages/core/dist/index-
|
|
378
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
379
379
|
}>;
|
|
380
380
|
}>))[];
|
|
381
381
|
} & {
|
|
@@ -451,12 +451,12 @@ export declare const updateOrganization: <O extends OrganizationOptions>(options
|
|
|
451
451
|
roles: typeof import("..").defaultRoles & {
|
|
452
452
|
[key: string]: import("../../access").Role<{}>;
|
|
453
453
|
};
|
|
454
|
-
getSession: (context: import("packages/core/dist/index-
|
|
455
|
-
session: import("packages/core/dist/index-
|
|
454
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
455
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
456
456
|
activeTeamId?: string | undefined;
|
|
457
457
|
activeOrganizationId?: string | undefined;
|
|
458
458
|
};
|
|
459
|
-
user: import("packages/core/dist/index-
|
|
459
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
460
460
|
}>;
|
|
461
461
|
}>)[];
|
|
462
462
|
metadata: {
|
|
@@ -546,12 +546,12 @@ export declare const deleteOrganization: <O extends OrganizationOptions>(options
|
|
|
546
546
|
roles: typeof import("..").defaultRoles & {
|
|
547
547
|
[key: string]: import("../../access").Role<{}>;
|
|
548
548
|
};
|
|
549
|
-
getSession: (context: import("packages/core/dist/index-
|
|
550
|
-
session: import("packages/core/dist/index-
|
|
549
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
550
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
551
551
|
activeTeamId?: string | undefined;
|
|
552
552
|
activeOrganizationId?: string | undefined;
|
|
553
553
|
};
|
|
554
|
-
user: import("packages/core/dist/index-
|
|
554
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
555
555
|
}>;
|
|
556
556
|
}>)[];
|
|
557
557
|
metadata: {
|
|
@@ -869,12 +869,12 @@ export declare const getFullOrganization: <O extends OrganizationOptions>(option
|
|
|
869
869
|
roles: typeof import("..").defaultRoles & {
|
|
870
870
|
[key: string]: import("../../access").Role<{}>;
|
|
871
871
|
};
|
|
872
|
-
getSession: (context: import("packages/core/dist/index-
|
|
873
|
-
session: import("packages/core/dist/index-
|
|
872
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
873
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
874
874
|
activeTeamId?: string | undefined;
|
|
875
875
|
activeOrganizationId?: string | undefined;
|
|
876
876
|
};
|
|
877
|
-
user: import("packages/core/dist/index-
|
|
877
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
878
878
|
}>;
|
|
879
879
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
880
880
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -902,11 +902,11 @@ export declare const getFullOrganization: <O extends OrganizationOptions>(option
|
|
|
902
902
|
}>)[];
|
|
903
903
|
}>) => Promise<{
|
|
904
904
|
session: {
|
|
905
|
-
session: import("packages/core/dist/index-
|
|
905
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
906
906
|
activeTeamId?: string | undefined;
|
|
907
907
|
activeOrganizationId?: string | undefined;
|
|
908
908
|
};
|
|
909
|
-
user: import("packages/core/dist/index-
|
|
909
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
910
910
|
};
|
|
911
911
|
}>))[];
|
|
912
912
|
metadata: {
|
|
@@ -1222,12 +1222,12 @@ export declare const setActiveOrganization: <O extends OrganizationOptions>(opti
|
|
|
1222
1222
|
roles: typeof import("..").defaultRoles & {
|
|
1223
1223
|
[key: string]: import("../../access").Role<{}>;
|
|
1224
1224
|
};
|
|
1225
|
-
getSession: (context: import("packages/core/dist/index-
|
|
1226
|
-
session: import("packages/core/dist/index-
|
|
1225
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
1226
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1227
1227
|
activeTeamId?: string | undefined;
|
|
1228
1228
|
activeOrganizationId?: string | undefined;
|
|
1229
1229
|
};
|
|
1230
|
-
user: import("packages/core/dist/index-
|
|
1230
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1231
1231
|
}>;
|
|
1232
1232
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
1233
1233
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -1255,11 +1255,11 @@ export declare const setActiveOrganization: <O extends OrganizationOptions>(opti
|
|
|
1255
1255
|
}>)[];
|
|
1256
1256
|
}>) => Promise<{
|
|
1257
1257
|
session: {
|
|
1258
|
-
session: import("packages/core/dist/index-
|
|
1258
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1259
1259
|
activeTeamId?: string | undefined;
|
|
1260
1260
|
activeOrganizationId?: string | undefined;
|
|
1261
1261
|
};
|
|
1262
|
-
user: import("packages/core/dist/index-
|
|
1262
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1263
1263
|
};
|
|
1264
1264
|
}>))[];
|
|
1265
1265
|
metadata: {
|
|
@@ -1332,12 +1332,12 @@ export declare const listOrganizations: <O extends OrganizationOptions>(options:
|
|
|
1332
1332
|
roles: typeof import("..").defaultRoles & {
|
|
1333
1333
|
[key: string]: import("../../access").Role<{}>;
|
|
1334
1334
|
};
|
|
1335
|
-
getSession: (context: import("packages/core/dist/index-
|
|
1336
|
-
session: import("packages/core/dist/index-
|
|
1335
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
1336
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1337
1337
|
activeTeamId?: string | undefined;
|
|
1338
1338
|
activeOrganizationId?: string | undefined;
|
|
1339
1339
|
};
|
|
1340
|
-
user: import("packages/core/dist/index-
|
|
1340
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1341
1341
|
}>;
|
|
1342
1342
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
1343
1343
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -1365,11 +1365,11 @@ export declare const listOrganizations: <O extends OrganizationOptions>(options:
|
|
|
1365
1365
|
}>)[];
|
|
1366
1366
|
}>) => Promise<{
|
|
1367
1367
|
session: {
|
|
1368
|
-
session: import("packages/core/dist/index-
|
|
1368
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1369
1369
|
activeTeamId?: string | undefined;
|
|
1370
1370
|
activeOrganizationId?: string | undefined;
|
|
1371
1371
|
};
|
|
1372
|
-
user: import("packages/core/dist/index-
|
|
1372
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1373
1373
|
};
|
|
1374
1374
|
}>))[];
|
|
1375
1375
|
metadata: {
|
|
@@ -15,12 +15,12 @@ export declare const createTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
15
15
|
roles: typeof import("..").defaultRoles & {
|
|
16
16
|
[key: string]: import("../../access").Role<{}>;
|
|
17
17
|
};
|
|
18
|
-
getSession: (context: import("packages/core/dist/index-
|
|
19
|
-
session: import("packages/core/dist/index-
|
|
18
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
19
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
20
20
|
activeTeamId?: string | undefined;
|
|
21
21
|
activeOrganizationId?: string | undefined;
|
|
22
22
|
};
|
|
23
|
-
user: import("packages/core/dist/index-
|
|
23
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
24
24
|
}>;
|
|
25
25
|
}>)[];
|
|
26
26
|
metadata: {
|
|
@@ -84,12 +84,12 @@ export declare const createTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
84
84
|
roles: typeof import("..").defaultRoles & {
|
|
85
85
|
[key: string]: import("../../access").Role<{}>;
|
|
86
86
|
};
|
|
87
|
-
getSession: (context: import("packages/core/dist/index-
|
|
88
|
-
session: import("packages/core/dist/index-
|
|
87
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
88
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
89
89
|
activeTeamId?: string | undefined;
|
|
90
90
|
activeOrganizationId?: string | undefined;
|
|
91
91
|
};
|
|
92
|
-
user: import("packages/core/dist/index-
|
|
92
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
93
93
|
}>;
|
|
94
94
|
}>)[];
|
|
95
95
|
metadata: {
|
|
@@ -174,12 +174,12 @@ export declare const createTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
174
174
|
roles: typeof import("..").defaultRoles & {
|
|
175
175
|
[key: string]: import("../../access").Role<{}>;
|
|
176
176
|
};
|
|
177
|
-
getSession: (context: import("packages/core/dist/index-
|
|
178
|
-
session: import("packages/core/dist/index-
|
|
177
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
178
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
179
179
|
activeTeamId?: string | undefined;
|
|
180
180
|
activeOrganizationId?: string | undefined;
|
|
181
181
|
};
|
|
182
|
-
user: import("packages/core/dist/index-
|
|
182
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
183
183
|
}>;
|
|
184
184
|
}>)[];
|
|
185
185
|
metadata: {
|
|
@@ -280,12 +280,12 @@ export declare const createTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
280
280
|
roles: typeof import("..").defaultRoles & {
|
|
281
281
|
[key: string]: import("../../access").Role<{}>;
|
|
282
282
|
};
|
|
283
|
-
getSession: (context: import("packages/core/dist/index-
|
|
284
|
-
session: import("packages/core/dist/index-
|
|
283
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
284
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
285
285
|
activeTeamId?: string | undefined;
|
|
286
286
|
activeOrganizationId?: string | undefined;
|
|
287
287
|
};
|
|
288
|
-
user: import("packages/core/dist/index-
|
|
288
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
289
289
|
}>;
|
|
290
290
|
}>)[];
|
|
291
291
|
metadata: {
|
|
@@ -384,12 +384,12 @@ export declare const removeTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
384
384
|
roles: typeof import("..").defaultRoles & {
|
|
385
385
|
[key: string]: import("../../access").Role<{}>;
|
|
386
386
|
};
|
|
387
|
-
getSession: (context: import("packages/core/dist/index-
|
|
388
|
-
session: import("packages/core/dist/index-
|
|
387
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
388
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
389
389
|
activeTeamId?: string | undefined;
|
|
390
390
|
activeOrganizationId?: string | undefined;
|
|
391
391
|
};
|
|
392
|
-
user: import("packages/core/dist/index-
|
|
392
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
393
393
|
}>;
|
|
394
394
|
}>)[];
|
|
395
395
|
metadata: {
|
|
@@ -483,12 +483,12 @@ export declare const updateTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
483
483
|
roles: typeof import("..").defaultRoles & {
|
|
484
484
|
[key: string]: import("../../access").Role<{}>;
|
|
485
485
|
};
|
|
486
|
-
getSession: (context: import("packages/core/dist/index-
|
|
487
|
-
session: import("packages/core/dist/index-
|
|
486
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
487
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
488
488
|
activeTeamId?: string | undefined;
|
|
489
489
|
activeOrganizationId?: string | undefined;
|
|
490
490
|
};
|
|
491
|
-
user: import("packages/core/dist/index-
|
|
491
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
492
492
|
}>;
|
|
493
493
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
494
494
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -516,11 +516,11 @@ export declare const updateTeam: <O extends OrganizationOptions>(options: O) =>
|
|
|
516
516
|
}>)[];
|
|
517
517
|
}>) => Promise<{
|
|
518
518
|
session: {
|
|
519
|
-
session: import("packages/core/dist/index-
|
|
519
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
520
520
|
activeTeamId?: string | undefined;
|
|
521
521
|
activeOrganizationId?: string | undefined;
|
|
522
522
|
};
|
|
523
|
-
user: import("packages/core/dist/index-
|
|
523
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
524
524
|
};
|
|
525
525
|
}>))[];
|
|
526
526
|
metadata: {
|
|
@@ -672,12 +672,12 @@ export declare const listOrganizationTeams: <O extends OrganizationOptions>(opti
|
|
|
672
672
|
roles: typeof import("..").defaultRoles & {
|
|
673
673
|
[key: string]: import("../../access").Role<{}>;
|
|
674
674
|
};
|
|
675
|
-
getSession: (context: import("packages/core/dist/index-
|
|
676
|
-
session: import("packages/core/dist/index-
|
|
675
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
676
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
677
677
|
activeTeamId?: string | undefined;
|
|
678
678
|
activeOrganizationId?: string | undefined;
|
|
679
679
|
};
|
|
680
|
-
user: import("packages/core/dist/index-
|
|
680
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
681
681
|
}>;
|
|
682
682
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
683
683
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -705,11 +705,11 @@ export declare const listOrganizationTeams: <O extends OrganizationOptions>(opti
|
|
|
705
705
|
}>)[];
|
|
706
706
|
}>) => Promise<{
|
|
707
707
|
session: {
|
|
708
|
-
session: import("packages/core/dist/index-
|
|
708
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
709
709
|
activeTeamId?: string | undefined;
|
|
710
710
|
activeOrganizationId?: string | undefined;
|
|
711
711
|
};
|
|
712
|
-
user: import("packages/core/dist/index-
|
|
712
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
713
713
|
};
|
|
714
714
|
}>))[];
|
|
715
715
|
} & {
|
|
@@ -766,12 +766,12 @@ export declare const setActiveTeam: <O extends OrganizationOptions>(options: O)
|
|
|
766
766
|
roles: typeof import("..").defaultRoles & {
|
|
767
767
|
[key: string]: import("../../access").Role<{}>;
|
|
768
768
|
};
|
|
769
|
-
getSession: (context: import("packages/core/dist/index-
|
|
770
|
-
session: import("packages/core/dist/index-
|
|
769
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
770
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
771
771
|
activeTeamId?: string | undefined;
|
|
772
772
|
activeOrganizationId?: string | undefined;
|
|
773
773
|
};
|
|
774
|
-
user: import("packages/core/dist/index-
|
|
774
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
775
775
|
}>;
|
|
776
776
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
777
777
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -799,11 +799,11 @@ export declare const setActiveTeam: <O extends OrganizationOptions>(options: O)
|
|
|
799
799
|
}>)[];
|
|
800
800
|
}>) => Promise<{
|
|
801
801
|
session: {
|
|
802
|
-
session: import("packages/core/dist/index-
|
|
802
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
803
803
|
activeTeamId?: string | undefined;
|
|
804
804
|
activeOrganizationId?: string | undefined;
|
|
805
805
|
};
|
|
806
|
-
user: import("packages/core/dist/index-
|
|
806
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
807
807
|
};
|
|
808
808
|
}>))[];
|
|
809
809
|
metadata: {
|
|
@@ -897,12 +897,12 @@ export declare const listUserTeams: <O extends OrganizationOptions>(options: O)
|
|
|
897
897
|
roles: typeof import("..").defaultRoles & {
|
|
898
898
|
[key: string]: import("../../access").Role<{}>;
|
|
899
899
|
};
|
|
900
|
-
getSession: (context: import("packages/core/dist/index-
|
|
901
|
-
session: import("packages/core/dist/index-
|
|
900
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
901
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
902
902
|
activeTeamId?: string | undefined;
|
|
903
903
|
activeOrganizationId?: string | undefined;
|
|
904
904
|
};
|
|
905
|
-
user: import("packages/core/dist/index-
|
|
905
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
906
906
|
}>;
|
|
907
907
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
908
908
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -930,11 +930,11 @@ export declare const listUserTeams: <O extends OrganizationOptions>(options: O)
|
|
|
930
930
|
}>)[];
|
|
931
931
|
}>) => Promise<{
|
|
932
932
|
session: {
|
|
933
|
-
session: import("packages/core/dist/index-
|
|
933
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
934
934
|
activeTeamId?: string | undefined;
|
|
935
935
|
activeOrganizationId?: string | undefined;
|
|
936
936
|
};
|
|
937
|
-
user: import("packages/core/dist/index-
|
|
937
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
938
938
|
};
|
|
939
939
|
}>))[];
|
|
940
940
|
} & {
|
|
@@ -1031,12 +1031,12 @@ export declare const listTeamMembers: <O extends OrganizationOptions>(options: O
|
|
|
1031
1031
|
roles: typeof import("..").defaultRoles & {
|
|
1032
1032
|
[key: string]: import("../../access").Role<{}>;
|
|
1033
1033
|
};
|
|
1034
|
-
getSession: (context: import("packages/core/dist/index-
|
|
1035
|
-
session: import("packages/core/dist/index-
|
|
1034
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
1035
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1036
1036
|
activeTeamId?: string | undefined;
|
|
1037
1037
|
activeOrganizationId?: string | undefined;
|
|
1038
1038
|
};
|
|
1039
|
-
user: import("packages/core/dist/index-
|
|
1039
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1040
1040
|
}>;
|
|
1041
1041
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
1042
1042
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -1064,11 +1064,11 @@ export declare const listTeamMembers: <O extends OrganizationOptions>(options: O
|
|
|
1064
1064
|
}>)[];
|
|
1065
1065
|
}>) => Promise<{
|
|
1066
1066
|
session: {
|
|
1067
|
-
session: import("packages/core/dist/index-
|
|
1067
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1068
1068
|
activeTeamId?: string | undefined;
|
|
1069
1069
|
activeOrganizationId?: string | undefined;
|
|
1070
1070
|
};
|
|
1071
|
-
user: import("packages/core/dist/index-
|
|
1071
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1072
1072
|
};
|
|
1073
1073
|
}>))[];
|
|
1074
1074
|
} & {
|
|
@@ -1163,12 +1163,12 @@ export declare const addTeamMember: <O extends OrganizationOptions>(options: O)
|
|
|
1163
1163
|
roles: typeof import("..").defaultRoles & {
|
|
1164
1164
|
[key: string]: import("../../access").Role<{}>;
|
|
1165
1165
|
};
|
|
1166
|
-
getSession: (context: import("packages/core/dist/index-
|
|
1167
|
-
session: import("packages/core/dist/index-
|
|
1166
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
1167
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1168
1168
|
activeTeamId?: string | undefined;
|
|
1169
1169
|
activeOrganizationId?: string | undefined;
|
|
1170
1170
|
};
|
|
1171
|
-
user: import("packages/core/dist/index-
|
|
1171
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1172
1172
|
}>;
|
|
1173
1173
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
1174
1174
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -1196,11 +1196,11 @@ export declare const addTeamMember: <O extends OrganizationOptions>(options: O)
|
|
|
1196
1196
|
}>)[];
|
|
1197
1197
|
}>) => Promise<{
|
|
1198
1198
|
session: {
|
|
1199
|
-
session: import("packages/core/dist/index-
|
|
1199
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1200
1200
|
activeTeamId?: string | undefined;
|
|
1201
1201
|
activeOrganizationId?: string | undefined;
|
|
1202
1202
|
};
|
|
1203
|
-
user: import("packages/core/dist/index-
|
|
1203
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1204
1204
|
};
|
|
1205
1205
|
}>))[];
|
|
1206
1206
|
} & {
|
|
@@ -1276,12 +1276,12 @@ export declare const removeTeamMember: <O extends OrganizationOptions>(options:
|
|
|
1276
1276
|
roles: typeof import("..").defaultRoles & {
|
|
1277
1277
|
[key: string]: import("../../access").Role<{}>;
|
|
1278
1278
|
};
|
|
1279
|
-
getSession: (context: import("packages/core/dist/index-
|
|
1280
|
-
session: import("packages/core/dist/index-
|
|
1279
|
+
getSession: (context: import("packages/core/dist/index-BL_t8cRp.mjs").f) => Promise<{
|
|
1280
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1281
1281
|
activeTeamId?: string | undefined;
|
|
1282
1282
|
activeOrganizationId?: string | undefined;
|
|
1283
1283
|
};
|
|
1284
|
-
user: import("packages/core/dist/index-
|
|
1284
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1285
1285
|
}>;
|
|
1286
1286
|
}>) | ((inputContext: import("better-call").MiddlewareInputContext<{
|
|
1287
1287
|
use: ((inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
@@ -1309,11 +1309,11 @@ export declare const removeTeamMember: <O extends OrganizationOptions>(options:
|
|
|
1309
1309
|
}>)[];
|
|
1310
1310
|
}>) => Promise<{
|
|
1311
1311
|
session: {
|
|
1312
|
-
session: import("packages/core/dist/index-
|
|
1312
|
+
session: import("packages/core/dist/index-BL_t8cRp.mjs").bt & {
|
|
1313
1313
|
activeTeamId?: string | undefined;
|
|
1314
1314
|
activeOrganizationId?: string | undefined;
|
|
1315
1315
|
};
|
|
1316
|
-
user: import("packages/core/dist/index-
|
|
1316
|
+
user: import("packages/core/dist/index-BL_t8cRp.mjs")._t;
|
|
1317
1317
|
};
|
|
1318
1318
|
}>))[];
|
|
1319
1319
|
} & {
|
|
@@ -11,10 +11,16 @@ export declare function getEmailDomain(email: string): string;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function isDisposableDomain(domain: string): Promise<boolean>;
|
|
13
13
|
/**
|
|
14
|
-
* Whether a domain
|
|
15
|
-
*
|
|
14
|
+
* Whether a domain can receive mail: it has an MX record, or an address
|
|
15
|
+
* record to fall back to when it has none. A null MX record, which marks a
|
|
16
|
+
* domain that accepts no mail, doesn't count.
|
|
17
|
+
*
|
|
18
|
+
* Returns null when that can't be told: runtimes without DNS access, lookup
|
|
19
|
+
* failures, or a lookup that takes longer than `timeoutMs`.
|
|
16
20
|
*/
|
|
17
|
-
export declare function hasMxRecords(domain: string
|
|
21
|
+
export declare function hasMxRecords(domain: string, options?: {
|
|
22
|
+
timeoutMs?: number | undefined;
|
|
23
|
+
}): Promise<boolean | null>;
|
|
18
24
|
/**
|
|
19
25
|
* Heuristics for addresses that look generated rather than chosen by a
|
|
20
26
|
* person
|
|
@@ -187,6 +187,10 @@ export declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
187
187
|
type: "string";
|
|
188
188
|
required: true;
|
|
189
189
|
};
|
|
190
|
+
path: {
|
|
191
|
+
type: "string";
|
|
192
|
+
required: false;
|
|
193
|
+
};
|
|
190
194
|
ipAddress: {
|
|
191
195
|
type: "string";
|
|
192
196
|
required: false;
|
|
@@ -251,7 +255,9 @@ export declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
251
255
|
credentialStuffing?: {
|
|
252
256
|
enabled: boolean;
|
|
253
257
|
action?: SecurityAction | undefined;
|
|
254
|
-
thresholds
|
|
258
|
+
thresholds
|
|
259
|
+
/** Checked with the identification service, rather than taken as sent */
|
|
260
|
+
? /** Checked with the identification service, rather than taken as sent */: {
|
|
255
261
|
challenge: number;
|
|
256
262
|
block: number;
|
|
257
263
|
} | undefined;
|
|
@@ -279,6 +285,9 @@ export declare const sentinel: (options?: SentinelOptions | undefined) => {
|
|
|
279
285
|
maxAccountsPerVisitor?: number | undefined;
|
|
280
286
|
retentionSeconds?: number | undefined;
|
|
281
287
|
action?: SecurityAction | undefined;
|
|
288
|
+
maxAccountsPerIp?: number | undefined;
|
|
289
|
+
ipWindowSeconds?: number | undefined;
|
|
290
|
+
requireVerifiedVisitor?: boolean | undefined;
|
|
282
291
|
} | undefined;
|
|
283
292
|
botBlocking?: (boolean | {
|
|
284
293
|
action: SecurityAction;
|
|
@@ -12,7 +12,8 @@ type RequestIntel = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Asks the hosted backend about a request's IP address and client. Verdicts
|
|
15
|
-
* are cached
|
|
15
|
+
* are cached for as long as the backend allows, in secondary storage or, when
|
|
16
|
+
* there is none, in memory.
|
|
16
17
|
* Returns null verdicts when the backend isn't configured or can't answer.
|
|
17
18
|
*/
|
|
18
19
|
export declare function createIntelClient(options: SentinelOptions): {
|
|
@@ -29,11 +30,17 @@ export declare function createIntelClient(options: SentinelOptions): {
|
|
|
29
30
|
* Returns the canonical visitor id (or the one sent, when no
|
|
30
31
|
* identification service is configured), null when it isn't genuine, or
|
|
31
32
|
* undefined when the check failed.
|
|
33
|
+
*
|
|
34
|
+
* `limit` is asked before each call to the service, and told about each
|
|
35
|
+
* id it rejects, so one address can't force a call per request.
|
|
32
36
|
*/
|
|
33
37
|
verifyVisitor(auth: AuthContext, request: {
|
|
34
38
|
visitorId: string;
|
|
35
39
|
ip: string | null;
|
|
36
40
|
userAgent: string | null;
|
|
41
|
+
}, limit?: {
|
|
42
|
+
allowed(): Promise<boolean>;
|
|
43
|
+
rejected(): Promise<void>;
|
|
37
44
|
}): Promise<string | null | undefined>;
|
|
38
45
|
lookup(auth: AuthContext, request: {
|
|
39
46
|
ip: string | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small in-memory cache that forgets entries after a TTL and drops the
|
|
3
|
+
* least recently used one when it's full. Used when there's no secondary
|
|
4
|
+
* storage to share verdicts through.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createMemoryCache<T>(options: {
|
|
7
|
+
maxSize: number;
|
|
8
|
+
ttlMs: number;
|
|
9
|
+
}): {
|
|
10
|
+
get(key: string): T | undefined;
|
|
11
|
+
set(key: string, value: T, ttlMs?: number): void;
|
|
12
|
+
};
|
|
@@ -3,10 +3,17 @@ type StoredChallenge = {
|
|
|
3
3
|
nonce: string;
|
|
4
4
|
difficulty: number;
|
|
5
5
|
reason: string;
|
|
6
|
+
/** The endpoint the challenge was issued for */
|
|
7
|
+
path?: string | null | undefined;
|
|
6
8
|
ipAddress: string | null;
|
|
7
9
|
visitorId: string | null;
|
|
8
10
|
expiresAt: Date;
|
|
9
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Deletes expired counters and challenges from the database, at most every
|
|
14
|
+
* 10 seconds per auth instance. Secondary storage expires them itself.
|
|
15
|
+
*/
|
|
16
|
+
export declare function deleteAllExpiredRows(auth: AuthContext, byPassLastCheckTime?: boolean): Promise<void>;
|
|
10
17
|
/**
|
|
11
18
|
* Counters and challenges, kept in secondary storage when it's configured
|
|
12
19
|
* and in the database otherwise
|