migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\RestaurantDelivery\Contracts;
|
||||
|
||||
interface FirebaseServiceInterface
|
||||
{
|
||||
/**
|
||||
* Check if Firebase is enabled.
|
||||
*/
|
||||
public function isEnabled(): bool;
|
||||
|
||||
/**
|
||||
* Update rider location in Firebase.
|
||||
*/
|
||||
public function updateRiderLocation(
|
||||
int|string $riderId,
|
||||
float $latitude,
|
||||
float $longitude,
|
||||
?float $speed = null,
|
||||
?float $bearing = null,
|
||||
?float $accuracy = null
|
||||
): bool;
|
||||
|
||||
/**
|
||||
* Get rider location from Firebase.
|
||||
*/
|
||||
public function getRiderLocation(int|string $riderId): ?array;
|
||||
|
||||
/**
|
||||
* Check if rider location is stale.
|
||||
*/
|
||||
public function isRiderLocationStale(int|string $riderId): bool;
|
||||
|
||||
/**
|
||||
* Update rider status in Firebase.
|
||||
*/
|
||||
public function updateRiderStatus(int|string $riderId, string $status): bool;
|
||||
|
||||
/**
|
||||
* Initialize delivery tracking in Firebase.
|
||||
*/
|
||||
public function initializeDeliveryTracking(int|string $deliveryId, array $data): bool;
|
||||
|
||||
/**
|
||||
* Update delivery rider location in Firebase.
|
||||
*/
|
||||
public function updateDeliveryRiderLocation(
|
||||
int|string $deliveryId,
|
||||
float $latitude,
|
||||
float $longitude,
|
||||
?float $speed = null,
|
||||
?float $bearing = null,
|
||||
?int $eta = null,
|
||||
?float $remainingDistance = null
|
||||
): bool;
|
||||
|
||||
/**
|
||||
* Update delivery status in Firebase.
|
||||
*/
|
||||
public function updateDeliveryStatus(int|string $deliveryId, string $status, array $metadata = []): bool;
|
||||
|
||||
/**
|
||||
* Update delivery route in Firebase.
|
||||
*/
|
||||
public function updateDeliveryRoute(int|string $deliveryId, array $route): bool;
|
||||
|
||||
/**
|
||||
* Get delivery tracking data from Firebase.
|
||||
*/
|
||||
public function getDeliveryTracking(int|string $deliveryId): ?array;
|
||||
|
||||
/**
|
||||
* Remove delivery tracking from Firebase.
|
||||
*/
|
||||
public function removeDeliveryTracking(int|string $deliveryId): bool;
|
||||
|
||||
/**
|
||||
* Remove rider assignment from Firebase.
|
||||
*/
|
||||
public function removeRiderAssignment(int|string $riderId, int|string $deliveryId): bool;
|
||||
|
||||
/**
|
||||
* Send push notification via FCM.
|
||||
*/
|
||||
public function sendPushNotification(
|
||||
string $token,
|
||||
string $title,
|
||||
string $body,
|
||||
array $data = []
|
||||
): bool;
|
||||
|
||||
/**
|
||||
* Send push notification to multiple devices.
|
||||
*/
|
||||
public function sendMulticastNotification(
|
||||
array $tokens,
|
||||
string $title,
|
||||
string $body,
|
||||
array $data = []
|
||||
): array;
|
||||
}
|
||||
Reference in New Issue
Block a user