mirror of
https://github.com/usememos/memos.git
synced 2025-03-26 07:30:09 +01:00
chore: remove buf es generator
This commit is contained in:
parent
72ca4e74ee
commit
d09e3c3658
@ -19,8 +19,6 @@ plugins:
|
||||
opt:
|
||||
- paths=source_relative
|
||||
# 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
|
||||
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
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Autocomplete, Button, Input, List, ListItem, Option, Select, Typography } from "@mui/joy";
|
||||
import React, { useRef, useState } from "react";
|
||||
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 { useResourceStore } from "../store/module";
|
||||
import { generateDialog } from "./Dialog";
|
||||
|
@ -1,4 +1,4 @@
|
||||
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 ResourceIcon from "../ResourceIcon";
|
||||
|
||||
|
@ -8,7 +8,7 @@ import { TAB_SPACE_WIDTH, UNKNOWN_ID } from "@/helpers/consts";
|
||||
import { clearContentQueryParam } from "@/helpers/utils";
|
||||
import { getMatchedNodes } from "@/labs/marked";
|
||||
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 showCreateResourceDialog from "../CreateResourceDialog";
|
||||
import Icon from "../Icon";
|
||||
|
@ -1,4 +1,4 @@
|
||||
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 ResourceIcon from "./ResourceIcon";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import classNames from "classnames";
|
||||
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 MemoResource from "./MemoResource";
|
||||
import showPreviewImageDialog from "./PreviewImageDialog";
|
||||
|
@ -1,23 +0,0 @@
|
||||
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;
|
@ -1,6 +1,6 @@
|
||||
import classNames from "classnames";
|
||||
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 Icon from "./Icon";
|
||||
import showPreviewImageDialog from "./PreviewImageDialog";
|
||||
|
@ -4,7 +4,7 @@ import copy from "copy-to-clipboard";
|
||||
import { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
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 showCreateAccessTokenDialog from "../CreateAccessTokenDialog";
|
||||
import { showCommonDialog } from "../Dialog/CommonDialog";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import axios from "axios";
|
||||
import { Resource } from "@/types/proto/api/v2/resource_service_pb";
|
||||
import { GetUserResponse } from "@/types/proto/api/v2/user_service_pb";
|
||||
import { Resource } from "@/types/proto-grpcweb/api/v2/resource_service";
|
||||
import { GetUserResponse } from "@/types/proto-grpcweb/api/v2/user_service";
|
||||
|
||||
export function getSystemStatus() {
|
||||
return axios.get<SystemStatus>("/api/v1/status");
|
||||
|
@ -6,7 +6,7 @@ import Icon from "@/components/Icon";
|
||||
import MobileHeader from "@/components/MobileHeader";
|
||||
import ResourceIcon from "@/components/ResourceIcon";
|
||||
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";
|
||||
|
||||
const fetchAllResources = async () => {
|
||||
|
@ -1,5 +1,5 @@
|
||||
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 store, { useAppSelector } from "../";
|
||||
import { deleteResource, patchResource, setResources } from "../reducer/resource";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||
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 {
|
||||
resources: Resource[];
|
||||
|
25
web/src/types/proto/api/v2/common_pb.d.ts
vendored
25
web/src/types/proto/api/v2/common_pb.d.ts
vendored
@ -1,25 +0,0 @@
|
||||
// @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,
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
// @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"},
|
||||
],
|
||||
);
|
||||
|
201
web/src/types/proto/api/v2/memo_service_pb.d.ts
vendored
201
web/src/types/proto/api/v2/memo_service_pb.d.ts
vendored
@ -1,201 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,80 +0,0 @@
|
||||
// @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 },
|
||||
],
|
||||
);
|
||||
|
105
web/src/types/proto/api/v2/resource_service_pb.d.ts
vendored
105
web/src/types/proto/api/v2/resource_service_pb.d.ts
vendored
@ -1,105 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
// @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 },
|
||||
],
|
||||
);
|
||||
|
162
web/src/types/proto/api/v2/system_service_pb.d.ts
vendored
162
web/src/types/proto/api/v2/system_service_pb.d.ts
vendored
@ -1,162 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
// @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 },
|
||||
],
|
||||
);
|
||||
|
85
web/src/types/proto/api/v2/tag_service_pb.d.ts
vendored
85
web/src/types/proto/api/v2/tag_service_pb.d.ts
vendored
@ -1,85 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
// @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 },
|
||||
],
|
||||
);
|
||||
|
401
web/src/types/proto/api/v2/user_service_pb.d.ts
vendored
401
web/src/types/proto/api/v2/user_service_pb.d.ts
vendored
@ -1,401 +0,0 @@
|
||||
// @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 type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Timestamp } from "@bufbuild/protobuf";
|
||||
import { Message, proto3 } from "@bufbuild/protobuf";
|
||||
import type { RowStatus } from "./common_pb.js";
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.User
|
||||
*/
|
||||
export declare class User extends Message<User> {
|
||||
/**
|
||||
* @generated from field: int32 id = 1;
|
||||
*/
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* @generated from field: string username = 2;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: memos.api.v2.User.Role role = 3;
|
||||
*/
|
||||
role: User_Role;
|
||||
|
||||
/**
|
||||
* @generated from field: string email = 4;
|
||||
*/
|
||||
email: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string nickname = 5;
|
||||
*/
|
||||
nickname: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string avatar_url = 6;
|
||||
*/
|
||||
avatarUrl: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string password = 7;
|
||||
*/
|
||||
password: string;
|
||||
|
||||
/**
|
||||
* @generated from field: memos.api.v2.RowStatus row_status = 8;
|
||||
*/
|
||||
rowStatus: RowStatus;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp create_time = 9;
|
||||
*/
|
||||
createTime?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp update_time = 10;
|
||||
*/
|
||||
updateTime?: Timestamp;
|
||||
|
||||
constructor(data?: PartialMessage<User>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.User";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): User;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): User;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): User;
|
||||
|
||||
static equals(a: User | PlainMessage<User> | undefined, b: User | PlainMessage<User> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from enum memos.api.v2.User.Role
|
||||
*/
|
||||
export declare enum User_Role {
|
||||
/**
|
||||
* @generated from enum value: ROLE_UNSPECIFIED = 0;
|
||||
*/
|
||||
ROLE_UNSPECIFIED = 0,
|
||||
|
||||
/**
|
||||
* @generated from enum value: HOST = 1;
|
||||
*/
|
||||
HOST = 1,
|
||||
|
||||
/**
|
||||
* @generated from enum value: ADMIN = 2;
|
||||
*/
|
||||
ADMIN = 2,
|
||||
|
||||
/**
|
||||
* @generated from enum value: USER = 3;
|
||||
*/
|
||||
USER = 3,
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.GetUserRequest
|
||||
*/
|
||||
export declare class GetUserRequest extends Message<GetUserRequest> {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
constructor(data?: PartialMessage<GetUserRequest>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.GetUserRequest";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserRequest;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserRequest;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserRequest;
|
||||
|
||||
static equals(a: GetUserRequest | PlainMessage<GetUserRequest> | undefined, b: GetUserRequest | PlainMessage<GetUserRequest> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.GetUserResponse
|
||||
*/
|
||||
export declare class GetUserResponse extends Message<GetUserResponse> {
|
||||
/**
|
||||
* @generated from field: memos.api.v2.User user = 1;
|
||||
*/
|
||||
user?: User;
|
||||
|
||||
constructor(data?: PartialMessage<GetUserResponse>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.GetUserResponse";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetUserResponse;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetUserResponse;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetUserResponse;
|
||||
|
||||
static equals(a: GetUserResponse | PlainMessage<GetUserResponse> | undefined, b: GetUserResponse | PlainMessage<GetUserResponse> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.UpdateUserRequest
|
||||
*/
|
||||
export declare class UpdateUserRequest extends Message<UpdateUserRequest> {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: memos.api.v2.User user = 2;
|
||||
*/
|
||||
user?: User;
|
||||
|
||||
/**
|
||||
* The update mask applies to the user resource.
|
||||
*
|
||||
* @generated from field: repeated string update_mask = 3;
|
||||
*/
|
||||
updateMask: string[];
|
||||
|
||||
constructor(data?: PartialMessage<UpdateUserRequest>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.UpdateUserRequest";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserRequest;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserRequest;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserRequest;
|
||||
|
||||
static equals(a: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined, b: UpdateUserRequest | PlainMessage<UpdateUserRequest> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.UpdateUserResponse
|
||||
*/
|
||||
export declare class UpdateUserResponse extends Message<UpdateUserResponse> {
|
||||
/**
|
||||
* @generated from field: memos.api.v2.User user = 1;
|
||||
*/
|
||||
user?: User;
|
||||
|
||||
constructor(data?: PartialMessage<UpdateUserResponse>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.UpdateUserResponse";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateUserResponse;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateUserResponse;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateUserResponse;
|
||||
|
||||
static equals(a: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined, b: UpdateUserResponse | PlainMessage<UpdateUserResponse> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.ListUserAccessTokensRequest
|
||||
*/
|
||||
export declare class ListUserAccessTokensRequest extends Message<ListUserAccessTokensRequest> {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
constructor(data?: PartialMessage<ListUserAccessTokensRequest>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.ListUserAccessTokensRequest";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserAccessTokensRequest;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserAccessTokensRequest;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserAccessTokensRequest;
|
||||
|
||||
static equals(a: ListUserAccessTokensRequest | PlainMessage<ListUserAccessTokensRequest> | undefined, b: ListUserAccessTokensRequest | PlainMessage<ListUserAccessTokensRequest> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.ListUserAccessTokensResponse
|
||||
*/
|
||||
export declare class ListUserAccessTokensResponse extends Message<ListUserAccessTokensResponse> {
|
||||
/**
|
||||
* @generated from field: repeated memos.api.v2.UserAccessToken access_tokens = 1;
|
||||
*/
|
||||
accessTokens: UserAccessToken[];
|
||||
|
||||
constructor(data?: PartialMessage<ListUserAccessTokensResponse>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.ListUserAccessTokensResponse";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListUserAccessTokensResponse;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListUserAccessTokensResponse;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListUserAccessTokensResponse;
|
||||
|
||||
static equals(a: ListUserAccessTokensResponse | PlainMessage<ListUserAccessTokensResponse> | undefined, b: ListUserAccessTokensResponse | PlainMessage<ListUserAccessTokensResponse> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.CreateUserAccessTokenRequest
|
||||
*/
|
||||
export declare class CreateUserAccessTokenRequest extends Message<CreateUserAccessTokenRequest> {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* @generated from field: memos.api.v2.UserAccessToken user_access_token = 2;
|
||||
*/
|
||||
userAccessToken?: UserAccessToken;
|
||||
|
||||
constructor(data?: PartialMessage<CreateUserAccessTokenRequest>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.CreateUserAccessTokenRequest";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateUserAccessTokenRequest;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateUserAccessTokenRequest;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateUserAccessTokenRequest;
|
||||
|
||||
static equals(a: CreateUserAccessTokenRequest | PlainMessage<CreateUserAccessTokenRequest> | undefined, b: CreateUserAccessTokenRequest | PlainMessage<CreateUserAccessTokenRequest> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.CreateUserAccessTokenResponse
|
||||
*/
|
||||
export declare class CreateUserAccessTokenResponse extends Message<CreateUserAccessTokenResponse> {
|
||||
/**
|
||||
* @generated from field: memos.api.v2.UserAccessToken access_token = 1;
|
||||
*/
|
||||
accessToken?: UserAccessToken;
|
||||
|
||||
constructor(data?: PartialMessage<CreateUserAccessTokenResponse>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.CreateUserAccessTokenResponse";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CreateUserAccessTokenResponse;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CreateUserAccessTokenResponse;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CreateUserAccessTokenResponse;
|
||||
|
||||
static equals(a: CreateUserAccessTokenResponse | PlainMessage<CreateUserAccessTokenResponse> | undefined, b: CreateUserAccessTokenResponse | PlainMessage<CreateUserAccessTokenResponse> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.DeleteUserAccessTokenRequest
|
||||
*/
|
||||
export declare class DeleteUserAccessTokenRequest extends Message<DeleteUserAccessTokenRequest> {
|
||||
/**
|
||||
* @generated from field: string username = 1;
|
||||
*/
|
||||
username: string;
|
||||
|
||||
/**
|
||||
* access_token is the access token to delete.
|
||||
*
|
||||
* @generated from field: string access_token = 2;
|
||||
*/
|
||||
accessToken: string;
|
||||
|
||||
constructor(data?: PartialMessage<DeleteUserAccessTokenRequest>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.DeleteUserAccessTokenRequest";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteUserAccessTokenRequest;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteUserAccessTokenRequest;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteUserAccessTokenRequest;
|
||||
|
||||
static equals(a: DeleteUserAccessTokenRequest | PlainMessage<DeleteUserAccessTokenRequest> | undefined, b: DeleteUserAccessTokenRequest | PlainMessage<DeleteUserAccessTokenRequest> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.DeleteUserAccessTokenResponse
|
||||
*/
|
||||
export declare class DeleteUserAccessTokenResponse extends Message<DeleteUserAccessTokenResponse> {
|
||||
constructor(data?: PartialMessage<DeleteUserAccessTokenResponse>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.DeleteUserAccessTokenResponse";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): DeleteUserAccessTokenResponse;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): DeleteUserAccessTokenResponse;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): DeleteUserAccessTokenResponse;
|
||||
|
||||
static equals(a: DeleteUserAccessTokenResponse | PlainMessage<DeleteUserAccessTokenResponse> | undefined, b: DeleteUserAccessTokenResponse | PlainMessage<DeleteUserAccessTokenResponse> | undefined): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @generated from message memos.api.v2.UserAccessToken
|
||||
*/
|
||||
export declare class UserAccessToken extends Message<UserAccessToken> {
|
||||
/**
|
||||
* @generated from field: string access_token = 1;
|
||||
*/
|
||||
accessToken: string;
|
||||
|
||||
/**
|
||||
* @generated from field: string description = 2;
|
||||
*/
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp issued_at = 3;
|
||||
*/
|
||||
issuedAt?: Timestamp;
|
||||
|
||||
/**
|
||||
* @generated from field: google.protobuf.Timestamp expires_at = 4;
|
||||
*/
|
||||
expiresAt?: Timestamp;
|
||||
|
||||
constructor(data?: PartialMessage<UserAccessToken>);
|
||||
|
||||
static readonly runtime: typeof proto3;
|
||||
static readonly typeName = "memos.api.v2.UserAccessToken";
|
||||
static readonly fields: FieldList;
|
||||
|
||||
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UserAccessToken;
|
||||
|
||||
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UserAccessToken;
|
||||
|
||||
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UserAccessToken;
|
||||
|
||||
static equals(a: UserAccessToken | PlainMessage<UserAccessToken> | undefined, b: UserAccessToken | PlainMessage<UserAccessToken> | undefined): boolean;
|
||||
}
|
||||
|
@ -1,155 +0,0 @@
|
||||
// @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 },
|
||||
],
|
||||
);
|
||||
|
65
web/src/types/proto/store/system_setting_pb.d.ts
vendored
65
web/src/types/proto/store/system_setting_pb.d.ts
vendored
@ -1,65 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
// @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 */ },
|
||||
],
|
||||
);
|
||||
|
123
web/src/types/proto/store/user_setting_pb.d.ts
vendored
123
web/src/types/proto/store/user_setting_pb.d.ts
vendored
@ -1,123 +0,0 @@
|
||||
// @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;
|
||||
}
|
||||
|
@ -1,52 +0,0 @@
|
||||
// @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"},
|
||||
);
|
||||
|
@ -1,4 +1,4 @@
|
||||
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) => {
|
||||
if (resource.externalLink) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user