EnakPoint & EnakCoin wallet, PIN, outlet, order, community, reward
- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5954510b93
commit
f5e3075205
@@ -0,0 +1,15 @@
|
||||
part of '../wallet.dart';
|
||||
|
||||
/// Registrasi device untuk push notification (FCM).
|
||||
abstract class IDeviceRepository {
|
||||
/// Dipanggil setelah login dan setiap kali FCM memberi token baru.
|
||||
Future<Either<WalletFailure, Unit>> register({
|
||||
required String fcmToken,
|
||||
required String platform,
|
||||
required String appVersion,
|
||||
});
|
||||
|
||||
/// Dipanggil saat logout, sebelum token login dihapus. Tidak memanggil API
|
||||
/// bila device ini belum pernah diregistrasi.
|
||||
Future<Either<WalletFailure, Unit>> unregister();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
part of '../wallet.dart';
|
||||
|
||||
/// Riwayat order customer. App hanya melihat order; tidak membuat atau
|
||||
/// membayarnya (§7).
|
||||
abstract class IOrderRepository {
|
||||
Future<Either<WalletFailure, CustomerOrderPage>> getOrders({
|
||||
required int page,
|
||||
int limit = 20,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, CustomerOrderDetail>> getOrderDetail(String id);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
part of '../wallet.dart';
|
||||
|
||||
abstract class IOutletRepository {
|
||||
/// Outlet aktif di organisasi customer, urut nama.
|
||||
Future<Either<WalletFailure, List<Outlet>>> getOutlets();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
part of '../wallet.dart';
|
||||
|
||||
abstract class IPinRepository {
|
||||
Future<Either<WalletFailure, PinStatus>> getStatus();
|
||||
|
||||
/// Mengirim OTP ke WhatsApp customer.
|
||||
Future<Either<WalletFailure, PinOtp>> requestOtp(PinOtpPurpose purpose);
|
||||
|
||||
Future<Either<WalletFailure, PinStatus>> setup({
|
||||
required String otpToken,
|
||||
required String otpCode,
|
||||
required String pin,
|
||||
required String confirmPin,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, Unit>> change({
|
||||
required String oldPin,
|
||||
required String pin,
|
||||
required String confirmPin,
|
||||
});
|
||||
|
||||
/// Reset juga membuka PIN yang terkunci; setelahnya transfer keluar ditahan
|
||||
/// 24 jam.
|
||||
Future<Either<WalletFailure, Unit>> reset({
|
||||
required String otpToken,
|
||||
required String otpCode,
|
||||
required String pin,
|
||||
required String confirmPin,
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
part of '../wallet.dart';
|
||||
|
||||
abstract class IWalletRepository {
|
||||
Future<Either<WalletFailure, WalletSummary>> getWallet();
|
||||
|
||||
Future<Either<WalletFailure, WalletTransactionPage>> getTransactions({
|
||||
required int page,
|
||||
int limit = 20,
|
||||
WalletCurrency? currency,
|
||||
List<WalletTransactionType> types = const [],
|
||||
DateTime? from,
|
||||
DateTime? to,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, WalletExpiring>> getExpiring();
|
||||
|
||||
Future<Either<WalletFailure, PaymentCode>> createPaymentCode({
|
||||
required String pin,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, ExchangePreview>> previewExchange({
|
||||
required int coins,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, ExchangeResult>> exchange({
|
||||
required int coins,
|
||||
required String pin,
|
||||
required String idempotencyKey,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, TransferRecipient>> checkRecipient({
|
||||
required String phone,
|
||||
});
|
||||
|
||||
Future<Either<WalletFailure, TransferResult>> transfer({
|
||||
required WalletCurrency currency,
|
||||
required int amount,
|
||||
required String recipientPhone,
|
||||
required String pin,
|
||||
required String idempotencyKey,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user