proxibuy_bussiness/lib/core/config/api_config.dart

39 lines
1.3 KiB
Dart

class ApiConfig {
// Private constructor to prevent instantiation
ApiConfig._();
// Base URL for the API
static const String baseUrl = 'https://fartak.liara.run';
// ========== Auth Endpoints ==========
/// Endpoint to send OTP code to the user.
/// Method: POST
/// Body: {'Phone': phoneNumber, 'Code': countryCode}
static const String sendOtp = '$baseUrl/login/sendcode';
/// Endpoint to verify the OTP code.
/// Method: POST
/// Body: {'Phone': phoneNumber, 'Code': countryCode, 'OTP': otp}
static const String verifyOtp = '$baseUrl/login/getcode';
/// Endpoint to check if the user has a registered shop.
/// Method: GET
/// Headers: {'Authorization': 'Bearer <token>'}
static const String checkShopStatus = '$baseUrl/shop/get';
// ========== Store Endpoints ==========
/// Endpoint to add a new store.
/// Method: POST
/// Body: FormData
/// Headers: {'Authorization': 'Bearer <token>'}
static const String addStore = '$baseUrl/shop/add';
// ========== Discount Endpoints ==========
/// Endpoint to add a new discount.
/// Method: POST
/// Body: FormData
/// Headers: {'Authorization': 'Bearer <token>'}
static const String addDiscount = '$baseUrl/discount/add';
static const String getDiscounts = '$baseUrl/discount/get';
}