@gatwech/auth 1.0.0-beta.18 → 1.0.0-beta.19
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 +21 -21
- package/dist/client/index.mjs +4 -4
- package/dist/client/plugins/index.d.mts +53 -45
- package/dist/client/plugins/index.mjs +16 -12
- package/dist/client/react/index.d.mts +19 -19
- package/dist/client/react/index.mjs +2 -2
- package/dist/client-4QEb0rUr.mjs +95 -0
- package/dist/client-CSOs1YN7.d.mts +14 -0
- package/dist/client-DZHNfxuR.d.mts +75 -0
- package/dist/client-DzOqXJUm.mjs +15 -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/{client-CNY0tn9g.d.mts → index-BAVzFqII.d.mts} +21 -21
- package/dist/{index-DaBcikv9.d.mts → index-BNDRYfTF.d.mts} +2 -2
- package/dist/{index-Cxi7TbLE.d.mts → index-BNhJglHC.d.mts} +122 -122
- package/dist/{index-BYMI9r_d.d.mts → index-Blmhq6eA.d.mts} +4 -4
- package/dist/{index-BHoQlf7a.d.mts → index-CKnPAS5n.d.mts} +178 -178
- package/dist/{index-34ONrP8l.d.mts → index-COGe8UJx.d.mts} +11 -11
- package/dist/{index-Buhn3hkR.d.mts → index-CP3FNbOZ.d.mts} +8 -8
- package/dist/{index-D_k662QG.d.mts → index-CUknVRZp.d.mts} +14 -14
- package/dist/{index-DKNNV1kb.d.mts → index-CaqpCfE5.d.mts} +8 -8
- package/dist/{index-BBm8nQ9Q.d.mts → index-CgeC2eGC.d.mts} +2 -2
- package/dist/{index-DR0xXno9.d.mts → index-CsxtcAO0.d.mts} +1 -1
- package/dist/{index-CuFzhoS6.d.mts → index-Cv9iMevV.d.mts} +10 -10
- package/dist/{index-C7fQuk-V.d.mts → index-CxlWnL9c.d.mts} +1 -1
- package/dist/{index-zjjNBRY2.d.mts → index-DG-X1PK5.d.mts} +6 -6
- package/dist/index-DRM35ir1.d.mts +3769 -0
- package/dist/{index-BqhKCbPH.d.mts → index-DS-R7st3.d.mts} +6 -6
- package/dist/{index-C-u1h_WX.d.mts → index-DXVU0HGr.d.mts} +5 -5
- package/dist/{index-DoXZYQpq.d.mts → index-Db8jqUq2.d.mts} +10 -10
- package/dist/{index-65G5U5DB-DSdjzreF.d.mts → index-Df0KhQRf-BEa5tdwJ.d.mts} +3 -2
- package/dist/{index-B-XKqFvY.d.mts → index-Df4SvZaE.d.mts} +11 -4
- package/dist/{index-G6V0Z_Mn.d.mts → index-DyH_CgmX.d.mts} +10 -10
- package/dist/{admin-DtfO1PLg.d.mts → index-EABwA_BH.d.mts} +36 -36
- package/dist/{index-z0KSvE5i.d.mts → index-QmocqGM-.d.mts} +1 -1
- package/dist/{index-DlaMq1nb.d.mts → index-mxEUX2Gs.d.mts} +14 -14
- package/dist/{client-BOX93C3d.d.mts → index-xoYsoOiR.d.mts} +52 -52
- package/dist/{index-B3n8e37d.d.mts → index-zBdYQGaS.d.mts} +7 -7
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +16 -15
- 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-C-D1IHJo.mjs +1395 -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 +22 -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 +1048 -1048
- 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
|
@@ -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-Df0KhQRf.mjs").f) => Promise<{
|
|
19
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
88
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
178
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
284
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
388
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
487
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
676
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
770
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
901
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
1035
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
1167
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs").f) => Promise<{
|
|
1280
|
+
session: import("packages/core/dist/index-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.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-Df0KhQRf.mjs")._t;
|
|
1317
1317
|
};
|
|
1318
1318
|
}>))[];
|
|
1319
1319
|
} & {
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AuthContext } from "@gatwech/core";
|
|
2
|
+
import { SECURITY_EVENT_TYPES } from "../audit-log/events";
|
|
3
|
+
import { type EventContext } from "../audit-log/registry";
|
|
4
|
+
import type { SentinelStore } from "./store";
|
|
5
|
+
import type { SecurityAction } from "./types";
|
|
6
|
+
type SecurityEventType = (typeof SECURITY_EVENT_TYPES)[keyof typeof SECURITY_EVENT_TYPES];
|
|
7
|
+
export type Decision = {
|
|
8
|
+
outcome: "allow";
|
|
9
|
+
} | {
|
|
10
|
+
outcome: "block";
|
|
11
|
+
reason: string;
|
|
12
|
+
} | {
|
|
13
|
+
outcome: "challenge";
|
|
14
|
+
reason: string;
|
|
15
|
+
nonce: string;
|
|
16
|
+
difficulty: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Applies a security action: records the event and decides whether the
|
|
20
|
+
* request continues, gets a proof-of-work challenge or is blocked
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeAction(params: {
|
|
23
|
+
auth: AuthContext;
|
|
24
|
+
event: EventContext;
|
|
25
|
+
store: SentinelStore;
|
|
26
|
+
action: SecurityAction;
|
|
27
|
+
eventType: SecurityEventType;
|
|
28
|
+
/** Short machine-readable reason, e.g. `credential_stuffing` */
|
|
29
|
+
reason: string;
|
|
30
|
+
ipAddress: string | null;
|
|
31
|
+
visitorId: string | null;
|
|
32
|
+
userId?: string | null | undefined;
|
|
33
|
+
identifier?: string | null | undefined;
|
|
34
|
+
/** The request carried a valid solution to an earlier challenge */
|
|
35
|
+
challengePassed: boolean;
|
|
36
|
+
difficulty: number;
|
|
37
|
+
metadata?: Record<string, unknown> | undefined;
|
|
38
|
+
}): Promise<Decision>;
|
|
39
|
+
export declare const SENTINEL_ERROR_CODES: {
|
|
40
|
+
readonly POW_CHALLENGE_REQUIRED: "Challenge required";
|
|
41
|
+
readonly SECURITY_BLOCKED: "Request blocked for security reasons";
|
|
42
|
+
};
|
|
43
|
+
/** The error for a decision, or null when the request is allowed */
|
|
44
|
+
export declare function errorForDecision(decision: Decision): ({
|
|
45
|
+
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") | import("better-call").Status;
|
|
46
|
+
body: ({
|
|
47
|
+
message?: string;
|
|
48
|
+
code?: string;
|
|
49
|
+
cause?: unknown;
|
|
50
|
+
} & Record<string, any>) | undefined;
|
|
51
|
+
headers: HeadersInit;
|
|
52
|
+
statusCode: number;
|
|
53
|
+
name: string;
|
|
54
|
+
message: string;
|
|
55
|
+
stack?: string;
|
|
56
|
+
cause?: unknown;
|
|
57
|
+
} & {
|
|
58
|
+
errorStack: string | undefined;
|
|
59
|
+
}) | null;
|
|
60
|
+
/** Throws the error for a decision, for use in endpoint hooks */
|
|
61
|
+
export declare function throwForDecision(decision: Decision): void;
|
|
62
|
+
/** Builds the response for a decision, for use in `onRequest` */
|
|
63
|
+
export declare function responseForDecision(decision: Decision): Response | undefined;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { sentinel } from ".";
|
|
2
|
+
export declare const sentinelClient: (options?: {
|
|
3
|
+
/**
|
|
4
|
+
* Base URL of the hosted identify service. Without it, the fingerprint is
|
|
5
|
+
* sent as the visitor id.
|
|
6
|
+
*/
|
|
7
|
+
identifyUrl?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Identify request options
|
|
10
|
+
*/
|
|
11
|
+
identifyOptions?: {
|
|
12
|
+
/**
|
|
13
|
+
* Request timeout in milliseconds
|
|
14
|
+
*
|
|
15
|
+
* @default 1000
|
|
16
|
+
*/
|
|
17
|
+
timeout?: number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Retries after a failed request, with exponential backoff
|
|
20
|
+
*
|
|
21
|
+
* @default { attempts: 2, baseDelay: 400, maxDelay: 600 }
|
|
22
|
+
*/
|
|
23
|
+
retry?: {
|
|
24
|
+
attempts?: number | undefined;
|
|
25
|
+
baseDelay?: number | undefined;
|
|
26
|
+
maxDelay?: number | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Additional headers, e.g. the publishable key
|
|
30
|
+
*/
|
|
31
|
+
headers?: Record<string, string> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Return a browser fingerprint, e.g. from FingerprintJS. By default a
|
|
35
|
+
* random id is created and kept in `localStorage`.
|
|
36
|
+
*/
|
|
37
|
+
getFingerprint?: (() => string | Promise<string>) | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Solve proof-of-work challenges and retry the request once
|
|
40
|
+
*
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
autoSolveChallenge?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Called when a proof-of-work challenge is received
|
|
46
|
+
*/
|
|
47
|
+
onChallengeReceived?: ((reason: string) => void) | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Called after a challenge is solved
|
|
50
|
+
*/
|
|
51
|
+
onChallengeSolved?: ((solveTimeMs: number) => void) | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Called when solving a challenge fails or its solution is rejected
|
|
54
|
+
*/
|
|
55
|
+
onChallengeFailed?: ((error: Error) => void) | undefined;
|
|
56
|
+
} | undefined) => {
|
|
57
|
+
id: "sentinel";
|
|
58
|
+
$InferServerPlugin: ReturnType<typeof sentinel>;
|
|
59
|
+
fetchPlugins: {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
hooks: {
|
|
63
|
+
onRequest<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>): Promise<import("@better-fetch/fetch").RequestContext<T>>;
|
|
64
|
+
onResponse({ response, request }: import("@better-fetch/fetch").ResponseContext): Promise<Response | undefined>;
|
|
65
|
+
};
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalizes an email address so aliases of the same mailbox match:
|
|
3
|
+
* lowercases it, maps `googlemail.com` to `gmail.com`, removes dots in Gmail
|
|
4
|
+
* addresses and strips plus-address tags on providers that support them
|
|
5
|
+
*/
|
|
6
|
+
export declare function normalizeEmail(email: string): string;
|
|
7
|
+
export declare function getEmailDomain(email: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a domain, or any parent domain, is a known disposable email
|
|
10
|
+
* provider. The list is loaded on first use.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isDisposableDomain(domain: string): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Whether a domain has at least one MX record. Returns null when the lookup
|
|
15
|
+
* isn't possible, e.g. on runtimes without DNS access.
|
|
16
|
+
*/
|
|
17
|
+
export declare function hasMxRecords(domain: string): Promise<boolean | null>;
|
|
18
|
+
/**
|
|
19
|
+
* Heuristics for addresses that look generated rather than chosen by a
|
|
20
|
+
* person
|
|
21
|
+
*/
|
|
22
|
+
export declare function looksGenerated(email: string): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Great-circle distance between two coordinates, in kilometres */
|
|
2
|
+
export declare function haversineDistanceKm(from: {
|
|
3
|
+
latitude: number;
|
|
4
|
+
longitude: number;
|
|
5
|
+
}, to: {
|
|
6
|
+
latitude: number;
|
|
7
|
+
longitude: number;
|
|
8
|
+
}): number;
|
|
9
|
+
/**
|
|
10
|
+
* Speed needed to travel between two sign-ins, in km/h. Distances under
|
|
11
|
+
* 50 km are treated as the same place, since IP geolocation isn't precise
|
|
12
|
+
* enough to tell them apart.
|
|
13
|
+
*/
|
|
14
|
+
export declare function travelSpeedKmh(from: {
|
|
15
|
+
latitude: number;
|
|
16
|
+
longitude: number;
|
|
17
|
+
at: Date;
|
|
18
|
+
}, to: {
|
|
19
|
+
latitude: number;
|
|
20
|
+
longitude: number;
|
|
21
|
+
at: Date;
|
|
22
|
+
}): number;
|