UNPKG

@follow-app/client-sdk

Version:

TypeScript client SDK for Follow RSS Server API

67 lines (53 loc) 1.52 kB
// Inboxes module types aligned with core targetSchema import type { inboxesEntriesInsertOpenAPISchema } from "@folo-services/drizzle" import type { InboxOpenApiSchema } from "@folo-services/shared" import type z from "zod" import type { EmptyResponse, SerializedModel, StructuredSuccessResponse, } from "../../types" // Target schema used by core responses export type InboxSchema = SerializedModel<InboxOpenApiSchema> // Inbox get query export interface InboxGetQuery { handle: string } export type InboxGetResponse = StructuredSuccessResponse<InboxSchema> // Inbox list response (array, not paginated) export type InboxListResponse = StructuredSuccessResponse<InboxSchema[]> // Inbox create request/response export interface InboxCreateRequest { handle: string title?: string } export type InboxCreateResponse = EmptyResponse // Inbox update request/response export interface InboxUpdateRequest { handle: string title: string } export type InboxUpdateResponse = EmptyResponse // Inbox delete request/response export interface InboxDeleteRequest { handle: string } export type InboxDeleteResponse = EmptyResponse export type InboxEmailRequest = { from: { name?: string address?: string } to: { address: string } subject?: string messageId: string date: string html?: string } export type InboxEmailResponse = EmptyResponse export type InboxWebhookRequest = z.infer< typeof inboxesEntriesInsertOpenAPISchema > export type InboxWebhookResponse = EmptyResponse