diff --git a/.agents/skills/socialite-development/SKILL.md b/.agents/skills/socialite-development/SKILL.md new file mode 100644 index 0000000..e660da6 --- /dev/null +++ b/.agents/skills/socialite-development/SKILL.md @@ -0,0 +1,80 @@ +--- +name: socialite-development +description: "Manages OAuth social authentication with Laravel Socialite. Activate when adding social login providers; configuring OAuth redirect/callback flows; retrieving authenticated user details; customizing scopes or parameters; setting up community providers; testing with Socialite fakes; or when the user mentions social login, OAuth, Socialite, or third-party authentication." +license: MIT +metadata: + author: laravel +--- + +# Socialite Authentication + +## Documentation + +Use `search-docs` for detailed Socialite patterns and documentation (installation, configuration, routing, callbacks, testing, scopes, stateless auth). + +## Available Providers + +Built-in: `facebook`, `twitter`, `twitter-oauth-2`, `linkedin`, `linkedin-openid`, `google`, `github`, `gitlab`, `bitbucket`, `slack`, `slack-openid`, `twitch` + +Community: 150+ additional providers at [socialiteproviders.com](https://socialiteproviders.com). For provider-specific setup, use `WebFetch` on `https://socialiteproviders.com/{provider-name}`. + +Configuration key in `config/services.php` must match the driver name exactly — note the hyphenated keys: `twitter-oauth-2`, `linkedin-openid`, `slack-openid`. + +Twitter/X: Use `twitter-oauth-2` (OAuth 2.0) for new projects. The legacy `twitter` driver is OAuth 1.0. Driver names remain unchanged despite the platform rebrand. + +Community providers differ from built-in providers in the following ways: +- Installed via `composer require socialiteproviders/{name}` +- Must register via event listener — NOT auto-discovered like built-in providers +- Use `search-docs` for the registration pattern + +## Adding a Provider + +### 1. Configure the provider + +Add the provider's `client_id`, `client_secret`, and `redirect` to `config/services.php`. The config key must match the driver name exactly. + +### 2. Create redirect and callback routes + +Two routes are needed: one that calls `Socialite::driver('provider')->redirect()` to send the user to the OAuth provider, and one that calls `Socialite::driver('provider')->user()` to receive the callback and retrieve user details. + +### 3. Authenticate and store the user + +In the callback, use `updateOrCreate` to find or create a user record from the provider's response (`id`, `name`, `email`, `token`, `refreshToken`), then call `Auth::login()`. + +### 4. Customize the redirect (optional) + +- `scopes()` — merge additional scopes with the provider's defaults +- `setScopes()` — replace all scopes entirely +- `with()` — pass optional parameters (e.g., `['hd' => 'example.com']` for Google) +- `asBotUser()` — Slack only; generates a bot token (`xoxb-`) instead of a user token (`xoxp-`). Must be called before both `redirect()` and `user()`. Only the `token` property will be hydrated on the user object. +- `stateless()` — for API/SPA contexts where session state is not maintained + +### 5. Verify + +1. Config key matches driver name exactly (check the list above for hyphenated names) +2. `client_id`, `client_secret`, and `redirect` are all present +3. Redirect URL matches what is registered in the provider's OAuth dashboard +4. Callback route handles denied grants (when user declines authorization) + +Use `search-docs` for complete code examples of each step. + +## Additional Features + +Use `search-docs` for usage details on: `enablePKCE()`, `userFromToken($token)`, `userFromTokenAndSecret($token, $secret)` (OAuth 1.0), retrieving user details. + +User object: `getId()`, `getName()`, `getEmail()`, `getAvatar()`, `getNickname()`, `token`, `refreshToken`, `expiresIn`, `approvedScopes` + +## Testing + +Socialite provides `Socialite::fake()` for testing redirects and callbacks. Use `search-docs` for faking redirects, callback user data, custom token properties, and assertion methods. + +## Common Pitfalls + +- Config key must match driver name exactly — hyphenated drivers need hyphenated keys (`linkedin-openid`, `slack-openid`, `twitter-oauth-2`). Mismatch silently fails. +- Every provider needs `client_id`, `client_secret`, and `redirect` in `config/services.php`. Missing any one causes cryptic errors. +- `scopes()` merges with defaults; `setScopes()` replaces all scopes entirely. +- Missing `stateless()` in API/SPA contexts causes `InvalidStateException`. +- Redirect URL in `config/services.php` must exactly match the provider's OAuth dashboard (including trailing slashes and protocol). +- Do not pass `state`, `response_type`, `client_id`, `redirect_uri`, or `scope` via `with()` — these are reserved. +- Community providers require event listener registration via `SocialiteWasCalled`. +- `user()` throws when the user declines authorization. Always handle denied grants. \ No newline at end of file diff --git a/.gitignore b/.gitignore index bfe10c3..74c806d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ /storage/*.key /storage/pail /resources/js/actions -/resources/js/routes /resources/js/wayfinder /vendor .DS_Store diff --git a/AGENTS.md b/AGENTS.md index 16fd5b1..e34262c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ This application is a Laravel application and its main Laravel ecosystems packag - laravel/framework (LARAVEL) - v13 - laravel/prompts (PROMPTS) - v0 - laravel/sanctum (SANCTUM) - v4 +- laravel/socialite (SOCIALITE) - v5 - laravel/wayfinder (WAYFINDER) - v0 - laravel/boost (BOOST) - v2 - laravel/mcp (MCP) - v0 diff --git a/app/Http/Controllers/Auth/SocialiteController.php b/app/Http/Controllers/Auth/SocialiteController.php new file mode 100644 index 0000000..a3a8931 --- /dev/null +++ b/app/Http/Controllers/Auth/SocialiteController.php @@ -0,0 +1,59 @@ +redirect(); + } + + /** + * Obtain the user information from the provider. + */ + public function callback(string $provider): RedirectResponse + { + $socialUser = Socialite::driver($provider)->user(); + + $socialAccount = Social::where('provider', $provider) + ->where('provider_id', $socialUser->getId()) + ->first(); + + if ($socialAccount) { + Auth::login($socialAccount->user); + + return redirect()->route('dashboard'); + } + + $user = User::where('email', $socialUser->getEmail())->first(); + + if (! $user) { + $user = User::create([ + 'name' => $socialUser->getName() ?? $socialUser->getNickname(), + 'email' => $socialUser->getEmail(), + 'email_verified_at' => now(), + ]); + } + + $user->socials()->create([ + 'provider' => $provider, + 'provider_id' => $socialUser->getId(), + 'avatar' => $socialUser->getAvatar(), + ]); + + Auth::login($user); + + return redirect()->route('dashboard'); + } +} diff --git a/app/Models/Social.php b/app/Models/Social.php new file mode 100644 index 0000000..65594b9 --- /dev/null +++ b/app/Models/Social.php @@ -0,0 +1,24 @@ +belongsTo(User::class); + } + + public function isProvider(string $provider): bool + { + return $this->provider === $provider; + } +} diff --git a/app/Models/User.php b/app/Models/User.php index 5f02e6f..26b422b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -27,6 +27,22 @@ public function registries(): HasMany return $this->hasMany(Registry::class); } + public function hasLinkedProvider(string $provider): bool + { + return $this->socials()->where('provider', $provider)->exists(); + } + + + public function socials(): HasMany + { + return $this->hasMany(Social::class); + } + + public function connectedAccounts(): HasMany + { + return $this->socials(); + } + /** * Get the attributes that should be cast. * diff --git a/boost.json b/boost.json index df9f755..3713f5f 100644 --- a/boost.json +++ b/boost.json @@ -10,6 +10,7 @@ "skills": [ "fortify-development", "laravel-best-practices", + "socialite-development", "wayfinder-development", "pest-testing", "inertia-react-development", diff --git a/composer.json b/composer.json index e585a0c..8c33e02 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,11 @@ "require": { "php": "^8.3", "inertiajs/inertia-laravel": "^3.0", + "laravel/cashier-paddle": "^2.8", "laravel/fortify": "^1.34", "laravel/framework": "^13.7", "laravel/sanctum": "^4.0", + "laravel/socialite": "^5.27", "laravel/tinker": "^3.0", "laravel/wayfinder": "^0.1.14" }, diff --git a/composer.lock b/composer.lock index 419ffa2..ffa884b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "40d749de359197d818c8415695320b74", + "content-hash": "a855c0d51b5e5235e56513ed3142fb04", "packages": [ { "name": "bacon/bacon-qr-code", @@ -661,6 +661,70 @@ ], "time": "2025-03-06T22:45:56+00:00" }, + { + "name": "firebase/php-jwt", + "version": "v7.0.5", + "source": { + "type": "git", + "url": "https://github.com/googleapis/php-jwt.git", + "reference": "47ad26bab5e7c70ae8a6f08ed25ff83631121380" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/googleapis/php-jwt/zipball/47ad26bab5e7c70ae8a6f08ed25ff83631121380", + "reference": "47ad26bab5e7c70ae8a6f08ed25ff83631121380", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpfastcache/phpfastcache": "^9.2", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/googleapis/php-jwt/issues", + "source": "https://github.com/googleapis/php-jwt/tree/v7.0.5" + }, + "time": "2026-04-01T20:38:03+00:00" + }, { "name": "fruitcake/php-cors", "version": "v1.4.0", @@ -1279,6 +1343,86 @@ }, "time": "2026-04-30T15:30:29+00:00" }, + { + "name": "laravel/cashier-paddle", + "version": "v2.8.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/cashier-paddle.git", + "reference": "5bc8b16a94cc3359e874a6025b762e1345cf46cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/cashier-paddle/zipball/5bc8b16a94cc3359e874a6025b762e1345cf46cf", + "reference": "5bc8b16a94cc3359e874a6025b762e1345cf46cf", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-openssl": "*", + "guzzlehttp/guzzle": "^7.4.5", + "illuminate/contracts": "^10.0|^11.0|^12.0|^13.0", + "illuminate/database": "^10.0|^11.0|^12.0|^13.0", + "illuminate/http": "^10.0|^11.0|^12.0|^13.0", + "illuminate/routing": "^10.0|^11.0|^12.0|^13.0", + "illuminate/support": "^10.0|^11.0|^12.0|^13.0", + "illuminate/view": "^10.0|^11.0|^12.0|^13.0", + "moneyphp/money": "^3.2|^4.0", + "nesbot/carbon": "^2.67|^3.0", + "php": "^8.1", + "spatie/url": "^1.3.5|^2.0", + "symfony/http-kernel": "^6.2|^7.0|^8.0", + "symfony/polyfill-intl-icu": "^1.22.1" + }, + "require-dev": { + "orchestra/testbench": "^8.36|^9.15|^10.8|^11.0", + "phpstan/phpstan": "^1.10" + }, + "suggest": { + "ext-intl": "Allows for more locales besides the default \"en\" when formatting money values." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Paddle\\CashierServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Paddle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries@laravel.com" + } + ], + "description": "Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.", + "keywords": [ + "billing", + "laravel", + "paddle" + ], + "support": { + "issues": "https://github.com/laravel/cashier-paddle/issues", + "source": "https://github.com/laravel/cashier-paddle" + }, + "time": "2026-04-01T15:55:32+00:00" + }, { "name": "laravel/fortify", "version": "v1.37.0", @@ -1818,6 +1962,78 @@ }, "time": "2026-04-16T14:03:50+00:00" }, + { + "name": "laravel/socialite", + "version": "v5.27.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/socialite.git", + "reference": "40e0757a75637c7b2dff05d3286b0d8fc25e5c0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/socialite/zipball/40e0757a75637c7b2dff05d3286b0d8fc25e5c0e", + "reference": "40e0757a75637c7b2dff05d3286b0d8fc25e5c0e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "firebase/php-jwt": "^6.4|^7.0", + "guzzlehttp/guzzle": "^6.0|^7.0", + "illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0", + "illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0", + "league/oauth1-client": "^1.11", + "php": "^7.2|^8.0", + "phpseclib/phpseclib": "^3.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.18|^5.20|^6.47|^7.55|^8.36|^9.15|^10.8|^11.0", + "phpstan/phpstan": "^1.12.23", + "phpunit/phpunit": "^8.0|^9.3|^10.4|^11.5|^12.0" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Socialite": "Laravel\\Socialite\\Facades\\Socialite" + }, + "providers": [ + "Laravel\\Socialite\\SocialiteServiceProvider" + ] + }, + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\Socialite\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Laravel wrapper around OAuth 1 & OAuth 2 libraries.", + "homepage": "https://laravel.com", + "keywords": [ + "laravel", + "oauth" + ], + "support": { + "issues": "https://github.com/laravel/socialite/issues", + "source": "https://github.com/laravel/socialite" + }, + "time": "2026-04-24T14:05:47+00:00" + }, { "name": "laravel/tinker", "version": "v3.0.2", @@ -1889,16 +2105,16 @@ }, { "name": "laravel/wayfinder", - "version": "v0.1.17", + "version": "v0.1.18", "source": { "type": "git", "url": "https://github.com/laravel/wayfinder.git", - "reference": "6930cbf3052adef0047af20ca8566f7a4a406dba" + "reference": "29598f386cdeef2cf4144f32bdaefc7542ac38ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/wayfinder/zipball/6930cbf3052adef0047af20ca8566f7a4a406dba", - "reference": "6930cbf3052adef0047af20ca8566f7a4a406dba", + "url": "https://api.github.com/repos/laravel/wayfinder/zipball/29598f386cdeef2cf4144f32bdaefc7542ac38ce", + "reference": "29598f386cdeef2cf4144f32bdaefc7542ac38ce", "shasum": "" }, "require": { @@ -1948,7 +2164,7 @@ "issues": "https://github.com/laravel/wayfinder/issues", "source": "https://github.com/laravel/wayfinder" }, - "time": "2026-05-05T20:16:56+00:00" + "time": "2026-05-08T14:41:03+00:00" }, { "name": "league/commonmark", @@ -2327,6 +2543,82 @@ ], "time": "2024-09-21T08:32:55+00:00" }, + { + "name": "league/oauth1-client", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/oauth1-client.git", + "reference": "f9c94b088837eb1aae1ad7c4f23eb65cc6993055" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/f9c94b088837eb1aae1ad7c4f23eb65cc6993055", + "reference": "f9c94b088837eb1aae1ad7c4f23eb65cc6993055", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-openssl": "*", + "guzzlehttp/guzzle": "^6.0|^7.0", + "guzzlehttp/psr7": "^1.7|^2.0", + "php": ">=7.1||>=8.0" + }, + "require-dev": { + "ext-simplexml": "*", + "friendsofphp/php-cs-fixer": "^2.17", + "mockery/mockery": "^1.3.3", + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5||9.5" + }, + "suggest": { + "ext-simplexml": "For decoding XML-based responses." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\OAuth1\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Corlett", + "email": "bencorlett@me.com", + "homepage": "http://www.webcomm.com.au", + "role": "Developer" + } + ], + "description": "OAuth 1.0 Client Library", + "keywords": [ + "Authentication", + "SSO", + "authorization", + "bitbucket", + "identity", + "idp", + "oauth", + "oauth1", + "single sign on", + "trello", + "tumblr", + "twitter" + ], + "support": { + "issues": "https://github.com/thephpleague/oauth1-client/issues", + "source": "https://github.com/thephpleague/oauth1-client/tree/v1.11.0" + }, + "time": "2024-12-10T19:59:05+00:00" + }, { "name": "league/uri", "version": "7.8.1", @@ -2509,6 +2801,96 @@ ], "time": "2026-03-08T20:05:35+00:00" }, + { + "name": "moneyphp/money", + "version": "v4.9.0", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "d49ee625c6ba79b9d7a228ce153b02fc1032152b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moneyphp/money/zipball/d49ee625c6ba79b9d7a228ce153b02fc1032152b", + "reference": "d49ee625c6ba79b9d7a228ce153b02fc1032152b", + "shasum": "" + }, + "require": { + "ext-bcmath": "*", + "ext-filter": "*", + "ext-json": "*", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0" + }, + "require-dev": { + "cache/taggable-cache": "^1.1.0", + "doctrine/coding-standard": "^12.0", + "doctrine/instantiator": "^1.5.0 || ^2.0", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^2.8.1", + "florianv/swap": "^4.3.0", + "moneyphp/crypto-currencies": "^1.1.0", + "moneyphp/iso-currencies": "^3.4", + "php-http/message": "^1.16.0", + "php-http/mock-client": "^1.6.0", + "phpbench/phpbench": "^1.2.5", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1.9", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5.9", + "psr/cache": "^1.0.1 || ^2.0 || ^3.0", + "ticketswap/phpstan-error-formatter": "^1.1" + }, + "suggest": { + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Money\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" + } + ], + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "support": { + "issues": "https://github.com/moneyphp/money/issues", + "source": "https://github.com/moneyphp/money/tree/v4.9.0" + }, + "time": "2026-05-04T20:23:15+00:00" + }, { "name": "monolog/monolog", "version": "3.10.0", @@ -3089,6 +3471,56 @@ }, "time": "2025-09-24T15:06:41+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -3339,6 +3771,116 @@ ], "time": "2025-12-27T19:41:33+00:00" }, + { + "name": "phpseclib/phpseclib", + "version": "3.0.52", + "source": { + "type": "git", + "url": "https://github.com/phpseclib/phpseclib.git", + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/2adaefc83df2ec548558307690f376dd7d4f4fce", + "reference": "2adaefc83df2ec548558307690f376dd7d4f4fce", + "shasum": "" + }, + "require": { + "paragonie/constant_time_encoding": "^1|^2|^3", + "paragonie/random_compat": "^1.4|^2.0|^9.99.99", + "php": ">=5.6.1" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-dom": "Install the DOM extension to load XML formatted public keys.", + "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", + "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", + "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", + "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." + }, + "type": "library", + "autoload": { + "files": [ + "phpseclib/bootstrap.php" + ], + "psr-4": { + "phpseclib3\\": "phpseclib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jim Wigginton", + "email": "terrafrost@php.net", + "role": "Lead Developer" + }, + { + "name": "Patrick Monnerat", + "email": "pm@datasphere.ch", + "role": "Developer" + }, + { + "name": "Andreas Fischer", + "email": "bantu@phpbb.com", + "role": "Developer" + }, + { + "name": "Hans-Jürgen Petrich", + "email": "petrich@tronic-media.com", + "role": "Developer" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "role": "Developer" + } + ], + "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", + "homepage": "http://phpseclib.sourceforge.net", + "keywords": [ + "BigInteger", + "aes", + "asn.1", + "asn1", + "blowfish", + "crypto", + "cryptography", + "encryption", + "rsa", + "security", + "sftp", + "signature", + "signing", + "ssh", + "twofish", + "x.509", + "x509" + ], + "support": { + "issues": "https://github.com/phpseclib/phpseclib/issues", + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.52" + }, + "funding": [ + { + "url": "https://github.com/terrafrost", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpseclib", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpseclib/phpseclib", + "type": "tidelift" + } + ], + "time": "2026-04-27T07:02:15+00:00" + }, { "name": "phpstan/phpdoc-parser", "version": "2.3.2", @@ -4127,6 +4669,119 @@ }, "time": "2025-12-14T04:43:48+00:00" }, + { + "name": "spatie/macroable", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/macroable.git", + "reference": "2967f69810ba4df158391665c0850010b9d1507c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/macroable/zipball/2967f69810ba4df158391665c0850010b9d1507c", + "reference": "2967f69810ba4df158391665c0850010b9d1507c", + "shasum": "" + }, + "require": { + "php": "^8.3" + }, + "require-dev": { + "pestphp/pest": "^4", + "phpunit/phpunit": "^12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Macroable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A trait to dynamically add methods to a class", + "homepage": "https://github.com/spatie/macroable", + "keywords": [ + "macroable", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/macroable/issues", + "source": "https://github.com/spatie/macroable/tree/2.1.0" + }, + "time": "2026-01-30T17:13:34+00:00" + }, + { + "name": "spatie/url", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/url.git", + "reference": "93a51db743cdec22b081c64593e193887c9cd395" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/url/zipball/93a51db743cdec22b081c64593e193887c9cd395", + "reference": "93a51db743cdec22b081c64593e193887c9cd395", + "shasum": "" + }, + "require": { + "php": "^8.0", + "psr/http-message": "^1.0 || ^2.0", + "spatie/macroable": "^1.0 || ^2.0" + }, + "require-dev": { + "pestphp/pest": "^1.21" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Url\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Parse, build and manipulate URL's", + "homepage": "https://github.com/spatie/url", + "keywords": [ + "spatie", + "url" + ], + "support": { + "issues": "https://github.com/spatie/url/issues", + "source": "https://github.com/spatie/url/tree/2.4.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-03-08T11:35:19+00:00" + }, { "name": "spomky-labs/cbor-php", "version": "3.2.3", @@ -5445,6 +6100,94 @@ ], "time": "2026-04-26T13:13:48+00:00" }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.37.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "3510b63d07376b04e57e27e82607d468bb134f78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/3510b63d07376b04e57e27e82607d468bb134f78", + "reference": "3510b63d07376b04e57e27e82607d468bb134f78", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance and support of other locales than \"en\"" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Icu\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.37.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-04-10T16:50:15+00:00" + }, { "name": "symfony/polyfill-intl-idn", "version": "v1.37.0", diff --git a/config/cashier.php b/config/cashier.php new file mode 100644 index 0000000..99c661a --- /dev/null +++ b/config/cashier.php @@ -0,0 +1,90 @@ + env('PADDLE_SELLER_ID'), + + 'client_side_token' => env('PADDLE_CLIENT_SIDE_TOKEN'), + + 'api_key' => env('PADDLE_AUTH_CODE') ?? env('PADDLE_API_KEY'), + + 'retain_key' => env('PADDLE_RETAIN_KEY'), + + 'webhook_secret' => env('PADDLE_WEBHOOK_SECRET'), + + /* + |-------------------------------------------------------------------------- + | Cashier Path + |-------------------------------------------------------------------------- + | + | This is the base URI path where Cashier's views, such as the webhook + | route, will be available. You're free to tweak this path based on + | the needs of your particular application or design preferences. + | + */ + + 'path' => env('CASHIER_PATH', 'paddle'), + + /* + |-------------------------------------------------------------------------- + | Cashier Webhook + |-------------------------------------------------------------------------- + | + | This is the base URI where webhooks from Paddle will be sent. The URL + | built into Cashier Paddle is used by default; however, you can add + | a custom URL when required for any application testing purposes. + | + */ + + 'webhook' => env('CASHIER_WEBHOOK'), + + /* + |-------------------------------------------------------------------------- + | Currency + |-------------------------------------------------------------------------- + | + | This is the default currency that will be used when generating charges + | from your application. Of course, you are welcome to use any of the + | various world currencies that are currently supported via Paddle. + | + */ + + 'currency' => env('CASHIER_CURRENCY', 'USD'), + + /* + |-------------------------------------------------------------------------- + | Currency Locale + |-------------------------------------------------------------------------- + | + | This is the default locale in which your money values are formatted in + | for display. To utilize other locales besides the default en locale + | verify you have the "intl" PHP extension installed on the system. + | + */ + + 'currency_locale' => env('CASHIER_CURRENCY_LOCALE', 'en'), + + /* + |-------------------------------------------------------------------------- + | Paddle Sandbox + |-------------------------------------------------------------------------- + | + | This option allows you to toggle between the Paddle live environment + | and its sandboxed environment. + | + */ + + 'sandbox' => env('PADDLE_SANDBOX', false), + +]; diff --git a/config/mcp.php b/config/mcp.php new file mode 100644 index 0000000..34bb81e --- /dev/null +++ b/config/mcp.php @@ -0,0 +1,54 @@ + [ + '*', + // 'https://example.com', + // 'http://localhost', + ], + + /* + |-------------------------------------------------------------------------- + | Allowed Custom Schemes + |-------------------------------------------------------------------------- + | + | Native desktop OAuth clients like Cursor and VS Code use private-use URI + | schemes (RFC 8252) for redirect callbacks instead of standard schemes + | like HTTPS. Here, you may list which custom schemes you will allow. + | + */ + + 'custom_schemes' => [ + // 'claude', + // 'cursor', + // 'vscode', + ], + + /* + |-------------------------------------------------------------------------- + | Authorization Server + |-------------------------------------------------------------------------- + | + | Here you may configure the OAuth authorization server issuer identifier + | per RFC 8414. This value appears in your protected resource and auth + | server metadata endpoints. When null, this defaults to `url('/')`. + | + */ + + 'authorization_server' => null, + +]; diff --git a/config/services.php b/config/services.php index 6a90eb8..b8ced15 100644 --- a/config/services.php +++ b/config/services.php @@ -34,5 +34,16 @@ 'channel' => env('SLACK_BOT_USER_DEFAULT_CHANNEL'), ], ], + 'github' => [ + 'client_id' => env('GITHUB_CLIENT_ID'), + 'client_secret' => env('GITHUB_CLIENT_SECRET'), + 'redirect' => env('GITHUB_REDIRECT_URI'), + ], + + 'google' => [ + 'client_id' => env('GOOGLE_CLIENT_ID'), + 'client_secret' => env('GOOGLE_CLIENT_SECRET'), + 'redirect' => env('GOOGLE_REDIRECT_URI'), + ], ]; diff --git a/database/factories/SocialFactory.php b/database/factories/SocialFactory.php new file mode 100644 index 0000000..30c7470 --- /dev/null +++ b/database/factories/SocialFactory.php @@ -0,0 +1,24 @@ + + */ +class SocialFactory extends Factory +{ + /** + * Define the model's default state. + * + * @return array + */ + public function definition(): array + { + return [ + // + ]; + } +} diff --git a/database/migrations/2019_05_03_000001_create_customers_table.php b/database/migrations/2019_05_03_000001_create_customers_table.php new file mode 100644 index 0000000..de58b56 --- /dev/null +++ b/database/migrations/2019_05_03_000001_create_customers_table.php @@ -0,0 +1,32 @@ +id(); + $table->morphs('billable'); + $table->string('paddle_id')->unique(); + $table->string('name'); + $table->string('email'); + $table->timestamp('trial_ends_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('customers'); + } +}; diff --git a/database/migrations/2019_05_03_000002_create_subscriptions_table.php b/database/migrations/2019_05_03_000002_create_subscriptions_table.php new file mode 100644 index 0000000..3384260 --- /dev/null +++ b/database/migrations/2019_05_03_000002_create_subscriptions_table.php @@ -0,0 +1,34 @@ +id(); + $table->morphs('billable'); + $table->string('type'); + $table->string('paddle_id')->unique(); + $table->string('status'); + $table->timestamp('trial_ends_at')->nullable(); + $table->timestamp('paused_at')->nullable(); + $table->timestamp('ends_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscriptions'); + } +}; diff --git a/database/migrations/2019_05_03_000003_create_subscription_items_table.php b/database/migrations/2019_05_03_000003_create_subscription_items_table.php new file mode 100644 index 0000000..58d335a --- /dev/null +++ b/database/migrations/2019_05_03_000003_create_subscription_items_table.php @@ -0,0 +1,34 @@ +id(); + $table->foreignId('subscription_id'); + $table->string('product_id'); + $table->string('price_id'); + $table->string('status'); + $table->integer('quantity'); + $table->timestamps(); + + $table->unique(['subscription_id', 'price_id']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('subscription_items'); + } +}; diff --git a/database/migrations/2019_05_03_000004_create_transactions_table.php b/database/migrations/2019_05_03_000004_create_transactions_table.php new file mode 100644 index 0000000..475d5d6 --- /dev/null +++ b/database/migrations/2019_05_03_000004_create_transactions_table.php @@ -0,0 +1,36 @@ +id(); + $table->morphs('billable'); + $table->string('paddle_id')->unique(); + $table->string('paddle_subscription_id')->nullable()->index(); + $table->string('invoice_number')->nullable(); + $table->string('status'); + $table->string('total'); + $table->string('tax'); + $table->string('currency', 3); + $table->timestamp('billed_at'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('transactions'); + } +}; diff --git a/database/migrations/2026_05_09_234841_create_socials_table.php b/database/migrations/2026_05_09_234841_create_socials_table.php new file mode 100644 index 0000000..1fd6b0f --- /dev/null +++ b/database/migrations/2026_05_09_234841_create_socials_table.php @@ -0,0 +1,33 @@ +id(); + $table->foreignId('user_id')->constrained()->cascadeOnDelete(); + $table->string('provider'); + $table->string('provider_id'); + $table->string('avatar')->nullable(); + $table->timestamps(); + + $table->unique(['provider', 'provider_id']); + $table->unique(['user_id', 'provider']); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('socials'); + } +}; diff --git a/database/migrations/2026_05_10_080503_make_password_nullable_on_users_table.php b/database/migrations/2026_05_10_080503_make_password_nullable_on_users_table.php new file mode 100644 index 0000000..3bd91b0 --- /dev/null +++ b/database/migrations/2026_05_10_080503_make_password_nullable_on_users_table.php @@ -0,0 +1,28 @@ +string('password')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->string('password')->nullable(false)->change(); + }); + } +}; diff --git a/database/seeders/SocialSeeder.php b/database/seeders/SocialSeeder.php new file mode 100644 index 0000000..567728d --- /dev/null +++ b/database/seeders/SocialSeeder.php @@ -0,0 +1,17 @@ + -
- {({ processing, errors }) => ( - <> -
+
+
+ + +
+ +
+
+ +
+
+ + Or continue with + +
+
+ + + {({ processing, errors }) => ( + <> +
- {canRegister && ( -
- Don't have an account?{' '} - - Sign up - -
- )} - - )} - + {canRegister && ( +
+ Don't have an account?{' '} + + Sign up + +
+ )} + + )} + +
{status && (
diff --git a/resources/js/pages/auth/register.tsx b/resources/js/pages/auth/register.tsx index fe72a26..2338261 100644 --- a/resources/js/pages/auth/register.tsx +++ b/resources/js/pages/auth/register.tsx @@ -3,25 +3,56 @@ import InputError from '@/components/input-error'; import PasswordInput from '@/components/password-input'; import TextLink from '@/components/text-link'; import { Button } from '@/components/ui/button'; +import { Icon } from '@/components/ui/icon'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; +import { Separator } from '@/components/ui/separator'; import { Spinner } from '@/components/ui/spinner'; +import { Github, Chrome } from 'lucide-react'; import { login } from '@/routes'; +import { redirect } from '@/routes/socialite'; import { store } from '@/routes/register'; export default function Register() { return ( <> -
- {({ processing, errors }) => ( - <> -
+
+ + +
+
+ +
+
+ + Or continue with + +
+
+ + + {({ processing, errors }) => ( + <> +
-
- Already have an account?{' '} - - Log in - -
- - )} - +
+ Already have an account?{' '} + + Log in + +
+ + )} + +
); } diff --git a/resources/js/routes/animate-css/index.ts b/resources/js/routes/animate-css/index.ts new file mode 100644 index 0000000..a29a550 --- /dev/null +++ b/resources/js/routes/animate-css/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\AnimateController::index +* @see Http/Controllers/AnimateController.php:11 +* @route '/animate-css' +*/ +export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +index.definition = { + methods: ["get","head"], + url: '/animate-css', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\AnimateController::index +* @see Http/Controllers/AnimateController.php:11 +* @route '/animate-css' +*/ +index.url = (options?: RouteQueryOptions) => { + return index.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\AnimateController::index +* @see Http/Controllers/AnimateController.php:11 +* @route '/animate-css' +*/ +index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\AnimateController::index +* @see Http/Controllers/AnimateController.php:11 +* @route '/animate-css' +*/ +index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: index.url(options), + method: 'head', +}) + +const animateCss = { + index: Object.assign(index, index), +} + +export default animateCss \ No newline at end of file diff --git a/resources/js/routes/appearance/index.ts b/resources/js/routes/appearance/index.ts new file mode 100644 index 0000000..674fe1b --- /dev/null +++ b/resources/js/routes/appearance/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/settings/appearance' +*/ +export const edit = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +edit.definition = { + methods: ["get","head"], + url: '/settings/appearance', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/settings/appearance' +*/ +edit.url = (options?: RouteQueryOptions) => { + return edit.definition.url + queryParams(options) +} + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/settings/appearance' +*/ +edit.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/settings/appearance' +*/ +edit.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: edit.url(options), + method: 'head', +}) + +const appearance = { + edit: Object.assign(edit, edit), +} + +export default appearance \ No newline at end of file diff --git a/resources/js/routes/boost/index.ts b/resources/js/routes/boost/index.ts new file mode 100644 index 0000000..2d31924 --- /dev/null +++ b/resources/js/routes/boost/index.ts @@ -0,0 +1,37 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see vendor/laravel/boost/src/BoostServiceProvider.php:92 +* @route '/_boost/browser-logs' +*/ +export const browserLogs = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: browserLogs.url(options), + method: 'post', +}) + +browserLogs.definition = { + methods: ["post"], + url: '/_boost/browser-logs', +} satisfies RouteDefinition<["post"]> + +/** +* @see vendor/laravel/boost/src/BoostServiceProvider.php:92 +* @route '/_boost/browser-logs' +*/ +browserLogs.url = (options?: RouteQueryOptions) => { + return browserLogs.definition.url + queryParams(options) +} + +/** +* @see vendor/laravel/boost/src/BoostServiceProvider.php:92 +* @route '/_boost/browser-logs' +*/ +browserLogs.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: browserLogs.url(options), + method: 'post', +}) + +const boost = { + browserLogs: Object.assign(browserLogs, browserLogs), +} + +export default boost \ No newline at end of file diff --git a/resources/js/routes/cashier/index.ts b/resources/js/routes/cashier/index.ts new file mode 100644 index 0000000..8efc475 --- /dev/null +++ b/resources/js/routes/cashier/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \Laravel\Paddle\Http\Controllers\WebhookController::__invoke +* @see vendor/laravel/cashier-paddle/src/Http/Controllers/WebhookController.php:43 +* @route '/paddle/webhook' +*/ +export const webhook = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: webhook.url(options), + method: 'post', +}) + +webhook.definition = { + methods: ["post"], + url: '/paddle/webhook', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Paddle\Http\Controllers\WebhookController::__invoke +* @see vendor/laravel/cashier-paddle/src/Http/Controllers/WebhookController.php:43 +* @route '/paddle/webhook' +*/ +webhook.url = (options?: RouteQueryOptions) => { + return webhook.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Paddle\Http\Controllers\WebhookController::__invoke +* @see vendor/laravel/cashier-paddle/src/Http/Controllers/WebhookController.php:43 +* @route '/paddle/webhook' +*/ +webhook.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: webhook.url(options), + method: 'post', +}) + +const cashier = { + webhook: Object.assign(webhook, webhook), +} + +export default cashier \ No newline at end of file diff --git a/resources/js/routes/debugbar/cache/index.ts b/resources/js/routes/debugbar/cache/index.ts new file mode 100644 index 0000000..8be1c2a --- /dev/null +++ b/resources/js/routes/debugbar/cache/index.ts @@ -0,0 +1,58 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../../wayfinder' +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\CacheController::deleteMethod +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/CacheController.php:16 +* @route '/_debugbar/cache/{key}' +*/ +export const deleteMethod = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: deleteMethod.url(args, options), + method: 'delete', +}) + +deleteMethod.definition = { + methods: ["delete"], + url: '/_debugbar/cache/{key}', +} satisfies RouteDefinition<["delete"]> + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\CacheController::deleteMethod +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/CacheController.php:16 +* @route '/_debugbar/cache/{key}' +*/ +deleteMethod.url = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { key: args } + } + + if (Array.isArray(args)) { + args = { + key: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + key: args.key, + } + + return deleteMethod.definition.url + .replace('{key}', parsedArgs.key.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\CacheController::deleteMethod +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/CacheController.php:16 +* @route '/_debugbar/cache/{key}' +*/ +deleteMethod.delete = (args: { key: string | number } | [key: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: deleteMethod.url(args, options), + method: 'delete', +}) + +const cache = { + delete: Object.assign(deleteMethod, deleteMethod), +} + +export default cache \ No newline at end of file diff --git a/resources/js/routes/debugbar/index.ts b/resources/js/routes/debugbar/index.ts new file mode 100644 index 0000000..9f49078 --- /dev/null +++ b/resources/js/routes/debugbar/index.ts @@ -0,0 +1,162 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../wayfinder' +import cache from './cache' +import queries from './queries' +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::openhandler +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:18 +* @route '/_debugbar/open' +*/ +export const openhandler = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: openhandler.url(options), + method: 'get', +}) + +openhandler.definition = { + methods: ["get","head"], + url: '/_debugbar/open', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::openhandler +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:18 +* @route '/_debugbar/open' +*/ +openhandler.url = (options?: RouteQueryOptions) => { + return openhandler.definition.url + queryParams(options) +} + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::openhandler +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:18 +* @route '/_debugbar/open' +*/ +openhandler.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: openhandler.url(options), + method: 'get', +}) + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::openhandler +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:18 +* @route '/_debugbar/open' +*/ +openhandler.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: openhandler.url(options), + method: 'head', +}) + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::clockwork +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:49 +* @route '/_debugbar/clockwork/{id}' +*/ +export const clockwork = (args: { id: string | number } | [id: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: clockwork.url(args, options), + method: 'get', +}) + +clockwork.definition = { + methods: ["get","head"], + url: '/_debugbar/clockwork/{id}', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::clockwork +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:49 +* @route '/_debugbar/clockwork/{id}' +*/ +clockwork.url = (args: { id: string | number } | [id: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { id: args } + } + + if (Array.isArray(args)) { + args = { + id: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + id: args.id, + } + + return clockwork.definition.url + .replace('{id}', parsedArgs.id.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::clockwork +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:49 +* @route '/_debugbar/clockwork/{id}' +*/ +clockwork.get = (args: { id: string | number } | [id: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: clockwork.url(args, options), + method: 'get', +}) + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\OpenHandlerController::clockwork +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/OpenHandlerController.php:49 +* @route '/_debugbar/clockwork/{id}' +*/ +clockwork.head = (args: { id: string | number } | [id: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: clockwork.url(args, options), + method: 'head', +}) + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\AssetController::assets +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/AssetController.php:16 +* @route '/_debugbar/assets' +*/ +export const assets = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: assets.url(options), + method: 'get', +}) + +assets.definition = { + methods: ["get","head"], + url: '/_debugbar/assets', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\AssetController::assets +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/AssetController.php:16 +* @route '/_debugbar/assets' +*/ +assets.url = (options?: RouteQueryOptions) => { + return assets.definition.url + queryParams(options) +} + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\AssetController::assets +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/AssetController.php:16 +* @route '/_debugbar/assets' +*/ +assets.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: assets.url(options), + method: 'get', +}) + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\AssetController::assets +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/AssetController.php:16 +* @route '/_debugbar/assets' +*/ +assets.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: assets.url(options), + method: 'head', +}) + +const debugbar = { + openhandler: Object.assign(openhandler, openhandler), + cache: Object.assign(cache, cache), + queries: Object.assign(queries, queries), + clockwork: Object.assign(clockwork, clockwork), + assets: Object.assign(assets, assets), +} + +export default debugbar \ No newline at end of file diff --git a/resources/js/routes/debugbar/queries/index.ts b/resources/js/routes/debugbar/queries/index.ts new file mode 100644 index 0000000..98b985b --- /dev/null +++ b/resources/js/routes/debugbar/queries/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../../wayfinder' +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\QueriesController::explain +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/QueriesController.php:17 +* @route '/_debugbar/queries/explain' +*/ +export const explain = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: explain.url(options), + method: 'post', +}) + +explain.definition = { + methods: ["post"], + url: '/_debugbar/queries/explain', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\QueriesController::explain +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/QueriesController.php:17 +* @route '/_debugbar/queries/explain' +*/ +explain.url = (options?: RouteQueryOptions) => { + return explain.definition.url + queryParams(options) +} + +/** +* @see \Fruitcake\LaravelDebugbar\Controllers\QueriesController::explain +* @see vendor/fruitcake/laravel-debugbar/src/Controllers/QueriesController.php:17 +* @route '/_debugbar/queries/explain' +*/ +explain.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: explain.url(options), + method: 'post', +}) + +const queries = { + explain: Object.assign(explain, explain), +} + +export default queries \ No newline at end of file diff --git a/resources/js/routes/fonts/index.ts b/resources/js/routes/fonts/index.ts new file mode 100644 index 0000000..3af7a41 --- /dev/null +++ b/resources/js/routes/fonts/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\FontsController::index +* @see Http/Controllers/FontsController.php:10 +* @route '/fonts' +*/ +export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +index.definition = { + methods: ["get","head"], + url: '/fonts', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\FontsController::index +* @see Http/Controllers/FontsController.php:10 +* @route '/fonts' +*/ +index.url = (options?: RouteQueryOptions) => { + return index.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\FontsController::index +* @see Http/Controllers/FontsController.php:10 +* @route '/fonts' +*/ +index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\FontsController::index +* @see Http/Controllers/FontsController.php:10 +* @route '/fonts' +*/ +index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: index.url(options), + method: 'head', +}) + +const fonts = { + index: Object.assign(index, index), +} + +export default fonts \ No newline at end of file diff --git a/resources/js/routes/index.ts b/resources/js/routes/index.ts new file mode 100644 index 0000000..4776020 --- /dev/null +++ b/resources/js/routes/index.ts @@ -0,0 +1,210 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:47 +* @route '/login' +*/ +export const login = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: login.url(options), + method: 'get', +}) + +login.definition = { + methods: ["get","head"], + url: '/login', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:47 +* @route '/login' +*/ +login.url = (options?: RouteQueryOptions) => { + return login.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:47 +* @route '/login' +*/ +login.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: login.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:47 +* @route '/login' +*/ +login.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: login.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::logout +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:100 +* @route '/logout' +*/ +export const logout = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: logout.url(options), + method: 'post', +}) + +logout.definition = { + methods: ["post"], + url: '/logout', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::logout +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:100 +* @route '/logout' +*/ +logout.url = (options?: RouteQueryOptions) => { + return logout.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::logout +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:100 +* @route '/logout' +*/ +logout.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: logout.url(options), + method: 'post', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::register +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:41 +* @route '/register' +*/ +export const register = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: register.url(options), + method: 'get', +}) + +register.definition = { + methods: ["get","head"], + url: '/register', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::register +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:41 +* @route '/register' +*/ +register.url = (options?: RouteQueryOptions) => { + return register.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::register +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:41 +* @route '/register' +*/ +register.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: register.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::register +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:41 +* @route '/register' +*/ +register.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: register.url(options), + method: 'head', +}) + +/** +* @see \App\Http\Controllers\HomePageController::__invoke +* @see Http/Controllers/HomePageController.php:13 +* @route '/' +*/ +export const home = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: home.url(options), + method: 'get', +}) + +home.definition = { + methods: ["get","head"], + url: '/', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\HomePageController::__invoke +* @see Http/Controllers/HomePageController.php:13 +* @route '/' +*/ +home.url = (options?: RouteQueryOptions) => { + return home.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\HomePageController::__invoke +* @see Http/Controllers/HomePageController.php:13 +* @route '/' +*/ +home.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: home.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\HomePageController::__invoke +* @see Http/Controllers/HomePageController.php:13 +* @route '/' +*/ +home.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: home.url(options), + method: 'head', +}) + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/dashboard' +*/ +export const dashboard = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: dashboard.url(options), + method: 'get', +}) + +dashboard.definition = { + methods: ["get","head"], + url: '/dashboard', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/dashboard' +*/ +dashboard.url = (options?: RouteQueryOptions) => { + return dashboard.definition.url + queryParams(options) +} + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/dashboard' +*/ +dashboard.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: dashboard.url(options), + method: 'get', +}) + +/** +* @see \Inertia\Controller::__invoke +* @see vendor/inertiajs/inertia-laravel/src/Controller.php:13 +* @route '/dashboard' +*/ +dashboard.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: dashboard.url(options), + method: 'head', +}) diff --git a/resources/js/routes/login/index.ts b/resources/js/routes/login/index.ts new file mode 100644 index 0000000..83595cb --- /dev/null +++ b/resources/js/routes/login/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:58 +* @route '/login' +*/ +export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +store.definition = { + methods: ["post"], + url: '/login', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:58 +* @route '/login' +*/ +store.url = (options?: RouteQueryOptions) => { + return store.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\AuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/AuthenticatedSessionController.php:58 +* @route '/login' +*/ +store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +const login = { + store: Object.assign(store, store), +} + +export default login \ No newline at end of file diff --git a/resources/js/routes/password/confirm/index.ts b/resources/js/routes/password/confirm/index.ts new file mode 100644 index 0000000..c81ed83 --- /dev/null +++ b/resources/js/routes/password/confirm/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::store +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:51 +* @route '/user/confirm-password' +*/ +export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +store.definition = { + methods: ["post"], + url: '/user/confirm-password', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::store +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:51 +* @route '/user/confirm-password' +*/ +store.url = (options?: RouteQueryOptions) => { + return store.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::store +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:51 +* @route '/user/confirm-password' +*/ +store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +const confirm = { + store: Object.assign(store, store), +} + +export default confirm \ No newline at end of file diff --git a/resources/js/routes/password/index.ts b/resources/js/routes/password/index.ts new file mode 100644 index 0000000..3730354 --- /dev/null +++ b/resources/js/routes/password/index.ts @@ -0,0 +1,274 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../wayfinder' +import confirmD7e05f from './confirm' +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::request +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:22 +* @route '/forgot-password' +*/ +export const request = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: request.url(options), + method: 'get', +}) + +request.definition = { + methods: ["get","head"], + url: '/forgot-password', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::request +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:22 +* @route '/forgot-password' +*/ +request.url = (options?: RouteQueryOptions) => { + return request.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::request +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:22 +* @route '/forgot-password' +*/ +request.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: request.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::request +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:22 +* @route '/forgot-password' +*/ +request.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: request.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::reset +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:44 +* @route '/reset-password/{token}' +*/ +export const reset = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: reset.url(args, options), + method: 'get', +}) + +reset.definition = { + methods: ["get","head"], + url: '/reset-password/{token}', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::reset +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:44 +* @route '/reset-password/{token}' +*/ +reset.url = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { token: args } + } + + if (Array.isArray(args)) { + args = { + token: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + token: args.token, + } + + return reset.definition.url + .replace('{token}', parsedArgs.token.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::reset +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:44 +* @route '/reset-password/{token}' +*/ +reset.get = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: reset.url(args, options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::reset +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:44 +* @route '/reset-password/{token}' +*/ +reset.head = (args: { token: string | number } | [token: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: reset.url(args, options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::email +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:30 +* @route '/forgot-password' +*/ +export const email = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: email.url(options), + method: 'post', +}) + +email.definition = { + methods: ["post"], + url: '/forgot-password', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::email +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:30 +* @route '/forgot-password' +*/ +email.url = (options?: RouteQueryOptions) => { + return email.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\PasswordResetLinkController::email +* @see vendor/laravel/fortify/src/Http/Controllers/PasswordResetLinkController.php:30 +* @route '/forgot-password' +*/ +email.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: email.url(options), + method: 'post', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::update +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:55 +* @route '/reset-password' +*/ +export const update = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: update.url(options), + method: 'post', +}) + +update.definition = { + methods: ["post"], + url: '/reset-password', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::update +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:55 +* @route '/reset-password' +*/ +update.url = (options?: RouteQueryOptions) => { + return update.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\NewPasswordController::update +* @see vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php:55 +* @route '/reset-password' +*/ +update.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: update.url(options), + method: 'post', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:40 +* @route '/user/confirm-password' +*/ +export const confirm = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: confirm.url(options), + method: 'get', +}) + +confirm.definition = { + methods: ["get","head"], + url: '/user/confirm-password', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:40 +* @route '/user/confirm-password' +*/ +confirm.url = (options?: RouteQueryOptions) => { + return confirm.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:40 +* @route '/user/confirm-password' +*/ +confirm.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: confirm.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmablePasswordController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmablePasswordController.php:40 +* @route '/user/confirm-password' +*/ +confirm.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: confirm.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedPasswordStatusController::confirmation +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedPasswordStatusController.php:17 +* @route '/user/confirmed-password-status' +*/ +export const confirmation = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: confirmation.url(options), + method: 'get', +}) + +confirmation.definition = { + methods: ["get","head"], + url: '/user/confirmed-password-status', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedPasswordStatusController::confirmation +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedPasswordStatusController.php:17 +* @route '/user/confirmed-password-status' +*/ +confirmation.url = (options?: RouteQueryOptions) => { + return confirmation.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedPasswordStatusController::confirmation +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedPasswordStatusController.php:17 +* @route '/user/confirmed-password-status' +*/ +confirmation.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: confirmation.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedPasswordStatusController::confirmation +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedPasswordStatusController.php:17 +* @route '/user/confirmed-password-status' +*/ +confirmation.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: confirmation.url(options), + method: 'head', +}) + +const password = { + request: Object.assign(request, request), + reset: Object.assign(reset, reset), + email: Object.assign(email, email), + update: Object.assign(update, update), + confirm: Object.assign(confirm, confirmD7e05f), + confirmation: Object.assign(confirmation, confirmation), +} + +export default password \ No newline at end of file diff --git a/resources/js/routes/profile/index.ts b/resources/js/routes/profile/index.ts new file mode 100644 index 0000000..ceb6573 --- /dev/null +++ b/resources/js/routes/profile/index.ts @@ -0,0 +1,120 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\Settings\ProfileController::edit +* @see Http/Controllers/Settings/ProfileController.php:20 +* @route '/settings/profile' +*/ +export const edit = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +edit.definition = { + methods: ["get","head"], + url: '/settings/profile', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\Settings\ProfileController::edit +* @see Http/Controllers/Settings/ProfileController.php:20 +* @route '/settings/profile' +*/ +edit.url = (options?: RouteQueryOptions) => { + return edit.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Settings\ProfileController::edit +* @see Http/Controllers/Settings/ProfileController.php:20 +* @route '/settings/profile' +*/ +edit.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\Settings\ProfileController::edit +* @see Http/Controllers/Settings/ProfileController.php:20 +* @route '/settings/profile' +*/ +edit.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: edit.url(options), + method: 'head', +}) + +/** +* @see \App\Http\Controllers\Settings\ProfileController::update +* @see Http/Controllers/Settings/ProfileController.php:31 +* @route '/settings/profile' +*/ +export const update = (options?: RouteQueryOptions): RouteDefinition<'patch'> => ({ + url: update.url(options), + method: 'patch', +}) + +update.definition = { + methods: ["patch"], + url: '/settings/profile', +} satisfies RouteDefinition<["patch"]> + +/** +* @see \App\Http\Controllers\Settings\ProfileController::update +* @see Http/Controllers/Settings/ProfileController.php:31 +* @route '/settings/profile' +*/ +update.url = (options?: RouteQueryOptions) => { + return update.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Settings\ProfileController::update +* @see Http/Controllers/Settings/ProfileController.php:31 +* @route '/settings/profile' +*/ +update.patch = (options?: RouteQueryOptions): RouteDefinition<'patch'> => ({ + url: update.url(options), + method: 'patch', +}) + +/** +* @see \App\Http\Controllers\Settings\ProfileController::destroy +* @see Http/Controllers/Settings/ProfileController.php:49 +* @route '/settings/profile' +*/ +export const destroy = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: destroy.url(options), + method: 'delete', +}) + +destroy.definition = { + methods: ["delete"], + url: '/settings/profile', +} satisfies RouteDefinition<["delete"]> + +/** +* @see \App\Http\Controllers\Settings\ProfileController::destroy +* @see Http/Controllers/Settings/ProfileController.php:49 +* @route '/settings/profile' +*/ +destroy.url = (options?: RouteQueryOptions) => { + return destroy.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Settings\ProfileController::destroy +* @see Http/Controllers/Settings/ProfileController.php:49 +* @route '/settings/profile' +*/ +destroy.delete = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: destroy.url(options), + method: 'delete', +}) + +const profile = { + edit: Object.assign(edit, edit), + update: Object.assign(update, update), + destroy: Object.assign(destroy, destroy), +} + +export default profile \ No newline at end of file diff --git a/resources/js/routes/register/index.ts b/resources/js/routes/register/index.ts new file mode 100644 index 0000000..90ec79a --- /dev/null +++ b/resources/js/routes/register/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::store +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:53 +* @route '/register' +*/ +export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +store.definition = { + methods: ["post"], + url: '/register', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::store +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:53 +* @route '/register' +*/ +store.url = (options?: RouteQueryOptions) => { + return store.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\RegisteredUserController::store +* @see vendor/laravel/fortify/src/Http/Controllers/RegisteredUserController.php:53 +* @route '/register' +*/ +store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +const register = { + store: Object.assign(store, store), +} + +export default register \ No newline at end of file diff --git a/resources/js/routes/sanctum/index.ts b/resources/js/routes/sanctum/index.ts new file mode 100644 index 0000000..5baa94d --- /dev/null +++ b/resources/js/routes/sanctum/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \Laravel\Sanctum\Http\Controllers\CsrfCookieController::csrfCookie +* @see vendor/laravel/sanctum/src/Http/Controllers/CsrfCookieController.php:17 +* @route '/sanctum/csrf-cookie' +*/ +export const csrfCookie = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: csrfCookie.url(options), + method: 'get', +}) + +csrfCookie.definition = { + methods: ["get","head"], + url: '/sanctum/csrf-cookie', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Sanctum\Http\Controllers\CsrfCookieController::csrfCookie +* @see vendor/laravel/sanctum/src/Http/Controllers/CsrfCookieController.php:17 +* @route '/sanctum/csrf-cookie' +*/ +csrfCookie.url = (options?: RouteQueryOptions) => { + return csrfCookie.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Sanctum\Http\Controllers\CsrfCookieController::csrfCookie +* @see vendor/laravel/sanctum/src/Http/Controllers/CsrfCookieController.php:17 +* @route '/sanctum/csrf-cookie' +*/ +csrfCookie.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: csrfCookie.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Sanctum\Http\Controllers\CsrfCookieController::csrfCookie +* @see vendor/laravel/sanctum/src/Http/Controllers/CsrfCookieController.php:17 +* @route '/sanctum/csrf-cookie' +*/ +csrfCookie.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: csrfCookie.url(options), + method: 'head', +}) + +const sanctum = { + csrfCookie: Object.assign(csrfCookie, csrfCookie), +} + +export default sanctum \ No newline at end of file diff --git a/resources/js/routes/security/index.ts b/resources/js/routes/security/index.ts new file mode 100644 index 0000000..ac37adc --- /dev/null +++ b/resources/js/routes/security/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\Settings\SecurityController::edit +* @see Http/Controllers/Settings/SecurityController.php:31 +* @route '/settings/security' +*/ +export const edit = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +edit.definition = { + methods: ["get","head"], + url: '/settings/security', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\Settings\SecurityController::edit +* @see Http/Controllers/Settings/SecurityController.php:31 +* @route '/settings/security' +*/ +edit.url = (options?: RouteQueryOptions) => { + return edit.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Settings\SecurityController::edit +* @see Http/Controllers/Settings/SecurityController.php:31 +* @route '/settings/security' +*/ +edit.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: edit.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\Settings\SecurityController::edit +* @see Http/Controllers/Settings/SecurityController.php:31 +* @route '/settings/security' +*/ +edit.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: edit.url(options), + method: 'head', +}) + +const security = { + edit: Object.assign(edit, edit), +} + +export default security \ No newline at end of file diff --git a/resources/js/routes/socialite/index.ts b/resources/js/routes/socialite/index.ts new file mode 100644 index 0000000..0ac060e --- /dev/null +++ b/resources/js/routes/socialite/index.ts @@ -0,0 +1,131 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../wayfinder' +/** +* @see \App\Http\Controllers\Auth\SocialiteController::redirect +* @see Http/Controllers/Auth/SocialiteController.php:17 +* @route '/auth/{provider}/redirect' +*/ +export const redirect = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: redirect.url(args, options), + method: 'get', +}) + +redirect.definition = { + methods: ["get","head"], + url: '/auth/{provider}/redirect', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::redirect +* @see Http/Controllers/Auth/SocialiteController.php:17 +* @route '/auth/{provider}/redirect' +*/ +redirect.url = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { provider: args } + } + + if (Array.isArray(args)) { + args = { + provider: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + provider: args.provider, + } + + return redirect.definition.url + .replace('{provider}', parsedArgs.provider.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::redirect +* @see Http/Controllers/Auth/SocialiteController.php:17 +* @route '/auth/{provider}/redirect' +*/ +redirect.get = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: redirect.url(args, options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::redirect +* @see Http/Controllers/Auth/SocialiteController.php:17 +* @route '/auth/{provider}/redirect' +*/ +redirect.head = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: redirect.url(args, options), + method: 'head', +}) + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::callback +* @see Http/Controllers/Auth/SocialiteController.php:25 +* @route '/auth/{provider}/callback' +*/ +export const callback = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: callback.url(args, options), + method: 'get', +}) + +callback.definition = { + methods: ["get","head"], + url: '/auth/{provider}/callback', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::callback +* @see Http/Controllers/Auth/SocialiteController.php:25 +* @route '/auth/{provider}/callback' +*/ +callback.url = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { provider: args } + } + + if (Array.isArray(args)) { + args = { + provider: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + provider: args.provider, + } + + return callback.definition.url + .replace('{provider}', parsedArgs.provider.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::callback +* @see Http/Controllers/Auth/SocialiteController.php:25 +* @route '/auth/{provider}/callback' +*/ +callback.get = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: callback.url(args, options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\Auth\SocialiteController::callback +* @see Http/Controllers/Auth/SocialiteController.php:25 +* @route '/auth/{provider}/callback' +*/ +callback.head = (args: { provider: string | number } | [provider: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: callback.url(args, options), + method: 'head', +}) + +const socialite = { + redirect: Object.assign(redirect, redirect), + callback: Object.assign(callback, callback), +} + +export default socialite \ No newline at end of file diff --git a/resources/js/routes/storage/index.ts b/resources/js/routes/storage/index.ts new file mode 100644 index 0000000..939539f --- /dev/null +++ b/resources/js/routes/storage/index.ts @@ -0,0 +1,65 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../wayfinder' +import localA91488 from './local' +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:111 +* @route '/storage/{path}' +*/ +export const local = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: local.url(args, options), + method: 'get', +}) + +local.definition = { + methods: ["get","head"], + url: '/storage/{path}', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:111 +* @route '/storage/{path}' +*/ +local.url = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { path: args } + } + + if (Array.isArray(args)) { + args = { + path: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + path: args.path, + } + + return local.definition.url + .replace('{path}', parsedArgs.path.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:111 +* @route '/storage/{path}' +*/ +local.get = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: local.url(args, options), + method: 'get', +}) + +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:111 +* @route '/storage/{path}' +*/ +local.head = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: local.url(args, options), + method: 'head', +}) + +const storage = { + local: Object.assign(local, localA91488), +} + +export default storage \ No newline at end of file diff --git a/resources/js/routes/storage/local/index.ts b/resources/js/routes/storage/local/index.ts new file mode 100644 index 0000000..a110795 --- /dev/null +++ b/resources/js/routes/storage/local/index.ts @@ -0,0 +1,55 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../../wayfinder' +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:119 +* @route '/storage/{path}' +*/ +export const upload = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({ + url: upload.url(args, options), + method: 'put', +}) + +upload.definition = { + methods: ["put"], + url: '/storage/{path}', +} satisfies RouteDefinition<["put"]> + +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:119 +* @route '/storage/{path}' +*/ +upload.url = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions) => { + if (typeof args === 'string' || typeof args === 'number') { + args = { path: args } + } + + if (Array.isArray(args)) { + args = { + path: args[0], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + path: args.path, + } + + return upload.definition.url + .replace('{path}', parsedArgs.path.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemServiceProvider.php:119 +* @route '/storage/{path}' +*/ +upload.put = (args: { path: string | number } | [path: string | number ] | string | number, options?: RouteQueryOptions): RouteDefinition<'put'> => ({ + url: upload.url(args, options), + method: 'put', +}) + +const local = { + upload: Object.assign(upload, upload), +} + +export default local \ No newline at end of file diff --git a/resources/js/routes/themes/index.ts b/resources/js/routes/themes/index.ts new file mode 100644 index 0000000..47f66a2 --- /dev/null +++ b/resources/js/routes/themes/index.ts @@ -0,0 +1,50 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\ThemesController::index +* @see Http/Controllers/ThemesController.php:11 +* @route '/themes' +*/ +export const index = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +index.definition = { + methods: ["get","head"], + url: '/themes', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \App\Http\Controllers\ThemesController::index +* @see Http/Controllers/ThemesController.php:11 +* @route '/themes' +*/ +index.url = (options?: RouteQueryOptions) => { + return index.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\ThemesController::index +* @see Http/Controllers/ThemesController.php:11 +* @route '/themes' +*/ +index.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: index.url(options), + method: 'get', +}) + +/** +* @see \App\Http\Controllers\ThemesController::index +* @see Http/Controllers/ThemesController.php:11 +* @route '/themes' +*/ +index.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: index.url(options), + method: 'head', +}) + +const themes = { + index: Object.assign(index, index), +} + +export default themes \ No newline at end of file diff --git a/resources/js/routes/two-factor/index.ts b/resources/js/routes/two-factor/index.ts new file mode 100644 index 0000000..ad82f41 --- /dev/null +++ b/resources/js/routes/two-factor/index.ts @@ -0,0 +1,326 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +import loginDf2c2a from './login' +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:41 +* @route '/two-factor-challenge' +*/ +export const login = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: login.url(options), + method: 'get', +}) + +login.definition = { + methods: ["get","head"], + url: '/two-factor-challenge', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:41 +* @route '/two-factor-challenge' +*/ +login.url = (options?: RouteQueryOptions) => { + return login.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:41 +* @route '/two-factor-challenge' +*/ +login.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: login.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::login +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:41 +* @route '/two-factor-challenge' +*/ +login.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: login.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::enable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:21 +* @route '/user/two-factor-authentication' +*/ +export const enable = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: enable.url(options), + method: 'post', +}) + +enable.definition = { + methods: ["post"], + url: '/user/two-factor-authentication', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::enable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:21 +* @route '/user/two-factor-authentication' +*/ +enable.url = (options?: RouteQueryOptions) => { + return enable.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::enable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:21 +* @route '/user/two-factor-authentication' +*/ +enable.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: enable.url(options), + method: 'post', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedTwoFactorAuthenticationController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedTwoFactorAuthenticationController.php:19 +* @route '/user/confirmed-two-factor-authentication' +*/ +export const confirm = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: confirm.url(options), + method: 'post', +}) + +confirm.definition = { + methods: ["post"], + url: '/user/confirmed-two-factor-authentication', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedTwoFactorAuthenticationController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedTwoFactorAuthenticationController.php:19 +* @route '/user/confirmed-two-factor-authentication' +*/ +confirm.url = (options?: RouteQueryOptions) => { + return confirm.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\ConfirmedTwoFactorAuthenticationController::confirm +* @see vendor/laravel/fortify/src/Http/Controllers/ConfirmedTwoFactorAuthenticationController.php:19 +* @route '/user/confirmed-two-factor-authentication' +*/ +confirm.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: confirm.url(options), + method: 'post', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::disable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:35 +* @route '/user/two-factor-authentication' +*/ +export const disable = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: disable.url(options), + method: 'delete', +}) + +disable.definition = { + methods: ["delete"], + url: '/user/two-factor-authentication', +} satisfies RouteDefinition<["delete"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::disable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:35 +* @route '/user/two-factor-authentication' +*/ +disable.url = (options?: RouteQueryOptions) => { + return disable.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticationController::disable +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticationController.php:35 +* @route '/user/two-factor-authentication' +*/ +disable.delete = (options?: RouteQueryOptions): RouteDefinition<'delete'> => ({ + url: disable.url(options), + method: 'delete', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorQrCodeController::qrCode +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorQrCodeController.php:16 +* @route '/user/two-factor-qr-code' +*/ +export const qrCode = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: qrCode.url(options), + method: 'get', +}) + +qrCode.definition = { + methods: ["get","head"], + url: '/user/two-factor-qr-code', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorQrCodeController::qrCode +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorQrCodeController.php:16 +* @route '/user/two-factor-qr-code' +*/ +qrCode.url = (options?: RouteQueryOptions) => { + return qrCode.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorQrCodeController::qrCode +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorQrCodeController.php:16 +* @route '/user/two-factor-qr-code' +*/ +qrCode.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: qrCode.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorQrCodeController::qrCode +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorQrCodeController.php:16 +* @route '/user/two-factor-qr-code' +*/ +qrCode.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: qrCode.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorSecretKeyController::secretKey +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorSecretKeyController.php:17 +* @route '/user/two-factor-secret-key' +*/ +export const secretKey = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: secretKey.url(options), + method: 'get', +}) + +secretKey.definition = { + methods: ["get","head"], + url: '/user/two-factor-secret-key', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorSecretKeyController::secretKey +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorSecretKeyController.php:17 +* @route '/user/two-factor-secret-key' +*/ +secretKey.url = (options?: RouteQueryOptions) => { + return secretKey.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorSecretKeyController::secretKey +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorSecretKeyController.php:17 +* @route '/user/two-factor-secret-key' +*/ +secretKey.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: secretKey.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorSecretKeyController::secretKey +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorSecretKeyController.php:17 +* @route '/user/two-factor-secret-key' +*/ +secretKey.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: secretKey.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::recoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:19 +* @route '/user/two-factor-recovery-codes' +*/ +export const recoveryCodes = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: recoveryCodes.url(options), + method: 'get', +}) + +recoveryCodes.definition = { + methods: ["get","head"], + url: '/user/two-factor-recovery-codes', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::recoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:19 +* @route '/user/two-factor-recovery-codes' +*/ +recoveryCodes.url = (options?: RouteQueryOptions) => { + return recoveryCodes.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::recoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:19 +* @route '/user/two-factor-recovery-codes' +*/ +recoveryCodes.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: recoveryCodes.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::recoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:19 +* @route '/user/two-factor-recovery-codes' +*/ +recoveryCodes.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: recoveryCodes.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::regenerateRecoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:38 +* @route '/user/two-factor-recovery-codes' +*/ +export const regenerateRecoveryCodes = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: regenerateRecoveryCodes.url(options), + method: 'post', +}) + +regenerateRecoveryCodes.definition = { + methods: ["post"], + url: '/user/two-factor-recovery-codes', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::regenerateRecoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:38 +* @route '/user/two-factor-recovery-codes' +*/ +regenerateRecoveryCodes.url = (options?: RouteQueryOptions) => { + return regenerateRecoveryCodes.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\RecoveryCodeController::regenerateRecoveryCodes +* @see vendor/laravel/fortify/src/Http/Controllers/RecoveryCodeController.php:38 +* @route '/user/two-factor-recovery-codes' +*/ +regenerateRecoveryCodes.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: regenerateRecoveryCodes.url(options), + method: 'post', +}) + +const twoFactor = { + login: Object.assign(login, loginDf2c2a), + enable: Object.assign(enable, enable), + confirm: Object.assign(confirm, confirm), + disable: Object.assign(disable, disable), + qrCode: Object.assign(qrCode, qrCode), + secretKey: Object.assign(secretKey, secretKey), + recoveryCodes: Object.assign(recoveryCodes, recoveryCodes), + regenerateRecoveryCodes: Object.assign(regenerateRecoveryCodes, regenerateRecoveryCodes), +} + +export default twoFactor \ No newline at end of file diff --git a/resources/js/routes/two-factor/login/index.ts b/resources/js/routes/two-factor/login/index.ts new file mode 100644 index 0000000..fb92a28 --- /dev/null +++ b/resources/js/routes/two-factor/login/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:56 +* @route '/two-factor-challenge' +*/ +export const store = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +store.definition = { + methods: ["post"], + url: '/two-factor-challenge', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:56 +* @route '/two-factor-challenge' +*/ +store.url = (options?: RouteQueryOptions) => { + return store.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\TwoFactorAuthenticatedSessionController::store +* @see vendor/laravel/fortify/src/Http/Controllers/TwoFactorAuthenticatedSessionController.php:56 +* @route '/two-factor-challenge' +*/ +store.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: store.url(options), + method: 'post', +}) + +const login = { + store: Object.assign(store, store), +} + +export default login \ No newline at end of file diff --git a/resources/js/routes/user-password/index.ts b/resources/js/routes/user-password/index.ts new file mode 100644 index 0000000..112c332 --- /dev/null +++ b/resources/js/routes/user-password/index.ts @@ -0,0 +1,40 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition } from './../../wayfinder' +/** +* @see \App\Http\Controllers\Settings\SecurityController::update +* @see Http/Controllers/Settings/SecurityController.php:50 +* @route '/settings/password' +*/ +export const update = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({ + url: update.url(options), + method: 'put', +}) + +update.definition = { + methods: ["put"], + url: '/settings/password', +} satisfies RouteDefinition<["put"]> + +/** +* @see \App\Http\Controllers\Settings\SecurityController::update +* @see Http/Controllers/Settings/SecurityController.php:50 +* @route '/settings/password' +*/ +update.url = (options?: RouteQueryOptions) => { + return update.definition.url + queryParams(options) +} + +/** +* @see \App\Http\Controllers\Settings\SecurityController::update +* @see Http/Controllers/Settings/SecurityController.php:50 +* @route '/settings/password' +*/ +update.put = (options?: RouteQueryOptions): RouteDefinition<'put'> => ({ + url: update.url(options), + method: 'put', +}) + +const userPassword = { + update: Object.assign(update, update), +} + +export default userPassword \ No newline at end of file diff --git a/resources/js/routes/verification/index.ts b/resources/js/routes/verification/index.ts new file mode 100644 index 0000000..fdec830 --- /dev/null +++ b/resources/js/routes/verification/index.ts @@ -0,0 +1,147 @@ +import { queryParams, type RouteQueryOptions, type RouteDefinition, applyUrlDefaults } from './../../wayfinder' +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationPromptController::notice +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationPromptController.php:18 +* @route '/email/verify' +*/ +export const notice = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: notice.url(options), + method: 'get', +}) + +notice.definition = { + methods: ["get","head"], + url: '/email/verify', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationPromptController::notice +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationPromptController.php:18 +* @route '/email/verify' +*/ +notice.url = (options?: RouteQueryOptions) => { + return notice.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationPromptController::notice +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationPromptController.php:18 +* @route '/email/verify' +*/ +notice.get = (options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: notice.url(options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationPromptController::notice +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationPromptController.php:18 +* @route '/email/verify' +*/ +notice.head = (options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: notice.url(options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\VerifyEmailController::verify +* @see vendor/laravel/fortify/src/Http/Controllers/VerifyEmailController.php:18 +* @route '/email/verify/{id}/{hash}' +*/ +export const verify = (args: { id: string | number, hash: string | number } | [id: string | number, hash: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: verify.url(args, options), + method: 'get', +}) + +verify.definition = { + methods: ["get","head"], + url: '/email/verify/{id}/{hash}', +} satisfies RouteDefinition<["get","head"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\VerifyEmailController::verify +* @see vendor/laravel/fortify/src/Http/Controllers/VerifyEmailController.php:18 +* @route '/email/verify/{id}/{hash}' +*/ +verify.url = (args: { id: string | number, hash: string | number } | [id: string | number, hash: string | number ], options?: RouteQueryOptions) => { + if (Array.isArray(args)) { + args = { + id: args[0], + hash: args[1], + } + } + + args = applyUrlDefaults(args) + + const parsedArgs = { + id: args.id, + hash: args.hash, + } + + return verify.definition.url + .replace('{id}', parsedArgs.id.toString()) + .replace('{hash}', parsedArgs.hash.toString()) + .replace(/\/+$/, '') + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\VerifyEmailController::verify +* @see vendor/laravel/fortify/src/Http/Controllers/VerifyEmailController.php:18 +* @route '/email/verify/{id}/{hash}' +*/ +verify.get = (args: { id: string | number, hash: string | number } | [id: string | number, hash: string | number ], options?: RouteQueryOptions): RouteDefinition<'get'> => ({ + url: verify.url(args, options), + method: 'get', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\VerifyEmailController::verify +* @see vendor/laravel/fortify/src/Http/Controllers/VerifyEmailController.php:18 +* @route '/email/verify/{id}/{hash}' +*/ +verify.head = (args: { id: string | number, hash: string | number } | [id: string | number, hash: string | number ], options?: RouteQueryOptions): RouteDefinition<'head'> => ({ + url: verify.url(args, options), + method: 'head', +}) + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationNotificationController::send +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationNotificationController.php:19 +* @route '/email/verification-notification' +*/ +export const send = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: send.url(options), + method: 'post', +}) + +send.definition = { + methods: ["post"], + url: '/email/verification-notification', +} satisfies RouteDefinition<["post"]> + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationNotificationController::send +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationNotificationController.php:19 +* @route '/email/verification-notification' +*/ +send.url = (options?: RouteQueryOptions) => { + return send.definition.url + queryParams(options) +} + +/** +* @see \Laravel\Fortify\Http\Controllers\EmailVerificationNotificationController::send +* @see vendor/laravel/fortify/src/Http/Controllers/EmailVerificationNotificationController.php:19 +* @route '/email/verification-notification' +*/ +send.post = (options?: RouteQueryOptions): RouteDefinition<'post'> => ({ + url: send.url(options), + method: 'post', +}) + +const verification = { + notice: Object.assign(notice, notice), + verify: Object.assign(verify, verify), + send: Object.assign(send, send), +} + +export default verification \ No newline at end of file diff --git a/resources/views/app.blade.php b/resources/views/app.blade.php index c311f4e..3d18875 100644 --- a/resources/views/app.blade.php +++ b/resources/views/app.blade.php @@ -42,6 +42,8 @@ {{ config('app.name', 'Laravel') }} + + @paddleJS diff --git a/resources/views/mcp/authorize.blade.php b/resources/views/mcp/authorize.blade.php new file mode 100644 index 0000000..7d14787 --- /dev/null +++ b/resources/views/mcp/authorize.blade.php @@ -0,0 +1,180 @@ + + ($appearance ?? 'system') == 'dark'])> + + + + + {{-- Inline script to detect system dark mode preference and apply it immediately --}} + + + + + Authorize Application - {{ config('app.name', 'MCP Server') }} + + + + + + + + + + + + @vite(['resources/css/app.css']) + + +
+
+ +
+ +
+
+ + + + +
+ +

+ Authorize {{ $client->name }} +

+ +

+ This application will be able to:
Use available MCP functionality. +

+
+ + +
+ +
+

Logged in as:

+

{{ $user->email }}

+
+ + + @if(count($scopes) > 0) +
+

Permissions:

+ +
    + @foreach($scopes as $scope) +
  • +
    +
    +
    + + {{ $scope->description }} + +
  • + @endforeach +
+
+ @endif +
+ + +
+ +
+ @csrf + @method('DELETE') + + + + +
+ + +
+ @csrf + + + + +
+
+
+
+
+ + + + diff --git a/resources/views/vendor/cashier/components/button.blade.php b/resources/views/vendor/cashier/components/button.blade.php new file mode 100644 index 0000000..e6f224c --- /dev/null +++ b/resources/views/vendor/cashier/components/button.blade.php @@ -0,0 +1,22 @@ +getTransaction(); +$items = $checkout->getItems(); +$customer = $checkout->getCustomer(); +$custom = $checkout->getCustomData(); +?> + +getReturnUrl()) data-success-url='{{ $returnUrl }}' @endif + {{ $attributes->merge(['class' => 'paddle_button']) }} +> + {{ $slot }} + diff --git a/resources/views/vendor/cashier/components/checkout.blade.php b/resources/views/vendor/cashier/components/checkout.blade.php new file mode 100644 index 0000000..8d43f40 --- /dev/null +++ b/resources/views/vendor/cashier/components/checkout.blade.php @@ -0,0 +1,4 @@ +
merge(['class' => $id]) }}>
+ diff --git a/resources/views/vendor/cashier/js.blade.php b/resources/views/vendor/cashier/js.blade.php new file mode 100644 index 0000000..2c8b21e --- /dev/null +++ b/resources/views/vendor/cashier/js.blade.php @@ -0,0 +1,30 @@ + (int) config('cashier.retain_key'), +]); + +if (config('cashier.client_side_token')) { + $seller['token'] = config('cashier.client_side_token'); +} elseif (config('cashier.seller_id')) { + $seller['seller'] = (int) config('cashier.seller_id'); +} + +if (isset($seller['pwAuth']) && Auth::check() && $customer = Auth::user()->customer) { + $seller['pwCustomer'] = ['id' => $customer->paddle_id]; +} + +$nonce = $nonce ?? ''; +?> + + + +@if (config('cashier.sandbox')) + +@endif + + diff --git a/resources/views/vendor/mcp/components/app.blade.php b/resources/views/vendor/mcp/components/app.blade.php new file mode 100644 index 0000000..48a0874 --- /dev/null +++ b/resources/views/vendor/mcp/components/app.blade.php @@ -0,0 +1,21 @@ +@props(['title' => null]) +@php + $mcpSdk = app('mcp.sdk'); + $libraryScripts = app()->bound('mcp.library_scripts') ? app('mcp.library_scripts') : ''; +@endphp + + + + + + @if($title) + {{ $title }} + @endif + + {!! $libraryScripts !!} + {{ $head ?? '' }} + + + {{ $slot }} + + diff --git a/routes/ai.php b/routes/ai.php new file mode 100644 index 0000000..e5cd434 --- /dev/null +++ b/routes/ai.php @@ -0,0 +1,5 @@ +name('socialite.redirect'); +Route::get('/auth/{provider}/callback', [SocialiteController::class, 'callback'])->name('socialite.callback'); + Route::post('/r', [RegistryController::class, 'store']); Route::put('/r/{name}', [RegistryController::class, 'update']); Route::delete('/r/{name}', [RegistryController::class, 'destroy']); diff --git a/stubs/mcp-app-resource.stub b/stubs/mcp-app-resource.stub new file mode 100644 index 0000000..c845ab6 --- /dev/null +++ b/stubs/mcp-app-resource.stub @@ -0,0 +1,24 @@ + $this->title(), + ]); + } +} diff --git a/stubs/mcp-app-resource.view.stub b/stubs/mcp-app-resource.view.stub new file mode 100644 index 0000000..2117c61 --- /dev/null +++ b/stubs/mcp-app-resource.view.stub @@ -0,0 +1,17 @@ + + + + + +
+ +

+
+
diff --git a/stubs/mcp-prompt.stub b/stubs/mcp-prompt.stub new file mode 100644 index 0000000..f9bb38c --- /dev/null +++ b/stubs/mcp-prompt.stub @@ -0,0 +1,35 @@ + + */ + public function arguments(): array + { + return [ + // + ]; + } +} diff --git a/stubs/mcp-resource.stub b/stubs/mcp-resource.stub new file mode 100644 index 0000000..62cd682 --- /dev/null +++ b/stubs/mcp-resource.stub @@ -0,0 +1,22 @@ + + */ + public function schema(JsonSchema $schema): array + { + return [ + // + ]; + } +} diff --git a/tests/Feature/Auth/SocialiteTest.php b/tests/Feature/Auth/SocialiteTest.php new file mode 100644 index 0000000..369a9d9 --- /dev/null +++ b/tests/Feature/Auth/SocialiteTest.php @@ -0,0 +1,74 @@ +get(route('socialite.redirect', 'github')); + + $response->assertRedirect(); + $this->assertStringContainsString('github.com', $response->getTargetUrl()); + } + + public function test_socialite_can_authenticate_and_create_user() + { + $socialiteUser = $this->createMock(SocialiteUser::class); + $socialiteUser->method('getId')->willReturn('12345'); + $socialiteUser->method('getEmail')->willReturn('test@example.com'); + $socialiteUser->method('getName')->willReturn('Test User'); + $socialiteUser->method('getNickname')->willReturn('testuser'); + $socialiteUser->method('getAvatar')->willReturn('https://example.com/avatar.jpg'); + + Socialite::shouldReceive('driver->user')->andReturn($socialiteUser); + + $response = $this->get(route('socialite.callback', 'github')); + + $response->assertRedirect(route('dashboard')); + $this->assertAuthenticated(); + + $user = User::where('email', 'test@example.com')->first(); + $this->assertNotNull($user); + $this->assertEquals('Test User', $user->name); + + $social = Social::where('user_id', $user->id)->first(); + $this->assertNotNull($social); + $this->assertEquals('github', $social->provider); + $this->assertEquals('12345', $social->provider_id); + } + + public function test_socialite_can_link_existing_user_by_email() + { + $user = User::factory()->create([ + 'email' => 'test@example.com', + ]); + + $socialiteUser = $this->createMock(SocialiteUser::class); + $socialiteUser->method('getId')->willReturn('12345'); + $socialiteUser->method('getEmail')->willReturn('test@example.com'); + $socialiteUser->method('getName')->willReturn('Test User'); + $socialiteUser->method('getNickname')->willReturn('testuser'); + $socialiteUser->method('getAvatar')->willReturn('https://example.com/avatar.jpg'); + + Socialite::shouldReceive('driver->user')->andReturn($socialiteUser); + + $response = $this->get(route('socialite.callback', 'github')); + + $response->assertRedirect(route('dashboard')); + $this->assertAuthenticatedAs($user); + + $social = Social::where('user_id', $user->id)->first(); + $this->assertNotNull($social); + $this->assertEquals('github', $social->provider); + } +}