@@ -164,11 +190,18 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
{t("words.lists")}
-
>
)}
- {hasListData && hasData && (
+ {hasInboxData && (
+ <>
+
+ {t("words.inbox")}
+
+
+ >
+ )}
+ {(hasListData || hasInboxData) && (
{
)
}
+
+export const SortByAlphabeticalInboxList = ({ view }: ListListProps) => {
+ const isDesc = useFeedListSortSelector((s) => s.order === "desc")
+
+ const inboxes = useInboxByView(view)
+
+ const sortedInboxes = useMemo(() => {
+ const res = inboxes.sort((a, b) => {
+ return sortByAlphabet(a.title ?? "", b.title ?? "")
+ })
+
+ return isDesc ? res.reverse() : res
+ }, [isDesc, inboxes])
+
+ return (
+
+ {sortedInboxes.map((inbox) => (
+
+ ))}
+
+ )
+}
diff --git a/apps/renderer/src/modules/feed-column/sort-by/index.tsx b/apps/renderer/src/modules/feed-column/sort-by/index.tsx
index 171070b1c..26575ec26 100644
--- a/apps/renderer/src/modules/feed-column/sort-by/index.tsx
+++ b/apps/renderer/src/modules/feed-column/sort-by/index.tsx
@@ -1,5 +1,9 @@
import { useFeedListSortSelector } from "../atom"
-import { SortByAlphabeticalFeedList, SortByAlphabeticalListList } from "./SortByAlphabeticalList"
+import {
+ SortByAlphabeticalFeedList,
+ SortByAlphabeticalInboxList,
+ SortByAlphabeticalListList,
+} from "./SortByAlphabeticalList"
import { SortByUnreadFeedList } from "./SortByUnreadList"
import type { FeedListProps, ListListProps } from "./types"
@@ -25,3 +29,13 @@ export const SortByAlphabeticalList = (props: ListListProps) => {
}
}
}
+
+export const SortByAlphabeticalInbox = (props: ListListProps) => {
+ const by = useFeedListSortSelector((s) => s.by)
+
+ switch (by) {
+ default: {
+ return
+ }
+ }
+}
diff --git a/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx b/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx
index 891e7c37d..1b6511252 100644
--- a/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx
+++ b/apps/renderer/src/pages/(main)/(layer)/(subview)/discover/index.tsx
@@ -5,6 +5,7 @@ import { useSearchParams } from "react-router-dom"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs"
import { DiscoverForm } from "~/modules/discover/form"
import { DiscoverImport } from "~/modules/discover/import"
+import { DiscoverInboxList } from "~/modules/discover/inbox-list-form"
import { Recommendations } from "~/modules/discover/recommendations"
import { DiscoverRSS3 } from "~/modules/discover/rss3-form"
import { DiscoverUser } from "~/modules/discover/user-form"
@@ -28,6 +29,10 @@ const tabs: {
name: "words.rsshub",
value: "rsshub",
},
+ {
+ name: "words.inbox",
+ value: "inbox",
+ },
{
name: "words.rss3",
value: "rss3",
@@ -36,11 +41,6 @@ const tabs: {
name: "words.user",
value: "user",
},
- {
- name: "words.email",
- value: "email",
- disabled: true,
- },
{
name: "words.import",
value: "import",
@@ -84,9 +84,10 @@ export function Component() {
)
}
-const TabComponent: Record
> = {
+const TabComponent: Record> = {
import: DiscoverImport,
rss3: DiscoverRSS3,
+ inbox: DiscoverInboxList,
user: DiscoverUser,
default: DiscoverForm,
}
diff --git a/apps/renderer/src/providers/extension-expose-provider.tsx b/apps/renderer/src/providers/extension-expose-provider.tsx
index 48a35b321..ee071d38f 100644
--- a/apps/renderer/src/providers/extension-expose-provider.tsx
+++ b/apps/renderer/src/providers/extension-expose-provider.tsx
@@ -8,6 +8,7 @@ import { getGeneralSettings } from "~/atoms/settings/general"
import { getUISettings } from "~/atoms/settings/ui"
import { useModalStack } from "~/components/ui/modal"
import { FeedForm } from "~/modules/discover/feed-form"
+import { ListForm } from "~/modules/discover/list-form"
import { usePresentUserProfileModal } from "~/modules/profile/hooks"
export const ExtensionExposeProvider = () => {
@@ -38,15 +39,12 @@ export const ExtensionExposeProvider = () => {
title: options?.isList
? t("sidebar.feed_actions.edit_list")
: t("sidebar.feed_actions.edit_feed"),
- content: ({ dismiss }) => (
-
- ),
+ content: ({ dismiss }) =>
+ options?.isList ? (
+
+ ) : (
+
+ ),
})
},
diff --git a/apps/renderer/src/queries/entries.ts b/apps/renderer/src/queries/entries.ts
index 21854f238..de09647ec 100644
--- a/apps/renderer/src/queries/entries.ts
+++ b/apps/renderer/src/queries/entries.ts
@@ -7,23 +7,29 @@ import { entryHistoryActions } from "~/store/entry-history/action"
export const entries = {
entries: ({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
read,
limit,
isArchived,
}: {
- id?: number | string
+ feedId?: number | string
+ inboxId?: number | string
+ listId?: number | string
view?: number
read?: boolean
limit?: number
isArchived?: boolean
}) =>
defineQuery(
- ["entries", id, view, read, limit],
+ ["entries", inboxId || listId || feedId, view, read, limit],
async ({ pageParam }) =>
entryActions.fetchEntries({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
read,
limit,
@@ -31,7 +37,7 @@ export const entries = {
isArchived,
}),
{
- rootKey: ["entries", id],
+ rootKey: ["entries", inboxId || listId || feedId],
structuralSharing: false,
},
),
@@ -39,6 +45,10 @@ export const entries = {
defineQuery(["entry", id], async () => entryActions.fetchEntryById(id), {
rootKey: ["entries"],
}),
+ byInboxId: (id: string) =>
+ defineQuery(["entry", id], async () => entryActions.fetchInboxEntryById(id), {
+ rootKey: ["entries"],
+ }),
preview: (id: string) =>
defineQuery(
["entries-preview", id],
@@ -57,22 +67,28 @@ export const entries = {
),
checkNew: ({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
read,
fetchedTime,
}: {
- id?: number | string
+ feedId?: number | string
+ inboxId?: number | string
+ listId?: number | string
view?: number
read?: boolean
fetchedTime: number
}) =>
defineQuery(
- ["entry-checkNew", id, view, read, fetchedTime],
+ ["entry-checkNew", inboxId || listId || feedId, view, read, fetchedTime],
async () => {
const query = {
...getEntriesParams({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
}),
read,
@@ -95,7 +111,7 @@ export const entries = {
},
{
- rootKey: ["entry-checkNew", id],
+ rootKey: ["entry-checkNew", inboxId || listId || feedId],
},
),
@@ -110,22 +126,24 @@ export const entries = {
}
export const useEntries = ({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
read,
isArchived,
- isList,
}: {
- id?: number | string
+ feedId?: number | string
+ inboxId?: number | string
+ listId?: number | string
view?: number
read?: boolean
isArchived?: boolean
- isList?: boolean
}) =>
- useAuthInfiniteQuery(entries.entries({ id, view, read, isArchived }), {
- enabled: id !== undefined,
+ useAuthInfiniteQuery(entries.entries({ feedId, inboxId, listId, view, read, isArchived }), {
+ enabled: feedId !== undefined || inboxId !== undefined || listId !== undefined,
getNextPageParam: (lastPage) =>
- isList
+ inboxId
? lastPage.data?.at(-1)?.entries.insertedAt
: lastPage.data?.at(-1)?.entries.publishedAt,
initialPageParam: undefined,
diff --git a/apps/renderer/src/queries/feed.ts b/apps/renderer/src/queries/feed.ts
index 3419c3ef7..a1a4f27bf 100644
--- a/apps/renderer/src/queries/feed.ts
+++ b/apps/renderer/src/queries/feed.ts
@@ -12,14 +12,13 @@ import { feedActions } from "~/store/feed"
import { entries } from "./entries"
export const feed = {
- byId: ({ id, url, isList }: FeedQueryParams) =>
+ byId: ({ id, url }: FeedQueryParams) =>
defineQuery(
["feed", id, url],
async () =>
feedActions.fetchFeedById({
id,
url,
- isList,
}),
{
rootKey: ["feed"],
@@ -41,12 +40,11 @@ export const feed = {
}),
}
-export const useFeed = ({ id, url, isList }: FeedQueryParams) =>
+export const useFeed = ({ id, url }: FeedQueryParams) =>
useAuthQuery(
feed.byId({
id,
url,
- isList,
}),
{
enabled:
@@ -78,7 +76,7 @@ export const useRefreshFeedMutation = (feedId?: string) =>
if (!feedId) return
entries
.entries({
- id: feedId!,
+ feedId: feedId!,
})
.invalidateRoot()
},
diff --git a/apps/renderer/src/queries/inboxes.ts b/apps/renderer/src/queries/inboxes.ts
new file mode 100644
index 000000000..d715fa612
--- /dev/null
+++ b/apps/renderer/src/queries/inboxes.ts
@@ -0,0 +1,15 @@
+import { useAuthQuery } from "~/hooks/common"
+import { defineQuery } from "~/lib/defineQuery"
+import { inboxActions } from "~/store/inbox"
+
+export const inboxes = {
+ byId: ({ id }: { id: string }) =>
+ defineQuery(["lists", id], async () => inboxActions.fetchInboxById(id), {
+ rootKey: ["lists"],
+ }),
+}
+
+export const useInbox = ({ id }: { id?: string }) =>
+ useAuthQuery(inboxes.byId({ id: id! }), {
+ enabled: !!id,
+ })
diff --git a/apps/renderer/src/queries/lists.ts b/apps/renderer/src/queries/lists.ts
index 24da78477..b7475a4b7 100644
--- a/apps/renderer/src/queries/lists.ts
+++ b/apps/renderer/src/queries/lists.ts
@@ -13,7 +13,7 @@ export const lists = {
}),
}
-export const useList = ({ id }: { id: string }) =>
- useAuthQuery(lists.byId({ id }), {
+export const useList = ({ id }: { id?: string }) =>
+ useAuthQuery(lists.byId({ id: id! }), {
enabled: !!id,
})
diff --git a/apps/renderer/src/services/inbox.ts b/apps/renderer/src/services/inbox.ts
new file mode 100644
index 000000000..bb5038fb2
--- /dev/null
+++ b/apps/renderer/src/services/inbox.ts
@@ -0,0 +1,33 @@
+import { browserDB } from "~/database"
+import type { InboxModel } from "~/models/types"
+
+import { BaseService } from "./base"
+import { CleanerService } from "./cleaner"
+
+class ServiceStatic extends BaseService<{ id: string }> {
+ constructor() {
+ super(browserDB.inboxes)
+ }
+
+ override async upsertMany(data: InboxModel[]) {
+ CleanerService.reset(data.map((d) => ({ type: "feed", id: d.id! })))
+
+ return this.table.bulkPut(data)
+ }
+
+ override async findAll() {
+ return super.findAll() as unknown as InboxModel[]
+ }
+
+ override async upsert(data: InboxModel): Promise {
+ if (!data.id) return null
+ CleanerService.reset([{ type: "feed", id: data.id }])
+ return this.table.put(data)
+ }
+
+ async bulkDelete(ids: string[]) {
+ return this.table.bulkDelete(ids)
+ }
+}
+
+export const InboxService = new ServiceStatic()
diff --git a/apps/renderer/src/services/subscription.ts b/apps/renderer/src/services/subscription.ts
index af0952eb7..87f9bc0ce 100644
--- a/apps/renderer/src/services/subscription.ts
+++ b/apps/renderer/src/services/subscription.ts
@@ -27,7 +27,7 @@ class SubscriptionServiceStatic extends BaseService {
override async upsertMany(data: SubscriptionFlatModel[]) {
return this.table.bulkPut(
- data.map(({ feeds, ...d }: any) => ({
+ data.map(({ feeds, lists, inboxes, ...d }: any) => ({
...d,
id: this.uniqueId(d.userId, d.feedId),
})),
diff --git a/apps/renderer/src/store/entry/store.ts b/apps/renderer/src/store/entry/store.ts
index 5ad529df2..06fb4f74a 100644
--- a/apps/renderer/src/store/entry/store.ts
+++ b/apps/renderer/src/store/entry/store.ts
@@ -10,6 +10,7 @@ import { EntryService } from "~/services"
import { feedActions } from "../feed"
import { imageActions } from "../image"
+import { inboxActions } from "../inbox"
import { feedUnreadActions } from "../unread"
import { createZustandStore, doMutationAndTransaction } from "../utils/helper"
import { internal_batchMarkRead } from "./helper"
@@ -67,34 +68,65 @@ class EntryActions {
return data
}
+ async fetchInboxEntryById(entryId: string) {
+ const { data } = await apiClient.entries.inbox.$get({
+ query: {
+ id: entryId,
+ },
+ })
+ if (data) {
+ this.upsertMany([
+ // patch data, should omit `read` because the network race condition or server cache
+ omit(data, "read") as any,
+ ])
+ inboxActions.upsertMany([data.feeds])
+ }
+
+ return data
+ }
+
async fetchEntries({
- id,
+ feedId,
+ inboxId,
+ listId,
view,
read,
limit,
pageParam,
isArchived,
}: {
- id?: number | string
+ feedId?: number | string
+ inboxId?: number | string
+ listId?: number | string
view?: number
read?: boolean
limit?: number
pageParam?: string
isArchived?: boolean
}) {
- const data = await apiClient.entries.$post({
- json: {
- publishedAfter: pageParam,
- read,
- limit,
- isArchived,
- // withContent: true,
- ...getEntriesParams({
- id,
- view,
- }),
- },
- })
+ const data = inboxId
+ ? await apiClient.entries.inbox.$post({
+ json: {
+ publishedAfter: pageParam,
+ limit,
+ inboxId: `${inboxId}`,
+ },
+ })
+ : await apiClient.entries.$post({
+ json: {
+ publishedAfter: pageParam,
+ read,
+ limit,
+ isArchived,
+ // withContent: true,
+ ...getEntriesParams({
+ feedId,
+ inboxId,
+ listId,
+ view,
+ }),
+ },
+ })
if (data.data) {
this.upsertMany(data.data)
@@ -226,7 +258,7 @@ class EntryActions {
// Push entryFeedMap
entryFeedMap[item.entries.id] = item.feeds.id
// Push entryCollection
- if (item.collections) {
+ if ("collections" in item) {
entryCollection[item.entries.id] = item.collections
}
@@ -294,7 +326,7 @@ class EntryActions {
)
// Push entryCollection
- if (item.collections) {
+ if ("collections" in item) {
entryCollection[item.entries.id] = item.collections
}
}
diff --git a/apps/renderer/src/store/feed/store.ts b/apps/renderer/src/store/feed/store.ts
index 3858cd224..9c62fdc15 100644
--- a/apps/renderer/src/store/feed/store.ts
+++ b/apps/renderer/src/store/feed/store.ts
@@ -133,6 +133,10 @@ export const getPreferredTitle = (feed?: FeedOrListRespModel | null) => {
return feed?.title
}
+ if (feed.type === "inbox") {
+ return feed.title || `${feed.id.slice(0, 1).toUpperCase()}${feed.id.slice(1)}'s Inbox`
+ }
+
const subscription = getSubscriptionByFeedId(feed.id)
return subscription?.title || feed.title
}
diff --git a/apps/renderer/src/store/feed/types.ts b/apps/renderer/src/store/feed/types.ts
index 1822b2e36..90f6d8cca 100644
--- a/apps/renderer/src/store/feed/types.ts
+++ b/apps/renderer/src/store/feed/types.ts
@@ -5,4 +5,4 @@ type FeedId = string
export interface FeedState {
feeds: Record
}
-export type FeedQueryParams = { id?: string; url?: string; isList?: boolean }
+export type FeedQueryParams = { id?: string; url?: string }
diff --git a/apps/renderer/src/store/inbox/hooks.ts b/apps/renderer/src/store/inbox/hooks.ts
new file mode 100644
index 000000000..8120801ee
--- /dev/null
+++ b/apps/renderer/src/store/inbox/hooks.ts
@@ -0,0 +1,11 @@
+import type { FeedViewType } from "~/lib/enum"
+import type { InboxModel } from "~/models"
+
+import { useInboxStore } from "./store"
+
+export const useInboxById = (inboxId: Nullable): InboxModel | null =>
+ useInboxStore((state) => (inboxId ? state.inboxes[inboxId] : null))
+
+export const useInboxByView = (view: FeedViewType) => {
+ return useInboxStore((state) => (view === 0 ? Object.values(state.inboxes) : []))
+}
diff --git a/apps/renderer/src/store/inbox/index.ts b/apps/renderer/src/store/inbox/index.ts
new file mode 100644
index 000000000..a92fe14dc
--- /dev/null
+++ b/apps/renderer/src/store/inbox/index.ts
@@ -0,0 +1,3 @@
+export * from "./hooks"
+export * from "./store"
+export * from "./types"
diff --git a/apps/renderer/src/store/inbox/store.ts b/apps/renderer/src/store/inbox/store.ts
new file mode 100644
index 000000000..f0a8b34ea
--- /dev/null
+++ b/apps/renderer/src/store/inbox/store.ts
@@ -0,0 +1,52 @@
+import { runTransactionInScope } from "~/database"
+import { apiClient } from "~/lib/api-fetch"
+import type { InboxModel } from "~/models"
+import { InboxService } from "~/services/inbox"
+
+import { createImmerSetter, createZustandStore } from "../utils/helper"
+import type { InboxState } from "./types"
+
+export const useInboxStore = createZustandStore("inbox")(() => ({
+ inboxes: {},
+}))
+
+const set = createImmerSetter(useInboxStore)
+
+class InboxActionStatic {
+ upsertMany(inboxs: InboxModel[]) {
+ if (inboxs.length === 0) return
+ set((state) => {
+ for (const inbox of inboxs) {
+ state.inboxes[inbox.id] = inbox
+ }
+ return state
+ })
+
+ runTransactionInScope(() => InboxService.upsertMany(inboxs))
+ }
+
+ async fetchInboxById(id: string) {
+ const res = await apiClient.inboxes.$get({
+ query: {
+ handle: id,
+ },
+ })
+ this.upsertMany([res.data])
+
+ return res.data
+ }
+
+ clear() {
+ set((state) => {
+ state.inboxes = {}
+ })
+ }
+
+ clearByInboxId(id: string) {
+ set((state) => {
+ delete state.inboxes[id]
+ })
+ }
+}
+
+export const inboxActions = new InboxActionStatic()
diff --git a/apps/renderer/src/store/inbox/types.ts b/apps/renderer/src/store/inbox/types.ts
new file mode 100644
index 000000000..2154082d0
--- /dev/null
+++ b/apps/renderer/src/store/inbox/types.ts
@@ -0,0 +1,7 @@
+import type { InboxModel } from "~/models"
+
+type InboxId = string
+
+export interface InboxState {
+ inboxes: Record
+}
diff --git a/apps/renderer/src/store/subscription/store.ts b/apps/renderer/src/store/subscription/store.ts
index 988ba2055..9ba78a2c3 100644
--- a/apps/renderer/src/store/subscription/store.ts
+++ b/apps/renderer/src/store/subscription/store.ts
@@ -7,12 +7,13 @@ import { runTransactionInScope } from "~/database"
import { apiClient } from "~/lib/api-fetch"
import { FeedViewType } from "~/lib/enum"
import { capitalizeFirstLetter } from "~/lib/utils"
-import type { FeedModel, ListModelPoplutedFeeds, SubscriptionModel } from "~/models"
+import type { FeedModel, InboxModel, ListModelPoplutedFeeds, SubscriptionModel } from "~/models"
import { SubscriptionService } from "~/services"
import { entryActions } from "../entry"
import { feedActions, getFeedById } from "../feed"
-import { listActions } from "../list/store"
+import { inboxActions } from "../inbox"
+import { listActions } from "../list"
import { feedUnreadActions } from "../unread"
import { createZustandStore, doMutationAndTransaction } from "../utils/helper"
@@ -120,16 +121,20 @@ class SubscriptionActions {
const feeds = [] as FeedModel[]
const lists = [] as ListModelPoplutedFeeds[]
+ const inboxes = [] as InboxModel[]
for (const subscription of res.data) {
if ("feeds" in subscription) {
feeds.push(subscription.feeds)
- } else {
+ } else if ("lists" in subscription) {
lists.push(subscription.lists)
+ } else if ("inboxes" in subscription) {
+ inboxes.push(subscription.inboxes)
}
}
this.updateCategoryOpenState(transformedData.filter((s) => s.category || s.defaultCategory))
feedActions.upsertMany(feeds)
listActions.upsertMany(lists)
+ inboxActions.upsertMany(inboxes)
return res.data
}
@@ -141,7 +146,11 @@ class SubscriptionActions {
set((state) =>
produce(state, (state) => {
subscriptions.forEach((subscription) => {
- state.data[subscription.feedId] = omit(subscription, "feeds")
+ state.data[subscription.feedId] = omit(subscription, [
+ "feeds",
+ "lists",
+ "inboxes",
+ ]) as SubscriptionFlatModel
state.feedIdByView[subscription.view].push(subscription.feedId)
return state
})
diff --git a/icons/mgc/inbox_cute_fi.svg b/icons/mgc/inbox_cute_fi.svg
new file mode 100644
index 000000000..0450ef3f1
--- /dev/null
+++ b/icons/mgc/inbox_cute_fi.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/locales/app/ar-DZ.json b/locales/app/ar-DZ.json
index 7f8417649..1a6c47c52 100644
--- a/locales/app/ar-DZ.json
+++ b/locales/app/ar-DZ.json
@@ -188,7 +188,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "استكشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "العناصر",
"words.language": "اللغة",
diff --git a/locales/app/ar-IQ.json b/locales/app/ar-IQ.json
index 7fee8b035..ec3e70307 100644
--- a/locales/app/ar-IQ.json
+++ b/locales/app/ar-IQ.json
@@ -192,7 +192,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "اكتشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "عناصر",
"words.language": "اللغة",
diff --git a/locales/app/ar-KW.json b/locales/app/ar-KW.json
index 1e6151319..601b2d8ee 100644
--- a/locales/app/ar-KW.json
+++ b/locales/app/ar-KW.json
@@ -192,7 +192,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "استكشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "عناصر",
"words.language": "اللغة",
diff --git a/locales/app/ar-MA.json b/locales/app/ar-MA.json
index db0ec7180..8787e3590 100644
--- a/locales/app/ar-MA.json
+++ b/locales/app/ar-MA.json
@@ -188,7 +188,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "استكشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "عناصر",
"words.language": "اللغة",
diff --git a/locales/app/ar-SA.json b/locales/app/ar-SA.json
index b7ab184d0..78793ad86 100644
--- a/locales/app/ar-SA.json
+++ b/locales/app/ar-SA.json
@@ -188,7 +188,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "استكشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "عناصر",
"words.language": "اللغة",
diff --git a/locales/app/ar-TN.json b/locales/app/ar-TN.json
index 0867f3181..bfef62487 100644
--- a/locales/app/ar-TN.json
+++ b/locales/app/ar-TN.json
@@ -192,7 +192,6 @@
"words.add": "إضافة",
"words.confirm": "تأكيد",
"words.discover": "استكشاف",
- "words.email": "البريد الإلكتروني",
"words.import": "استيراد",
"words.items": "عناصر",
"words.language": "اللغة",
diff --git a/locales/app/de.json b/locales/app/de.json
index be19d1219..2aea303b8 100644
--- a/locales/app/de.json
+++ b/locales/app/de.json
@@ -192,7 +192,6 @@
"words.add": "Hinzufügen",
"words.confirm": "Bestätigen",
"words.discover": "Entdecken",
- "words.email": "E-Mail",
"words.import": "Importieren",
"words.items": "Elemente",
"words.language": "Sprache",
diff --git a/locales/app/en.json b/locales/app/en.json
index 64272ca93..9757eb883 100644
--- a/locales/app/en.json
+++ b/locales/app/en.json
@@ -21,6 +21,27 @@
"discover.import.parsedErrorItems": "Parsed Error Items",
"discover.import.result": " feeds were successfully imported, were already subscribed to, and failed to import.",
"discover.import.successfulItems": "Successful Items",
+ "discover.inbox.actions": "Actions",
+ "discover.inbox.description": "You can receive information via email and webhooks through the inbox.",
+ "discover.inbox.email": "Email",
+ "discover.inbox.handle": "Handle",
+ "discover.inbox.secret": "Secret",
+ "discover.inbox.title": "Title",
+ "discover.inbox.webhooks_docs": "Webhooks docs.",
+ "discover.inbox_create": "New Inbox",
+ "discover.inbox_create_description": "You don't have an inbox yet. Create an inbox to receive information via inbox.",
+ "discover.inbox_create_error": "Failed to create inbox.",
+ "discover.inbox_create_success": "Inbox created successfully.",
+ "discover.inbox_destroy": "Destroy",
+ "discover.inbox_destroy_confirm": "Confirm destroy the inbox?",
+ "discover.inbox_destroy_error": "Failed to destroy inbox.",
+ "discover.inbox_destroy_success": "Inbox destroyed successfully.",
+ "discover.inbox_destroy_warning": "Warning: once destroyed, the email will no longer be available, and all content will be permanently deleted and unrecoverable.",
+ "discover.inbox_handle": "Handle",
+ "discover.inbox_title": "Title",
+ "discover.inbox_update": "Update",
+ "discover.inbox_update_error": "Failed to change inbox.",
+ "discover.inbox_update_success": "Inbox updated successfully.",
"discover.popular": "Popular",
"discover.preview": "Preview",
"discover.rss_hub_route": "RSSHub Route",
@@ -168,18 +189,21 @@
"sidebar.category_remove_dialog.title": "Remove Category",
"sidebar.feed_actions.claim": "Claim",
"sidebar.feed_actions.claim_feed": "Claim Feed",
+ "sidebar.feed_actions.copy_email_address": "Copy email address",
"sidebar.feed_actions.copy_feed_id": "Copy feed ID",
"sidebar.feed_actions.copy_feed_url": "Copy feed URL",
"sidebar.feed_actions.copy_list_id": "Copy list ID",
"sidebar.feed_actions.copy_list_url": "Copy list URL",
"sidebar.feed_actions.edit": "Edit",
"sidebar.feed_actions.edit_feed": "Edit feed",
+ "sidebar.feed_actions.edit_inbox": "Edit inbox",
"sidebar.feed_actions.edit_list": "Edit list",
"sidebar.feed_actions.feed_owned_by_you": "This feed is owned by you",
"sidebar.feed_actions.list_owned_by_you": "This list is owned by you",
"sidebar.feed_actions.mark_all_as_read": "Mark all as read",
"sidebar.feed_actions.navigate_to_feed": "Navigate to feed",
"sidebar.feed_actions.navigate_to_list": "Navigate to list",
+ "sidebar.feed_actions.new_inbox": "New inbox",
"sidebar.feed_actions.open_feed_in_browser": "Open feed in {{which}}",
"sidebar.feed_actions.open_list_in_browser": "Open list in {{which}}",
"sidebar.feed_actions.open_site_in_browser": "Open site in {{which}}",
@@ -227,9 +251,9 @@
"words.browser": "Browser",
"words.confirm": "Confirm",
"words.discover": "Discover",
- "words.email": "Email",
"words.feeds": "Feeds",
"words.import": "Import",
+ "words.inbox": "Inbox",
"words.items": "Items",
"words.language": "Language",
"words.lists": "Lists",
diff --git a/locales/app/es.json b/locales/app/es.json
index d17a3ff23..279e715c0 100644
--- a/locales/app/es.json
+++ b/locales/app/es.json
@@ -121,7 +121,6 @@
"words.add": "Añadir",
"words.confirm": "Confirmar",
"words.discover": "Descubrir",
- "words.email": "Correo electrónico",
"words.import": "Importar",
"words.items": "Contenido",
"words.language": "Idioma",
diff --git a/locales/app/fi.json b/locales/app/fi.json
index 797ee04eb..def250507 100644
--- a/locales/app/fi.json
+++ b/locales/app/fi.json
@@ -188,7 +188,6 @@
"words.add": "Lisää",
"words.confirm": "Vahvista",
"words.discover": "Löydä",
- "words.email": "Sähköposti",
"words.import": "Tuo",
"words.items": "Kohteet",
"words.language": "Kieli",
diff --git a/locales/app/fr.json b/locales/app/fr.json
index 5093ee53c..a5275aa9f 100644
--- a/locales/app/fr.json
+++ b/locales/app/fr.json
@@ -188,7 +188,6 @@
"words.add": "Ajouter",
"words.confirm": "Confirmer",
"words.discover": "Découvrir",
- "words.email": "Email",
"words.import": "Importer",
"words.items": "Éléments",
"words.language": "Langue",
diff --git a/locales/app/it.json b/locales/app/it.json
index eb4f0f315..8e573688a 100644
--- a/locales/app/it.json
+++ b/locales/app/it.json
@@ -188,7 +188,6 @@
"words.add": "Aggiungi",
"words.confirm": "Conferma",
"words.discover": "Scopri",
- "words.email": "Email",
"words.import": "Importa",
"words.items": "Elementi",
"words.language": "Lingua",
diff --git a/locales/app/ja.json b/locales/app/ja.json
index 51b0dde27..69bf0291c 100644
--- a/locales/app/ja.json
+++ b/locales/app/ja.json
@@ -188,7 +188,6 @@
"words.add": "追加",
"words.confirm": "確認",
"words.discover": "発見",
- "words.email": "メール",
"words.import": "インポート",
"words.items": "アイテム",
"words.language": "言語",
diff --git a/locales/app/ko.json b/locales/app/ko.json
index a7823c011..579834208 100644
--- a/locales/app/ko.json
+++ b/locales/app/ko.json
@@ -220,7 +220,6 @@
"words.add": "추가",
"words.confirm": "확인",
"words.discover": "찾아보기",
- "words.email": "이메일",
"words.feeds": "피드",
"words.import": "가져오기",
"words.items": "항목",
diff --git a/locales/app/pt.json b/locales/app/pt.json
index 191a45783..3f6045d74 100644
--- a/locales/app/pt.json
+++ b/locales/app/pt.json
@@ -188,7 +188,6 @@
"words.add": "追加",
"words.confirm": "確認",
"words.discover": "発見",
- "words.email": "メール",
"words.import": "インポート",
"words.items": "アイテム",
"words.language": "言語",
diff --git a/locales/app/ru.json b/locales/app/ru.json
index 91c439e34..14b712523 100644
--- a/locales/app/ru.json
+++ b/locales/app/ru.json
@@ -188,7 +188,6 @@
"words.add": "Добавить",
"words.confirm": "Подтвердить",
"words.discover": "Открыть",
- "words.email": "Электронная почта",
"words.import": "Импорт",
"words.items": "Элементы",
"words.language": "Язык",
diff --git a/locales/app/tr.json b/locales/app/tr.json
index fca76847e..afe71a445 100644
--- a/locales/app/tr.json
+++ b/locales/app/tr.json
@@ -221,7 +221,6 @@
"words.add": "Ekle",
"words.confirm": "Onayla",
"words.discover": "Keşfet",
- "words.email": "E-posta",
"words.feeds": "Beslemeler",
"words.import": "İçe Aktar",
"words.items": "Öğeler",
diff --git a/locales/app/zh-CN.json b/locales/app/zh-CN.json
index 881bd3355..dccfe62aa 100644
--- a/locales/app/zh-CN.json
+++ b/locales/app/zh-CN.json
@@ -227,7 +227,6 @@
"words.browser": "浏览器",
"words.confirm": "确认",
"words.discover": "发现",
- "words.email": "邮箱",
"words.feeds": "订阅源",
"words.import": "导入",
"words.items": "内容",
diff --git a/locales/app/zh-HK.json b/locales/app/zh-HK.json
index 9762faff1..05021d1b6 100644
--- a/locales/app/zh-HK.json
+++ b/locales/app/zh-HK.json
@@ -226,7 +226,6 @@
"words.browser": "瀏覽器",
"words.confirm": "確認",
"words.discover": "探索",
- "words.email": "電子郵件",
"words.feeds": "訂閱源",
"words.import": "匯入",
"words.items": "項目",
diff --git a/locales/app/zh-TW.json b/locales/app/zh-TW.json
index 371ec804d..238cc7244 100644
--- a/locales/app/zh-TW.json
+++ b/locales/app/zh-TW.json
@@ -226,7 +226,6 @@
"words.browser": "瀏覽器",
"words.confirm": "確認",
"words.discover": "發現",
- "words.email": "Email",
"words.feeds": "摘要",
"words.import": "匯入",
"words.items": "內容",
diff --git a/locales/errors/en.json b/locales/errors/en.json
index 2645c057f..7075c8ff0 100644
--- a/locales/errors/en.json
+++ b/locales/errors/en.json
@@ -32,5 +32,8 @@
"8002": "List limit exceeded",
"8003": "Feed already added to list",
"9000": "Achievement not completed",
- "9001": "Achievement already received"
+ "9001": "Achievement already received",
+ "10000": "Inbox not found",
+ "10001": "Inbox already exists",
+ "10002": "Inbox limit exceeded"
}
diff --git a/packages/shared/src/env.ts b/packages/shared/src/env.ts
index 40d2af372..c114b890d 100644
--- a/packages/shared/src/env.ts
+++ b/packages/shared/src/env.ts
@@ -10,6 +10,7 @@ export const env = createEnv({
VITE_IMGPROXY_URL: z.string().url(),
VITE_SENTRY_DSN: z.string().optional(),
VITE_POSTHOG_KEY: z.string().optional(),
+ VITE_INBOXES_EMAIL: z.string().default("@follow.re"),
},
emptyStringAsUndefined: true,
diff --git a/packages/shared/src/hono.ts b/packages/shared/src/hono.ts
index 9199002b4..2d28b4485 100644
--- a/packages/shared/src/hono.ts
+++ b/packages/shared/src/hono.ts
@@ -673,6 +673,111 @@ type ExtraModel = {
content_html?: string;
}[];
};
+declare const CommonEntryFields: {
+ id: drizzle_orm.HasRuntimeDefault>>>>;
+ title: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "title";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ url: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "url";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ content: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "content";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ description: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "description";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ guid: drizzle_orm.NotNull>;
+ author: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "author";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ authorUrl: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "author_url";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ authorAvatar: drizzle_orm_pg_core.PgTextBuilder<{
+ name: "author_avatar";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ insertedAt: drizzle_orm.NotNull>;
+ publishedAt: drizzle_orm.NotNull>;
+ media: drizzle_orm.$Type, MediaModel[]>;
+ categories: drizzle_orm_pg_core.PgArrayBuilder<{
+ name: "categories";
+ dataType: "array";
+ columnType: "PgArray";
+ data: string[];
+ driverParam: string | string[];
+ enumValues: [string, ...string[]];
+ generated: drizzle_orm.GeneratedColumnConfig;
+ }, {
+ name: "categories";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ enumValues: [string, ...string[]];
+ driverParam: string;
+ generated: undefined;
+ }>;
+ attachments: drizzle_orm.$Type, AttachmentsModel[]>;
+ extra: drizzle_orm.$Type, ExtraModel>;
+};
declare const entries: drizzle_orm_pg_core.PgTableWithColumns<{
name: "entries";
schema: undefined;
@@ -693,22 +798,6 @@ declare const entries: drizzle_orm_pg_core.PgTableWithColumns<{
baseColumn: never;
generated: undefined;
}, {}, {}>;
- feedId: drizzle_orm_pg_core.PgColumn<{
- name: "feed_id";
- tableName: "entries";
- dataType: "string";
- columnType: "PgText";
- data: string;
- driverParam: string;
- notNull: true;
- hasDefault: false;
- isPrimaryKey: false;
- isAutoincrement: false;
- hasRuntimeDefault: false;
- enumValues: [string, ...string[]];
- baseColumn: never;
- generated: undefined;
- }, {}, {}>;
title: drizzle_orm_pg_core.PgColumn<{
name: "title";
tableName: "entries";
@@ -948,12 +1037,95 @@ declare const entries: drizzle_orm_pg_core.PgTableWithColumns<{
baseColumn: never;
generated: undefined;
}, {}, {}>;
+ feedId: drizzle_orm_pg_core.PgColumn<{
+ name: "feed_id";
+ tableName: "entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
};
dialect: "pg";
}>;
+declare const attachmentsZodSchema: z.ZodNullable;
+ mime_type: z.ZodOptional;
+ size_in_bytes: z.ZodOptional;
+ title: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+}, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+}>, "many">>>;
+declare const mediaZodSchema: z.ZodNullable;
+ width: z.ZodOptional;
+ height: z.ZodOptional;
+ preview_image_url: z.ZodOptional;
+ blurhash: z.ZodOptional;
+}, "strip", z.ZodTypeAny, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+}, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+}>, "many">>>;
+declare const extraZodSchema: z.ZodNullable;
+ }, "strip", z.ZodTypeAny, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }>, "many">>>;
+}, "strip", z.ZodTypeAny, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+}, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+}>>>;
declare const entriesOpenAPISchema: z.ZodObject;
url: z.ZodNullable;
content: z.ZodNullable;
@@ -980,6 +1152,7 @@ declare const entriesOpenAPISchema: z.ZodObject>;
+ feedId: z.ZodString;
}, "media" | "attachments" | "extra">, {
attachments: z.ZodNullable;
}>;
+declare const inboxesEntries: drizzle_orm_pg_core.PgTableWithColumns<{
+ name: "inboxes_entries";
+ schema: undefined;
+ columns: {
+ id: drizzle_orm_pg_core.PgColumn<{
+ name: "id";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: true;
+ isPrimaryKey: true;
+ isAutoincrement: false;
+ hasRuntimeDefault: true;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ title: drizzle_orm_pg_core.PgColumn<{
+ name: "title";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ url: drizzle_orm_pg_core.PgColumn<{
+ name: "url";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ content: drizzle_orm_pg_core.PgColumn<{
+ name: "content";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ description: drizzle_orm_pg_core.PgColumn<{
+ name: "description";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ guid: drizzle_orm_pg_core.PgColumn<{
+ name: "guid";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ author: drizzle_orm_pg_core.PgColumn<{
+ name: "author";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ authorUrl: drizzle_orm_pg_core.PgColumn<{
+ name: "author_url";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ authorAvatar: drizzle_orm_pg_core.PgColumn<{
+ name: "author_avatar";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ insertedAt: drizzle_orm_pg_core.PgColumn<{
+ name: "inserted_at";
+ tableName: "inboxes_entries";
+ dataType: "date";
+ columnType: "PgTimestamp";
+ data: Date;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: undefined;
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ publishedAt: drizzle_orm_pg_core.PgColumn<{
+ name: "published_at";
+ tableName: "inboxes_entries";
+ dataType: "date";
+ columnType: "PgTimestamp";
+ data: Date;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: undefined;
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ media: drizzle_orm_pg_core.PgColumn<{
+ name: "media";
+ tableName: "inboxes_entries";
+ dataType: "json";
+ columnType: "PgJsonb";
+ data: MediaModel[];
+ driverParam: unknown;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: undefined;
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ categories: drizzle_orm_pg_core.PgColumn<{
+ name: "categories";
+ tableName: "inboxes_entries";
+ dataType: "array";
+ columnType: "PgArray";
+ data: string[];
+ driverParam: string | string[];
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: drizzle_orm.Column<{
+ name: "categories";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, object, object>;
+ generated: undefined;
+ }, {}, {}>;
+ attachments: drizzle_orm_pg_core.PgColumn<{
+ name: "attachments";
+ tableName: "inboxes_entries";
+ dataType: "json";
+ columnType: "PgJsonb";
+ data: AttachmentsModel[];
+ driverParam: unknown;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: undefined;
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ extra: drizzle_orm_pg_core.PgColumn<{
+ name: "extra";
+ tableName: "inboxes_entries";
+ dataType: "json";
+ columnType: "PgJsonb";
+ data: ExtraModel;
+ driverParam: unknown;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: undefined;
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ inboxHandle: drizzle_orm_pg_core.PgColumn<{
+ name: "inbox_handle";
+ tableName: "inboxes_entries";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ };
+ dialect: "pg";
+}>;
+declare const inboxesEntriesOpenAPISchema: z.ZodObject;
+ url: z.ZodNullable;
+ content: z.ZodNullable;
+ description: z.ZodNullable;
+ guid: z.ZodString;
+ author: z.ZodNullable;
+ authorUrl: z.ZodNullable;
+ authorAvatar: z.ZodNullable;
+ insertedAt: z.ZodString;
+ publishedAt: z.ZodString;
+ media: z.ZodNullable>;
+ categories: z.ZodNullable>;
+ attachments: z.ZodNullable>;
+ extra: z.ZodNullable>;
+ inboxHandle: z.ZodString;
+}, "media" | "attachments" | "extra">, {
+ attachments: z.ZodNullable;
+ mime_type: z.ZodOptional;
+ size_in_bytes: z.ZodOptional;
+ title: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }>, "many">>>;
+ media: z.ZodNullable;
+ width: z.ZodOptional;
+ height: z.ZodOptional;
+ preview_image_url: z.ZodOptional;
+ blurhash: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }>, "many">>>;
+ extra: z.ZodNullable;
+ }, "strip", z.ZodTypeAny, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }>, "many">>>;
+ }, "strip", z.ZodTypeAny, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ }, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ }>>>;
+}>, "strip", z.ZodTypeAny, {
+ description: string | null;
+ title: string | null;
+ content: string | null;
+ id: string;
+ author: string | null;
+ url: string | null;
+ guid: string;
+ categories: string[] | null;
+ authorUrl: string | null;
+ authorAvatar: string | null;
+ insertedAt: string;
+ publishedAt: string;
+ inboxHandle: string;
+ media?: {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }[] | null | undefined;
+ attachments?: {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }[] | null | undefined;
+ extra?: {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ } | null | undefined;
+}, {
+ description: string | null;
+ title: string | null;
+ content: string | null;
+ id: string;
+ author: string | null;
+ url: string | null;
+ guid: string;
+ categories: string[] | null;
+ authorUrl: string | null;
+ authorAvatar: string | null;
+ insertedAt: string;
+ publishedAt: string;
+ inboxHandle: string;
+ media?: {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }[] | null | undefined;
+ attachments?: {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }[] | null | undefined;
+ extra?: {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ } | null | undefined;
+}>;
+declare const inboxesEntriesInsertOpenAPISchema: z.ZodObject>;
+ title: z.ZodOptional>;
+ content: z.ZodOptional>;
+ id: z.ZodOptional;
+ author: z.ZodOptional>;
+ url: z.ZodOptional>;
+ guid: z.ZodString;
+ media: z.ZodOptional>>;
+ categories: z.ZodOptional>>;
+ attachments: z.ZodOptional>>;
+ extra: z.ZodOptional>>;
+ authorUrl: z.ZodOptional>;
+ authorAvatar: z.ZodOptional>;
+ insertedAt: z.ZodString;
+ publishedAt: z.ZodString;
+ inboxHandle: z.ZodString;
+}, "id" | "media" | "attachments" | "extra" | "insertedAt" | "publishedAt" | "inboxHandle">, {
+ attachments: z.ZodNullable;
+ mime_type: z.ZodOptional;
+ size_in_bytes: z.ZodOptional;
+ title: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }, {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }>, "many">>>;
+ media: z.ZodNullable;
+ width: z.ZodOptional;
+ height: z.ZodOptional;
+ preview_image_url: z.ZodOptional;
+ blurhash: z.ZodOptional;
+ }, "strip", z.ZodTypeAny, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }, {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }>, "many">>>;
+ extra: z.ZodNullable;
+ }, "strip", z.ZodTypeAny, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }, {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }>, "many">>>;
+ }, "strip", z.ZodTypeAny, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ }, {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ }>>>;
+ publishedAt: z.ZodString;
+}>, "strip", z.ZodTypeAny, {
+ guid: string;
+ publishedAt: string;
+ description?: string | null | undefined;
+ title?: string | null | undefined;
+ content?: string | null | undefined;
+ author?: string | null | undefined;
+ url?: string | null | undefined;
+ media?: {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }[] | null | undefined;
+ categories?: string[] | null | undefined;
+ attachments?: {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }[] | null | undefined;
+ extra?: {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ } | null | undefined;
+ authorUrl?: string | null | undefined;
+ authorAvatar?: string | null | undefined;
+}, {
+ guid: string;
+ publishedAt: string;
+ description?: string | null | undefined;
+ title?: string | null | undefined;
+ content?: string | null | undefined;
+ author?: string | null | undefined;
+ url?: string | null | undefined;
+ media?: {
+ type: "photo" | "video";
+ url: string;
+ width?: number | undefined;
+ height?: number | undefined;
+ preview_image_url?: string | undefined;
+ blurhash?: string | undefined;
+ }[] | null | undefined;
+ categories?: string[] | null | undefined;
+ attachments?: {
+ url: string;
+ title?: string | undefined;
+ duration_in_seconds?: number | undefined;
+ mime_type?: string | undefined;
+ size_in_bytes?: number | undefined;
+ }[] | null | undefined;
+ extra?: {
+ links?: {
+ type: string;
+ url: string;
+ content_html?: string | undefined;
+ }[] | null | undefined;
+ } | null | undefined;
+ authorUrl?: string | null | undefined;
+ authorAvatar?: string | null | undefined;
+}>;
+declare const inboxesEntriesRelations: drizzle_orm.Relations<"inboxes_entries", {
+ inboxes: drizzle_orm.One<"inboxes", true>;
+}>;
+type inboxesEntriesModel = InferInsertModel & {
+ attachments?: AttachmentsModel[] | null;
+ media?: MediaModel[] | null;
+};
+
+declare const inboxes: drizzle_orm_pg_core.PgTableWithColumns<{
+ name: "inboxes";
+ schema: undefined;
+ columns: {
+ userId: drizzle_orm_pg_core.PgColumn<{
+ name: "user_id";
+ tableName: "inboxes";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ handle: drizzle_orm_pg_core.PgColumn<{
+ name: "handle";
+ tableName: "inboxes";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ secret: drizzle_orm_pg_core.PgColumn<{
+ name: "secret";
+ tableName: "inboxes";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: true;
+ hasDefault: true;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: true;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ title: drizzle_orm_pg_core.PgColumn<{
+ name: "title";
+ tableName: "inboxes";
+ dataType: "string";
+ columnType: "PgText";
+ data: string;
+ driverParam: string;
+ notNull: false;
+ hasDefault: false;
+ isPrimaryKey: false;
+ isAutoincrement: false;
+ hasRuntimeDefault: false;
+ enumValues: [string, ...string[]];
+ baseColumn: never;
+ generated: undefined;
+ }, {}, {}>;
+ };
+ dialect: "pg";
+}>;
+declare const inboxesOpenAPISchema: z.ZodObject<{
+ userId: z.ZodString;
+ handle: z.ZodString;
+ secret: z.ZodString;
+ title: z.ZodNullable;
+}, z.UnknownKeysParam, z.ZodTypeAny, {
+ title: string | null;
+ handle: string;
+ userId: string;
+ secret: string;
+}, {
+ title: string | null;
+ handle: string;
+ userId: string;
+ secret: string;
+}>;
+declare const inboxesRelations: drizzle_orm.Relations<"inboxes", {
+ users: drizzle_orm.One<"user", true>;
+ entries: drizzle_orm.Many<"inboxes_entries">;
+}>;
+declare const inboxHandleSchema: z.ZodString;
+
declare const invitations: drizzle_orm_pg_core.PgTableWithColumns<{
name: "invitations";
schema: undefined;
@@ -2826,6 +3715,7 @@ declare const usersRelations: drizzle_orm.Relations<"user", {
actions: drizzle_orm.One<"actions", true>;
wallets: drizzle_orm.One<"wallets", true>;
feeds: drizzle_orm.Many<"feeds">;
+ inboxes: drizzle_orm.One<"inboxes", true>;
}>;
declare const wallets: drizzle_orm_pg_core.PgTableWithColumns<{
@@ -3224,6 +4114,146 @@ declare const feedPowerTokensRelations: drizzle_orm.Relations<"feedPowerTokens",
}>;
declare const _routes: hono_hono_base.HonoBase;
type AppType = typeof _routes;
-export { type ActionsModel, type AppType, type AttachmentsModel, type EntriesModel, type EntryReadHistoriesModel, type ExtraModel, type FeedModel, type MediaModel, type SettingsModel, accounts, achievements, achievementsOpenAPISchema, actions, actionsItemOpenAPISchema, actionsOpenAPISchema, actionsRelations, collections, collectionsOpenAPISchema, collectionsRelations, entries, entriesOpenAPISchema, entriesRelations, entryReadHistories, entryReadHistoriesOpenAPISchema, entryReadHistoriesRelations, feedPowerTokens, feedPowerTokensOpenAPISchema, feedPowerTokensRelations, feeds, feedsOpenAPISchema, feedsRelations, invitations, invitationsOpenAPISchema, invitationsRelations, languageSchema, lists, listsOpenAPISchema, listsRelations, listsSubscriptions, listsSubscriptionsOpenAPISchema, listsSubscriptionsRelations, listsTimeline, listsTimelineOpenAPISchema, listsTimelineRelations, sessions, settings, subscriptions, subscriptionsOpenAPISchema, subscriptionsRelations, timeline, timelineOpenAPISchema, timelineRelations, transactionType, transactions, transactionsOpenAPISchema, transactionsRelations, users, usersOpenApiSchema, usersRelations, verificationTokens, wallets, walletsOpenAPISchema, walletsRelations };
+export { type ActionsModel, type AppType, type AttachmentsModel, CommonEntryFields, type EntriesModel, type EntryReadHistoriesModel, type ExtraModel, type FeedModel, type MediaModel, type SettingsModel, accounts, achievements, achievementsOpenAPISchema, actions, actionsItemOpenAPISchema, actionsOpenAPISchema, actionsRelations, attachmentsZodSchema, collections, collectionsOpenAPISchema, collectionsRelations, entries, entriesOpenAPISchema, entriesRelations, entryReadHistories, entryReadHistoriesOpenAPISchema, entryReadHistoriesRelations, extraZodSchema, feedPowerTokens, feedPowerTokensOpenAPISchema, feedPowerTokensRelations, feeds, feedsOpenAPISchema, feedsRelations, inboxHandleSchema, inboxes, inboxesEntries, inboxesEntriesInsertOpenAPISchema, type inboxesEntriesModel, inboxesEntriesOpenAPISchema, inboxesEntriesRelations, inboxesOpenAPISchema, inboxesRelations, invitations, invitationsOpenAPISchema, invitationsRelations, languageSchema, lists, listsOpenAPISchema, listsRelations, listsSubscriptions, listsSubscriptionsOpenAPISchema, listsSubscriptionsRelations, listsTimeline, listsTimelineOpenAPISchema, listsTimelineRelations, mediaZodSchema, sessions, settings, subscriptions, subscriptionsOpenAPISchema, subscriptionsRelations, timeline, timelineOpenAPISchema, timelineRelations, transactionType, transactions, transactionsOpenAPISchema, transactionsRelations, users, usersOpenApiSchema, usersRelations, verificationTokens, wallets, walletsOpenAPISchema, walletsRelations };