| |
| |
| |
| |
| |
| |
| |
| export interface HealthStatus { |
| status: string; |
| } |
|
|
| export type SubscriptionStateStatus = |
| (typeof SubscriptionStateStatus)[keyof typeof SubscriptionStateStatus]; |
|
|
| export const SubscriptionStateStatus = { |
| none: "none", |
| trialing: "trialing", |
| active: "active", |
| cancelled: "cancelled", |
| suspended: "suspended", |
| expired: "expired", |
| } as const; |
|
|
| export interface SubscriptionState { |
| status: SubscriptionStateStatus; |
| |
| trialEnd?: string | null; |
| |
| currentPeriodEnd?: string | null; |
| |
| paypalSubscriptionId?: string | null; |
| hasAccess: boolean; |
| } |
|
|
| export interface MeResponse { |
| userId: string; |
| |
| email?: string | null; |
| subscription: SubscriptionState; |
| } |
|
|
| export interface CreateSubscriptionResponse { |
| subscriptionId: string; |
| approvalUrl: string; |
| } |
|
|
| export interface ActivateSubscriptionBody { |
| subscriptionId: string; |
| } |
|
|
| export interface SavedList { |
| id: number; |
| name: string; |
| groupIds: string[]; |
| createdAt: string; |
| } |
|
|
| export type ListSavedListsResponse = SavedList[]; |
|
|
| export interface CreateSavedListBody { |
| |
| |
| |
| |
| name: string; |
| |
| groupIds: string[]; |
| } |
|
|
| export type PaypalWebhookBody = { [key: string]: unknown }; |
|
|