@sharadox/account-web-library 0.1.0-development.3 → 0.1.0-development.30
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 +267 -8
- package/distribution/account-activity/index.d.ts +16 -0
- package/distribution/account-activity/index.d.ts.map +1 -0
- package/distribution/account-activity/index.js +18 -0
- package/distribution/account-activity/index.js.map +1 -0
- package/distribution/account-activity/type.d.ts +15 -0
- package/distribution/account-activity/type.d.ts.map +1 -0
- package/distribution/account-activity/type.js.map +1 -0
- package/distribution/account-ban/index.d.ts +67 -0
- package/distribution/account-ban/index.d.ts.map +1 -0
- package/distribution/account-ban/index.js +233 -0
- package/distribution/account-ban/index.js.map +1 -0
- package/distribution/account-ban/type.d.ts +44 -0
- package/distribution/account-ban/type.d.ts.map +1 -0
- package/distribution/account-ban/type.js +2 -0
- package/distribution/account-ban/type.js.map +1 -0
- package/distribution/account-database/type.d.ts +264 -0
- package/distribution/account-database/type.d.ts.map +1 -0
- package/distribution/account-database/type.js +2 -0
- package/distribution/account-database/type.js.map +1 -0
- package/distribution/account-deletion/index.d.ts +21 -0
- package/distribution/account-deletion/index.d.ts.map +1 -0
- package/distribution/account-deletion/index.js +66 -0
- package/distribution/account-deletion/index.js.map +1 -0
- package/distribution/account-export/index.d.ts +17 -0
- package/distribution/account-export/index.d.ts.map +1 -0
- package/distribution/account-export/index.js +87 -0
- package/distribution/account-export/index.js.map +1 -0
- package/distribution/account-export/type.d.ts +40 -0
- package/distribution/account-export/type.d.ts.map +1 -0
- package/distribution/account-export/type.js +2 -0
- package/distribution/account-export/type.js.map +1 -0
- package/distribution/account-inactivity/index.d.ts +25 -0
- package/distribution/account-inactivity/index.d.ts.map +1 -0
- package/distribution/account-inactivity/index.js +100 -0
- package/distribution/account-inactivity/index.js.map +1 -0
- package/distribution/account-migration/index.d.ts +18 -0
- package/distribution/account-migration/index.d.ts.map +1 -0
- package/distribution/account-migration/index.js +376 -0
- package/distribution/account-migration/index.js.map +1 -0
- package/distribution/account-name/index.d.ts +13 -0
- package/distribution/account-name/index.d.ts.map +1 -0
- package/distribution/account-name/index.js +22 -0
- package/distribution/account-name/index.js.map +1 -0
- package/distribution/account-name/type.d.ts +9 -0
- package/distribution/account-name/type.d.ts.map +1 -0
- package/distribution/account-name/type.js +2 -0
- package/distribution/account-name/type.js.map +1 -0
- package/distribution/account-name-change/index.d.ts +15 -0
- package/distribution/account-name-change/index.d.ts.map +1 -0
- package/distribution/account-name-change/index.js +26 -0
- package/distribution/account-name-change/index.js.map +1 -0
- package/distribution/account-name-change/type.d.ts +7 -0
- package/distribution/account-name-change/type.d.ts.map +1 -0
- package/distribution/account-name-change/type.js +2 -0
- package/distribution/account-name-change/type.js.map +1 -0
- package/distribution/account-notice/index.d.ts +15 -0
- package/distribution/account-notice/index.d.ts.map +1 -0
- package/distribution/account-notice/index.js +41 -0
- package/distribution/account-notice/index.js.map +1 -0
- package/distribution/account-permission/index.d.ts +14 -0
- package/distribution/account-permission/index.d.ts.map +1 -0
- package/distribution/account-permission/index.js +91 -0
- package/distribution/account-permission/index.js.map +1 -0
- package/distribution/account-permission/type.d.ts +12 -0
- package/distribution/account-permission/type.d.ts.map +1 -0
- package/distribution/account-permission/type.js +2 -0
- package/distribution/account-permission/type.js.map +1 -0
- package/distribution/account-picture-change/index.d.ts +30 -0
- package/distribution/account-picture-change/index.d.ts.map +1 -0
- package/distribution/account-picture-change/index.js +70 -0
- package/distribution/account-picture-change/index.js.map +1 -0
- package/distribution/account-picture-change/type.d.ts +11 -0
- package/distribution/account-picture-change/type.d.ts.map +1 -0
- package/distribution/account-picture-change/type.js +2 -0
- package/distribution/account-picture-change/type.js.map +1 -0
- package/distribution/account-server/index.d.ts +25 -0
- package/distribution/account-server/index.d.ts.map +1 -0
- package/distribution/account-server/index.js +34 -0
- package/distribution/account-server/index.js.map +1 -0
- package/distribution/account-server/type.d.ts +30 -0
- package/distribution/account-server/type.d.ts.map +1 -0
- package/distribution/account-server/type.js +2 -0
- package/distribution/account-server/type.js.map +1 -0
- package/distribution/account-session-end/index.d.ts +15 -0
- package/distribution/account-session-end/index.d.ts.map +1 -0
- package/distribution/account-session-end/index.js +21 -0
- package/distribution/account-session-end/index.js.map +1 -0
- package/distribution/account-session-list/index.d.ts +16 -0
- package/distribution/account-session-list/index.d.ts.map +1 -0
- package/distribution/account-session-list/index.js +33 -0
- package/distribution/account-session-list/index.js.map +1 -0
- package/distribution/account-session-list/type.d.ts +13 -0
- package/distribution/account-session-list/type.d.ts.map +1 -0
- package/distribution/account-session-list/type.js +2 -0
- package/distribution/account-session-list/type.js.map +1 -0
- package/distribution/account-session-revocation/index.d.ts +14 -0
- package/distribution/account-session-revocation/index.d.ts.map +1 -0
- package/distribution/account-session-revocation/index.js +25 -0
- package/distribution/account-session-revocation/index.js.map +1 -0
- package/distribution/account-sign-in/index.d.ts +15 -0
- package/distribution/account-sign-in/index.d.ts.map +1 -0
- package/distribution/account-sign-in/index.js +78 -0
- package/distribution/account-sign-in/index.js.map +1 -0
- package/distribution/account-sign-in/type.d.ts +22 -0
- package/distribution/account-sign-in/type.d.ts.map +1 -0
- package/distribution/account-sign-in/type.js +2 -0
- package/distribution/account-sign-in/type.js.map +1 -0
- package/distribution/account-sign-out/index.d.ts +16 -0
- package/distribution/account-sign-out/index.d.ts.map +1 -0
- package/distribution/account-sign-out/index.js +34 -0
- package/distribution/account-sign-out/index.js.map +1 -0
- package/distribution/application-sync/index.d.ts +14 -0
- package/distribution/application-sync/index.d.ts.map +1 -0
- package/distribution/application-sync/index.js +96 -0
- package/distribution/application-sync/index.js.map +1 -0
- package/distribution/application-sync/type.d.ts +29 -0
- package/distribution/application-sync/type.d.ts.map +1 -0
- package/distribution/application-sync/type.js +2 -0
- package/distribution/application-sync/type.js.map +1 -0
- package/distribution/audit-event/index.d.ts +12 -0
- package/distribution/audit-event/index.d.ts.map +1 -0
- package/distribution/audit-event/index.js +36 -0
- package/distribution/audit-event/index.js.map +1 -0
- package/distribution/audit-event/type.d.ts +16 -0
- package/distribution/audit-event/type.d.ts.map +1 -0
- package/distribution/audit-event/type.js +2 -0
- package/distribution/audit-event/type.js.map +1 -0
- package/distribution/banned-contact/index.d.ts +34 -0
- package/distribution/banned-contact/index.d.ts.map +1 -0
- package/distribution/banned-contact/index.js +52 -0
- package/distribution/banned-contact/index.js.map +1 -0
- package/distribution/browser-session-read/index.d.ts +17 -0
- package/distribution/browser-session-read/index.d.ts.map +1 -0
- package/distribution/browser-session-read/index.js +52 -0
- package/distribution/browser-session-read/index.js.map +1 -0
- package/distribution/browser-session-read/type.d.ts +18 -0
- package/distribution/browser-session-read/type.d.ts.map +1 -0
- package/distribution/browser-session-read/type.js +2 -0
- package/distribution/browser-session-read/type.js.map +1 -0
- package/distribution/challenge-issue/index.d.ts +13 -0
- package/distribution/challenge-issue/index.d.ts.map +1 -0
- package/distribution/challenge-issue/index.js +18 -0
- package/distribution/challenge-issue/index.js.map +1 -0
- package/distribution/code-request/index.d.ts +16 -0
- package/distribution/code-request/index.d.ts.map +1 -0
- package/distribution/code-request/index.js +52 -0
- package/distribution/code-request/index.js.map +1 -0
- package/distribution/code-request/type.d.ts +25 -0
- package/distribution/code-request/type.d.ts.map +1 -0
- package/distribution/code-request/type.js +2 -0
- package/distribution/code-request/type.js.map +1 -0
- package/distribution/code-request-prune/index.d.ts +13 -0
- package/distribution/code-request-prune/index.d.ts.map +1 -0
- package/distribution/code-request-prune/index.js +12 -0
- package/distribution/code-request-prune/index.js.map +1 -0
- package/distribution/code-sending/index.d.ts +14 -0
- package/distribution/code-sending/index.d.ts.map +1 -0
- package/distribution/code-sending/index.js +65 -0
- package/distribution/code-sending/index.js.map +1 -0
- package/distribution/code-sending/type.d.ts +31 -0
- package/distribution/code-sending/type.d.ts.map +1 -0
- package/distribution/code-sending/type.js +2 -0
- package/distribution/code-sending/type.js.map +1 -0
- package/distribution/code-verification/index.d.ts +14 -0
- package/distribution/code-verification/index.d.ts.map +1 -0
- package/distribution/code-verification/index.js +43 -0
- package/distribution/code-verification/index.js.map +1 -0
- package/distribution/code-verification/type.d.ts +22 -0
- package/distribution/code-verification/type.d.ts.map +1 -0
- package/distribution/code-verification/type.js +2 -0
- package/distribution/code-verification/type.js.map +1 -0
- package/distribution/contact-addition/index.d.ts +13 -0
- package/distribution/contact-addition/index.d.ts.map +1 -0
- package/distribution/contact-addition/index.js +48 -0
- package/distribution/contact-addition/index.js.map +1 -0
- package/distribution/contact-addition/type.d.ts +15 -0
- package/distribution/contact-addition/type.d.ts.map +1 -0
- package/distribution/contact-addition/type.js +2 -0
- package/distribution/contact-addition/type.js.map +1 -0
- package/distribution/contact-addition-flow/index.d.ts +32 -0
- package/distribution/contact-addition-flow/index.d.ts.map +1 -0
- package/distribution/contact-addition-flow/index.js +96 -0
- package/distribution/contact-addition-flow/index.js.map +1 -0
- package/distribution/contact-addition-flow/type.d.ts +25 -0
- package/distribution/contact-addition-flow/type.d.ts.map +1 -0
- package/distribution/contact-addition-flow/type.js +2 -0
- package/distribution/contact-addition-flow/type.js.map +1 -0
- package/distribution/contact-channel/type.d.ts +44 -0
- package/distribution/contact-channel/type.d.ts.map +1 -0
- package/distribution/contact-channel/type.js +2 -0
- package/distribution/contact-channel/type.js.map +1 -0
- package/distribution/contact-kind/index.d.ts +12 -0
- package/distribution/contact-kind/index.d.ts.map +1 -0
- package/distribution/contact-kind/index.js +18 -0
- package/distribution/contact-kind/index.js.map +1 -0
- package/distribution/contact-kind/type.d.ts +6 -0
- package/distribution/contact-kind/type.d.ts.map +1 -0
- package/distribution/contact-kind/type.js +2 -0
- package/distribution/contact-kind/type.js.map +1 -0
- package/distribution/contact-lookup/index.d.ts +16 -0
- package/distribution/contact-lookup/index.d.ts.map +1 -0
- package/distribution/contact-lookup/index.js +20 -0
- package/distribution/contact-lookup/index.js.map +1 -0
- package/distribution/contact-removal/index.d.ts +19 -0
- package/distribution/contact-removal/index.d.ts.map +1 -0
- package/distribution/contact-removal/index.js +35 -0
- package/distribution/contact-removal/index.js.map +1 -0
- package/distribution/contact-verification/index.d.ts +20 -0
- package/distribution/contact-verification/index.d.ts.map +1 -0
- package/distribution/contact-verification/index.js +37 -0
- package/distribution/contact-verification/index.js.map +1 -0
- package/distribution/database-error/index.d.ts +12 -0
- package/distribution/database-error/index.d.ts.map +1 -0
- package/distribution/database-error/index.js +14 -0
- package/distribution/database-error/index.js.map +1 -0
- package/distribution/email-channel/index.d.ts +13 -0
- package/distribution/email-channel/index.d.ts.map +1 -0
- package/distribution/email-channel/index.js +168 -0
- package/distribution/email-channel/index.js.map +1 -0
- package/distribution/email-channel/type.d.ts +17 -0
- package/distribution/email-channel/type.d.ts.map +1 -0
- package/distribution/email-channel/type.js +2 -0
- package/distribution/email-channel/type.js.map +1 -0
- package/distribution/identifier/index.d.ts +23 -0
- package/distribution/identifier/index.d.ts.map +1 -0
- package/distribution/identifier/index.js +32 -0
- package/distribution/identifier/index.js.map +1 -0
- package/distribution/identifier/type.d.ts +10 -0
- package/distribution/identifier/type.d.ts.map +1 -0
- package/distribution/identifier/type.js +2 -0
- package/distribution/identifier/type.js.map +1 -0
- package/distribution/identifier-availability/index.d.ts +11 -0
- package/distribution/identifier-availability/index.d.ts.map +1 -0
- package/distribution/identifier-availability/index.js +21 -0
- package/distribution/identifier-availability/index.js.map +1 -0
- package/distribution/identifier-change/index.d.ts +15 -0
- package/distribution/identifier-change/index.d.ts.map +1 -0
- package/distribution/identifier-change/index.js +43 -0
- package/distribution/identifier-change/index.js.map +1 -0
- package/distribution/identifier-change/type.d.ts +7 -0
- package/distribution/identifier-change/type.d.ts.map +1 -0
- package/distribution/identifier-change/type.js +2 -0
- package/distribution/identifier-change/type.js.map +1 -0
- package/distribution/memory-picture-storage/index.d.ts +15 -0
- package/distribution/memory-picture-storage/index.d.ts.map +1 -0
- package/distribution/memory-picture-storage/index.js +16 -0
- package/distribution/memory-picture-storage/index.js.map +1 -0
- package/distribution/one-time-code/index.d.ts +2 -2
- package/distribution/one-time-code/index.js +3 -3
- package/distribution/person-account/index.d.ts +18 -0
- package/distribution/person-account/index.d.ts.map +1 -0
- package/distribution/person-account/index.js +65 -0
- package/distribution/person-account/index.js.map +1 -0
- package/distribution/person-account/type.d.ts +22 -0
- package/distribution/person-account/type.d.ts.map +1 -0
- package/distribution/person-account/type.js +2 -0
- package/distribution/person-account/type.js.map +1 -0
- package/distribution/picture-key/index.d.ts +8 -0
- package/distribution/picture-key/index.d.ts.map +1 -0
- package/distribution/picture-key/index.js +10 -0
- package/distribution/picture-key/index.js.map +1 -0
- package/distribution/picture-preparation/index.d.ts +18 -0
- package/distribution/picture-preparation/index.d.ts.map +1 -0
- package/distribution/picture-preparation/index.js +86 -0
- package/distribution/picture-preparation/index.js.map +1 -0
- package/distribution/picture-preparation/type.d.ts +18 -0
- package/distribution/picture-preparation/type.d.ts.map +1 -0
- package/distribution/picture-preparation/type.js +2 -0
- package/distribution/picture-preparation/type.js.map +1 -0
- package/distribution/picture-storage/type.d.ts +11 -0
- package/distribution/picture-storage/type.d.ts.map +1 -0
- package/distribution/picture-storage/type.js +2 -0
- package/distribution/picture-storage/type.js.map +1 -0
- package/distribution/recovery-code-regeneration/index.d.ts +19 -0
- package/distribution/recovery-code-regeneration/index.d.ts.map +1 -0
- package/distribution/recovery-code-regeneration/index.js +34 -0
- package/distribution/recovery-code-regeneration/index.js.map +1 -0
- package/distribution/recovery-code-store/index.d.ts +25 -0
- package/distribution/recovery-code-store/index.d.ts.map +1 -0
- package/distribution/recovery-code-store/index.js +34 -0
- package/distribution/recovery-code-store/index.js.map +1 -0
- package/distribution/role-grant/index.d.ts +38 -0
- package/distribution/role-grant/index.d.ts.map +1 -0
- package/distribution/role-grant/index.js +142 -0
- package/distribution/role-grant/index.js.map +1 -0
- package/distribution/role-grant/type.d.ts +40 -0
- package/distribution/role-grant/type.d.ts.map +1 -0
- package/distribution/role-grant/type.js +2 -0
- package/distribution/role-grant/type.js.map +1 -0
- package/distribution/rule-sync/index.d.ts +28 -0
- package/distribution/rule-sync/index.d.ts.map +1 -0
- package/distribution/rule-sync/index.js +80 -0
- package/distribution/rule-sync/index.js.map +1 -0
- package/distribution/rule-sync/type.d.ts +17 -0
- package/distribution/rule-sync/type.d.ts.map +1 -0
- package/distribution/rule-sync/type.js +2 -0
- package/distribution/rule-sync/type.js.map +1 -0
- package/distribution/second-factor-finish/index.d.ts +13 -0
- package/distribution/second-factor-finish/index.d.ts.map +1 -0
- package/distribution/second-factor-finish/index.js +83 -0
- package/distribution/second-factor-finish/index.js.map +1 -0
- package/distribution/second-factor-finish/type.d.ts +30 -0
- package/distribution/second-factor-finish/type.d.ts.map +1 -0
- package/distribution/second-factor-finish/type.js +2 -0
- package/distribution/second-factor-finish/type.js.map +1 -0
- package/distribution/secret-derivation/index.d.ts +10 -0
- package/distribution/secret-derivation/index.d.ts.map +1 -0
- package/distribution/secret-derivation/index.js +15 -0
- package/distribution/secret-derivation/index.js.map +1 -0
- package/distribution/secret-encryption/index.d.ts +17 -0
- package/distribution/secret-encryption/index.d.ts.map +1 -0
- package/distribution/secret-encryption/index.js +37 -0
- package/distribution/secret-encryption/index.js.map +1 -0
- package/distribution/session-prune/index.d.ts +17 -0
- package/distribution/session-prune/index.d.ts.map +1 -0
- package/distribution/session-prune/index.js +30 -0
- package/distribution/session-prune/index.js.map +1 -0
- package/distribution/session-token/index.d.ts +19 -0
- package/distribution/session-token/index.d.ts.map +1 -0
- package/distribution/session-token/index.js +22 -0
- package/distribution/session-token/index.js.map +1 -0
- package/distribution/sign-in-finish/index.d.ts +12 -0
- package/distribution/sign-in-finish/index.d.ts.map +1 -0
- package/distribution/sign-in-finish/index.js +64 -0
- package/distribution/sign-in-finish/index.js.map +1 -0
- package/distribution/sign-in-finish/type.d.ts +41 -0
- package/distribution/sign-in-finish/type.d.ts.map +1 -0
- package/distribution/sign-in-finish/type.js +2 -0
- package/distribution/sign-in-finish/type.js.map +1 -0
- package/distribution/sign-in-start/index.d.ts +17 -0
- package/distribution/sign-in-start/index.d.ts.map +1 -0
- package/distribution/sign-in-start/index.js +45 -0
- package/distribution/sign-in-start/index.js.map +1 -0
- package/distribution/sign-in-start/type.d.ts +34 -0
- package/distribution/sign-in-start/type.d.ts.map +1 -0
- package/distribution/sign-in-start/type.js +2 -0
- package/distribution/sign-in-start/type.js.map +1 -0
- package/distribution/sign-up-finish/index.d.ts +13 -0
- package/distribution/sign-up-finish/index.d.ts.map +1 -0
- package/distribution/sign-up-finish/index.js +38 -0
- package/distribution/sign-up-finish/index.js.map +1 -0
- package/distribution/sign-up-finish/type.d.ts +28 -0
- package/distribution/sign-up-finish/type.d.ts.map +1 -0
- package/distribution/sign-up-finish/type.js +2 -0
- package/distribution/sign-up-finish/type.js.map +1 -0
- package/distribution/signed-ticket/index.d.ts +19 -0
- package/distribution/signed-ticket/index.d.ts.map +1 -0
- package/distribution/signed-ticket/index.js +35 -0
- package/distribution/signed-ticket/index.js.map +1 -0
- package/distribution/signed-ticket/type.d.ts +16 -0
- package/distribution/signed-ticket/type.d.ts.map +1 -0
- package/distribution/signed-ticket/type.js +2 -0
- package/distribution/signed-ticket/type.js.map +1 -0
- package/distribution/step-up/index.d.ts +48 -0
- package/distribution/step-up/index.d.ts.map +1 -0
- package/distribution/step-up/index.js +83 -0
- package/distribution/step-up/index.js.map +1 -0
- package/distribution/step-up/type.d.ts +15 -0
- package/distribution/step-up/type.d.ts.map +1 -0
- package/distribution/step-up/type.js +2 -0
- package/distribution/{username → step-up}/type.js.map +1 -1
- package/distribution/test-database/index.d.ts +13 -0
- package/distribution/test-database/index.d.ts.map +1 -0
- package/distribution/test-database/index.js +17 -0
- package/distribution/test-database/index.js.map +1 -0
- package/distribution/test-person/index.d.ts +14 -0
- package/distribution/test-person/index.d.ts.map +1 -0
- package/distribution/test-person/index.js +20 -0
- package/distribution/test-person/index.js.map +1 -0
- package/distribution/test-server/index.d.ts +10 -0
- package/distribution/test-server/index.d.ts.map +1 -0
- package/distribution/test-server/index.js +16 -0
- package/distribution/test-server/index.js.map +1 -0
- package/distribution/totp/type.d.ts +1 -1
- package/distribution/totp/type.d.ts.map +1 -1
- package/distribution/totp-setup/index.d.ts +50 -0
- package/distribution/totp-setup/index.d.ts.map +1 -0
- package/distribution/totp-setup/index.js +136 -0
- package/distribution/totp-setup/index.js.map +1 -0
- package/distribution/totp-setup/type.d.ts +24 -0
- package/distribution/totp-setup/type.d.ts.map +1 -0
- package/distribution/totp-setup/type.js +2 -0
- package/distribution/totp-setup/type.js.map +1 -0
- package/package.json +9 -2
- package/distribution/username/index.d.ts +0 -23
- package/distribution/username/index.d.ts.map +0 -1
- package/distribution/username/index.js +0 -32
- package/distribution/username/index.js.map +0 -1
- package/distribution/username/type.d.ts +0 -10
- package/distribution/username/type.d.ts.map +0 -1
- /package/distribution/{username → account-activity}/type.js +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { notifyAccount } from "@sharadox/account-web-library/account-notice";
|
|
2
|
+
import { sendCode } from "@sharadox/account-web-library/code-sending";
|
|
3
|
+
import { verifyCode } from "@sharadox/account-web-library/code-verification";
|
|
4
|
+
import { contactBanned } from "@sharadox/account-web-library/banned-contact";
|
|
5
|
+
import { addContact } from "@sharadox/account-web-library/contact-addition";
|
|
6
|
+
import { normalizeContact } from "@sharadox/account-web-library/contact-kind";
|
|
7
|
+
import { verifyContact } from "@sharadox/account-web-library/contact-verification";
|
|
8
|
+
import { deriveSecret } from "@sharadox/account-web-library/secret-derivation";
|
|
9
|
+
/**
|
|
10
|
+
* Adds a contact to an account, unverified, and sends it a code (through `sendCode`); asking again for the same
|
|
11
|
+
* unverified contact sends a new code. Ask for a step-up first, and tell the account's other contacts.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* const result = await startContactAddition(server, { accountId, contact, address, language });
|
|
15
|
+
* if (result.status === "sent") after(result.deliver);
|
|
16
|
+
*/
|
|
17
|
+
export async function startContactAddition(server, { accountId, contact, address, language, now = Date.now(), }) {
|
|
18
|
+
let normalized;
|
|
19
|
+
try {
|
|
20
|
+
normalized = normalizeContact(contact);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return { status: "refused", reason: "contact" };
|
|
24
|
+
}
|
|
25
|
+
const channel = server.channels.find(({ kind }) => kind === normalized.kind);
|
|
26
|
+
if (!channel)
|
|
27
|
+
return { status: "refused", reason: "contact" };
|
|
28
|
+
const pepper = deriveSecret(server.secret, "banned-contact");
|
|
29
|
+
if (await contactBanned(server.database, { contact: normalized, pepper, application: "account", now }))
|
|
30
|
+
return { status: "refused", reason: "contact-banned" };
|
|
31
|
+
const existing = await server.database
|
|
32
|
+
.selectFrom("contact")
|
|
33
|
+
.select(["id", "verified_at"])
|
|
34
|
+
.where("account_id", "=", accountId)
|
|
35
|
+
.where("kind", "=", normalized.kind)
|
|
36
|
+
.where("value", "=", normalized.value)
|
|
37
|
+
.executeTakeFirst();
|
|
38
|
+
if (existing?.verified_at)
|
|
39
|
+
return { status: "refused", reason: "already-added" };
|
|
40
|
+
let contactId = existing?.id;
|
|
41
|
+
if (!contactId) {
|
|
42
|
+
const added = await addContact(server.database, { accountId, contact: normalized, now });
|
|
43
|
+
if (!added.added)
|
|
44
|
+
return { status: "refused", reason: added.reason };
|
|
45
|
+
contactId = added.contactId;
|
|
46
|
+
}
|
|
47
|
+
const sent = await sendCode(server, {
|
|
48
|
+
purpose: "contact-verification",
|
|
49
|
+
contact: normalized,
|
|
50
|
+
channel,
|
|
51
|
+
accountId,
|
|
52
|
+
address,
|
|
53
|
+
language,
|
|
54
|
+
now,
|
|
55
|
+
});
|
|
56
|
+
return sent.status === "sent" ? { ...sent, contactId } : sent;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Verifies the added contact once its code comes back: it can then be used to sign in. Call `notify` after
|
|
60
|
+
* answering, to tell the account's other contacts.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* const result = await finishContactAddition(server, { accountId, requestId, code });
|
|
64
|
+
*/
|
|
65
|
+
export async function finishContactAddition(server, { accountId, requestId, code, now = Date.now(), }) {
|
|
66
|
+
const verification = await verifyCode(server.database, {
|
|
67
|
+
requestId,
|
|
68
|
+
code,
|
|
69
|
+
purpose: "contact-verification",
|
|
70
|
+
pepper: deriveSecret(server.secret, "one-time-code"),
|
|
71
|
+
now,
|
|
72
|
+
});
|
|
73
|
+
if (!verification.valid)
|
|
74
|
+
return { status: "refused", reason: verification.reason };
|
|
75
|
+
if (verification.accountId !== accountId)
|
|
76
|
+
return { status: "refused", reason: "unknown" };
|
|
77
|
+
const contact = await server.database
|
|
78
|
+
.selectFrom("contact")
|
|
79
|
+
.select("id")
|
|
80
|
+
.where("account_id", "=", accountId)
|
|
81
|
+
.where("kind", "=", verification.contact.kind)
|
|
82
|
+
.where("value", "=", verification.contact.value)
|
|
83
|
+
.executeTakeFirst();
|
|
84
|
+
if (!contact)
|
|
85
|
+
return { status: "refused", reason: "no-contact" };
|
|
86
|
+
const verified = await verifyContact(server.database, { accountId, contactId: contact.id, now });
|
|
87
|
+
if (!verified.verified)
|
|
88
|
+
return { status: "refused", reason: verified.reason };
|
|
89
|
+
const notify = () => notifyAccount(server, {
|
|
90
|
+
accountId,
|
|
91
|
+
notice: { kind: "contact-added", contact: verification.contact.value },
|
|
92
|
+
except: contact.id,
|
|
93
|
+
});
|
|
94
|
+
return { status: "verified", contactId: contact.id, notify };
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/contact-addition-flow/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CodeSendingResult } from "@sharadox/account-web-library/code-sending/type";
|
|
2
|
+
import type { CodeVerificationResult } from "@sharadox/account-web-library/code-verification/type";
|
|
3
|
+
export type ContactAdditionStart = (Extract<CodeSendingResult, {
|
|
4
|
+
status: "sent";
|
|
5
|
+
}> & {
|
|
6
|
+
contactId: string;
|
|
7
|
+
}) | Exclude<CodeSendingResult, {
|
|
8
|
+
status: "sent";
|
|
9
|
+
}> | {
|
|
10
|
+
status: "refused";
|
|
11
|
+
reason: "contact" | "already-added" | "contact-taken" | "contact-banned" | "no-account";
|
|
12
|
+
};
|
|
13
|
+
export type ContactAdditionFinish =
|
|
14
|
+
/** `notify` tells the account's other contacts (call it after answering). */
|
|
15
|
+
{
|
|
16
|
+
status: "verified";
|
|
17
|
+
contactId: string;
|
|
18
|
+
notify: () => Promise<void>;
|
|
19
|
+
} | {
|
|
20
|
+
status: "refused";
|
|
21
|
+
reason: Extract<CodeVerificationResult, {
|
|
22
|
+
valid: false;
|
|
23
|
+
}>["reason"] | "no-contact" | "contact-taken";
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/contact-addition-flow/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAC;AACzF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAEnG,MAAM,MAAM,oBAAoB,GAC5B,CAAC,OAAO,CAAC,iBAAiB,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,GACxE,OAAO,CAAC,iBAAiB,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,GAC9C;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,gBAAgB,GAAG,YAAY,CAAA;CAAE,CAAC;AAEnH,MAAM,MAAM,qBAAqB;AAC/B,6EAA6E;AAC3E;IAAE,MAAM,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,GACtE;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC,sBAAsB,EAAE;QAAE,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,YAAY,GAAG,eAAe,CAAC;CACtG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/contact-addition-flow/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { CodePurpose } from "@sharadox/account-web-library/code-request/type";
|
|
2
|
+
import type { Contact } from "@sharadox/account-web-library/contact-kind/type";
|
|
3
|
+
/** A one-time code to deliver to a contact. */
|
|
4
|
+
export interface CodeDelivery {
|
|
5
|
+
contact: Contact;
|
|
6
|
+
code: string;
|
|
7
|
+
purpose: CodePurpose;
|
|
8
|
+
/** The reader's language (`en`, `pt-PT`…); channels fall back to English. */
|
|
9
|
+
language: string;
|
|
10
|
+
expiresAt: Date;
|
|
11
|
+
}
|
|
12
|
+
/** Something the account's owner must know, sent to each of its contacts. */
|
|
13
|
+
export type Notice =
|
|
14
|
+
/** The account will be deleted for not being used (2 years without signing in). */
|
|
15
|
+
{
|
|
16
|
+
kind: "inactivity-warning";
|
|
17
|
+
deletionAt: Date;
|
|
18
|
+
}
|
|
19
|
+
/** Another email was added to the account. */
|
|
20
|
+
| {
|
|
21
|
+
kind: "contact-added";
|
|
22
|
+
contact: string;
|
|
23
|
+
}
|
|
24
|
+
/** A recovery code was used to sign in. */
|
|
25
|
+
| {
|
|
26
|
+
kind: "recovery-code-used";
|
|
27
|
+
};
|
|
28
|
+
export interface NoticeDelivery {
|
|
29
|
+
contact: Contact;
|
|
30
|
+
/** The reader's language; channels fall back to English. */
|
|
31
|
+
language: string;
|
|
32
|
+
notice: Notice;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* How codes reach one kind of contact (email now; phone, WhatsApp, Messenger, Instagram later). Cap the sends of paid
|
|
36
|
+
* channels before calling `send` (protection-web-library's `spendFromCap`).
|
|
37
|
+
*/
|
|
38
|
+
export interface ContactChannel {
|
|
39
|
+
kind: string;
|
|
40
|
+
send(delivery: CodeDelivery): Promise<void>;
|
|
41
|
+
/** Sends a notice; a channel without it can't carry notices. */
|
|
42
|
+
notify?(delivery: NoticeDelivery): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/contact-channel/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AACnF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAE/E,+CAA+C;AAC/C,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,6EAA6E;AAC7E,MAAM,MAAM,MAAM;AAChB,mFAAmF;AACjF;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE;AAClD,8CAA8C;GAC5C;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE;AAC5C,2CAA2C;GACzC;IAAE,IAAI,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAEnC,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,gEAAgE;IAChE,MAAM,CAAC,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/contact-channel/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Contact } from "@sharadox/account-web-library/contact-kind/type";
|
|
2
|
+
/** The kinds of contact this version can store and send codes to. */
|
|
3
|
+
export declare const CONTACT_KINDS: string[];
|
|
4
|
+
/**
|
|
5
|
+
* A contact in the one form it is stored and compared in (an email trimmed and lowercase…). Throws for a kind this
|
|
6
|
+
* version doesn't know, or a value that isn't valid for its kind.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* normalizeContact({ kind: "email", value: " Luis@Example.com " }); // { kind: "email", value: "luis@example.com" }
|
|
10
|
+
*/
|
|
11
|
+
export declare function normalizeContact({ kind, value }: Contact): Contact;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/contact-kind/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAI/E,qEAAqE;AACrE,eAAO,MAAM,aAAa,UAA2B,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG,OAAO,CAIlE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { normalizeEmail } from "@sharadox/account-web-library/email-contact";
|
|
2
|
+
const NORMALIZERS = { email: normalizeEmail };
|
|
3
|
+
/** The kinds of contact this version can store and send codes to. */
|
|
4
|
+
export const CONTACT_KINDS = Object.keys(NORMALIZERS);
|
|
5
|
+
/**
|
|
6
|
+
* A contact in the one form it is stored and compared in (an email trimmed and lowercase…). Throws for a kind this
|
|
7
|
+
* version doesn't know, or a value that isn't valid for its kind.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* normalizeContact({ kind: "email", value: " Luis@Example.com " }); // { kind: "email", value: "luis@example.com" }
|
|
11
|
+
*/
|
|
12
|
+
export function normalizeContact({ kind, value }) {
|
|
13
|
+
const normalize = NORMALIZERS[kind];
|
|
14
|
+
if (!normalize)
|
|
15
|
+
throw new Error(`unknown contact kind "${kind}"`);
|
|
16
|
+
return { kind, value: normalize(value) };
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/contact-kind/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAG7E,MAAM,WAAW,GAA8C,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAEzF,qEAAqE;AACrE,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAW;IACvD,MAAM,SAAS,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,GAAG,CAAC,CAAC;IAClE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/contact-kind/type.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/contact-kind/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
|
|
3
|
+
import type { Contact } from "@sharadox/account-web-library/contact-kind/type";
|
|
4
|
+
/**
|
|
5
|
+
* The account a verified contact belongs to (written any way: it is normalized first), or undefined. Unverified
|
|
6
|
+
* contacts never count, so claiming someone's address proves nothing.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const found = await findAccountByContact(database, { kind: "email", value: typed });
|
|
10
|
+
*/
|
|
11
|
+
export declare function findAccountByContact(database: Kysely<AccountDatabase>, contact: Contact): Promise<{
|
|
12
|
+
accountId: string;
|
|
13
|
+
contactId: string;
|
|
14
|
+
signIn: boolean;
|
|
15
|
+
} | undefined>;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/contact-lookup/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAE3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,EACjC,OAAO,EAAE,OAAO,GACf,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAAC,CAUhF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { normalizeContact } from "@sharadox/account-web-library/contact-kind";
|
|
2
|
+
/**
|
|
3
|
+
* The account a verified contact belongs to (written any way: it is normalized first), or undefined. Unverified
|
|
4
|
+
* contacts never count, so claiming someone's address proves nothing.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const found = await findAccountByContact(database, { kind: "email", value: typed });
|
|
8
|
+
*/
|
|
9
|
+
export async function findAccountByContact(database, contact) {
|
|
10
|
+
const { kind, value } = normalizeContact(contact);
|
|
11
|
+
const row = await database
|
|
12
|
+
.selectFrom("contact")
|
|
13
|
+
.select(["id", "account_id", "sign_in"])
|
|
14
|
+
.where("kind", "=", kind)
|
|
15
|
+
.where("value", "=", value)
|
|
16
|
+
.where("verified_at", "is not", null)
|
|
17
|
+
.executeTakeFirst();
|
|
18
|
+
return row && { accountId: row.account_id, contactId: row.id, signIn: row.sign_in };
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/contact-lookup/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAG9E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,QAAiC,EACjC,OAAgB;IAEhB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,MAAM,QAAQ;SACvB,UAAU,CAAC,SAAS,CAAC;SACrB,MAAM,CAAC,CAAC,IAAI,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;SACvC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;SACxB,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC;SAC1B,KAAK,CAAC,aAAa,EAAE,QAAQ,EAAE,IAAI,CAAC;SACpC,gBAAgB,EAAE,CAAC;IACtB,OAAO,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
|
|
3
|
+
/**
|
|
4
|
+
* Removes a contact from an account. Refuses to remove the last verified sign-in contact of a person (the database
|
|
5
|
+
* checks it when the change commits). Ask for a fresh code first (step-up) and tell the other contacts.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const result = await removeContact(database, { accountId, contactId });
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeContact(database: Kysely<AccountDatabase>, { accountId, contactId }: {
|
|
11
|
+
accountId: string;
|
|
12
|
+
contactId: string;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
removed: true;
|
|
15
|
+
} | {
|
|
16
|
+
removed: false;
|
|
17
|
+
reason: "no-contact" | "last-sign-in-contact";
|
|
18
|
+
}>;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/contact-removal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAI3F;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,EACjC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACjE,OAAO,CAAC;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,YAAY,GAAG,sBAAsB,CAAA;CAAE,CAAC,CAqBhG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { recordAuditEvent } from "@sharadox/account-web-library/audit-event";
|
|
2
|
+
import { databaseError } from "@sharadox/account-web-library/database-error";
|
|
3
|
+
/**
|
|
4
|
+
* Removes a contact from an account. Refuses to remove the last verified sign-in contact of a person (the database
|
|
5
|
+
* checks it when the change commits). Ask for a fresh code first (step-up) and tell the other contacts.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* const result = await removeContact(database, { accountId, contactId });
|
|
9
|
+
*/
|
|
10
|
+
export async function removeContact(database, { accountId, contactId }) {
|
|
11
|
+
try {
|
|
12
|
+
return await database.transaction().execute(async (transaction) => {
|
|
13
|
+
const removed = await transaction
|
|
14
|
+
.deleteFrom("contact")
|
|
15
|
+
.where("id", "=", contactId)
|
|
16
|
+
.where("account_id", "=", accountId)
|
|
17
|
+
.returning("kind")
|
|
18
|
+
.executeTakeFirst();
|
|
19
|
+
if (!removed)
|
|
20
|
+
return { removed: false, reason: "no-contact" };
|
|
21
|
+
await recordAuditEvent(transaction, {
|
|
22
|
+
accountId,
|
|
23
|
+
action: "contact.removed",
|
|
24
|
+
detail: { contactId, kind: removed.kind },
|
|
25
|
+
});
|
|
26
|
+
return { removed: true };
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (databaseError(error)?.code === "23514")
|
|
31
|
+
return { removed: false, reason: "last-sign-in-contact" };
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/contact-removal/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,QAAiC,EACjC,EAAE,SAAS,EAAE,SAAS,EAA4C;IAElE,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;YAChE,MAAM,OAAO,GAAG,MAAM,WAAW;iBAC9B,UAAU,CAAC,SAAS,CAAC;iBACrB,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC;iBAC3B,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE,SAAS,CAAC;iBACnC,SAAS,CAAC,MAAM,CAAC;iBACjB,gBAAgB,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO;gBAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAW,CAAC;YACvE,MAAM,gBAAgB,CAAC,WAAW,EAAE;gBAClC,SAAS;gBACT,MAAM,EAAE,iBAAiB;gBACzB,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;aAC1C,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAW,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,OAAO;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE,CAAC;QACtG,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
import type { AccountDatabase } from "@sharadox/account-web-library/account-database/type";
|
|
3
|
+
/**
|
|
4
|
+
* Marks an account's contact verified, once the one-time code sent to it came back. Refuses when another account
|
|
5
|
+
* verified the same contact first (a verified contact belongs to one account only).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* await verifyContact(database, { accountId, contactId }); // { verified: true }
|
|
9
|
+
*/
|
|
10
|
+
export declare function verifyContact(database: Kysely<AccountDatabase>, { accountId, contactId, now }: {
|
|
11
|
+
accountId: string;
|
|
12
|
+
contactId: string;
|
|
13
|
+
now?: number;
|
|
14
|
+
}): Promise<{
|
|
15
|
+
verified: true;
|
|
16
|
+
} | {
|
|
17
|
+
verified: false;
|
|
18
|
+
reason: "no-contact" | "contact-taken";
|
|
19
|
+
}>;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/contact-verification/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AAI3F;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,CAAC,eAAe,CAAC,EACjC,EAAE,SAAS,EAAE,SAAS,EAAE,GAAgB,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACjG,OAAO,CAAC;IAAE,QAAQ,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,YAAY,GAAG,eAAe,CAAA;CAAE,CAAC,CAuB3F"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { recordAuditEvent } from "@sharadox/account-web-library/audit-event";
|
|
2
|
+
import { databaseError } from "@sharadox/account-web-library/database-error";
|
|
3
|
+
/**
|
|
4
|
+
* Marks an account's contact verified, once the one-time code sent to it came back. Refuses when another account
|
|
5
|
+
* verified the same contact first (a verified contact belongs to one account only).
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* await verifyContact(database, { accountId, contactId }); // { verified: true }
|
|
9
|
+
*/
|
|
10
|
+
export async function verifyContact(database, { accountId, contactId, now = Date.now() }) {
|
|
11
|
+
try {
|
|
12
|
+
return await database.transaction().execute(async (transaction) => {
|
|
13
|
+
const updated = await transaction
|
|
14
|
+
.updateTable("contact")
|
|
15
|
+
.set({ verified_at: new Date(now) })
|
|
16
|
+
.where("id", "=", contactId)
|
|
17
|
+
.where("account_id", "=", accountId)
|
|
18
|
+
.returning("kind")
|
|
19
|
+
.executeTakeFirst();
|
|
20
|
+
if (!updated)
|
|
21
|
+
return { verified: false, reason: "no-contact" };
|
|
22
|
+
await recordAuditEvent(transaction, {
|
|
23
|
+
accountId,
|
|
24
|
+
action: "contact.verified",
|
|
25
|
+
detail: { contactId, kind: updated.kind },
|
|
26
|
+
now,
|
|
27
|
+
});
|
|
28
|
+
return { verified: true };
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (databaseError(error)?.constraint === "contact_verified")
|
|
33
|
+
return { verified: false, reason: "contact-taken" };
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/contact-verification/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAE7E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,QAAiC,EACjC,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,EAA0D;IAElG,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE;YAChE,MAAM,OAAO,GAAG,MAAM,WAAW;iBAC9B,WAAW,CAAC,SAAS,CAAC;iBACtB,GAAG,CAAC,EAAE,WAAW,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;iBACnC,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,CAAC;iBAC3B,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE,SAAS,CAAC;iBACnC,SAAS,CAAC,MAAM,CAAC;iBACjB,gBAAgB,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO;gBAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAW,CAAC;YACxE,MAAM,gBAAgB,CAAC,WAAW,EAAE;gBAClC,SAAS;gBACT,MAAM,EAAE,kBAAkB;gBAC1B,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;gBACzC,GAAG;aACJ,CAAC,CAAC;YACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAW,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,kBAAkB;YAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QACjH,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postgres's error code (`23505` unique, `23514` check…) and the constraint that failed, from an error thrown by the
|
|
3
|
+
* driver (Neon's or PGlite's); undefined for any other error.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* if (databaseError(error)?.constraint === "account_identifier_key") return { reason: "identifier-taken" };
|
|
7
|
+
*/
|
|
8
|
+
export declare function databaseError(error: unknown): {
|
|
9
|
+
code: string;
|
|
10
|
+
constraint: string | undefined;
|
|
11
|
+
} | undefined;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/database-error/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,SAAS,CAK1G"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Postgres's error code (`23505` unique, `23514` check…) and the constraint that failed, from an error thrown by the
|
|
3
|
+
* driver (Neon's or PGlite's); undefined for any other error.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* if (databaseError(error)?.constraint === "account_identifier_key") return { reason: "identifier-taken" };
|
|
7
|
+
*/
|
|
8
|
+
export function databaseError(error) {
|
|
9
|
+
if (typeof error !== "object" || error === null || typeof error.code !== "string")
|
|
10
|
+
return undefined;
|
|
11
|
+
const { code, constraint } = error;
|
|
12
|
+
return { code, constraint };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/database-error/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ;QACvG,OAAO,SAAS,CAAC;IACnB,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAA8C,CAAC;IAC5E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContactChannel } from "@sharadox/account-web-library/contact-channel/type";
|
|
2
|
+
import type { EmailChannelOptions } from "@sharadox/account-web-library/email-channel/type";
|
|
3
|
+
/**
|
|
4
|
+
* Sends one-time codes by email, in the shared Sharadox email layout (email-web-library), in English or European
|
|
5
|
+
* Portuguese (any `pt` reader). The code is in the body only, never the subject (lock screens show subjects), with
|
|
6
|
+
* no link to click: nothing to imitate in a phishing email.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const channel = createEmailChannel({ sender: createAmazonSesSender(configuration), from, design });
|
|
10
|
+
* await channel.send({ contact, code, purpose: "sign-in", language: "pt-PT", expiresAt });
|
|
11
|
+
*/
|
|
12
|
+
export declare function createEmailChannel({ sender, from, design, logos, now, }: EmailChannelOptions): ContactChannel;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/email-channel/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,cAAc,EAGf,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAiH5F;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,KAAU,EACV,GAAc,GACf,EAAE,mBAAmB,GAAG,cAAc,CAuEtC"}
|