update api

This commit is contained in:
Phuoc Nguyen
2025-10-10 17:15:40 +07:00
parent b94c158004
commit 04f7042b8d
24 changed files with 3322 additions and 8 deletions

View File

@@ -5,11 +5,12 @@ class ApiConstants {
// ===== Base URL Configuration =====
/// Base URL for the API
/// TODO: Replace with actual production URL
static const String baseUrl = 'https://api.retailpos.example.com';
/// Development: http://localhost:3000
/// Production: TODO - Replace with actual production URL
static const String baseUrl = 'http://localhost:3000';
/// API version prefix
static const String apiVersion = '/api/v1';
static const String apiVersion = '/api';
/// Full base URL with version
static String get fullBaseUrl => '$baseUrl$apiVersion';
@@ -33,8 +34,21 @@ class ApiConstants {
// ===== Endpoint Paths =====
// Authentication Endpoints
/// POST - Login user
static const String login = '/auth/login';
/// POST - Register new user
static const String register = '/auth/register';
/// GET - Get current user profile (requires auth)
static const String profile = '/auth/profile';
/// POST - Refresh access token (requires auth)
static const String refreshToken = '/auth/refresh';
// Products Endpoints
/// GET - Fetch all products
/// GET - Fetch all products (with pagination and filters)
static const String products = '/products';
/// GET - Fetch single product by ID