1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-08 05:47:07 +09:00

GO-4400 Enrich invite info responses with type and permissions

This commit is contained in:
Mikhail Rakhmanov 2025-05-15 10:18:19 +02:00
parent 67587894e2
commit de4fe08338
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
6 changed files with 1322 additions and 1167 deletions

View file

@ -83,6 +83,8 @@ func (mw *Middleware) SpaceInviteGenerate(cctx context.Context, req *pb.RpcSpace
return &pb.RpcSpaceInviteGenerateResponse{
InviteCid: inviteInfo.InviteFileCid,
InviteFileKey: inviteInfo.InviteFileKey,
InviteType: model.InviteType(inviteInfo.InviteType),
Permissions: domain.ConvertAclPermissions(inviteInfo.Permissions),
}
}
@ -124,6 +126,8 @@ func (mw *Middleware) SpaceInviteGetCurrent(cctx context.Context, req *pb.RpcSpa
return &pb.RpcSpaceInviteGetCurrentResponse{
InviteCid: inviteInfo.InviteFileCid,
InviteFileKey: inviteInfo.InviteFileKey,
InviteType: model.InviteType(inviteInfo.InviteType),
Permissions: domain.ConvertAclPermissions(inviteInfo.Permissions),
}
}

View file

@ -19946,6 +19946,8 @@ Available undo/redo operations
| error | [Rpc.Space.InviteGenerate.Response.Error](#anytype-Rpc-Space-InviteGenerate-Response-Error) | | |
| inviteCid | [string](#string) | | |
| inviteFileKey | [string](#string) | | |
| inviteType | [model.InviteType](#anytype-model-InviteType) | | |
| permissions | [model.ParticipantPermissions](#anytype-model-ParticipantPermissions) | | |
@ -20004,6 +20006,8 @@ Available undo/redo operations
| error | [Rpc.Space.InviteGetCurrent.Response.Error](#anytype-Rpc-Space-InviteGetCurrent-Response-Error) | | |
| inviteCid | [string](#string) | | |
| inviteFileKey | [string](#string) | | |
| inviteType | [model.InviteType](#anytype-model-InviteType) | | |
| permissions | [model.ParticipantPermissions](#anytype-model-ParticipantPermissions) | | |

2
go.mod
View file

@ -8,7 +8,7 @@ require (
github.com/VividCortex/ewma v1.2.0
github.com/adrium/goheif v0.0.0-20230113233934-ca402e77a786
github.com/anyproto/any-store v0.2.0
github.com/anyproto/any-sync v0.7.6-0.20250513194226-2f661565dcca
github.com/anyproto/any-sync v0.7.6-0.20250515080349-03fd12ac2a3e
github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a
github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250402124745-6451298047f7
github.com/anyproto/go-chash v0.1.0

2
go.sum
View file

@ -86,6 +86,8 @@ github.com/anyproto/any-sync v0.7.6-0.20250513132905-854823d81e74 h1:Io1SWrvvWjn
github.com/anyproto/any-sync v0.7.6-0.20250513132905-854823d81e74/go.mod h1:G6i3PT6pN6lcC5rim5Ed7ppUPuQgU5PyHgiqskrggL0=
github.com/anyproto/any-sync v0.7.6-0.20250513194226-2f661565dcca h1:DXXRxTfKBA8q22wCDvng182WjRjeAQqmGaZs/hXdMyo=
github.com/anyproto/any-sync v0.7.6-0.20250513194226-2f661565dcca/go.mod h1:G6i3PT6pN6lcC5rim5Ed7ppUPuQgU5PyHgiqskrggL0=
github.com/anyproto/any-sync v0.7.6-0.20250515080349-03fd12ac2a3e h1:FIZDZYAVB5ZJOKZZI9cJYcfKeyH51MEOLTqbVC809Js=
github.com/anyproto/any-sync v0.7.6-0.20250515080349-03fd12ac2a3e/go.mod h1:G6i3PT6pN6lcC5rim5Ed7ppUPuQgU5PyHgiqskrggL0=
github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a h1:ZZM+0OUCQMWSLSflpkf0ZMVo3V76qEDDIXPpQOClNs0=
github.com/anyproto/anytype-publish-server/publishclient v0.0.0-20250131145601-de288583ff2a/go.mod h1:4fkueCZcGniSMXkrwESO8zzERrh/L7WHimRNWecfGM0=
github.com/anyproto/anytype-push-server/pushclient v0.0.0-20250402124745-6451298047f7 h1:oKkEnxnN1jeB1Ty20CTMH3w4WkCrV8dOQy1Myetg7XA=

File diff suppressed because it is too large Load diff

View file

@ -186,6 +186,8 @@ message Rpc {
Error error = 1;
string inviteCid = 2;
string inviteFileKey = 3;
model.InviteType inviteType = 4;
model.ParticipantPermissions permissions = 5;
message Error {
Code code = 1;
@ -241,6 +243,8 @@ message Rpc {
Error error = 1;
string inviteCid = 2;
string inviteFileKey = 3;
model.InviteType inviteType = 4;
model.ParticipantPermissions permissions = 5;
message Error {
Code code = 1;