{"id":15916893,"url":"https://github.com/vagebnd/runtype","last_synced_at":"2025-03-24T07:31:43.557Z","repository":{"id":65851297,"uuid":"601342991","full_name":"vagebnd/runtype","owner":"vagebnd","description":"Generate TypeScript interfaces from Laravel Models \u0026 Resources","archived":false,"fork":false,"pushed_at":"2025-02-26T22:46:08.000Z","size":124,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T00:51:36.884Z","etag":null,"topics":["generator","laravel","php8","typescript"],"latest_commit_sha":null,"homepage":"https://runtype.vagebond.nl","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vagebnd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-13T21:37:03.000Z","updated_at":"2025-02-26T22:41:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5135f791-8052-4671-9127-26d29f08613b","html_url":"https://github.com/vagebnd/runtype","commit_stats":{"total_commits":49,"total_committers":4,"mean_commits":12.25,"dds":"0.24489795918367352","last_synced_commit":"9f3223525b8301f65f5c03c0e78d1a6e521546b8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagebnd%2Fruntype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagebnd%2Fruntype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagebnd%2Fruntype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vagebnd%2Fruntype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vagebnd","download_url":"https://codeload.github.com/vagebnd/runtype/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245227434,"owners_count":20580882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generator","laravel","php8","typescript"],"created_at":"2024-10-06T18:06:22.456Z","updated_at":"2025-03-24T07:31:43.268Z","avatar_url":"https://github.com/vagebnd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Typescript Generator: Runtype\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/vagebond/runtype.svg?style=flat-square)](https://packagist.org/packages/vagebond/runtype)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/vagebnd/runtype/run-tests.yml?branch=main\u0026label=tests)](https://github.com/vagebnd/runtype/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/vagebnd/runtype/fix-php-code-style-issues.yml?branch=main)](https://github.com/vagebnd/runtype/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/vagebond/runtype.svg?style=flat-square)](https://packagist.org/packages/vagebond/runtype)\n\nGenerate TypeScript interfaces from Laravel Models \u0026 Resources\n\nThis resource:\n```PHP\nuse Illuminate\\Http\\Resources\\Json\\JsonResource;\n\n/** @mixin \\App\\Models\\Product */\nclass ProductResource extends JsonResource\n{\n    public $showHiddenData = false;\n\n    public function toArray($request)\n    {\n        return [\n            'id' =\u003e $this-\u003eid,\n            'name' =\u003e $this-\u003ename,\n            'hidden' =\u003e $this-\u003ewhen($this-\u003eshowHiddenData, false),\n        ];\n    }\n}\n```\n\nwill be converted into this interface:\n\n```typescript\nexport interface ProductResourceType {\n    id: number;\n    name: string;\n    hidden?: boolean;\n}\n```\n\nYou can read the full documentation [here](https://runtype.vagebond.nl/).\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require vagebond/runtype --dev\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"runtype-config\"\n```\n\n## Usage\n\n```bash\nphp artisan runtype:generate\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n-   [Gianluca Riggio](https://github.com/mxaGianluca)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvagebnd%2Fruntype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvagebnd%2Fruntype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvagebnd%2Fruntype/lists"}