[10] Create embedded_schemas for e2ee endpoints #35

Merged
serra merged 6 commits from serra/e2ee into feature/e2ee 2026-09-29 13:29:11 +03:00
Owner

PR in support of #10.

May have gone a little overboard with some of the request validations here.

PR in support of #10. May have gone a little overboard with some of the request validations here.
Signed-off-by: Serra Allgood <serra@allgood.dev>
[10] Create RoomKeyPuts requests type.
All checks were successful
run bromal ci pipeline / build and run tests (push) Successful in 4m48s
run bromal ci pipeline / run linters (push) Successful in 5m29s
run bromal ci pipeline / generate sbom (push) Successful in 4m10s
5c8ba99f5a
Along with supporting embedded types.

Signed-off-by: Serra Allgood <serra@allgood.dev>
Signed-off-by: Serra Allgood <serra@allgood.dev>
Signed-off-by: Serra Allgood <serra@allgood.dev>
[10] Create Requests.Client.Keys.Upload
All checks were successful
run bromal ci pipeline / build and run tests (push) Successful in 5m11s
run bromal ci pipeline / run linters (push) Successful in 6m2s
run bromal ci pipeline / generate sbom (push) Successful in 4m14s
31e5245471
Signed-off-by: Serra Allgood <serra@allgood.dev>
@ -656,3 +656,3 @@
add :user_id, :string, null: false
add :algorithms, {:array, :string}
add :public_key, :string, null: false
add :keys, :map, null: false
Author
Owner

Realized that this column mapping makes things a whole lot easier for parsing and storing device keys

Realized that this column mapping makes things a whole lot easier for parsing and storing device keys
Author
Owner

Wasn't sure if the supporting request types should be under the Bromal.Types module or yet another layer under Bromal.Request.Client.Keys

Wasn't sure if the supporting request types should be under the `Bromal.Types` module or yet another layer under `Bromal.Request.Client.Keys`
serra 2026-09-25 11:03:58 +03:00
serra self-assigned this 2026-09-25 11:04:15 +03:00
Author
Owner

Random aside, but with this PR, there are exactly 1000 test cases in Bromal now! 🎉

Random aside, but with this PR, there are exactly 1000 test cases in Bromal now! 🎉
serra changed title from Create embedded_schemas for e2ee endpoints to [10] Create embedded_schemas for e2ee endpoints 2026-09-25 11:05:22 +03:00
@ -0,0 +26,4 @@
describe "claim form" do
test "parse/1 returns data with user id strings converted to Types.UserId" do
user_1 = user_fixture()
Owner

For future: I would use user1 and user2 instead of user_1 and user_2 for consistency with other places.

For future: I would use `user1` and `user2` instead of `user_1` and `user_2` for consistency with other places.
igor approved these changes 2026-09-26 22:00:37 +03:00
igor left a comment

Seems to be OK.

For future: the constructions like ... |> map |> filter |> map ... I would rewrite to use Stream module instead of Enum. You can leave it as is, at least for now.

Seems to be OK. For future: the constructions like `... |> map |> filter |> map ...` I would rewrite to use `Stream` module instead of `Enum`. You can leave it as is, at least for now.
Owner

@serra wrote in #35 (comment):

Random aside, but with this PR, there are exactly 1000 test cases in Bromal now! 🎉

Hey, I'm finishing tests for CLI/RPC now and thought, that I will want to boast about this number overflow. :)

@serra wrote in https://code.bromal.im/main/bromal/pulls/35#issuecomment-180: > Random aside, but with this PR, there are exactly 1000 test cases in Bromal now! :tada: Hey, I'm finishing tests for CLI/RPC now and thought, that I will want to boast about this number overflow. :)
Owner

@serra wrote in #35 (comment):

Wasn't sure if the supporting request types should be under the Bromal.Types module or yet another layer under Bromal.Request.Client.Keys

I suppose, the second variant is better. Under the Bromal.Types we have more primitive and generic types.

@serra wrote in https://code.bromal.im/main/bromal/pulls/35#issuecomment-175: > Wasn't sure if the supporting request types should be under the `Bromal.Types` module or yet another layer under `Bromal.Request.Client.Keys` I suppose, the second variant is better. Under the `Bromal.Types` we have more primitive and generic types.
[10] PR feedback changes
Some checks failed
run bromal ci pipeline / build and run tests (push) Failing after 3m56s
run bromal ci pipeline / run linters (push) Has been skipped
run bromal ci pipeline / generate sbom (push) Has been skipped
7cf4a696b8
- Rename test variables
- Move supporting embedded schemas for keys
requests to their own folder but not module

Signed-off-by: Serra Allgood <serra@allgood.dev>
serra force-pushed serra/e2ee from 7cf4a696b8
Some checks failed
run bromal ci pipeline / build and run tests (push) Failing after 3m56s
run bromal ci pipeline / run linters (push) Has been skipped
run bromal ci pipeline / generate sbom (push) Has been skipped
to ca011c13c1
All checks were successful
run bromal ci pipeline / generate sbom (push) Successful in 4m59s
run bromal ci pipeline / build and run tests (push) Successful in 6m2s
run bromal ci pipeline / run linters (push) Successful in 7m32s
2026-09-29 12:52:05 +03:00
Compare
serra merged commit ca011c13c1 into feature/e2ee 2026-09-29 13:29:11 +03:00
Sign in to join this conversation.
No reviewers
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
main/bromal!35
No description provided.