diff --git a/backend/daemon/api/accounts/v1alpha/accounts.go b/backend/daemon/api/accounts/v1alpha/accounts.go index 3fe72f7cde..bbeec841ff 100644 --- a/backend/daemon/api/accounts/v1alpha/accounts.go +++ b/backend/daemon/api/accounts/v1alpha/accounts.go @@ -156,15 +156,6 @@ func getDelegation(ctx context.Context, me core.Identity, blobs *hyper.Storage) return out, nil } -func (srv *Server) getDelegation(ctx context.Context) (cid.Cid, error) { - me, err := srv.getMe() - if err != nil { - return cid.Undef, err - } - - return getDelegation(ctx, me, srv.blobs) -} - // UpdateProfile implements the corresponding gRPC method. func (srv *Server) UpdateProfile(ctx context.Context, in *accounts.Profile) (*accounts.Account, error) { me, err := srv.getMe() diff --git a/backend/daemon/api/documents/v1alpha/comments.go.off b/backend/daemon/api/documents/v1alpha/comments.go.off deleted file mode 100644 index 640541ab73..0000000000 --- a/backend/daemon/api/documents/v1alpha/comments.go.off +++ /dev/null @@ -1,343 +0,0 @@ -package documents - -import ( - "context" - "fmt" - "mintter/backend/backlinks" - documents "mintter/backend/genproto/documents/v1alpha" - "mintter/backend/pkg/errutil" - "mintter/backend/vcs" - "mintter/backend/vcs/hlc" - "mintter/backend/vcs/mttdoc" - "mintter/backend/vcs/sqlitevcs" - vcsdb "mintter/backend/vcs/sqlitevcs" - "time" - - "github.com/ipfs/go-cid" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/types/known/emptypb" -) - -// CreateConversation implements the Comments server. -func (api *Server) CreateConversation(ctx context.Context, in *documents.CreateConversationRequest) (*documents.Conversation, error) { - me, err := api.me.Await(ctx) - if err != nil { - return nil, err - } - - if in.DocumentId == "" { - return nil, errutil.MissingArgument("documentID") - } - - docid, err := cid.Decode(in.DocumentId) - if err != nil { - return nil, errutil.ParseError("documentID", in.DocumentId, docid, err) - } - - if err := validateSelectors("selectors", in.Selectors); err != nil { - return nil, err - } - - if err := validateComment("initialComment", in.InitialComment); err != nil { - return nil, err - } - - clock := hlc.NewClock() - - perma, err := vcs.EncodePermanode(mttdoc.NewConversationPermanode(me.AccountID(), clock.Now())) - if err != nil { - return nil, err - } - - conn, release, err := api.vcsdb.Conn(ctx) - if err != nil { - return nil, err - } - defer release() - - if err := conn.WithTx(true, func() error { - meLocal := conn.LookupIdentity(me) - convo := conn.NewObject(perma) - change := conn.NewChange(convo, meLocal, nil, clock) - batch := vcs.NewBatch(clock, me.DeviceKey().Abbrev()) - - batch.Add(vcs.RootNode, mttdoc.AttrConvDocument, docid) - - for _, sel := range in.Selectors { - snode := vcs.NewNodeIDv1(time.Now()) - rev, err := cid.Decode(sel.BlockRevision) - if err != nil { - return errutil.ParseError("selectors.blockRevision", sel.BlockRevision, rev, err) - } - batch.Add(snode, mttdoc.AttrConvSelectorBlockID, sel.BlockId) - batch.Add(snode, mttdoc.AttrConvSelectorBlockRevision, rev) - // If we have end on the selector we must have start, meaning that it's - // a fine-grained selection, not the whole block. - if sel.End != 0 { - batch.Add(snode, mttdoc.AttrConvSelectorStart, int(sel.Start)) - batch.Add(snode, mttdoc.AttrConvSelectorEnd, int(sel.End)) - } - batch.Add(vcs.RootNode, mttdoc.AttrConvSelector, snode) - } - - batch.Add(vcs.RootNode, mttdoc.AttrBlockSnapshot, encodeBlock(in.InitialComment)) - - dirty := batch.Dirty() - - conn.AddDatoms(convo, change, dirty...) - conn.SaveVersion(convo, "main", meLocal, vcsdb.LocalVersion{change}) - conn.EncodeChange(change, me.DeviceKey()) - - for _, d := range dirty { - if err := backlinks.IndexDatom(conn, convo, change, d); err != nil { - return err - } - } - - return nil - }); err != nil { - return nil, err - } - - return api.loadConversation(conn, perma.ID) -} - -// AddComment implements the Comments server. -func (api *Server) AddComment(ctx context.Context, in *documents.AddCommentRequest) (*documents.Block, error) { - me, err := api.me.Await(ctx) - if err != nil { - return nil, err - } - - if in.ConversationId == "" { - return nil, errutil.MissingArgument("conversationID") - } - - convid, err := cid.Decode(in.ConversationId) - if err != nil { - return nil, errutil.ParseError("conversationID", in.ConversationId, convid, err) - } - - if err := validateComment("comment", in.Comment); err != nil { - return nil, err - } - - conn, release, err := api.vcsdb.Conn(ctx) - if err != nil { - return nil, err - } - defer release() - - if err := conn.WithTx(true, func() error { - meLocal := conn.LookupIdentity(me) - obj := conn.LookupPermanode(convid) - - clock := hlc.NewClock() - main := conn.GetVersion(obj, "main", meLocal) - for _, v := range main { - clock.Track(hlc.Unpack(conn.GetChangeMaxTime(obj, v))) - } - - change := conn.NewChange(obj, meLocal, main, clock) - batch := vcs.NewBatch(clock, me.DeviceKey().Abbrev()) - - batch.Add(vcs.RootNode, mttdoc.AttrBlockSnapshot, encodeBlock(in.Comment)) - - dirty := batch.Dirty() - conn.AddDatoms(obj, change, dirty...) - conn.SaveVersion(obj, "main", meLocal, vcsdb.LocalVersion{change}) - blk := conn.EncodeChange(change, me.DeviceKey()) - - if err := conn.Err(); err != nil { - return nil - } - - in.Comment.Revision = blk.Cid().String() - - for _, d := range dirty { - if err := backlinks.IndexDatom(conn, obj, change, d); err != nil { - return err - } - } - - return nil - }); err != nil { - return nil, err - } - - return in.Comment, nil -} - -// DeleteConversation implements the Comments server. -func (api *Server) DeleteConversation(context.Context, *documents.DeleteConversationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented") -} - -// ResolveConversation implements the Comments server. -func (api *Server) ResolveConversation(context.Context, *documents.ResolveConversationRequest) (*documents.ResolveConversationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResolveConversation not implemented") -} - -// DeleteComment implements the Comments server. -func (api *Server) DeleteComment(context.Context, *documents.DeleteCommentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented") -} - -// ListConversations implements the Comments server. -func (api *Server) ListConversations(ctx context.Context, in *documents.ListConversationsRequest) (*documents.ListConversationsResponse, error) { - me, err := api.me.Await(ctx) - if err != nil { - return nil, err - } - - conn, release, err := api.vcsdb.Conn(ctx) - if err != nil { - return nil, err - } - defer release() - - doc, err := cid.Decode(in.DocumentId) - if err != nil { - return nil, errutil.ParseError("documentID", in.DocumentId, doc, err) - } - - var docConvos []sqlitevcs.LocalID - - if err := conn.WithTx(false, func() error { - meLocal := conn.LookupIdentity(me) - - convos := conn.ListObjectsByType(mttdoc.ConversationType) - for _, obj := range convos { - ver := conn.GetVersion(obj, "main", meLocal) - cs := conn.ResolveChangeSet(obj, ver) - it := conn.QueryValuesByAttr(obj, cs, vcs.RootNode, mttdoc.AttrConvDocument) - for it.Next() { - _, value := it.Item().Value() - vcid := value.(cid.Cid) - if !vcid.Equals(doc) { - continue - } - - docConvos = append(docConvos, obj) - } - } - - return nil - }); err != nil { - return nil, err - } - - resp := &documents.ListConversationsResponse{ - Conversations: make([]*documents.Conversation, len(docConvos)), - } - - for i, obj := range docConvos { - convo := conn.GetObjectCID(obj) - convpb, err := api.loadConversation(conn, convo) - if err != nil { - return nil, fmt.Errorf("failed to load conversation: %w", err) - } - - resp.Conversations[i] = convpb - } - - return resp, nil -} - -func (api *Server) loadConversation(conn *sqlitevcs.Conn, id cid.Cid) (*documents.Conversation, error) { - me := api.me.MustGet() - - convo := &documents.Conversation{ - Id: id.String(), - } - - if err := conn.WithTx(false, func() error { - obj := conn.LookupPermanode(id) - meLocal := conn.LookupIdentity(me) - ver := conn.GetVersion(obj, "main", meLocal) - cs := conn.ResolveChangeSet(obj, ver) - - sels := conn.QueryValuesByAttr(obj, cs, vcs.RootNode, mttdoc.AttrConvSelector) - for _, sel := range sels.Slice() { - selNode := sel.Value.(vcs.NodeID) - selBlock := conn.QueryLastValue(obj, cs, selNode, mttdoc.AttrConvSelectorBlockID) - if selBlock.IsZero() { - return fmt.Errorf("failed to find block on the selector in conversation: %s", id.String()) - } - selRev := conn.QueryLastValue(obj, cs, selNode, mttdoc.AttrConvSelectorBlockRevision) - if selRev.IsZero() { - return fmt.Errorf("failed to find block revision on the selector in conversation: %s", id.String()) - } - - selpb := &documents.Selector{ - BlockId: selBlock.Value.(string), - BlockRevision: selRev.Value.(cid.Cid).String(), - } - convo.Selectors = append(convo.Selectors, selpb) - - selStart := conn.QueryLastValue(obj, cs, selNode, mttdoc.AttrConvSelectorStart) - // If we don't have selector start range, we won't have the end either. - if selStart.IsZero() { - continue - } - - selpb.Start = int32(selStart.Value.(int)) - selEnd := conn.QueryLastValue(obj, cs, selNode, mttdoc.AttrConvSelectorEnd) - if selEnd.IsZero() { - return fmt.Errorf("failed to find select end while having selector start in conversation: %s", id.String()) - } - selpb.End = int32(selEnd.Value.(int)) - } - - blocks := conn.QueryValuesByAttr(obj, cs, vcs.RootNode, mttdoc.AttrBlockSnapshot) - for _, row := range blocks.Slice() { - blk := decodeBlock(conn, obj, row.OpID(), row.Value.([]byte)) - convo.Comments = append(convo.Comments, blk) - } - - return nil - }); err != nil { - return nil, err - } - - return convo, nil -} - -func validateSelectors(name string, in []*documents.Selector) error { - if len(in) == 0 { - return errutil.NotNil(name) - } - - for _, sel := range in { - if sel.BlockId == "" { - return errutil.MissingArgument(name + ".blockID") - } - - if sel.BlockRevision == "" { - return errutil.MissingArgument(name + ".blockRevision") - } - - if sel.Start > sel.End { - return errutil.Greater(name+".end", sel.End, sel.Start) - } - } - - return nil -} - -func validateComment(name string, in *documents.Block) error { - if in == nil { - return errutil.NotNil(name) - } - - if in.Type == "" { - return errutil.MissingArgument(name + ".type") - } - - if in.Text == "" { - return errutil.MissingArgument(name + ".text") - } - - return nil -} diff --git a/backend/daemon/api/documents/v1alpha/comments_test.go.off b/backend/daemon/api/documents/v1alpha/comments_test.go.off deleted file mode 100644 index 4b1a206159..0000000000 --- a/backend/daemon/api/documents/v1alpha/comments_test.go.off +++ /dev/null @@ -1,302 +0,0 @@ -package documents - -import ( - "context" - documents "mintter/backend/genproto/documents/v1alpha" - "mintter/backend/testutil" - "testing" - - "github.com/stretchr/testify/require" -) - -func TestCreateConversation(t *testing.T) { - t.Parallel() - - api := newTestDocsAPI(t, "alice") - ctx := context.Background() - - draft, err := api.CreateDraft(ctx, &documents.CreateDraftRequest{}) - require.NoError(t, err) - draft = updateDraft(ctx, t, api, draft.Id, []*documents.DocumentChange{ - {Op: &documents.DocumentChange_SetTitle{SetTitle: "My new document title"}}, - {Op: &documents.DocumentChange_SetSubtitle{SetSubtitle: "This is my document's abstract"}}, - {Op: &documents.DocumentChange_MoveBlock_{MoveBlock: &documents.DocumentChange_MoveBlock{BlockId: "b1"}}}, - {Op: &documents.DocumentChange_ReplaceBlock{ReplaceBlock: &documents.Block{ - Id: "b1", - Type: "statement", - Text: "Hello world!", - }}}, - }) - pub, err := api.PublishDraft(ctx, &documents.PublishDraftRequest{DocumentId: draft.Id}) - require.NoError(t, err) - - cmt1 := &documents.Block{ - Type: "comment", - Id: "c1", - Text: "What a mean statement!", - } - conv, err := api.CreateConversation(ctx, &documents.CreateConversationRequest{ - DocumentId: pub.Document.Id, - Selectors: []*documents.Selector{ - { - BlockId: "b1", - Start: 0, - End: 5, - BlockRevision: pub.Document.Children[0].Block.Revision, - }, - }, - InitialComment: cmt1, - }) - require.NoError(t, err) - require.NotNil(t, conv) - - require.Len(t, conv.Comments, 1, "must have initial comment") - cmt1.Revision = conv.Comments[0].Revision - testutil.ProtoEqual(t, cmt1, conv.Comments[0], "initial comment must match") - require.NotEqual(t, "", conv.Comments[0].Revision, "comment must have last change ID") -} - -func TestAddComment(t *testing.T) { - t.Parallel() - - api := newTestDocsAPI(t, "alice") - ctx := context.Background() - - draft, err := api.CreateDraft(ctx, &documents.CreateDraftRequest{}) - require.NoError(t, err) - draft = updateDraft(ctx, t, api, draft.Id, []*documents.DocumentChange{ - {Op: &documents.DocumentChange_SetTitle{SetTitle: "My new document title"}}, - {Op: &documents.DocumentChange_SetSubtitle{SetSubtitle: "This is my document's abstract"}}, - {Op: &documents.DocumentChange_MoveBlock_{MoveBlock: &documents.DocumentChange_MoveBlock{BlockId: "b1"}}}, - {Op: &documents.DocumentChange_ReplaceBlock{ReplaceBlock: &documents.Block{ - Id: "b1", - Type: "statement", - Text: "Hello world!", - }}}, - }) - pub, err := api.PublishDraft(ctx, &documents.PublishDraftRequest{DocumentId: draft.Id}) - require.NoError(t, err) - - // Adding first conversation. - { - conv, err := api.CreateConversation(ctx, &documents.CreateConversationRequest{ - DocumentId: pub.Document.Id, - Selectors: []*documents.Selector{ - { - BlockId: "b1", - Start: 0, - End: 5, - BlockRevision: pub.Document.Children[0].Block.Revision, - }, - }, - InitialComment: &documents.Block{ - Type: "comment", - Id: "c1", - Text: "What a mean statement!", - }, - }) - require.NoError(t, err) - - // Validate initial comment. - var cmt1 *documents.Block - { - cmt1 = &documents.Block{ - Id: "c2", - Type: "comment", - Text: "No, that's actually a great comment!", - } - resp, err := api.AddComment(ctx, &documents.AddCommentRequest{ - ConversationId: conv.Id, - Comment: cmt1, - }) - require.NoError(t, err) - require.NotEqual(t, "", resp.Revision, "added comment must have last change id") - cmt1.Revision = resp.Revision - testutil.ProtoEqual(t, cmt1, resp, "returned comment must match") - } - - // Validate second comment. - var cmt2 *documents.Block - { - cmt2 = &documents.Block{ - Id: "c3", - Type: "comment", - Text: "Are you kidding me?", - } - resp, err := api.AddComment(ctx, &documents.AddCommentRequest{ - ConversationId: conv.Id, - Comment: cmt2, - }) - require.NoError(t, err) - require.NotEqual(t, "", resp.Revision, "added comment must have last change id") - cmt2.Revision = resp.Revision - testutil.ProtoEqual(t, cmt2, resp, "returned comment must match") - } - - require.NotEqual(t, cmt1.Revision, cmt2.Revision, "comments must have different revisions") - } -} - -func TestListConversations_Single(t *testing.T) { - t.Parallel() - - api := newTestDocsAPI(t, "alice") - ctx := context.Background() - - draft, err := api.CreateDraft(ctx, &documents.CreateDraftRequest{}) - require.NoError(t, err) - draft = updateDraft(ctx, t, api, draft.Id, []*documents.DocumentChange{ - {Op: &documents.DocumentChange_SetTitle{SetTitle: "My new document title"}}, - {Op: &documents.DocumentChange_SetSubtitle{SetSubtitle: "This is my document's abstract"}}, - {Op: &documents.DocumentChange_MoveBlock_{MoveBlock: &documents.DocumentChange_MoveBlock{BlockId: "b1"}}}, - {Op: &documents.DocumentChange_ReplaceBlock{ReplaceBlock: &documents.Block{ - Id: "b1", - Type: "statement", - Text: "Hello world!", - }}}, - }) - pub, err := api.PublishDraft(ctx, &documents.PublishDraftRequest{DocumentId: draft.Id}) - require.NoError(t, err) - - conv1, err := api.CreateConversation(ctx, &documents.CreateConversationRequest{ - DocumentId: pub.Document.Id, - Selectors: []*documents.Selector{ - { - BlockId: "b1", - Start: 0, - End: 5, - BlockRevision: pub.Document.Children[0].Block.Revision, - }, - }, - InitialComment: &documents.Block{ - Id: "c1", - Type: "comment", - Text: "What a mean statement!", - }, - }) - require.NoError(t, err) - - cmt1 := conv1.Comments[0] - cmt2, err := api.AddComment(ctx, &documents.AddCommentRequest{ - ConversationId: conv1.Id, - Comment: &documents.Block{ - Id: "c2", - Type: "comment", - Text: "No, that's actually a great comment!", - }, - }) - require.NoError(t, err) - - list, err := api.ListConversations(ctx, &documents.ListConversationsRequest{ - DocumentId: pub.Document.Id, - }) - require.NoError(t, err) - - testutil.ProtoEqual(t, cmt1, list.Conversations[0].Comments[0], "1 listed comments must match added comment") - testutil.ProtoEqual(t, cmt2, list.Conversations[0].Comments[1], "2 listed comments must match added comment") -} - -func TestListConversations_ManyComments(t *testing.T) { - t.Parallel() - - api := newTestDocsAPI(t, "alice") - ctx := context.Background() - - draft, err := api.CreateDraft(ctx, &documents.CreateDraftRequest{}) - require.NoError(t, err) - draft = updateDraft(ctx, t, api, draft.Id, []*documents.DocumentChange{ - {Op: &documents.DocumentChange_SetTitle{SetTitle: "My new document title"}}, - {Op: &documents.DocumentChange_SetSubtitle{SetSubtitle: "This is my document's abstract"}}, - {Op: &documents.DocumentChange_MoveBlock_{MoveBlock: &documents.DocumentChange_MoveBlock{BlockId: "b1"}}}, - {Op: &documents.DocumentChange_ReplaceBlock{ReplaceBlock: &documents.Block{ - Id: "b1", - Type: "statement", - Text: "Hello world!", - }}}, - }) - pub, err := api.PublishDraft(ctx, &documents.PublishDraftRequest{DocumentId: draft.Id}) - require.NoError(t, err) - - comments := map[string]*documents.Block{} - - conv1, err := api.CreateConversation(ctx, &documents.CreateConversationRequest{ - DocumentId: pub.Document.Id, - Selectors: []*documents.Selector{ - { - BlockId: "b1", - Start: 0, - End: 5, - BlockRevision: pub.Document.Children[0].Block.Revision, - }, - }, - InitialComment: &documents.Block{ - Id: "c1", - Type: "comment", - Text: "What a mean statement!", - }, - }) - require.NoError(t, err) - comments[conv1.Comments[0].Id] = conv1.Comments[0] - - cmt2, err := api.AddComment(ctx, &documents.AddCommentRequest{ - ConversationId: conv1.Id, - Comment: &documents.Block{ - Id: "c2", - Type: "comment", - Text: "No, that's actually a great comment!", - }, - }) - require.NoError(t, err) - comments[cmt2.Id] = cmt2 - - conv2, err := api.CreateConversation(ctx, &documents.CreateConversationRequest{ - DocumentId: pub.Document.Id, - Selectors: []*documents.Selector{ - { - BlockId: "b1", - BlockRevision: pub.Document.Children[0].Block.Revision, - }, - }, - InitialComment: &documents.Block{ - Id: "c3", - Type: "comment", - Text: "I bet this whole block is just a test", - }, - }) - require.NoError(t, err) - comments[conv2.Comments[0].Id] = conv2.Comments[0] - - cmt4, err := api.AddComment(ctx, &documents.AddCommentRequest{ - ConversationId: conv2.Id, - Comment: &documents.Block{ - Id: "c4", - Type: "comment", - Text: "Indeed!", - }, - }) - require.NoError(t, err) - comments[cmt4.Id] = cmt4 - - require.Len(t, comments, 4, "must have 4 comments total") - - list, err := api.ListConversations(ctx, &documents.ListConversationsRequest{ - DocumentId: pub.Document.Id, - }) - require.NoError(t, err) - - got := map[string]*documents.Block{} - - require.Len(t, list.Conversations, 2, "must have 2 conversations") - for _, conv := range list.Conversations { - for _, cmt := range conv.Comments { - got[cmt.Id] = cmt - } - } - - require.Equal(t, len(comments), len(got), "must list all added comments") - - for k := range got { - want := comments[k] - testutil.ProtoEqual(t, want, got[k], "comment %s doesn't match", k) - } -} diff --git a/backend/daemon/api/register.go b/backend/daemon/api/register.go index 79b5edfe6e..1e83f3dd23 100644 --- a/backend/daemon/api/register.go +++ b/backend/daemon/api/register.go @@ -19,8 +19,6 @@ func (s Server) Register(srv *grpc.Server) { documents.RegisterContentGraphServer(srv, s.Documents) documents.RegisterDraftsServer(srv, s.Documents) documents.RegisterPublicationsServer(srv, s.Documents) - // documents.RegisterCommentsServer(srv, s.Documents) - documents.RegisterCommentsServer(srv, documents.UnimplementedCommentsServer{}) documents.RegisterChangesServer(srv, s.Documents) networking.RegisterNetworkingServer(srv, s.Networking) diff --git a/backend/genproto/documents/v1alpha/comments.pb.go b/backend/genproto/documents/v1alpha/comments.pb.go deleted file mode 100644 index 3fc841379b..0000000000 --- a/backend/genproto/documents/v1alpha/comments.pb.go +++ /dev/null @@ -1,952 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc v3.21.12 -// source: documents/v1alpha/comments.proto - -package documents - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Request to create a conversation. -type CreateConversationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. The ID of the publication for which the conversation should be created. - DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - // Required. Selected portions in the original document which are being commented on. - // At least one element must be present. - Selectors []*Selector `protobuf:"bytes,2,rep,name=selectors,proto3" json:"selectors,omitempty"` - // Required. The first comment that starts the conversation. - InitialComment *Block `protobuf:"bytes,3,opt,name=initial_comment,json=initialComment,proto3" json:"initial_comment,omitempty"` -} - -func (x *CreateConversationRequest) Reset() { - *x = CreateConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateConversationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateConversationRequest) ProtoMessage() {} - -func (x *CreateConversationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateConversationRequest.ProtoReflect.Descriptor instead. -func (*CreateConversationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{0} -} - -func (x *CreateConversationRequest) GetDocumentId() string { - if x != nil { - return x.DocumentId - } - return "" -} - -func (x *CreateConversationRequest) GetSelectors() []*Selector { - if x != nil { - return x.Selectors - } - return nil -} - -func (x *CreateConversationRequest) GetInitialComment() *Block { - if x != nil { - return x.InitialComment - } - return nil -} - -// Request to add a comment. -type AddCommentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the existing conversation. - ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` - // Block corresponding to the text of the comment. - // Using a block ID that already exists in the conversation will replace the comment. - Comment *Block `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` -} - -func (x *AddCommentRequest) Reset() { - *x = AddCommentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddCommentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddCommentRequest) ProtoMessage() {} - -func (x *AddCommentRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddCommentRequest.ProtoReflect.Descriptor instead. -func (*AddCommentRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{1} -} - -func (x *AddCommentRequest) GetConversationId() string { - if x != nil { - return x.ConversationId - } - return "" -} - -func (x *AddCommentRequest) GetComment() *Block { - if x != nil { - return x.Comment - } - return nil -} - -// Request to delete a conversation. -type DeleteConversationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the conversation to delete. - ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` -} - -func (x *DeleteConversationRequest) Reset() { - *x = DeleteConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteConversationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteConversationRequest) ProtoMessage() {} - -func (x *DeleteConversationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteConversationRequest.ProtoReflect.Descriptor instead. -func (*DeleteConversationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteConversationRequest) GetConversationId() string { - if x != nil { - return x.ConversationId - } - return "" -} - -// Request to resolve a conversation. -type ResolveConversationRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the conversation to resolve. - ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` -} - -func (x *ResolveConversationRequest) Reset() { - *x = ResolveConversationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResolveConversationRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveConversationRequest) ProtoMessage() {} - -func (x *ResolveConversationRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveConversationRequest.ProtoReflect.Descriptor instead. -func (*ResolveConversationRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{3} -} - -func (x *ResolveConversationRequest) GetConversationId() string { - if x != nil { - return x.ConversationId - } - return "" -} - -// Response to resolve a conversation. -type ResolveConversationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ResolveConversationResponse) Reset() { - *x = ResolveConversationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResolveConversationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResolveConversationResponse) ProtoMessage() {} - -func (x *ResolveConversationResponse) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResolveConversationResponse.ProtoReflect.Descriptor instead. -func (*ResolveConversationResponse) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{4} -} - -// Request to delete a comment from a conversation. -type DeleteCommentRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. ID of the conversation. - ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"` - // Required. ID of the comment block to be deleted. - BlockId string `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` -} - -func (x *DeleteCommentRequest) Reset() { - *x = DeleteCommentRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteCommentRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteCommentRequest) ProtoMessage() {} - -func (x *DeleteCommentRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteCommentRequest.ProtoReflect.Descriptor instead. -func (*DeleteCommentRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{5} -} - -func (x *DeleteCommentRequest) GetConversationId() string { - if x != nil { - return x.ConversationId - } - return "" -} - -func (x *DeleteCommentRequest) GetBlockId() string { - if x != nil { - return x.BlockId - } - return "" -} - -// Request to list conversations. -type ListConversationsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. Document ID for which conversations should be listed. - DocumentId string `protobuf:"bytes,1,opt,name=document_id,json=documentId,proto3" json:"document_id,omitempty"` - // Optional. Number of results per page. - PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. Token for the page to return. - PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` -} - -func (x *ListConversationsRequest) Reset() { - *x = ListConversationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListConversationsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListConversationsRequest) ProtoMessage() {} - -func (x *ListConversationsRequest) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListConversationsRequest.ProtoReflect.Descriptor instead. -func (*ListConversationsRequest) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{6} -} - -func (x *ListConversationsRequest) GetDocumentId() string { - if x != nil { - return x.DocumentId - } - return "" -} - -func (x *ListConversationsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListConversationsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -// Response with a list of conversations. -type ListConversationsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Conversations matching the list request. - Conversations []*Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations,omitempty"` - // Token for the next page if there're any. - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListConversationsResponse) Reset() { - *x = ListConversationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListConversationsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListConversationsResponse) ProtoMessage() {} - -func (x *ListConversationsResponse) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListConversationsResponse.ProtoReflect.Descriptor instead. -func (*ListConversationsResponse) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{7} -} - -func (x *ListConversationsResponse) GetConversations() []*Conversation { - if x != nil { - return x.Conversations - } - return nil -} - -func (x *ListConversationsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -// Selector defines the selected portion of text in a given block as an open-ended interval [start, end). -// If the interval is missing, the whole block is assumed. -type Selector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Required. ID of the block in the original document which is being commented on. - BlockId string `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - // Required. Specific block revision which is being commented. - BlockRevision string `protobuf:"bytes,2,opt,name=block_revision,json=blockRevision,proto3" json:"block_revision,omitempty"` - // Optional. Start position of the selection within the block. Expressed in Unicode Code Points. - // If start is specified, end must be specified as well. Must be start < end. - Start int32 `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"` - // Optional. End position of the selection within the block. Expressed in Unicode Code Points. - // Required if start was specified. Must be greater than start if specified. - End int32 `protobuf:"varint,4,opt,name=end,proto3" json:"end,omitempty"` -} - -func (x *Selector) Reset() { - *x = Selector{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Selector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Selector) ProtoMessage() {} - -func (x *Selector) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Selector.ProtoReflect.Descriptor instead. -func (*Selector) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{8} -} - -func (x *Selector) GetBlockId() string { - if x != nil { - return x.BlockId - } - return "" -} - -func (x *Selector) GetBlockRevision() string { - if x != nil { - return x.BlockRevision - } - return "" -} - -func (x *Selector) GetStart() int32 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Selector) GetEnd() int32 { - if x != nil { - return x.End - } - return 0 -} - -// Conversation is a set of comments anchored to a particular selection in a document. -type Conversation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ID of the Conversation. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // Selected portions of the original document which are being commented on. - Selectors []*Selector `protobuf:"bytes,2,rep,name=selectors,proto3" json:"selectors,omitempty"` - // List of comments in the conversation. - // Ordered by time. - Comments []*Block `protobuf:"bytes,3,rep,name=comments,proto3" json:"comments,omitempty"` -} - -func (x *Conversation) Reset() { - *x = Conversation{} - if protoimpl.UnsafeEnabled { - mi := &file_documents_v1alpha_comments_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Conversation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Conversation) ProtoMessage() {} - -func (x *Conversation) ProtoReflect() protoreflect.Message { - mi := &file_documents_v1alpha_comments_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Conversation.ProtoReflect.Descriptor instead. -func (*Conversation) Descriptor() ([]byte, []int) { - return file_documents_v1alpha_comments_proto_rawDescGZIP(), []int{9} -} - -func (x *Conversation) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Conversation) GetSelectors() []*Selector { - if x != nil { - return x.Selectors - } - return nil -} - -func (x *Conversation) GetComments() []*Block { - if x != nil { - return x.Comments - } - return nil -} - -var File_documents_v1alpha_comments_proto protoreflect.FileDescriptor - -var file_documents_v1alpha_comments_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xd2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, - 0x12, 0x45, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, - 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x73, 0x65, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, - 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, - 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x07, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x44, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x1a, 0x52, 0x65, - 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x5a, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x22, 0x77, 0x0a, 0x18, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, - 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x74, - 0x0a, 0x08, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x72, - 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x03, 0x65, 0x6e, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x45, 0x0a, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x09, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x08, - 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xcb, - 0x05, 0x0a, 0x08, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x7b, 0x0a, 0x12, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, - 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x66, - 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, - 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x6c, - 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, - 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, - 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x12, 0x86, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, - 0x2e, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, - 0x68, 0x61, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x36, 0x5a, 0x34, - 0x6d, 0x69, 0x6e, 0x74, 0x74, 0x65, 0x72, 0x2f, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2f, - 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x3b, 0x64, 0x6f, 0x63, 0x75, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_documents_v1alpha_comments_proto_rawDescOnce sync.Once - file_documents_v1alpha_comments_proto_rawDescData = file_documents_v1alpha_comments_proto_rawDesc -) - -func file_documents_v1alpha_comments_proto_rawDescGZIP() []byte { - file_documents_v1alpha_comments_proto_rawDescOnce.Do(func() { - file_documents_v1alpha_comments_proto_rawDescData = protoimpl.X.CompressGZIP(file_documents_v1alpha_comments_proto_rawDescData) - }) - return file_documents_v1alpha_comments_proto_rawDescData -} - -var file_documents_v1alpha_comments_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_documents_v1alpha_comments_proto_goTypes = []interface{}{ - (*CreateConversationRequest)(nil), // 0: com.mintter.documents.v1alpha.CreateConversationRequest - (*AddCommentRequest)(nil), // 1: com.mintter.documents.v1alpha.AddCommentRequest - (*DeleteConversationRequest)(nil), // 2: com.mintter.documents.v1alpha.DeleteConversationRequest - (*ResolveConversationRequest)(nil), // 3: com.mintter.documents.v1alpha.ResolveConversationRequest - (*ResolveConversationResponse)(nil), // 4: com.mintter.documents.v1alpha.ResolveConversationResponse - (*DeleteCommentRequest)(nil), // 5: com.mintter.documents.v1alpha.DeleteCommentRequest - (*ListConversationsRequest)(nil), // 6: com.mintter.documents.v1alpha.ListConversationsRequest - (*ListConversationsResponse)(nil), // 7: com.mintter.documents.v1alpha.ListConversationsResponse - (*Selector)(nil), // 8: com.mintter.documents.v1alpha.Selector - (*Conversation)(nil), // 9: com.mintter.documents.v1alpha.Conversation - (*Block)(nil), // 10: com.mintter.documents.v1alpha.Block - (*emptypb.Empty)(nil), // 11: google.protobuf.Empty -} -var file_documents_v1alpha_comments_proto_depIdxs = []int32{ - 8, // 0: com.mintter.documents.v1alpha.CreateConversationRequest.selectors:type_name -> com.mintter.documents.v1alpha.Selector - 10, // 1: com.mintter.documents.v1alpha.CreateConversationRequest.initial_comment:type_name -> com.mintter.documents.v1alpha.Block - 10, // 2: com.mintter.documents.v1alpha.AddCommentRequest.comment:type_name -> com.mintter.documents.v1alpha.Block - 9, // 3: com.mintter.documents.v1alpha.ListConversationsResponse.conversations:type_name -> com.mintter.documents.v1alpha.Conversation - 8, // 4: com.mintter.documents.v1alpha.Conversation.selectors:type_name -> com.mintter.documents.v1alpha.Selector - 10, // 5: com.mintter.documents.v1alpha.Conversation.comments:type_name -> com.mintter.documents.v1alpha.Block - 0, // 6: com.mintter.documents.v1alpha.Comments.CreateConversation:input_type -> com.mintter.documents.v1alpha.CreateConversationRequest - 1, // 7: com.mintter.documents.v1alpha.Comments.AddComment:input_type -> com.mintter.documents.v1alpha.AddCommentRequest - 2, // 8: com.mintter.documents.v1alpha.Comments.DeleteConversation:input_type -> com.mintter.documents.v1alpha.DeleteConversationRequest - 3, // 9: com.mintter.documents.v1alpha.Comments.ResolveConversation:input_type -> com.mintter.documents.v1alpha.ResolveConversationRequest - 5, // 10: com.mintter.documents.v1alpha.Comments.DeleteComment:input_type -> com.mintter.documents.v1alpha.DeleteCommentRequest - 6, // 11: com.mintter.documents.v1alpha.Comments.ListConversations:input_type -> com.mintter.documents.v1alpha.ListConversationsRequest - 9, // 12: com.mintter.documents.v1alpha.Comments.CreateConversation:output_type -> com.mintter.documents.v1alpha.Conversation - 10, // 13: com.mintter.documents.v1alpha.Comments.AddComment:output_type -> com.mintter.documents.v1alpha.Block - 11, // 14: com.mintter.documents.v1alpha.Comments.DeleteConversation:output_type -> google.protobuf.Empty - 4, // 15: com.mintter.documents.v1alpha.Comments.ResolveConversation:output_type -> com.mintter.documents.v1alpha.ResolveConversationResponse - 11, // 16: com.mintter.documents.v1alpha.Comments.DeleteComment:output_type -> google.protobuf.Empty - 7, // 17: com.mintter.documents.v1alpha.Comments.ListConversations:output_type -> com.mintter.documents.v1alpha.ListConversationsResponse - 12, // [12:18] is the sub-list for method output_type - 6, // [6:12] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_documents_v1alpha_comments_proto_init() } -func file_documents_v1alpha_comments_proto_init() { - if File_documents_v1alpha_comments_proto != nil { - return - } - file_documents_v1alpha_documents_proto_init() - if !protoimpl.UnsafeEnabled { - file_documents_v1alpha_comments_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddCommentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveConversationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResolveConversationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteCommentRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListConversationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListConversationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Selector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_documents_v1alpha_comments_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Conversation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_documents_v1alpha_comments_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_documents_v1alpha_comments_proto_goTypes, - DependencyIndexes: file_documents_v1alpha_comments_proto_depIdxs, - MessageInfos: file_documents_v1alpha_comments_proto_msgTypes, - }.Build() - File_documents_v1alpha_comments_proto = out.File - file_documents_v1alpha_comments_proto_rawDesc = nil - file_documents_v1alpha_comments_proto_goTypes = nil - file_documents_v1alpha_comments_proto_depIdxs = nil -} diff --git a/backend/genproto/documents/v1alpha/comments_grpc.pb.go b/backend/genproto/documents/v1alpha/comments_grpc.pb.go deleted file mode 100644 index 17551217e9..0000000000 --- a/backend/genproto/documents/v1alpha/comments_grpc.pb.go +++ /dev/null @@ -1,296 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 -// source: documents/v1alpha/comments.proto - -package documents - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// CommentsClient is the client API for Comments service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type CommentsClient interface { - // Creates a new conversation about a particular selection in a document. - CreateConversation(ctx context.Context, in *CreateConversationRequest, opts ...grpc.CallOption) (*Conversation, error) - // Adds a comment to a previously existing conversation. - AddComment(ctx context.Context, in *AddCommentRequest, opts ...grpc.CallOption) (*Block, error) - // Deletes an existing conversation. - DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Marks an existing conversation as resolved. - ResolveConversation(ctx context.Context, in *ResolveConversationRequest, opts ...grpc.CallOption) (*ResolveConversationResponse, error) - // Deletes a comment from a conversation. - DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) - // Lists conversations of a particular document. - ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error) -} - -type commentsClient struct { - cc grpc.ClientConnInterface -} - -func NewCommentsClient(cc grpc.ClientConnInterface) CommentsClient { - return &commentsClient{cc} -} - -func (c *commentsClient) CreateConversation(ctx context.Context, in *CreateConversationRequest, opts ...grpc.CallOption) (*Conversation, error) { - out := new(Conversation) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/CreateConversation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsClient) AddComment(ctx context.Context, in *AddCommentRequest, opts ...grpc.CallOption) (*Block, error) { - out := new(Block) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/AddComment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsClient) DeleteConversation(ctx context.Context, in *DeleteConversationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/DeleteConversation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsClient) ResolveConversation(ctx context.Context, in *ResolveConversationRequest, opts ...grpc.CallOption) (*ResolveConversationResponse, error) { - out := new(ResolveConversationResponse) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/ResolveConversation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsClient) DeleteComment(ctx context.Context, in *DeleteCommentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/DeleteComment", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *commentsClient) ListConversations(ctx context.Context, in *ListConversationsRequest, opts ...grpc.CallOption) (*ListConversationsResponse, error) { - out := new(ListConversationsResponse) - err := c.cc.Invoke(ctx, "/com.mintter.documents.v1alpha.Comments/ListConversations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// CommentsServer is the server API for Comments service. -// All implementations should embed UnimplementedCommentsServer -// for forward compatibility -type CommentsServer interface { - // Creates a new conversation about a particular selection in a document. - CreateConversation(context.Context, *CreateConversationRequest) (*Conversation, error) - // Adds a comment to a previously existing conversation. - AddComment(context.Context, *AddCommentRequest) (*Block, error) - // Deletes an existing conversation. - DeleteConversation(context.Context, *DeleteConversationRequest) (*emptypb.Empty, error) - // Marks an existing conversation as resolved. - ResolveConversation(context.Context, *ResolveConversationRequest) (*ResolveConversationResponse, error) - // Deletes a comment from a conversation. - DeleteComment(context.Context, *DeleteCommentRequest) (*emptypb.Empty, error) - // Lists conversations of a particular document. - ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error) -} - -// UnimplementedCommentsServer should be embedded to have forward compatible implementations. -type UnimplementedCommentsServer struct { -} - -func (UnimplementedCommentsServer) CreateConversation(context.Context, *CreateConversationRequest) (*Conversation, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateConversation not implemented") -} -func (UnimplementedCommentsServer) AddComment(context.Context, *AddCommentRequest) (*Block, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddComment not implemented") -} -func (UnimplementedCommentsServer) DeleteConversation(context.Context, *DeleteConversationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteConversation not implemented") -} -func (UnimplementedCommentsServer) ResolveConversation(context.Context, *ResolveConversationRequest) (*ResolveConversationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResolveConversation not implemented") -} -func (UnimplementedCommentsServer) DeleteComment(context.Context, *DeleteCommentRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteComment not implemented") -} -func (UnimplementedCommentsServer) ListConversations(context.Context, *ListConversationsRequest) (*ListConversationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListConversations not implemented") -} - -// UnsafeCommentsServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to CommentsServer will -// result in compilation errors. -type UnsafeCommentsServer interface { - mustEmbedUnimplementedCommentsServer() -} - -func RegisterCommentsServer(s grpc.ServiceRegistrar, srv CommentsServer) { - s.RegisterService(&Comments_ServiceDesc, srv) -} - -func _Comments_CreateConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateConversationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).CreateConversation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/CreateConversation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).CreateConversation(ctx, req.(*CreateConversationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Comments_AddComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).AddComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/AddComment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).AddComment(ctx, req.(*AddCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Comments_DeleteConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteConversationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).DeleteConversation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/DeleteConversation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).DeleteConversation(ctx, req.(*DeleteConversationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Comments_ResolveConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResolveConversationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).ResolveConversation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/ResolveConversation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).ResolveConversation(ctx, req.(*ResolveConversationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Comments_DeleteComment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteCommentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).DeleteComment(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/DeleteComment", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).DeleteComment(ctx, req.(*DeleteCommentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Comments_ListConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListConversationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(CommentsServer).ListConversations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/com.mintter.documents.v1alpha.Comments/ListConversations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(CommentsServer).ListConversations(ctx, req.(*ListConversationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Comments_ServiceDesc is the grpc.ServiceDesc for Comments service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Comments_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "com.mintter.documents.v1alpha.Comments", - HandlerType: (*CommentsServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "CreateConversation", - Handler: _Comments_CreateConversation_Handler, - }, - { - MethodName: "AddComment", - Handler: _Comments_AddComment_Handler, - }, - { - MethodName: "DeleteConversation", - Handler: _Comments_DeleteConversation_Handler, - }, - { - MethodName: "ResolveConversation", - Handler: _Comments_ResolveConversation_Handler, - }, - { - MethodName: "DeleteComment", - Handler: _Comments_DeleteComment_Handler, - }, - { - MethodName: "ListConversations", - Handler: _Comments_ListConversations_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "documents/v1alpha/comments.proto", -} diff --git a/frontend/packages/app/models/comments.ts b/frontend/packages/app/models/comments.ts deleted file mode 100644 index 1dbae50cdc..0000000000 --- a/frontend/packages/app/models/comments.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {useQuery} from '@tanstack/react-query' -import {queryKeys} from './query-keys' -import {useGRPCClient} from '../app-context' - -export function useDocConversations(documentId?: string) { - const grpcClient = useGRPCClient() - return useQuery({ - queryFn: async () => { - let res = await grpcClient.comments.listConversations({ - documentId, - }) - return res.conversations - }, - - queryKey: [queryKeys.GET_PUBLICATION_CONVERSATIONS, documentId], - enabled: !!documentId, - }) -} diff --git a/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_connect.ts b/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_connect.ts index 7539a2384f..eb690c6226 100644 --- a/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_connect.ts +++ b/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file accounts/v1alpha/accounts.proto (package com.mintter.accounts.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_pb.ts b/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_pb.ts index 7d4bde5bef..b55b7a3c5f 100644 --- a/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_pb.ts +++ b/frontend/packages/shared/src/client/.generated/accounts/v1alpha/accounts_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file accounts/v1alpha/accounts.proto (package com.mintter.accounts.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_connect.ts b/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_connect.ts index 75534ab9fc..378aec5f3d 100644 --- a/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_connect.ts +++ b/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file daemon/v1alpha/daemon.proto (package com.mintter.daemon.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_pb.ts b/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_pb.ts index 4ebb202074..861d3b2dc5 100644 --- a/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_pb.ts +++ b/frontend/packages/shared/src/client/.generated/daemon/v1alpha/daemon_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file daemon/v1alpha/daemon.proto (package com.mintter.daemon.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_connect.ts index 97256e6aab..7a772ecb7d 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_connect.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_connect.ts @@ -1,6 +1,6 @@ // Deprecated. Use Entities API instead. -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/changes.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_pb.ts index ef91103aa1..511692f477 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_pb.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/changes_pb.ts @@ -1,6 +1,6 @@ // Deprecated. Use Entities API instead. -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/changes.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_connect.ts deleted file mode 100644 index 6848988838..0000000000 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_connect.ts +++ /dev/null @@ -1,86 +0,0 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" -// @generated from file documents/v1alpha/comments.proto (package com.mintter.documents.v1alpha, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { AddCommentRequest, Conversation, CreateConversationRequest, DeleteCommentRequest, DeleteConversationRequest, ListConversationsRequest, ListConversationsResponse, ResolveConversationRequest, ResolveConversationResponse } from "./comments_pb"; -import { Empty, MethodKind } from "@bufbuild/protobuf"; -import { Block } from "./documents_pb"; - -/** - * Comments service provides the way to add comments to publications. - * - * @generated from service com.mintter.documents.v1alpha.Comments - */ -export const Comments = { - typeName: "com.mintter.documents.v1alpha.Comments", - methods: { - /** - * Creates a new conversation about a particular selection in a document. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.CreateConversation - */ - createConversation: { - name: "CreateConversation", - I: CreateConversationRequest, - O: Conversation, - kind: MethodKind.Unary, - }, - /** - * Adds a comment to a previously existing conversation. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.AddComment - */ - addComment: { - name: "AddComment", - I: AddCommentRequest, - O: Block, - kind: MethodKind.Unary, - }, - /** - * Deletes an existing conversation. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.DeleteConversation - */ - deleteConversation: { - name: "DeleteConversation", - I: DeleteConversationRequest, - O: Empty, - kind: MethodKind.Unary, - }, - /** - * Marks an existing conversation as resolved. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.ResolveConversation - */ - resolveConversation: { - name: "ResolveConversation", - I: ResolveConversationRequest, - O: ResolveConversationResponse, - kind: MethodKind.Unary, - }, - /** - * Deletes a comment from a conversation. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.DeleteComment - */ - deleteComment: { - name: "DeleteComment", - I: DeleteCommentRequest, - O: Empty, - kind: MethodKind.Unary, - }, - /** - * Lists conversations of a particular document. - * - * @generated from rpc com.mintter.documents.v1alpha.Comments.ListConversations - */ - listConversations: { - name: "ListConversations", - I: ListConversationsRequest, - O: ListConversationsResponse, - kind: MethodKind.Unary, - }, - } -} as const; - diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_pb.ts deleted file mode 100644 index d554016349..0000000000 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/comments_pb.ts +++ /dev/null @@ -1,513 +0,0 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" -// @generated from file documents/v1alpha/comments.proto (package com.mintter.documents.v1alpha, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3 } from "@bufbuild/protobuf"; -import { Block } from "./documents_pb"; - -/** - * Request to create a conversation. - * - * @generated from message com.mintter.documents.v1alpha.CreateConversationRequest - */ -export class CreateConversationRequest extends Message { - /** - * Required. The ID of the publication for which the conversation should be created. - * - * @generated from field: string document_id = 1; - */ - documentId = ""; - - /** - * Required. Selected portions in the original document which are being commented on. - * At least one element must be present. - * - * @generated from field: repeated com.mintter.documents.v1alpha.Selector selectors = 2; - */ - selectors: Selector[] = []; - - /** - * Required. The first comment that starts the conversation. - * - * @generated from field: com.mintter.documents.v1alpha.Block initial_comment = 3; - */ - initialComment?: Block; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.CreateConversationRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "selectors", kind: "message", T: Selector, repeated: true }, - { no: 3, name: "initial_comment", kind: "message", T: Block }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateConversationRequest { - return new CreateConversationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateConversationRequest { - return new CreateConversationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CreateConversationRequest { - return new CreateConversationRequest().fromJsonString(jsonString, options); - } - - static equals(a: CreateConversationRequest | PlainMessage | undefined, b: CreateConversationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(CreateConversationRequest, a, b); - } -} - -/** - * Request to add a comment. - * - * @generated from message com.mintter.documents.v1alpha.AddCommentRequest - */ -export class AddCommentRequest extends Message { - /** - * ID of the existing conversation. - * - * @generated from field: string conversation_id = 1; - */ - conversationId = ""; - - /** - * Block corresponding to the text of the comment. - * Using a block ID that already exists in the conversation will replace the comment. - * - * @generated from field: com.mintter.documents.v1alpha.Block comment = 2; - */ - comment?: Block; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.AddCommentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "conversation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "comment", kind: "message", T: Block }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AddCommentRequest { - return new AddCommentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AddCommentRequest { - return new AddCommentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AddCommentRequest { - return new AddCommentRequest().fromJsonString(jsonString, options); - } - - static equals(a: AddCommentRequest | PlainMessage | undefined, b: AddCommentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(AddCommentRequest, a, b); - } -} - -/** - * Request to delete a conversation. - * - * @generated from message com.mintter.documents.v1alpha.DeleteConversationRequest - */ -export class DeleteConversationRequest extends Message { - /** - * ID of the conversation to delete. - * - * @generated from field: string conversation_id = 1; - */ - conversationId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.DeleteConversationRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "conversation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteConversationRequest { - return new DeleteConversationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteConversationRequest { - return new DeleteConversationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteConversationRequest { - return new DeleteConversationRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteConversationRequest | PlainMessage | undefined, b: DeleteConversationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteConversationRequest, a, b); - } -} - -/** - * Request to resolve a conversation. - * - * @generated from message com.mintter.documents.v1alpha.ResolveConversationRequest - */ -export class ResolveConversationRequest extends Message { - /** - * ID of the conversation to resolve. - * - * @generated from field: string conversation_id = 1; - */ - conversationId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.ResolveConversationRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "conversation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ResolveConversationRequest { - return new ResolveConversationRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ResolveConversationRequest { - return new ResolveConversationRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ResolveConversationRequest { - return new ResolveConversationRequest().fromJsonString(jsonString, options); - } - - static equals(a: ResolveConversationRequest | PlainMessage | undefined, b: ResolveConversationRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ResolveConversationRequest, a, b); - } -} - -/** - * Response to resolve a conversation. - * - * @generated from message com.mintter.documents.v1alpha.ResolveConversationResponse - */ -export class ResolveConversationResponse extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.ResolveConversationResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ResolveConversationResponse { - return new ResolveConversationResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ResolveConversationResponse { - return new ResolveConversationResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ResolveConversationResponse { - return new ResolveConversationResponse().fromJsonString(jsonString, options); - } - - static equals(a: ResolveConversationResponse | PlainMessage | undefined, b: ResolveConversationResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ResolveConversationResponse, a, b); - } -} - -/** - * Request to delete a comment from a conversation. - * - * @generated from message com.mintter.documents.v1alpha.DeleteCommentRequest - */ -export class DeleteCommentRequest extends Message { - /** - * Required. ID of the conversation. - * - * @generated from field: string conversation_id = 1; - */ - conversationId = ""; - - /** - * Required. ID of the comment block to be deleted. - * - * @generated from field: string block_id = 2; - */ - blockId = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.DeleteCommentRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "conversation_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "block_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteCommentRequest { - return new DeleteCommentRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteCommentRequest { - return new DeleteCommentRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DeleteCommentRequest { - return new DeleteCommentRequest().fromJsonString(jsonString, options); - } - - static equals(a: DeleteCommentRequest | PlainMessage | undefined, b: DeleteCommentRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(DeleteCommentRequest, a, b); - } -} - -/** - * Request to list conversations. - * - * @generated from message com.mintter.documents.v1alpha.ListConversationsRequest - */ -export class ListConversationsRequest extends Message { - /** - * Required. Document ID for which conversations should be listed. - * - * @generated from field: string document_id = 1; - */ - documentId = ""; - - /** - * Optional. Number of results per page. - * - * @generated from field: int32 page_size = 3; - */ - pageSize = 0; - - /** - * Optional. Token for the page to return. - * - * @generated from field: string page_token = 4; - */ - pageToken = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.ListConversationsRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "document_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "page_size", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 4, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ListConversationsRequest { - return new ListConversationsRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListConversationsRequest { - return new ListConversationsRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ListConversationsRequest { - return new ListConversationsRequest().fromJsonString(jsonString, options); - } - - static equals(a: ListConversationsRequest | PlainMessage | undefined, b: ListConversationsRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(ListConversationsRequest, a, b); - } -} - -/** - * Response with a list of conversations. - * - * @generated from message com.mintter.documents.v1alpha.ListConversationsResponse - */ -export class ListConversationsResponse extends Message { - /** - * Conversations matching the list request. - * - * @generated from field: repeated com.mintter.documents.v1alpha.Conversation conversations = 1; - */ - conversations: Conversation[] = []; - - /** - * Token for the next page if there're any. - * - * @generated from field: string next_page_token = 2; - */ - nextPageToken = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.ListConversationsResponse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "conversations", kind: "message", T: Conversation, repeated: true }, - { no: 2, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ListConversationsResponse { - return new ListConversationsResponse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ListConversationsResponse { - return new ListConversationsResponse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ListConversationsResponse { - return new ListConversationsResponse().fromJsonString(jsonString, options); - } - - static equals(a: ListConversationsResponse | PlainMessage | undefined, b: ListConversationsResponse | PlainMessage | undefined): boolean { - return proto3.util.equals(ListConversationsResponse, a, b); - } -} - -/** - * Selector defines the selected portion of text in a given block as an open-ended interval [start, end). - * If the interval is missing, the whole block is assumed. - * - * @generated from message com.mintter.documents.v1alpha.Selector - */ -export class Selector extends Message { - /** - * Required. ID of the block in the original document which is being commented on. - * - * @generated from field: string block_id = 1; - */ - blockId = ""; - - /** - * Required. Specific block revision which is being commented. - * - * @generated from field: string block_revision = 2; - */ - blockRevision = ""; - - /** - * Optional. Start position of the selection within the block. Expressed in Unicode Code Points. - * If start is specified, end must be specified as well. Must be start < end. - * - * @generated from field: int32 start = 3; - */ - start = 0; - - /** - * Optional. End position of the selection within the block. Expressed in Unicode Code Points. - * Required if start was specified. Must be greater than start if specified. - * - * @generated from field: int32 end = 4; - */ - end = 0; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.Selector"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "block_id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "block_revision", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "start", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 4, name: "end", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Selector { - return new Selector().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Selector { - return new Selector().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Selector { - return new Selector().fromJsonString(jsonString, options); - } - - static equals(a: Selector | PlainMessage | undefined, b: Selector | PlainMessage | undefined): boolean { - return proto3.util.equals(Selector, a, b); - } -} - -/** - * Conversation is a set of comments anchored to a particular selection in a document. - * - * @generated from message com.mintter.documents.v1alpha.Conversation - */ -export class Conversation extends Message { - /** - * ID of the Conversation. - * - * @generated from field: string id = 1; - */ - id = ""; - - /** - * Selected portions of the original document which are being commented on. - * - * @generated from field: repeated com.mintter.documents.v1alpha.Selector selectors = 2; - */ - selectors: Selector[] = []; - - /** - * List of comments in the conversation. - * Ordered by time. - * - * @generated from field: repeated com.mintter.documents.v1alpha.Block comments = 3; - */ - comments: Block[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "com.mintter.documents.v1alpha.Conversation"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "selectors", kind: "message", T: Selector, repeated: true }, - { no: 3, name: "comments", kind: "message", T: Block, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Conversation { - return new Conversation().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Conversation { - return new Conversation().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Conversation { - return new Conversation().fromJsonString(jsonString, options); - } - - static equals(a: Conversation | PlainMessage | undefined, b: Conversation | PlainMessage | undefined): boolean { - return proto3.util.equals(Conversation, a, b); - } -} - diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_connect.ts index 73eea6da89..2b7b66714e 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_connect.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/content_graph.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_pb.ts index c7b91459ad..a55ffd7c08 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_pb.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/content_graph_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/content_graph.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts index 5bdcd3027a..c5ebdc748e 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/documents.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts index 30efa3a029..3cc3671dc5 100644 --- a/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts +++ b/frontend/packages/shared/src/client/.generated/documents/v1alpha/documents_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file documents/v1alpha/documents.proto (package com.mintter.documents.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_connect.ts b/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_connect.ts index 0d42eb5d9d..b61c24de6a 100644 --- a/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_connect.ts +++ b/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file entities/v1alpha/entities.proto (package com.mintter.entities.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_pb.ts b/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_pb.ts index 89ee19ac35..202c0ca3bf 100644 --- a/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_pb.ts +++ b/frontend/packages/shared/src/client/.generated/entities/v1alpha/entities_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file entities/v1alpha/entities.proto (package com.mintter.entities.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_connect.ts b/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_connect.ts index 83197587df..b6acbaae67 100644 --- a/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_connect.ts +++ b/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file groups/v1alpha/groups.proto (package com.mintter.groups.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_pb.ts b/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_pb.ts index bafd344abd..ed9a6c834a 100644 --- a/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_pb.ts +++ b/frontend/packages/shared/src/client/.generated/groups/v1alpha/groups_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file groups/v1alpha/groups.proto (package com.mintter.groups.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_connect.ts b/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_connect.ts index 68c85fb519..e7ce0b9b71 100644 --- a/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_connect.ts +++ b/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file groups/v1alpha/website.proto (package com.mintter.groups.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_pb.ts b/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_pb.ts index 41864b6c5b..f8cda00666 100644 --- a/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_pb.ts +++ b/frontend/packages/shared/src/client/.generated/groups/v1alpha/website_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file groups/v1alpha/website.proto (package com.mintter.groups.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_connect.ts b/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_connect.ts index 1e313d0e6d..3798011591 100644 --- a/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_connect.ts +++ b/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_connect.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-connect-es v1.1.2 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-connect-es v1.1.3 with parameter "target=ts,import_extension=none" // @generated from file networking/v1alpha/networking.proto (package com.mintter.networking.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_pb.ts b/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_pb.ts index 331b0bda8d..991dbcb741 100644 --- a/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_pb.ts +++ b/frontend/packages/shared/src/client/.generated/networking/v1alpha/networking_pb.ts @@ -1,4 +1,4 @@ -// @generated by protoc-gen-es v1.3.1 with parameter "target=ts,import_extension=none" +// @generated by protoc-gen-es v1.4.1 with parameter "target=ts,import_extension=none" // @generated from file networking/v1alpha/networking.proto (package com.mintter.networking.v1alpha, syntax proto3) /* eslint-disable */ // @ts-nocheck diff --git a/frontend/packages/shared/src/client/index.ts b/frontend/packages/shared/src/client/index.ts index 7377706ae6..1373786c65 100644 --- a/frontend/packages/shared/src/client/index.ts +++ b/frontend/packages/shared/src/client/index.ts @@ -1,7 +1,6 @@ import {Accounts} from './.generated/accounts/v1alpha/accounts_connect' import {Daemon} from './.generated/daemon/v1alpha/daemon_connect' import {Changes} from './.generated/documents/v1alpha/changes_connect' -import {Comments} from './.generated/documents/v1alpha/comments_connect' import {ContentGraph} from './.generated/documents/v1alpha/content_graph_connect' import {Groups} from './.generated/groups/v1alpha/groups_connect' @@ -32,36 +31,10 @@ export type { RegisterRequest, RegisterResponse, } from './.generated/daemon/v1alpha/daemon_pb' -export { - Group, - Group_SiteInfo, - Role, - ListGroupsRequest, - ListDocumentGroupsRequest, - ListDocumentGroupsResponse, - ListGroupsResponse, -} from './.generated/groups/v1alpha/groups_pb' -export * from './.generated/groups/v1alpha/website_pb' -export * from './.generated/groups/v1alpha/website_connect' -export { - Change, - DiscoverEntityRequest, - DiscoverEntityResponse, - EntityTimeline, - GetChangeRequest, - GetEntityTimelineRequest, -} from './.generated/entities/v1alpha/entities_pb' export { ChangeInfo, GetChangeInfoRequest, } from './.generated/documents/v1alpha/changes_pb' -export { - Conversation, - CreateConversationRequest, - ListConversationsRequest, - ListConversationsResponse, - Selector, -} from './.generated/documents/v1alpha/comments_pb' export { LinkNode, ListCitationsResponse, @@ -83,6 +56,25 @@ export { ListPublicationsResponse, PublishDraftRequest, } from './.generated/documents/v1alpha/documents_pb' +export { + Change, + DiscoverEntityRequest, + DiscoverEntityResponse, + EntityTimeline, + GetChangeRequest, + GetEntityTimelineRequest, +} from './.generated/entities/v1alpha/entities_pb' +export { + Group, + Group_SiteInfo, + ListDocumentGroupsRequest, + ListDocumentGroupsResponse, + ListGroupsRequest, + ListGroupsResponse, + Role, +} from './.generated/groups/v1alpha/groups_pb' +export * from './.generated/groups/v1alpha/website_connect' +export * from './.generated/groups/v1alpha/website_pb' export {ConnectionStatus} from './.generated/networking/v1alpha/networking_pb' export type { ConnectRequest, @@ -92,12 +84,11 @@ export type { } from './.generated/networking/v1alpha/networking_pb' export * from './.generated/types' export * from './client-utils' -export * from './to-hm-block' export * from './from-hm-block' +export * from './to-hm-block' export { Accounts, Changes, - Comments, ContentGraph, Daemon, Document, diff --git a/frontend/packages/shared/src/grpc-client.ts b/frontend/packages/shared/src/grpc-client.ts index ef9a8b3bf1..a34b708429 100644 --- a/frontend/packages/shared/src/grpc-client.ts +++ b/frontend/packages/shared/src/grpc-client.ts @@ -2,7 +2,6 @@ import {createPromiseClient, PromiseClient} from '@connectrpc/connect' import { Accounts, Changes, - Comments, ContentGraph, Daemon, Drafts, @@ -16,7 +15,6 @@ import { export type GRPCClient = { accounts: PromiseClient contentGraph: PromiseClient - comments: PromiseClient changes: PromiseClient groups: PromiseClient entities: PromiseClient @@ -31,7 +29,6 @@ export function createGRPCClient(transport: any): GRPCClient { return { accounts: createPromiseClient(Accounts, transport), contentGraph: createPromiseClient(ContentGraph, transport), - comments: createPromiseClient(Comments, transport), changes: createPromiseClient(Changes, transport), drafts: createPromiseClient(Drafts, transport), publications: createPromiseClient(Publications, transport), diff --git a/proto/accounts/v1alpha/js.gensum b/proto/accounts/v1alpha/js.gensum index 499f7bbaf2..6b07cca783 100644 --- a/proto/accounts/v1alpha/js.gensum +++ b/proto/accounts/v1alpha/js.gensum @@ -1,2 +1,2 @@ srcs: c4600f222089723131e27d5ec269510c -outs: 880be27dfb1c2c2af57a1d9ba00e43d9 +outs: d6f65d7d66d5dfdb49e0d5a284809309 diff --git a/proto/daemon/v1alpha/js.gensum b/proto/daemon/v1alpha/js.gensum index e83aaf4109..5051aaf392 100644 --- a/proto/daemon/v1alpha/js.gensum +++ b/proto/daemon/v1alpha/js.gensum @@ -1,2 +1,2 @@ srcs: ce840ba5a45d27003c0c093ed6f183f9 -outs: 6bef70694949f85afc34f09387812a14 +outs: f568822981d5dbe67f6198da9b6619f7 diff --git a/proto/documents/v1alpha/comments.proto b/proto/documents/v1alpha/comments.proto deleted file mode 100644 index cdeb34c8f9..0000000000 --- a/proto/documents/v1alpha/comments.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package com.mintter.documents.v1alpha; - -import "google/protobuf/empty.proto"; -import "documents/v1alpha/documents.proto"; - -option go_package = "mintter/backend/genproto/documents/v1alpha;documents"; - -// Comments service provides the way to add comments to publications. -service Comments { - // Creates a new conversation about a particular selection in a document. - rpc CreateConversation(CreateConversationRequest) returns (Conversation); - - // Adds a comment to a previously existing conversation. - rpc AddComment(AddCommentRequest) returns (Block); - - // Deletes an existing conversation. - rpc DeleteConversation(DeleteConversationRequest) returns (google.protobuf.Empty); - - // Marks an existing conversation as resolved. - rpc ResolveConversation(ResolveConversationRequest) returns (ResolveConversationResponse); - - // Deletes a comment from a conversation. - rpc DeleteComment(DeleteCommentRequest) returns (google.protobuf.Empty); - - // Lists conversations of a particular document. - rpc ListConversations(ListConversationsRequest) returns (ListConversationsResponse); -} - -// Request to create a conversation. -message CreateConversationRequest { - // Required. The ID of the publication for which the conversation should be created. - string document_id = 1; - - // Required. Selected portions in the original document which are being commented on. - // At least one element must be present. - repeated Selector selectors = 2; - - // Required. The first comment that starts the conversation. - Block initial_comment = 3; -} - -// Request to add a comment. -message AddCommentRequest { - // ID of the existing conversation. - string conversation_id = 1; - - // Block corresponding to the text of the comment. - // Using a block ID that already exists in the conversation will replace the comment. - Block comment = 2; -} - -// Request to delete a conversation. -message DeleteConversationRequest { - // ID of the conversation to delete. - string conversation_id = 1; -} - -// Request to resolve a conversation. -message ResolveConversationRequest { - // ID of the conversation to resolve. - string conversation_id = 1; -} - -// Response to resolve a conversation. -message ResolveConversationResponse {} - -// Request to delete a comment from a conversation. -message DeleteCommentRequest { - // Required. ID of the conversation. - string conversation_id = 1; - - // Required. ID of the comment block to be deleted. - string block_id = 2; -} - -// Request to list conversations. -message ListConversationsRequest { - // Required. Document ID for which conversations should be listed. - string document_id = 1; - - // Optional. Number of results per page. - int32 page_size = 3; - - // Optional. Token for the page to return. - string page_token = 4; -} - -// Response with a list of conversations. -message ListConversationsResponse { - // Conversations matching the list request. - repeated Conversation conversations = 1; - - // Token for the next page if there're any. - string next_page_token = 2; -} - -// Selector defines the selected portion of text in a given block as an open-ended interval [start, end). -// If the interval is missing, the whole block is assumed. -message Selector { - // Required. ID of the block in the original document which is being commented on. - string block_id = 1; - - // Required. Specific block revision which is being commented. - string block_revision = 2; - - // Optional. Start position of the selection within the block. Expressed in Unicode Code Points. - // If start is specified, end must be specified as well. Must be start < end. - int32 start = 3; - - // Optional. End position of the selection within the block. Expressed in Unicode Code Points. - // Required if start was specified. Must be greater than start if specified. - int32 end = 4; -} - -// Conversation is a set of comments anchored to a particular selection in a document. -message Conversation { - // ID of the Conversation. - string id = 1; - - // Selected portions of the original document which are being commented on. - repeated Selector selectors = 2; - - // List of comments in the conversation. - // Ordered by time. - repeated Block comments = 3; -} diff --git a/proto/documents/v1alpha/go.gensum b/proto/documents/v1alpha/go.gensum index 295d7e7678..4754dea7b6 100644 --- a/proto/documents/v1alpha/go.gensum +++ b/proto/documents/v1alpha/go.gensum @@ -1,2 +1,2 @@ -srcs: 1af9c84e6652eefb581470cebb4f83a9 -outs: 465adac2549bf9a3b090de8768e4ce94 +srcs: f5a51bdfea4516abe7842dc36f6b1339 +outs: e0802d883e63bf6eec6aa1c54b0933b3 diff --git a/proto/documents/v1alpha/js.gensum b/proto/documents/v1alpha/js.gensum index 66cc5532b6..5c3d4b1543 100644 --- a/proto/documents/v1alpha/js.gensum +++ b/proto/documents/v1alpha/js.gensum @@ -1,2 +1,2 @@ -srcs: 1af9c84e6652eefb581470cebb4f83a9 -outs: d4ff0e2d8f6110d82f41a3288021e10c +srcs: f5a51bdfea4516abe7842dc36f6b1339 +outs: f172e0275b2d460c0a1bd8c0efc5797a diff --git a/proto/entities/v1alpha/js.gensum b/proto/entities/v1alpha/js.gensum index 228f246fa7..c80154b8b6 100644 --- a/proto/entities/v1alpha/js.gensum +++ b/proto/entities/v1alpha/js.gensum @@ -1,2 +1,2 @@ srcs: 3f368fa8800efb84b5c6051d07a4f11b -outs: 9c8eecd7252930636d4a1f834ea256e5 +outs: de9bde0120093b3456c093bc7bc4ac68 diff --git a/proto/groups/v1alpha/js.gensum b/proto/groups/v1alpha/js.gensum index 7962a96b29..48a86118c6 100644 --- a/proto/groups/v1alpha/js.gensum +++ b/proto/groups/v1alpha/js.gensum @@ -1,2 +1,2 @@ srcs: 573367cd85c3974fb85515ac5dd5e4f9 -outs: bd248e4f20d2a3e5cf75d126e271341b +outs: 7ff644acde7b89f207c7ee34d61208a6 diff --git a/proto/networking/v1alpha/js.gensum b/proto/networking/v1alpha/js.gensum index 93162335e9..f9752bfa0d 100644 --- a/proto/networking/v1alpha/js.gensum +++ b/proto/networking/v1alpha/js.gensum @@ -1,2 +1,2 @@ srcs: 6df118a123adfbc02f5b72cff34bc5ad -outs: a2e83eff6a47577fcec3737d2ba264d8 +outs: 79b938c4219b981816f2cea4f40e7037