This commit is contained in:
Meghdad committed 2026-08-24 19:44:24 +03:30
commit 8d5446f466
232 files changed
+25416

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
<?php
use App\Http\Controllers\Api\V1\AppConfigurationController;
use App\Http\Controllers\Api\V1\BazaarBillingController;
use App\Http\Controllers\Api\V1\BazaarLoginController;
use App\Http\Controllers\Api\V1\BazaarReleaseController;
use App\Http\Controllers\Api\V1\BazaarReviewController;
use Illuminate\Support\Facades\Route;
Route::prefix('v1/apps/{packageName}')
->middleware(['mobile_app', 'throttle:app_api'])
->group(function (): void {
Route::get('/', [AppConfigurationController::class, 'show'])->name('api.v1.apps.show');
Route::prefix('bazaar')->group(function (): void {
Route::prefix('billing')->controller(BazaarBillingController::class)->middleware('bazaar_configured:billing')->group(function (): void {
Route::post('purchases/validate', 'validatePurchase');
Route::post('signatures/verify', 'verifySignature');
Route::post('purchases/consume', 'consumePurchase');
Route::post('subscriptions/validate', 'subscription');
Route::post('subscriptions/active', 'activeSubscriptions');
Route::middleware('management_key')->group(function (): void {
Route::post('purchases/refund', 'refundPurchase');
Route::post('subscriptions/cancel', 'cancelSubscription');
});
});
Route::prefix('login')->controller(BazaarLoginController::class)->middleware('bazaar_configured:login')->group(function (): void {
Route::get('authorization-url', 'authorizationUrl');
Route::post('exchange', 'exchange');
Route::post('refresh', 'refresh');
Route::get('user', 'userInfo');
});
Route::prefix('reviews')->controller(BazaarReviewController::class)->middleware('bazaar_configured:reviews')->group(function (): void {
Route::get('/', 'index');
Route::post('{reviewId}/reply', 'reply')->middleware('management_key')->whereNumber('reviewId');
});
Route::prefix('releases')->controller(BazaarReleaseController::class)->middleware(['management_key', 'bazaar_configured:publishing'])->group(function (): void {
Route::post('/', 'store');
Route::delete('/', 'destroy');
Route::post('apk', 'uploadApk');
Route::post('aab', 'uploadAab');
Route::post('bin', 'uploadBin');
Route::get('bundle-status', 'bundleStatus');
Route::post('commit', 'commit');
Route::get('last/{state}', 'last')->whereIn('state', ['committed', 'uncommitted', 'published']);
});
});
});