Skip to content

Commit

Permalink
chore:ci: pull tags/v0.23.1 from usememos/memos
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthalles committed Jan 29, 2025
2 parents 16161f3 + 286ba02 commit adcfd6d
Show file tree
Hide file tree
Showing 122 changed files with 3,645 additions and 2,344 deletions.
9 changes: 1 addition & 8 deletions memos/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Air (hot reload) generated
.air

# temp folder
tmp

Expand All @@ -18,11 +15,7 @@ build
# Docker Compose Environment File
.env

bin/air

dev-dist

dist

# VSCode settings
/.vscode
.vscode
90 changes: 0 additions & 90 deletions memos/docs/development-windows.md

This file was deleted.

42 changes: 0 additions & 42 deletions memos/docs/development.md

This file was deleted.

1 change: 1 addition & 0 deletions memos/plugin/storage/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func NewClient(ctx context.Context, s3Config *storepb.StorageS3Config) (*Client,

client := s3.NewFromConfig(cfg, func(o *s3.Options) {
o.BaseEndpoint = aws.String(s3Config.Endpoint)
o.UsePathStyle = s3Config.UsePathStyle
})
return &Client{
Client: client,
Expand Down
14 changes: 8 additions & 6 deletions memos/proto/api/v1/activity_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ message Activity {
// The name of the activity.
// Format: activities/{id}
string name = 1;
// The uid of the user who created the activity.
int32 creator_id = 2;
// The name of the creator.
// Format: users/{user}
string creator = 2;
// The type of the activity.
string type = 3;
// The level of the activity.
Expand All @@ -40,10 +41,11 @@ message ActivityPayload {

// ActivityMemoCommentPayload represents the payload of a memo comment activity.
message ActivityMemoCommentPayload {
// The memo id of comment.
int32 memo_id = 1;
// The memo id of related memo.
int32 related_memo_id = 2;
// The memo name of comment.
// Refer to `Memo.name`.
string memo = 1;
// The name of related memo.
string related_memo = 2;
}

message ActivityVersionUpdatePayload {
Expand Down
6 changes: 3 additions & 3 deletions memos/proto/api/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package memos.api.v1;

option go_package = "gen/api/v1";

enum RowStatus {
ROW_STATUS_UNSPECIFIED = 0;
ACTIVE = 1;
enum State {
STATE_UNSPECIFIED = 0;
NORMAL = 1;
ARCHIVED = 2;
}

Expand Down
6 changes: 3 additions & 3 deletions memos/proto/api/v1/inbox_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ message Inbox {
// The name of the inbox.
// Format: inboxes/{id}
string name = 1;
// Format: users/{id}
// Format: users/{user}
string sender = 2;
// Format: users/{id}
// Format: users/{user}
string receiver = 3;

enum Status {
Expand All @@ -59,7 +59,7 @@ message Inbox {
}

message ListInboxesRequest {
// Format: users/{id}
// Format: users/{user}
string user = 1;

// The maximum number of inbox to return.
Expand Down
4 changes: 2 additions & 2 deletions memos/proto/api/v1/memo_relation_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ option go_package = "gen/api/v1";

message MemoRelation {
// The name of memo.
// Format: "memos/{uid}"
// Format: "memos/{id}"
Memo memo = 1;

// The name of related memo.
// Format: "memos/{uid}"
// Format: "memos/{id}"
Memo related_memo = 2;

enum Type {
Expand Down
27 changes: 8 additions & 19 deletions memos/proto/api/v1/memo_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ service MemoService {
}
// DeleteMemoReaction deletes a reaction for a memo.
rpc DeleteMemoReaction(DeleteMemoReactionRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {delete: "/api/v1/reactions/{reaction_id}"};
option (google.api.method_signature) = "reaction_id";
option (google.api.http) = {delete: "/api/v1/reactions/{id}"};
option (google.api.method_signature) = "id";
}
}

Expand All @@ -137,10 +137,10 @@ message Memo {
// The user defined id of the memo.
string uid = 2;

RowStatus row_status = 3;
State state = 3;

// The name of the creator.
// Format: users/{id}
// Format: users/{user}
string creator = 4;

google.protobuf.Timestamp create_time = 5;
Expand Down Expand Up @@ -203,16 +203,6 @@ message CreateMemoRequest {
optional Location location = 5;
}

enum MemoView {
MEMO_VIEW_UNSPECIFIED = 0;

// The full view of the memo. Includes all fields.
MEMO_VIEW_FULL = 1;

// The metadata only view of the memo. Excludes the content/snippet fields.
MEMO_VIEW_METADATA_ONLY = 2;
}

message ListMemosRequest {
// The maximum number of memos to return.
int32 page_size = 1;
Expand All @@ -222,11 +212,8 @@ message ListMemosRequest {
string page_token = 2;

// Filter is used to filter memos returned in the list.
// Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
// Format: "creator == 'users/{user}' && visibilities == ['PUBLIC', 'PROTECTED']"
string filter = 3;

// The view of the memo.
MemoView view = 4;
}

message ListMemosResponse {
Expand Down Expand Up @@ -349,5 +336,7 @@ message UpsertMemoReactionRequest {
}

message DeleteMemoReactionRequest {
int32 reaction_id = 1;
// The id of the reaction.
// Refer to the `Reaction.id`.
int32 id = 1;
}
4 changes: 3 additions & 1 deletion memos/proto/api/v1/reaction_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ message Reaction {
int32 id = 1;

// The name of the creator.
// Format: users/{id}
// Format: users/{user}
string creator = 2;

// The content identifier.
// For memo, it should be the `Memo.name`.
string content_id = 3;

string reaction_type = 4;
Expand Down
Loading

0 comments on commit adcfd6d

Please sign in to comment.