From a372d07c4b777509e901ca411b986683967828c0 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 20 Sep 2023 21:28:36 +0800 Subject: [PATCH] refactor: update ts proto generator --- .github/workflows/extension-test.yml | 5 +- .github/workflows/frontend-test.yml | 5 +- Dockerfile | 18 +- frontend/extension/.gitignore | 2 + frontend/extension/package.json | 1 - frontend/extension/pnpm-lock.yaml | 7 - frontend/extension/src/background.ts | 2 +- .../src/components/CreateShortcutsButton.tsx | 4 +- .../src/components/PullShortcutsButton.tsx | 2 +- .../extension/src/components/ShortcutView.tsx | 2 +- .../src/components/ShortcutsContainer.tsx | 2 +- frontend/extension/src/options.tsx | 2 +- frontend/extension/src/popup.tsx | 2 +- .../src/types/proto/api/v2/common_pb.d.ts | 25 - .../src/types/proto/api/v2/common_pb.js | 19 - .../proto/api/v2/shortcut_service_pb.d.ts | 329 ----------- .../types/proto/api/v2/shortcut_service_pb.js | 130 ----- .../types/proto/api/v2/user_service_pb.d.ts | 524 ------------------ .../src/types/proto/api/v2/user_service_pb.js | 208 ------- .../proto/api/v2/user_setting_service_pb.d.ts | 202 ------- .../proto/api/v2/user_setting_service_pb.js | 85 --- .../api/v2/workspace_setting_service_pb.d.ts | 194 ------- .../api/v2/workspace_setting_service_pb.js | 70 --- .../src/types/proto/store/activity_pb.d.ts | 32 -- .../src/types/proto/store/activity_pb.js | 17 - .../src/types/proto/store/common_pb.d.ts | 25 - .../src/types/proto/store/common_pb.js | 19 - .../src/types/proto/store/shortcut_pb.d.ts | 147 ----- .../src/types/proto/store/shortcut_pb.js | 54 -- .../types/proto/store/user_setting_pb.d.ts | 189 ------- .../src/types/proto/store/user_setting_pb.js | 80 --- .../proto/store/workspace_setting_pb.d.ts | 141 ----- .../types/proto/store/workspace_setting_pb.js | 47 -- frontend/web/.gitignore | 1 + frontend/web/package.json | 3 +- frontend/web/pnpm-lock.yaml | 7 - .../components/setting/AccessTokenSection.tsx | 2 +- .../components/setting/PreferenceSection.tsx | 2 +- .../components/setting/WorkspaceSection.tsx | 2 +- frontend/web/src/helpers/api.ts | 2 +- frontend/web/src/stores/v1/user.ts | 2 +- .../web/src/types/proto/api/v2/common_pb.d.ts | 25 - .../web/src/types/proto/api/v2/common_pb.js | 19 - .../proto/api/v2/shortcut_service_pb.d.ts | 329 ----------- .../types/proto/api/v2/shortcut_service_pb.js | 130 ----- .../types/proto/api/v2/user_service_pb.d.ts | 524 ------------------ .../src/types/proto/api/v2/user_service_pb.js | 208 ------- .../proto/api/v2/user_setting_service_pb.d.ts | 202 ------- .../proto/api/v2/user_setting_service_pb.js | 85 --- .../api/v2/workspace_setting_service_pb.d.ts | 194 ------- .../api/v2/workspace_setting_service_pb.js | 70 --- .../src/types/proto/store/activity_pb.d.ts | 32 -- .../web/src/types/proto/store/activity_pb.js | 17 - .../web/src/types/proto/store/common_pb.d.ts | 25 - .../web/src/types/proto/store/common_pb.js | 19 - .../src/types/proto/store/shortcut_pb.d.ts | 147 ----- .../web/src/types/proto/store/shortcut_pb.js | 54 -- .../types/proto/store/user_setting_pb.d.ts | 189 ------- .../src/types/proto/store/user_setting_pb.js | 80 --- .../proto/store/workspace_setting_pb.d.ts | 141 ----- .../types/proto/store/workspace_setting_pb.js | 47 -- proto/buf.gen.yaml | 20 +- 62 files changed, 59 insertions(+), 5110 deletions(-) delete mode 100644 frontend/extension/src/types/proto/api/v2/common_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/api/v2/common_pb.js delete mode 100644 frontend/extension/src/types/proto/api/v2/shortcut_service_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/api/v2/shortcut_service_pb.js delete mode 100644 frontend/extension/src/types/proto/api/v2/user_service_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/api/v2/user_service_pb.js delete mode 100644 frontend/extension/src/types/proto/api/v2/user_setting_service_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/api/v2/user_setting_service_pb.js delete mode 100644 frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.js delete mode 100644 frontend/extension/src/types/proto/store/activity_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/store/activity_pb.js delete mode 100644 frontend/extension/src/types/proto/store/common_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/store/common_pb.js delete mode 100644 frontend/extension/src/types/proto/store/shortcut_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/store/shortcut_pb.js delete mode 100644 frontend/extension/src/types/proto/store/user_setting_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/store/user_setting_pb.js delete mode 100644 frontend/extension/src/types/proto/store/workspace_setting_pb.d.ts delete mode 100644 frontend/extension/src/types/proto/store/workspace_setting_pb.js delete mode 100644 frontend/web/src/types/proto/api/v2/common_pb.d.ts delete mode 100644 frontend/web/src/types/proto/api/v2/common_pb.js delete mode 100644 frontend/web/src/types/proto/api/v2/shortcut_service_pb.d.ts delete mode 100644 frontend/web/src/types/proto/api/v2/shortcut_service_pb.js delete mode 100644 frontend/web/src/types/proto/api/v2/user_service_pb.d.ts delete mode 100644 frontend/web/src/types/proto/api/v2/user_service_pb.js delete mode 100644 frontend/web/src/types/proto/api/v2/user_setting_service_pb.d.ts delete mode 100644 frontend/web/src/types/proto/api/v2/user_setting_service_pb.js delete mode 100644 frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.d.ts delete mode 100644 frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.js delete mode 100644 frontend/web/src/types/proto/store/activity_pb.d.ts delete mode 100644 frontend/web/src/types/proto/store/activity_pb.js delete mode 100644 frontend/web/src/types/proto/store/common_pb.d.ts delete mode 100644 frontend/web/src/types/proto/store/common_pb.js delete mode 100644 frontend/web/src/types/proto/store/shortcut_pb.d.ts delete mode 100644 frontend/web/src/types/proto/store/shortcut_pb.js delete mode 100644 frontend/web/src/types/proto/store/user_setting_pb.d.ts delete mode 100644 frontend/web/src/types/proto/store/user_setting_pb.js delete mode 100644 frontend/web/src/types/proto/store/workspace_setting_pb.d.ts delete mode 100644 frontend/web/src/types/proto/store/workspace_setting_pb.js diff --git a/.github/workflows/extension-test.yml b/.github/workflows/extension-test.yml index b4f43c8..5dfe166 100644 --- a/.github/workflows/extension-test.yml +++ b/.github/workflows/extension-test.yml @@ -15,10 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: buf generate + working-directory: proto - uses: pnpm/action-setup@v2.2.4 with: version: 8 - - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: "18" @@ -34,6 +35,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: buf generate + working-directory: proto - uses: pnpm/action-setup@v2.2.4 with: version: 8 diff --git a/.github/workflows/frontend-test.yml b/.github/workflows/frontend-test.yml index 5455eb0..5416d75 100644 --- a/.github/workflows/frontend-test.yml +++ b/.github/workflows/frontend-test.yml @@ -15,10 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: buf generate + working-directory: proto - uses: pnpm/action-setup@v2.2.4 with: version: 8 - - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: "18" @@ -34,6 +35,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: buf generate + working-directory: proto - uses: pnpm/action-setup@v2.2.4 with: version: 8 diff --git a/Dockerfile b/Dockerfile index 0d89fa1..c91980d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,26 @@ +# Build protobuf. +FROM golang:1.21-alpine AS protobuf +WORKDIR /protobuf-generate + +COPY . . + +RUN GO111MODULE=on GOBIN=/usr/local/bin go install github.com/bufbuild/buf/cmd/buf@v1.26.1 + +WORKDIR /protobuf-generate/proto + +RUN buf generate + # Build frontend dist. FROM node:18-alpine AS frontend WORKDIR /frontend-build -COPY ./frontend/ . +COPY ./frontend . + +COPY --from=protobuf /protobuf-generate/frontend/web/src/types/proto ./web/src/types/proto WORKDIR /frontend-build/web -RUN corepack enable && pnpm i --frozen-lockfile +RUN corepack enable && pnpm i --frozen-lockfile RUN pnpm build diff --git a/frontend/extension/.gitignore b/frontend/extension/.gitignore index 4668564..98eaff7 100644 --- a/frontend/extension/.gitignore +++ b/frontend/extension/.gitignore @@ -36,3 +36,5 @@ keys.json # typescript .tsbuildinfo + +src/types/proto diff --git a/frontend/extension/package.json b/frontend/extension/package.json index 9045882..687cf2d 100644 --- a/frontend/extension/package.json +++ b/frontend/extension/package.json @@ -11,7 +11,6 @@ "lint-fix": "eslint --ext .js,.ts,.tsx, src --fix" }, "dependencies": { - "@bufbuild/protobuf": "^1.3.1", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/joy": "5.0.0-beta.0", diff --git a/frontend/extension/pnpm-lock.yaml b/frontend/extension/pnpm-lock.yaml index c1c3360..86b6d04 100644 --- a/frontend/extension/pnpm-lock.yaml +++ b/frontend/extension/pnpm-lock.yaml @@ -5,9 +5,6 @@ settings: excludeLinksFromLockfile: false dependencies: - '@bufbuild/protobuf': - specifier: ^1.3.1 - version: 1.3.1 '@emotion/react': specifier: ^11.11.1 version: 11.11.1(@types/react@18.2.15)(react@18.2.0) @@ -348,10 +345,6 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - /@bufbuild/protobuf@1.3.1: - resolution: {integrity: sha512-BUyJWutgP2S8K/1NphOJokuwDckXS4qI2T1pGZAlkFdZchWae3jm6fCdkcGbLlM1QLOcNFFePd+7Feo4BYGrJQ==} - dev: false - /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: diff --git a/frontend/extension/src/background.ts b/frontend/extension/src/background.ts index c4d032b..5bbda97 100644 --- a/frontend/extension/src/background.ts +++ b/frontend/extension/src/background.ts @@ -1,4 +1,4 @@ -import type { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; +import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import { Storage } from "@plasmohq/storage"; const storage = new Storage(); diff --git a/frontend/extension/src/components/CreateShortcutsButton.tsx b/frontend/extension/src/components/CreateShortcutsButton.tsx index 05da50c..7900b98 100644 --- a/frontend/extension/src/components/CreateShortcutsButton.tsx +++ b/frontend/extension/src/components/CreateShortcutsButton.tsx @@ -3,7 +3,7 @@ import { useStorage } from "@plasmohq/storage/hook"; import axios from "axios"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; -import { CreateShortcutResponse, OpenGraphMetadata, Visibility } from "@/types/proto/api/v2/shortcut_service_pb"; +import { CreateShortcutResponse, OpenGraphMetadata, Visibility } from "@/types/proto/api/v2/shortcut_service"; import Icon from "./Icon"; const generateTempName = (length = 6) => { @@ -102,7 +102,7 @@ const CreateShortcutsButton = () => { title: state.title, link: state.link, visibility: Visibility.PRIVATE, - ogMetadata: OpenGraphMetadata.fromJsonString("{}"), + ogMetadata: OpenGraphMetadata.fromPartial({}), }, { headers: { diff --git a/frontend/extension/src/components/PullShortcutsButton.tsx b/frontend/extension/src/components/PullShortcutsButton.tsx index 064c4e3..8f02767 100644 --- a/frontend/extension/src/components/PullShortcutsButton.tsx +++ b/frontend/extension/src/components/PullShortcutsButton.tsx @@ -3,7 +3,7 @@ import { useStorage } from "@plasmohq/storage/hook"; import axios from "axios"; import { useEffect } from "react"; import { toast } from "react-hot-toast"; -import { ListShortcutsResponse } from "@/types/proto/api/v2/shortcut_service_pb"; +import { ListShortcutsResponse } from "@/types/proto/api/v2/shortcut_service"; import Icon from "./Icon"; const PullShortcutsButton = () => { diff --git a/frontend/extension/src/components/ShortcutView.tsx b/frontend/extension/src/components/ShortcutView.tsx index 93a0f14..447616f 100644 --- a/frontend/extension/src/components/ShortcutView.tsx +++ b/frontend/extension/src/components/ShortcutView.tsx @@ -1,4 +1,4 @@ -import type { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; +import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import { useStorage } from "@plasmohq/storage/hook"; import classNames from "classnames"; import { useEffect, useState } from "react"; diff --git a/frontend/extension/src/components/ShortcutsContainer.tsx b/frontend/extension/src/components/ShortcutsContainer.tsx index 76ead45..d75c419 100644 --- a/frontend/extension/src/components/ShortcutsContainer.tsx +++ b/frontend/extension/src/components/ShortcutsContainer.tsx @@ -1,4 +1,4 @@ -import type { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; +import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import { useStorage } from "@plasmohq/storage/hook"; import classNames from "classnames"; import ShortcutView from "./ShortcutView"; diff --git a/frontend/extension/src/options.tsx b/frontend/extension/src/options.tsx index d8b38f9..3ac4e55 100644 --- a/frontend/extension/src/options.tsx +++ b/frontend/extension/src/options.tsx @@ -1,4 +1,4 @@ -import type { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; +import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import { Button, Divider, Input } from "@mui/joy"; import { useStorage } from "@plasmohq/storage/hook"; import { useEffect, useState } from "react"; diff --git a/frontend/extension/src/popup.tsx b/frontend/extension/src/popup.tsx index fdb7ce6..b55ec0e 100644 --- a/frontend/extension/src/popup.tsx +++ b/frontend/extension/src/popup.tsx @@ -1,4 +1,4 @@ -import type { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; +import type { Shortcut } from "@/types/proto/api/v2/shortcut_service"; import { Button, Divider, IconButton } from "@mui/joy"; import { useStorage } from "@plasmohq/storage/hook"; import { Toaster } from "react-hot-toast"; diff --git a/frontend/extension/src/types/proto/api/v2/common_pb.d.ts b/frontend/extension/src/types/proto/api/v2/common_pb.d.ts deleted file mode 100644 index 56292fd..0000000 --- a/frontend/extension/src/types/proto/api/v2/common_pb.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/common.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -/** - * @generated from enum slash.api.v2.RowStatus - */ -export declare enum RowStatus { - /** - * @generated from enum value: ROW_STATUS_UNSPECIFIED = 0; - */ - ROW_STATUS_UNSPECIFIED = 0, - - /** - * @generated from enum value: NORMAL = 1; - */ - NORMAL = 1, - - /** - * @generated from enum value: ARCHIVED = 2; - */ - ARCHIVED = 2, -} - diff --git a/frontend/extension/src/types/proto/api/v2/common_pb.js b/frontend/extension/src/types/proto/api/v2/common_pb.js deleted file mode 100644 index d2b11ae..0000000 --- a/frontend/extension/src/types/proto/api/v2/common_pb.js +++ /dev/null @@ -1,19 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/common.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.api.v2.RowStatus - */ -export const RowStatus = proto3.makeEnum( - "slash.api.v2.RowStatus", - [ - {no: 0, name: "ROW_STATUS_UNSPECIFIED"}, - {no: 1, name: "NORMAL"}, - {no: 2, name: "ARCHIVED"}, - ], -); - diff --git a/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.d.ts b/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.d.ts deleted file mode 100644 index 0afa074..0000000 --- a/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.d.ts +++ /dev/null @@ -1,329 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/shortcut_service.proto (package slash.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 slash.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: WORKSPACE = 2; - */ - WORKSPACE = 2, - - /** - * @generated from enum value: PUBLIC = 3; - */ - PUBLIC = 3, -} - -/** - * @generated from message slash.api.v2.Shortcut - */ -export declare class Shortcut extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: int32 creator_id = 2; - */ - creatorId: number; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.api.v2.RowStatus row_status = 5; - */ - rowStatus: RowStatus; - - /** - * @generated from field: string name = 6; - */ - name: string; - - /** - * @generated from field: string link = 7; - */ - link: string; - - /** - * @generated from field: string title = 8; - */ - title: string; - - /** - * @generated from field: repeated string tags = 9; - */ - tags: string[]; - - /** - * @generated from field: string description = 10; - */ - description: string; - - /** - * @generated from field: slash.api.v2.Visibility visibility = 11; - */ - visibility: Visibility; - - /** - * @generated from field: slash.api.v2.OpenGraphMetadata og_metadata = 12; - */ - ogMetadata?: OpenGraphMetadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.Shortcut"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Shortcut; - - static fromJson(jsonValue: JsonValue, options?: Partial): Shortcut; - - static fromJsonString(jsonString: string, options?: Partial): Shortcut; - - static equals(a: Shortcut | PlainMessage | undefined, b: Shortcut | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.OpenGraphMetadata - */ -export declare class OpenGraphMetadata extends Message { - /** - * @generated from field: string title = 1; - */ - title: string; - - /** - * @generated from field: string description = 2; - */ - description: string; - - /** - * @generated from field: string image = 3; - */ - image: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.OpenGraphMetadata"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): OpenGraphMetadata; - - static fromJson(jsonValue: JsonValue, options?: Partial): OpenGraphMetadata; - - static fromJsonString(jsonString: string, options?: Partial): OpenGraphMetadata; - - static equals(a: OpenGraphMetadata | PlainMessage | undefined, b: OpenGraphMetadata | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListShortcutsRequest - */ -export declare class ListShortcutsRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListShortcutsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListShortcutsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListShortcutsRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListShortcutsRequest; - - static equals(a: ListShortcutsRequest | PlainMessage | undefined, b: ListShortcutsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListShortcutsResponse - */ -export declare class ListShortcutsResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.Shortcut shortcuts = 1; - */ - shortcuts: Shortcut[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListShortcutsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListShortcutsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListShortcutsResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListShortcutsResponse; - - static equals(a: ListShortcutsResponse | PlainMessage | undefined, b: ListShortcutsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetShortcutRequest - */ -export declare class GetShortcutRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetShortcutRequest; - - static equals(a: GetShortcutRequest | PlainMessage | undefined, b: GetShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetShortcutResponse - */ -export declare class GetShortcutResponse extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetShortcutResponse; - - static equals(a: GetShortcutResponse | PlainMessage | undefined, b: GetShortcutResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateShortcutRequest - */ -export declare class CreateShortcutRequest extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateShortcutRequest; - - static equals(a: CreateShortcutRequest | PlainMessage | undefined, b: CreateShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateShortcutResponse - */ -export declare class CreateShortcutResponse extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateShortcutResponse; - - static equals(a: CreateShortcutResponse | PlainMessage | undefined, b: CreateShortcutResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteShortcutRequest - */ -export declare class DeleteShortcutRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteShortcutRequest; - - static equals(a: DeleteShortcutRequest | PlainMessage | undefined, b: DeleteShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteShortcutResponse - */ -export declare class DeleteShortcutResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteShortcutResponse; - - static equals(a: DeleteShortcutResponse | PlainMessage | undefined, b: DeleteShortcutResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.js b/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.js deleted file mode 100644 index 1b1ffbe..0000000 --- a/frontend/extension/src/types/proto/api/v2/shortcut_service_pb.js +++ /dev/null @@ -1,130 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/shortcut_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.api.v2.Visibility - */ -export const Visibility = proto3.makeEnum( - "slash.api.v2.Visibility", - [ - {no: 0, name: "VISIBILITY_UNSPECIFIED"}, - {no: 1, name: "PRIVATE"}, - {no: 2, name: "WORKSPACE"}, - {no: 3, name: "PUBLIC"}, - ], -); - -/** - * @generated from message slash.api.v2.Shortcut - */ -export const Shortcut = proto3.makeMessageType( - "slash.api.v2.Shortcut", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "creator_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 5, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 10, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "visibility", kind: "enum", T: proto3.getEnumType(Visibility) }, - { no: 12, name: "og_metadata", kind: "message", T: OpenGraphMetadata }, - ], -); - -/** - * @generated from message slash.api.v2.OpenGraphMetadata - */ -export const OpenGraphMetadata = proto3.makeMessageType( - "slash.api.v2.OpenGraphMetadata", - () => [ - { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListShortcutsRequest - */ -export const ListShortcutsRequest = proto3.makeMessageType( - "slash.api.v2.ListShortcutsRequest", - [], -); - -/** - * @generated from message slash.api.v2.ListShortcutsResponse - */ -export const ListShortcutsResponse = proto3.makeMessageType( - "slash.api.v2.ListShortcutsResponse", - () => [ - { no: 1, name: "shortcuts", kind: "message", T: Shortcut, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.GetShortcutRequest - */ -export const GetShortcutRequest = proto3.makeMessageType( - "slash.api.v2.GetShortcutRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetShortcutResponse - */ -export const GetShortcutResponse = proto3.makeMessageType( - "slash.api.v2.GetShortcutResponse", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.CreateShortcutRequest - */ -export const CreateShortcutRequest = proto3.makeMessageType( - "slash.api.v2.CreateShortcutRequest", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.CreateShortcutResponse - */ -export const CreateShortcutResponse = proto3.makeMessageType( - "slash.api.v2.CreateShortcutResponse", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteShortcutRequest - */ -export const DeleteShortcutRequest = proto3.makeMessageType( - "slash.api.v2.DeleteShortcutRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteShortcutResponse - */ -export const DeleteShortcutResponse = proto3.makeMessageType( - "slash.api.v2.DeleteShortcutResponse", - [], -); - diff --git a/frontend/extension/src/types/proto/api/v2/user_service_pb.d.ts b/frontend/extension/src/types/proto/api/v2/user_service_pb.d.ts deleted file mode 100644 index e607c14..0000000 --- a/frontend/extension/src/types/proto/api/v2/user_service_pb.d.ts +++ /dev/null @@ -1,524 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_service.proto (package slash.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 enum slash.api.v2.Role - */ -export declare enum Role { - /** - * @generated from enum value: ROLE_UNSPECIFIED = 0; - */ - ROLE_UNSPECIFIED = 0, - - /** - * @generated from enum value: ADMIN = 1; - */ - ADMIN = 1, - - /** - * @generated from enum value: USER = 2; - */ - USER = 2, -} - -/** - * @generated from message slash.api.v2.User - */ -export declare class User extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.RowStatus row_status = 2; - */ - rowStatus: RowStatus; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.api.v2.Role role = 6; - */ - role: Role; - - /** - * @generated from field: string email = 7; - */ - email: string; - - /** - * @generated from field: string nickname = 8; - */ - nickname: string; - - /** - * @generated from field: string password = 9; - */ - password: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.User"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): User; - - static fromJson(jsonValue: JsonValue, options?: Partial): User; - - static fromJsonString(jsonString: string, options?: Partial): User; - - static equals(a: User | PlainMessage | undefined, b: User | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUsersRequest - */ -export declare class ListUsersRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUsersRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUsersRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUsersRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListUsersRequest; - - static equals(a: ListUsersRequest | PlainMessage | undefined, b: ListUsersRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUsersResponse - */ -export declare class ListUsersResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.User users = 1; - */ - users: User[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUsersResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUsersResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUsersResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListUsersResponse; - - static equals(a: ListUsersResponse | PlainMessage | undefined, b: ListUsersResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserRequest - */ -export declare class GetUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetUserRequest; - - static equals(a: GetUserRequest | PlainMessage | undefined, b: GetUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserResponse - */ -export declare class GetUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetUserResponse; - - static equals(a: GetUserResponse | PlainMessage | undefined, b: GetUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserRequest - */ -export declare class CreateUserRequest extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserRequest; - - static equals(a: CreateUserRequest | PlainMessage | undefined, b: CreateUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserResponse - */ -export declare class CreateUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserResponse; - - static equals(a: CreateUserResponse | PlainMessage | undefined, b: CreateUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserRequest - */ -export declare class UpdateUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.User user = 2; - */ - user?: User; - - /** - * @generated from field: repeated string update_mask = 3; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserRequest; - - static equals(a: UpdateUserRequest | PlainMessage | undefined, b: UpdateUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserResponse - */ -export declare class UpdateUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserResponse; - - static equals(a: UpdateUserResponse | PlainMessage | undefined, b: UpdateUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserRequest - */ -export declare class DeleteUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserRequest; - - static equals(a: DeleteUserRequest | PlainMessage | undefined, b: DeleteUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserResponse - */ -export declare class DeleteUserResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserResponse; - - static equals(a: DeleteUserResponse | PlainMessage | undefined, b: DeleteUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUserAccessTokensRequest - */ -export declare class ListUserAccessTokensRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUserAccessTokensRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUserAccessTokensRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUserAccessTokensRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListUserAccessTokensRequest; - - static equals(a: ListUserAccessTokensRequest | PlainMessage | undefined, b: ListUserAccessTokensRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUserAccessTokensResponse - */ -export declare class ListUserAccessTokensResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.UserAccessToken access_tokens = 1; - */ - accessTokens: UserAccessToken[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUserAccessTokensResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUserAccessTokensResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUserAccessTokensResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListUserAccessTokensResponse; - - static equals(a: ListUserAccessTokensResponse | PlainMessage | undefined, b: ListUserAccessTokensResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenRequest - */ -export declare class CreateUserAccessTokenRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.UserAccessToken user_access_token = 2; - */ - userAccessToken?: UserAccessToken; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserAccessTokenRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserAccessTokenRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserAccessTokenRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserAccessTokenRequest; - - static equals(a: CreateUserAccessTokenRequest | PlainMessage | undefined, b: CreateUserAccessTokenRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenResponse - */ -export declare class CreateUserAccessTokenResponse extends Message { - /** - * @generated from field: slash.api.v2.UserAccessToken access_token = 1; - */ - accessToken?: UserAccessToken; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserAccessTokenResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserAccessTokenResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserAccessTokenResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserAccessTokenResponse; - - static equals(a: CreateUserAccessTokenResponse | PlainMessage | undefined, b: CreateUserAccessTokenResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenRequest - */ -export declare class DeleteUserAccessTokenRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * access_token is the access token to delete. - * - * @generated from field: string access_token = 2; - */ - accessToken: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserAccessTokenRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserAccessTokenRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserAccessTokenRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserAccessTokenRequest; - - static equals(a: DeleteUserAccessTokenRequest | PlainMessage | undefined, b: DeleteUserAccessTokenRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenResponse - */ -export declare class DeleteUserAccessTokenResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserAccessTokenResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserAccessTokenResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserAccessTokenResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserAccessTokenResponse; - - static equals(a: DeleteUserAccessTokenResponse | PlainMessage | undefined, b: DeleteUserAccessTokenResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UserAccessToken - */ -export declare class UserAccessToken extends Message { - /** - * @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); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UserAccessToken"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserAccessToken; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserAccessToken; - - static fromJsonString(jsonString: string, options?: Partial): UserAccessToken; - - static equals(a: UserAccessToken | PlainMessage | undefined, b: UserAccessToken | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/api/v2/user_service_pb.js b/frontend/extension/src/types/proto/api/v2/user_service_pb.js deleted file mode 100644 index 55a6495..0000000 --- a/frontend/extension/src/types/proto/api/v2/user_service_pb.js +++ /dev/null @@ -1,208 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3, Timestamp } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.api.v2.Role - */ -export const Role = proto3.makeEnum( - "slash.api.v2.Role", - [ - {no: 0, name: "ROLE_UNSPECIFIED"}, - {no: 1, name: "ADMIN"}, - {no: 2, name: "USER"}, - ], -); - -/** - * @generated from message slash.api.v2.User - */ -export const User = proto3.makeMessageType( - "slash.api.v2.User", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 6, name: "role", kind: "enum", T: proto3.getEnumType(Role) }, - { no: 7, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "nickname", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListUsersRequest - */ -export const ListUsersRequest = proto3.makeMessageType( - "slash.api.v2.ListUsersRequest", - [], -); - -/** - * @generated from message slash.api.v2.ListUsersResponse - */ -export const ListUsersResponse = proto3.makeMessageType( - "slash.api.v2.ListUsersResponse", - () => [ - { no: 1, name: "users", kind: "message", T: User, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserRequest - */ -export const GetUserRequest = proto3.makeMessageType( - "slash.api.v2.GetUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserResponse - */ -export const GetUserResponse = proto3.makeMessageType( - "slash.api.v2.GetUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserRequest - */ -export const CreateUserRequest = proto3.makeMessageType( - "slash.api.v2.CreateUserRequest", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserResponse - */ -export const CreateUserResponse = proto3.makeMessageType( - "slash.api.v2.CreateUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserRequest - */ -export const UpdateUserRequest = proto3.makeMessageType( - "slash.api.v2.UpdateUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user", kind: "message", T: User }, - { no: 3, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserResponse - */ -export const UpdateUserResponse = proto3.makeMessageType( - "slash.api.v2.UpdateUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserRequest - */ -export const DeleteUserRequest = proto3.makeMessageType( - "slash.api.v2.DeleteUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserResponse - */ -export const DeleteUserResponse = proto3.makeMessageType( - "slash.api.v2.DeleteUserResponse", - [], -); - -/** - * @generated from message slash.api.v2.ListUserAccessTokensRequest - */ -export const ListUserAccessTokensRequest = proto3.makeMessageType( - "slash.api.v2.ListUserAccessTokensRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListUserAccessTokensResponse - */ -export const ListUserAccessTokensResponse = proto3.makeMessageType( - "slash.api.v2.ListUserAccessTokensResponse", - () => [ - { no: 1, name: "access_tokens", kind: "message", T: UserAccessToken, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenRequest - */ -export const CreateUserAccessTokenRequest = proto3.makeMessageType( - "slash.api.v2.CreateUserAccessTokenRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user_access_token", kind: "message", T: UserAccessToken }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenResponse - */ -export const CreateUserAccessTokenResponse = proto3.makeMessageType( - "slash.api.v2.CreateUserAccessTokenResponse", - () => [ - { no: 1, name: "access_token", kind: "message", T: UserAccessToken }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenRequest - */ -export const DeleteUserAccessTokenRequest = proto3.makeMessageType( - "slash.api.v2.DeleteUserAccessTokenRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenResponse - */ -export const DeleteUserAccessTokenResponse = proto3.makeMessageType( - "slash.api.v2.DeleteUserAccessTokenResponse", - [], -); - -/** - * @generated from message slash.api.v2.UserAccessToken - */ -export const UserAccessToken = proto3.makeMessageType( - "slash.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 }, - ], -); - diff --git a/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.d.ts b/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.d.ts deleted file mode 100644 index 32e147a..0000000 --- a/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_setting_service.proto (package slash.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 slash.api.v2.UserSetting - */ -export declare class UserSetting extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * locale is the user locale. - * - * @generated from field: slash.api.v2.UserSetting.Locale locale = 2; - */ - locale: UserSetting_Locale; - - /** - * color_theme is the user color theme. - * - * @generated from field: slash.api.v2.UserSetting.ColorTheme color_theme = 3; - */ - colorTheme: UserSetting_ColorTheme; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserSetting; - - static fromJsonString(jsonString: string, options?: Partial): UserSetting; - - static equals(a: UserSetting | PlainMessage | undefined, b: UserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from enum slash.api.v2.UserSetting.Locale - */ -export declare enum UserSetting_Locale { - /** - * @generated from enum value: LOCALE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOCALE_EN = 1; - */ - EN = 1, - - /** - * @generated from enum value: LOCALE_ZH = 2; - */ - ZH = 2, -} - -/** - * @generated from enum slash.api.v2.UserSetting.ColorTheme - */ -export declare enum UserSetting_ColorTheme { - /** - * @generated from enum value: COLOR_THEME_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: COLOR_THEME_LIGHT = 1; - */ - LIGHT = 1, - - /** - * @generated from enum value: COLOR_THEME_DARK = 2; - */ - DARK = 2, -} - -/** - * @generated from message slash.api.v2.GetUserSettingRequest - */ -export declare class GetUserSettingRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetUserSettingRequest; - - static equals(a: GetUserSettingRequest | PlainMessage | undefined, b: GetUserSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserSettingResponse - */ -export declare class GetUserSettingResponse extends Message { - /** - * @generated from field: slash.api.v2.UserSetting user_setting = 1; - */ - userSetting?: UserSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetUserSettingResponse; - - static equals(a: GetUserSettingResponse | PlainMessage | undefined, b: GetUserSettingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserSettingRequest - */ -export declare class UpdateUserSettingRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * user_setting is the user setting to update. - * - * @generated from field: slash.api.v2.UserSetting user_setting = 2; - */ - userSetting?: UserSetting; - - /** - * update_mask is the field mask to update. - * - * @generated from field: repeated string update_mask = 3; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserSettingRequest; - - static equals(a: UpdateUserSettingRequest | PlainMessage | undefined, b: UpdateUserSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserSettingResponse - */ -export declare class UpdateUserSettingResponse extends Message { - /** - * @generated from field: slash.api.v2.UserSetting user_setting = 1; - */ - userSetting?: UserSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserSettingResponse; - - static equals(a: UpdateUserSettingResponse | PlainMessage | undefined, b: UpdateUserSettingResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.js b/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.js deleted file mode 100644 index cd468d2..0000000 --- a/frontend/extension/src/types/proto/api/v2/user_setting_service_pb.js +++ /dev/null @@ -1,85 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_setting_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.api.v2.UserSetting - */ -export const UserSetting = proto3.makeMessageType( - "slash.api.v2.UserSetting", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "locale", kind: "enum", T: proto3.getEnumType(UserSetting_Locale) }, - { no: 3, name: "color_theme", kind: "enum", T: proto3.getEnumType(UserSetting_ColorTheme) }, - ], -); - -/** - * @generated from enum slash.api.v2.UserSetting.Locale - */ -export const UserSetting_Locale = proto3.makeEnum( - "slash.api.v2.UserSetting.Locale", - [ - {no: 0, name: "LOCALE_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "LOCALE_EN", localName: "EN"}, - {no: 2, name: "LOCALE_ZH", localName: "ZH"}, - ], -); - -/** - * @generated from enum slash.api.v2.UserSetting.ColorTheme - */ -export const UserSetting_ColorTheme = proto3.makeEnum( - "slash.api.v2.UserSetting.ColorTheme", - [ - {no: 0, name: "COLOR_THEME_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "COLOR_THEME_LIGHT", localName: "LIGHT"}, - {no: 2, name: "COLOR_THEME_DARK", localName: "DARK"}, - ], -); - -/** - * @generated from message slash.api.v2.GetUserSettingRequest - */ -export const GetUserSettingRequest = proto3.makeMessageType( - "slash.api.v2.GetUserSettingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserSettingResponse - */ -export const GetUserSettingResponse = proto3.makeMessageType( - "slash.api.v2.GetUserSettingResponse", - () => [ - { no: 1, name: "user_setting", kind: "message", T: UserSetting }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserSettingRequest - */ -export const UpdateUserSettingRequest = proto3.makeMessageType( - "slash.api.v2.UpdateUserSettingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user_setting", kind: "message", T: UserSetting }, - { no: 3, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserSettingResponse - */ -export const UpdateUserSettingResponse = proto3.makeMessageType( - "slash.api.v2.UpdateUserSettingResponse", - () => [ - { no: 1, name: "user_setting", kind: "message", T: UserSetting }, - ], -); - diff --git a/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.d.ts b/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.d.ts deleted file mode 100644 index 73e9e19..0000000 --- a/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/workspace_setting_service.proto (package slash.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 slash.api.v2.WorkspaceSetting - */ -export declare class WorkspaceSetting extends Message { - /** - * Whether to enable other users to sign up. - * - * @generated from field: bool enable_signup = 1; - */ - enableSignup: boolean; - - /** - * The relative path of the resource directory. - * - * @generated from field: string resource_relative_path = 2; - */ - resourceRelativePath: string; - - /** - * The auto backup setting. - * - * @generated from field: slash.api.v2.AutoBackupWorkspaceSetting auto_backup = 3; - */ - autoBackup?: AutoBackupWorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.WorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): WorkspaceSetting; - - static equals(a: WorkspaceSetting | PlainMessage | undefined, b: WorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.AutoBackupWorkspaceSetting - */ -export declare class AutoBackupWorkspaceSetting extends Message { - /** - * Whether auto backup is enabled. - * - * @generated from field: bool enabled = 1; - */ - enabled: boolean; - - /** - * The cron expression for auto backup. - * For example, "0 0 0 * * *" means backup at 00:00:00 every day. - * See https://en.wikipedia.org/wiki/Cron for more details. - * - * @generated from field: string cron_expression = 2; - */ - cronExpression: string; - - /** - * The maximum number of backups to keep. - * - * @generated from field: int32 max_keep = 3; - */ - maxKeep: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.AutoBackupWorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): AutoBackupWorkspaceSetting; - - static equals(a: AutoBackupWorkspaceSetting | PlainMessage | undefined, b: AutoBackupWorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingRequest - */ -export declare class GetWorkspaceSettingRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetWorkspaceSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceSettingRequest; - - static equals(a: GetWorkspaceSettingRequest | PlainMessage | undefined, b: GetWorkspaceSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingResponse - */ -export declare class GetWorkspaceSettingResponse extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetWorkspaceSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceSettingResponse; - - static equals(a: GetWorkspaceSettingResponse | PlainMessage | undefined, b: GetWorkspaceSettingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingRequest - */ -export declare class UpdateWorkspaceSettingRequest extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - /** - * The update mask. - * - * @generated from field: repeated string update_mask = 2; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateWorkspaceSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateWorkspaceSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateWorkspaceSettingRequest; - - static equals(a: UpdateWorkspaceSettingRequest | PlainMessage | undefined, b: UpdateWorkspaceSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingResponse - */ -export declare class UpdateWorkspaceSettingResponse extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateWorkspaceSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateWorkspaceSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateWorkspaceSettingResponse; - - static equals(a: UpdateWorkspaceSettingResponse | PlainMessage | undefined, b: UpdateWorkspaceSettingResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.js b/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.js deleted file mode 100644 index d18c827..0000000 --- a/frontend/extension/src/types/proto/api/v2/workspace_setting_service_pb.js +++ /dev/null @@ -1,70 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.api.v2.WorkspaceSetting - */ -export const WorkspaceSetting = proto3.makeMessageType( - "slash.api.v2.WorkspaceSetting", - () => [ - { no: 1, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting }, - ], -); - -/** - * @generated from message slash.api.v2.AutoBackupWorkspaceSetting - */ -export const AutoBackupWorkspaceSetting = proto3.makeMessageType( - "slash.api.v2.AutoBackupWorkspaceSetting", - () => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingRequest - */ -export const GetWorkspaceSettingRequest = proto3.makeMessageType( - "slash.api.v2.GetWorkspaceSettingRequest", - [], -); - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingResponse - */ -export const GetWorkspaceSettingResponse = proto3.makeMessageType( - "slash.api.v2.GetWorkspaceSettingResponse", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingRequest - */ -export const UpdateWorkspaceSettingRequest = proto3.makeMessageType( - "slash.api.v2.UpdateWorkspaceSettingRequest", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - { no: 2, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingResponse - */ -export const UpdateWorkspaceSettingResponse = proto3.makeMessageType( - "slash.api.v2.UpdateWorkspaceSettingResponse", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - ], -); - diff --git a/frontend/extension/src/types/proto/store/activity_pb.d.ts b/frontend/extension/src/types/proto/store/activity_pb.d.ts deleted file mode 100644 index a3c8c09..0000000 --- a/frontend/extension/src/types/proto/store/activity_pb.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/activity.proto (package slash.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 message slash.store.ActivityShorcutCreatePayload - */ -export declare class ActivityShorcutCreatePayload extends Message { - /** - * @generated from field: int32 shortcut_id = 1; - */ - shortcutId: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.ActivityShorcutCreatePayload"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivityShorcutCreatePayload; - - static fromJson(jsonValue: JsonValue, options?: Partial): ActivityShorcutCreatePayload; - - static fromJsonString(jsonString: string, options?: Partial): ActivityShorcutCreatePayload; - - static equals(a: ActivityShorcutCreatePayload | PlainMessage | undefined, b: ActivityShorcutCreatePayload | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/store/activity_pb.js b/frontend/extension/src/types/proto/store/activity_pb.js deleted file mode 100644 index 4e4e768..0000000 --- a/frontend/extension/src/types/proto/store/activity_pb.js +++ /dev/null @@ -1,17 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/activity.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.store.ActivityShorcutCreatePayload - */ -export const ActivityShorcutCreatePayload = proto3.makeMessageType( - "slash.store.ActivityShorcutCreatePayload", - () => [ - { no: 1, name: "shortcut_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - diff --git a/frontend/extension/src/types/proto/store/common_pb.d.ts b/frontend/extension/src/types/proto/store/common_pb.d.ts deleted file mode 100644 index 0fdf8c1..0000000 --- a/frontend/extension/src/types/proto/store/common_pb.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/common.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -/** - * @generated from enum slash.store.RowStatus - */ -export declare enum RowStatus { - /** - * @generated from enum value: ROW_STATUS_UNSPECIFIED = 0; - */ - ROW_STATUS_UNSPECIFIED = 0, - - /** - * @generated from enum value: NORMAL = 1; - */ - NORMAL = 1, - - /** - * @generated from enum value: ARCHIVED = 2; - */ - ARCHIVED = 2, -} - diff --git a/frontend/extension/src/types/proto/store/common_pb.js b/frontend/extension/src/types/proto/store/common_pb.js deleted file mode 100644 index 28a6967..0000000 --- a/frontend/extension/src/types/proto/store/common_pb.js +++ /dev/null @@ -1,19 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/common.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.RowStatus - */ -export const RowStatus = proto3.makeEnum( - "slash.store.RowStatus", - [ - {no: 0, name: "ROW_STATUS_UNSPECIFIED"}, - {no: 1, name: "NORMAL"}, - {no: 2, name: "ARCHIVED"}, - ], -); - diff --git a/frontend/extension/src/types/proto/store/shortcut_pb.d.ts b/frontend/extension/src/types/proto/store/shortcut_pb.d.ts deleted file mode 100644 index ae696b3..0000000 --- a/frontend/extension/src/types/proto/store/shortcut_pb.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/shortcut.proto (package slash.store, 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 slash.store.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: WORKSPACE = 2; - */ - WORKSPACE = 2, - - /** - * @generated from enum value: PUBLIC = 3; - */ - PUBLIC = 3, -} - -/** - * @generated from message slash.store.Shortcut - */ -export declare class Shortcut extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: int32 creator_id = 2; - */ - creatorId: number; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.store.RowStatus row_status = 5; - */ - rowStatus: RowStatus; - - /** - * @generated from field: string name = 6; - */ - name: string; - - /** - * @generated from field: string link = 7; - */ - link: string; - - /** - * @generated from field: string title = 8; - */ - title: string; - - /** - * @generated from field: repeated string tags = 9; - */ - tags: string[]; - - /** - * @generated from field: string description = 10; - */ - description: string; - - /** - * @generated from field: slash.store.Visibility visibility = 11; - */ - visibility: Visibility; - - /** - * @generated from field: slash.store.OpenGraphMetadata og_metadata = 12; - */ - ogMetadata?: OpenGraphMetadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.Shortcut"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Shortcut; - - static fromJson(jsonValue: JsonValue, options?: Partial): Shortcut; - - static fromJsonString(jsonString: string, options?: Partial): Shortcut; - - static equals(a: Shortcut | PlainMessage | undefined, b: Shortcut | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.OpenGraphMetadata - */ -export declare class OpenGraphMetadata extends Message { - /** - * @generated from field: string title = 1; - */ - title: string; - - /** - * @generated from field: string description = 2; - */ - description: string; - - /** - * @generated from field: string image = 3; - */ - image: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.OpenGraphMetadata"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): OpenGraphMetadata; - - static fromJson(jsonValue: JsonValue, options?: Partial): OpenGraphMetadata; - - static fromJsonString(jsonString: string, options?: Partial): OpenGraphMetadata; - - static equals(a: OpenGraphMetadata | PlainMessage | undefined, b: OpenGraphMetadata | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/store/shortcut_pb.js b/frontend/extension/src/types/proto/store/shortcut_pb.js deleted file mode 100644 index 1ad4d5c..0000000 --- a/frontend/extension/src/types/proto/store/shortcut_pb.js +++ /dev/null @@ -1,54 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/shortcut.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.store.Visibility - */ -export const Visibility = proto3.makeEnum( - "slash.store.Visibility", - [ - {no: 0, name: "VISIBILITY_UNSPECIFIED"}, - {no: 1, name: "PRIVATE"}, - {no: 2, name: "WORKSPACE"}, - {no: 3, name: "PUBLIC"}, - ], -); - -/** - * @generated from message slash.store.Shortcut - */ -export const Shortcut = proto3.makeMessageType( - "slash.store.Shortcut", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "creator_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 5, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 10, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "visibility", kind: "enum", T: proto3.getEnumType(Visibility) }, - { no: 12, name: "og_metadata", kind: "message", T: OpenGraphMetadata }, - ], -); - -/** - * @generated from message slash.store.OpenGraphMetadata - */ -export const OpenGraphMetadata = proto3.makeMessageType( - "slash.store.OpenGraphMetadata", - () => [ - { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - diff --git a/frontend/extension/src/types/proto/store/user_setting_pb.d.ts b/frontend/extension/src/types/proto/store/user_setting_pb.d.ts deleted file mode 100644 index d99dd2a..0000000 --- a/frontend/extension/src/types/proto/store/user_setting_pb.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/user_setting.proto (package slash.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 slash.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, - - /** - * Locale for the user. - * - * @generated from enum value: USER_SETTING_LOCALE = 2; - */ - USER_SETTING_LOCALE = 2, - - /** - * Color theme for the user. - * - * @generated from enum value: USER_SETTING_COLOR_THEME = 3; - */ - USER_SETTING_COLOR_THEME = 3, -} - -/** - * @generated from enum slash.store.LocaleUserSetting - */ -export declare enum LocaleUserSetting { - /** - * @generated from enum value: LOCALE_USER_SETTING_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOCALE_USER_SETTING_EN = 1; - */ - EN = 1, - - /** - * @generated from enum value: LOCALE_USER_SETTING_ZH = 2; - */ - ZH = 2, -} - -/** - * @generated from enum slash.store.ColorThemeUserSetting - */ -export declare enum ColorThemeUserSetting { - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_LIGHT = 1; - */ - LIGHT = 1, - - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_DARK = 2; - */ - DARK = 2, -} - -/** - * @generated from message slash.store.UserSetting - */ -export declare class UserSetting extends Message { - /** - * @generated from field: int32 user_id = 1; - */ - userId: number; - - /** - * @generated from field: slash.store.UserSettingKey key = 2; - */ - key: UserSettingKey; - - /** - * @generated from oneof slash.store.UserSetting.value - */ - value: { - /** - * @generated from field: slash.store.AccessTokensUserSetting access_tokens = 3; - */ - value: AccessTokensUserSetting; - case: "accessTokens"; - } | { - /** - * @generated from field: slash.store.LocaleUserSetting locale = 4; - */ - value: LocaleUserSetting; - case: "locale"; - } | { - /** - * @generated from field: slash.store.ColorThemeUserSetting color_theme = 5; - */ - value: ColorThemeUserSetting; - case: "colorTheme"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.UserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserSetting; - - static fromJsonString(jsonString: string, options?: Partial): UserSetting; - - static equals(a: UserSetting | PlainMessage | undefined, b: UserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AccessTokensUserSetting - */ -export declare class AccessTokensUserSetting extends Message { - /** - * @generated from field: repeated slash.store.AccessTokensUserSetting.AccessToken access_tokens = 1; - */ - accessTokens: AccessTokensUserSetting_AccessToken[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AccessTokensUserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AccessTokensUserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AccessTokensUserSetting; - - static fromJsonString(jsonString: string, options?: Partial): AccessTokensUserSetting; - - static equals(a: AccessTokensUserSetting | PlainMessage | undefined, b: AccessTokensUserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AccessTokensUserSetting.AccessToken - */ -export declare class AccessTokensUserSetting_AccessToken extends Message { - /** - * 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); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AccessTokensUserSetting.AccessToken"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AccessTokensUserSetting_AccessToken; - - static fromJson(jsonValue: JsonValue, options?: Partial): AccessTokensUserSetting_AccessToken; - - static fromJsonString(jsonString: string, options?: Partial): AccessTokensUserSetting_AccessToken; - - static equals(a: AccessTokensUserSetting_AccessToken | PlainMessage | undefined, b: AccessTokensUserSetting_AccessToken | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/store/user_setting_pb.js b/frontend/extension/src/types/proto/store/user_setting_pb.js deleted file mode 100644 index 94da2ac..0000000 --- a/frontend/extension/src/types/proto/store/user_setting_pb.js +++ /dev/null @@ -1,80 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/user_setting.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.UserSettingKey - */ -export const UserSettingKey = proto3.makeEnum( - "slash.store.UserSettingKey", - [ - {no: 0, name: "USER_SETTING_KEY_UNSPECIFIED"}, - {no: 1, name: "USER_SETTING_ACCESS_TOKENS"}, - {no: 2, name: "USER_SETTING_LOCALE"}, - {no: 3, name: "USER_SETTING_COLOR_THEME"}, - ], -); - -/** - * @generated from enum slash.store.LocaleUserSetting - */ -export const LocaleUserSetting = proto3.makeEnum( - "slash.store.LocaleUserSetting", - [ - {no: 0, name: "LOCALE_USER_SETTING_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "LOCALE_USER_SETTING_EN", localName: "EN"}, - {no: 2, name: "LOCALE_USER_SETTING_ZH", localName: "ZH"}, - ], -); - -/** - * @generated from enum slash.store.ColorThemeUserSetting - */ -export const ColorThemeUserSetting = proto3.makeEnum( - "slash.store.ColorThemeUserSetting", - [ - {no: 0, name: "COLOR_THEME_USER_SETTING_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "COLOR_THEME_USER_SETTING_LIGHT", localName: "LIGHT"}, - {no: 2, name: "COLOR_THEME_USER_SETTING_DARK", localName: "DARK"}, - ], -); - -/** - * @generated from message slash.store.UserSetting - */ -export const UserSetting = proto3.makeMessageType( - "slash.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" }, - { no: 4, name: "locale", kind: "enum", T: proto3.getEnumType(LocaleUserSetting), oneof: "value" }, - { no: 5, name: "color_theme", kind: "enum", T: proto3.getEnumType(ColorThemeUserSetting), oneof: "value" }, - ], -); - -/** - * @generated from message slash.store.AccessTokensUserSetting - */ -export const AccessTokensUserSetting = proto3.makeMessageType( - "slash.store.AccessTokensUserSetting", - () => [ - { no: 1, name: "access_tokens", kind: "message", T: AccessTokensUserSetting_AccessToken, repeated: true }, - ], -); - -/** - * @generated from message slash.store.AccessTokensUserSetting.AccessToken - */ -export const AccessTokensUserSetting_AccessToken = proto3.makeMessageType( - "slash.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"}, -); - diff --git a/frontend/extension/src/types/proto/store/workspace_setting_pb.d.ts b/frontend/extension/src/types/proto/store/workspace_setting_pb.d.ts deleted file mode 100644 index b27f9b8..0000000 --- a/frontend/extension/src/types/proto/store/workspace_setting_pb.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/workspace_setting.proto (package slash.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 slash.store.WorkspaceSettingKey - */ -export declare enum WorkspaceSettingKey { - /** - * @generated from enum value: WORKSPACE_SETTING_KEY_UNSPECIFIED = 0; - */ - WORKSPACE_SETTING_KEY_UNSPECIFIED = 0, - - /** - * The secret session key used to encrypt session data. - * - * @generated from enum value: WORKSPACE_SETTING_SECRET_SESSION = 1; - */ - WORKSPACE_SETTING_SECRET_SESSION = 1, - - /** - * Whether to enable other users to sign up. - * - * @generated from enum value: WORKSAPCE_SETTING_ENABLE_SIGNUP = 2; - */ - WORKSAPCE_SETTING_ENABLE_SIGNUP = 2, - - /** - * The relative path of the resource directory. - * - * @generated from enum value: WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3; - */ - WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3, - - /** - * The auto backup setting. - * - * @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 4; - */ - WORKSPACE_SETTING_AUTO_BACKUP = 4, -} - -/** - * @generated from message slash.store.WorkspaceSetting - */ -export declare class WorkspaceSetting extends Message { - /** - * @generated from field: slash.store.WorkspaceSettingKey key = 1; - */ - key: WorkspaceSettingKey; - - /** - * @generated from oneof slash.store.WorkspaceSetting.value - */ - value: { - /** - * @generated from field: string secret_session = 2; - */ - value: string; - case: "secretSession"; - } | { - /** - * @generated from field: bool enable_signup = 3; - */ - value: boolean; - case: "enableSignup"; - } | { - /** - * @generated from field: string resource_relative_path = 4; - */ - value: string; - case: "resourceRelativePath"; - } | { - /** - * @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 5; - */ - value: AutoBackupWorkspaceSetting; - case: "autoBackup"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.WorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): WorkspaceSetting; - - static equals(a: WorkspaceSetting | PlainMessage | undefined, b: WorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AutoBackupWorkspaceSetting - */ -export declare class AutoBackupWorkspaceSetting extends Message { - /** - * Whether auto backup is enabled. - * - * @generated from field: bool enabled = 1; - */ - enabled: boolean; - - /** - * The cron expression for auto backup. - * For example, "0 0 0 * * *" means backup at 00:00:00 every day. - * See https://en.wikipedia.org/wiki/Cron for more details. - * - * @generated from field: string cron_expression = 2; - */ - cronExpression: string; - - /** - * The maximum number of backups to keep. - * - * @generated from field: int32 max_keep = 3; - */ - maxKeep: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AutoBackupWorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): AutoBackupWorkspaceSetting; - - static equals(a: AutoBackupWorkspaceSetting | PlainMessage | undefined, b: AutoBackupWorkspaceSetting | PlainMessage | undefined): boolean; -} - diff --git a/frontend/extension/src/types/proto/store/workspace_setting_pb.js b/frontend/extension/src/types/proto/store/workspace_setting_pb.js deleted file mode 100644 index 733e166..0000000 --- a/frontend/extension/src/types/proto/store/workspace_setting_pb.js +++ /dev/null @@ -1,47 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/workspace_setting.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.WorkspaceSettingKey - */ -export const WorkspaceSettingKey = proto3.makeEnum( - "slash.store.WorkspaceSettingKey", - [ - {no: 0, name: "WORKSPACE_SETTING_KEY_UNSPECIFIED"}, - {no: 1, name: "WORKSPACE_SETTING_SECRET_SESSION"}, - {no: 2, name: "WORKSAPCE_SETTING_ENABLE_SIGNUP"}, - {no: 3, name: "WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH"}, - {no: 4, name: "WORKSPACE_SETTING_AUTO_BACKUP"}, - ], -); - -/** - * @generated from message slash.store.WorkspaceSetting - */ -export const WorkspaceSetting = proto3.makeMessageType( - "slash.store.WorkspaceSetting", - () => [ - { no: 1, name: "key", kind: "enum", T: proto3.getEnumType(WorkspaceSettingKey) }, - { no: 2, name: "secret_session", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, - { no: 3, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "value" }, - { no: 4, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, - { no: 5, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" }, - ], -); - -/** - * @generated from message slash.store.AutoBackupWorkspaceSetting - */ -export const AutoBackupWorkspaceSetting = proto3.makeMessageType( - "slash.store.AutoBackupWorkspaceSetting", - () => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - diff --git a/frontend/web/.gitignore b/frontend/web/.gitignore index d451ff1..f4e178b 100644 --- a/frontend/web/.gitignore +++ b/frontend/web/.gitignore @@ -3,3 +3,4 @@ node_modules dist dist-ssr *.local +src/types/proto diff --git a/frontend/web/package.json b/frontend/web/package.json index 0707848..bfa8476 100644 --- a/frontend/web/package.json +++ b/frontend/web/package.json @@ -8,7 +8,6 @@ "lint-fix": "eslint --ext .js,.ts,.tsx, src --fix" }, "dependencies": { - "@bufbuild/protobuf": "^1.3.1", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/joy": "5.0.0-beta.2", @@ -51,4 +50,4 @@ "typescript": "^5.2.2", "vite": "^4.4.9" } -} \ No newline at end of file +} diff --git a/frontend/web/pnpm-lock.yaml b/frontend/web/pnpm-lock.yaml index 0557427..64d5b64 100644 --- a/frontend/web/pnpm-lock.yaml +++ b/frontend/web/pnpm-lock.yaml @@ -5,9 +5,6 @@ settings: excludeLinksFromLockfile: false dependencies: - '@bufbuild/protobuf': - specifier: ^1.3.1 - version: 1.3.1 '@emotion/react': specifier: ^11.11.1 version: 11.11.1(@types/react@18.2.21)(react@18.2.0) @@ -264,10 +261,6 @@ packages: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - /@bufbuild/protobuf@1.3.1: - resolution: {integrity: sha512-BUyJWutgP2S8K/1NphOJokuwDckXS4qI2T1pGZAlkFdZchWae3jm6fCdkcGbLlM1QLOcNFFePd+7Feo4BYGrJQ==} - dev: false - /@emotion/babel-plugin@11.11.0: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: diff --git a/frontend/web/src/components/setting/AccessTokenSection.tsx b/frontend/web/src/components/setting/AccessTokenSection.tsx index 2c9c691..1cefde4 100644 --- a/frontend/web/src/components/setting/AccessTokenSection.tsx +++ b/frontend/web/src/components/setting/AccessTokenSection.tsx @@ -4,7 +4,7 @@ import copy from "copy-to-clipboard"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; import { useTranslation } from "react-i18next"; -import { ListUserAccessTokensResponse, UserAccessToken } from "@/types/proto/api/v2/user_service_pb"; +import { ListUserAccessTokensResponse, UserAccessToken } from "@/types/proto/api/v2/user_service"; import useUserStore from "../../stores/v1/user"; import { showCommonDialog } from "../Alert"; import CreateAccessTokenDialog from "../CreateAccessTokenDialog"; diff --git a/frontend/web/src/components/setting/PreferenceSection.tsx b/frontend/web/src/components/setting/PreferenceSection.tsx index 7deb585..b93c3e9 100644 --- a/frontend/web/src/components/setting/PreferenceSection.tsx +++ b/frontend/web/src/components/setting/PreferenceSection.tsx @@ -1,6 +1,6 @@ import { Option, Select } from "@mui/joy"; import { useTranslation } from "react-i18next"; -import { UserSetting, UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v2/user_setting_service_pb"; +import { UserSetting, UserSetting_ColorTheme, UserSetting_Locale } from "@/types/proto/api/v2/user_setting_service"; import useUserStore from "../../stores/v1/user"; import BetaBadge from "../BetaBadge"; diff --git a/frontend/web/src/components/setting/WorkspaceSection.tsx b/frontend/web/src/components/setting/WorkspaceSection.tsx index f9e86ae..182c829 100644 --- a/frontend/web/src/components/setting/WorkspaceSection.tsx +++ b/frontend/web/src/components/setting/WorkspaceSection.tsx @@ -1,6 +1,6 @@ import { Checkbox } from "@mui/joy"; import { useEffect, useState } from "react"; -import { WorkspaceSetting } from "@/types/proto/api/v2/workspace_setting_service_pb"; +import { WorkspaceSetting } from "@/types/proto/api/v2/workspace_setting_service"; import { getWorkspaceSetting, updateWorkspaceSetting } from "../../helpers/api"; const WorkspaceSection: React.FC = () => { diff --git a/frontend/web/src/helpers/api.ts b/frontend/web/src/helpers/api.ts index 97da358..5acf837 100644 --- a/frontend/web/src/helpers/api.ts +++ b/frontend/web/src/helpers/api.ts @@ -3,7 +3,7 @@ import { GetWorkspaceSettingResponse, UpdateWorkspaceSettingResponse, WorkspaceSetting, -} from "@/types/proto/api/v2/workspace_setting_service_pb"; +} from "@/types/proto/api/v2/workspace_setting_service"; export function getWorkspaceProfile() { return axios.get("/api/v1/workspace/profile"); diff --git a/frontend/web/src/stores/v1/user.ts b/frontend/web/src/stores/v1/user.ts index 2aecd81..386a94a 100644 --- a/frontend/web/src/stores/v1/user.ts +++ b/frontend/web/src/stores/v1/user.ts @@ -1,6 +1,6 @@ import axios from "axios"; import { create } from "zustand"; -import { GetUserSettingResponse, UpdateUserSettingResponse, UserSetting } from "@/types/proto/api/v2/user_setting_service_pb"; +import { GetUserSettingResponse, UpdateUserSettingResponse, UserSetting } from "@/types/proto/api/v2/user_setting_service"; import * as api from "../../helpers/api"; const convertResponseModelUser = (user: User): User => { diff --git a/frontend/web/src/types/proto/api/v2/common_pb.d.ts b/frontend/web/src/types/proto/api/v2/common_pb.d.ts deleted file mode 100644 index 56292fd..0000000 --- a/frontend/web/src/types/proto/api/v2/common_pb.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/common.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -/** - * @generated from enum slash.api.v2.RowStatus - */ -export declare enum RowStatus { - /** - * @generated from enum value: ROW_STATUS_UNSPECIFIED = 0; - */ - ROW_STATUS_UNSPECIFIED = 0, - - /** - * @generated from enum value: NORMAL = 1; - */ - NORMAL = 1, - - /** - * @generated from enum value: ARCHIVED = 2; - */ - ARCHIVED = 2, -} - diff --git a/frontend/web/src/types/proto/api/v2/common_pb.js b/frontend/web/src/types/proto/api/v2/common_pb.js deleted file mode 100644 index d2b11ae..0000000 --- a/frontend/web/src/types/proto/api/v2/common_pb.js +++ /dev/null @@ -1,19 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/common.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.api.v2.RowStatus - */ -export const RowStatus = proto3.makeEnum( - "slash.api.v2.RowStatus", - [ - {no: 0, name: "ROW_STATUS_UNSPECIFIED"}, - {no: 1, name: "NORMAL"}, - {no: 2, name: "ARCHIVED"}, - ], -); - diff --git a/frontend/web/src/types/proto/api/v2/shortcut_service_pb.d.ts b/frontend/web/src/types/proto/api/v2/shortcut_service_pb.d.ts deleted file mode 100644 index 0afa074..0000000 --- a/frontend/web/src/types/proto/api/v2/shortcut_service_pb.d.ts +++ /dev/null @@ -1,329 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/shortcut_service.proto (package slash.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 slash.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: WORKSPACE = 2; - */ - WORKSPACE = 2, - - /** - * @generated from enum value: PUBLIC = 3; - */ - PUBLIC = 3, -} - -/** - * @generated from message slash.api.v2.Shortcut - */ -export declare class Shortcut extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: int32 creator_id = 2; - */ - creatorId: number; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.api.v2.RowStatus row_status = 5; - */ - rowStatus: RowStatus; - - /** - * @generated from field: string name = 6; - */ - name: string; - - /** - * @generated from field: string link = 7; - */ - link: string; - - /** - * @generated from field: string title = 8; - */ - title: string; - - /** - * @generated from field: repeated string tags = 9; - */ - tags: string[]; - - /** - * @generated from field: string description = 10; - */ - description: string; - - /** - * @generated from field: slash.api.v2.Visibility visibility = 11; - */ - visibility: Visibility; - - /** - * @generated from field: slash.api.v2.OpenGraphMetadata og_metadata = 12; - */ - ogMetadata?: OpenGraphMetadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.Shortcut"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Shortcut; - - static fromJson(jsonValue: JsonValue, options?: Partial): Shortcut; - - static fromJsonString(jsonString: string, options?: Partial): Shortcut; - - static equals(a: Shortcut | PlainMessage | undefined, b: Shortcut | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.OpenGraphMetadata - */ -export declare class OpenGraphMetadata extends Message { - /** - * @generated from field: string title = 1; - */ - title: string; - - /** - * @generated from field: string description = 2; - */ - description: string; - - /** - * @generated from field: string image = 3; - */ - image: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.OpenGraphMetadata"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): OpenGraphMetadata; - - static fromJson(jsonValue: JsonValue, options?: Partial): OpenGraphMetadata; - - static fromJsonString(jsonString: string, options?: Partial): OpenGraphMetadata; - - static equals(a: OpenGraphMetadata | PlainMessage | undefined, b: OpenGraphMetadata | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListShortcutsRequest - */ -export declare class ListShortcutsRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListShortcutsRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListShortcutsRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListShortcutsRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListShortcutsRequest; - - static equals(a: ListShortcutsRequest | PlainMessage | undefined, b: ListShortcutsRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListShortcutsResponse - */ -export declare class ListShortcutsResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.Shortcut shortcuts = 1; - */ - shortcuts: Shortcut[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListShortcutsResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListShortcutsResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListShortcutsResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListShortcutsResponse; - - static equals(a: ListShortcutsResponse | PlainMessage | undefined, b: ListShortcutsResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetShortcutRequest - */ -export declare class GetShortcutRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetShortcutRequest; - - static equals(a: GetShortcutRequest | PlainMessage | undefined, b: GetShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetShortcutResponse - */ -export declare class GetShortcutResponse extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetShortcutResponse; - - static equals(a: GetShortcutResponse | PlainMessage | undefined, b: GetShortcutResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateShortcutRequest - */ -export declare class CreateShortcutRequest extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateShortcutRequest; - - static equals(a: CreateShortcutRequest | PlainMessage | undefined, b: CreateShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateShortcutResponse - */ -export declare class CreateShortcutResponse extends Message { - /** - * @generated from field: slash.api.v2.Shortcut shortcut = 1; - */ - shortcut?: Shortcut; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateShortcutResponse; - - static equals(a: CreateShortcutResponse | PlainMessage | undefined, b: CreateShortcutResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteShortcutRequest - */ -export declare class DeleteShortcutRequest extends Message { - /** - * @generated from field: string name = 1; - */ - name: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteShortcutRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteShortcutRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteShortcutRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteShortcutRequest; - - static equals(a: DeleteShortcutRequest | PlainMessage | undefined, b: DeleteShortcutRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteShortcutResponse - */ -export declare class DeleteShortcutResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteShortcutResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteShortcutResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteShortcutResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteShortcutResponse; - - static equals(a: DeleteShortcutResponse | PlainMessage | undefined, b: DeleteShortcutResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/api/v2/shortcut_service_pb.js b/frontend/web/src/types/proto/api/v2/shortcut_service_pb.js deleted file mode 100644 index 1b1ffbe..0000000 --- a/frontend/web/src/types/proto/api/v2/shortcut_service_pb.js +++ /dev/null @@ -1,130 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/shortcut_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.api.v2.Visibility - */ -export const Visibility = proto3.makeEnum( - "slash.api.v2.Visibility", - [ - {no: 0, name: "VISIBILITY_UNSPECIFIED"}, - {no: 1, name: "PRIVATE"}, - {no: 2, name: "WORKSPACE"}, - {no: 3, name: "PUBLIC"}, - ], -); - -/** - * @generated from message slash.api.v2.Shortcut - */ -export const Shortcut = proto3.makeMessageType( - "slash.api.v2.Shortcut", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "creator_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 5, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 10, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "visibility", kind: "enum", T: proto3.getEnumType(Visibility) }, - { no: 12, name: "og_metadata", kind: "message", T: OpenGraphMetadata }, - ], -); - -/** - * @generated from message slash.api.v2.OpenGraphMetadata - */ -export const OpenGraphMetadata = proto3.makeMessageType( - "slash.api.v2.OpenGraphMetadata", - () => [ - { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListShortcutsRequest - */ -export const ListShortcutsRequest = proto3.makeMessageType( - "slash.api.v2.ListShortcutsRequest", - [], -); - -/** - * @generated from message slash.api.v2.ListShortcutsResponse - */ -export const ListShortcutsResponse = proto3.makeMessageType( - "slash.api.v2.ListShortcutsResponse", - () => [ - { no: 1, name: "shortcuts", kind: "message", T: Shortcut, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.GetShortcutRequest - */ -export const GetShortcutRequest = proto3.makeMessageType( - "slash.api.v2.GetShortcutRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetShortcutResponse - */ -export const GetShortcutResponse = proto3.makeMessageType( - "slash.api.v2.GetShortcutResponse", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.CreateShortcutRequest - */ -export const CreateShortcutRequest = proto3.makeMessageType( - "slash.api.v2.CreateShortcutRequest", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.CreateShortcutResponse - */ -export const CreateShortcutResponse = proto3.makeMessageType( - "slash.api.v2.CreateShortcutResponse", - () => [ - { no: 1, name: "shortcut", kind: "message", T: Shortcut }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteShortcutRequest - */ -export const DeleteShortcutRequest = proto3.makeMessageType( - "slash.api.v2.DeleteShortcutRequest", - () => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteShortcutResponse - */ -export const DeleteShortcutResponse = proto3.makeMessageType( - "slash.api.v2.DeleteShortcutResponse", - [], -); - diff --git a/frontend/web/src/types/proto/api/v2/user_service_pb.d.ts b/frontend/web/src/types/proto/api/v2/user_service_pb.d.ts deleted file mode 100644 index e607c14..0000000 --- a/frontend/web/src/types/proto/api/v2/user_service_pb.d.ts +++ /dev/null @@ -1,524 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_service.proto (package slash.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 enum slash.api.v2.Role - */ -export declare enum Role { - /** - * @generated from enum value: ROLE_UNSPECIFIED = 0; - */ - ROLE_UNSPECIFIED = 0, - - /** - * @generated from enum value: ADMIN = 1; - */ - ADMIN = 1, - - /** - * @generated from enum value: USER = 2; - */ - USER = 2, -} - -/** - * @generated from message slash.api.v2.User - */ -export declare class User extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.RowStatus row_status = 2; - */ - rowStatus: RowStatus; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.api.v2.Role role = 6; - */ - role: Role; - - /** - * @generated from field: string email = 7; - */ - email: string; - - /** - * @generated from field: string nickname = 8; - */ - nickname: string; - - /** - * @generated from field: string password = 9; - */ - password: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.User"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): User; - - static fromJson(jsonValue: JsonValue, options?: Partial): User; - - static fromJsonString(jsonString: string, options?: Partial): User; - - static equals(a: User | PlainMessage | undefined, b: User | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUsersRequest - */ -export declare class ListUsersRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUsersRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUsersRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUsersRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListUsersRequest; - - static equals(a: ListUsersRequest | PlainMessage | undefined, b: ListUsersRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUsersResponse - */ -export declare class ListUsersResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.User users = 1; - */ - users: User[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUsersResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUsersResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUsersResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListUsersResponse; - - static equals(a: ListUsersResponse | PlainMessage | undefined, b: ListUsersResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserRequest - */ -export declare class GetUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetUserRequest; - - static equals(a: GetUserRequest | PlainMessage | undefined, b: GetUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserResponse - */ -export declare class GetUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetUserResponse; - - static equals(a: GetUserResponse | PlainMessage | undefined, b: GetUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserRequest - */ -export declare class CreateUserRequest extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserRequest; - - static equals(a: CreateUserRequest | PlainMessage | undefined, b: CreateUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserResponse - */ -export declare class CreateUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserResponse; - - static equals(a: CreateUserResponse | PlainMessage | undefined, b: CreateUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserRequest - */ -export declare class UpdateUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.User user = 2; - */ - user?: User; - - /** - * @generated from field: repeated string update_mask = 3; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserRequest; - - static equals(a: UpdateUserRequest | PlainMessage | undefined, b: UpdateUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserResponse - */ -export declare class UpdateUserResponse extends Message { - /** - * @generated from field: slash.api.v2.User user = 1; - */ - user?: User; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserResponse; - - static equals(a: UpdateUserResponse | PlainMessage | undefined, b: UpdateUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserRequest - */ -export declare class DeleteUserRequest extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserRequest; - - static equals(a: DeleteUserRequest | PlainMessage | undefined, b: DeleteUserRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserResponse - */ -export declare class DeleteUserResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserResponse; - - static equals(a: DeleteUserResponse | PlainMessage | undefined, b: DeleteUserResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUserAccessTokensRequest - */ -export declare class ListUserAccessTokensRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUserAccessTokensRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUserAccessTokensRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUserAccessTokensRequest; - - static fromJsonString(jsonString: string, options?: Partial): ListUserAccessTokensRequest; - - static equals(a: ListUserAccessTokensRequest | PlainMessage | undefined, b: ListUserAccessTokensRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.ListUserAccessTokensResponse - */ -export declare class ListUserAccessTokensResponse extends Message { - /** - * @generated from field: repeated slash.api.v2.UserAccessToken access_tokens = 1; - */ - accessTokens: UserAccessToken[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.ListUserAccessTokensResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ListUserAccessTokensResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): ListUserAccessTokensResponse; - - static fromJsonString(jsonString: string, options?: Partial): ListUserAccessTokensResponse; - - static equals(a: ListUserAccessTokensResponse | PlainMessage | undefined, b: ListUserAccessTokensResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenRequest - */ -export declare class CreateUserAccessTokenRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: slash.api.v2.UserAccessToken user_access_token = 2; - */ - userAccessToken?: UserAccessToken; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserAccessTokenRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserAccessTokenRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserAccessTokenRequest; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserAccessTokenRequest; - - static equals(a: CreateUserAccessTokenRequest | PlainMessage | undefined, b: CreateUserAccessTokenRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenResponse - */ -export declare class CreateUserAccessTokenResponse extends Message { - /** - * @generated from field: slash.api.v2.UserAccessToken access_token = 1; - */ - accessToken?: UserAccessToken; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.CreateUserAccessTokenResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): CreateUserAccessTokenResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): CreateUserAccessTokenResponse; - - static fromJsonString(jsonString: string, options?: Partial): CreateUserAccessTokenResponse; - - static equals(a: CreateUserAccessTokenResponse | PlainMessage | undefined, b: CreateUserAccessTokenResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenRequest - */ -export declare class DeleteUserAccessTokenRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * access_token is the access token to delete. - * - * @generated from field: string access_token = 2; - */ - accessToken: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserAccessTokenRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserAccessTokenRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserAccessTokenRequest; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserAccessTokenRequest; - - static equals(a: DeleteUserAccessTokenRequest | PlainMessage | undefined, b: DeleteUserAccessTokenRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenResponse - */ -export declare class DeleteUserAccessTokenResponse extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.DeleteUserAccessTokenResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): DeleteUserAccessTokenResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): DeleteUserAccessTokenResponse; - - static fromJsonString(jsonString: string, options?: Partial): DeleteUserAccessTokenResponse; - - static equals(a: DeleteUserAccessTokenResponse | PlainMessage | undefined, b: DeleteUserAccessTokenResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UserAccessToken - */ -export declare class UserAccessToken extends Message { - /** - * @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); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UserAccessToken"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserAccessToken; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserAccessToken; - - static fromJsonString(jsonString: string, options?: Partial): UserAccessToken; - - static equals(a: UserAccessToken | PlainMessage | undefined, b: UserAccessToken | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/api/v2/user_service_pb.js b/frontend/web/src/types/proto/api/v2/user_service_pb.js deleted file mode 100644 index 55a6495..0000000 --- a/frontend/web/src/types/proto/api/v2/user_service_pb.js +++ /dev/null @@ -1,208 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3, Timestamp } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.api.v2.Role - */ -export const Role = proto3.makeEnum( - "slash.api.v2.Role", - [ - {no: 0, name: "ROLE_UNSPECIFIED"}, - {no: 1, name: "ADMIN"}, - {no: 2, name: "USER"}, - ], -); - -/** - * @generated from message slash.api.v2.User - */ -export const User = proto3.makeMessageType( - "slash.api.v2.User", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 6, name: "role", kind: "enum", T: proto3.getEnumType(Role) }, - { no: 7, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "nickname", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "password", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListUsersRequest - */ -export const ListUsersRequest = proto3.makeMessageType( - "slash.api.v2.ListUsersRequest", - [], -); - -/** - * @generated from message slash.api.v2.ListUsersResponse - */ -export const ListUsersResponse = proto3.makeMessageType( - "slash.api.v2.ListUsersResponse", - () => [ - { no: 1, name: "users", kind: "message", T: User, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserRequest - */ -export const GetUserRequest = proto3.makeMessageType( - "slash.api.v2.GetUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserResponse - */ -export const GetUserResponse = proto3.makeMessageType( - "slash.api.v2.GetUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserRequest - */ -export const CreateUserRequest = proto3.makeMessageType( - "slash.api.v2.CreateUserRequest", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserResponse - */ -export const CreateUserResponse = proto3.makeMessageType( - "slash.api.v2.CreateUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserRequest - */ -export const UpdateUserRequest = proto3.makeMessageType( - "slash.api.v2.UpdateUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user", kind: "message", T: User }, - { no: 3, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserResponse - */ -export const UpdateUserResponse = proto3.makeMessageType( - "slash.api.v2.UpdateUserResponse", - () => [ - { no: 1, name: "user", kind: "message", T: User }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserRequest - */ -export const DeleteUserRequest = proto3.makeMessageType( - "slash.api.v2.DeleteUserRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserResponse - */ -export const DeleteUserResponse = proto3.makeMessageType( - "slash.api.v2.DeleteUserResponse", - [], -); - -/** - * @generated from message slash.api.v2.ListUserAccessTokensRequest - */ -export const ListUserAccessTokensRequest = proto3.makeMessageType( - "slash.api.v2.ListUserAccessTokensRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.ListUserAccessTokensResponse - */ -export const ListUserAccessTokensResponse = proto3.makeMessageType( - "slash.api.v2.ListUserAccessTokensResponse", - () => [ - { no: 1, name: "access_tokens", kind: "message", T: UserAccessToken, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenRequest - */ -export const CreateUserAccessTokenRequest = proto3.makeMessageType( - "slash.api.v2.CreateUserAccessTokenRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user_access_token", kind: "message", T: UserAccessToken }, - ], -); - -/** - * @generated from message slash.api.v2.CreateUserAccessTokenResponse - */ -export const CreateUserAccessTokenResponse = proto3.makeMessageType( - "slash.api.v2.CreateUserAccessTokenResponse", - () => [ - { no: 1, name: "access_token", kind: "message", T: UserAccessToken }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenRequest - */ -export const DeleteUserAccessTokenRequest = proto3.makeMessageType( - "slash.api.v2.DeleteUserAccessTokenRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "access_token", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - -/** - * @generated from message slash.api.v2.DeleteUserAccessTokenResponse - */ -export const DeleteUserAccessTokenResponse = proto3.makeMessageType( - "slash.api.v2.DeleteUserAccessTokenResponse", - [], -); - -/** - * @generated from message slash.api.v2.UserAccessToken - */ -export const UserAccessToken = proto3.makeMessageType( - "slash.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 }, - ], -); - diff --git a/frontend/web/src/types/proto/api/v2/user_setting_service_pb.d.ts b/frontend/web/src/types/proto/api/v2/user_setting_service_pb.d.ts deleted file mode 100644 index 32e147a..0000000 --- a/frontend/web/src/types/proto/api/v2/user_setting_service_pb.d.ts +++ /dev/null @@ -1,202 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_setting_service.proto (package slash.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 slash.api.v2.UserSetting - */ -export declare class UserSetting extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * locale is the user locale. - * - * @generated from field: slash.api.v2.UserSetting.Locale locale = 2; - */ - locale: UserSetting_Locale; - - /** - * color_theme is the user color theme. - * - * @generated from field: slash.api.v2.UserSetting.ColorTheme color_theme = 3; - */ - colorTheme: UserSetting_ColorTheme; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserSetting; - - static fromJsonString(jsonString: string, options?: Partial): UserSetting; - - static equals(a: UserSetting | PlainMessage | undefined, b: UserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from enum slash.api.v2.UserSetting.Locale - */ -export declare enum UserSetting_Locale { - /** - * @generated from enum value: LOCALE_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOCALE_EN = 1; - */ - EN = 1, - - /** - * @generated from enum value: LOCALE_ZH = 2; - */ - ZH = 2, -} - -/** - * @generated from enum slash.api.v2.UserSetting.ColorTheme - */ -export declare enum UserSetting_ColorTheme { - /** - * @generated from enum value: COLOR_THEME_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: COLOR_THEME_LIGHT = 1; - */ - LIGHT = 1, - - /** - * @generated from enum value: COLOR_THEME_DARK = 2; - */ - DARK = 2, -} - -/** - * @generated from message slash.api.v2.GetUserSettingRequest - */ -export declare class GetUserSettingRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetUserSettingRequest; - - static equals(a: GetUserSettingRequest | PlainMessage | undefined, b: GetUserSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetUserSettingResponse - */ -export declare class GetUserSettingResponse extends Message { - /** - * @generated from field: slash.api.v2.UserSetting user_setting = 1; - */ - userSetting?: UserSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetUserSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetUserSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetUserSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetUserSettingResponse; - - static equals(a: GetUserSettingResponse | PlainMessage | undefined, b: GetUserSettingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserSettingRequest - */ -export declare class UpdateUserSettingRequest extends Message { - /** - * id is the user id. - * - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * user_setting is the user setting to update. - * - * @generated from field: slash.api.v2.UserSetting user_setting = 2; - */ - userSetting?: UserSetting; - - /** - * update_mask is the field mask to update. - * - * @generated from field: repeated string update_mask = 3; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserSettingRequest; - - static equals(a: UpdateUserSettingRequest | PlainMessage | undefined, b: UpdateUserSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateUserSettingResponse - */ -export declare class UpdateUserSettingResponse extends Message { - /** - * @generated from field: slash.api.v2.UserSetting user_setting = 1; - */ - userSetting?: UserSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateUserSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateUserSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateUserSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateUserSettingResponse; - - static equals(a: UpdateUserSettingResponse | PlainMessage | undefined, b: UpdateUserSettingResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/api/v2/user_setting_service_pb.js b/frontend/web/src/types/proto/api/v2/user_setting_service_pb.js deleted file mode 100644 index cd468d2..0000000 --- a/frontend/web/src/types/proto/api/v2/user_setting_service_pb.js +++ /dev/null @@ -1,85 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/user_setting_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.api.v2.UserSetting - */ -export const UserSetting = proto3.makeMessageType( - "slash.api.v2.UserSetting", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "locale", kind: "enum", T: proto3.getEnumType(UserSetting_Locale) }, - { no: 3, name: "color_theme", kind: "enum", T: proto3.getEnumType(UserSetting_ColorTheme) }, - ], -); - -/** - * @generated from enum slash.api.v2.UserSetting.Locale - */ -export const UserSetting_Locale = proto3.makeEnum( - "slash.api.v2.UserSetting.Locale", - [ - {no: 0, name: "LOCALE_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "LOCALE_EN", localName: "EN"}, - {no: 2, name: "LOCALE_ZH", localName: "ZH"}, - ], -); - -/** - * @generated from enum slash.api.v2.UserSetting.ColorTheme - */ -export const UserSetting_ColorTheme = proto3.makeEnum( - "slash.api.v2.UserSetting.ColorTheme", - [ - {no: 0, name: "COLOR_THEME_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "COLOR_THEME_LIGHT", localName: "LIGHT"}, - {no: 2, name: "COLOR_THEME_DARK", localName: "DARK"}, - ], -); - -/** - * @generated from message slash.api.v2.GetUserSettingRequest - */ -export const GetUserSettingRequest = proto3.makeMessageType( - "slash.api.v2.GetUserSettingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetUserSettingResponse - */ -export const GetUserSettingResponse = proto3.makeMessageType( - "slash.api.v2.GetUserSettingResponse", - () => [ - { no: 1, name: "user_setting", kind: "message", T: UserSetting }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserSettingRequest - */ -export const UpdateUserSettingRequest = proto3.makeMessageType( - "slash.api.v2.UpdateUserSettingRequest", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "user_setting", kind: "message", T: UserSetting }, - { no: 3, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateUserSettingResponse - */ -export const UpdateUserSettingResponse = proto3.makeMessageType( - "slash.api.v2.UpdateUserSettingResponse", - () => [ - { no: 1, name: "user_setting", kind: "message", T: UserSetting }, - ], -); - diff --git a/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.d.ts b/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.d.ts deleted file mode 100644 index 73e9e19..0000000 --- a/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.d.ts +++ /dev/null @@ -1,194 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/workspace_setting_service.proto (package slash.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 slash.api.v2.WorkspaceSetting - */ -export declare class WorkspaceSetting extends Message { - /** - * Whether to enable other users to sign up. - * - * @generated from field: bool enable_signup = 1; - */ - enableSignup: boolean; - - /** - * The relative path of the resource directory. - * - * @generated from field: string resource_relative_path = 2; - */ - resourceRelativePath: string; - - /** - * The auto backup setting. - * - * @generated from field: slash.api.v2.AutoBackupWorkspaceSetting auto_backup = 3; - */ - autoBackup?: AutoBackupWorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.WorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): WorkspaceSetting; - - static equals(a: WorkspaceSetting | PlainMessage | undefined, b: WorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.AutoBackupWorkspaceSetting - */ -export declare class AutoBackupWorkspaceSetting extends Message { - /** - * Whether auto backup is enabled. - * - * @generated from field: bool enabled = 1; - */ - enabled: boolean; - - /** - * The cron expression for auto backup. - * For example, "0 0 0 * * *" means backup at 00:00:00 every day. - * See https://en.wikipedia.org/wiki/Cron for more details. - * - * @generated from field: string cron_expression = 2; - */ - cronExpression: string; - - /** - * The maximum number of backups to keep. - * - * @generated from field: int32 max_keep = 3; - */ - maxKeep: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.AutoBackupWorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): AutoBackupWorkspaceSetting; - - static equals(a: AutoBackupWorkspaceSetting | PlainMessage | undefined, b: AutoBackupWorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingRequest - */ -export declare class GetWorkspaceSettingRequest extends Message { - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetWorkspaceSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceSettingRequest; - - static equals(a: GetWorkspaceSettingRequest | PlainMessage | undefined, b: GetWorkspaceSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingResponse - */ -export declare class GetWorkspaceSettingResponse extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.GetWorkspaceSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): GetWorkspaceSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): GetWorkspaceSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): GetWorkspaceSettingResponse; - - static equals(a: GetWorkspaceSettingResponse | PlainMessage | undefined, b: GetWorkspaceSettingResponse | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingRequest - */ -export declare class UpdateWorkspaceSettingRequest extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - /** - * The update mask. - * - * @generated from field: repeated string update_mask = 2; - */ - updateMask: string[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingRequest"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateWorkspaceSettingRequest; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateWorkspaceSettingRequest; - - static fromJsonString(jsonString: string, options?: Partial): UpdateWorkspaceSettingRequest; - - static equals(a: UpdateWorkspaceSettingRequest | PlainMessage | undefined, b: UpdateWorkspaceSettingRequest | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingResponse - */ -export declare class UpdateWorkspaceSettingResponse extends Message { - /** - * The user setting. - * - * @generated from field: slash.api.v2.WorkspaceSetting setting = 1; - */ - setting?: WorkspaceSetting; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingResponse"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UpdateWorkspaceSettingResponse; - - static fromJson(jsonValue: JsonValue, options?: Partial): UpdateWorkspaceSettingResponse; - - static fromJsonString(jsonString: string, options?: Partial): UpdateWorkspaceSettingResponse; - - static equals(a: UpdateWorkspaceSettingResponse | PlainMessage | undefined, b: UpdateWorkspaceSettingResponse | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.js b/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.js deleted file mode 100644 index d18c827..0000000 --- a/frontend/web/src/types/proto/api/v2/workspace_setting_service_pb.js +++ /dev/null @@ -1,70 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.api.v2.WorkspaceSetting - */ -export const WorkspaceSetting = proto3.makeMessageType( - "slash.api.v2.WorkspaceSetting", - () => [ - { no: 1, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting }, - ], -); - -/** - * @generated from message slash.api.v2.AutoBackupWorkspaceSetting - */ -export const AutoBackupWorkspaceSetting = proto3.makeMessageType( - "slash.api.v2.AutoBackupWorkspaceSetting", - () => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingRequest - */ -export const GetWorkspaceSettingRequest = proto3.makeMessageType( - "slash.api.v2.GetWorkspaceSettingRequest", - [], -); - -/** - * @generated from message slash.api.v2.GetWorkspaceSettingResponse - */ -export const GetWorkspaceSettingResponse = proto3.makeMessageType( - "slash.api.v2.GetWorkspaceSettingResponse", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingRequest - */ -export const UpdateWorkspaceSettingRequest = proto3.makeMessageType( - "slash.api.v2.UpdateWorkspaceSettingRequest", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - { no: 2, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ], -); - -/** - * @generated from message slash.api.v2.UpdateWorkspaceSettingResponse - */ -export const UpdateWorkspaceSettingResponse = proto3.makeMessageType( - "slash.api.v2.UpdateWorkspaceSettingResponse", - () => [ - { no: 1, name: "setting", kind: "message", T: WorkspaceSetting }, - ], -); - diff --git a/frontend/web/src/types/proto/store/activity_pb.d.ts b/frontend/web/src/types/proto/store/activity_pb.d.ts deleted file mode 100644 index a3c8c09..0000000 --- a/frontend/web/src/types/proto/store/activity_pb.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/activity.proto (package slash.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 message slash.store.ActivityShorcutCreatePayload - */ -export declare class ActivityShorcutCreatePayload extends Message { - /** - * @generated from field: int32 shortcut_id = 1; - */ - shortcutId: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.ActivityShorcutCreatePayload"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): ActivityShorcutCreatePayload; - - static fromJson(jsonValue: JsonValue, options?: Partial): ActivityShorcutCreatePayload; - - static fromJsonString(jsonString: string, options?: Partial): ActivityShorcutCreatePayload; - - static equals(a: ActivityShorcutCreatePayload | PlainMessage | undefined, b: ActivityShorcutCreatePayload | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/store/activity_pb.js b/frontend/web/src/types/proto/store/activity_pb.js deleted file mode 100644 index 4e4e768..0000000 --- a/frontend/web/src/types/proto/store/activity_pb.js +++ /dev/null @@ -1,17 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/activity.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from message slash.store.ActivityShorcutCreatePayload - */ -export const ActivityShorcutCreatePayload = proto3.makeMessageType( - "slash.store.ActivityShorcutCreatePayload", - () => [ - { no: 1, name: "shortcut_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - diff --git a/frontend/web/src/types/proto/store/common_pb.d.ts b/frontend/web/src/types/proto/store/common_pb.d.ts deleted file mode 100644 index 0fdf8c1..0000000 --- a/frontend/web/src/types/proto/store/common_pb.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/common.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -/** - * @generated from enum slash.store.RowStatus - */ -export declare enum RowStatus { - /** - * @generated from enum value: ROW_STATUS_UNSPECIFIED = 0; - */ - ROW_STATUS_UNSPECIFIED = 0, - - /** - * @generated from enum value: NORMAL = 1; - */ - NORMAL = 1, - - /** - * @generated from enum value: ARCHIVED = 2; - */ - ARCHIVED = 2, -} - diff --git a/frontend/web/src/types/proto/store/common_pb.js b/frontend/web/src/types/proto/store/common_pb.js deleted file mode 100644 index 28a6967..0000000 --- a/frontend/web/src/types/proto/store/common_pb.js +++ /dev/null @@ -1,19 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/common.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.RowStatus - */ -export const RowStatus = proto3.makeEnum( - "slash.store.RowStatus", - [ - {no: 0, name: "ROW_STATUS_UNSPECIFIED"}, - {no: 1, name: "NORMAL"}, - {no: 2, name: "ARCHIVED"}, - ], -); - diff --git a/frontend/web/src/types/proto/store/shortcut_pb.d.ts b/frontend/web/src/types/proto/store/shortcut_pb.d.ts deleted file mode 100644 index ae696b3..0000000 --- a/frontend/web/src/types/proto/store/shortcut_pb.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/shortcut.proto (package slash.store, 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 slash.store.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: WORKSPACE = 2; - */ - WORKSPACE = 2, - - /** - * @generated from enum value: PUBLIC = 3; - */ - PUBLIC = 3, -} - -/** - * @generated from message slash.store.Shortcut - */ -export declare class Shortcut extends Message { - /** - * @generated from field: int32 id = 1; - */ - id: number; - - /** - * @generated from field: int32 creator_id = 2; - */ - creatorId: number; - - /** - * @generated from field: int64 created_ts = 3; - */ - createdTs: bigint; - - /** - * @generated from field: int64 updated_ts = 4; - */ - updatedTs: bigint; - - /** - * @generated from field: slash.store.RowStatus row_status = 5; - */ - rowStatus: RowStatus; - - /** - * @generated from field: string name = 6; - */ - name: string; - - /** - * @generated from field: string link = 7; - */ - link: string; - - /** - * @generated from field: string title = 8; - */ - title: string; - - /** - * @generated from field: repeated string tags = 9; - */ - tags: string[]; - - /** - * @generated from field: string description = 10; - */ - description: string; - - /** - * @generated from field: slash.store.Visibility visibility = 11; - */ - visibility: Visibility; - - /** - * @generated from field: slash.store.OpenGraphMetadata og_metadata = 12; - */ - ogMetadata?: OpenGraphMetadata; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.Shortcut"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): Shortcut; - - static fromJson(jsonValue: JsonValue, options?: Partial): Shortcut; - - static fromJsonString(jsonString: string, options?: Partial): Shortcut; - - static equals(a: Shortcut | PlainMessage | undefined, b: Shortcut | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.OpenGraphMetadata - */ -export declare class OpenGraphMetadata extends Message { - /** - * @generated from field: string title = 1; - */ - title: string; - - /** - * @generated from field: string description = 2; - */ - description: string; - - /** - * @generated from field: string image = 3; - */ - image: string; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.OpenGraphMetadata"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): OpenGraphMetadata; - - static fromJson(jsonValue: JsonValue, options?: Partial): OpenGraphMetadata; - - static fromJsonString(jsonString: string, options?: Partial): OpenGraphMetadata; - - static equals(a: OpenGraphMetadata | PlainMessage | undefined, b: OpenGraphMetadata | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/store/shortcut_pb.js b/frontend/web/src/types/proto/store/shortcut_pb.js deleted file mode 100644 index 1ad4d5c..0000000 --- a/frontend/web/src/types/proto/store/shortcut_pb.js +++ /dev/null @@ -1,54 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/shortcut.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; -import { RowStatus } from "./common_pb.js"; - -/** - * @generated from enum slash.store.Visibility - */ -export const Visibility = proto3.makeEnum( - "slash.store.Visibility", - [ - {no: 0, name: "VISIBILITY_UNSPECIFIED"}, - {no: 1, name: "PRIVATE"}, - {no: 2, name: "WORKSPACE"}, - {no: 3, name: "PUBLIC"}, - ], -); - -/** - * @generated from message slash.store.Shortcut - */ -export const Shortcut = proto3.makeMessageType( - "slash.store.Shortcut", - () => [ - { no: 1, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 2, name: "creator_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - { no: 3, name: "created_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 4, name: "updated_ts", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - { no: 5, name: "row_status", kind: "enum", T: proto3.getEnumType(RowStatus) }, - { no: 6, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "link", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 8, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 9, name: "tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 10, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 11, name: "visibility", kind: "enum", T: proto3.getEnumType(Visibility) }, - { no: 12, name: "og_metadata", kind: "message", T: OpenGraphMetadata }, - ], -); - -/** - * @generated from message slash.store.OpenGraphMetadata - */ -export const OpenGraphMetadata = proto3.makeMessageType( - "slash.store.OpenGraphMetadata", - () => [ - { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ], -); - diff --git a/frontend/web/src/types/proto/store/user_setting_pb.d.ts b/frontend/web/src/types/proto/store/user_setting_pb.d.ts deleted file mode 100644 index d99dd2a..0000000 --- a/frontend/web/src/types/proto/store/user_setting_pb.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/user_setting.proto (package slash.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 slash.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, - - /** - * Locale for the user. - * - * @generated from enum value: USER_SETTING_LOCALE = 2; - */ - USER_SETTING_LOCALE = 2, - - /** - * Color theme for the user. - * - * @generated from enum value: USER_SETTING_COLOR_THEME = 3; - */ - USER_SETTING_COLOR_THEME = 3, -} - -/** - * @generated from enum slash.store.LocaleUserSetting - */ -export declare enum LocaleUserSetting { - /** - * @generated from enum value: LOCALE_USER_SETTING_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: LOCALE_USER_SETTING_EN = 1; - */ - EN = 1, - - /** - * @generated from enum value: LOCALE_USER_SETTING_ZH = 2; - */ - ZH = 2, -} - -/** - * @generated from enum slash.store.ColorThemeUserSetting - */ -export declare enum ColorThemeUserSetting { - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_UNSPECIFIED = 0; - */ - UNSPECIFIED = 0, - - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_LIGHT = 1; - */ - LIGHT = 1, - - /** - * @generated from enum value: COLOR_THEME_USER_SETTING_DARK = 2; - */ - DARK = 2, -} - -/** - * @generated from message slash.store.UserSetting - */ -export declare class UserSetting extends Message { - /** - * @generated from field: int32 user_id = 1; - */ - userId: number; - - /** - * @generated from field: slash.store.UserSettingKey key = 2; - */ - key: UserSettingKey; - - /** - * @generated from oneof slash.store.UserSetting.value - */ - value: { - /** - * @generated from field: slash.store.AccessTokensUserSetting access_tokens = 3; - */ - value: AccessTokensUserSetting; - case: "accessTokens"; - } | { - /** - * @generated from field: slash.store.LocaleUserSetting locale = 4; - */ - value: LocaleUserSetting; - case: "locale"; - } | { - /** - * @generated from field: slash.store.ColorThemeUserSetting color_theme = 5; - */ - value: ColorThemeUserSetting; - case: "colorTheme"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.UserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): UserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): UserSetting; - - static fromJsonString(jsonString: string, options?: Partial): UserSetting; - - static equals(a: UserSetting | PlainMessage | undefined, b: UserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AccessTokensUserSetting - */ -export declare class AccessTokensUserSetting extends Message { - /** - * @generated from field: repeated slash.store.AccessTokensUserSetting.AccessToken access_tokens = 1; - */ - accessTokens: AccessTokensUserSetting_AccessToken[]; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AccessTokensUserSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AccessTokensUserSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AccessTokensUserSetting; - - static fromJsonString(jsonString: string, options?: Partial): AccessTokensUserSetting; - - static equals(a: AccessTokensUserSetting | PlainMessage | undefined, b: AccessTokensUserSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AccessTokensUserSetting.AccessToken - */ -export declare class AccessTokensUserSetting_AccessToken extends Message { - /** - * 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); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AccessTokensUserSetting.AccessToken"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AccessTokensUserSetting_AccessToken; - - static fromJson(jsonValue: JsonValue, options?: Partial): AccessTokensUserSetting_AccessToken; - - static fromJsonString(jsonString: string, options?: Partial): AccessTokensUserSetting_AccessToken; - - static equals(a: AccessTokensUserSetting_AccessToken | PlainMessage | undefined, b: AccessTokensUserSetting_AccessToken | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/store/user_setting_pb.js b/frontend/web/src/types/proto/store/user_setting_pb.js deleted file mode 100644 index 94da2ac..0000000 --- a/frontend/web/src/types/proto/store/user_setting_pb.js +++ /dev/null @@ -1,80 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/user_setting.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.UserSettingKey - */ -export const UserSettingKey = proto3.makeEnum( - "slash.store.UserSettingKey", - [ - {no: 0, name: "USER_SETTING_KEY_UNSPECIFIED"}, - {no: 1, name: "USER_SETTING_ACCESS_TOKENS"}, - {no: 2, name: "USER_SETTING_LOCALE"}, - {no: 3, name: "USER_SETTING_COLOR_THEME"}, - ], -); - -/** - * @generated from enum slash.store.LocaleUserSetting - */ -export const LocaleUserSetting = proto3.makeEnum( - "slash.store.LocaleUserSetting", - [ - {no: 0, name: "LOCALE_USER_SETTING_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "LOCALE_USER_SETTING_EN", localName: "EN"}, - {no: 2, name: "LOCALE_USER_SETTING_ZH", localName: "ZH"}, - ], -); - -/** - * @generated from enum slash.store.ColorThemeUserSetting - */ -export const ColorThemeUserSetting = proto3.makeEnum( - "slash.store.ColorThemeUserSetting", - [ - {no: 0, name: "COLOR_THEME_USER_SETTING_UNSPECIFIED", localName: "UNSPECIFIED"}, - {no: 1, name: "COLOR_THEME_USER_SETTING_LIGHT", localName: "LIGHT"}, - {no: 2, name: "COLOR_THEME_USER_SETTING_DARK", localName: "DARK"}, - ], -); - -/** - * @generated from message slash.store.UserSetting - */ -export const UserSetting = proto3.makeMessageType( - "slash.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" }, - { no: 4, name: "locale", kind: "enum", T: proto3.getEnumType(LocaleUserSetting), oneof: "value" }, - { no: 5, name: "color_theme", kind: "enum", T: proto3.getEnumType(ColorThemeUserSetting), oneof: "value" }, - ], -); - -/** - * @generated from message slash.store.AccessTokensUserSetting - */ -export const AccessTokensUserSetting = proto3.makeMessageType( - "slash.store.AccessTokensUserSetting", - () => [ - { no: 1, name: "access_tokens", kind: "message", T: AccessTokensUserSetting_AccessToken, repeated: true }, - ], -); - -/** - * @generated from message slash.store.AccessTokensUserSetting.AccessToken - */ -export const AccessTokensUserSetting_AccessToken = proto3.makeMessageType( - "slash.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"}, -); - diff --git a/frontend/web/src/types/proto/store/workspace_setting_pb.d.ts b/frontend/web/src/types/proto/store/workspace_setting_pb.d.ts deleted file mode 100644 index b27f9b8..0000000 --- a/frontend/web/src/types/proto/store/workspace_setting_pb.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/workspace_setting.proto (package slash.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 slash.store.WorkspaceSettingKey - */ -export declare enum WorkspaceSettingKey { - /** - * @generated from enum value: WORKSPACE_SETTING_KEY_UNSPECIFIED = 0; - */ - WORKSPACE_SETTING_KEY_UNSPECIFIED = 0, - - /** - * The secret session key used to encrypt session data. - * - * @generated from enum value: WORKSPACE_SETTING_SECRET_SESSION = 1; - */ - WORKSPACE_SETTING_SECRET_SESSION = 1, - - /** - * Whether to enable other users to sign up. - * - * @generated from enum value: WORKSAPCE_SETTING_ENABLE_SIGNUP = 2; - */ - WORKSAPCE_SETTING_ENABLE_SIGNUP = 2, - - /** - * The relative path of the resource directory. - * - * @generated from enum value: WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3; - */ - WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3, - - /** - * The auto backup setting. - * - * @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 4; - */ - WORKSPACE_SETTING_AUTO_BACKUP = 4, -} - -/** - * @generated from message slash.store.WorkspaceSetting - */ -export declare class WorkspaceSetting extends Message { - /** - * @generated from field: slash.store.WorkspaceSettingKey key = 1; - */ - key: WorkspaceSettingKey; - - /** - * @generated from oneof slash.store.WorkspaceSetting.value - */ - value: { - /** - * @generated from field: string secret_session = 2; - */ - value: string; - case: "secretSession"; - } | { - /** - * @generated from field: bool enable_signup = 3; - */ - value: boolean; - case: "enableSignup"; - } | { - /** - * @generated from field: string resource_relative_path = 4; - */ - value: string; - case: "resourceRelativePath"; - } | { - /** - * @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 5; - */ - value: AutoBackupWorkspaceSetting; - case: "autoBackup"; - } | { case: undefined; value?: undefined }; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.WorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): WorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): WorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): WorkspaceSetting; - - static equals(a: WorkspaceSetting | PlainMessage | undefined, b: WorkspaceSetting | PlainMessage | undefined): boolean; -} - -/** - * @generated from message slash.store.AutoBackupWorkspaceSetting - */ -export declare class AutoBackupWorkspaceSetting extends Message { - /** - * Whether auto backup is enabled. - * - * @generated from field: bool enabled = 1; - */ - enabled: boolean; - - /** - * The cron expression for auto backup. - * For example, "0 0 0 * * *" means backup at 00:00:00 every day. - * See https://en.wikipedia.org/wiki/Cron for more details. - * - * @generated from field: string cron_expression = 2; - */ - cronExpression: string; - - /** - * The maximum number of backups to keep. - * - * @generated from field: int32 max_keep = 3; - */ - maxKeep: number; - - constructor(data?: PartialMessage); - - static readonly runtime: typeof proto3; - static readonly typeName = "slash.store.AutoBackupWorkspaceSetting"; - static readonly fields: FieldList; - - static fromBinary(bytes: Uint8Array, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJson(jsonValue: JsonValue, options?: Partial): AutoBackupWorkspaceSetting; - - static fromJsonString(jsonString: string, options?: Partial): AutoBackupWorkspaceSetting; - - static equals(a: AutoBackupWorkspaceSetting | PlainMessage | undefined, b: AutoBackupWorkspaceSetting | PlainMessage | undefined): boolean; -} - diff --git a/frontend/web/src/types/proto/store/workspace_setting_pb.js b/frontend/web/src/types/proto/store/workspace_setting_pb.js deleted file mode 100644 index 733e166..0000000 --- a/frontend/web/src/types/proto/store/workspace_setting_pb.js +++ /dev/null @@ -1,47 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 -// @generated from file store/workspace_setting.proto (package slash.store, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import { proto3 } from "@bufbuild/protobuf"; - -/** - * @generated from enum slash.store.WorkspaceSettingKey - */ -export const WorkspaceSettingKey = proto3.makeEnum( - "slash.store.WorkspaceSettingKey", - [ - {no: 0, name: "WORKSPACE_SETTING_KEY_UNSPECIFIED"}, - {no: 1, name: "WORKSPACE_SETTING_SECRET_SESSION"}, - {no: 2, name: "WORKSAPCE_SETTING_ENABLE_SIGNUP"}, - {no: 3, name: "WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH"}, - {no: 4, name: "WORKSPACE_SETTING_AUTO_BACKUP"}, - ], -); - -/** - * @generated from message slash.store.WorkspaceSetting - */ -export const WorkspaceSetting = proto3.makeMessageType( - "slash.store.WorkspaceSetting", - () => [ - { no: 1, name: "key", kind: "enum", T: proto3.getEnumType(WorkspaceSettingKey) }, - { no: 2, name: "secret_session", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, - { no: 3, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "value" }, - { no: 4, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" }, - { no: 5, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" }, - ], -); - -/** - * @generated from message slash.store.AutoBackupWorkspaceSetting - */ -export const AutoBackupWorkspaceSetting = proto3.makeMessageType( - "slash.store.AutoBackupWorkspaceSetting", - () => [ - { no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - { no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ }, - ], -); - diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index 06a89a6..ce31b28 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -19,11 +19,27 @@ plugins: opt: - paths=source_relative # Generate types for the web client. - - plugin: buf.build/bufbuild/es:v1.3.0 + - plugin: buf.build/community/stephenh-ts-proto:v1.152.1 out: ../frontend/web/src/types/proto + # reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto + opt: + - env=browser + - useOptionals=messages + - outputServices=generic-definitions + - outputJsonMethods=false + - useExactTypes=false + - esModuleInterop=true # Generate types for the extension client. - - plugin: buf.build/bufbuild/es:v1.3.0 + - plugin: buf.build/community/stephenh-ts-proto:v1.152.1 out: ../frontend/extension/src/types/proto + # reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto + opt: + - env=browser + - useOptionals=messages + - outputServices=generic-definitions + - outputJsonMethods=false + - useExactTypes=false + - esModuleInterop=true - plugin: buf.build/community/pseudomuto-doc:v1.5.1 out: gen opt: