@follow-app/client-sdk
Version:
TypeScript client SDK for Follow RSS Server API
42 lines (33 loc) • 937 B
text/typescript
import type { DateISOString } from "@/types/date-serialization"
import type { EmptyResponse, SuccessResponse } from "../../types"
// Request types
export interface GetReferralDaysRequest {
code: string
}
export interface VerifyReceiptRequest {
appReceipt: string
}
// Response data types
export interface ReferralUser {
id: string
name: string | null
image: string | null
}
export interface ReferralInvitation {
code: string
createdAt: DateISOString | null
usedAt: DateISOString | null
toUserId: string | null
user: ReferralUser | null
}
export interface ReferralsData {
referralCycleDays: number
invitations: ReferralInvitation[]
}
export interface ReferralDaysData {
referralCycleDays: number
}
// Response types
export type GetReferralsResponse = SuccessResponse<ReferralsData>
export type GetReferralDaysResponse = SuccessResponse<ReferralDaysData>
export type VerifyReceiptResponse = EmptyResponse