Skip to content

Commit

Permalink
feat: completed testing files and added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathixx committed Jul 24, 2024
1 parent d8f53e7 commit 38db7bc
Show file tree
Hide file tree
Showing 6 changed files with 483 additions and 724 deletions.
24 changes: 20 additions & 4 deletions packages/matrix-client-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ import GetFilter from './user/filter/getFilter'
import bind from './account/3pid/bind'
import refresh from './refresh'
import getRoomState from './rooms/roomId/getState'
import getRoomStateEvent, {
getRoomStateEventNoStatekey
} from './rooms/roomId/getStateEvent'

const tables = {
ui_auth_sessions: 'session_id TEXT NOT NULL, stage_type TEXT NOT NULL'
Expand Down Expand Up @@ -166,7 +169,11 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/refresh': badMethod,
'/_matrix/client/v3/user/:userId/filter': badMethod,
'/_matrix/client/v3/user/:userId/filter/:filterId': GetFilter(this),
'/_matrix/client/v3/rooms/:roomId/state': getRoomState(this)
'/_matrix/client/v3/rooms/:roomId/state': getRoomState(this),
'/_matrix/client/v3/rooms/:roomId/state/:eventType/:stateKey':
getRoomStateEvent(this),
'/_matrix/client/v3/rooms/:roomId/state/:eventType':
getRoomStateEventNoStatekey(this)
}
this.api.post = {
'/_matrix/client/v3/account/whoami': badMethod,
Expand Down Expand Up @@ -209,7 +216,10 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/refresh': refresh(this),
'/_matrix/client/v3/user/:userId/filter': PostFilter(this),
'/_matrix/client/v3/user/:userId/filter/:filterId': badMethod,
'/_matrix/client/v3/rooms/:roomId/state': badMethod
'/_matrix/client/v3/rooms/:roomId/state': badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType/:stateKey':
badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType': badMethod
}
this.api.put = {
'/_matrix/client/v3/account/whoami': badMethod,
Expand Down Expand Up @@ -252,7 +262,10 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/refresh': badMethod,
'/_matrix/client/v3/user/:userId/filter': badMethod,
'/_matrix/client/v3/user/:userId/filter/:filterId': badMethod,
'/_matrix/client/v3/rooms/:roomId/state': badMethod
'/_matrix/client/v3/rooms/:roomId/state': badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType/:stateKey':
badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType': badMethod
}
this.api.delete = {
'/_matrix/client/v3/account/whoami': badMethod,
Expand Down Expand Up @@ -285,7 +298,10 @@ export default class MatrixClientServer extends MatrixIdentityServer<clientDbCol
'/_matrix/client/v3/refresh': badMethod,
'/_matrix/client/v3/user/:userId/filter': badMethod,
'/_matrix/client/v3/user/:userId/filter/:filterId': badMethod,
'/_matrix/client/v3/rooms/:roomId/state': badMethod
'/_matrix/client/v3/rooms/:roomId/state': badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType/:stateKey':
badMethod,
'/_matrix/client/v3/rooms/:roomId/state/:eventType': badMethod
}
resolve(true)
})
Expand Down
Loading

0 comments on commit 38db7bc

Please sign in to comment.