@follow-app/client-sdk
Version:
TypeScript client SDK for Follow RSS Server API
87 lines (68 loc) • 1.84 kB
text/typescript
// Auto-generated types for inboxes module
import type { inboxes } from "@folo-services/drizzle"
import type { InferSelectModel } from "drizzle-orm"
import type {
EmptyResponse,
PaginatedResponse,
SerializedModel,
SuccessResponse,
} from "../../types"
// Re-export database types
export type InboxModel = SerializedModel<InferSelectModel<typeof inboxes>>
// Inbox with target structure (transformed for client)
export interface InboxTarget extends InboxModel {
type: "inbox"
}
// Inbox get query
export interface InboxGetQuery {
handle: string
}
export type InboxGetResponse = SuccessResponse<InboxTarget>
// Inbox list response
export type InboxListResponse = PaginatedResponse<InboxTarget>
// Inbox create request
export interface InboxCreateRequest {
title: string
handle: string
description?: string
image?: string
}
export type InboxCreateResponse = SuccessResponse<InboxTarget>
// Inbox update request
export interface InboxUpdateRequest {
id: string
title?: string
description?: string
image?: string
}
export type InboxUpdateResponse = SuccessResponse<InboxTarget>
// Inbox delete request
export interface InboxDeleteRequest {
id: string
}
export type InboxDeleteResponse = EmptyResponse
// Email operations
export interface InboxEmailRequest {
inboxId: string
action: "enable" | "disable" | "regenerate"
}
export interface InboxEmailData {
email: string
enabled: boolean
lastUsed?: string
}
export type InboxEmailResponse = SuccessResponse<InboxEmailData>
// Webhook operations
export interface InboxWebhookRequest {
inboxId: string
url?: string
secret?: string
enabled?: boolean
}
export interface InboxWebhookData {
url: string
secret: string
enabled: boolean
lastTriggered?: string
}
export type InboxWebhookResponse = SuccessResponse<InboxWebhookData>