UNPKG

@follow-app/client-sdk

Version:

TypeScript client SDK for Follow RSS Server API

40 lines (34 loc) 1.01 kB
import { defineModule, defineRoute } from "../../shared/define-module" import type { BoostFeedRequest, BoostFeedResponse, GetFeedBoostersRequest, GetFeedBoostersResponse, GetFeedBoostLevelRequest, GetFeedBoostLevelResponse, } from "./types" /** * Boosts module for content boosting with power tokens */ export const boostsModule = defineModule({ name: "boosts", prefix: "/boosts", routes: { // Get boost level information for a feed getFeedBoostLevel: defineRoute< GetFeedBoostLevelRequest, GetFeedBoostLevelResponse >("GET", "/"), // Boost a feed with power tokens boostFeed: defineRoute<BoostFeedRequest, BoostFeedResponse>("POST", "/"), // Get list of users who boosted a feed getFeedBoosters: defineRoute< GetFeedBoostersRequest, GetFeedBoostersResponse >("GET", "/boosters"), }, }) // Export the API type export type BoostsAPI = typeof boostsModule.api // Re-export types for external consumption export type * from "./types"