diff --git a/api/feed/v1/feed.proto b/api/feed/v1/feed.proto index 47886d2151..b76f8b0934 100644 --- a/api/feed/v1/feed.proto +++ b/api/feed/v1/feed.proto @@ -27,9 +27,9 @@ message Post { string metadata = 4; string parent_post_identifier = 5; uint32 sub_post_length = 6; - string author_id = 11; int64 created_at = 8; int64 tip_amount = 10; + string author_id = 11; repeated Reaction reactions = 9; } diff --git a/go/pkg/feedpb/feed.pb.go b/go/pkg/feedpb/feed.pb.go index d0762c44d4..e30d707874 100644 --- a/go/pkg/feedpb/feed.pb.go +++ b/go/pkg/feedpb/feed.pb.go @@ -180,9 +180,9 @@ type Post struct { Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` ParentPostIdentifier string `protobuf:"bytes,5,opt,name=parent_post_identifier,json=parentPostIdentifier,proto3" json:"parent_post_identifier,omitempty"` SubPostLength uint32 `protobuf:"varint,6,opt,name=sub_post_length,json=subPostLength,proto3" json:"sub_post_length,omitempty"` - AuthorId string `protobuf:"bytes,11,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` CreatedAt int64 `protobuf:"varint,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` TipAmount int64 `protobuf:"varint,10,opt,name=tip_amount,json=tipAmount,proto3" json:"tip_amount,omitempty"` + AuthorId string `protobuf:"bytes,11,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` Reactions []*Reaction `protobuf:"bytes,9,rep,name=reactions,proto3" json:"reactions,omitempty"` } @@ -260,13 +260,6 @@ func (x *Post) GetSubPostLength() uint32 { return 0 } -func (x *Post) GetAuthorId() string { - if x != nil { - return x.AuthorId - } - return "" -} - func (x *Post) GetCreatedAt() int64 { if x != nil { return x.CreatedAt @@ -281,6 +274,13 @@ func (x *Post) GetTipAmount() int64 { return 0 } +func (x *Post) GetAuthorId() string { + if x != nil { + return x.AuthorId + } + return "" +} + func (x *Post) GetReactions() []*Reaction { if x != nil { return x.Reactions @@ -496,12 +496,12 @@ var file_feed_v1_feed_proto_rawDesc = []byte{ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x50, 0x6f, 0x73, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x74, 0x69, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x74, 0x69, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x09, + 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x66, 0x65, 0x65, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x78, 0x0a, diff --git a/packages/api/feed/v1/feed.ts b/packages/api/feed/v1/feed.ts index 42ff4859f8..59f99781ad 100644 --- a/packages/api/feed/v1/feed.ts +++ b/packages/api/feed/v1/feed.ts @@ -26,9 +26,9 @@ export interface Post { metadata: string; parentPostIdentifier: string; subPostLength: number; - authorId: string; createdAt: number; tipAmount: number; + authorId: string; reactions: Reaction[]; } @@ -209,9 +209,9 @@ function createBasePost(): Post { metadata: "", parentPostIdentifier: "", subPostLength: 0, - authorId: "", createdAt: 0, tipAmount: 0, + authorId: "", reactions: [], }; } @@ -236,15 +236,15 @@ export const Post = { if (message.subPostLength !== 0) { writer.uint32(48).uint32(message.subPostLength); } - if (message.authorId !== "") { - writer.uint32(90).string(message.authorId); - } if (message.createdAt !== 0) { writer.uint32(64).int64(message.createdAt); } if (message.tipAmount !== 0) { writer.uint32(80).int64(message.tipAmount); } + if (message.authorId !== "") { + writer.uint32(90).string(message.authorId); + } for (const v of message.reactions) { Reaction.encode(v!, writer.uint32(74).fork()).ldelim(); } @@ -276,15 +276,15 @@ export const Post = { case 6: message.subPostLength = reader.uint32(); break; - case 11: - message.authorId = reader.string(); - break; case 8: message.createdAt = longToNumber(reader.int64() as Long); break; case 10: message.tipAmount = longToNumber(reader.int64() as Long); break; + case 11: + message.authorId = reader.string(); + break; case 9: message.reactions.push(Reaction.decode(reader, reader.uint32())); break; @@ -304,9 +304,9 @@ export const Post = { metadata: isSet(object.metadata) ? String(object.metadata) : "", parentPostIdentifier: isSet(object.parentPostIdentifier) ? String(object.parentPostIdentifier) : "", subPostLength: isSet(object.subPostLength) ? Number(object.subPostLength) : 0, - authorId: isSet(object.authorId) ? String(object.authorId) : "", createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0, tipAmount: isSet(object.tipAmount) ? Number(object.tipAmount) : 0, + authorId: isSet(object.authorId) ? String(object.authorId) : "", reactions: Array.isArray(object?.reactions) ? object.reactions.map((e: any) => Reaction.fromJSON(e)) : [], }; }, @@ -319,9 +319,9 @@ export const Post = { message.metadata !== undefined && (obj.metadata = message.metadata); message.parentPostIdentifier !== undefined && (obj.parentPostIdentifier = message.parentPostIdentifier); message.subPostLength !== undefined && (obj.subPostLength = Math.round(message.subPostLength)); - message.authorId !== undefined && (obj.authorId = message.authorId); message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt)); message.tipAmount !== undefined && (obj.tipAmount = Math.round(message.tipAmount)); + message.authorId !== undefined && (obj.authorId = message.authorId); if (message.reactions) { obj.reactions = message.reactions.map((e) => e ? Reaction.toJSON(e) : undefined); } else { @@ -338,9 +338,9 @@ export const Post = { message.metadata = object.metadata ?? ""; message.parentPostIdentifier = object.parentPostIdentifier ?? ""; message.subPostLength = object.subPostLength ?? 0; - message.authorId = object.authorId ?? ""; message.createdAt = object.createdAt ?? 0; message.tipAmount = object.tipAmount ?? 0; + message.authorId = object.authorId ?? ""; message.reactions = object.reactions?.map((e) => Reaction.fromPartial(e)) || []; return message; },