Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: update ts proto

johnnyjoy8cdc956e59a2
diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml
index 12628fa8f..6d794c4a3 100644
--- a/docs/apidocs.swagger.yaml
+++ b/docs/apidocs.swagger.yaml
@@ -300,16 +300,12 @@ paths:
type: integer
format: int32
- name: pageToken
- description: |-
- A page token, received from a previous `ListMemos` call.
- Provide this to retrieve the subsequent page.
+ description: "A page token, received from a previous `ListMemos` call.\r\nProvide this to retrieve the subsequent page."
in: query
required: false
type: string
- name: filter
- description: |-
- Filter is used to filter memos returned in the list.
- Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
+ description: "Filter is used to filter memos returned in the list.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
in: query
required: false
type: string
@@ -484,9 +480,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: filter
- description: |-
- Filter is used to filter users returned in the list.
- Format: "username == 'frank'"
+ description: "Filter is used to filter users returned in the list.\r\nFormat: \"username == 'frank'\""
in: query
required: false
type: string
@@ -647,9 +641,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The resource name of the workspace setting.
- Format: settings/{setting}
+ description: "The resource name of the workspace setting.\r\nFormat: settings/{setting}"
in: path
required: true
type: string
@@ -671,9 +663,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: setting.name
- description: |-
- name is the name of the setting.
- Format: settings/{setting}
+ description: "name is the name of the setting.\r\nFormat: settings/{setting}"
in: path
required: true
type: string
@@ -709,9 +699,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: identityProvider.name
- description: |-
- The name of the identityProvider.
- Format: identityProviders/{id}
+ description: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
in: path
required: true
type: string
@@ -749,9 +737,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: inbox.name
- description: |-
- The name of the inbox.
- Format: inboxes/{id}
+ description: "The name of the inbox.\r\nFormat: inboxes/{id}"
in: path
required: true
type: string
@@ -795,10 +781,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: memo.name
- description: |-
- The name of the memo.
- Format: memos/{id}
- id is the system generated id.
+ description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
in: path
required: true
type: string
@@ -816,9 +799,7 @@ paths:
$ref: '#/definitions/v1RowStatus'
creator:
type: string
- title: |-
- The name of the creator.
- Format: users/{id}
+ title: "The name of the creator.\r\nFormat: users/{id}"
createTime:
type: string
format: date-time
@@ -871,9 +852,7 @@ paths:
readOnly: true
parent:
type: string
- title: |-
- The name of the parent memo.
- Format: memos/{id}
+ title: "The name of the parent memo.\r\nFormat: memos/{id}"
readOnly: true
snippet:
type: string
@@ -895,9 +874,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -919,9 +896,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_1
- description: |-
- The name of the identityProvider to delete.
- Format: identityProviders/{id}
+ description: "The name of the identityProvider to delete.\r\nFormat: identityProviders/{id}"
in: path
required: true
type: string
@@ -943,9 +918,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_2
- description: |-
- The name of the identityProvider to get.
- Format: identityProviders/{id}
+ description: "The name of the identityProvider to get.\r\nFormat: identityProviders/{id}"
in: path
required: true
type: string
@@ -967,9 +940,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_2
- description: |-
- The name of the inbox to delete.
- Format: inboxes/{id}
+ description: "The name of the inbox to delete.\r\nFormat: inboxes/{id}"
in: path
required: true
type: string
@@ -991,10 +962,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_3
- description: |-
- The name of the resource.
- Format: resources/{id}
- id is the system generated unique identifier.
+ description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
in: path
required: true
type: string
@@ -1016,10 +984,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_3
- description: |-
- The name of the resource.
- Format: resources/{id}
- id is the system generated unique identifier.
+ description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
in: path
required: true
type: string
@@ -1041,9 +1006,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_4
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1065,9 +1028,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name_4
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1089,9 +1050,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the activity.
- Format: activities/{id}
+ description: "The name of the activity.\r\nFormat: activities/{id}"
in: path
required: true
type: string
@@ -1113,9 +1072,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1137,9 +1094,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1160,9 +1115,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1190,9 +1143,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1219,9 +1170,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1242,9 +1191,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1271,9 +1218,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}. Use "memos/-" to list all properties.
+ description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to list all properties."
in: path
required: true
type: string
@@ -1296,9 +1241,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}. Use "memos/-" to rebuild all memos.
+ description: "The name of the memo.\r\nFormat: memos/{id}. Use \"memos/-\" to rebuild all memos."
in: path
required: true
type: string
@@ -1325,9 +1268,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1348,9 +1289,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1377,9 +1316,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1401,9 +1338,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1430,9 +1365,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1454,9 +1387,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the memo.
- Format: memos/{id}
+ description: "The name of the memo.\r\nFormat: memos/{id}"
in: path
required: true
type: string
@@ -1483,9 +1414,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1507,17 +1436,13 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
- description: |-
- The parent, who owns the tags.
- Format: memos/{id}. Use "memos/-" to list all tags.
+ description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to list all tags."
in: path
required: true
type: string
pattern: memos/[^/]+
- name: filter
- description: |-
- Filter is used to filter memos.
- Format: "creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']"
+ description: "Filter is used to filter memos.\r\nFormat: \"creator == 'users/{uid}' && visibilities == ['PUBLIC', 'PROTECTED']\""
in: query
required: false
type: string
@@ -1539,9 +1464,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
- description: |-
- The parent, who owns the tags.
- Format: memos/{id}. Use "memos/-" to delete all tags.
+ description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to delete all tags."
in: path
required: true
type: string
@@ -1572,9 +1495,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: parent
- description: |-
- The parent, who owns the tags.
- Format: memos/{id}. Use "memos/-" to rename all tags.
+ description: "The parent, who owns the tags.\r\nFormat: memos/{id}. Use \"memos/-\" to rename all tags."
in: path
required: true
type: string
@@ -1601,10 +1522,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: resource.name
- description: |-
- The name of the resource.
- Format: resources/{id}
- id is the system generated unique identifier.
+ description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
in: path
required: true
type: string
@@ -1636,9 +1554,7 @@ paths:
format: int64
memo:
type: string
- title: |-
- The related memo.
- Format: memos/{id}
+ title: "The related memo.\r\nFormat: memos/{id}"
tags:
- ResourceService
/api/v1/{setting.name}:
@@ -1656,9 +1572,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: setting.name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1695,9 +1609,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: user.name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1751,9 +1663,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the user.
- Format: users/{id}
+ description: "The name of the user.\r\nFormat: users/{id}"
in: path
required: true
type: string
@@ -1786,10 +1696,7 @@ paths:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: name
- description: |-
- The name of the resource.
- Format: resources/{id}
- id is the system generated unique identifier.
+ description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
in: path
required: true
type: string
@@ -1976,9 +1883,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the identityProvider.
- Format: identityProviders/{id}
+ title: "The name of the identityProvider.\r\nFormat: identityProviders/{id}"
type:
$ref: '#/definitions/apiv1IdentityProviderType'
title:
@@ -2022,9 +1927,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the user.
- Format: users/{id}
+ title: "The name of the user.\r\nFormat: users/{id}"
locale:
type: string
description: The preferred locale of the user.
@@ -2068,10 +1971,7 @@ definitions:
weekStartDayOffset:
type: integer
format: int32
- description: |-
- week_start_day_offset is the week start day offset from Sunday.
- 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
- Default is Sunday.
+ description: "week_start_day_offset is the week start day offset from Sunday.\r\n0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday\r\nDefault is Sunday."
disallowChangeUsername:
type: boolean
description: disallow_change_username disallows changing username.
@@ -2108,9 +2008,7 @@ definitions:
properties:
name:
type: string
- title: |-
- name is the name of the setting.
- Format: settings/{setting}
+ title: "name is the name of the setting.\r\nFormat: settings/{setting}"
generalSetting:
$ref: '#/definitions/apiv1WorkspaceGeneralSetting'
storageSetting:
@@ -2125,9 +2023,7 @@ definitions:
description: storage_type is the storage type.
filepathTemplate:
type: string
- title: |-
- The template of file path.
- e.g. assets/{timestamp}_{filename}
+ title: "The template of file path.\r\ne.g. assets/{timestamp}_{filename}"
uploadSizeLimitMb:
type: string
format: int64
@@ -2286,9 +2182,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the activity.
- Format: activities/{id}
+ title: "The name of the activity.\r\nFormat: activities/{id}"
creatorId:
type: integer
format: int32
@@ -2419,9 +2313,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the inbox.
- Format: inboxes/{id}
+ title: "The name of the inbox.\r\nFormat: inboxes/{id}"
sender:
type: string
title: 'Format: users/{id}'
@@ -2541,10 +2433,7 @@ definitions:
additionalProperties:
type: integer
format: int32
- description: |-
- tag_amounts is the amount of tags.
- key is the tag name. e.g. "tag1".
- value is the amount of the tag.
+ description: "tag_amounts is the amount of tags.\r\nkey is the tag name. e.g. \"tag1\".\r\nvalue is the amount of the tag."
v1ListMemosResponse:
type: object
properties:
@@ -2555,9 +2444,7 @@ definitions:
$ref: '#/definitions/v1Memo'
nextPageToken:
type: string
- description: |-
- A token, which can be sent as `page_token` to retrieve the next page.
- If this field is omitted, there are no subsequent pages.
+ description: "A token, which can be sent as `page_token` to retrieve the next page.\r\nIf this field is omitted, there are no subsequent pages."
v1ListNode:
type: object
properties:
@@ -2613,10 +2500,7 @@ definitions:
properties:
name:
type: string
- description: |-
- The name of the memo.
- Format: memos/{id}
- id is the system generated id.
+ description: "The name of the memo.\r\nFormat: memos/{id}\r\nid is the system generated id."
uid:
type: string
description: The user defined id of the memo.
@@ -2624,9 +2508,7 @@ definitions:
$ref: '#/definitions/v1RowStatus'
creator:
type: string
- title: |-
- The name of the creator.
- Format: users/{id}
+ title: "The name of the creator.\r\nFormat: users/{id}"
createTime:
type: string
format: date-time
@@ -2679,9 +2561,7 @@ definitions:
readOnly: true
parent:
type: string
- title: |-
- The name of the parent memo.
- Format: memos/{id}
+ title: "The name of the parent memo.\r\nFormat: memos/{id}"
readOnly: true
snippet:
type: string
@@ -2706,9 +2586,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the memo property.
- Format: memos/{id}/properties/{property_id}
+ title: "The name of the memo property.\r\nFormat: memos/{id}/properties/{property_id}"
property:
$ref: '#/definitions/v1MemoProperty'
readOnly: true
@@ -2721,14 +2599,10 @@ definitions:
properties:
memo:
type: string
- title: |-
- The name of memo.
- Format: "memos/{uid}"
+ title: "The name of memo.\r\nFormat: \"memos/{uid}\""
relatedMemo:
type: string
- title: |-
- The name of related memo.
- Format: "memos/{uid}"
+ title: "The name of related memo.\r\nFormat: \"memos/{uid}\""
type:
$ref: '#/definitions/v1MemoRelationType'
v1MemoRelationType:
@@ -2888,9 +2762,7 @@ definitions:
format: int32
creator:
type: string
- title: |-
- The name of the creator.
- Format: users/{id}
+ title: "The name of the creator.\r\nFormat: users/{id}"
contentId:
type: string
reactionType:
@@ -2924,10 +2796,7 @@ definitions:
properties:
name:
type: string
- description: |-
- The name of the resource.
- Format: resources/{id}
- id is the system generated unique identifier.
+ description: "The name of the resource.\r\nFormat: resources/{id}\r\nid is the system generated unique identifier."
uid:
type: string
description: The user defined id of the resource.
@@ -2949,9 +2818,7 @@ definitions:
format: int64
memo:
type: string
- title: |-
- The related memo.
- Format: memos/{id}
+ title: "The related memo.\r\nFormat: memos/{id}"
v1RestoreMarkdownNodesRequest:
type: object
properties:
@@ -3073,9 +2940,7 @@ definitions:
properties:
name:
type: string
- title: |-
- The name of the user.
- Format: users/{id}
+ title: "The name of the user.\r\nFormat: users/{id}"
id:
type: integer
format: int32
@@ -3149,9 +3014,7 @@ definitions:
properties:
owner:
type: string
- title: |-
- The name of instance owner.
- Format: "users/{id}"
+ title: "The name of instance owner.\r\nFormat: \"users/{id}\""
version:
type: string
title: version is the current version of instance
diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml
index 5ccb2952e..48bec76e0 100644
--- a/proto/buf.gen.yaml
+++ b/proto/buf.gen.yaml
@@ -22,7 +22,7 @@ plugins:
out: ../docs
opt: output_format=yaml,allow_merge=true
# Build the TypeScript definitions for the web.
- - plugin: buf.build/community/stephenh-ts-proto:v1.178.0
+ - plugin: buf.build/community/stephenh-ts-proto
out: ../web/src/types/proto
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
opt:
diff --git a/web/package.json b/web/package.json
index ca20227a7..bf7c47ee0 100644
--- a/web/package.json
+++ b/web/package.json
@@ -47,6 +47,7 @@
},
"devDependencies": {
"@bufbuild/buf": "^1.39.0",
+ "@bufbuild/protobuf": "^2.1.0",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/d3": "^7.4.3",
"@types/dompurify": "^3.0.5",
diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml
index 3c351e109..16669536d 100644
--- a/web/pnpm-lock.yaml
+++ b/web/pnpm-lock.yaml
@@ -117,6 +117,9 @@ importers:
'@bufbuild/buf':
specifier: ^1.39.0
version: 1.39.0
+ '@bufbuild/protobuf':
+ specifier: ^2.1.0
+ version: 2.1.0
'@trivago/prettier-plugin-sort-imports':
specifier: ^4.3.0
version: 4.3.0([email protected])
@@ -372,6 +375,9 @@ packages:
engines: {node: '>=12'}
hasBin: true
+ '@bufbuild/[email protected]':
+ resolution: {integrity: sha512-+2Mx67Y3skJ4NCD/qNSdBJNWtu6x6Qr53jeNg+QcwiL6mt0wK+3jwHH2x1p7xaYH6Ve2JKOVn0OxU35WsmqI9A==}
+
'@dnd-kit/[email protected]':
resolution: {integrity: sha512-ea7IkhKvlJUv9iSHJOnxinBcoOI3ppGnnL+VDJ75O45Nss6HtZd8IdN8touXPDtASfeI2T2LImb8VOZcL47wjQ==}
peerDependencies:
@@ -3568,6 +3574,8 @@ snapshots:
'@bufbuild/buf-win32-arm64': 1.39.0
'@bufbuild/buf-win32-x64': 1.39.0
+ '@bufbuild/[email protected]': {}
+
dependencies:
react: 18.3.1