diff --git a/.github/workflows/extension-test.yml b/.github/workflows/extension-test.yml index af6badb..b4f43c8 100644 --- a/.github/workflows/extension-test.yml +++ b/.github/workflows/extension-test.yml @@ -8,7 +8,7 @@ on: pull_request: branches: [main] paths: - - "extension/**" + - "frontend/extension/**" jobs: eslint-checks: @@ -23,12 +23,12 @@ jobs: with: node-version: "18" cache: pnpm - cache-dependency-path: "extension/pnpm-lock.yaml" + cache-dependency-path: "frontend/extension/pnpm-lock.yaml" - run: pnpm install - working-directory: extension + working-directory: frontend/extension - name: Run eslint check run: pnpm lint - working-directory: extension + working-directory: frontend/extension extension-build: runs-on: ubuntu-latest @@ -41,9 +41,9 @@ jobs: with: node-version: "18" cache: pnpm - cache-dependency-path: "extension/pnpm-lock.yaml" + cache-dependency-path: "frontend/extension/pnpm-lock.yaml" - run: pnpm install - working-directory: extension + working-directory: frontend/extension - name: Run extension build run: pnpm build - working-directory: extension + working-directory: frontend/extension diff --git a/.github/workflows/frontend-test.yml b/.github/workflows/frontend-test.yml index 59ca635..5455eb0 100644 --- a/.github/workflows/frontend-test.yml +++ b/.github/workflows/frontend-test.yml @@ -8,7 +8,7 @@ on: pull_request: branches: [main] paths: - - "web/**" + - "frontend/web/**" jobs: eslint-checks: @@ -23,12 +23,12 @@ jobs: with: node-version: "18" cache: pnpm - cache-dependency-path: "web/pnpm-lock.yaml" + cache-dependency-path: "frontend/web/pnpm-lock.yaml" - run: pnpm install - working-directory: web + working-directory: frontend/web - name: Run eslint check run: pnpm lint - working-directory: web + working-directory: frontend/web frontend-build: runs-on: ubuntu-latest @@ -41,9 +41,9 @@ jobs: with: node-version: "18" cache: pnpm - cache-dependency-path: "web/pnpm-lock.yaml" + cache-dependency-path: "frontend/web/pnpm-lock.yaml" - run: pnpm install - working-directory: web + working-directory: frontend/web - name: Run frontend build run: pnpm build - working-directory: web + working-directory: frontend/web diff --git a/Dockerfile b/Dockerfile index 7287fc3..b5d0a9a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,11 @@ FROM node:18.12.1-alpine3.16 AS frontend WORKDIR /frontend-build -COPY ./web/package.json ./web/pnpm-lock.yaml ./ +COPY ./frontend/web/package.json ./frontend/web/pnpm-lock.yaml ./ RUN corepack enable && pnpm i --frozen-lockfile -COPY ./web/ . +COPY ./frontend/web/ . RUN pnpm build diff --git a/extension/.eslintrc.json b/frontend/extension/.eslintrc.json similarity index 100% rename from extension/.eslintrc.json rename to frontend/extension/.eslintrc.json diff --git a/extension/.gitignore b/frontend/extension/.gitignore similarity index 100% rename from extension/.gitignore rename to frontend/extension/.gitignore diff --git a/extension/.prettierrc.js b/frontend/extension/.prettierrc.js similarity index 82% rename from extension/.prettierrc.js rename to frontend/extension/.prettierrc.js index 0eeb309..abe6beb 100644 --- a/extension/.prettierrc.js +++ b/frontend/extension/.prettierrc.js @@ -4,5 +4,5 @@ module.exports = { semi: true, singleQuote: false, plugins: [require.resolve("@trivago/prettier-plugin-sort-imports")], - importOrder: ["", "", "^@/((?!less).+)", "^[./]", "^(.+).css"], + importOrder: ["", "", "^@/((?!css).+)", "^[./]", "^[../]", "^(.+).css"], }; diff --git a/extension/README.md b/frontend/extension/README.md similarity index 100% rename from extension/README.md rename to frontend/extension/README.md diff --git a/extension/assets/icon.png b/frontend/extension/assets/icon.png similarity index 100% rename from extension/assets/icon.png rename to frontend/extension/assets/icon.png diff --git a/extension/package.json b/frontend/extension/package.json similarity index 100% rename from extension/package.json rename to frontend/extension/package.json diff --git a/extension/pnpm-lock.yaml b/frontend/extension/pnpm-lock.yaml similarity index 100% rename from extension/pnpm-lock.yaml rename to frontend/extension/pnpm-lock.yaml diff --git a/extension/postcss.config.js b/frontend/extension/postcss.config.js similarity index 100% rename from extension/postcss.config.js rename to frontend/extension/postcss.config.js diff --git a/extension/src/background.ts b/frontend/extension/src/background.ts similarity index 96% rename from extension/src/background.ts rename to frontend/extension/src/background.ts index c4d032b..405c059 100644 --- a/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_pb"; import { Storage } from "@plasmohq/storage"; const storage = new Storage(); diff --git a/extension/src/components/CreateShortcutsButton.tsx b/frontend/extension/src/components/CreateShortcutsButton.tsx similarity index 98% rename from extension/src/components/CreateShortcutsButton.tsx rename to frontend/extension/src/components/CreateShortcutsButton.tsx index 153eb4c..1f2f4a1 100644 --- a/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_pb"; import Icon from "./Icon"; const generateTempName = (length = 6) => { diff --git a/extension/src/components/Icon.ts b/frontend/extension/src/components/Icon.ts similarity index 100% rename from extension/src/components/Icon.ts rename to frontend/extension/src/components/Icon.ts diff --git a/extension/src/components/Logo.tsx b/frontend/extension/src/components/Logo.tsx similarity index 100% rename from extension/src/components/Logo.tsx rename to frontend/extension/src/components/Logo.tsx diff --git a/extension/src/components/PullShortcutsButton.tsx b/frontend/extension/src/components/PullShortcutsButton.tsx similarity index 93% rename from extension/src/components/PullShortcutsButton.tsx rename to frontend/extension/src/components/PullShortcutsButton.tsx index 064c4e3..f121bb2 100644 --- a/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_pb"; import Icon from "./Icon"; const PullShortcutsButton = () => { diff --git a/extension/src/components/ShortcutView.tsx b/frontend/extension/src/components/ShortcutView.tsx similarity index 97% rename from extension/src/components/ShortcutView.tsx rename to frontend/extension/src/components/ShortcutView.tsx index 93a0f14..15579a3 100644 --- a/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_pb"; import { useStorage } from "@plasmohq/storage/hook"; import classNames from "classnames"; import { useEffect, useState } from "react"; diff --git a/extension/src/components/ShortcutsContainer.tsx b/frontend/extension/src/components/ShortcutsContainer.tsx similarity index 86% rename from extension/src/components/ShortcutsContainer.tsx rename to frontend/extension/src/components/ShortcutsContainer.tsx index 76ead45..b911789 100644 --- a/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_pb"; import { useStorage } from "@plasmohq/storage/hook"; import classNames from "classnames"; import ShortcutView from "./ShortcutView"; diff --git a/extension/src/helpers/api.ts b/frontend/extension/src/helpers/api.ts similarity index 100% rename from extension/src/helpers/api.ts rename to frontend/extension/src/helpers/api.ts diff --git a/extension/src/helpers/utils.ts b/frontend/extension/src/helpers/utils.ts similarity index 100% rename from extension/src/helpers/utils.ts rename to frontend/extension/src/helpers/utils.ts diff --git a/extension/src/options.tsx b/frontend/extension/src/options.tsx similarity index 98% rename from extension/src/options.tsx rename to frontend/extension/src/options.tsx index 200ecd8..7e8e220 100644 --- a/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_pb"; import { Button, Divider, Input } from "@mui/joy"; import { useStorage } from "@plasmohq/storage/hook"; import { useEffect, useState } from "react"; diff --git a/extension/src/popup.tsx b/frontend/extension/src/popup.tsx similarity index 98% rename from extension/src/popup.tsx rename to frontend/extension/src/popup.tsx index c2b8712..9dc36c3 100644 --- a/extension/src/popup.tsx +++ b/frontend/extension/src/popup.tsx @@ -1,3 +1,4 @@ +import type { Shortcut } from "../../types/proto/api/v2/shortcut_service_pb"; import { Button, Divider, IconButton } from "@mui/joy"; import { useStorage } from "@plasmohq/storage/hook"; import { Toaster } from "react-hot-toast"; @@ -6,7 +7,6 @@ import Icon from "@/components/Icon"; import Logo from "@/components/Logo"; import PullShortcutsButton from "@/components/PullShortcutsButton"; import ShortcutsContainer from "@/components/ShortcutsContainer"; -import { Shortcut } from "@/types/proto/api/v2/shortcut_service_pb"; import "./style.css"; const IndexPopup = () => { diff --git a/extension/src/stores/favicon.ts b/frontend/extension/src/stores/favicon.ts similarity index 100% rename from extension/src/stores/favicon.ts rename to frontend/extension/src/stores/favicon.ts diff --git a/extension/src/style.css b/frontend/extension/src/style.css similarity index 100% rename from extension/src/style.css rename to frontend/extension/src/style.css diff --git a/extension/tailwind.config.js b/frontend/extension/tailwind.config.js similarity index 100% rename from extension/tailwind.config.js rename to frontend/extension/tailwind.config.js diff --git a/extension/tsconfig.json b/frontend/extension/tsconfig.json similarity index 100% rename from extension/tsconfig.json rename to frontend/extension/tsconfig.json diff --git a/web/src/locales/en.json b/frontend/locales/en.json similarity index 100% rename from web/src/locales/en.json rename to frontend/locales/en.json diff --git a/web/src/locales/zh.json b/frontend/locales/zh.json similarity index 100% rename from web/src/locales/zh.json rename to frontend/locales/zh.json diff --git a/extension/src/types/proto/api/v2/common_pb.d.ts b/frontend/types/proto/api/v2/common_pb.d.ts similarity index 100% rename from extension/src/types/proto/api/v2/common_pb.d.ts rename to frontend/types/proto/api/v2/common_pb.d.ts diff --git a/extension/src/types/proto/api/v2/common_pb.js b/frontend/types/proto/api/v2/common_pb.js similarity index 100% rename from extension/src/types/proto/api/v2/common_pb.js rename to frontend/types/proto/api/v2/common_pb.js diff --git a/extension/src/types/proto/api/v2/shortcut_service_pb.d.ts b/frontend/types/proto/api/v2/shortcut_service_pb.d.ts similarity index 100% rename from extension/src/types/proto/api/v2/shortcut_service_pb.d.ts rename to frontend/types/proto/api/v2/shortcut_service_pb.d.ts diff --git a/extension/src/types/proto/api/v2/shortcut_service_pb.js b/frontend/types/proto/api/v2/shortcut_service_pb.js similarity index 100% rename from extension/src/types/proto/api/v2/shortcut_service_pb.js rename to frontend/types/proto/api/v2/shortcut_service_pb.js diff --git a/extension/src/types/proto/api/v2/user_service_pb.d.ts b/frontend/types/proto/api/v2/user_service_pb.d.ts similarity index 100% rename from extension/src/types/proto/api/v2/user_service_pb.d.ts rename to frontend/types/proto/api/v2/user_service_pb.d.ts diff --git a/extension/src/types/proto/api/v2/user_service_pb.js b/frontend/types/proto/api/v2/user_service_pb.js similarity index 100% rename from extension/src/types/proto/api/v2/user_service_pb.js rename to frontend/types/proto/api/v2/user_service_pb.js diff --git a/extension/src/types/proto/store/activity_pb.d.ts b/frontend/types/proto/store/activity_pb.d.ts similarity index 100% rename from extension/src/types/proto/store/activity_pb.d.ts rename to frontend/types/proto/store/activity_pb.d.ts diff --git a/extension/src/types/proto/store/activity_pb.js b/frontend/types/proto/store/activity_pb.js similarity index 100% rename from extension/src/types/proto/store/activity_pb.js rename to frontend/types/proto/store/activity_pb.js diff --git a/extension/src/types/proto/store/common_pb.d.ts b/frontend/types/proto/store/common_pb.d.ts similarity index 100% rename from extension/src/types/proto/store/common_pb.d.ts rename to frontend/types/proto/store/common_pb.d.ts diff --git a/extension/src/types/proto/store/common_pb.js b/frontend/types/proto/store/common_pb.js similarity index 100% rename from extension/src/types/proto/store/common_pb.js rename to frontend/types/proto/store/common_pb.js diff --git a/extension/src/types/proto/store/shortcut_pb.d.ts b/frontend/types/proto/store/shortcut_pb.d.ts similarity index 100% rename from extension/src/types/proto/store/shortcut_pb.d.ts rename to frontend/types/proto/store/shortcut_pb.d.ts diff --git a/extension/src/types/proto/store/shortcut_pb.js b/frontend/types/proto/store/shortcut_pb.js similarity index 100% rename from extension/src/types/proto/store/shortcut_pb.js rename to frontend/types/proto/store/shortcut_pb.js diff --git a/extension/src/types/proto/store/user_setting_pb.d.ts b/frontend/types/proto/store/user_setting_pb.d.ts similarity index 100% rename from extension/src/types/proto/store/user_setting_pb.d.ts rename to frontend/types/proto/store/user_setting_pb.d.ts diff --git a/extension/src/types/proto/store/user_setting_pb.js b/frontend/types/proto/store/user_setting_pb.js similarity index 100% rename from extension/src/types/proto/store/user_setting_pb.js rename to frontend/types/proto/store/user_setting_pb.js diff --git a/web/.eslintrc.json b/frontend/web/.eslintrc.json similarity index 100% rename from web/.eslintrc.json rename to frontend/web/.eslintrc.json diff --git a/web/.gitignore b/frontend/web/.gitignore similarity index 100% rename from web/.gitignore rename to frontend/web/.gitignore diff --git a/web/.prettierrc.js b/frontend/web/.prettierrc.js similarity index 100% rename from web/.prettierrc.js rename to frontend/web/.prettierrc.js diff --git a/web/.vscode/setting.json b/frontend/web/.vscode/setting.json similarity index 100% rename from web/.vscode/setting.json rename to frontend/web/.vscode/setting.json diff --git a/web/README.md b/frontend/web/README.md similarity index 100% rename from web/README.md rename to frontend/web/README.md diff --git a/web/index.html b/frontend/web/index.html similarity index 100% rename from web/index.html rename to frontend/web/index.html diff --git a/web/package.json b/frontend/web/package.json similarity index 100% rename from web/package.json rename to frontend/web/package.json diff --git a/web/pnpm-lock.yaml b/frontend/web/pnpm-lock.yaml similarity index 100% rename from web/pnpm-lock.yaml rename to frontend/web/pnpm-lock.yaml diff --git a/web/postcss.config.js b/frontend/web/postcss.config.js similarity index 100% rename from web/postcss.config.js rename to frontend/web/postcss.config.js diff --git a/web/public/logo.png b/frontend/web/public/logo.png similarity index 100% rename from web/public/logo.png rename to frontend/web/public/logo.png diff --git a/web/src/App.tsx b/frontend/web/src/App.tsx similarity index 100% rename from web/src/App.tsx rename to frontend/web/src/App.tsx diff --git a/web/src/components/AboutDialog.tsx b/frontend/web/src/components/AboutDialog.tsx similarity index 100% rename from web/src/components/AboutDialog.tsx rename to frontend/web/src/components/AboutDialog.tsx diff --git a/web/src/components/Alert.tsx b/frontend/web/src/components/Alert.tsx similarity index 100% rename from web/src/components/Alert.tsx rename to frontend/web/src/components/Alert.tsx diff --git a/web/src/components/AnalyticsView.tsx b/frontend/web/src/components/AnalyticsView.tsx similarity index 100% rename from web/src/components/AnalyticsView.tsx rename to frontend/web/src/components/AnalyticsView.tsx diff --git a/web/src/components/ChangePasswordDialog.tsx b/frontend/web/src/components/ChangePasswordDialog.tsx similarity index 100% rename from web/src/components/ChangePasswordDialog.tsx rename to frontend/web/src/components/ChangePasswordDialog.tsx diff --git a/web/src/components/CreateAccessTokenDialog.tsx b/frontend/web/src/components/CreateAccessTokenDialog.tsx similarity index 100% rename from web/src/components/CreateAccessTokenDialog.tsx rename to frontend/web/src/components/CreateAccessTokenDialog.tsx diff --git a/web/src/components/CreateShortcutDialog.tsx b/frontend/web/src/components/CreateShortcutDialog.tsx similarity index 100% rename from web/src/components/CreateShortcutDialog.tsx rename to frontend/web/src/components/CreateShortcutDialog.tsx diff --git a/web/src/components/CreateUserDialog.tsx b/frontend/web/src/components/CreateUserDialog.tsx similarity index 100% rename from web/src/components/CreateUserDialog.tsx rename to frontend/web/src/components/CreateUserDialog.tsx diff --git a/web/src/components/DemoBanner.tsx b/frontend/web/src/components/DemoBanner.tsx similarity index 100% rename from web/src/components/DemoBanner.tsx rename to frontend/web/src/components/DemoBanner.tsx diff --git a/web/src/components/EditUserinfoDialog.tsx b/frontend/web/src/components/EditUserinfoDialog.tsx similarity index 100% rename from web/src/components/EditUserinfoDialog.tsx rename to frontend/web/src/components/EditUserinfoDialog.tsx diff --git a/web/src/components/FilterView.tsx b/frontend/web/src/components/FilterView.tsx similarity index 100% rename from web/src/components/FilterView.tsx rename to frontend/web/src/components/FilterView.tsx diff --git a/web/src/components/GenerateQRCodeDialog.tsx b/frontend/web/src/components/GenerateQRCodeDialog.tsx similarity index 100% rename from web/src/components/GenerateQRCodeDialog.tsx rename to frontend/web/src/components/GenerateQRCodeDialog.tsx diff --git a/web/src/components/Header.tsx b/frontend/web/src/components/Header.tsx similarity index 100% rename from web/src/components/Header.tsx rename to frontend/web/src/components/Header.tsx diff --git a/web/src/components/Icon.ts b/frontend/web/src/components/Icon.ts similarity index 100% rename from web/src/components/Icon.ts rename to frontend/web/src/components/Icon.ts diff --git a/web/src/components/Navigator.tsx b/frontend/web/src/components/Navigator.tsx similarity index 100% rename from web/src/components/Navigator.tsx rename to frontend/web/src/components/Navigator.tsx diff --git a/web/src/components/ShortcutActionsDropdown.tsx b/frontend/web/src/components/ShortcutActionsDropdown.tsx similarity index 100% rename from web/src/components/ShortcutActionsDropdown.tsx rename to frontend/web/src/components/ShortcutActionsDropdown.tsx diff --git a/web/src/components/ShortcutCard.tsx b/frontend/web/src/components/ShortcutCard.tsx similarity index 100% rename from web/src/components/ShortcutCard.tsx rename to frontend/web/src/components/ShortcutCard.tsx diff --git a/web/src/components/ShortcutView.tsx b/frontend/web/src/components/ShortcutView.tsx similarity index 100% rename from web/src/components/ShortcutView.tsx rename to frontend/web/src/components/ShortcutView.tsx diff --git a/web/src/components/ShortcutsContainer.tsx b/frontend/web/src/components/ShortcutsContainer.tsx similarity index 100% rename from web/src/components/ShortcutsContainer.tsx rename to frontend/web/src/components/ShortcutsContainer.tsx diff --git a/web/src/components/ViewSetting.tsx b/frontend/web/src/components/ViewSetting.tsx similarity index 100% rename from web/src/components/ViewSetting.tsx rename to frontend/web/src/components/ViewSetting.tsx diff --git a/web/src/components/VisibilityIcon.tsx b/frontend/web/src/components/VisibilityIcon.tsx similarity index 100% rename from web/src/components/VisibilityIcon.tsx rename to frontend/web/src/components/VisibilityIcon.tsx diff --git a/web/src/components/common/Dropdown.tsx b/frontend/web/src/components/common/Dropdown.tsx similarity index 100% rename from web/src/components/common/Dropdown.tsx rename to frontend/web/src/components/common/Dropdown.tsx diff --git a/web/src/components/setting/AccessTokenSection.tsx b/frontend/web/src/components/setting/AccessTokenSection.tsx similarity index 99% rename from web/src/components/setting/AccessTokenSection.tsx rename to frontend/web/src/components/setting/AccessTokenSection.tsx index b18422b..0f8e3eb 100644 --- a/web/src/components/setting/AccessTokenSection.tsx +++ b/frontend/web/src/components/setting/AccessTokenSection.tsx @@ -3,8 +3,8 @@ import axios from "axios"; import copy from "copy-to-clipboard"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; +import { ListUserAccessTokensResponse, UserAccessToken } from "../../../../types/proto/api/v2/user_service_pb"; import useUserStore from "../../stores/v1/user"; -import { ListUserAccessTokensResponse, UserAccessToken } from "../../types/proto/api/v2/user_service_pb"; import { showCommonDialog } from "../Alert"; import CreateAccessTokenDialog from "../CreateAccessTokenDialog"; import Icon from "../Icon"; diff --git a/web/src/components/setting/AccountSection.tsx b/frontend/web/src/components/setting/AccountSection.tsx similarity index 100% rename from web/src/components/setting/AccountSection.tsx rename to frontend/web/src/components/setting/AccountSection.tsx diff --git a/web/src/components/setting/MemberSection.tsx b/frontend/web/src/components/setting/MemberSection.tsx similarity index 100% rename from web/src/components/setting/MemberSection.tsx rename to frontend/web/src/components/setting/MemberSection.tsx diff --git a/web/src/components/setting/WorkspaceSection.tsx b/frontend/web/src/components/setting/WorkspaceSection.tsx similarity index 100% rename from web/src/components/setting/WorkspaceSection.tsx rename to frontend/web/src/components/setting/WorkspaceSection.tsx diff --git a/web/src/css/index.css b/frontend/web/src/css/index.css similarity index 100% rename from web/src/css/index.css rename to frontend/web/src/css/index.css diff --git a/web/src/helpers/api.ts b/frontend/web/src/helpers/api.ts similarity index 100% rename from web/src/helpers/api.ts rename to frontend/web/src/helpers/api.ts diff --git a/web/src/helpers/utils.ts b/frontend/web/src/helpers/utils.ts similarity index 100% rename from web/src/helpers/utils.ts rename to frontend/web/src/helpers/utils.ts diff --git a/web/src/hooks/useLoading.ts b/frontend/web/src/hooks/useLoading.ts similarity index 100% rename from web/src/hooks/useLoading.ts rename to frontend/web/src/hooks/useLoading.ts diff --git a/web/src/hooks/useToggle.ts b/frontend/web/src/hooks/useToggle.ts similarity index 100% rename from web/src/hooks/useToggle.ts rename to frontend/web/src/hooks/useToggle.ts diff --git a/web/src/i18n.ts b/frontend/web/src/i18n.ts similarity index 85% rename from web/src/i18n.ts rename to frontend/web/src/i18n.ts index aeb536b..435dbc9 100644 --- a/web/src/i18n.ts +++ b/frontend/web/src/i18n.ts @@ -1,6 +1,6 @@ import i18n from "i18next"; import { initReactI18next } from "react-i18next"; -import en from "./locales/en.json"; +import en from "../../locales/en.json"; i18n.use(initReactI18next).init({ resources: { diff --git a/web/src/layouts/Root.tsx b/frontend/web/src/layouts/Root.tsx similarity index 100% rename from web/src/layouts/Root.tsx rename to frontend/web/src/layouts/Root.tsx diff --git a/frontend/web/src/locales/en.json b/frontend/web/src/locales/en.json new file mode 100644 index 0000000..8342f9b --- /dev/null +++ b/frontend/web/src/locales/en.json @@ -0,0 +1,38 @@ +{ + "common": { + "about": "About", + "loading": "Loading", + "cancel": "Cancel", + "save": "Save", + "create": "Create", + "download": "Download", + "edit": "Edit", + "delete": "Delete" + }, + "analytics": { + "self": "Analytics", + "top-sources": "Top sources", + "source": "Source", + "visitors": "Visitors", + "devices": "Devices", + "browser": "Browser", + "browsers": "Browsers", + "operating-system": "Operating System" + }, + "shortcut": { + "visibility": { + "private": { + "self": "Private", + "description": "Only you can access" + }, + "workspace": { + "self": "Workspace", + "description": "Workspace members can access" + }, + "public": { + "self": "Public", + "description": "Visible to everyone on the internet" + } + } + } +} diff --git a/frontend/web/src/locales/zh.json b/frontend/web/src/locales/zh.json new file mode 100644 index 0000000..87f58d4 --- /dev/null +++ b/frontend/web/src/locales/zh.json @@ -0,0 +1,38 @@ +{ + "common": { + "about": "关于", + "loading": "加载中", + "cancel": "取消", + "save": "保存", + "create": "创建", + "download": "下载", + "edit": "编辑", + "delete": "删除" + }, + "analytics": { + "self": "分析", + "top-sources": "热门来源", + "source": "来源", + "visitors": "访客数", + "devices": "设备", + "browser": "浏览器", + "browsers": "浏览器", + "operating-system": "操作系统" + }, + "shortcut": { + "visibility": { + "private": { + "self": "私有的", + "description": "仅您可以访问" + }, + "workspace": { + "self": "工作区", + "description": "工作区成员可以访问" + }, + "public": { + "self": "公开的", + "description": "对任何人可见" + } + } + } +} diff --git a/web/src/main.tsx b/frontend/web/src/main.tsx similarity index 100% rename from web/src/main.tsx rename to frontend/web/src/main.tsx diff --git a/web/src/pages/Home.tsx b/frontend/web/src/pages/Home.tsx similarity index 100% rename from web/src/pages/Home.tsx rename to frontend/web/src/pages/Home.tsx diff --git a/web/src/pages/Setting.tsx b/frontend/web/src/pages/Setting.tsx similarity index 100% rename from web/src/pages/Setting.tsx rename to frontend/web/src/pages/Setting.tsx diff --git a/web/src/pages/ShortcutDetail.tsx b/frontend/web/src/pages/ShortcutDetail.tsx similarity index 100% rename from web/src/pages/ShortcutDetail.tsx rename to frontend/web/src/pages/ShortcutDetail.tsx diff --git a/web/src/pages/SignIn.tsx b/frontend/web/src/pages/SignIn.tsx similarity index 100% rename from web/src/pages/SignIn.tsx rename to frontend/web/src/pages/SignIn.tsx diff --git a/web/src/pages/SignUp.tsx b/frontend/web/src/pages/SignUp.tsx similarity index 100% rename from web/src/pages/SignUp.tsx rename to frontend/web/src/pages/SignUp.tsx diff --git a/web/src/routers/index.tsx b/frontend/web/src/routers/index.tsx similarity index 100% rename from web/src/routers/index.tsx rename to frontend/web/src/routers/index.tsx diff --git a/web/src/services/globalService.ts b/frontend/web/src/services/globalService.ts similarity index 100% rename from web/src/services/globalService.ts rename to frontend/web/src/services/globalService.ts diff --git a/web/src/services/index.ts b/frontend/web/src/services/index.ts similarity index 100% rename from web/src/services/index.ts rename to frontend/web/src/services/index.ts diff --git a/web/src/services/shortcutService.ts b/frontend/web/src/services/shortcutService.ts similarity index 100% rename from web/src/services/shortcutService.ts rename to frontend/web/src/services/shortcutService.ts diff --git a/web/src/stores/index.ts b/frontend/web/src/stores/index.ts similarity index 100% rename from web/src/stores/index.ts rename to frontend/web/src/stores/index.ts diff --git a/web/src/stores/modules/global.ts b/frontend/web/src/stores/modules/global.ts similarity index 100% rename from web/src/stores/modules/global.ts rename to frontend/web/src/stores/modules/global.ts diff --git a/web/src/stores/modules/shortcut.ts b/frontend/web/src/stores/modules/shortcut.ts similarity index 100% rename from web/src/stores/modules/shortcut.ts rename to frontend/web/src/stores/modules/shortcut.ts diff --git a/web/src/stores/v1/favicon.ts b/frontend/web/src/stores/v1/favicon.ts similarity index 100% rename from web/src/stores/v1/favicon.ts rename to frontend/web/src/stores/v1/favicon.ts diff --git a/web/src/stores/v1/shortcut.ts b/frontend/web/src/stores/v1/shortcut.ts similarity index 100% rename from web/src/stores/v1/shortcut.ts rename to frontend/web/src/stores/v1/shortcut.ts diff --git a/web/src/stores/v1/user.ts b/frontend/web/src/stores/v1/user.ts similarity index 100% rename from web/src/stores/v1/user.ts rename to frontend/web/src/stores/v1/user.ts diff --git a/web/src/stores/v1/view.ts b/frontend/web/src/stores/v1/view.ts similarity index 100% rename from web/src/stores/v1/view.ts rename to frontend/web/src/stores/v1/view.ts diff --git a/web/src/types/analytics.d.ts b/frontend/web/src/types/analytics.d.ts similarity index 100% rename from web/src/types/analytics.d.ts rename to frontend/web/src/types/analytics.d.ts diff --git a/web/src/types/common.d.ts b/frontend/web/src/types/common.d.ts similarity index 100% rename from web/src/types/common.d.ts rename to frontend/web/src/types/common.d.ts diff --git a/web/src/types/modules/common.d.ts b/frontend/web/src/types/modules/common.d.ts similarity index 100% rename from web/src/types/modules/common.d.ts rename to frontend/web/src/types/modules/common.d.ts diff --git a/web/src/types/modules/shortcut.d.ts b/frontend/web/src/types/modules/shortcut.d.ts similarity index 100% rename from web/src/types/modules/shortcut.d.ts rename to frontend/web/src/types/modules/shortcut.d.ts diff --git a/web/src/types/modules/system.d.ts b/frontend/web/src/types/modules/system.d.ts similarity index 100% rename from web/src/types/modules/system.d.ts rename to frontend/web/src/types/modules/system.d.ts diff --git a/web/src/types/modules/user.d.ts b/frontend/web/src/types/modules/user.d.ts similarity index 100% rename from web/src/types/modules/user.d.ts rename to frontend/web/src/types/modules/user.d.ts diff --git a/web/tailwind.config.js b/frontend/web/tailwind.config.js similarity index 100% rename from web/tailwind.config.js rename to frontend/web/tailwind.config.js diff --git a/web/tsconfig.json b/frontend/web/tsconfig.json similarity index 100% rename from web/tsconfig.json rename to frontend/web/tsconfig.json diff --git a/web/vite.config.ts b/frontend/web/vite.config.ts similarity index 100% rename from web/vite.config.ts rename to frontend/web/vite.config.ts diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml index c11de9b..2b71189 100644 --- a/proto/buf.gen.yaml +++ b/proto/buf.gen.yaml @@ -18,11 +18,8 @@ plugins: out: gen opt: - paths=source_relative - # Build the TypeScript definitions for the web and extension. - plugin: buf.build/bufbuild/es:v1.3.0 - out: ../web/src/types/proto - - plugin: buf.build/bufbuild/es:v1.3.0 - out: ../extension/src/types/proto + out: ../frontend/types/proto - plugin: buf.build/community/pseudomuto-doc:v1.5.1 out: gen opt: diff --git a/scripts/.air.toml b/scripts/.air.toml index 0f3f5fe..c39fcc3 100644 --- a/scripts/.air.toml +++ b/scripts/.air.toml @@ -5,7 +5,7 @@ tmp_dir = ".air" bin = "./.air/slash --mode dev" cmd = "go build -o ./.air/slash ./cmd/slash/main.go" delay = 1000 - exclude_dir = [".air", "web", "extension", "build"] + exclude_dir = [".air", "web", "extension", "frontend", "build"] exclude_file = [] exclude_regex = [] exclude_unchanged = false diff --git a/web/src/types/proto/api/v2/common_pb.d.ts b/web/src/types/proto/api/v2/common_pb.d.ts deleted file mode 100644 index 56292fd..0000000 --- a/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/web/src/types/proto/api/v2/common_pb.js b/web/src/types/proto/api/v2/common_pb.js deleted file mode 100644 index d2b11ae..0000000 --- a/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/web/src/types/proto/api/v2/shortcut_service_pb.d.ts b/web/src/types/proto/api/v2/shortcut_service_pb.d.ts deleted file mode 100644 index 0afa074..0000000 --- a/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/web/src/types/proto/api/v2/shortcut_service_pb.js b/web/src/types/proto/api/v2/shortcut_service_pb.js deleted file mode 100644 index 1b1ffbe..0000000 --- a/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/web/src/types/proto/api/v2/user_service_pb.d.ts b/web/src/types/proto/api/v2/user_service_pb.d.ts deleted file mode 100644 index 0665347..0000000 --- a/web/src/types/proto/api/v2/user_service_pb.d.ts +++ /dev/null @@ -1,466 +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.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/web/src/types/proto/api/v2/user_service_pb.js b/web/src/types/proto/api/v2/user_service_pb.js deleted file mode 100644 index 767e9bc..0000000 --- a/web/src/types/proto/api/v2/user_service_pb.js +++ /dev/null @@ -1,186 +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.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/web/src/types/proto/store/activity_pb.d.ts b/web/src/types/proto/store/activity_pb.d.ts deleted file mode 100644 index a3c8c09..0000000 --- a/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/web/src/types/proto/store/activity_pb.js b/web/src/types/proto/store/activity_pb.js deleted file mode 100644 index 4e4e768..0000000 --- a/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/web/src/types/proto/store/common_pb.d.ts b/web/src/types/proto/store/common_pb.d.ts deleted file mode 100644 index 0fdf8c1..0000000 --- a/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/web/src/types/proto/store/common_pb.js b/web/src/types/proto/store/common_pb.js deleted file mode 100644 index 28a6967..0000000 --- a/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/web/src/types/proto/store/shortcut_pb.d.ts b/web/src/types/proto/store/shortcut_pb.d.ts deleted file mode 100644 index ae696b3..0000000 --- a/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/web/src/types/proto/store/shortcut_pb.js b/web/src/types/proto/store/shortcut_pb.js deleted file mode 100644 index 1ad4d5c..0000000 --- a/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/web/src/types/proto/store/user_setting_pb.d.ts b/web/src/types/proto/store/user_setting_pb.d.ts deleted file mode 100644 index c125e28..0000000 --- a/web/src/types/proto/store/user_setting_pb.d.ts +++ /dev/null @@ -1,116 +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, - - /** - * @generated from enum value: USER_SETTING_ACCESS_TOKENS = 1; - */ - USER_SETTING_ACCESS_TOKENS = 1, -} - -/** - * @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_user_setting = 3; - */ - value: AccessTokensUserSetting; - case: "accessTokensUserSetting"; - } | { 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 { - /** - * @generated from field: string access_token = 1; - */ - accessToken: string; - - /** - * @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/web/src/types/proto/store/user_setting_pb.js b/web/src/types/proto/store/user_setting_pb.js deleted file mode 100644 index 330b9d5..0000000 --- a/web/src/types/proto/store/user_setting_pb.js +++ /dev/null @@ -1,52 +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"}, - ], -); - -/** - * @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_user_setting", kind: "message", T: AccessTokensUserSetting, 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"}, -); -