Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
d09e3c36
Commit
d09e3c36
authored
Sep 17, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove buf es generator
parent
72ca4e74
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
13 additions
and
1682 deletions
+13
-1682
buf.gen.yaml
proto/buf.gen.yaml
+0
-2
CreateResourceDialog.tsx
web/src/components/CreateResourceDialog.tsx
+1
-1
ResourceListView.tsx
web/src/components/MemoEditor/ResourceListView.tsx
+1
-1
index.tsx
web/src/components/MemoEditor/index.tsx
+1
-1
MemoResource.tsx
web/src/components/MemoResource.tsx
+1
-1
MemoResourceListView.tsx
web/src/components/MemoResourceListView.tsx
+1
-1
ResourceCard.tsx
web/src/components/ResourceCard.tsx
+0
-23
ResourceIcon.tsx
web/src/components/ResourceIcon.tsx
+1
-1
AccessTokenSection.tsx
web/src/components/Settings/AccessTokenSection.tsx
+1
-1
api.ts
web/src/helpers/api.ts
+2
-2
Resources.tsx
web/src/pages/Resources.tsx
+1
-1
resource.ts
web/src/store/module/resource.ts
+1
-1
resource.ts
web/src/store/reducer/resource.ts
+1
-1
common_pb.d.ts
web/src/types/proto/api/v2/common_pb.d.ts
+0
-25
common_pb.js
web/src/types/proto/api/v2/common_pb.js
+0
-19
memo_service_pb.d.ts
web/src/types/proto/api/v2/memo_service_pb.d.ts
+0
-201
memo_service_pb.js
web/src/types/proto/api/v2/memo_service_pb.js
+0
-80
resource_service_pb.d.ts
web/src/types/proto/api/v2/resource_service_pb.d.ts
+0
-105
resource_service_pb.js
web/src/types/proto/api/v2/resource_service_pb.js
+0
-41
system_service_pb.d.ts
web/src/types/proto/api/v2/system_service_pb.d.ts
+0
-162
system_service_pb.js
web/src/types/proto/api/v2/system_service_pb.js
+0
-62
tag_service_pb.d.ts
web/src/types/proto/api/v2/tag_service_pb.d.ts
+0
-85
tag_service_pb.js
web/src/types/proto/api/v2/tag_service_pb.js
+0
-38
user_service_pb.d.ts
web/src/types/proto/api/v2/user_service_pb.d.ts
+0
-401
user_service_pb.js
web/src/types/proto/api/v2/user_service_pb.js
+0
-155
system_setting_pb.d.ts
web/src/types/proto/store/system_setting_pb.d.ts
+0
-65
system_setting_pb.js
web/src/types/proto/store/system_setting_pb.js
+0
-30
user_setting_pb.d.ts
web/src/types/proto/store/user_setting_pb.d.ts
+0
-123
user_setting_pb.js
web/src/types/proto/store/user_setting_pb.js
+0
-52
resource.ts
web/src/utils/resource.ts
+1
-1
No files found.
proto/buf.gen.yaml
View file @
d09e3c36
...
@@ -19,8 +19,6 @@ plugins:
...
@@ -19,8 +19,6 @@ plugins:
opt
:
opt
:
-
paths=source_relative
-
paths=source_relative
# Build the TypeScript definitions for the web.
# Build the TypeScript definitions for the web.
-
plugin
:
buf.build/bufbuild/es:v1.3.0
out
:
../web/src/types/proto
-
plugin
:
buf.build/community/stephenh-ts-proto:v1.152.1
-
plugin
:
buf.build/community/stephenh-ts-proto:v1.152.1
out
:
../web/src/types/proto-grpcweb
out
:
../web/src/types/proto-grpcweb
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
...
...
web/src/components/CreateResourceDialog.tsx
View file @
d09e3c36
import
{
Autocomplete
,
Button
,
Input
,
List
,
ListItem
,
Option
,
Select
,
Typography
}
from
"@mui/joy"
;
import
{
Autocomplete
,
Button
,
Input
,
List
,
ListItem
,
Option
,
Select
,
Typography
}
from
"@mui/joy"
;
import
React
,
{
useRef
,
useState
}
from
"react"
;
import
React
,
{
useRef
,
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useResourceStore
}
from
"../store/module"
;
import
{
useResourceStore
}
from
"../store/module"
;
import
{
generateDialog
}
from
"./Dialog"
;
import
{
generateDialog
}
from
"./Dialog"
;
...
...
web/src/components/MemoEditor/ResourceListView.tsx
View file @
d09e3c36
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
Icon
from
"../Icon"
;
import
Icon
from
"../Icon"
;
import
ResourceIcon
from
"../ResourceIcon"
;
import
ResourceIcon
from
"../ResourceIcon"
;
...
...
web/src/components/MemoEditor/index.tsx
View file @
d09e3c36
...
@@ -8,7 +8,7 @@ import { TAB_SPACE_WIDTH, UNKNOWN_ID } from "@/helpers/consts";
...
@@ -8,7 +8,7 @@ import { TAB_SPACE_WIDTH, UNKNOWN_ID } from "@/helpers/consts";
import
{
clearContentQueryParam
}
from
"@/helpers/utils"
;
import
{
clearContentQueryParam
}
from
"@/helpers/utils"
;
import
{
getMatchedNodes
}
from
"@/labs/marked"
;
import
{
getMatchedNodes
}
from
"@/labs/marked"
;
import
{
useFilterStore
,
useGlobalStore
,
useMemoStore
,
useResourceStore
,
useTagStore
,
useUserStore
}
from
"@/store/module"
;
import
{
useFilterStore
,
useGlobalStore
,
useMemoStore
,
useResourceStore
,
useTagStore
,
useUserStore
}
from
"@/store/module"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
showCreateResourceDialog
from
"../CreateResourceDialog"
;
import
showCreateResourceDialog
from
"../CreateResourceDialog"
;
import
Icon
from
"../Icon"
;
import
Icon
from
"../Icon"
;
...
...
web/src/components/MemoResource.tsx
View file @
d09e3c36
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
getResourceUrl
}
from
"@/utils/resource"
;
import
{
getResourceUrl
}
from
"@/utils/resource"
;
import
ResourceIcon
from
"./ResourceIcon"
;
import
ResourceIcon
from
"./ResourceIcon"
;
...
...
web/src/components/MemoResourceListView.tsx
View file @
d09e3c36
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
{
absolutifyLink
}
from
"@/helpers/utils"
;
import
{
absolutifyLink
}
from
"@/helpers/utils"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
getResourceType
,
getResourceUrl
}
from
"@/utils/resource"
;
import
{
getResourceType
,
getResourceUrl
}
from
"@/utils/resource"
;
import
MemoResource
from
"./MemoResource"
;
import
MemoResource
from
"./MemoResource"
;
import
showPreviewImageDialog
from
"./PreviewImageDialog"
;
import
showPreviewImageDialog
from
"./PreviewImageDialog"
;
...
...
web/src/components/ResourceCard.tsx
deleted
100644 → 0
View file @
72ca4e74
import
{
getDateTimeString
}
from
"@/helpers/datetime"
;
import
{
Resource
}
from
"@/types/proto/api/v2/resource_service_pb"
;
import
ResourceIcon
from
"./ResourceIcon"
;
interface
Props
{
resource
:
Resource
;
}
const
ResourceCard
=
({
resource
}:
Props
)
=>
{
return
(
<
div
className=
"w-full p-2 relative flex flex-col justify-start hover:shadow hover:bg-slate-200 dark:hover:bg-slate-600 rounded-md"
>
<
div
className=
"w-full flex flex-row justify-center items-center pb-2 pt-4 px-2"
>
<
ResourceIcon
resource=
{
resource
}
strokeWidth=
{
0.5
}
/>
</
div
>
<
div
className=
"w-full flex flex-col justify-start items-center px-1 select-none"
>
<
div
className=
"w-full text-base text-center text-ellipsis overflow-hidden line-clamp-3"
>
{
resource
.
filename
}
</
div
>
<
div
className=
"text-xs text-gray-400 text-center"
>
{
getDateTimeString
(
resource
.
createdTs
)
}
</
div
>
</
div
>
</
div
>
);
};
export
default
ResourceCard
;
web/src/components/ResourceIcon.tsx
View file @
d09e3c36
import
classNames
from
"classnames"
;
import
classNames
from
"classnames"
;
import
React
from
"react"
;
import
React
from
"react"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
getResourceType
,
getResourceUrl
}
from
"@/utils/resource"
;
import
{
getResourceType
,
getResourceUrl
}
from
"@/utils/resource"
;
import
Icon
from
"./Icon"
;
import
Icon
from
"./Icon"
;
import
showPreviewImageDialog
from
"./PreviewImageDialog"
;
import
showPreviewImageDialog
from
"./PreviewImageDialog"
;
...
...
web/src/components/Settings/AccessTokenSection.tsx
View file @
d09e3c36
...
@@ -4,7 +4,7 @@ import copy from "copy-to-clipboard";
...
@@ -4,7 +4,7 @@ import copy from "copy-to-clipboard";
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
{
ListUserAccessTokensResponse
,
UserAccessToken
}
from
"@/types/proto
/api/v2/user_service_pb
"
;
import
{
ListUserAccessTokensResponse
,
UserAccessToken
}
from
"@/types/proto
-grpcweb/api/v2/user_service
"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
showCreateAccessTokenDialog
from
"../CreateAccessTokenDialog"
;
import
showCreateAccessTokenDialog
from
"../CreateAccessTokenDialog"
;
import
{
showCommonDialog
}
from
"../Dialog/CommonDialog"
;
import
{
showCommonDialog
}
from
"../Dialog/CommonDialog"
;
...
...
web/src/helpers/api.ts
View file @
d09e3c36
import
axios
from
"axios"
;
import
axios
from
"axios"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
GetUserResponse
}
from
"@/types/proto
/api/v2/user_service_pb
"
;
import
{
GetUserResponse
}
from
"@/types/proto
-grpcweb/api/v2/user_service
"
;
export
function
getSystemStatus
()
{
export
function
getSystemStatus
()
{
return
axios
.
get
<
SystemStatus
>
(
"/api/v1/status"
);
return
axios
.
get
<
SystemStatus
>
(
"/api/v1/status"
);
...
...
web/src/pages/Resources.tsx
View file @
d09e3c36
...
@@ -6,7 +6,7 @@ import Icon from "@/components/Icon";
...
@@ -6,7 +6,7 @@ import Icon from "@/components/Icon";
import
MobileHeader
from
"@/components/MobileHeader"
;
import
MobileHeader
from
"@/components/MobileHeader"
;
import
ResourceIcon
from
"@/components/ResourceIcon"
;
import
ResourceIcon
from
"@/components/ResourceIcon"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
useLoading
from
"@/hooks/useLoading"
;
import
{
ListResourcesResponse
,
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
ListResourcesResponse
,
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
fetchAllResources
=
async
()
=>
{
const
fetchAllResources
=
async
()
=>
{
...
...
web/src/store/module/resource.ts
View file @
d09e3c36
import
*
as
api
from
"@/helpers/api"
;
import
*
as
api
from
"@/helpers/api"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
store
,
{
useAppSelector
}
from
"../"
;
import
store
,
{
useAppSelector
}
from
"../"
;
import
{
deleteResource
,
patchResource
,
setResources
}
from
"../reducer/resource"
;
import
{
deleteResource
,
patchResource
,
setResources
}
from
"../reducer/resource"
;
...
...
web/src/store/reducer/resource.ts
View file @
d09e3c36
import
{
createSlice
,
PayloadAction
}
from
"@reduxjs/toolkit"
;
import
{
createSlice
,
PayloadAction
}
from
"@reduxjs/toolkit"
;
import
{
uniqBy
}
from
"lodash-es"
;
import
{
uniqBy
}
from
"lodash-es"
;
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
interface
State
{
interface
State
{
resources
:
Resource
[];
resources
:
Resource
[];
...
...
web/src/types/proto/api/v2/common_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/common.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
/**
* @generated from enum memos.api.v2.RowStatus
*/
export
declare
enum
RowStatus
{
/**
* @generated from enum value: ROW_STATUS_UNSPECIFIED = 0;
*/
ROW_STATUS_UNSPECIFIED
=
0
,
/**
* @generated from enum value: ACTIVE = 1;
*/
ACTIVE
=
1
,
/**
* @generated from enum value: ARCHIVED = 2;
*/
ARCHIVED
=
2
,
}
web/src/types/proto/api/v2/common_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/common.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from enum memos.api.v2.RowStatus
*/
export
const
RowStatus
=
proto3
.
makeEnum
(
"memos.api.v2.RowStatus"
,
[
{
no
:
0
,
name
:
"ROW_STATUS_UNSPECIFIED"
},
{
no
:
1
,
name
:
"ACTIVE"
},
{
no
:
2
,
name
:
"ARCHIVED"
},
],
);
web/src/types/proto/api/v2/memo_service_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/memo_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
import
type
{
RowStatus
}
from
"./common_pb.js"
;
/**
* @generated from enum memos.api.v2.Visibility
*/
export
declare
enum
Visibility
{
/**
* @generated from enum value: VISIBILITY_UNSPECIFIED = 0;
*/
VISIBILITY_UNSPECIFIED
=
0
,
/**
* @generated from enum value: PRIVATE = 1;
*/
PRIVATE
=
1
,
/**
* @generated from enum value: PROTECTED = 2;
*/
PROTECTED
=
2
,
/**
* @generated from enum value: PUBLIC = 3;
*/
PUBLIC
=
3
,
}
/**
* @generated from message memos.api.v2.Memo
*/
export
declare
class
Memo
extends
Message
<
Memo
>
{
/**
* @generated from field: int32 id = 1;
*/
id
:
number
;
/**
* @generated from field: memos.api.v2.RowStatus row_status = 2;
*/
rowStatus
:
RowStatus
;
/**
* @generated from field: int32 creator_id = 3;
*/
creatorId
:
number
;
/**
* @generated from field: int64 created_ts = 4;
*/
createdTs
:
bigint
;
/**
* @generated from field: int64 updated_ts = 5;
*/
updatedTs
:
bigint
;
/**
* @generated from field: string content = 6;
*/
content
:
string
;
/**
* @generated from field: memos.api.v2.Visibility visibility = 7;
*/
visibility
:
Visibility
;
/**
* @generated from field: bool pinned = 8;
*/
pinned
:
boolean
;
constructor
(
data
?:
PartialMessage
<
Memo
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.Memo"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
Memo
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
Memo
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
Memo
;
static
equals
(
a
:
Memo
|
PlainMessage
<
Memo
>
|
undefined
,
b
:
Memo
|
PlainMessage
<
Memo
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListMemosRequest
*/
export
declare
class
ListMemosRequest
extends
Message
<
ListMemosRequest
>
{
/**
* @generated from field: int32 page = 1;
*/
page
:
number
;
/**
* @generated from field: int32 page_size = 2;
*/
pageSize
:
number
;
/**
* Filter is used to filter memos returned in the list.
*
* @generated from field: string filter = 3;
*/
filter
:
string
;
constructor
(
data
?:
PartialMessage
<
ListMemosRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListMemosRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListMemosRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListMemosRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListMemosRequest
;
static
equals
(
a
:
ListMemosRequest
|
PlainMessage
<
ListMemosRequest
>
|
undefined
,
b
:
ListMemosRequest
|
PlainMessage
<
ListMemosRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListMemosResponse
*/
export
declare
class
ListMemosResponse
extends
Message
<
ListMemosResponse
>
{
/**
* @generated from field: repeated memos.api.v2.Memo memos = 1;
*/
memos
:
Memo
[];
constructor
(
data
?:
PartialMessage
<
ListMemosResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListMemosResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListMemosResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListMemosResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListMemosResponse
;
static
equals
(
a
:
ListMemosResponse
|
PlainMessage
<
ListMemosResponse
>
|
undefined
,
b
:
ListMemosResponse
|
PlainMessage
<
ListMemosResponse
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.GetMemoRequest
*/
export
declare
class
GetMemoRequest
extends
Message
<
GetMemoRequest
>
{
/**
* @generated from field: int32 id = 1;
*/
id
:
number
;
constructor
(
data
?:
PartialMessage
<
GetMemoRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.GetMemoRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
GetMemoRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
GetMemoRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
GetMemoRequest
;
static
equals
(
a
:
GetMemoRequest
|
PlainMessage
<
GetMemoRequest
>
|
undefined
,
b
:
GetMemoRequest
|
PlainMessage
<
GetMemoRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.GetMemoResponse
*/
export
declare
class
GetMemoResponse
extends
Message
<
GetMemoResponse
>
{
/**
* @generated from field: memos.api.v2.Memo memo = 1;
*/
memo
?:
Memo
;
constructor
(
data
?:
PartialMessage
<
GetMemoResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.GetMemoResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
GetMemoResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
GetMemoResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
GetMemoResponse
;
static
equals
(
a
:
GetMemoResponse
|
PlainMessage
<
GetMemoResponse
>
|
undefined
,
b
:
GetMemoResponse
|
PlainMessage
<
GetMemoResponse
>
|
undefined
):
boolean
;
}
web/src/types/proto/api/v2/memo_service_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/memo_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
import
{
RowStatus
}
from
"./common_pb.js"
;
/**
* @generated from enum memos.api.v2.Visibility
*/
export
const
Visibility
=
proto3
.
makeEnum
(
"memos.api.v2.Visibility"
,
[
{
no
:
0
,
name
:
"VISIBILITY_UNSPECIFIED"
},
{
no
:
1
,
name
:
"PRIVATE"
},
{
no
:
2
,
name
:
"PROTECTED"
},
{
no
:
3
,
name
:
"PUBLIC"
},
],
);
/**
* @generated from message memos.api.v2.Memo
*/
export
const
Memo
=
proto3
.
makeMessageType
(
"memos.api.v2.Memo"
,
()
=>
[
{
no
:
1
,
name
:
"id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
2
,
name
:
"row_status"
,
kind
:
"enum"
,
T
:
proto3
.
getEnumType
(
RowStatus
)
},
{
no
:
3
,
name
:
"creator_id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
4
,
name
:
"created_ts"
,
kind
:
"scalar"
,
T
:
3
/* ScalarType.INT64 */
},
{
no
:
5
,
name
:
"updated_ts"
,
kind
:
"scalar"
,
T
:
3
/* ScalarType.INT64 */
},
{
no
:
6
,
name
:
"content"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
7
,
name
:
"visibility"
,
kind
:
"enum"
,
T
:
proto3
.
getEnumType
(
Visibility
)
},
{
no
:
8
,
name
:
"pinned"
,
kind
:
"scalar"
,
T
:
8
/* ScalarType.BOOL */
},
],
);
/**
* @generated from message memos.api.v2.ListMemosRequest
*/
export
const
ListMemosRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.ListMemosRequest"
,
()
=>
[
{
no
:
1
,
name
:
"page"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
2
,
name
:
"page_size"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
3
,
name
:
"filter"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
],
);
/**
* @generated from message memos.api.v2.ListMemosResponse
*/
export
const
ListMemosResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.ListMemosResponse"
,
()
=>
[
{
no
:
1
,
name
:
"memos"
,
kind
:
"message"
,
T
:
Memo
,
repeated
:
true
},
],
);
/**
* @generated from message memos.api.v2.GetMemoRequest
*/
export
const
GetMemoRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.GetMemoRequest"
,
()
=>
[
{
no
:
1
,
name
:
"id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
],
);
/**
* @generated from message memos.api.v2.GetMemoResponse
*/
export
const
GetMemoResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.GetMemoResponse"
,
()
=>
[
{
no
:
1
,
name
:
"memo"
,
kind
:
"message"
,
T
:
Memo
},
],
);
web/src/types/proto/api/v2/resource_service_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/resource_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
,
Timestamp
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.Resource
*/
export
declare
class
Resource
extends
Message
<
Resource
>
{
/**
* @generated from field: int32 id = 1;
*/
id
:
number
;
/**
* @generated from field: google.protobuf.Timestamp created_ts = 2;
*/
createdTs
?:
Timestamp
;
/**
* @generated from field: string filename = 3;
*/
filename
:
string
;
/**
* @generated from field: string external_link = 4;
*/
externalLink
:
string
;
/**
* @generated from field: string type = 5;
*/
type
:
string
;
/**
* @generated from field: int64 size = 6;
*/
size
:
bigint
;
/**
* @generated from field: optional int32 related_memo_id = 7;
*/
relatedMemoId
?:
number
;
constructor
(
data
?:
PartialMessage
<
Resource
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.Resource"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
Resource
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
Resource
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
Resource
;
static
equals
(
a
:
Resource
|
PlainMessage
<
Resource
>
|
undefined
,
b
:
Resource
|
PlainMessage
<
Resource
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListResourcesRequest
*/
export
declare
class
ListResourcesRequest
extends
Message
<
ListResourcesRequest
>
{
constructor
(
data
?:
PartialMessage
<
ListResourcesRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListResourcesRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListResourcesRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListResourcesRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListResourcesRequest
;
static
equals
(
a
:
ListResourcesRequest
|
PlainMessage
<
ListResourcesRequest
>
|
undefined
,
b
:
ListResourcesRequest
|
PlainMessage
<
ListResourcesRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListResourcesResponse
*/
export
declare
class
ListResourcesResponse
extends
Message
<
ListResourcesResponse
>
{
/**
* @generated from field: repeated memos.api.v2.Resource resources = 1;
*/
resources
:
Resource
[];
constructor
(
data
?:
PartialMessage
<
ListResourcesResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListResourcesResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListResourcesResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListResourcesResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListResourcesResponse
;
static
equals
(
a
:
ListResourcesResponse
|
PlainMessage
<
ListResourcesResponse
>
|
undefined
,
b
:
ListResourcesResponse
|
PlainMessage
<
ListResourcesResponse
>
|
undefined
):
boolean
;
}
web/src/types/proto/api/v2/resource_service_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/resource_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
,
Timestamp
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.Resource
*/
export
const
Resource
=
proto3
.
makeMessageType
(
"memos.api.v2.Resource"
,
()
=>
[
{
no
:
1
,
name
:
"id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
2
,
name
:
"created_ts"
,
kind
:
"message"
,
T
:
Timestamp
},
{
no
:
3
,
name
:
"filename"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
4
,
name
:
"external_link"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
5
,
name
:
"type"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
6
,
name
:
"size"
,
kind
:
"scalar"
,
T
:
3
/* ScalarType.INT64 */
},
{
no
:
7
,
name
:
"related_memo_id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
,
opt
:
true
},
],
);
/**
* @generated from message memos.api.v2.ListResourcesRequest
*/
export
const
ListResourcesRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.ListResourcesRequest"
,
[],
);
/**
* @generated from message memos.api.v2.ListResourcesResponse
*/
export
const
ListResourcesResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.ListResourcesResponse"
,
()
=>
[
{
no
:
1
,
name
:
"resources"
,
kind
:
"message"
,
T
:
Resource
,
repeated
:
true
},
],
);
web/src/types/proto/api/v2/system_service_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/system_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.SystemInfo
*/
export
declare
class
SystemInfo
extends
Message
<
SystemInfo
>
{
/**
* @generated from field: string version = 1;
*/
version
:
string
;
/**
* @generated from field: string mode = 2;
*/
mode
:
string
;
/**
* @generated from field: bool allow_registration = 3;
*/
allowRegistration
:
boolean
;
/**
* @generated from field: bool disable_password_login = 4;
*/
disablePasswordLogin
:
boolean
;
/**
* @generated from field: string additional_script = 5;
*/
additionalScript
:
string
;
/**
* @generated from field: string additional_style = 6;
*/
additionalStyle
:
string
;
/**
* @generated from field: int64 db_size = 7;
*/
dbSize
:
bigint
;
constructor
(
data
?:
PartialMessage
<
SystemInfo
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.SystemInfo"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
SystemInfo
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
SystemInfo
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
SystemInfo
;
static
equals
(
a
:
SystemInfo
|
PlainMessage
<
SystemInfo
>
|
undefined
,
b
:
SystemInfo
|
PlainMessage
<
SystemInfo
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.GetSystemInfoRequest
*/
export
declare
class
GetSystemInfoRequest
extends
Message
<
GetSystemInfoRequest
>
{
constructor
(
data
?:
PartialMessage
<
GetSystemInfoRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.GetSystemInfoRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
GetSystemInfoRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
GetSystemInfoRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
GetSystemInfoRequest
;
static
equals
(
a
:
GetSystemInfoRequest
|
PlainMessage
<
GetSystemInfoRequest
>
|
undefined
,
b
:
GetSystemInfoRequest
|
PlainMessage
<
GetSystemInfoRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.GetSystemInfoResponse
*/
export
declare
class
GetSystemInfoResponse
extends
Message
<
GetSystemInfoResponse
>
{
/**
* @generated from field: memos.api.v2.SystemInfo system_info = 1;
*/
systemInfo
?:
SystemInfo
;
constructor
(
data
?:
PartialMessage
<
GetSystemInfoResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.GetSystemInfoResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
GetSystemInfoResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
GetSystemInfoResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
GetSystemInfoResponse
;
static
equals
(
a
:
GetSystemInfoResponse
|
PlainMessage
<
GetSystemInfoResponse
>
|
undefined
,
b
:
GetSystemInfoResponse
|
PlainMessage
<
GetSystemInfoResponse
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.UpdateSystemInfoRequest
*/
export
declare
class
UpdateSystemInfoRequest
extends
Message
<
UpdateSystemInfoRequest
>
{
/**
* System info is the updated data.
*
* @generated from field: memos.api.v2.SystemInfo system_info = 1;
*/
systemInfo
?:
SystemInfo
;
/**
* Update mask is the array of paths.
*
* @generated from field: repeated string update_mask = 2;
*/
updateMask
:
string
[];
constructor
(
data
?:
PartialMessage
<
UpdateSystemInfoRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.UpdateSystemInfoRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
UpdateSystemInfoRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
UpdateSystemInfoRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
UpdateSystemInfoRequest
;
static
equals
(
a
:
UpdateSystemInfoRequest
|
PlainMessage
<
UpdateSystemInfoRequest
>
|
undefined
,
b
:
UpdateSystemInfoRequest
|
PlainMessage
<
UpdateSystemInfoRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.UpdateSystemInfoResponse
*/
export
declare
class
UpdateSystemInfoResponse
extends
Message
<
UpdateSystemInfoResponse
>
{
/**
* @generated from field: memos.api.v2.SystemInfo system_info = 1;
*/
systemInfo
?:
SystemInfo
;
constructor
(
data
?:
PartialMessage
<
UpdateSystemInfoResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.UpdateSystemInfoResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
UpdateSystemInfoResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
UpdateSystemInfoResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
UpdateSystemInfoResponse
;
static
equals
(
a
:
UpdateSystemInfoResponse
|
PlainMessage
<
UpdateSystemInfoResponse
>
|
undefined
,
b
:
UpdateSystemInfoResponse
|
PlainMessage
<
UpdateSystemInfoResponse
>
|
undefined
):
boolean
;
}
web/src/types/proto/api/v2/system_service_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/system_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.SystemInfo
*/
export
const
SystemInfo
=
proto3
.
makeMessageType
(
"memos.api.v2.SystemInfo"
,
()
=>
[
{
no
:
1
,
name
:
"version"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"mode"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
3
,
name
:
"allow_registration"
,
kind
:
"scalar"
,
T
:
8
/* ScalarType.BOOL */
},
{
no
:
4
,
name
:
"disable_password_login"
,
kind
:
"scalar"
,
T
:
8
/* ScalarType.BOOL */
},
{
no
:
5
,
name
:
"additional_script"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
6
,
name
:
"additional_style"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
7
,
name
:
"db_size"
,
kind
:
"scalar"
,
T
:
3
/* ScalarType.INT64 */
},
],
);
/**
* @generated from message memos.api.v2.GetSystemInfoRequest
*/
export
const
GetSystemInfoRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.GetSystemInfoRequest"
,
[],
);
/**
* @generated from message memos.api.v2.GetSystemInfoResponse
*/
export
const
GetSystemInfoResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.GetSystemInfoResponse"
,
()
=>
[
{
no
:
1
,
name
:
"system_info"
,
kind
:
"message"
,
T
:
SystemInfo
},
],
);
/**
* @generated from message memos.api.v2.UpdateSystemInfoRequest
*/
export
const
UpdateSystemInfoRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.UpdateSystemInfoRequest"
,
()
=>
[
{
no
:
1
,
name
:
"system_info"
,
kind
:
"message"
,
T
:
SystemInfo
},
{
no
:
2
,
name
:
"update_mask"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
,
repeated
:
true
},
],
);
/**
* @generated from message memos.api.v2.UpdateSystemInfoResponse
*/
export
const
UpdateSystemInfoResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.UpdateSystemInfoResponse"
,
()
=>
[
{
no
:
1
,
name
:
"system_info"
,
kind
:
"message"
,
T
:
SystemInfo
},
],
);
web/src/types/proto/api/v2/tag_service_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/tag_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.Tag
*/
export
declare
class
Tag
extends
Message
<
Tag
>
{
/**
* @generated from field: string name = 1;
*/
name
:
string
;
/**
* @generated from field: int32 creator_id = 2;
*/
creatorId
:
number
;
constructor
(
data
?:
PartialMessage
<
Tag
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.Tag"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
Tag
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
Tag
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
Tag
;
static
equals
(
a
:
Tag
|
PlainMessage
<
Tag
>
|
undefined
,
b
:
Tag
|
PlainMessage
<
Tag
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListTagsRequest
*/
export
declare
class
ListTagsRequest
extends
Message
<
ListTagsRequest
>
{
/**
* @generated from field: int32 creator_id = 1;
*/
creatorId
:
number
;
constructor
(
data
?:
PartialMessage
<
ListTagsRequest
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListTagsRequest"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListTagsRequest
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListTagsRequest
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListTagsRequest
;
static
equals
(
a
:
ListTagsRequest
|
PlainMessage
<
ListTagsRequest
>
|
undefined
,
b
:
ListTagsRequest
|
PlainMessage
<
ListTagsRequest
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.api.v2.ListTagsResponse
*/
export
declare
class
ListTagsResponse
extends
Message
<
ListTagsResponse
>
{
/**
* @generated from field: repeated memos.api.v2.Tag tags = 1;
*/
tags
:
Tag
[];
constructor
(
data
?:
PartialMessage
<
ListTagsResponse
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.api.v2.ListTagsResponse"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
ListTagsResponse
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
ListTagsResponse
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
ListTagsResponse
;
static
equals
(
a
:
ListTagsResponse
|
PlainMessage
<
ListTagsResponse
>
|
undefined
,
b
:
ListTagsResponse
|
PlainMessage
<
ListTagsResponse
>
|
undefined
):
boolean
;
}
web/src/types/proto/api/v2/tag_service_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/tag_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from message memos.api.v2.Tag
*/
export
const
Tag
=
proto3
.
makeMessageType
(
"memos.api.v2.Tag"
,
()
=>
[
{
no
:
1
,
name
:
"name"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"creator_id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
],
);
/**
* @generated from message memos.api.v2.ListTagsRequest
*/
export
const
ListTagsRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.ListTagsRequest"
,
()
=>
[
{
no
:
1
,
name
:
"creator_id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
],
);
/**
* @generated from message memos.api.v2.ListTagsResponse
*/
export
const
ListTagsResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.ListTagsResponse"
,
()
=>
[
{
no
:
1
,
name
:
"tags"
,
kind
:
"message"
,
T
:
Tag
,
repeated
:
true
},
],
);
web/src/types/proto/api/v2/user_service_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
This diff is collapsed.
Click to expand it.
web/src/types/proto/api/v2/user_service_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/user_service.proto (package memos.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
,
Timestamp
}
from
"@bufbuild/protobuf"
;
import
{
RowStatus
}
from
"./common_pb.js"
;
/**
* @generated from message memos.api.v2.User
*/
export
const
User
=
proto3
.
makeMessageType
(
"memos.api.v2.User"
,
()
=>
[
{
no
:
1
,
name
:
"id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
2
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
3
,
name
:
"role"
,
kind
:
"enum"
,
T
:
proto3
.
getEnumType
(
User_Role
)
},
{
no
:
4
,
name
:
"email"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
5
,
name
:
"nickname"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
6
,
name
:
"avatar_url"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
7
,
name
:
"password"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
8
,
name
:
"row_status"
,
kind
:
"enum"
,
T
:
proto3
.
getEnumType
(
RowStatus
)
},
{
no
:
9
,
name
:
"create_time"
,
kind
:
"message"
,
T
:
Timestamp
},
{
no
:
10
,
name
:
"update_time"
,
kind
:
"message"
,
T
:
Timestamp
},
],
);
/**
* @generated from enum memos.api.v2.User.Role
*/
export
const
User_Role
=
proto3
.
makeEnum
(
"memos.api.v2.User.Role"
,
[
{
no
:
0
,
name
:
"ROLE_UNSPECIFIED"
},
{
no
:
1
,
name
:
"HOST"
},
{
no
:
2
,
name
:
"ADMIN"
},
{
no
:
3
,
name
:
"USER"
},
],
);
/**
* @generated from message memos.api.v2.GetUserRequest
*/
export
const
GetUserRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.GetUserRequest"
,
()
=>
[
{
no
:
1
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
],
);
/**
* @generated from message memos.api.v2.GetUserResponse
*/
export
const
GetUserResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.GetUserResponse"
,
()
=>
[
{
no
:
1
,
name
:
"user"
,
kind
:
"message"
,
T
:
User
},
],
);
/**
* @generated from message memos.api.v2.UpdateUserRequest
*/
export
const
UpdateUserRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.UpdateUserRequest"
,
()
=>
[
{
no
:
1
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"user"
,
kind
:
"message"
,
T
:
User
},
{
no
:
3
,
name
:
"update_mask"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
,
repeated
:
true
},
],
);
/**
* @generated from message memos.api.v2.UpdateUserResponse
*/
export
const
UpdateUserResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.UpdateUserResponse"
,
()
=>
[
{
no
:
1
,
name
:
"user"
,
kind
:
"message"
,
T
:
User
},
],
);
/**
* @generated from message memos.api.v2.ListUserAccessTokensRequest
*/
export
const
ListUserAccessTokensRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.ListUserAccessTokensRequest"
,
()
=>
[
{
no
:
1
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
],
);
/**
* @generated from message memos.api.v2.ListUserAccessTokensResponse
*/
export
const
ListUserAccessTokensResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.ListUserAccessTokensResponse"
,
()
=>
[
{
no
:
1
,
name
:
"access_tokens"
,
kind
:
"message"
,
T
:
UserAccessToken
,
repeated
:
true
},
],
);
/**
* @generated from message memos.api.v2.CreateUserAccessTokenRequest
*/
export
const
CreateUserAccessTokenRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.CreateUserAccessTokenRequest"
,
()
=>
[
{
no
:
1
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"user_access_token"
,
kind
:
"message"
,
T
:
UserAccessToken
},
],
);
/**
* @generated from message memos.api.v2.CreateUserAccessTokenResponse
*/
export
const
CreateUserAccessTokenResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.CreateUserAccessTokenResponse"
,
()
=>
[
{
no
:
1
,
name
:
"access_token"
,
kind
:
"message"
,
T
:
UserAccessToken
},
],
);
/**
* @generated from message memos.api.v2.DeleteUserAccessTokenRequest
*/
export
const
DeleteUserAccessTokenRequest
=
proto3
.
makeMessageType
(
"memos.api.v2.DeleteUserAccessTokenRequest"
,
()
=>
[
{
no
:
1
,
name
:
"username"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"access_token"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
],
);
/**
* @generated from message memos.api.v2.DeleteUserAccessTokenResponse
*/
export
const
DeleteUserAccessTokenResponse
=
proto3
.
makeMessageType
(
"memos.api.v2.DeleteUserAccessTokenResponse"
,
[],
);
/**
* @generated from message memos.api.v2.UserAccessToken
*/
export
const
UserAccessToken
=
proto3
.
makeMessageType
(
"memos.api.v2.UserAccessToken"
,
()
=>
[
{
no
:
1
,
name
:
"access_token"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"description"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
3
,
name
:
"issued_at"
,
kind
:
"message"
,
T
:
Timestamp
},
{
no
:
4
,
name
:
"expires_at"
,
kind
:
"message"
,
T
:
Timestamp
},
],
);
web/src/types/proto/store/system_setting_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file store/system_setting.proto (package memos.store, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from enum memos.store.SystemSettingKey
*/
export
declare
enum
SystemSettingKey
{
/**
* @generated from enum value: SYSTEM_SETTING_KEY_UNSPECIFIED = 0;
*/
SYSTEM_SETTING_KEY_UNSPECIFIED
=
0
,
/**
* BackupConfig is the key for auto-backup configuration.
*
* @generated from enum value: BACKUP_CONFIG = 1;
*/
BACKUP_CONFIG
=
1
,
}
/**
* @generated from message memos.store.BackupConfig
*/
export
declare
class
BackupConfig
extends
Message
<
BackupConfig
>
{
/**
* enabled indicates whether backup is enabled.
*
* @generated from field: bool enabled = 1;
*/
enabled
:
boolean
;
/**
* cron is the cron expression for backup. See https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format
*
* @generated from field: string cron = 2;
*/
cron
:
string
;
/**
* max_keep is the maximum number of backups to keep.
*
* @generated from field: int32 max_keep = 3;
*/
maxKeep
:
number
;
constructor
(
data
?:
PartialMessage
<
BackupConfig
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.store.BackupConfig"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
BackupConfig
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
BackupConfig
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
BackupConfig
;
static
equals
(
a
:
BackupConfig
|
PlainMessage
<
BackupConfig
>
|
undefined
,
b
:
BackupConfig
|
PlainMessage
<
BackupConfig
>
|
undefined
):
boolean
;
}
web/src/types/proto/store/system_setting_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file store/system_setting.proto (package memos.store, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from enum memos.store.SystemSettingKey
*/
export
const
SystemSettingKey
=
proto3
.
makeEnum
(
"memos.store.SystemSettingKey"
,
[
{
no
:
0
,
name
:
"SYSTEM_SETTING_KEY_UNSPECIFIED"
},
{
no
:
1
,
name
:
"BACKUP_CONFIG"
},
],
);
/**
* @generated from message memos.store.BackupConfig
*/
export
const
BackupConfig
=
proto3
.
makeMessageType
(
"memos.store.BackupConfig"
,
()
=>
[
{
no
:
1
,
name
:
"enabled"
,
kind
:
"scalar"
,
T
:
8
/* ScalarType.BOOL */
},
{
no
:
2
,
name
:
"cron"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
3
,
name
:
"max_keep"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
],
);
web/src/types/proto/store/user_setting_pb.d.ts
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file store/user_setting.proto (package memos.store, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
type
{
BinaryReadOptions
,
FieldList
,
JsonReadOptions
,
JsonValue
,
PartialMessage
,
PlainMessage
}
from
"@bufbuild/protobuf"
;
import
{
Message
,
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from enum memos.store.UserSettingKey
*/
export
declare
enum
UserSettingKey
{
/**
* @generated from enum value: USER_SETTING_KEY_UNSPECIFIED = 0;
*/
USER_SETTING_KEY_UNSPECIFIED
=
0
,
/**
* Access tokens for the user.
*
* @generated from enum value: USER_SETTING_ACCESS_TOKENS = 1;
*/
USER_SETTING_ACCESS_TOKENS
=
1
,
}
/**
* @generated from message memos.store.UserSetting
*/
export
declare
class
UserSetting
extends
Message
<
UserSetting
>
{
/**
* @generated from field: int32 user_id = 1;
*/
userId
:
number
;
/**
* @generated from field: memos.store.UserSettingKey key = 2;
*/
key
:
UserSettingKey
;
/**
* @generated from oneof memos.store.UserSetting.value
*/
value
:
{
/**
* @generated from field: memos.store.AccessTokensUserSetting access_tokens = 3;
*/
value
:
AccessTokensUserSetting
;
case
:
"accessTokens"
;
}
|
{
case
:
undefined
;
value
?:
undefined
};
constructor
(
data
?:
PartialMessage
<
UserSetting
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.store.UserSetting"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
UserSetting
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
UserSetting
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
UserSetting
;
static
equals
(
a
:
UserSetting
|
PlainMessage
<
UserSetting
>
|
undefined
,
b
:
UserSetting
|
PlainMessage
<
UserSetting
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.store.AccessTokensUserSetting
*/
export
declare
class
AccessTokensUserSetting
extends
Message
<
AccessTokensUserSetting
>
{
/**
* @generated from field: repeated memos.store.AccessTokensUserSetting.AccessToken access_tokens = 1;
*/
accessTokens
:
AccessTokensUserSetting_AccessToken
[];
constructor
(
data
?:
PartialMessage
<
AccessTokensUserSetting
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.store.AccessTokensUserSetting"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
AccessTokensUserSetting
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
AccessTokensUserSetting
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
AccessTokensUserSetting
;
static
equals
(
a
:
AccessTokensUserSetting
|
PlainMessage
<
AccessTokensUserSetting
>
|
undefined
,
b
:
AccessTokensUserSetting
|
PlainMessage
<
AccessTokensUserSetting
>
|
undefined
):
boolean
;
}
/**
* @generated from message memos.store.AccessTokensUserSetting.AccessToken
*/
export
declare
class
AccessTokensUserSetting_AccessToken
extends
Message
<
AccessTokensUserSetting_AccessToken
>
{
/**
* The access token is a JWT token.
* Including expiration time, issuer, etc.
*
* @generated from field: string access_token = 1;
*/
accessToken
:
string
;
/**
* A description for the access token.
*
* @generated from field: string description = 2;
*/
description
:
string
;
constructor
(
data
?:
PartialMessage
<
AccessTokensUserSetting_AccessToken
>
);
static
readonly
runtime
:
typeof
proto3
;
static
readonly
typeName
=
"memos.store.AccessTokensUserSetting.AccessToken"
;
static
readonly
fields
:
FieldList
;
static
fromBinary
(
bytes
:
Uint8Array
,
options
?:
Partial
<
BinaryReadOptions
>
):
AccessTokensUserSetting_AccessToken
;
static
fromJson
(
jsonValue
:
JsonValue
,
options
?:
Partial
<
JsonReadOptions
>
):
AccessTokensUserSetting_AccessToken
;
static
fromJsonString
(
jsonString
:
string
,
options
?:
Partial
<
JsonReadOptions
>
):
AccessTokensUserSetting_AccessToken
;
static
equals
(
a
:
AccessTokensUserSetting_AccessToken
|
PlainMessage
<
AccessTokensUserSetting_AccessToken
>
|
undefined
,
b
:
AccessTokensUserSetting_AccessToken
|
PlainMessage
<
AccessTokensUserSetting_AccessToken
>
|
undefined
):
boolean
;
}
web/src/types/proto/store/user_setting_pb.js
deleted
100644 → 0
View file @
72ca4e74
// @generated by protoc-gen-es v1.3.0
// @generated from file store/user_setting.proto (package memos.store, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import
{
proto3
}
from
"@bufbuild/protobuf"
;
/**
* @generated from enum memos.store.UserSettingKey
*/
export
const
UserSettingKey
=
proto3
.
makeEnum
(
"memos.store.UserSettingKey"
,
[
{
no
:
0
,
name
:
"USER_SETTING_KEY_UNSPECIFIED"
},
{
no
:
1
,
name
:
"USER_SETTING_ACCESS_TOKENS"
},
],
);
/**
* @generated from message memos.store.UserSetting
*/
export
const
UserSetting
=
proto3
.
makeMessageType
(
"memos.store.UserSetting"
,
()
=>
[
{
no
:
1
,
name
:
"user_id"
,
kind
:
"scalar"
,
T
:
5
/* ScalarType.INT32 */
},
{
no
:
2
,
name
:
"key"
,
kind
:
"enum"
,
T
:
proto3
.
getEnumType
(
UserSettingKey
)
},
{
no
:
3
,
name
:
"access_tokens"
,
kind
:
"message"
,
T
:
AccessTokensUserSetting
,
oneof
:
"value"
},
],
);
/**
* @generated from message memos.store.AccessTokensUserSetting
*/
export
const
AccessTokensUserSetting
=
proto3
.
makeMessageType
(
"memos.store.AccessTokensUserSetting"
,
()
=>
[
{
no
:
1
,
name
:
"access_tokens"
,
kind
:
"message"
,
T
:
AccessTokensUserSetting_AccessToken
,
repeated
:
true
},
],
);
/**
* @generated from message memos.store.AccessTokensUserSetting.AccessToken
*/
export
const
AccessTokensUserSetting_AccessToken
=
proto3
.
makeMessageType
(
"memos.store.AccessTokensUserSetting.AccessToken"
,
()
=>
[
{
no
:
1
,
name
:
"access_token"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
{
no
:
2
,
name
:
"description"
,
kind
:
"scalar"
,
T
:
9
/* ScalarType.STRING */
},
],
{
localName
:
"AccessTokensUserSetting_AccessToken"
},
);
web/src/utils/resource.ts
View file @
d09e3c36
import
{
Resource
}
from
"@/types/proto
/api/v2/resource_service_pb
"
;
import
{
Resource
}
from
"@/types/proto
-grpcweb/api/v2/resource_service
"
;
export
const
getResourceUrl
=
(
resource
:
Resource
,
withOrigin
=
true
)
=>
{
export
const
getResourceUrl
=
(
resource
:
Resource
,
withOrigin
=
true
)
=>
{
if
(
resource
.
externalLink
)
{
if
(
resource
.
externalLink
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment