1abstract
class ApiEndpoints {
3 static const hostname =
"https://api-test.aidra.tech";
5 static const pathAlias =
"/driver";
6 static const loginurl =
'$hostname/authentification/auth/login';
7 static String userInfo({required
int userId}) =>
'$hostname/authentification/userDetails/$userId';
8 static const videoUrl =
'$hostname/collection/videoUrl';
9 static const sendGeoLocation =
'$hostname/operation/createDriverLocalisation';
10 static const createRouting =
'$hostname/operation/createRoutingDriver';
11 static const validateSchedulerDriver =
'$hostname/operation/validateSchedulerDriver';
12 static String getScheduleStatus({required
int driverId, required
String date}) =>
'$hostname/operation/statusScheduleForDriver?driverId=$driverId&date=$date';
13 static const updateCollectionStatus =
'updateCollectionStatus';
14 static const getCollectionCancelationReasons =
'listCancelationReason';
16 static String getCollections({
20 }) =>
'readCollection?userId=$userId¬ForToday=$notForToday&type=$type';
22 static String getWeeklyCollectionsUrl({
24 }) =>
'$hostname/partner/listCollectionPointsByDriver?driverId=$userId';
26 static String getHistoryCollections({
32 if (dateStart != null && dateEnd != null) {
33 return 'historyCollection?userId=$userId&dateDebut=${_formatDateTime(dateStart)}&dateFin=${_formatDateTime(dateEnd)}';
35 return 'historyCollection?userId=$userId${period != null ? '&
period=$period
' : ''}';
38 static const sendCollectionsInformation =
'confirmCollection';
39 static const validateCollection =
'validateCollection';
40 static const sendCollectionConfirmation =
"paymentCollection";
41 static const sendCollectionPayment =
"doneCollection";
42 static const sendCollectionRating =
"collectionNotation";
43 static const ratingReasons =
'listCollectionReason';
44 static const sendUnloading =
'deliveryCollection';
47 return '${date.year}-${date.month.toString().padLeft(2, '0
')}-${date.day.toString().padLeft(2, '0
')}T00:00:00';
51 static String getCollectionContactList({required
int restaurentId}) =>
'listContact/$restaurentId';
52 static String getCollectionPaymentModeList({required
int restaurentId}) =>
'listMeanOfPayment/$restaurentId';
54 static String getCollectionStatistics({required
int userId, required
String period}) =>
'/dashboardDriver?userId=$userId&period=$period';
56 static String getPendingUnloading({required
int userId}) =>
'listUnloadedCollection/$userId';
57 static String getHistoryUnloading({required
int userId}) =>
'listDeliveryCollection/$userId';
58 static String getWarehouseResponsible({required
int userId}) =>
'listWarehouseResponsible/$userId';
60 static String getAvailableVehicles({required
int userId}) =>
'listAvailableVehicles/$userId';
61 static const sendVehicleCheck =
'fleetAssignmentVehicle';
62 static String getCheckInStatus({required
int userId}) =>
'checkVehicleDriver/$userId';
64 static String getManifestDocument({required
String reference}) =>
'$hostname/document/EManifestDocument/$reference';
65 static String getCollectionVoucherDocument({required
String reference}) =>
'$hostname/document/collectionDocument/$reference';
67 static const createDriverCollection =
'$hostname/collection/createDriverCollection';
68 static String getCollectionsToSchedule({
72 }) =>
'$hostname/collection/listCollectionToSchedule?startDate=$startDate&endDate=$endDate&driverId=$driverId';
sealed class CheckInOutEvent extends Equatable userId
abstract class PeriodEvent extends Equatable period