mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-08 07:12:49 +00:00
Merge pull request #533 from spacedriveapp/consistent-formatting-please
Enforce consistent formatting
This commit is contained in:
commit
0be71dc955
1
.github/actions/cache-rust-deps/action.yaml
vendored
1
.github/actions/cache-rust-deps/action.yaml
vendored
|
@ -1,4 +1,3 @@
|
|||
|
||||
name: Cache Rust Dependencies
|
||||
description: Caches Rust dependencies
|
||||
runs:
|
||||
|
|
3
.lintstagedrc.json
Normal file
3
.lintstagedrc.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"*.{js,jsx,ts,tsx,html,json,yml,yaml,css,scss,md}": ["prettier --write"]
|
||||
}
|
2
.npmrc
2
.npmrc
|
@ -1,5 +1,7 @@
|
|||
; make all engine requirements (e.g. node version) strictly kept
|
||||
engine-strict=true
|
||||
; tempfix for pnpm#5909: https://github.com/pnpm/pnpm/issues/5909#issuecomment-1397758156
|
||||
prefer-symlinked-executables=false
|
||||
; necessary for metro + mobile
|
||||
strict-peer-dependencies=false
|
||||
node-linker=hoisted
|
||||
|
|
|
@ -1,2 +1,13 @@
|
|||
/target
|
||||
.build
|
||||
# built product/cache
|
||||
target/
|
||||
dist/
|
||||
# macOS/iOS product/cache
|
||||
.build/
|
||||
Pods/
|
||||
# just in case it tries to parse for some reason
|
||||
*.rs
|
||||
# prettier sometimes can't parse these
|
||||
*.d.ts
|
||||
packages/interface/scripts/generateSvgImports.mjs
|
||||
# we plainly don't need a lockfile to look nice
|
||||
pnpm-lock.yaml
|
||||
|
|
|
@ -7,8 +7,16 @@ module.exports = {
|
|||
bracketSameLine: false,
|
||||
semi: true,
|
||||
quoteProps: 'consistent',
|
||||
importOrder: ['^[./]', '^@sd/interface/(.*)$', '^@sd/client/(.*)$', '^@sd/ui/(.*)$'],
|
||||
importOrderSeparation: true,
|
||||
importOrder: [
|
||||
// external packages
|
||||
'^([A-Za-z]|@[^s/])',
|
||||
// spacedrive packages
|
||||
'^@sd/(interface|client|ui)(/.*)?$',
|
||||
// this package
|
||||
'^~/',
|
||||
// relative
|
||||
'^\\.'
|
||||
],
|
||||
importOrderSortSpecifiers: true,
|
||||
plugins: ['@trivago/prettier-plugin-sort-imports']
|
||||
};
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
import { loggerLink } from '@rspc/client';
|
||||
import { tauriLink } from '@rspc/tauri';
|
||||
import { getDebugState, hooks, queryClient } from '@sd/client';
|
||||
import SpacedriveInterface, { OperatingSystem, Platform, PlatformProvider } from '@sd/interface';
|
||||
import { KeybindEvent } from '@sd/interface';
|
||||
import { dialog, invoke, os, shell } from '@tauri-apps/api';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { getDebugState, hooks, queryClient } from '@sd/client';
|
||||
import SpacedriveInterface, { OperatingSystem, Platform, PlatformProvider } from '@sd/interface';
|
||||
import { KeybindEvent } from '@sd/interface';
|
||||
import '@sd/ui/style';
|
||||
|
||||
const client = hooks.createClient({
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
// WARNING: BE CAREFUL SAVING THIS FILE WITH A FORMATTER ENABLED. The import order is important and goes against prettier's recommendations.
|
||||
import React, { Suspense } from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import '@sd/ui/style';
|
||||
// THIS MUST GO BEFORE importing the App
|
||||
import '~/patches';
|
||||
|
||||
import App from './App';
|
||||
|
||||
import '@sd/ui/style';
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
|
|
|
@ -4,14 +4,10 @@
|
|||
"rootDir": "src",
|
||||
"declarationDir": "dist",
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"./src/*"
|
||||
]
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"include": ["src"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/interface"
|
||||
|
|
|
@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react';
|
|||
import { defineConfig } from 'vite';
|
||||
import svgr from 'vite-plugin-svgr';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
|
||||
import { name, version } from './package.json';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "Spacedrive",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{ "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
|
||||
{ "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
"name": "Spacedrive",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{ "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
|
||||
{ "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
import React, { PropsWithChildren } from 'react';
|
||||
import { PageContextBuiltIn } from 'vite-plugin-ssr';
|
||||
|
||||
import '@sd/ui/style';
|
||||
import { Footer } from './components/Footer';
|
||||
import NavBar from './components/NavBar';
|
||||
import { PageContextProvider } from './renderer/usePageContext';
|
||||
import './style.scss';
|
||||
|
||||
import '@sd/ui/style';
|
||||
|
||||
export default function App({
|
||||
children,
|
||||
pageContext
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import clsx from 'clsx';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { getWindow } from '../utils';
|
||||
|
||||
const AppEmbed = () => {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { Button } from '@sd/ui';
|
||||
import { CaretRight, List, X } from 'phosphor-react';
|
||||
import { PropsWithChildren, useState } from 'react';
|
||||
import pkg from 'react-burger-menu';
|
||||
|
||||
import { Button } from '@sd/ui';
|
||||
import { Doc, DocsNavigation, toTitleCase } from '../pages/docs/api';
|
||||
import DocsSidebar from './DocsSidebar';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Input } from '@sd/ui';
|
||||
import clsx from 'clsx';
|
||||
import { MagnifyingGlass } from 'phosphor-react';
|
||||
|
||||
import { Input } from '@sd/ui';
|
||||
import { DocsNavigation } from '../pages/docs/api';
|
||||
import config from '../pages/docs/docs';
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import AppLogo from '@sd/assets/images/logo.png';
|
||||
import {
|
||||
Discord,
|
||||
Github,
|
||||
|
@ -6,7 +7,6 @@ import {
|
|||
Twitch,
|
||||
Twitter
|
||||
} from '@icons-pack/react-simple-icons';
|
||||
import AppLogo from '@sd/assets/images/logo.png';
|
||||
import { PropsWithChildren } from 'react';
|
||||
|
||||
function FooterLink(props: PropsWithChildren<{ link: string; blank?: boolean }>) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { Github } from '@icons-pack/react-simple-icons';
|
||||
import { ReactComponent as Alert } from '@sd/assets/svgs/alert.svg';
|
||||
import { ReactComponent as Info } from '@sd/assets/svgs/info.svg';
|
||||
import { ReactComponent as Spinner } from '@sd/assets/svgs/spinner.svg';
|
||||
import { Button, Input } from '@sd/ui';
|
||||
import { Github } from '@icons-pack/react-simple-icons';
|
||||
import clsx from 'clsx';
|
||||
import { useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { Button, Input } from '@sd/ui';
|
||||
|
||||
interface WaitlistInputs {
|
||||
email: string;
|
||||
|
|
|
@ -3,7 +3,6 @@ import Prism from 'prismjs';
|
|||
import 'prismjs/components/prism-rust';
|
||||
import 'prismjs/components/prism-typescript';
|
||||
import { PropsWithChildren, useEffect } from 'react';
|
||||
|
||||
import '../atom-one.css';
|
||||
|
||||
interface MarkdownPageProps {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { Academia, Discord, Github } from '@icons-pack/react-simple-icons';
|
||||
import AppLogo from '@sd/assets/images/logo.png';
|
||||
import { Button, Dropdown } from '@sd/ui';
|
||||
import { Academia, Discord, Github } from '@icons-pack/react-simple-icons';
|
||||
import clsx from 'clsx';
|
||||
import { Book, Chat, DotsThreeVertical, MapPin, User } from 'phosphor-react';
|
||||
import { PropsWithChildren, useEffect, useState } from 'react';
|
||||
import * as router from 'vite-plugin-ssr/client/router';
|
||||
|
||||
import { Button, Dropdown } from '@sd/ui';
|
||||
import { positions } from '../pages/careers.page';
|
||||
import { getWindow } from '../utils';
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { PostOrPage, Tag } from '@tryghost/content-api';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import { BlogTag } from '../../components/BlogTag';
|
||||
import { getWindow } from '../../utils';
|
||||
import { blogEnabled } from './blog';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { PageContextBuiltIn } from 'vite-plugin-ssr';
|
||||
|
||||
import { getPost } from './blog';
|
||||
|
||||
export async function onBeforeRender(pageContext: PageContextBuiltIn) {
|
||||
|
|
|
@ -3,7 +3,6 @@ import Prism from 'prismjs';
|
|||
import 'prismjs/components/prism-rust';
|
||||
import { useEffect } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import '../../atom-one.css';
|
||||
import { BlogTag } from '../../components/BlogTag';
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { Button } from '@sd/ui';
|
||||
import {
|
||||
Clock,
|
||||
CurrencyDollar,
|
||||
|
@ -12,6 +11,7 @@ import {
|
|||
} from 'phosphor-react';
|
||||
import { useRef } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { Button } from '@sd/ui';
|
||||
|
||||
interface PositionPosting {
|
||||
name: string;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Component } from 'react';
|
||||
|
||||
import { parseMarkdown } from '../../utils/markdownParse';
|
||||
|
||||
export interface Doc {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { PageContextBuiltIn } from 'vite-plugin-ssr';
|
||||
|
||||
import { getDoc } from './api';
|
||||
import config from './docs';
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Github } from '@icons-pack/react-simple-icons';
|
|||
import { CaretRight } from 'phosphor-react';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import '../../atom-one.css';
|
||||
import DocsLayout from '../../components/DocsLayout';
|
||||
import Markdown from '../../components/Markdown';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Circle, Cube, Sparkle, Star } from 'phosphor-react';
|
||||
|
||||
import { DocsConfig } from './api';
|
||||
|
||||
export function loadDocs() {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import DocsLayout from '../../components/DocsLayout';
|
||||
import Markdown from '../../components/Markdown';
|
||||
import { DocsNavigation } from './api';
|
||||
|
|
|
@ -2,7 +2,6 @@ import { ReactComponent as Info } from '@sd/assets/svgs/info.svg';
|
|||
import clsx from 'clsx';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import AppEmbed, { AppEmbedPlaceholder } from '../components/AppEmbed';
|
||||
import { Bubbles } from '../components/Bubbles';
|
||||
// import { Bubbles } from '../components/Bubbles';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { ReactComponent as ArrowRight } from '@sd/assets/svgs/arrow-right.svg';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import Markdown from '../components/Markdown';
|
||||
import { TeamMember, TeamMemberProps } from '../components/TeamMember';
|
||||
import { resolveFilesGlob } from '../utils';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { hydrateRoot } from 'react-dom/client';
|
||||
import type { PageContextBuiltInClient } from 'vite-plugin-ssr/client';
|
||||
|
||||
import App from '../App';
|
||||
import type { PageContext } from './types';
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ import ReactDOMServer from 'react-dom/server';
|
|||
import { Helmet } from 'react-helmet';
|
||||
import { dangerouslySkipEscape, escapeInject } from 'vite-plugin-ssr';
|
||||
import type { PageContextBuiltIn } from 'vite-plugin-ssr';
|
||||
|
||||
import App from '../App';
|
||||
import type { PageContext } from './types';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Button } from '@sd/ui';
|
||||
import { SmileyXEyes } from 'phosphor-react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import { Button } from '@sd/ui';
|
||||
import Markdown from '../components/Markdown';
|
||||
import { getWindow } from '../utils';
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// More infos: https://vite-plugin-ssr.com/pageContext-anywhere
|
||||
import { PropsWithChildren, ReactNode, createContext, useContext } from 'react';
|
||||
import { PageContextBuiltIn } from 'vite-plugin-ssr';
|
||||
|
||||
import type { PageContext } from './types';
|
||||
|
||||
export { PageContextProvider };
|
||||
|
|
|
@ -237,6 +237,6 @@ html {
|
|||
@apply bg-[#00000006] dark:bg-[#00000030] my-[10px] rounded-[6px];
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
@apply rounded-[6px] bg-app-selected
|
||||
@apply rounded-[6px] bg-app-selected;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
"extends": "../../packages/config/app.tsconfig.json",
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"include": ["src"],
|
||||
"ts-node": {
|
||||
"transpileOnly": true,
|
||||
"compilerOptions": {}
|
||||
|
|
|
@ -8,6 +8,8 @@ import ssr from 'vite-plugin-ssr/plugin';
|
|||
import svg from 'vite-plugin-svgr';
|
||||
|
||||
export default defineConfig({
|
||||
// prettier-ignore
|
||||
// Prettier reeeally wants to one-line this -- I AM PUTTING MY FOOT DOWN AND SAYING NO!
|
||||
plugins: [
|
||||
react(),
|
||||
ssr({ prerender: true }),
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"cli": {
|
||||
"version": ">= 0.56.0"
|
||||
},
|
||||
"build": {
|
||||
"development": {
|
||||
"distribution": "internal",
|
||||
"android": {
|
||||
"gradleCommand": ":app:assembleDebug"
|
||||
},
|
||||
"ios": {
|
||||
"buildConfiguration": "Debug"
|
||||
}
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal"
|
||||
},
|
||||
"production": {}
|
||||
},
|
||||
"submit": {
|
||||
"production": {}
|
||||
}
|
||||
"cli": {
|
||||
"version": ">= 0.56.0"
|
||||
},
|
||||
"build": {
|
||||
"development": {
|
||||
"distribution": "internal",
|
||||
"android": {
|
||||
"gradleCommand": ":app:assembleDebug"
|
||||
},
|
||||
"ios": {
|
||||
"buildConfiguration": "Debug"
|
||||
}
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal"
|
||||
},
|
||||
"production": {}
|
||||
},
|
||||
"submit": {
|
||||
"production": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { registerRootComponent } from 'expo';
|
||||
|
||||
import { AppWrapper } from './src/main';
|
||||
|
||||
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
||||
import { DefaultTheme, NavigationContainer, Theme } from '@react-navigation/native';
|
||||
import { loggerLink } from '@rspc/client';
|
||||
import * as SplashScreen from 'expo-splash-screen';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { useEffect } from 'react';
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
import { MenuProvider } from 'react-native-popup-menu';
|
||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||
import { useDeviceContext } from 'twrnc';
|
||||
import {
|
||||
LibraryContextProvider,
|
||||
getDebugState,
|
||||
|
@ -9,14 +16,6 @@ import {
|
|||
useCurrentLibrary,
|
||||
useInvalidateQuery
|
||||
} from '@sd/client';
|
||||
import * as SplashScreen from 'expo-splash-screen';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { useEffect } from 'react';
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
import { MenuProvider } from 'react-native-popup-menu';
|
||||
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
||||
import { useDeviceContext } from 'twrnc';
|
||||
|
||||
import { GlobalModals } from './containers/modal/GlobalModals';
|
||||
import { reactNativeLink } from './lib/rspcReactNativeTransport';
|
||||
import tw from './lib/tailwind';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { ExplorerItem } from '@sd/client';
|
||||
import { Cloud, Desktop, DeviceMobileCamera, Laptop, Lock } from 'phosphor-react-native';
|
||||
import { FlatList, Text, View } from 'react-native';
|
||||
import { ExplorerItem } from '@sd/client';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import FileItem from '../explorer/FileItem';
|
||||
|
||||
const placeholderFileItems: ExplorerItem[] = [
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { useNavigation } from '@react-navigation/native';
|
||||
import { ExplorerData, ExplorerItem } from '@sd/client';
|
||||
import { FlashList } from '@shopify/flash-list';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { Rows, SquaresFour } from 'phosphor-react-native';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Pressable, View } from 'react-native';
|
||||
import { ExplorerData, ExplorerItem } from '@sd/client';
|
||||
import Layout from '~/constants/Layout';
|
||||
import SortByMenu from '~/containers/menu/SortByMenu';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
@ -11,7 +11,6 @@ import { SharedScreenProps } from '~/navigation/SharedScreens';
|
|||
import { getExplorerStore } from '~/stores/explorerStore';
|
||||
import { useFileModalStore } from '~/stores/modalStore';
|
||||
import { isPath } from '~/types/helper';
|
||||
|
||||
import FileItem from './FileItem';
|
||||
import FileRow from './FileRow';
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { ExplorerItem, isVideoExt } from '@sd/client';
|
||||
import { Text, View } from 'react-native';
|
||||
import { ExplorerItem, isVideoExt } from '@sd/client';
|
||||
import Layout from '~/constants/Layout';
|
||||
import { getExplorerStore } from '~/stores/explorerStore';
|
||||
|
||||
import tw from '../../lib/tailwind';
|
||||
import FileThumb from './FileThumb';
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { ExplorerItem, isVideoExt } from '@sd/client';
|
||||
import React from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import { ExplorerItem, isVideoExt } from '@sd/client';
|
||||
import tw from '~/lib/tailwind';
|
||||
import { getExplorerStore } from '~/stores/explorerStore';
|
||||
|
||||
import FileThumb from './FileThumb';
|
||||
|
||||
type FileRowProps = {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { ExplorerItem } from '@sd/client';
|
||||
import { Image, View } from 'react-native';
|
||||
import { DocumentDirectoryPath } from 'react-native-fs';
|
||||
import { ExplorerItem } from '@sd/client';
|
||||
import { useExplorerStore } from '~/stores/explorerStore';
|
||||
import { isObject, isPath } from '~/types/helper';
|
||||
|
||||
// import icons from '../../assets/icons/file';
|
||||
import tw from '../../lib/tailwind';
|
||||
import FolderIcon from '../icons/FolderIcon';
|
||||
|
|
|
@ -3,7 +3,6 @@ import { CaretRight } from 'phosphor-react-native';
|
|||
import { PropsWithChildren, useReducer } from 'react';
|
||||
import { Pressable, StyleProp, Text, TextStyle, View, ViewStyle } from 'react-native';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import { AnimatedHeight } from '../animation/layout';
|
||||
|
||||
type CollapsibleViewProps = PropsWithChildren<{
|
||||
|
|
|
@ -2,7 +2,6 @@ import { MotiView } from 'moti';
|
|||
import { ReactNode, useState } from 'react';
|
||||
import { KeyboardAvoidingView, Modal, Platform, Pressable, Text, View } from 'react-native';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import { PulseAnimation } from '../animation/lottie';
|
||||
import { Button } from '../primitive/Button';
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { Statistics, useLibraryQuery } from '@sd/client';
|
||||
import byteSize from 'byte-size';
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { ScrollView, Text, View } from 'react-native';
|
||||
import RNFS from 'react-native-fs';
|
||||
|
||||
import { Statistics, useLibraryQuery } from '@sd/client';
|
||||
import useCounter from '../hooks/useCounter';
|
||||
import tw from '../lib/tailwind';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { queryClient, useBridgeMutation, useCurrentLibrary } from '@sd/client';
|
||||
import { useState } from 'react';
|
||||
import { queryClient, useBridgeMutation, useCurrentLibrary } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
import { Input } from '~/components/primitive/Input';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { queryClient, useBridgeMutation } from '@sd/client';
|
||||
import { useState } from 'react';
|
||||
import { queryClient, useBridgeMutation } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useLibraryMutation } from '@sd/client';
|
||||
import { useState } from 'react';
|
||||
import { useLibraryMutation } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { queryClient, useLibraryMutation } from '@sd/client';
|
||||
import React, { useState } from 'react';
|
||||
import { Pressable, View } from 'react-native';
|
||||
import ColorPicker from 'react-native-wheel-color-picker';
|
||||
import { queryClient, useLibraryMutation } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
import { Input } from '~/components/primitive/Input';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useLibraryMutation } from '@sd/client';
|
||||
import { useState } from 'react';
|
||||
import { useLibraryMutation } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Tag, queryClient, useLibraryMutation } from '@sd/client';
|
||||
import React, { useState } from 'react';
|
||||
import { Pressable, Text, View } from 'react-native';
|
||||
import ColorPicker from 'react-native-wheel-color-picker';
|
||||
import { Tag, queryClient, useLibraryMutation } from '@sd/client';
|
||||
import Dialog from '~/components/layout/Dialog';
|
||||
import { Input } from '~/components/primitive/Input';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
|
|
@ -5,7 +5,6 @@ import { Image, Platform, Pressable, Text, View } from 'react-native';
|
|||
import Layout from '~/constants/Layout';
|
||||
import tw from '~/lib/tailwind';
|
||||
import { getStackNameFromState } from '~/utils/nav';
|
||||
|
||||
import Divider from '../../components/primitive/Divider';
|
||||
import DrawerLibraryManager from './DrawerLibraryManager';
|
||||
import DrawerLocations from './DrawerLocations';
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useEffect, useState } from 'react';
|
|||
import { Pressable, Text, View } from 'react-native';
|
||||
import { useCurrentLibrary } from '~/../../../packages/client/src';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import { AnimatedHeight } from '../../components/animation/layout';
|
||||
import Divider from '../../components/primitive/Divider';
|
||||
import CreateLibraryDialog from '../dialog/CreateLibraryDialog';
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
||||
import { DrawerNavigationHelpers } from '@react-navigation/drawer/lib/typescript/src/types';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import { useRef } from 'react';
|
||||
import { Pressable, Text, View } from 'react-native';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import FolderIcon from '../../components/icons/FolderIcon';
|
||||
import CollapsibleView from '../../components/layout/CollapsibleView';
|
||||
import ImportModal from '../modal/ImportModal';
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { DrawerNavigationHelpers } from '@react-navigation/drawer/lib/typescript/src/types';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import { ColorValue, Pressable, Text, View } from 'react-native';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import CollapsibleView from '../../components/layout/CollapsibleView';
|
||||
import CreateTagDialog from '../dialog/tag/CreateTagDialog';
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ import dayjs from 'dayjs';
|
|||
import { CaretLeft } from 'phosphor-react-native';
|
||||
import { useRef } from 'react';
|
||||
import { Button, Pressable, Text, View } from 'react-native';
|
||||
|
||||
import { default as FileIcon, default as FileThumb } from '../../components/explorer/FileThumb';
|
||||
import { Modal } from '../../components/layout/Modal';
|
||||
import Divider from '../../components/primitive/Divider';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
||||
import { useLibraryMutation } from '@sd/client';
|
||||
import * as ML from 'expo-media-library';
|
||||
import { forwardRef, useCallback } from 'react';
|
||||
import { Alert, Platform, Text, View } from 'react-native';
|
||||
import DocumentPicker from 'react-native-document-picker';
|
||||
import { useLibraryMutation } from '@sd/client';
|
||||
// import RFS from 'react-native-fs';
|
||||
import { Modal } from '~/components/layout/Modal';
|
||||
import { Button } from '~/components/primitive/Button';
|
||||
|
|
|
@ -3,7 +3,6 @@ import { CompositeScreenProps, NavigatorScreenParams } from '@react-navigation/n
|
|||
import { StackScreenProps } from '@react-navigation/stack';
|
||||
import DrawerContent from '~/containers/drawer/DrawerContent';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import type { RootStackParamList } from '.';
|
||||
import type { TabParamList } from './TabNavigator';
|
||||
import TabNavigator from './TabNavigator';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { LinkingOptions } from '@react-navigation/native';
|
||||
import * as Linking from 'expo-linking';
|
||||
|
||||
import { RootStackParamList } from '.';
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@ import { CompositeScreenProps, NavigatorScreenParams } from '@react-navigation/n
|
|||
import { CirclesFour, Planet, ShareNetwork } from 'phosphor-react-native';
|
||||
import React from 'react';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import type { HomeDrawerScreenProps } from './DrawerNavigator';
|
||||
import NodesStack, { NodesStackParamList } from './tabs/NodesStack';
|
||||
import OverviewStack, { OverviewStackParamList } from './tabs/OverviewStack';
|
||||
|
|
|
@ -3,7 +3,6 @@ import { StackScreenProps, createStackNavigator } from '@react-navigation/stack'
|
|||
import tw from '~/lib/tailwind';
|
||||
import NotFoundScreen from '~/screens/NotFound';
|
||||
import SearchScreen from '~/screens/Search';
|
||||
|
||||
import type { DrawerNavParamList } from './DrawerNavigator';
|
||||
import DrawerNavigator from './DrawerNavigator';
|
||||
import SettingsNavigator, { SettingsStackParamList } from './SettingsNavigator';
|
||||
|
|
|
@ -3,7 +3,6 @@ import { StackScreenProps, createStackNavigator } from '@react-navigation/stack'
|
|||
import Header from '~/components/header/Header';
|
||||
import tw from '~/lib/tailwind';
|
||||
import NodesScreen from '~/screens/Nodes';
|
||||
|
||||
import { SharedScreens, SharedScreensParamList } from '../SharedScreens';
|
||||
import { TabScreenProps } from '../TabNavigator';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { CompositeScreenProps } from '@react-navigation/native';
|
||||
import { StackScreenProps, TransitionPresets, createStackNavigator } from '@react-navigation/stack';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import Header from '../../components/header/Header';
|
||||
import OverviewScreen from '../../screens/Overview';
|
||||
import { SharedScreens, SharedScreensParamList } from '../SharedScreens';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { CompositeScreenProps } from '@react-navigation/native';
|
||||
import { StackScreenProps, TransitionPresets, createStackNavigator } from '@react-navigation/stack';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
||||
import Header from '../../components/header/Header';
|
||||
import SpacesScreen from '../../screens/Spaces';
|
||||
import { SharedScreens, SharedScreensParamList } from '../SharedScreens';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useLibraryQuery } from '@sd/client';
|
||||
import { useEffect } from 'react';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import Explorer from '~/components/explorer/Explorer';
|
||||
import { SharedScreenProps } from '~/navigation/SharedScreens';
|
||||
import { getExplorerStore } from '~/stores/explorerStore';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { useLibraryQuery } from '@sd/client';
|
||||
import { Text, View } from 'react-native';
|
||||
import { useLibraryQuery } from '@sd/client';
|
||||
import Explorer from '~/components/explorer/Explorer';
|
||||
import tw from '~/lib/tailwind';
|
||||
import { SharedScreenProps } from '~/navigation/SharedScreens';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { useBridgeQuery } from '@sd/client';
|
||||
import React from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
import { useBridgeQuery } from '@sd/client';
|
||||
import Card from '~/components/layout/Card';
|
||||
import Divider from '~/components/primitive/Divider';
|
||||
import { Input } from '~/components/primitive/Input';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { LibraryConfigWrapped, useBridgeQuery } from '@sd/client';
|
||||
import { CaretRight, Pen, Trash } from 'phosphor-react-native';
|
||||
import React from 'react';
|
||||
import { Animated, FlatList, Text, View } from 'react-native';
|
||||
import { Swipeable } from 'react-native-gesture-handler';
|
||||
import { LibraryConfigWrapped, useBridgeQuery } from '@sd/client';
|
||||
import { AnimatedButton } from '~/components/primitive/Button';
|
||||
import DeleteLibraryDialog from '~/containers/dialog/DeleteLibraryDialog';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { useBridgeMutation, useCurrentLibrary } from '@sd/client';
|
||||
import { Trash } from 'phosphor-react-native';
|
||||
import React from 'react';
|
||||
import { Controller, useForm } from 'react-hook-form';
|
||||
import { Alert, Text, View } from 'react-native';
|
||||
import { useBridgeMutation, useCurrentLibrary } from '@sd/client';
|
||||
import { Button } from '~/components/primitive/Button';
|
||||
import { Input } from '~/components/primitive/Input';
|
||||
import { Switch } from '~/components/primitive/Switch';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Location, Node, useLibraryMutation, useLibraryQuery } from '@sd/client';
|
||||
import { CaretRight, Repeat, Trash } from 'phosphor-react-native';
|
||||
import { Animated, FlatList, Pressable, Text, View } from 'react-native';
|
||||
import { Swipeable } from 'react-native-gesture-handler';
|
||||
import { Location, Node, useLibraryMutation, useLibraryQuery } from '@sd/client';
|
||||
import FolderIcon from '~/components/icons/FolderIcon';
|
||||
import DeleteLocationDialog from '~/containers/dialog/DeleteLocationDialog';
|
||||
import tw from '~/lib/tailwind';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Tag, useLibraryQuery } from '@sd/client';
|
||||
import { CaretRight, Pen, Trash } from 'phosphor-react-native';
|
||||
import { Animated, FlatList, Text, View } from 'react-native';
|
||||
import { Swipeable } from 'react-native-gesture-handler';
|
||||
import { Tag, useLibraryQuery } from '@sd/client';
|
||||
import { AnimatedButton } from '~/components/primitive/Button';
|
||||
import DeleteTagDialog from '~/containers/dialog/tag/DeleteTagDialog';
|
||||
import UpdateTagDialog from '~/containers/dialog/tag/UpdateTagDialog';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { resetStore } from '@sd/client';
|
||||
import { proxy, useSnapshot } from 'valtio';
|
||||
import { resetStore } from '@sd/client';
|
||||
|
||||
// TODO: Add "media"
|
||||
export type ExplorerLayoutMode = 'list' | 'grid';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
||||
import { ExplorerItem } from '@sd/client';
|
||||
import { createRef } from 'react';
|
||||
import { proxy, ref, useSnapshot } from 'valtio';
|
||||
import { ExplorerItem } from '@sd/client';
|
||||
|
||||
export const fileModalStore = proxy({
|
||||
fileRef: ref(createRef<BottomSheetModal>()),
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
"module": "ESNext",
|
||||
"noEmit": true,
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"./src/*"
|
||||
]
|
||||
"~/*": ["./src/*"]
|
||||
},
|
||||
"jsx": "react-native"
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { createWSClient, loggerLink, wsLink } from '@rspc/client';
|
||||
import { useEffect } from 'react';
|
||||
import { getDebugState, hooks, queryClient } from '@sd/client';
|
||||
import SpacedriveInterface, { Platform, PlatformProvider } from '@sd/interface';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
globalThis.isDev = import.meta.env.DEV;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Spacedrive</title>
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
</head>
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
// WARNING: BE CAREFUL SAVING THIS FILE WITH A FORMATTER ENABLED. The import order is important and goes against prettier's recommendations.
|
||||
|
||||
import React, { Suspense } from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
|
||||
import './patches'; // THIS MUST GO BEFORE importing the App
|
||||
import App from './App';
|
||||
|
||||
import '@sd/ui/style';
|
||||
// THIS MUST GO BEFORE importing the App
|
||||
import App from './App';
|
||||
import './patches';
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
|
||||
root.render(
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
"rootDir": "src",
|
||||
"declarationDir": "dist"
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"include": ["src"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../packages/interface"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import { relativeAliasResolver } from '@sd/config/vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
// import { visualizer } from 'rollup-plugin-visualizer';
|
||||
import { defineConfig } from 'vite';
|
||||
import { createHtmlPlugin } from 'vite-plugin-html';
|
||||
import svg from 'vite-plugin-svgr';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import { relativeAliasResolver } from "@sd/config/vite"
|
||||
|
||||
import { name, version } from './package.json';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
|
@ -19,7 +18,7 @@ export default defineConfig({
|
|||
svg({ svgrOptions: { icon: true } }),
|
||||
createHtmlPlugin({
|
||||
minify: true
|
||||
}),
|
||||
})
|
||||
// visualizer({
|
||||
// gzipSize: true,
|
||||
// brotliSize: true
|
||||
|
|
|
@ -15,4 +15,4 @@ cd api/
|
|||
cargo prisma generate
|
||||
cargo prisma db push
|
||||
cargo run
|
||||
```
|
||||
```
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<title>Solid App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<title>Solid App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
|
||||
<script src="/src/index.tsx" type="module"></script>
|
||||
</body>
|
||||
<script src="/src/index.tsx" type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
{
|
||||
"name": "example-2",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@rspc/client": "^0.0.0-main-7c0a67c1",
|
||||
"@rspc/react": "^0.0.0-main-7c0a67c1",
|
||||
"@tanstack/react-query": "^4.10.1",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"typescript": "^4.8.2",
|
||||
"vite": "^3.0.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^1.2.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"solid-js": "^1.5.1",
|
||||
"tailwindcss": "^3.1.8"
|
||||
}
|
||||
"name": "example-2",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@rspc/client": "^0.0.0-main-7c0a67c1",
|
||||
"@rspc/react": "^0.0.0-main-7c0a67c1",
|
||||
"@tanstack/react-query": "^4.10.1",
|
||||
"@vitejs/plugin-react": "^2.1.0",
|
||||
"typescript": "^4.8.2",
|
||||
"vite": "^3.0.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^1.2.1",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"solid-js": "^1.5.1",
|
||||
"tailwindcss": "^3.1.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import clsx from 'clsx';
|
||||
import { Suspense, useState } from 'react';
|
||||
|
||||
import { tests } from './test';
|
||||
import { CRDTOperationType, rspc } from './utils/rspc';
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
/* @refresh reload */
|
||||
import { Suspense } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
|
||||
import { App } from './App';
|
||||
import './index.css';
|
||||
import { queryClient, rspc, rspcClient } from './utils/rspc';
|
||||
|
||||
createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<rspc.Provider client={rspcClient} queryClient={queryClient}>
|
||||
<Suspense fallback={null}>
|
||||
<App />
|
||||
</Suspense>
|
||||
</rspc.Provider>
|
||||
<rspc.Provider client={rspcClient} queryClient={queryClient}>
|
||||
<Suspense fallback={null}>
|
||||
<App />
|
||||
</Suspense>
|
||||
</rspc.Provider>
|
||||
);
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
import { queryClient, rspcClient } from './utils/rspc';
|
||||
|
||||
function test(fn: () => Promise<void>) {
|
||||
return async () => {
|
||||
await fn();
|
||||
queryClient.invalidateQueries();
|
||||
};
|
||||
return async () => {
|
||||
await fn();
|
||||
queryClient.invalidateQueries();
|
||||
};
|
||||
}
|
||||
|
||||
const wait = (ms: number) => new Promise((res) => setTimeout(res, ms));
|
||||
|
||||
export const tests = {
|
||||
three: {
|
||||
name: 'Three',
|
||||
run: test(async () => {
|
||||
const [db1, db2, db3] = await Promise.all([
|
||||
rspcClient.mutation(['createDatabase', ' ']),
|
||||
rspcClient.mutation(['createDatabase', ' ']),
|
||||
rspcClient.mutation(['createDatabase', ' '])
|
||||
]);
|
||||
three: {
|
||||
name: 'Three',
|
||||
run: test(async () => {
|
||||
const [db1, db2, db3] = await Promise.all([
|
||||
rspcClient.mutation(['createDatabase', ' ']),
|
||||
rspcClient.mutation(['createDatabase', ' ']),
|
||||
rspcClient.mutation(['createDatabase', ' '])
|
||||
]);
|
||||
|
||||
const dbs = await rspcClient.query(['dbs', 'cringe']);
|
||||
const dbs = await rspcClient.query(['dbs', 'cringe']);
|
||||
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['file_path.create', db]);
|
||||
}
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['file_path.create', db]);
|
||||
}
|
||||
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['pullOperations', db]);
|
||||
}
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['pullOperations', db]);
|
||||
}
|
||||
|
||||
await rspcClient.mutation(['file_path.create', dbs[0]]);
|
||||
await rspcClient.mutation(['file_path.create', dbs[0]]);
|
||||
await rspcClient.mutation(['file_path.create', dbs[0]]);
|
||||
await rspcClient.mutation(['file_path.create', dbs[0]]);
|
||||
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['pullOperations', db]);
|
||||
}
|
||||
for (const db of dbs) {
|
||||
await rspcClient.mutation(['pullOperations', db]);
|
||||
}
|
||||
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
})
|
||||
}
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
await rspcClient.mutation(['pullOperations', dbs[1]]);
|
||||
})
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,43 +1,80 @@
|
|||
// This file was generated by [rspc](https://github.com/oscartbeaumont/rspc). Do not edit this file manually.
|
||||
|
||||
export type Procedures = {
|
||||
queries:
|
||||
{ key: "db.tags", input: string, result: Record<string, Tag> } |
|
||||
{ key: "dbs", input: string, result: Array<string> } |
|
||||
{ key: "file_path.list", input: string, result: Array<FilePath> } |
|
||||
{ key: "message.list", input: string, result: Array<CRDTOperation> } |
|
||||
{ key: "operations", input: string, result: Array<CRDTOperation> },
|
||||
mutations:
|
||||
{ key: "createDatabase", input: string, result: string } |
|
||||
{ key: "file_path.create", input: string, result: FilePath } |
|
||||
{ key: "pullOperations", input: string, result: null } |
|
||||
{ key: "removeDatabases", input: string, result: null } |
|
||||
{ key: "testCreate", input: string, result: null },
|
||||
subscriptions: never
|
||||
queries:
|
||||
| { key: 'db.tags'; input: string; result: Record<string, Tag> }
|
||||
| { key: 'dbs'; input: string; result: Array<string> }
|
||||
| { key: 'file_path.list'; input: string; result: Array<FilePath> }
|
||||
| { key: 'message.list'; input: string; result: Array<CRDTOperation> }
|
||||
| { key: 'operations'; input: string; result: Array<CRDTOperation> };
|
||||
mutations:
|
||||
| { key: 'createDatabase'; input: string; result: string }
|
||||
| { key: 'file_path.create'; input: string; result: FilePath }
|
||||
| { key: 'pullOperations'; input: string; result: null }
|
||||
| { key: 'removeDatabases'; input: string; result: null }
|
||||
| { key: 'testCreate'; input: string; result: null };
|
||||
subscriptions: never;
|
||||
};
|
||||
|
||||
export interface CRDTOperation { node: string, timestamp: bigint, id: string, typ: CRDTOperationType }
|
||||
export interface CRDTOperation {
|
||||
node: string;
|
||||
timestamp: bigint;
|
||||
id: string;
|
||||
typ: CRDTOperationType;
|
||||
}
|
||||
|
||||
export type CRDTOperationType = SharedOperation | RelationOperation | OwnedOperation
|
||||
export type CRDTOperationType = SharedOperation | RelationOperation | OwnedOperation;
|
||||
|
||||
export interface Color { red: number, green: number, blue: number }
|
||||
export interface Color {
|
||||
red: number;
|
||||
green: number;
|
||||
blue: number;
|
||||
}
|
||||
|
||||
export interface FilePath { id: string, path: string, file: string | null }
|
||||
export interface FilePath {
|
||||
id: string;
|
||||
path: string;
|
||||
file: string | null;
|
||||
}
|
||||
|
||||
export interface OwnedOperation { model: string, items: Array<OwnedOperationItem> }
|
||||
export interface OwnedOperation {
|
||||
model: string;
|
||||
items: Array<OwnedOperationItem>;
|
||||
}
|
||||
|
||||
export type OwnedOperationData = { Create: Record<string, any> } | { Update: Record<string, any> } | "Delete"
|
||||
export type OwnedOperationData =
|
||||
| { Create: Record<string, any> }
|
||||
| { Update: Record<string, any> }
|
||||
| 'Delete';
|
||||
|
||||
export interface OwnedOperationItem { id: any, data: OwnedOperationData }
|
||||
export interface OwnedOperationItem {
|
||||
id: any;
|
||||
data: OwnedOperationData;
|
||||
}
|
||||
|
||||
export interface RelationOperation { relation_item: string, relation_group: string, relation: string, data: RelationOperationData }
|
||||
export interface RelationOperation {
|
||||
relation_item: string;
|
||||
relation_group: string;
|
||||
relation: string;
|
||||
data: RelationOperationData;
|
||||
}
|
||||
|
||||
export type RelationOperationData = "Create" | { Update: { field: string, value: any } } | "Delete"
|
||||
export type RelationOperationData = 'Create' | { Update: { field: string; value: any } } | 'Delete';
|
||||
|
||||
export interface SharedOperation { record_id: string, model: string, data: SharedOperationData }
|
||||
export interface SharedOperation {
|
||||
record_id: string;
|
||||
model: string;
|
||||
data: SharedOperationData;
|
||||
}
|
||||
|
||||
export type SharedOperationCreateData = { Unique: Record<string, any> } | "Atomic"
|
||||
export type SharedOperationCreateData = { Unique: Record<string, any> } | 'Atomic';
|
||||
|
||||
export type SharedOperationData = { Create: SharedOperationCreateData } | { Update: { field: string, value: any } } | "Delete"
|
||||
export type SharedOperationData =
|
||||
| { Create: SharedOperationCreateData }
|
||||
| { Update: { field: string; value: any } }
|
||||
| 'Delete';
|
||||
|
||||
export interface Tag { color: Color, name: string }
|
||||
export interface Tag {
|
||||
color: Color;
|
||||
name: string;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { createClient, httpLink } from '@rspc/client';
|
||||
import { createReactHooks } from '@rspc/react';
|
||||
import { QueryClient } from '@tanstack/react-query';
|
||||
|
||||
import type { Procedures } from './bindings';
|
||||
|
||||
export * from './bindings';
|
||||
|
@ -11,18 +10,18 @@ export * from './bindings';
|
|||
const rspc = createReactHooks<Procedures>();
|
||||
|
||||
const rspcClient = rspc.createClient({
|
||||
links: [httpLink({ url: 'http://localhost:9000/rspc' })]
|
||||
links: [httpLink({ url: 'http://localhost:9000/rspc' })]
|
||||
});
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
suspense: true
|
||||
},
|
||||
mutations: {
|
||||
onSuccess: () => queryClient.invalidateQueries()
|
||||
}
|
||||
}
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
suspense: true
|
||||
},
|
||||
mutations: {
|
||||
onSuccess: () => queryClient.invalidateQueries()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export { rspc, rspcClient, queryClient };
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./index.html",
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
|
||||
theme: {
|
||||
extend: {}
|
||||
},
|
||||
plugins: []
|
||||
};
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react-jsx",
|
||||
"types": [
|
||||
"vite/client"
|
||||
],
|
||||
"noEmit": true,
|
||||
"isolatedModules": true
|
||||
}
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react-jsx",
|
||||
"types": ["vite/client"],
|
||||
"noEmit": true,
|
||||
"isolatedModules": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
|
|
|
@ -17,4 +17,4 @@ dictionaries:
|
|||
ignorePaths:
|
||||
- 'node_modules'
|
||||
- '.cspell'
|
||||
- 'target'
|
||||
- 'target'
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Privacy Policy
|
||||
|
||||
*This page has yet to be written out in full. Please check back later!*
|
||||
# Privacy Policy
|
||||
|
||||
_This page has yet to be written out in full. Please check back later!_
|
||||
|
|
|
@ -41,6 +41,7 @@ and that node can inform all other nodes about the correct state of the paths.
|
|||
Used for Locations, Paths, and Volumes.
|
||||
|
||||
`@owned(owner: String, id?: String)`
|
||||
|
||||
- `owner` - Field that identifies the owner of this model.
|
||||
If a scalar, will directly use that value in sync operations.
|
||||
If a relation, the Sync ID of the related model will be resolved for sync operations.
|
||||
|
@ -54,15 +55,16 @@ Updates are applied per-field using a last-write-wins strategy.
|
|||
Used for Objects, Tags, Spaces, and Jobs.
|
||||
|
||||
`@shared(create: SharedCreateType, id?: String)`
|
||||
|
||||
- `id` - Scalar field to override the default Sync ID.
|
||||
- `create` - How the model should be created.
|
||||
- `Unique` (default): Model can be created with many required arguemnts,
|
||||
but ID provided _must_ be unique across all nodes.
|
||||
Useful for Tags since their IDs are non-deterministic.
|
||||
but ID provided _must_ be unique across all nodes.
|
||||
Useful for Tags since their IDs are non-deterministic.
|
||||
- `Atomic`: Require the model to have no required arguments apart from ID and apply all create arguments as atomic updates.
|
||||
Necessary for models with the same ID that can be created on multiple nodes.
|
||||
Useful for Objects since their ID is dependent on their content,
|
||||
and could be the same across nodes.
|
||||
Necessary for models with the same ID that can be created on multiple nodes.
|
||||
Useful for Objects since their ID is dependent on their content,
|
||||
and could be the same across nodes.
|
||||
|
||||
### Relation Records
|
||||
|
||||
|
@ -72,12 +74,12 @@ Sync ID is the combination of `item` and `group` Sync IDs.
|
|||
Used for TagOnFile and FileInSpace.
|
||||
|
||||
`@relation(item: String, group: String)`
|
||||
|
||||
- `item` - Field that identifies the item that the relation is connecting.
|
||||
Similar to the `owner` argument of `@owned`.
|
||||
- `group` - Field that identifies the group that the item should be connected to.
|
||||
Similar to the `owner` argument of `@owned`.
|
||||
|
||||
|
||||
## Other Prisma Attributes
|
||||
|
||||
`@node`
|
||||
|
@ -85,4 +87,4 @@ Used for TagOnFile and FileInSpace.
|
|||
Indicates that a relation field should be set to the current node.
|
||||
This could be done manually,
|
||||
but `@node` allows `node_id` fields to be resolved from the `node_id` field of a `CRDTOperation`,
|
||||
saving on bandwidth
|
||||
saving on bandwidth
|
||||
|
|
12
lefthook.yml
12
lefthook.yml
|
@ -3,12 +3,8 @@
|
|||
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md #
|
||||
########################################################################################################################
|
||||
|
||||
pre-push:
|
||||
parallel: true
|
||||
pre-commit:
|
||||
commands:
|
||||
lint:
|
||||
glob: '*.{ts,tsx}'
|
||||
run: pnpm eslint {staged_files}
|
||||
markdown-link-check:
|
||||
glob: '*.md'
|
||||
run: pnpm markdown-link-check {staged_files}
|
||||
# automatically format files, ✨magically✨
|
||||
lint-staged:
|
||||
run: pnpm lint-staged
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "lefthook install",
|
||||
"prep": "pnpm gen:prisma && cargo test -p sd-core api::tests::test_and_export_rspc_bindings -- --exact",
|
||||
"build": "turbo run build",
|
||||
"landing-web": "turbo run dev --parallel --filter=@sd/landing --filter=@sd/web",
|
||||
"gen:migrations": "cd core && cargo prisma migrate dev",
|
||||
"gen:prisma": "cd core && cargo prisma generate",
|
||||
"format": "prettier --config .prettierrc.js --write \"**/*.{ts,tsx,html,scss,json,yml,md}\"",
|
||||
"format": "prettier --write .",
|
||||
"desktop": "pnpm --filter @sd/desktop --",
|
||||
"web": "pnpm --filter @sd/web -- ",
|
||||
"mobile": "pnpm --filter @sd/mobile --",
|
||||
|
@ -33,6 +34,7 @@
|
|||
"@evilmartians/lefthook": "^1.1.1",
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
|
||||
"cspell": "^6.12.0",
|
||||
"lint-staged": "^13.1.0",
|
||||
"markdown-link-check": "^3.10.3",
|
||||
"prettier": "^2.7.1",
|
||||
"turbo": "^1.5.5",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,194 +2,576 @@
|
|||
// This file was generated by [rspc](https://github.com/oscartbeaumont/rspc). Do not edit this file manually.
|
||||
|
||||
export type Procedures = {
|
||||
queries:
|
||||
{ key: "buildInfo", input: never, result: BuildInfo } |
|
||||
{ key: "files.get", input: LibraryArgs<GetArgs>, result: { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string, file_paths: Array<FilePath>, media_data: MediaData | null } | null } |
|
||||
{ key: "jobs.getHistory", input: LibraryArgs<null>, result: Array<JobReport> } |
|
||||
{ key: "jobs.getRunning", input: LibraryArgs<null>, result: Array<JobReport> } |
|
||||
{ key: "jobs.isRunning", input: LibraryArgs<null>, result: boolean } |
|
||||
{ key: "keys.getDefault", input: LibraryArgs<null>, result: string | null } |
|
||||
{ key: "keys.getKey", input: LibraryArgs<string>, result: string } |
|
||||
{ key: "keys.hasMasterPassword", input: LibraryArgs<null>, result: boolean } |
|
||||
{ key: "keys.isKeyManagerUnlocking", input: LibraryArgs<null>, result: boolean } |
|
||||
{ key: "keys.list", input: LibraryArgs<null>, result: Array<StoredKey> } |
|
||||
{ key: "keys.listMounted", input: LibraryArgs<null>, result: Array<string> } |
|
||||
{ key: "library.getStatistics", input: LibraryArgs<null>, result: Statistics } |
|
||||
{ key: "library.list", input: never, result: Array<LibraryConfigWrapped> } |
|
||||
{ key: "locations.getById", input: LibraryArgs<number>, result: Location | null } |
|
||||
{ key: "locations.getExplorerData", input: LibraryArgs<LocationExplorerArgs>, result: ExplorerData } |
|
||||
{ key: "locations.indexer_rules.get", input: LibraryArgs<number>, result: IndexerRule } |
|
||||
{ key: "locations.indexer_rules.list", input: LibraryArgs<null>, result: Array<IndexerRule> } |
|
||||
{ key: "locations.list", input: LibraryArgs<null>, result: Array<{ id: number, pub_id: Array<number>, node_id: number, name: string | null, local_path: string | null, total_capacity: number | null, available_capacity: number | null, filesystem: string | null, disk_type: number | null, is_removable: boolean | null, is_online: boolean, is_archived: boolean, date_created: string, node: Node }> } |
|
||||
{ key: "nodeState", input: never, result: NodeState } |
|
||||
{ key: "normi.composite", input: never, result: NormalisedCompositeId } |
|
||||
{ key: "normi.org", input: never, result: NormalisedOrganisation } |
|
||||
{ key: "normi.user", input: never, result: NormalisedUser } |
|
||||
{ key: "normi.userSync", input: never, result: NormalisedUser } |
|
||||
{ key: "normi.version", input: never, result: string } |
|
||||
{ key: "tags.get", input: LibraryArgs<number>, result: Tag | null } |
|
||||
{ key: "tags.getExplorerData", input: LibraryArgs<number>, result: ExplorerData } |
|
||||
{ key: "tags.getForObject", input: LibraryArgs<number>, result: Array<Tag> } |
|
||||
{ key: "tags.list", input: LibraryArgs<null>, result: Array<Tag> } |
|
||||
{ key: "volumes.list", input: never, result: Array<Volume> },
|
||||
mutations:
|
||||
{ key: "files.decryptFiles", input: LibraryArgs<FileDecryptorJobInit>, result: null } |
|
||||
{ key: "files.delete", input: LibraryArgs<number>, result: null } |
|
||||
{ key: "files.deleteFiles", input: LibraryArgs<FileDeleterJobInit>, result: null } |
|
||||
{ key: "files.encryptFiles", input: LibraryArgs<FileEncryptorJobInit>, result: null } |
|
||||
{ key: "files.eraseFiles", input: LibraryArgs<FileEraserJobInit>, result: null } |
|
||||
{ key: "files.setFavorite", input: LibraryArgs<SetFavoriteArgs>, result: null } |
|
||||
{ key: "files.setNote", input: LibraryArgs<SetNoteArgs>, result: null } |
|
||||
{ key: "jobs.clearAll", input: LibraryArgs<null>, result: null } |
|
||||
{ key: "jobs.generateThumbsForLocation", input: LibraryArgs<GenerateThumbsForLocationArgs>, result: null } |
|
||||
{ key: "jobs.identifyUniqueFiles", input: LibraryArgs<IdentifyUniqueFilesArgs>, result: null } |
|
||||
{ key: "jobs.objectValidator", input: LibraryArgs<ObjectValidatorArgs>, result: null } |
|
||||
{ key: "keys.add", input: LibraryArgs<KeyAddArgs>, result: null } |
|
||||
{ key: "keys.backupKeystore", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.changeMasterPassword", input: LibraryArgs<MasterPasswordChangeArgs>, result: null } |
|
||||
{ key: "keys.clearMasterPassword", input: LibraryArgs<null>, result: null } |
|
||||
{ key: "keys.deleteFromLibrary", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.mount", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.restoreKeystore", input: LibraryArgs<RestoreBackupArgs>, result: number } |
|
||||
{ key: "keys.setDefault", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.setMasterPassword", input: LibraryArgs<SetMasterPasswordArgs>, result: null } |
|
||||
{ key: "keys.syncKeyToLibrary", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.unmount", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "keys.unmountAll", input: LibraryArgs<null>, result: null } |
|
||||
{ key: "keys.updateAutomountStatus", input: LibraryArgs<AutomountUpdateArgs>, result: null } |
|
||||
{ key: "library.create", input: CreateLibraryArgs, result: LibraryConfigWrapped } |
|
||||
{ key: "library.delete", input: string, result: null } |
|
||||
{ key: "library.edit", input: EditLibraryArgs, result: null } |
|
||||
{ key: "locations.addLibrary", input: LibraryArgs<LocationCreateArgs>, result: null } |
|
||||
{ key: "locations.create", input: LibraryArgs<LocationCreateArgs>, result: null } |
|
||||
{ key: "locations.delete", input: LibraryArgs<number>, result: null } |
|
||||
{ key: "locations.fullRescan", input: LibraryArgs<number>, result: null } |
|
||||
{ key: "locations.indexer_rules.create", input: LibraryArgs<IndexerRuleCreateArgs>, result: IndexerRule } |
|
||||
{ key: "locations.indexer_rules.delete", input: LibraryArgs<number>, result: null } |
|
||||
{ key: "locations.quickRescan", input: LibraryArgs<null>, result: null } |
|
||||
{ key: "locations.relink", input: LibraryArgs<string>, result: null } |
|
||||
{ key: "locations.update", input: LibraryArgs<LocationUpdateArgs>, result: null } |
|
||||
{ key: "tags.assign", input: LibraryArgs<TagAssignArgs>, result: null } |
|
||||
{ key: "tags.create", input: LibraryArgs<TagCreateArgs>, result: Tag } |
|
||||
{ key: "tags.delete", input: LibraryArgs<number>, result: null } |
|
||||
{ key: "tags.update", input: LibraryArgs<TagUpdateArgs>, result: null },
|
||||
subscriptions:
|
||||
{ key: "invalidateQuery", input: never, result: InvalidateOperationEvent } |
|
||||
{ key: "jobs.newThumbnail", input: LibraryArgs<null>, result: string }
|
||||
queries:
|
||||
| { key: 'buildInfo'; input: never; result: BuildInfo }
|
||||
| {
|
||||
key: 'files.get';
|
||||
input: LibraryArgs<GetArgs>;
|
||||
result: {
|
||||
id: number;
|
||||
cas_id: string;
|
||||
integrity_checksum: string | null;
|
||||
name: string | null;
|
||||
extension: string | null;
|
||||
kind: number;
|
||||
size_in_bytes: string;
|
||||
key_id: number | null;
|
||||
hidden: boolean;
|
||||
favorite: boolean;
|
||||
important: boolean;
|
||||
has_thumbnail: boolean;
|
||||
has_thumbstrip: boolean;
|
||||
has_video_preview: boolean;
|
||||
ipfs_id: string | null;
|
||||
note: string | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
date_indexed: string;
|
||||
file_paths: Array<FilePath>;
|
||||
media_data: MediaData | null;
|
||||
} | null;
|
||||
}
|
||||
| { key: 'jobs.getHistory'; input: LibraryArgs<null>; result: Array<JobReport> }
|
||||
| { key: 'jobs.getRunning'; input: LibraryArgs<null>; result: Array<JobReport> }
|
||||
| { key: 'jobs.isRunning'; input: LibraryArgs<null>; result: boolean }
|
||||
| { key: 'keys.getDefault'; input: LibraryArgs<null>; result: string | null }
|
||||
| { key: 'keys.getKey'; input: LibraryArgs<string>; result: string }
|
||||
| { key: 'keys.hasMasterPassword'; input: LibraryArgs<null>; result: boolean }
|
||||
| { key: 'keys.isKeyManagerUnlocking'; input: LibraryArgs<null>; result: boolean }
|
||||
| { key: 'keys.list'; input: LibraryArgs<null>; result: Array<StoredKey> }
|
||||
| { key: 'keys.listMounted'; input: LibraryArgs<null>; result: Array<string> }
|
||||
| { key: 'library.getStatistics'; input: LibraryArgs<null>; result: Statistics }
|
||||
| { key: 'library.list'; input: never; result: Array<LibraryConfigWrapped> }
|
||||
| { key: 'locations.getById'; input: LibraryArgs<number>; result: Location | null }
|
||||
| {
|
||||
key: 'locations.getExplorerData';
|
||||
input: LibraryArgs<LocationExplorerArgs>;
|
||||
result: ExplorerData;
|
||||
}
|
||||
| { key: 'locations.indexer_rules.get'; input: LibraryArgs<number>; result: IndexerRule }
|
||||
| { key: 'locations.indexer_rules.list'; input: LibraryArgs<null>; result: Array<IndexerRule> }
|
||||
| {
|
||||
key: 'locations.list';
|
||||
input: LibraryArgs<null>;
|
||||
result: Array<{
|
||||
id: number;
|
||||
pub_id: Array<number>;
|
||||
node_id: number;
|
||||
name: string | null;
|
||||
local_path: string | null;
|
||||
total_capacity: number | null;
|
||||
available_capacity: number | null;
|
||||
filesystem: string | null;
|
||||
disk_type: number | null;
|
||||
is_removable: boolean | null;
|
||||
is_online: boolean;
|
||||
is_archived: boolean;
|
||||
date_created: string;
|
||||
node: Node;
|
||||
}>;
|
||||
}
|
||||
| { key: 'nodeState'; input: never; result: NodeState }
|
||||
| { key: 'normi.composite'; input: never; result: NormalisedCompositeId }
|
||||
| { key: 'normi.org'; input: never; result: NormalisedOrganisation }
|
||||
| { key: 'normi.user'; input: never; result: NormalisedUser }
|
||||
| { key: 'normi.userSync'; input: never; result: NormalisedUser }
|
||||
| { key: 'normi.version'; input: never; result: string }
|
||||
| { key: 'tags.get'; input: LibraryArgs<number>; result: Tag | null }
|
||||
| { key: 'tags.getExplorerData'; input: LibraryArgs<number>; result: ExplorerData }
|
||||
| { key: 'tags.getForObject'; input: LibraryArgs<number>; result: Array<Tag> }
|
||||
| { key: 'tags.list'; input: LibraryArgs<null>; result: Array<Tag> }
|
||||
| { key: 'volumes.list'; input: never; result: Array<Volume> };
|
||||
mutations:
|
||||
| { key: 'files.decryptFiles'; input: LibraryArgs<FileDecryptorJobInit>; result: null }
|
||||
| { key: 'files.delete'; input: LibraryArgs<number>; result: null }
|
||||
| { key: 'files.deleteFiles'; input: LibraryArgs<FileDeleterJobInit>; result: null }
|
||||
| { key: 'files.encryptFiles'; input: LibraryArgs<FileEncryptorJobInit>; result: null }
|
||||
| { key: 'files.eraseFiles'; input: LibraryArgs<FileEraserJobInit>; result: null }
|
||||
| { key: 'files.setFavorite'; input: LibraryArgs<SetFavoriteArgs>; result: null }
|
||||
| { key: 'files.setNote'; input: LibraryArgs<SetNoteArgs>; result: null }
|
||||
| { key: 'jobs.clearAll'; input: LibraryArgs<null>; result: null }
|
||||
| {
|
||||
key: 'jobs.generateThumbsForLocation';
|
||||
input: LibraryArgs<GenerateThumbsForLocationArgs>;
|
||||
result: null;
|
||||
}
|
||||
| { key: 'jobs.identifyUniqueFiles'; input: LibraryArgs<IdentifyUniqueFilesArgs>; result: null }
|
||||
| { key: 'jobs.objectValidator'; input: LibraryArgs<ObjectValidatorArgs>; result: null }
|
||||
| { key: 'keys.add'; input: LibraryArgs<KeyAddArgs>; result: null }
|
||||
| { key: 'keys.backupKeystore'; input: LibraryArgs<string>; result: null }
|
||||
| {
|
||||
key: 'keys.changeMasterPassword';
|
||||
input: LibraryArgs<MasterPasswordChangeArgs>;
|
||||
result: null;
|
||||
}
|
||||
| { key: 'keys.clearMasterPassword'; input: LibraryArgs<null>; result: null }
|
||||
| { key: 'keys.deleteFromLibrary'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'keys.mount'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'keys.restoreKeystore'; input: LibraryArgs<RestoreBackupArgs>; result: number }
|
||||
| { key: 'keys.setDefault'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'keys.setMasterPassword'; input: LibraryArgs<SetMasterPasswordArgs>; result: null }
|
||||
| { key: 'keys.syncKeyToLibrary'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'keys.unmount'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'keys.unmountAll'; input: LibraryArgs<null>; result: null }
|
||||
| { key: 'keys.updateAutomountStatus'; input: LibraryArgs<AutomountUpdateArgs>; result: null }
|
||||
| { key: 'library.create'; input: CreateLibraryArgs; result: LibraryConfigWrapped }
|
||||
| { key: 'library.delete'; input: string; result: null }
|
||||
| { key: 'library.edit'; input: EditLibraryArgs; result: null }
|
||||
| { key: 'locations.addLibrary'; input: LibraryArgs<LocationCreateArgs>; result: null }
|
||||
| { key: 'locations.create'; input: LibraryArgs<LocationCreateArgs>; result: null }
|
||||
| { key: 'locations.delete'; input: LibraryArgs<number>; result: null }
|
||||
| { key: 'locations.fullRescan'; input: LibraryArgs<number>; result: null }
|
||||
| {
|
||||
key: 'locations.indexer_rules.create';
|
||||
input: LibraryArgs<IndexerRuleCreateArgs>;
|
||||
result: IndexerRule;
|
||||
}
|
||||
| { key: 'locations.indexer_rules.delete'; input: LibraryArgs<number>; result: null }
|
||||
| { key: 'locations.quickRescan'; input: LibraryArgs<null>; result: null }
|
||||
| { key: 'locations.relink'; input: LibraryArgs<string>; result: null }
|
||||
| { key: 'locations.update'; input: LibraryArgs<LocationUpdateArgs>; result: null }
|
||||
| { key: 'tags.assign'; input: LibraryArgs<TagAssignArgs>; result: null }
|
||||
| { key: 'tags.create'; input: LibraryArgs<TagCreateArgs>; result: Tag }
|
||||
| { key: 'tags.delete'; input: LibraryArgs<number>; result: null }
|
||||
| { key: 'tags.update'; input: LibraryArgs<TagUpdateArgs>; result: null };
|
||||
subscriptions:
|
||||
| { key: 'invalidateQuery'; input: never; result: InvalidateOperationEvent }
|
||||
| { key: 'jobs.newThumbnail'; input: LibraryArgs<null>; result: string };
|
||||
};
|
||||
|
||||
export type Algorithm = "XChaCha20Poly1305" | "Aes256Gcm"
|
||||
export type Algorithm = 'XChaCha20Poly1305' | 'Aes256Gcm';
|
||||
|
||||
export interface AutomountUpdateArgs { uuid: string, status: boolean }
|
||||
export interface AutomountUpdateArgs {
|
||||
uuid: string;
|
||||
status: boolean;
|
||||
}
|
||||
|
||||
export interface BuildInfo { version: string, commit: string }
|
||||
export interface BuildInfo {
|
||||
version: string;
|
||||
commit: string;
|
||||
}
|
||||
|
||||
export interface ConfigMetadata { version: string | null }
|
||||
export interface ConfigMetadata {
|
||||
version: string | null;
|
||||
}
|
||||
|
||||
export interface CreateLibraryArgs { name: string, password: string, secret_key: string | null, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm }
|
||||
export interface CreateLibraryArgs {
|
||||
name: string;
|
||||
password: string;
|
||||
secret_key: string | null;
|
||||
algorithm: Algorithm;
|
||||
hashing_algorithm: HashingAlgorithm;
|
||||
}
|
||||
|
||||
export interface EditLibraryArgs { id: string, name: string | null, description: string | null }
|
||||
export interface EditLibraryArgs {
|
||||
id: string;
|
||||
name: string | null;
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
export type ExplorerContext = { type: "Location" } & Location | { type: "Tag" } & Tag
|
||||
export type ExplorerContext = ({ type: 'Location' } & Location) | ({ type: 'Tag' } & Tag);
|
||||
|
||||
export interface ExplorerData { context: ExplorerContext, items: Array<ExplorerItem> }
|
||||
export interface ExplorerData {
|
||||
context: ExplorerContext;
|
||||
items: Array<ExplorerItem>;
|
||||
}
|
||||
|
||||
export type ExplorerItem = { type: "Path" } & FilePathWithObject | { type: "Object" } & ObjectWithFilePaths
|
||||
export type ExplorerItem =
|
||||
| ({ type: 'Path' } & FilePathWithObject)
|
||||
| ({ type: 'Object' } & ObjectWithFilePaths);
|
||||
|
||||
export interface FileDecryptorJobInit { location_id: number, path_id: number, output_path: string | null, password: string | null, save_to_library: boolean | null }
|
||||
export interface FileDecryptorJobInit {
|
||||
location_id: number;
|
||||
path_id: number;
|
||||
output_path: string | null;
|
||||
password: string | null;
|
||||
save_to_library: boolean | null;
|
||||
}
|
||||
|
||||
export interface FileDeleterJobInit { location_id: number, path_id: number }
|
||||
export interface FileDeleterJobInit {
|
||||
location_id: number;
|
||||
path_id: number;
|
||||
}
|
||||
|
||||
export interface FileEncryptorJobInit { location_id: number, path_id: number, key_uuid: string, algorithm: Algorithm, metadata: boolean, preview_media: boolean, output_path: string | null }
|
||||
export interface FileEncryptorJobInit {
|
||||
location_id: number;
|
||||
path_id: number;
|
||||
key_uuid: string;
|
||||
algorithm: Algorithm;
|
||||
metadata: boolean;
|
||||
preview_media: boolean;
|
||||
output_path: string | null;
|
||||
}
|
||||
|
||||
export interface FileEraserJobInit { location_id: number, path_id: number, passes: number }
|
||||
export interface FileEraserJobInit {
|
||||
location_id: number;
|
||||
path_id: number;
|
||||
passes: number;
|
||||
}
|
||||
|
||||
export interface FilePath { id: number, is_dir: boolean, location_id: number, materialized_path: string, name: string, extension: string | null, object_id: number | null, parent_id: number | null, key_id: number | null, date_created: string, date_modified: string, date_indexed: string }
|
||||
export interface FilePath {
|
||||
id: number;
|
||||
is_dir: boolean;
|
||||
location_id: number;
|
||||
materialized_path: string;
|
||||
name: string;
|
||||
extension: string | null;
|
||||
object_id: number | null;
|
||||
parent_id: number | null;
|
||||
key_id: number | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
date_indexed: string;
|
||||
}
|
||||
|
||||
export interface GenerateThumbsForLocationArgs { id: number, path: string }
|
||||
export interface GenerateThumbsForLocationArgs {
|
||||
id: number;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export interface GetArgs { id: number }
|
||||
export interface GetArgs {
|
||||
id: number;
|
||||
}
|
||||
|
||||
export type HashingAlgorithm = { name: "Argon2id", params: Params } | { name: "BalloonBlake3", params: Params }
|
||||
export type HashingAlgorithm =
|
||||
| { name: 'Argon2id'; params: Params }
|
||||
| { name: 'BalloonBlake3'; params: Params };
|
||||
|
||||
export interface IdentifyUniqueFilesArgs { id: number, path: string }
|
||||
export interface IdentifyUniqueFilesArgs {
|
||||
id: number;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export interface IndexerRule { id: number, kind: number, name: string, parameters: Array<number>, date_created: string, date_modified: string }
|
||||
export interface IndexerRule {
|
||||
id: number;
|
||||
kind: number;
|
||||
name: string;
|
||||
parameters: Array<number>;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
}
|
||||
|
||||
export interface IndexerRuleCreateArgs { kind: RuleKind, name: string, parameters: Array<number> }
|
||||
export interface IndexerRuleCreateArgs {
|
||||
kind: RuleKind;
|
||||
name: string;
|
||||
parameters: Array<number>;
|
||||
}
|
||||
|
||||
export interface InvalidateOperationEvent { key: string, arg: any }
|
||||
export interface InvalidateOperationEvent {
|
||||
key: string;
|
||||
arg: any;
|
||||
}
|
||||
|
||||
export interface JobReport { id: string, name: string, data: Array<number> | null, metadata: any | null, date_created: string, date_modified: string, status: JobStatus, task_count: number, completed_task_count: number, message: string, seconds_elapsed: number }
|
||||
export interface JobReport {
|
||||
id: string;
|
||||
name: string;
|
||||
data: Array<number> | null;
|
||||
metadata: any | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
status: JobStatus;
|
||||
task_count: number;
|
||||
completed_task_count: number;
|
||||
message: string;
|
||||
seconds_elapsed: number;
|
||||
}
|
||||
|
||||
export type JobStatus = "Queued" | "Running" | "Completed" | "Canceled" | "Failed" | "Paused"
|
||||
export type JobStatus = 'Queued' | 'Running' | 'Completed' | 'Canceled' | 'Failed' | 'Paused';
|
||||
|
||||
export interface KeyAddArgs { algorithm: Algorithm, hashing_algorithm: HashingAlgorithm, key: string, library_sync: boolean, automount: boolean }
|
||||
export interface KeyAddArgs {
|
||||
algorithm: Algorithm;
|
||||
hashing_algorithm: HashingAlgorithm;
|
||||
key: string;
|
||||
library_sync: boolean;
|
||||
automount: boolean;
|
||||
}
|
||||
|
||||
export interface LibraryArgs<T> { library_id: string, arg: T }
|
||||
export interface LibraryArgs<T> {
|
||||
library_id: string;
|
||||
arg: T;
|
||||
}
|
||||
|
||||
export interface LibraryConfig { version: string | null, name: string, description: string }
|
||||
export interface LibraryConfig {
|
||||
version: string | null;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface LibraryConfigWrapped { uuid: string, config: LibraryConfig }
|
||||
export interface LibraryConfigWrapped {
|
||||
uuid: string;
|
||||
config: LibraryConfig;
|
||||
}
|
||||
|
||||
export interface Location { id: number, pub_id: Array<number>, node_id: number, name: string | null, local_path: string | null, total_capacity: number | null, available_capacity: number | null, filesystem: string | null, disk_type: number | null, is_removable: boolean | null, is_online: boolean, is_archived: boolean, date_created: string }
|
||||
export interface Location {
|
||||
id: number;
|
||||
pub_id: Array<number>;
|
||||
node_id: number;
|
||||
name: string | null;
|
||||
local_path: string | null;
|
||||
total_capacity: number | null;
|
||||
available_capacity: number | null;
|
||||
filesystem: string | null;
|
||||
disk_type: number | null;
|
||||
is_removable: boolean | null;
|
||||
is_online: boolean;
|
||||
is_archived: boolean;
|
||||
date_created: string;
|
||||
}
|
||||
|
||||
export interface LocationCreateArgs { path: string, indexer_rules_ids: Array<number> }
|
||||
export interface LocationCreateArgs {
|
||||
path: string;
|
||||
indexer_rules_ids: Array<number>;
|
||||
}
|
||||
|
||||
export interface LocationExplorerArgs { location_id: number, path: string, limit: number, cursor: string | null }
|
||||
export interface LocationExplorerArgs {
|
||||
location_id: number;
|
||||
path: string;
|
||||
limit: number;
|
||||
cursor: string | null;
|
||||
}
|
||||
|
||||
export interface LocationUpdateArgs { id: number, name: string | null, indexer_rules_ids: Array<number> }
|
||||
export interface LocationUpdateArgs {
|
||||
id: number;
|
||||
name: string | null;
|
||||
indexer_rules_ids: Array<number>;
|
||||
}
|
||||
|
||||
export interface MasterPasswordChangeArgs { password: string, secret_key: string | null, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm }
|
||||
export interface MasterPasswordChangeArgs {
|
||||
password: string;
|
||||
secret_key: string | null;
|
||||
algorithm: Algorithm;
|
||||
hashing_algorithm: HashingAlgorithm;
|
||||
}
|
||||
|
||||
export interface MediaData { id: number, pixel_width: number | null, pixel_height: number | null, longitude: number | null, latitude: number | null, fps: number | null, capture_device_make: string | null, capture_device_model: string | null, capture_device_software: string | null, duration_seconds: number | null, codecs: string | null, streams: number | null }
|
||||
export interface MediaData {
|
||||
id: number;
|
||||
pixel_width: number | null;
|
||||
pixel_height: number | null;
|
||||
longitude: number | null;
|
||||
latitude: number | null;
|
||||
fps: number | null;
|
||||
capture_device_make: string | null;
|
||||
capture_device_model: string | null;
|
||||
capture_device_software: string | null;
|
||||
duration_seconds: number | null;
|
||||
codecs: string | null;
|
||||
streams: number | null;
|
||||
}
|
||||
|
||||
export interface Node { id: number, pub_id: Array<number>, name: string, platform: number, version: string | null, last_seen: string, timezone: string | null, date_created: string }
|
||||
export interface Node {
|
||||
id: number;
|
||||
pub_id: Array<number>;
|
||||
name: string;
|
||||
platform: number;
|
||||
version: string | null;
|
||||
last_seen: string;
|
||||
timezone: string | null;
|
||||
date_created: string;
|
||||
}
|
||||
|
||||
export interface NodeConfig { version: string | null, id: string, name: string, p2p_port: number | null }
|
||||
export interface NodeConfig {
|
||||
version: string | null;
|
||||
id: string;
|
||||
name: string;
|
||||
p2p_port: number | null;
|
||||
}
|
||||
|
||||
export interface NodeState { version: string | null, id: string, name: string, p2p_port: number | null, data_path: string }
|
||||
export interface NodeState {
|
||||
version: string | null;
|
||||
id: string;
|
||||
name: string;
|
||||
p2p_port: number | null;
|
||||
data_path: string;
|
||||
}
|
||||
|
||||
export interface NormalisedCompositeId { $type: string, $id: any, org_id: string, user_id: string }
|
||||
export interface NormalisedCompositeId {
|
||||
$type: string;
|
||||
$id: any;
|
||||
org_id: string;
|
||||
user_id: string;
|
||||
}
|
||||
|
||||
export interface NormalisedOrganisation { $type: string, $id: any, id: string, name: string, users: NormalizedVec<NormalisedUser>, owner: NormalisedUser, non_normalised_data: Array<null> }
|
||||
export interface NormalisedOrganisation {
|
||||
$type: string;
|
||||
$id: any;
|
||||
id: string;
|
||||
name: string;
|
||||
users: NormalizedVec<NormalisedUser>;
|
||||
owner: NormalisedUser;
|
||||
non_normalised_data: Array<null>;
|
||||
}
|
||||
|
||||
export interface NormalisedUser { $type: string, $id: any, id: string, name: string }
|
||||
export interface NormalisedUser {
|
||||
$type: string;
|
||||
$id: any;
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface NormalizedVec<T> { $type: string, edges: Array<T> }
|
||||
export interface NormalizedVec<T> {
|
||||
$type: string;
|
||||
edges: Array<T>;
|
||||
}
|
||||
|
||||
export interface Object { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string }
|
||||
export interface Object {
|
||||
id: number;
|
||||
cas_id: string;
|
||||
integrity_checksum: string | null;
|
||||
name: string | null;
|
||||
extension: string | null;
|
||||
kind: number;
|
||||
size_in_bytes: string;
|
||||
key_id: number | null;
|
||||
hidden: boolean;
|
||||
favorite: boolean;
|
||||
important: boolean;
|
||||
has_thumbnail: boolean;
|
||||
has_thumbstrip: boolean;
|
||||
has_video_preview: boolean;
|
||||
ipfs_id: string | null;
|
||||
note: string | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
date_indexed: string;
|
||||
}
|
||||
|
||||
export interface ObjectValidatorArgs { id: number, path: string }
|
||||
export interface ObjectValidatorArgs {
|
||||
id: number;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export type Params = "Standard" | "Hardened" | "Paranoid"
|
||||
export type Params = 'Standard' | 'Hardened' | 'Paranoid';
|
||||
|
||||
export interface RestoreBackupArgs { password: string, secret_key: string | null, path: string }
|
||||
export interface RestoreBackupArgs {
|
||||
password: string;
|
||||
secret_key: string | null;
|
||||
path: string;
|
||||
}
|
||||
|
||||
export type RuleKind = "AcceptFilesByGlob" | "RejectFilesByGlob" | "AcceptIfChildrenDirectoriesArePresent" | "RejectIfChildrenDirectoriesArePresent"
|
||||
export type RuleKind =
|
||||
| 'AcceptFilesByGlob'
|
||||
| 'RejectFilesByGlob'
|
||||
| 'AcceptIfChildrenDirectoriesArePresent'
|
||||
| 'RejectIfChildrenDirectoriesArePresent';
|
||||
|
||||
export interface SetFavoriteArgs { id: number, favorite: boolean }
|
||||
export interface SetFavoriteArgs {
|
||||
id: number;
|
||||
favorite: boolean;
|
||||
}
|
||||
|
||||
export interface SetMasterPasswordArgs { password: string, secret_key: string | null }
|
||||
export interface SetMasterPasswordArgs {
|
||||
password: string;
|
||||
secret_key: string | null;
|
||||
}
|
||||
|
||||
export interface SetNoteArgs { id: number, note: string | null }
|
||||
export interface SetNoteArgs {
|
||||
id: number;
|
||||
note: string | null;
|
||||
}
|
||||
|
||||
export interface Statistics { id: number, date_captured: string, total_object_count: number, library_db_size: string, total_bytes_used: string, total_bytes_capacity: string, total_unique_bytes: string, total_bytes_free: string, preview_media_bytes: string }
|
||||
export interface Statistics {
|
||||
id: number;
|
||||
date_captured: string;
|
||||
total_object_count: number;
|
||||
library_db_size: string;
|
||||
total_bytes_used: string;
|
||||
total_bytes_capacity: string;
|
||||
total_unique_bytes: string;
|
||||
total_bytes_free: string;
|
||||
preview_media_bytes: string;
|
||||
}
|
||||
|
||||
export interface StoredKey { uuid: string, version: StoredKeyVersion, algorithm: Algorithm, hashing_algorithm: HashingAlgorithm, content_salt: Array<number>, master_key: Array<number>, master_key_nonce: Array<number>, key_nonce: Array<number>, key: Array<number>, salt: Array<number>, memory_only: boolean, automount: boolean }
|
||||
export interface StoredKey {
|
||||
uuid: string;
|
||||
version: StoredKeyVersion;
|
||||
algorithm: Algorithm;
|
||||
hashing_algorithm: HashingAlgorithm;
|
||||
content_salt: Array<number>;
|
||||
master_key: Array<number>;
|
||||
master_key_nonce: Array<number>;
|
||||
key_nonce: Array<number>;
|
||||
key: Array<number>;
|
||||
salt: Array<number>;
|
||||
memory_only: boolean;
|
||||
automount: boolean;
|
||||
}
|
||||
|
||||
export type StoredKeyVersion = "V1"
|
||||
export type StoredKeyVersion = 'V1';
|
||||
|
||||
export interface Tag { id: number, pub_id: Array<number>, name: string | null, color: string | null, total_objects: number | null, redundancy_goal: number | null, date_created: string, date_modified: string }
|
||||
export interface Tag {
|
||||
id: number;
|
||||
pub_id: Array<number>;
|
||||
name: string | null;
|
||||
color: string | null;
|
||||
total_objects: number | null;
|
||||
redundancy_goal: number | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
}
|
||||
|
||||
export interface TagAssignArgs { object_id: number, tag_id: number, unassign: boolean }
|
||||
export interface TagAssignArgs {
|
||||
object_id: number;
|
||||
tag_id: number;
|
||||
unassign: boolean;
|
||||
}
|
||||
|
||||
export interface TagCreateArgs { name: string, color: string }
|
||||
export interface TagCreateArgs {
|
||||
name: string;
|
||||
color: string;
|
||||
}
|
||||
|
||||
export interface TagUpdateArgs { id: number, name: string | null, color: string | null }
|
||||
export interface TagUpdateArgs {
|
||||
id: number;
|
||||
name: string | null;
|
||||
color: string | null;
|
||||
}
|
||||
|
||||
export interface Volume { name: string, mount_point: string, total_capacity: bigint, available_capacity: bigint, is_removable: boolean, disk_type: string | null, file_system: string | null, is_root_filesystem: boolean }
|
||||
export interface Volume {
|
||||
name: string;
|
||||
mount_point: string;
|
||||
total_capacity: bigint;
|
||||
available_capacity: bigint;
|
||||
is_removable: boolean;
|
||||
disk_type: string | null;
|
||||
file_system: string | null;
|
||||
is_root_filesystem: boolean;
|
||||
}
|
||||
|
||||
export interface FilePathWithObject { id: number, is_dir: boolean, location_id: number, materialized_path: string, name: string, extension: string | null, object_id: number | null, parent_id: number | null, key_id: number | null, date_created: string, date_modified: string, date_indexed: string, object: Object | null }
|
||||
export interface FilePathWithObject {
|
||||
id: number;
|
||||
is_dir: boolean;
|
||||
location_id: number;
|
||||
materialized_path: string;
|
||||
name: string;
|
||||
extension: string | null;
|
||||
object_id: number | null;
|
||||
parent_id: number | null;
|
||||
key_id: number | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
date_indexed: string;
|
||||
object: Object | null;
|
||||
}
|
||||
|
||||
export interface ObjectWithFilePaths { id: number, cas_id: string, integrity_checksum: string | null, name: string | null, extension: string | null, kind: number, size_in_bytes: string, key_id: number | null, hidden: boolean, favorite: boolean, important: boolean, has_thumbnail: boolean, has_thumbstrip: boolean, has_video_preview: boolean, ipfs_id: string | null, note: string | null, date_created: string, date_modified: string, date_indexed: string, file_paths: Array<FilePath> }
|
||||
export interface ObjectWithFilePaths {
|
||||
id: number;
|
||||
cas_id: string;
|
||||
integrity_checksum: string | null;
|
||||
name: string | null;
|
||||
extension: string | null;
|
||||
kind: number;
|
||||
size_in_bytes: string;
|
||||
key_id: number | null;
|
||||
hidden: boolean;
|
||||
favorite: boolean;
|
||||
important: boolean;
|
||||
has_thumbnail: boolean;
|
||||
has_thumbstrip: boolean;
|
||||
has_video_preview: boolean;
|
||||
ipfs_id: string | null;
|
||||
note: string | null;
|
||||
date_created: string;
|
||||
date_modified: string;
|
||||
date_indexed: string;
|
||||
file_paths: Array<FilePath>;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue