Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit de55f59

Browse files
committed
feat: order, remove dumb routes, add get members, summaries
1 parent 78045e9 commit de55f59

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

polyproto/mls/operations.tsp

Lines changed: 20 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,55 +49,42 @@ namespace polyproto.mls.routes {
4949
@path groupId: string,
5050
@body commit: Commit,
5151
): Welcome | NotFoundOrForbidden;
52+
53+
/**
54+
* Get the latest commit for a group
55+
*/
56+
@get
57+
@route("/groups/{groupId}/commits/latest")
58+
op getLatestCommit(@path groupId: string): Commit | NotFoundOrForbidden;
5259
}
5360

5461
namespace members {
5562
/**
56-
* Get the current state of a group member
63+
* Get all group members
5764
*/
5865
@get
59-
@route("/groups/{groupId}/members/{memberId}")
60-
op getMember(
61-
@path groupId: string,
62-
@path memberId: string,
63-
): GroupMember | NotFoundOrForbidden;
66+
@summary("Get all group members")
67+
@route("/groups/{groupId}/members")
68+
op getMembers(@path groupId: string): GroupMember[] | NotFoundOrForbidden;
6469

6570
/**
66-
* Update a member's key package
71+
* Get the current state of a group member
6772
*/
68-
@put
73+
@get
74+
@summary("Get a singular group member")
6975
@route("/groups/{groupId}/members/{memberId}")
70-
op updateMember(
76+
op getMember(
7177
@path groupId: string,
7278
@path memberId: string,
73-
@body keyPackage: KeyPackage,
74-
): void | NotFoundOrForbidden;
79+
): GroupMember | NotFoundOrForbidden;
7580

7681
/**
77-
* Remove a member from the group
82+
* Get all pending proposals for a group
7883
*/
79-
@delete
80-
@route("/groups/{groupId}/members/{memberId}")
81-
op removeMember(
82-
@path groupId: string,
83-
@path memberId: string,
84-
): void | NotFoundOrForbidden;
84+
@get
85+
@route("/groups/{groupId}/proposals")
86+
op getProposals(@path groupId: string): Proposal[] | NotFoundOrForbidden;
8587
}
86-
87-
/**
88-
* Get all pending proposals for a group
89-
*/
90-
@get
91-
@route("/groups/{groupId}/proposals")
92-
op getProposals(@path groupId: string): Proposal[] | NotFoundOrForbidden;
93-
94-
/**
95-
* Get the latest commit for a group
96-
*/
97-
@get
98-
@route("/groups/{groupId}/commits/latest")
99-
op getLatestCommit(@path groupId: string): Commit | NotFoundOrForbidden;
100-
10188
namespace keypackages {
10289
/**
10390
* Upload KeyPackages to the server, enabling other actors to encrypt messages for you and form

0 commit comments

Comments
 (0)