collectlie
Version:
TypeScript SDK for Collectlie - flexible data collection platform with custom types, schema validation, and Supabase backend integration
50 lines • 1.22 kB
TypeScript
import { Submission } from './feedback';
export interface ApiResponse<T = any> {
success: boolean;
data?: T;
message?: string;
}
export interface ApiErrorResponse {
error?: string;
message?: string;
details?: string | string[];
debug_info?: Record<string, any>;
upgrade_required?: boolean;
}
export interface SubmissionApiResponse extends ApiResponse<Submission> {
}
export interface PaginationOptions {
page?: number;
limit?: number;
sortBy?: 'created_at' | 'updated_at' | 'type';
sortOrder?: 'asc' | 'desc';
}
export interface SubmissionQueryOptions {
project_id?: string;
type?: string;
start_date?: string;
end_date?: string;
limit?: number;
offset?: number;
}
export interface AnalyticsResponse extends ApiResponse<{
totalCount: number;
typeBreakdown: Record<string, number>;
dateRange: {
start: string;
end: string;
};
trends?: {
date: string;
count: number;
}[];
}> {
}
export interface AnalyticsOptions {
dateRange?: '7d' | '30d' | '90d' | 'custom';
startDate?: string;
endDate?: string;
type?: string;
project_id?: string;
}
//# sourceMappingURL=api.d.ts.map