- Complete Expo React Native app setup with TypeScript - Better Auth authentication system integration - Secure storage implementation for session tokens - Authentication flow with login/logout functionality - API client configuration for backend communication - Responsive UI components with themed styling - Expo Router navigation setup - Development configuration and scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
761 B
TypeScript
27 lines
761 B
TypeScript
import { apiClient } from './client';
|
|
import { TemplatesResponse, TemplateResponse } from '../types/template';
|
|
|
|
export interface GetTemplatesParams {
|
|
page?: number;
|
|
size?: number;
|
|
search?: string;
|
|
categoryId?: string;
|
|
status?: 'AUDITING' | 'RELEASE' | 'EDITING';
|
|
}
|
|
|
|
export async function getTemplates(params: GetTemplatesParams = {}): Promise<TemplatesResponse> {
|
|
return apiClient<TemplatesResponse>('/api/templates', {
|
|
params: {
|
|
page: params.page || 1,
|
|
size: params.size || 10,
|
|
search: params.search,
|
|
categoryId: params.categoryId,
|
|
status: params.status,
|
|
},
|
|
});
|
|
}
|
|
|
|
export async function getTemplateById(id: string): Promise<TemplateResponse> {
|
|
return apiClient<TemplateResponse>(`/api/templates/${id}`);
|
|
}
|