@follow-app/client-sdk
Version:
TypeScript client SDK for Follow RSS Server API
38 lines (30 loc) • 946 B
text/typescript
import type { messaging } from "@folo-services/drizzle"
import type { InferSelectModel } from "drizzle-orm"
import type { EmptyResponse, SerializedModel, StructuredSuccessResponse } from "../../types"
// Database types
type MessagingToken = SerializedModel<InferSelectModel<typeof messaging>>
// Channel enum
export type MessagingChannel =
| "macos" |
"windows" |
"linux" |
"ios" |
"android" |
"web" |
"desktop"
// Request types
export interface CreateMessagingTokenRequest {
token: string
channel: MessagingChannel
}
export interface DeleteMessagingTokenRequest {
channel: MessagingChannel
}
export interface TestMessagingQuery {
channel?: string
}
// Response types
export type GetMessagingTokensResponse = StructuredSuccessResponse<MessagingToken[]>
export type CreateMessagingTokenResponse = EmptyResponse
export type DeleteMessagingTokenResponse = EmptyResponse
export type TestMessagingResponse = EmptyResponse