⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
Refactor imports to use global types from "@linkwarden/types/global" instead of "@linkwarden/types" across components
daniel31x137e34d98bc4e8
diff --git a/apps/mobile/app/(tabs)/collections/index.tsx b/apps/mobile/app/(tabs)/collections/index.tsxindex f13a58a0..052f3e5c 100644--- a/apps/mobile/app/(tabs)/collections/index.tsx+++ b/apps/mobile/app/(tabs)/collections/index.tsx@@ -14,7 +14,7 @@ import Spinner from "@/components/ui/Spinner";import { rawTheme, ThemeName } from "@/lib/colors";import { useColorScheme } from "nativewind";import { useCollections } from "@linkwarden/router/collections";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";export default function CollectionsScreen() {const { colorScheme } = useColorScheme();diff --git a/apps/mobile/app/(tabs)/settings/preferredCollection.tsx b/apps/mobile/app/(tabs)/settings/preferredCollection.tsxindex f6fad2d9..dbf9e689 100644--- a/apps/mobile/app/(tabs)/settings/preferredCollection.tsx+++ b/apps/mobile/app/(tabs)/settings/preferredCollection.tsx@@ -3,7 +3,7 @@ import React, { useCallback, useMemo, useState } from "react";import useAuthStore from "@/store/auth";import useDataStore from "@/store/data";import { useCollections } from "@linkwarden/router/collections";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import Input from "@/components/ui/Input";import { Folder, Check } from "lucide-react-native";import { useColorScheme } from "nativewind";diff --git a/apps/mobile/app/(tabs)/tags/index.tsx b/apps/mobile/app/(tabs)/tags/index.tsxindex 12bceaf7..290e499b 100644--- a/apps/mobile/app/(tabs)/tags/index.tsx+++ b/apps/mobile/app/(tabs)/tags/index.tsx@@ -13,7 +13,7 @@ import React, { useEffect, useState } from "react";import Spinner from "@/components/ui/Spinner";import { rawTheme, ThemeName } from "@/lib/colors";import { useColorScheme } from "nativewind";-import { TagIncludingLinkCount } from "@linkwarden/types";+import { TagIncludingLinkCount } from "@linkwarden/types/global";import { useTags } from "@linkwarden/router/tags";export default function TagsScreen() {diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsxindex f0822288..490ade26 100644--- a/apps/mobile/app/_layout.tsx+++ b/apps/mobile/app/_layout.tsx@@ -33,7 +33,7 @@ import useTmpStore from "@/store/tmp";import {LinkIncludingShortenedCollectionAndTags,MobileAuth,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useDeleteLink, useUpdateLink } from "@linkwarden/router/links";import { deleteLinkCache } from "@/lib/cache";import { queryClient } from "@/lib/queryClient";diff --git a/apps/mobile/app/incoming.tsx b/apps/mobile/app/incoming.tsxindex 12517ea5..4674a0ac 100644--- a/apps/mobile/app/incoming.tsx+++ b/apps/mobile/app/incoming.tsx@@ -15,7 +15,7 @@ import { useAddLink } from "@linkwarden/router/links";import { rawTheme, ThemeName } from "@/lib/colors";import { useColorScheme } from "nativewind";import { SheetManager } from "react-native-actions-sheet";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";export default function IncomingScreen() {const { auth } = useAuthStore();diff --git a/apps/mobile/app/links/[id].tsx b/apps/mobile/app/links/[id].tsxindex c8c71ec9..bd552fc5 100644--- a/apps/mobile/app/links/[id].tsx+++ b/apps/mobile/app/links/[id].tsx@@ -6,7 +6,7 @@ import { useLocalSearchParams } from "expo-router";import { useUser } from "@linkwarden/router/user";import { useGetLink } from "@linkwarden/router/links";import useTmpStore from "@/store/tmp";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";import ReadableFormat from "@/components/Formats/ReadableFormat";import ImageFormat from "@/components/Formats/ImageFormat";import PdfFormat from "@/components/Formats/PdfFormat";diff --git a/apps/mobile/components/ActionSheets/EditLinkSheet.tsx b/apps/mobile/components/ActionSheets/EditLinkSheet.tsxindex 1c1398eb..2c37a8f8 100644--- a/apps/mobile/components/ActionSheets/EditLinkSheet.tsx+++ b/apps/mobile/components/ActionSheets/EditLinkSheet.tsx@@ -16,7 +16,7 @@ import {CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,TagIncludingLinkCount,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useCollections } from "@linkwarden/router/collections";import { rawTheme, ThemeName } from "@/lib/colors";import { useColorScheme } from "nativewind";diff --git a/apps/mobile/components/ActionSheets/Sheets.tsx b/apps/mobile/components/ActionSheets/Sheets.tsxindex 87b133e7..e4a07cfa 100644--- a/apps/mobile/components/ActionSheets/Sheets.tsx+++ b/apps/mobile/components/ActionSheets/Sheets.tsx@@ -7,7 +7,7 @@ import SupportSheet from "./SupportSheet";import AddLinkSheet from "./AddLinkSheet";import EditLinkSheet from "./EditLinkSheet";import NewCollectionSheet from "./NewCollectionSheet";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";registerSheet("support-sheet", SupportSheet);registerSheet("add-link-sheet", AddLinkSheet);diff --git a/apps/mobile/components/CollectionListing.tsx b/apps/mobile/components/CollectionListing.tsxindex 0aa6fb64..499ecdef 100644--- a/apps/mobile/components/CollectionListing.tsx+++ b/apps/mobile/components/CollectionListing.tsx@@ -1,6 +1,6 @@import { View, Text, Pressable, Platform, Alert } from "react-native";import { decode } from "html-entities";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import useAuthStore from "@/store/auth";import { useRouter } from "expo-router";import * as ContextMenu from "zeego/context-menu";diff --git a/apps/mobile/components/DashboardSection.tsx b/apps/mobile/components/DashboardSection.tsxindex 8e81e952..378864fa 100644--- a/apps/mobile/components/DashboardSection.tsx+++ b/apps/mobile/components/DashboardSection.tsx@@ -17,7 +17,7 @@ import {Hash,Link,} from "lucide-react-native";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import LinkListing from "@/components/LinkListing";import { useColorScheme } from "nativewind";import { useRouter } from "expo-router";diff --git a/apps/mobile/components/Formats/ImageFormat.tsx b/apps/mobile/components/Formats/ImageFormat.tsxindex f06041ae..49767491 100644--- a/apps/mobile/components/Formats/ImageFormat.tsx+++ b/apps/mobile/components/Formats/ImageFormat.tsx@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";import * as FileSystem from "expo-file-system";import NetInfo from "@react-native-community/netinfo";import useAuthStore from "@/store/auth";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";import { Link as LinkType } from "@linkwarden/prisma/client";import WebView from "react-native-webview";import { Image, Platform, ScrollView } from "react-native";diff --git a/apps/mobile/components/Formats/PdfFormat.tsx b/apps/mobile/components/Formats/PdfFormat.tsxindex f3ddc60f..68206663 100644--- a/apps/mobile/components/Formats/PdfFormat.tsx+++ b/apps/mobile/components/Formats/PdfFormat.tsx@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";import * as FileSystem from "expo-file-system";import NetInfo from "@react-native-community/netinfo";import useAuthStore from "@/store/auth";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";import { Link as LinkType } from "@linkwarden/prisma/client";import Pdf from "react-native-pdf";diff --git a/apps/mobile/components/Formats/ReadableFormat.tsx b/apps/mobile/components/Formats/ReadableFormat.tsxindex 3bd57aed..86891cde 100644--- a/apps/mobile/components/Formats/ReadableFormat.tsx+++ b/apps/mobile/components/Formats/ReadableFormat.tsx@@ -11,7 +11,7 @@ import { decode } from "html-entities";import { useColorScheme } from "nativewind";import { rawTheme, ThemeName } from "@/lib/colors";import { CalendarDays, Link } from "lucide-react-native";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";import { Link as LinkType } from "@linkwarden/prisma/client";type Props = {diff --git a/apps/mobile/components/Formats/WebpageFormat.tsx b/apps/mobile/components/Formats/WebpageFormat.tsxindex 9236c1c2..79a458e4 100644--- a/apps/mobile/components/Formats/WebpageFormat.tsx+++ b/apps/mobile/components/Formats/WebpageFormat.tsx@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";import * as FileSystem from "expo-file-system";import NetInfo from "@react-native-community/netinfo";import useAuthStore from "@/store/auth";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";import { Link as LinkType } from "@linkwarden/prisma/client";import WebView from "react-native-webview";diff --git a/apps/mobile/components/LinkListing.tsx b/apps/mobile/components/LinkListing.tsxindex 8582c04d..4229f7a6 100644--- a/apps/mobile/components/LinkListing.tsx+++ b/apps/mobile/components/LinkListing.tsx@@ -9,8 +9,8 @@ import {Linking,} from "react-native";import { decode } from "html-entities";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";-import { ArchivedFormat } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";+import { ArchivedFormat } from "@linkwarden/types/global";import getFormatBasedOnPreference from "@linkwarden/lib/getFormatBasedOnPreference";import getOriginalFormat from "@linkwarden/lib/getOriginalFormat";import {diff --git a/apps/mobile/components/Links.tsx b/apps/mobile/components/Links.tsxindex 88108796..a3daa6b8 100644--- a/apps/mobile/components/Links.tsx+++ b/apps/mobile/components/Links.tsx@@ -7,7 +7,7 @@ import {} from "react-native";import LinkListing from "@/components/LinkListing";import React, { useState } from "react";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import Spinner from "@/components/ui/Spinner";import { rawTheme, ThemeName } from "@/lib/colors";import { useColorScheme } from "nativewind";diff --git a/apps/mobile/components/TagListing.tsx b/apps/mobile/components/TagListing.tsxindex 40267e55..4ac21afb 100644--- a/apps/mobile/components/TagListing.tsx+++ b/apps/mobile/components/TagListing.tsx@@ -1,6 +1,6 @@import { View, Text, Pressable, Platform, Alert } from "react-native";import { decode } from "html-entities";-import { TagIncludingLinkCount } from "@linkwarden/types";+import { TagIncludingLinkCount } from "@linkwarden/types/global";import useAuthStore from "@/store/auth";import { useRouter } from "expo-router";import * as ContextMenu from "zeego/context-menu";diff --git a/apps/mobile/store/auth.ts b/apps/mobile/store/auth.tsindex 7a282ee2..f54f44d8 100644--- a/apps/mobile/store/auth.ts+++ b/apps/mobile/store/auth.ts@@ -1,7 +1,7 @@import { create } from "zustand";import * as SecureStore from "expo-secure-store";import { router } from "expo-router";-import { MobileAuth } from "@linkwarden/types";+import { MobileAuth } from "@linkwarden/types/global";import { Alert } from "react-native";import { queryClient } from "@/lib/queryClient";import { mmkvPersister } from "@/lib/queryPersister";diff --git a/apps/mobile/store/data.ts b/apps/mobile/store/data.tsindex ed8c5cf4..3f0a0549 100644--- a/apps/mobile/store/data.ts+++ b/apps/mobile/store/data.ts@@ -1,5 +1,5 @@import { create } from "zustand";-import { MobileData } from "@linkwarden/types";+import { MobileData } from "@linkwarden/types/global";import AsyncStorage from "@react-native-async-storage/async-storage";import { colorScheme } from "nativewind";diff --git a/apps/mobile/store/tmp.ts b/apps/mobile/store/tmp.tsindex 4a75fe4f..20eff2f6 100644--- a/apps/mobile/store/tmp.ts+++ b/apps/mobile/store/tmp.ts@@ -1,5 +1,5 @@import { create } from "zustand";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import { User } from "@linkwarden/prisma/client";type Tmp = {diff --git a/apps/web/components/CollectionCard.tsx b/apps/web/components/CollectionCard.tsxindex dd230c15..506da7e3 100644--- a/apps/web/components/CollectionCard.tsx+++ b/apps/web/components/CollectionCard.tsx@@ -2,7 +2,7 @@ import Link from "next/link";import {AccountSettings,CollectionIncludingMembersAndLinkCount,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import React, { useEffect, useState } from "react";import ProfilePhoto from "./ProfilePhoto";import usePermissions from "@/hooks/usePermissions";diff --git a/apps/web/components/CollectionListing.tsx b/apps/web/components/CollectionListing.tsxindex f145bb5c..cd7488e4 100644--- a/apps/web/components/CollectionListing.tsx+++ b/apps/web/components/CollectionListing.tsx@@ -11,7 +11,7 @@ import Tree, {} from "@atlaskit/tree";import { Collection } from "@linkwarden/prisma/client";import Link from "next/link";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import { useRouter } from "next/router";import toast from "react-hot-toast";import { useTranslation } from "next-i18next";diff --git a/apps/web/components/DashboardLinks.tsx b/apps/web/components/DashboardLinks.tsxindex acd8605b..cc221814 100644--- a/apps/web/components/DashboardLinks.tsx+++ b/apps/web/components/DashboardLinks.tsx@@ -1,9 +1,9 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import useLocalSettingsStore from "@/store/localSettings";import {ArchivedFormat,CollectionIncludingMembersAndLinkCount,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useEffect, useRef, useState } from "react";import unescapeString from "@/lib/client/unescapeString";import LinkActions from "@/components/LinkViews/LinkComponents/LinkActions";diff --git a/apps/web/components/DragNDrop.tsx b/apps/web/components/DragNDrop.tsxindex 9c71a376..1b00612d 100644--- a/apps/web/components/DragNDrop.tsx+++ b/apps/web/components/DragNDrop.tsx@@ -11,7 +11,7 @@ import {useSensors,} from "@dnd-kit/core";import LinkIcon from "./LinkViews/LinkComponents/LinkIcon";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import toast from "react-hot-toast";import { useUpdateLink } from "@linkwarden/router/links";import { useTranslation } from "react-i18next";diff --git a/apps/web/components/ImportDropdown.tsx b/apps/web/components/ImportDropdown.tsxindex a51162b6..00a1eb83 100644--- a/apps/web/components/ImportDropdown.tsx+++ b/apps/web/components/ImportDropdown.tsx@@ -1,6 +1,6 @@import React from "react";import importBookmarks from "@/lib/client/importBookmarks";-import { MigrationFormat } from "@linkwarden/types";+import { MigrationFormat } from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import {DropdownMenu,diff --git a/apps/web/components/LinkDetails.tsx b/apps/web/components/LinkDetails.tsxindex 270e08d8..1ca0126b 100644--- a/apps/web/components/LinkDetails.tsx+++ b/apps/web/components/LinkDetails.tsx@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";import {LinkIncludingShortenedCollectionAndTags,ArchivedFormat,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import Link from "next/link";import {atLeastOneFormatAvailable,diff --git a/apps/web/components/LinkListOptions.tsx b/apps/web/components/LinkListOptions.tsxindex 15e67607..a1a6a1a4 100644--- a/apps/web/components/LinkListOptions.tsx+++ b/apps/web/components/LinkListOptions.tsx@@ -10,7 +10,7 @@ import {LinkIncludingShortenedCollectionAndTags,Sort,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useArchiveAction, useBulkDeleteLinks } from "@linkwarden/router/links";import toast from "react-hot-toast";import { Button } from "@/components/ui/button";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx b/apps/web/components/LinkViews/LinkComponents/LinkActions.tsxindex 104cca3b..a6b4e1e5 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkActions.tsx@@ -1,5 +1,5 @@import { useState } from "react";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import usePermissions from "@/hooks/usePermissions";import DeleteLinkModal from "@/components/ModalContent/DeleteLinkModal";import { useDeleteLink, useGetLink } from "@linkwarden/router/links";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkCard.tsx b/apps/web/components/LinkViews/LinkComponents/LinkCard.tsxindex 7990d83a..b64386e1 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkCard.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkCard.tsx@@ -2,7 +2,7 @@ import {ArchivedFormat,CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import React, { useRef, useState } from "react";import unescapeString from "@/lib/client/unescapeString";import LinkActions from "@/components/LinkViews/LinkComponents/LinkActions";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkCollection.tsx b/apps/web/components/LinkViews/LinkComponents/LinkCollection.tsxindex 18fc6795..221b3e67 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkCollection.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkCollection.tsx@@ -2,7 +2,7 @@ import Icon from "@/components/Icon";import {CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { IconWeight } from "@phosphor-icons/react";import Link from "next/link";import React from "react";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkDate.tsx b/apps/web/components/LinkViews/LinkComponents/LinkDate.tsxindex 0ea920fe..dd8008a3 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkDate.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkDate.tsx@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import React from "react";function LinkDate({ link }: { link: LinkIncludingShortenedCollectionAndTags }) {diff --git a/apps/web/components/LinkViews/LinkComponents/LinkFormats.tsx b/apps/web/components/LinkViews/LinkComponents/LinkFormats.tsxindex 505de8a2..e3ad3815 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkFormats.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkFormats.tsx@@ -2,7 +2,7 @@ import { formatAvailable } from "@linkwarden/lib/formatStats";import {ArchivedFormat,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import Link from "next/link";import { useRouter } from "next/router";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkIcon.tsx b/apps/web/components/LinkViews/LinkComponents/LinkIcon.tsxindex fa0e30b2..55d3b422 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkIcon.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkIcon.tsx@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import Image from "next/image";import isValidUrl from "@/lib/shared/isValidUrl";import React, { useState } from "react";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkList.tsx b/apps/web/components/LinkViews/LinkComponents/LinkList.tsxindex e76ea8fc..1e452810 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkList.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkList.tsx@@ -1,7 +1,7 @@import {CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import React, { useState } from "react";import unescapeString from "@/lib/client/unescapeString";import LinkActions from "@/components/LinkViews/LinkComponents/LinkActions";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkMasonry.tsx b/apps/web/components/LinkViews/LinkComponents/LinkMasonry.tsxindex 4ed476be..e72d54aa 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkMasonry.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkMasonry.tsx@@ -2,7 +2,7 @@ import {ArchivedFormat,CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import React, { useRef, useState } from "react";import unescapeString from "@/lib/client/unescapeString";import LinkActions from "@/components/LinkViews/LinkComponents/LinkActions";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkPin.tsx b/apps/web/components/LinkViews/LinkComponents/LinkPin.tsxindex 1cd063fa..6a48f1e6 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkPin.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkPin.tsx@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import { useRouter } from "next/router";import clsx from "clsx";import usePinLink from "@/lib/client/pinLink";diff --git a/apps/web/components/LinkViews/LinkComponents/LinkTypeBadge.tsx b/apps/web/components/LinkViews/LinkComponents/LinkTypeBadge.tsxindex e5fc52ca..61b5fb77 100644--- a/apps/web/components/LinkViews/LinkComponents/LinkTypeBadge.tsx+++ b/apps/web/components/LinkViews/LinkComponents/LinkTypeBadge.tsx@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import Link from "next/link";import React, { useEffect, useState } from "react";diff --git a/apps/web/components/LinkViews/Links.tsx b/apps/web/components/LinkViews/Links.tsxindex ec170457..0c71863d 100644--- a/apps/web/components/LinkViews/Links.tsx+++ b/apps/web/components/LinkViews/Links.tsx@@ -3,7 +3,7 @@ import {CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useEffect, useState } from "react";import { useInView } from "react-intersection-observer";import LinkMasonry from "@/components/LinkViews/LinkComponents/LinkMasonry";diff --git a/apps/web/components/ModalContent/BulkEditLinksModal.tsx b/apps/web/components/ModalContent/BulkEditLinksModal.tsxindex 1d4f48d0..2f153bb6 100644--- a/apps/web/components/ModalContent/BulkEditLinksModal.tsx+++ b/apps/web/components/ModalContent/BulkEditLinksModal.tsx@@ -2,7 +2,7 @@ import React, { useState } from "react";import CollectionSelection from "@/components/InputSelect/CollectionSelection";import TagSelection from "@/components/InputSelect/TagSelection";import useLinkStore from "@/store/links";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import toast from "react-hot-toast";import Modal from "../Modal";import { useTranslation } from "next-i18next";diff --git a/apps/web/components/ModalContent/DeleteCollectionModal.tsx b/apps/web/components/ModalContent/DeleteCollectionModal.tsxindex 489b74d7..d053b9f9 100644--- a/apps/web/components/ModalContent/DeleteCollectionModal.tsx+++ b/apps/web/components/ModalContent/DeleteCollectionModal.tsx@@ -1,6 +1,6 @@import React, { useEffect, useState } from "react";import TextInput from "@/components/TextInput";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import { useRouter } from "next/router";import usePermissions from "@/hooks/usePermissions";import Modal from "../Modal";diff --git a/apps/web/components/ModalContent/DeleteLinkModal.tsx b/apps/web/components/ModalContent/DeleteLinkModal.tsxindex 5ba8977e..6fc25013 100644--- a/apps/web/components/ModalContent/DeleteLinkModal.tsx+++ b/apps/web/components/ModalContent/DeleteLinkModal.tsx@@ -1,5 +1,5 @@import React, { useEffect, useState } from "react";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import Modal from "../Modal";import { useRouter } from "next/router";import { Button } from "@/components/ui/button";diff --git a/apps/web/components/ModalContent/DeleteTagModal.tsx b/apps/web/components/ModalContent/DeleteTagModal.tsxindex e7fa3cce..d34b9f3f 100644--- a/apps/web/components/ModalContent/DeleteTagModal.tsx+++ b/apps/web/components/ModalContent/DeleteTagModal.tsx@@ -1,5 +1,5 @@import React, { useEffect, useState } from "react";-import { TagIncludingLinkCount } from "@linkwarden/types";+import { TagIncludingLinkCount } from "@linkwarden/types/global";import Modal from "../Modal";import { Button } from "@/components/ui/button";import { useTranslation } from "next-i18next";diff --git a/apps/web/components/ModalContent/EditCollectionModal.tsx b/apps/web/components/ModalContent/EditCollectionModal.tsxindex e011e7b2..aba168bd 100644--- a/apps/web/components/ModalContent/EditCollectionModal.tsx+++ b/apps/web/components/ModalContent/EditCollectionModal.tsx@@ -1,6 +1,6 @@import React, { useState } from "react";import TextInput from "@/components/TextInput";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import Modal from "../Modal";import { useTranslation } from "next-i18next";import { useUpdateCollection } from "@linkwarden/router/collections";diff --git a/apps/web/components/ModalContent/EditCollectionSharingModal.tsx b/apps/web/components/ModalContent/EditCollectionSharingModal.tsxindex 36f9e01f..3cf8b6d6 100644--- a/apps/web/components/ModalContent/EditCollectionSharingModal.tsx+++ b/apps/web/components/ModalContent/EditCollectionSharingModal.tsx@@ -5,7 +5,7 @@ import {AccountSettings,CollectionIncludingMembersAndLinkCount,Member,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import getPublicUserData from "@/lib/client/getPublicUserData";import usePermissions from "@/hooks/usePermissions";import ProfilePhoto from "../ProfilePhoto";diff --git a/apps/web/components/ModalContent/LinkModal.tsx b/apps/web/components/ModalContent/LinkModal.tsxindex 0d210d46..177da113 100644--- a/apps/web/components/ModalContent/LinkModal.tsx+++ b/apps/web/components/ModalContent/LinkModal.tsx@@ -1,5 +1,5 @@import React, { useState } from "react";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import { useDeleteLink } from "@linkwarden/router/links";import Drawer from "../Drawer";diff --git a/apps/web/components/ModalContent/NewCollectionModal.tsx b/apps/web/components/ModalContent/NewCollectionModal.tsxindex a4b2cf1d..de3327fe 100644--- a/apps/web/components/ModalContent/NewCollectionModal.tsx+++ b/apps/web/components/ModalContent/NewCollectionModal.tsx@@ -2,7 +2,7 @@ import React, { useEffect, useLayoutEffect, useRef, useState } from "react";import TextInput from "@/components/TextInput";import { Collection } from "@linkwarden/prisma/client";import Modal from "../Modal";-import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types";+import { CollectionIncludingMembersAndLinkCount } from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import { useCreateCollection } from "@linkwarden/router/collections";import toast from "react-hot-toast";diff --git a/apps/web/components/ModalContent/NewTokenModal.tsx b/apps/web/components/ModalContent/NewTokenModal.tsxindex 80c30404..5ca60d7a 100644--- a/apps/web/components/ModalContent/NewTokenModal.tsx+++ b/apps/web/components/ModalContent/NewTokenModal.tsx@@ -1,6 +1,6 @@import React, { useLayoutEffect, useRef, useState } from "react";import TextInput from "@/components/TextInput";-import { TokenExpiry } from "@linkwarden/types";+import { TokenExpiry } from "@linkwarden/types/global";import toast from "react-hot-toast";import Modal from "../Modal";import { Button } from "@/components/ui/button";diff --git a/apps/web/components/Preservation/PreservationContent.tsx b/apps/web/components/Preservation/PreservationContent.tsxindex f18d5bfe..0b2c6079 100644--- a/apps/web/components/Preservation/PreservationContent.tsx+++ b/apps/web/components/Preservation/PreservationContent.tsx@@ -8,7 +8,7 @@ import { PreservationSkeleton } from "../Skeletons";import {LinkIncludingShortenedCollectionAndTags,ArchivedFormat,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { formatAvailable } from "@linkwarden/lib/formatStats";import getLinkTypeFromFormat from "@linkwarden/lib/getLinkTypeFromFormat";diff --git a/apps/web/components/Preservation/PreservationNavbar.tsx b/apps/web/components/Preservation/PreservationNavbar.tsxindex b180335a..51243423 100644--- a/apps/web/components/Preservation/PreservationNavbar.tsx+++ b/apps/web/components/Preservation/PreservationNavbar.tsx@@ -2,7 +2,7 @@ import {ArchivedFormat,CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import React, { useEffect, useState } from "react";import {DropdownMenu,diff --git a/apps/web/components/Preservation/ReadableView.tsx b/apps/web/components/Preservation/ReadableView.tsxindex 6c2637d1..25acb7b2 100644--- a/apps/web/components/Preservation/ReadableView.tsx+++ b/apps/web/components/Preservation/ReadableView.tsx@@ -11,7 +11,7 @@ import usePermissions from "@/hooks/usePermissions";import {LinkIncludingShortenedCollectionAndTags,ArchivedFormat,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import ClickAwayHandler from "@/components/ClickAwayHandler";import {useGetLinkHighlights,diff --git a/apps/web/components/PreserverdFormatRow.tsx b/apps/web/components/PreserverdFormatRow.tsxindex fc296d9d..bf83509d 100644--- a/apps/web/components/PreserverdFormatRow.tsx+++ b/apps/web/components/PreserverdFormatRow.tsx@@ -1,7 +1,7 @@import {ArchivedFormat,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import Link from "next/link";import { useRouter } from "next/router";import { Button } from "@/components/ui/button";diff --git a/apps/web/components/SortDropdown.tsx b/apps/web/components/SortDropdown.tsxindex 8b8cb02b..58f49849 100644--- a/apps/web/components/SortDropdown.tsx+++ b/apps/web/components/SortDropdown.tsx@@ -1,5 +1,5 @@import React, { Dispatch, SetStateAction, useEffect } from "react";-import { Sort } from "@linkwarden/types";+import { Sort } from "@linkwarden/types/global";import { TFunction } from "i18next";import useLocalSettingsStore from "@/store/localSettings";import { resetInfiniteQueryPagination } from "@linkwarden/router/links";diff --git a/apps/web/components/TagCard.tsx b/apps/web/components/TagCard.tsxindex 4c96f4ae..abcf68fd 100644--- a/apps/web/components/TagCard.tsx+++ b/apps/web/components/TagCard.tsx@@ -8,7 +8,7 @@ import {} from "@/components/ui/dropdown-menu";import { Button } from "./ui/button";import { Checkbox } from "./ui/checkbox";-import { TagIncludingLinkCount } from "@linkwarden/types";+import { TagIncludingLinkCount } from "@linkwarden/types/global";import DeleteTagModal from "./ModalContent/DeleteTagModal";import { cn } from "@/lib/utils";import { useRouter } from "next/router";diff --git a/apps/web/components/ViewDropdown.tsx b/apps/web/components/ViewDropdown.tsxindex b3b7f554..98aa8a02 100644--- a/apps/web/components/ViewDropdown.tsx+++ b/apps/web/components/ViewDropdown.tsx@@ -6,7 +6,7 @@ import {DropdownMenuSeparator,} from "@/components/ui/dropdown-menu";import useLocalSettingsStore from "@/store/localSettings";-import { ViewMode } from "@linkwarden/types";+import { ViewMode } from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import { Button } from "@/components/ui/button";import { useEffect } from "react";diff --git a/apps/web/hooks/useCollectivePermissions.ts b/apps/web/hooks/useCollectivePermissions.tsindex 474b949d..bf238998 100644--- a/apps/web/hooks/useCollectivePermissions.ts+++ b/apps/web/hooks/useCollectivePermissions.ts@@ -1,4 +1,4 @@-import { Member } from "@linkwarden/types";+import { Member } from "@linkwarden/types/global";import { useEffect, useState } from "react";import { useCollections } from "@linkwarden/router/collections";import { useUser } from "@linkwarden/router/user";diff --git a/apps/web/hooks/usePermissions.tsx b/apps/web/hooks/usePermissions.tsxindex 054b3621..ec57a715 100644--- a/apps/web/hooks/usePermissions.tsx+++ b/apps/web/hooks/usePermissions.tsx@@ -1,4 +1,4 @@-import { Member } from "@linkwarden/types";+import { Member } from "@linkwarden/types/global";import { useEffect, useState } from "react";import { useCollections } from "@linkwarden/router/collections";import { useUser } from "@linkwarden/router/user";diff --git a/apps/web/hooks/useSort.tsx b/apps/web/hooks/useSort.tsxindex acbe8ec4..4bc1904a 100644--- a/apps/web/hooks/useSort.tsx+++ b/apps/web/hooks/useSort.tsx@@ -2,7 +2,7 @@ import {CollectionIncludingMembersAndLinkCount,LinkIncludingShortenedCollectionAndTags,Sort,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { SetStateAction, useEffect } from "react";type Props<diff --git a/apps/web/layouts/MainLayout.tsx b/apps/web/layouts/MainLayout.tsxindex 38d24ab8..a5bb360d 100644--- a/apps/web/layouts/MainLayout.tsx+++ b/apps/web/layouts/MainLayout.tsx@@ -4,7 +4,7 @@ import Sidebar from "@/components/Sidebar";import { ReactNode, useEffect, useState } from "react";import getLatestVersion from "@/lib/client/getLatestVersion";import DragNDrop from "@/components/DragNDrop";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";interface Props {children: ReactNode;diff --git a/apps/web/lib/api/controllers/dashboard/getDashboardData.ts b/apps/web/lib/api/controllers/dashboard/getDashboardData.tsindex 55c737ce..25abf37d 100644--- a/apps/web/lib/api/controllers/dashboard/getDashboardData.ts+++ b/apps/web/lib/api/controllers/dashboard/getDashboardData.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { LinkRequestQuery, Order, Sort } from "@linkwarden/types";+import { LinkRequestQuery, Order, Sort } from "@linkwarden/types/global";export default async function getDashboardData(userId: number,diff --git a/apps/web/lib/api/controllers/dashboard/getDashboardDataV2.ts b/apps/web/lib/api/controllers/dashboard/getDashboardDataV2.tsindex d289b32d..94269f0f 100644--- a/apps/web/lib/api/controllers/dashboard/getDashboardDataV2.ts+++ b/apps/web/lib/api/controllers/dashboard/getDashboardDataV2.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { Order } from "@linkwarden/types";+import { Order } from "@linkwarden/types/global";import { MEILI_INDEX_VERSION } from "@linkwarden/lib/constants";export default async function getDashboardData(userId: number) {diff --git a/apps/web/lib/api/controllers/links/bulk/updateLinks.ts b/apps/web/lib/api/controllers/links/bulk/updateLinks.tsindex 1a5f1525..d7a57677 100644--- a/apps/web/lib/api/controllers/links/bulk/updateLinks.ts+++ b/apps/web/lib/api/controllers/links/bulk/updateLinks.ts@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import updateLinkById from "../linkId/updateLinkById";import { UpdateLinkSchemaType } from "@linkwarden/lib/schemaValidation";import { prisma } from "@linkwarden/prisma";diff --git a/apps/web/lib/api/controllers/links/getLinks.ts b/apps/web/lib/api/controllers/links/getLinks.tsindex fdfade3c..8ba18a83 100644--- a/apps/web/lib/api/controllers/links/getLinks.ts+++ b/apps/web/lib/api/controllers/links/getLinks.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { LinkRequestQuery, Order, Sort } from "@linkwarden/types";+import { LinkRequestQuery, Order, Sort } from "@linkwarden/types/global";export default async function getLink(userId: number, query: LinkRequestQuery) {if (process.env.DISABLE_DEPRECATED_ROUTES === "true")diff --git a/apps/web/lib/api/controllers/migration/importFromLinkwarden.ts b/apps/web/lib/api/controllers/migration/importFromLinkwarden.tsindex 6af5609c..8b5b6595 100644--- a/apps/web/lib/api/controllers/migration/importFromLinkwarden.ts+++ b/apps/web/lib/api/controllers/migration/importFromLinkwarden.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { Backup } from "@linkwarden/types";+import { Backup } from "@linkwarden/types/global";import { createFolder } from "@linkwarden/filesystem";import { hasPassedLimit } from "@linkwarden/lib/verifyCapacity";diff --git a/apps/web/lib/api/controllers/search/searchLinks.ts b/apps/web/lib/api/controllers/search/searchLinks.tsindex e7822ce7..cfee689a 100644--- a/apps/web/lib/api/controllers/search/searchLinks.ts+++ b/apps/web/lib/api/controllers/search/searchLinks.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { LinkRequestQuery, Order, Sort } from "@linkwarden/types";+import { LinkRequestQuery, Order, Sort } from "@linkwarden/types/global";import { meiliClient } from "@linkwarden/lib/meilisearchClient";import {buildMeiliFilters,diff --git a/apps/web/lib/api/controllers/tags/createOrUpdateTags.ts b/apps/web/lib/api/controllers/tags/createOrUpdateTags.tsindex fb4cabb3..19bc1a7f 100644--- a/apps/web/lib/api/controllers/tags/createOrUpdateTags.ts+++ b/apps/web/lib/api/controllers/tags/createOrUpdateTags.ts@@ -1,6 +1,6 @@import { prisma } from "@linkwarden/prisma";import { PostTagSchemaType } from "@linkwarden/lib/schemaValidation";-import { TagIncludingLinkCount } from "@linkwarden/types";+import { TagIncludingLinkCount } from "@linkwarden/types/global";export default async function createOrUpdateTags(userId: number,diff --git a/apps/web/lib/api/controllers/tokens/postToken.ts b/apps/web/lib/api/controllers/tokens/postToken.tsindex 960e1a69..6cd09fb0 100644--- a/apps/web/lib/api/controllers/tokens/postToken.ts+++ b/apps/web/lib/api/controllers/tokens/postToken.ts@@ -3,7 +3,7 @@ import {PostTokenSchemaType,PostTokenSchema,} from "@linkwarden/lib/schemaValidation";-import { TokenExpiry } from "@linkwarden/types";+import { TokenExpiry } from "@linkwarden/types/global";import crypto from "crypto";import { decode, encode } from "next-auth/jwt";diff --git a/apps/web/lib/api/controllers/users/userId/deleteUserById.ts b/apps/web/lib/api/controllers/users/userId/deleteUserById.tsindex f12bcf38..c70ae98d 100644--- a/apps/web/lib/api/controllers/users/userId/deleteUserById.ts+++ b/apps/web/lib/api/controllers/users/userId/deleteUserById.ts@@ -1,7 +1,7 @@import { prisma } from "@linkwarden/prisma";import bcrypt from "bcrypt";import { removeFolder, removeFile } from "@linkwarden/filesystem";-import { DeleteUserBody } from "@linkwarden/types";+import { DeleteUserBody } from "@linkwarden/types/global";import updateSeats from "@/lib/api/stripe/updateSeats";import { meiliClient } from "@linkwarden/lib/meilisearchClient";import stripeSDK from "@/lib/api/stripe/stripeSDK";diff --git a/apps/web/lib/api/controllers/users/userId/updateUserById.ts b/apps/web/lib/api/controllers/users/userId/updateUserById.tsindex 3582ac84..9896eb7b 100644--- a/apps/web/lib/api/controllers/users/userId/updateUserById.ts+++ b/apps/web/lib/api/controllers/users/userId/updateUserById.ts@@ -1,5 +1,5 @@import { prisma } from "@linkwarden/prisma";-import { AccountSettings } from "@linkwarden/types";+import { AccountSettings } from "@linkwarden/types/global";import bcrypt from "bcrypt";import { removeFile, createFile, createFolder } from "@linkwarden/filesystem";import sendChangeEmailVerificationRequest from "@/lib/api/sendChangeEmailVerificationRequest";diff --git a/apps/web/lib/api/controllers/worker/getWorkerStats.ts b/apps/web/lib/api/controllers/worker/getWorkerStats.tsindex 634b2359..d457db45 100644--- a/apps/web/lib/api/controllers/worker/getWorkerStats.ts+++ b/apps/web/lib/api/controllers/worker/getWorkerStats.ts@@ -1,6 +1,6 @@import { MEILI_INDEX_VERSION } from "@linkwarden/lib/constants";import { prisma } from "@linkwarden/prisma";-import { WorkerStats } from "@linkwarden/types";+import { WorkerStats } from "@linkwarden/types/global";export default async function getWorkerStats(userId: number) {const linkPending = await prisma.link.count({diff --git a/apps/web/lib/client/addMemberToCollection.ts b/apps/web/lib/client/addMemberToCollection.tsindex e8e72280..dcde0abe 100644--- a/apps/web/lib/client/addMemberToCollection.ts+++ b/apps/web/lib/client/addMemberToCollection.ts@@ -1,7 +1,7 @@import {CollectionIncludingMembersAndLinkCount,Member,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import getPublicUserData from "./getPublicUserData";import { toast } from "react-hot-toast";import { TFunction } from "i18next";diff --git a/apps/web/lib/client/importBookmarks.ts b/apps/web/lib/client/importBookmarks.tsindex 63c1bda3..276bbcdb 100644--- a/apps/web/lib/client/importBookmarks.ts+++ b/apps/web/lib/client/importBookmarks.ts@@ -1,4 +1,4 @@-import { MigrationFormat, MigrationRequest } from "@linkwarden/types";+import { MigrationFormat, MigrationRequest } from "@linkwarden/types/global";import { toast } from "react-hot-toast";import JSZip from "jszip";diff --git a/apps/web/lib/client/openLink.ts b/apps/web/lib/client/openLink.tsindex e688539e..f9d101f2 100644--- a/apps/web/lib/client/openLink.ts+++ b/apps/web/lib/client/openLink.ts@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import getFormatBasedOnPreference from "@linkwarden/lib/getFormatBasedOnPreference";import { LinksRouteTo } from "@linkwarden/prisma/client";diff --git a/apps/web/lib/client/pinLink.ts b/apps/web/lib/client/pinLink.tsindex f028fedf..bc530535 100644--- a/apps/web/lib/client/pinLink.ts+++ b/apps/web/lib/client/pinLink.ts@@ -1,5 +1,5 @@import { useUpdateLink } from "@linkwarden/router/links";-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import toast from "react-hot-toast";import { useTranslation } from "next-i18next";import { useUser } from "@linkwarden/router/user";diff --git a/apps/web/lib/shared/getSuffixFromFormat.ts b/apps/web/lib/shared/getSuffixFromFormat.tsindex 837e194a..2b8761b1 100644--- a/apps/web/lib/shared/getSuffixFromFormat.ts+++ b/apps/web/lib/shared/getSuffixFromFormat.ts@@ -1,4 +1,4 @@-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";export default function getSuffixFromFormat(format: number): string | null {switch (format) {diff --git a/apps/web/pages/api/v1/archives/[linkId].ts b/apps/web/pages/api/v1/archives/[linkId].tsindex 42577f07..bc2ac150 100644--- a/apps/web/pages/api/v1/archives/[linkId].ts+++ b/apps/web/pages/api/v1/archives/[linkId].ts@@ -11,7 +11,7 @@ import { UsersAndCollections } from "@linkwarden/prisma/client";import { UploadFileSchema } from "@linkwarden/lib/schemaValidation";import isDemoMode from "@/lib/api/isDemoMode";import getSuffixFromFormat from "@/lib/shared/getSuffixFromFormat";-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";export const config = {api: {diff --git a/apps/web/pages/api/v1/dashboard/index.ts b/apps/web/pages/api/v1/dashboard/index.tsindex 073a1d9b..91623ff2 100644--- a/apps/web/pages/api/v1/dashboard/index.ts+++ b/apps/web/pages/api/v1/dashboard/index.ts@@ -1,5 +1,5 @@import type { NextApiRequest, NextApiResponse } from "next";-import { LinkRequestQuery } from "@linkwarden/types";+import { LinkRequestQuery } from "@linkwarden/types/global";import getDashboardData from "@/lib/api/controllers/dashboard/getDashboardData";import verifyUser from "@/lib/api/verifyUser";diff --git a/apps/web/pages/api/v1/links/index.ts b/apps/web/pages/api/v1/links/index.tsindex cd83afa3..dd8f8fc1 100644--- a/apps/web/pages/api/v1/links/index.ts+++ b/apps/web/pages/api/v1/links/index.ts@@ -1,7 +1,7 @@import type { NextApiRequest, NextApiResponse } from "next";import getLinks from "@/lib/api/controllers/links/getLinks";import postLink from "@/lib/api/controllers/links/postLink";-import { LinkRequestQuery } from "@linkwarden/types";+import { LinkRequestQuery } from "@linkwarden/types/global";import verifyUser from "@/lib/api/verifyUser";import deleteLinksById from "@/lib/api/controllers/links/bulk/deleteLinksById";import updateLinks from "@/lib/api/controllers/links/bulk/updateLinks";diff --git a/apps/web/pages/api/v1/migration/index.ts b/apps/web/pages/api/v1/migration/index.tsindex 74c1947f..abde311a 100644--- a/apps/web/pages/api/v1/migration/index.ts+++ b/apps/web/pages/api/v1/migration/index.ts@@ -2,7 +2,7 @@ import type { NextApiRequest, NextApiResponse } from "next";import exportData from "@/lib/api/controllers/migration/exportData";import importFromHTMLFile from "@/lib/api/controllers/migration/importFromHTMLFile";import importFromLinkwarden from "@/lib/api/controllers/migration/importFromLinkwarden";-import { MigrationFormat, MigrationRequest } from "@linkwarden/types";+import { MigrationFormat, MigrationRequest } from "@linkwarden/types/global";import verifyUser from "@/lib/api/verifyUser";import importFromWallabag from "@/lib/api/controllers/migration/importFromWallabag";import importFromOmnivore from "@/lib/api/controllers/migration/importFromOmnivore";diff --git a/apps/web/pages/api/v1/payment/index.ts b/apps/web/pages/api/v1/payment/index.tsindex 2c1f7320..450ad9a9 100644--- a/apps/web/pages/api/v1/payment/index.ts+++ b/apps/web/pages/api/v1/payment/index.ts@@ -1,6 +1,6 @@import type { NextApiRequest, NextApiResponse } from "next";import paymentCheckout from "@/lib/api/paymentCheckout";-import { Plan } from "@linkwarden/types";+import { Plan } from "@linkwarden/types/global";import { getToken } from "next-auth/jwt";import { prisma } from "@linkwarden/prisma";diff --git a/apps/web/pages/api/v1/public/collections/links/index.ts b/apps/web/pages/api/v1/public/collections/links/index.tsindex 75984822..78343590 100644--- a/apps/web/pages/api/v1/public/collections/links/index.ts+++ b/apps/web/pages/api/v1/public/collections/links/index.ts@@ -1,5 +1,5 @@import searchLinks from "@/lib/api/controllers/search/searchLinks";-import { LinkRequestQuery } from "@linkwarden/types";+import { LinkRequestQuery } from "@linkwarden/types/global";import type { NextApiRequest, NextApiResponse } from "next";export default async function collections(diff --git a/apps/web/pages/api/v1/public/collections/tags/index.ts b/apps/web/pages/api/v1/public/collections/tags/index.tsindex 0330b0a0..b1e85d0f 100644--- a/apps/web/pages/api/v1/public/collections/tags/index.ts+++ b/apps/web/pages/api/v1/public/collections/tags/index.ts@@ -1,6 +1,6 @@import getTags from "@/lib/api/controllers/tags/getTags";import { prisma } from "@linkwarden/prisma";-import { LinkRequestQuery } from "@linkwarden/types";+import { LinkRequestQuery } from "@linkwarden/types/global";import type { NextApiRequest, NextApiResponse } from "next";export default async function collections(diff --git a/apps/web/pages/api/v1/search/index.ts b/apps/web/pages/api/v1/search/index.tsindex 11ee03d4..73f4b191 100644--- a/apps/web/pages/api/v1/search/index.ts+++ b/apps/web/pages/api/v1/search/index.ts@@ -1,6 +1,6 @@import type { NextApiRequest, NextApiResponse } from "next";import searchLinks from "@/lib/api/controllers/search/searchLinks";-import { LinkRequestQuery } from "@linkwarden/types";+import { LinkRequestQuery } from "@linkwarden/types/global";import verifyUser from "@/lib/api/verifyUser";export default async function search(diff --git a/apps/web/pages/api/v1/worker/preservation.tsx b/apps/web/pages/api/v1/worker/preservation.tsxindex a5c46926..31211a1d 100644--- a/apps/web/pages/api/v1/worker/preservation.tsx+++ b/apps/web/pages/api/v1/worker/preservation.tsx@@ -3,7 +3,7 @@ import verifyUser from "@/lib/api/verifyUser";import { prisma } from "@linkwarden/prisma";import { DeletePreservationsSchema } from "@linkwarden/lib/schemaValidation";import { removeFiles } from "@linkwarden/filesystem";-import { ArchivalSettings } from "@linkwarden/types";+import { ArchivalSettings } from "@linkwarden/types/global";import { isArchivalTag } from "@linkwarden/lib/isArchivalTag";export default async function links(req: NextApiRequest, res: NextApiResponse) {diff --git a/apps/web/pages/api/v2/dashboard/index.ts b/apps/web/pages/api/v2/dashboard/index.tsindex 4daa0b4d..3868fa42 100644--- a/apps/web/pages/api/v2/dashboard/index.ts+++ b/apps/web/pages/api/v2/dashboard/index.ts@@ -1,5 +1,5 @@import type { NextApiRequest, NextApiResponse } from "next";-// import { LinkRequestQuery } from "@linkwarden/types";+// import { LinkRequestQuery } from "@linkwarden/types/global";import getDashboardDataV2 from "@/lib/api/controllers/dashboard/getDashboardDataV2";import verifyUser from "@/lib/api/verifyUser";import updateDashboardLayout from "@/lib/api/controllers/dashboard/updateDashboardLayout";diff --git a/apps/web/pages/collections/[id].tsx b/apps/web/pages/collections/[id].tsxindex 9f7c89c3..e4de127c 100644--- a/apps/web/pages/collections/[id].tsx+++ b/apps/web/pages/collections/[id].tsx@@ -4,7 +4,7 @@ import {LinkIncludingShortenedCollectionAndTags,Sort,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useRouter } from "next/router";import React, { ReactElement, useEffect, useState } from "react";import MainLayout from "@/layouts/MainLayout";diff --git a/apps/web/pages/collections/index.tsx b/apps/web/pages/collections/index.tsxindex e9525e5d..cc64e0cc 100644--- a/apps/web/pages/collections/index.tsx+++ b/apps/web/pages/collections/index.tsx@@ -3,7 +3,7 @@ import { ReactElement, useMemo, useState } from "react";import MainLayout from "@/layouts/MainLayout";import { useSession } from "next-auth/react";import SortDropdown from "@/components/SortDropdown";-import { Sort } from "@linkwarden/types";+import { Sort } from "@linkwarden/types/global";import NewCollectionModal from "@/components/ModalContent/NewCollectionModal";import PageHeader from "@/components/PageHeader";import getServerSideProps from "@/lib/client/getServerSideProps";diff --git a/apps/web/pages/dashboard.tsx b/apps/web/pages/dashboard.tsxindex 1ffc7446..8eb190c8 100644--- a/apps/web/pages/dashboard.tsx+++ b/apps/web/pages/dashboard.tsx@@ -21,7 +21,7 @@ import {DashboardSectionType,} from "@linkwarden/prisma/client";import { DashboardLinks } from "@/components/DashboardLinks";-import { ViewMode } from "@linkwarden/types";+import { ViewMode } from "@linkwarden/types/global";import ViewDropdown from "@/components/ViewDropdown";import clsx from "clsx";import Icon from "@/components/Icon";diff --git a/apps/web/pages/links/index.tsx b/apps/web/pages/links/index.tsxindex 802f3e0c..70827d6a 100644--- a/apps/web/pages/links/index.tsx+++ b/apps/web/pages/links/index.tsx@@ -2,7 +2,7 @@ import NoLinksFound from "@/components/NoLinksFound";import { useLinks } from "@linkwarden/router/links";import MainLayout from "@/layouts/MainLayout";import React, { ReactElement, useEffect, useState } from "react";-import { Sort, ViewMode } from "@linkwarden/types";+import { Sort, ViewMode } from "@linkwarden/types/global";import { useRouter } from "next/router";import LinkListOptions from "@/components/LinkListOptions";import getServerSideProps from "@/lib/client/getServerSideProps";diff --git a/apps/web/pages/links/pinned.tsx b/apps/web/pages/links/pinned.tsxindex 18eecdbb..06427a49 100644--- a/apps/web/pages/links/pinned.tsx+++ b/apps/web/pages/links/pinned.tsx@@ -1,7 +1,7 @@import MainLayout from "@/layouts/MainLayout";import React, { ReactElement, useState } from "react";import PageHeader from "@/components/PageHeader";-import { Sort, ViewMode } from "@linkwarden/types";+import { Sort, ViewMode } from "@linkwarden/types/global";import { useTranslation } from "next-i18next";import getServerSideProps from "@/lib/client/getServerSideProps";import LinkListOptions from "@/components/LinkListOptions";diff --git a/apps/web/pages/public/collections/[id]/index.tsx b/apps/web/pages/public/collections/[id]/index.tsxindex f3fdf27c..764ad55e 100644--- a/apps/web/pages/public/collections/[id]/index.tsx+++ b/apps/web/pages/public/collections/[id]/index.tsx@@ -5,7 +5,7 @@ import {CollectionIncludingMembersAndLinkCount,Sort,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useRouter } from "next/router";import React, { useEffect, useState } from "react";import Head from "next/head";diff --git a/apps/web/pages/search.tsx b/apps/web/pages/search.tsxindex 9ba00d4d..eb76b6ac 100644--- a/apps/web/pages/search.tsx+++ b/apps/web/pages/search.tsx@@ -4,7 +4,7 @@ import {LinkIncludingShortenedCollectionAndTags,Sort,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useRouter } from "next/router";import React, { ReactElement, useEffect, useState } from "react";import PageHeader from "@/components/PageHeader";diff --git a/apps/web/pages/settings/account.tsx b/apps/web/pages/settings/account.tsxindex 23442336..4add33f1 100644--- a/apps/web/pages/settings/account.tsx+++ b/apps/web/pages/settings/account.tsx@@ -1,5 +1,5 @@import { useState, useEffect, ChangeEvent, ReactElement, useMemo } from "react";-import { AccountSettings } from "@linkwarden/types";+import { AccountSettings } from "@linkwarden/types/global";import { toast } from "react-hot-toast";import SettingsLayout from "@/layouts/SettingsLayout";import TextInput from "@/components/TextInput";diff --git a/apps/web/pages/subscribe.tsx b/apps/web/pages/subscribe.tsxindex be601730..f226fe0b 100644--- a/apps/web/pages/subscribe.tsx+++ b/apps/web/pages/subscribe.tsx@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";import { toast } from "react-hot-toast";import { useRouter } from "next/router";import CenteredForm from "@/components/CenteredForm";-import { Plan } from "@linkwarden/types";+import { Plan } from "@linkwarden/types/global";import { Button } from "@/components/ui/button";import getServerSideProps from "@/lib/client/getServerSideProps";import { Trans, useTranslation } from "next-i18next";diff --git a/apps/web/pages/tags/[id].tsx b/apps/web/pages/tags/[id].tsxindex 87b46a5b..5af63f16 100644--- a/apps/web/pages/tags/[id].tsx+++ b/apps/web/pages/tags/[id].tsx@@ -6,7 +6,7 @@ import {Sort,TagIncludingLinkCount,ViewMode,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useLinks } from "@linkwarden/router/links";import BulkDeleteLinksModal from "@/components/ModalContent/BulkDeleteLinksModal";import BulkEditLinksModal from "@/components/ModalContent/BulkEditLinksModal";diff --git a/apps/web/store/localSettings.ts b/apps/web/store/localSettings.tsindex f24f0e20..58b68671 100644--- a/apps/web/store/localSettings.ts+++ b/apps/web/store/localSettings.ts@@ -1,4 +1,4 @@-import { Sort } from "@linkwarden/types";+import { Sort } from "@linkwarden/types/global";import { create } from "zustand";type LocalSettings = {diff --git a/apps/worker/lib/archiveHandler.ts b/apps/worker/lib/archiveHandler.tsindex 004e1f56..bc83e202 100644--- a/apps/worker/lib/archiveHandler.ts+++ b/apps/worker/lib/archiveHandler.ts@@ -11,9 +11,9 @@ import handleScreenshotAndPdf from "./preservationScheme/handleScreenshotAndPdf"import imageHandler from "./preservationScheme/imageHandler";import pdfHandler from "./preservationScheme/pdfHandler";import autoTagLink from "./autoTagLink";-import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types";+import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types/global";import { isArchivalTag } from "@linkwarden/lib/isArchivalTag";-import { ArchivalSettings } from "@linkwarden/types";+import { ArchivalSettings } from "@linkwarden/types/global";import { getDefaultContextOptions } from "./browser";const BROWSER_TIMEOUT = Number(process.env.BROWSER_TIMEOUT) || 5;diff --git a/apps/worker/lib/preservationScheme/handleScreenshotAndPdf.ts b/apps/worker/lib/preservationScheme/handleScreenshotAndPdf.tsindex 262bde29..bb6804e6 100644--- a/apps/worker/lib/preservationScheme/handleScreenshotAndPdf.ts+++ b/apps/worker/lib/preservationScheme/handleScreenshotAndPdf.ts@@ -1,8 +1,8 @@import { Page } from "playwright";import { createFile } from "@linkwarden/filesystem";import { prisma } from "@linkwarden/prisma";-import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types";-import { ArchivalSettings } from "@linkwarden/types";+import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types/global";+import { ArchivalSettings } from "@linkwarden/types/global";const handleScreenshotAndPdf = async (link: LinkWithCollectionOwnerAndTags,diff --git a/apps/worker/workers/linkProcessing.ts b/apps/worker/workers/linkProcessing.tsindex 80851d77..886c3b4f 100644--- a/apps/worker/workers/linkProcessing.ts+++ b/apps/worker/workers/linkProcessing.ts@@ -1,5 +1,5 @@import archiveHandler from "../lib/archiveHandler";-import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types";+import { LinkWithCollectionOwnerAndTags } from "@linkwarden/types/global";import { delay } from "@linkwarden/lib/utils";import getLinkBatchFairly from "../lib/getLinkBatchFairly";import { launchBrowser } from "../lib/browser";diff --git a/packages/lib/formatStats.ts b/packages/lib/formatStats.tsindex 8d62e2c9..c1ee4dff 100644--- a/packages/lib/formatStats.ts+++ b/packages/lib/formatStats.ts@@ -1,4 +1,4 @@-import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types";+import { LinkIncludingShortenedCollectionAndTags } from "@linkwarden/types/global";import { Link } from "@linkwarden/prisma/client";export function formatAvailable(diff --git a/packages/lib/getFormatBasedOnPreference.ts b/packages/lib/getFormatBasedOnPreference.tsindex ed6a24d9..e298b86f 100644--- a/packages/lib/getFormatBasedOnPreference.ts+++ b/packages/lib/getFormatBasedOnPreference.ts@@ -1,7 +1,7 @@import {ArchivedFormat,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";// Don't use prisma client's LinksRouteTo, it'll crash in production (React Native)type LinksRouteTo =diff --git a/packages/lib/getFormatFromContentType.ts b/packages/lib/getFormatFromContentType.tsindex d5eccd08..a68398bb 100644--- a/packages/lib/getFormatFromContentType.ts+++ b/packages/lib/getFormatFromContentType.ts@@ -1,4 +1,4 @@-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";const getFormatFromContentType = (contentType: string): ArchivedFormat => {switch (contentType) {diff --git a/packages/lib/getLinkTypeFromFormat.ts b/packages/lib/getLinkTypeFromFormat.tsindex 936247a2..1a564194 100644--- a/packages/lib/getLinkTypeFromFormat.ts+++ b/packages/lib/getLinkTypeFromFormat.ts@@ -1,4 +1,4 @@-import { ArchivedFormat } from "@linkwarden/types";+import { ArchivedFormat } from "@linkwarden/types/global";const getLinkTypeFromFormat = (format: ArchivedFormatdiff --git a/packages/lib/getOriginalFormat.ts b/packages/lib/getOriginalFormat.tsindex 8d0e9380..aef7ec25 100644--- a/packages/lib/getOriginalFormat.ts+++ b/packages/lib/getOriginalFormat.ts@@ -1,7 +1,7 @@import {ArchivedFormat,LinkIncludingShortenedCollectionAndTags,-} from "@linkwarden/types";+} from "@linkwarden/types/global";const getOriginalFormat = (link: LinkIncludingShortenedCollectionAndTagsdiff --git a/packages/lib/schemaValidation.ts b/packages/lib/schemaValidation.tsindex 15eec1b2..901d32d8 100644--- a/packages/lib/schemaValidation.ts+++ b/packages/lib/schemaValidation.ts@@ -1,4 +1,4 @@-import { ArchivedFormat, TokenExpiry } from "@linkwarden/types";+import { ArchivedFormat, TokenExpiry } from "@linkwarden/types/global";import {AiTaggingMethod,LinksRouteTo,diff --git a/packages/router/collections.tsx b/packages/router/collections.tsxindex 2f0c430e..0100d88d 100644--- a/packages/router/collections.tsx+++ b/packages/router/collections.tsx@@ -2,7 +2,7 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";import {CollectionIncludingMembersAndLinkCount,MobileAuth,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useSession } from "next-auth/react";const useCollections = (auth?: MobileAuth) => {diff --git a/packages/router/dashboardData.tsx b/packages/router/dashboardData.tsxindex 07300222..db1bda8d 100644--- a/packages/router/dashboardData.tsx+++ b/packages/router/dashboardData.tsx@@ -1,5 +1,5 @@import { UpdateDashboardLayoutSchemaType } from "@linkwarden/lib/schemaValidation";-import { MobileAuth } from "@linkwarden/types";+import { MobileAuth } from "@linkwarden/types/global";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { useSession } from "next-auth/react";diff --git a/packages/router/links.tsx b/packages/router/links.tsxindex e79cd7c0..d7aa051a 100644--- a/packages/router/links.tsx+++ b/packages/router/links.tsx@@ -10,7 +10,7 @@ import {LinkIncludingShortenedCollectionAndTags,LinkRequestQuery,MobileAuth,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useSession } from "next-auth/react";import {LinkArchiveActionSchemaType,diff --git a/packages/router/publicLinks.tsx b/packages/router/publicLinks.tsxindex 036a9a53..27595c16 100644--- a/packages/router/publicLinks.tsx+++ b/packages/router/publicLinks.tsx@@ -3,7 +3,7 @@ import { useMemo } from "react";import {LinkIncludingShortenedCollectionAndTags,LinkRequestQuery,-} from "@linkwarden/types";+} from "@linkwarden/types/global";import { useRouter } from "next/router";const usePublicLinks = (params: LinkRequestQuery = {}) => {diff --git a/packages/router/tags.tsx b/packages/router/tags.tsxindex 9a4894fc..53cdff65 100644--- a/packages/router/tags.tsx+++ b/packages/router/tags.tsx@@ -4,7 +4,7 @@ import {useQueryClient,UseQueryResult,} from "@tanstack/react-query";-import { MobileAuth, TagIncludingLinkCount } from "@linkwarden/types";+import { MobileAuth, TagIncludingLinkCount } from "@linkwarden/types/global";import { useSession } from "next-auth/react";import { Tag } from "@linkwarden/prisma/client";import { ArchivalTagOption } from "@linkwarden/types/inputSelect";diff --git a/packages/router/user.tsx b/packages/router/user.tsxindex 82db1780..ae68da61 100644--- a/packages/router/user.tsx+++ b/packages/router/user.tsx@@ -4,7 +4,7 @@ import {Subscription,User,} from "@linkwarden/prisma/client";-import { MobileAuth } from "@linkwarden/types";+import { MobileAuth } from "@linkwarden/types/global";import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";import { useSession } from "next-auth/react";diff --git a/packages/router/worker.tsx b/packages/router/worker.tsxindex 5f9a8f82..c79b3ad8 100644--- a/packages/router/worker.tsx+++ b/packages/router/worker.tsx@@ -1,6 +1,6 @@import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { useSession } from "next-auth/react";-import { WorkerStats } from "@linkwarden/types";+import { WorkerStats } from "@linkwarden/types/global";import { DeletePreservationsSchemaType } from "@linkwarden/lib/schemaValidation";const useWorker = () => {diff --git a/packages/types/index.ts b/packages/types/index.tsdeleted file mode 100644index 09370234..00000000--- a/packages/types/index.ts+++ /dev/null@@ -1 +0,0 @@-export * from "./global";