1fcc375dd5
Deprecate utils function defer
in favour of Promise.withResolvers
( #4829 )
...
* Switch from defer to Promise.withResolvers
As supported by the outgoing LTS version (v22) which has 99% support of ES2024
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Deprecate defer instead of killing it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Knip
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2025-05-09 10:16:35 +00:00
f11e1910f5
Improve types around User Interactive Auth ( #4709 )
...
* Remove confused type UIAResponse
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Update uia.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2025-02-17 09:53:22 +00:00
ff1db2b538
Bump eslint-plugin-matrix-org to enable @typescript-eslint/consistent-type-imports rule ( #4680 )
...
* Bump eslint-plugin-matrix-org to enable @typescript-eslint/consistent-type-imports rule
* Re-lint after merge
2025-02-05 12:15:20 +00:00
ea34cce00a
Apply lint rule @typescript-eslint/no-empty-object-type ( #4679 )
2025-02-04 13:41:32 +00:00
91f6f0f9c5
Update typescript-eslint monorepo to v8 (major) ( #4388 )
...
* Update typescript-eslint monorepo to v8
* Migrate to stylistic
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2024-10-21 13:17:20 +00:00
05ba27f36b
Change imports for Node.js compatibility ( #4377 )
...
* Change imports for Node.js compatibility
Fixes : #4287
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
* Run prettier
* Run prettier (again)
* Add comment
* Update babel.config.cjs
---------
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2024-08-29 15:56:32 +00:00
f03dd7b7bc
Remove deprecated methods and fields ( #4201 )
...
* Remove legacy `threepidCreds` field
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Remove deprecated shouldUpgradeToVersion
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Remove `added` legacy login request field
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Remove deprecated re-exports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Remove `home_server` field
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
* Update imports in tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2024-05-15 15:23:04 +00:00
c9075b3dba
Only pass id_server if we had one to begin with ( #4200 )
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2024-05-15 10:59:42 +00:00
85a55c79cd
Remove various deprecated methods & re-exports ( #4125 )
2024-03-25 12:21:11 +00:00
0f65088fd9
Update dependency prettier to v3 ( #3983 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2024-01-02 17:56:06 +00:00
8c16d69f3c
Set minimum supported Matrix 1.1 version (drop legacy r0 versions) ( #3007 )
...
Co-authored-by: Germain <germains@element.io >
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com >
2023-08-14 09:25:15 +01:00
533c21a515
Fix registration check your emails stage regression ( #3616 )
...
* Fix registration check your emails stage regression
* Simplify diff
* Add test
2023-07-24 14:08:17 +00:00
9602aa88ea
Fix sending auth: null
due to broken types around UIA ( #3594 )
...
* Fix type issue around `getSessionBackupPrivateKey`
* Fix sending auth: null due to broken types around UIA
* Discard changes to src/crypto/index.ts
* Add comment
2023-07-12 13:55:02 +00:00
1c1ac137d3
Improve types around login, registration, UIA and identity servers ( #3537 )
2023-07-04 14:49:24 +01:00
729f924de1
Prioritise entirely supported flows for UIA ( #3402 )
...
* Prioritise entirely supported flows for UIA
* Add tests
* Fix types
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Update src/interactive-auth.ts
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2023-05-24 10:33:48 +00:00
ceb2a57feb
Rename and move crypto.IBootstrapCrossSigningOpts
( #3352 )
...
* Define `UIAuthCallback` type and use in `IBootstrapCrossSigningOpts`
* Move `IBootstrapCrossSigningOpts` to `crypto-api` and rename
* Replace uses of `IBootstrapCrossSigningOpts`
... with `BootstrapCrossSigningOpts`
* Update src/crypto-api.ts
2023-05-11 18:41:58 +00:00
47ba8cfa24
Correct interactive-auth types ( #3328 )
2023-04-28 07:52:47 +00:00
4bdb9111dd
Fix incorrect uses of IAuthData
( #3322 )
...
`IAuthData` is the response, not the request
2023-04-26 18:15:58 +00:00
b9d0596dd7
Fix typedoc warnings ( #3275 )
...
There aren't that many of these, so I've gone through and fixed them, and
configured the GHA workflow to complain if any creep back in.
2023-04-12 20:30:57 +00:00
e492a44dde
Update typescript bits to aid matrix-react-sdk achieve noImplicitAny ( #3079 )
2023-02-03 14:01:53 +00:00
349c2c2587
Apply prettier formatting
2022-12-09 09:38:20 +01:00
c4006d752a
Improve tsdoc types ( #2940 )
...
* Install eslint-plugin-jsdoc
* Enable lint rule jsdoc/no-types
* Make tsdoc more valid, add required hyphens and s/return/returns/g
* Stash tsdoc work
* Fix mistypes
* Stash
* Stash
* More tsdoc work
* Remove useless doc params
* Fixup docs
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Update src/crypto/verification/request/ToDeviceChannel.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Update src/client.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Update src/client.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Update src/client.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
* Iterate
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2022-12-07 18:01:54 +00:00
c0f7df8c3b
Update eslint-plugin-matrix-org and improve visibilities & types ( #2887 )
2022-11-18 09:20:53 +00:00
6c543382e6
Make SonarCloud happier ( #2850 )
...
* Make SonarCloud happier
* Revert one change due to lack of strict mode upstream
* Fix typo
2022-11-07 12:16:48 +00:00
db49cd8d13
Make the js-sdk conform to tsc --strict ( #2835 )
...
Co-authored-by: Faye Duxovni <fayed@matrix.org >
2022-11-03 12:50:05 +00:00
9f2f08dfd3
Fix more typescript --strict violations ( #2795 )
...
* Stash tsc fixes
* Iterate
* Iterate
* Iterate
* Fix tests
* Iterate
* Iterate
* Iterate
* Iterate
* Add tests
2022-10-25 18:31:40 +01:00
3f6f5b69c7
Improve test coverage and modernize style for interactive-auth ( #2574 )
...
* style: address no-mixed-operators errors,minor style improvements
* test: Fix async interactive-auth tests, add test case
* tests: Fix incorrectly stringified mock response
* pushprocessor: style update
* use async primitives in interactive-auth-spec
* lint
* fixup: remove duplicate test
* add test case for no-flow-with-session for interactive-auth
* interactive-auth: handle non-existing error.data
* async test fix
* test: add dummyauth test
* add testing for errcode
* Revert "pushprocessor: style update"
This reverts commit 3ed0fdfb73
.
* add testcase for missing error data
* test: move sessionId assignment
* Add tests to improve coverage for interactive-auth
* pushprocessor: style update
2022-08-11 15:29:53 +01:00
d3ff7655f7
Add missing type
property on IAuthData
( #2463 )
...
Per spec, for example: https://spec.matrix.org/v1.2/client-server-api/#dummy-auth
2022-06-15 00:37:02 -06:00
a9516d047f
types: improve types for registration calls ( #2390 )
2022-05-20 16:34:28 +01:00
923ff4b282
registration: add function to re-request email token ( #2357 )
2022-05-11 13:17:36 +02:00
378802a5ab
Stabilise token authenticated registration support ( #2181 )
...
* Stabilise token authenticated registration support
Token authenticated registration was added to the Matrix specification in v1.2:
https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration
Signed-off-by: Callum Brown <callum@calcuode.com >
* Backwards compatibility with unstable auth type
Servers are not yet widely updated with support for the stable
version of the registration token UIA type.
Clients should check if the authentication type is either
`RegistrationToken` or `UnstableRegistrationToken`.
Signed-off-by: Callum Brown <callum@calcuode.com >
2022-04-08 22:53:57 -06:00
feb83ba161
Convert http-api to Typescript ( #2063 )
2021-12-14 15:34:50 +00:00
f8097221e6
Improve typing ( #2055 )
2021-12-09 14:22:58 +00:00
95e7a76ba9
Finish adding registration token UIAA type ( #2048 )
...
Signed-off-by: Callum Brown <callum@calcuode.com >
2021-12-08 19:38:22 -07:00
f41d815aa6
Add registration token UIA type ( #2020 )
2021-11-15 09:16:23 +00:00
50332c4999
End authentication attempt immediately if we couldn't find an appropriate flow ( #2008 )
...
If `doRequest()` in `interactive-auth.ts` fails to obtain an appropriate authentication flow, it should return immediately after rejecting the promise. If it continues, it'll attempt to check `chosenFlow.stages`, which will cause an error because `chosenFlow` is `null`. This was breaking the interactive auth spec tests with Node 16.
2021-11-02 10:40:46 -04:00
69ba32683c
Iterate PR based on feedback
2021-08-11 21:45:51 +01:00
a531446396
tidy a bit more
2021-08-10 10:46:13 +01:00
f876c35283
Fix some bad conversion artifacts
2021-08-10 10:34:05 +01:00
1bcec53c6b
delint
2021-08-10 10:22:40 +01:00
c2b5b14d26
Merge branch 'develop' of github.com:matrix-org/matrix-js-sdk into t3chguy/ts/12
...
Conflicts:
src/client.ts
src/interactive-auth.ts
src/models/search-result.ts
2021-07-23 23:46:15 +01:00
e775bcac3c
Convert SearchResult, InteractiveAuth, PushProcessor and Scheduler to Typescript
2021-07-07 11:08:54 +01:00