@follow-app/client-sdk
Version:
TypeScript client SDK for Follow RSS Server API
41 lines (37 loc) • 956 B
text/typescript
import { defineModule, defineRoute } from "../../shared/define-module"
import type {
GetDistributionStatusRequest,
GetDistributionStatusResponse,
GetLatestReleaseQuery,
GetLatestReleaseResponse,
GetManifestRequest,
} from "./types"
export const updatesModule = defineModule({
name: "updates",
prefix: "/updates",
routes: {
getLatestRelease: defineRoute<GetLatestReleaseQuery, GetLatestReleaseResponse>(
"GET",
"/releases/latest",
{
query: ["refresh"],
},
),
getManifest: defineRoute<GetManifestRequest, string>(
"GET",
"/{manifestName}",
{
query: ["refresh"],
},
),
getDistributionStatus: defineRoute<GetDistributionStatusRequest, GetDistributionStatusResponse>(
"GET",
"/distribution/{distribution}",
{
query: ["refresh"],
},
),
},
})
export type UpdatesAPI = typeof updatesModule.api
export type * from "./types"