{"id":15993750,"url":"https://github.com/ysarock/fetch-firestore-types","last_synced_at":"2025-03-10T21:30:54.392Z","repository":{"id":150368352,"uuid":"623154706","full_name":"YsarocK/fetch-firestore-types","owner":"YsarocK","description":"Generate Typescript file from Firestore Databases from CLI","archived":false,"fork":false,"pushed_at":"2024-03-03T17:28:18.000Z","size":1234,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T12:59:16.634Z","etag":null,"topics":["cli","firebase","firestore","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/YsarocK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-04-03T20:04:47.000Z","updated_at":"2024-09-05T07:41:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"c7ec49fe-2799-44cb-996d-4371b0c2f18e","html_url":"https://github.com/YsarocK/fetch-firestore-types","commit_stats":null,"previous_names":["ysarock/fetch-firebase-types"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YsarocK%2Ffetch-firestore-types","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YsarocK%2Ffetch-firestore-types/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YsarocK%2Ffetch-firestore-types/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YsarocK%2Ffetch-firestore-types/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YsarocK","download_url":"https://codeload.github.com/YsarocK/fetch-firestore-types/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242930077,"owners_count":20208395,"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":["cli","firebase","firestore","typescript"],"created_at":"2024-10-08T07:02:19.186Z","updated_at":"2025-03-10T21:30:54.095Z","avatar_url":"https://github.com/YsarocK.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![fetch-firestore-types banner](./readme-banner.jpg)\n\n# Generate Typesript types from Appwrite Databases\n\n![npm](https://img.shields.io/npm/dt/fetch-appwrite-types)\n![npm](https://img.shields.io/npm/v/fetch-appwrite-types)\n\n## Quick usage\nMake sure ton add the following values to your ```.env``` :\n```FIREBASE_PROJECT_ID```\n```FIREBASE_PRIVATE_KEY```\n```FIREBASE_CLIENT_EMAIL```\n\nThen run the following command :\n\n```bash\nnpx fetch-firestore-types\n```\n\n## Installation\n```bash\n# yarn\nyarn add fetch-firestore-types\n\n# npm\nnpm install fetch-firestore-types\n```\n\nMake sure ton add the following values to your ```.env``` :\n```FIREBASE_PROJECT_ID```\n```FIREBASE_PRIVATE_KEY```\n```FIREBASE_CLIENT_EMAIL```\n\n```javascript\nimport { FetchNewTypes } from \"fetch-firestore-types/dist/main\";\n\nawait FetchNewTypes();\n```\n\n## Parameters\n| Name     | Default value  | Description                                        |\n|----------|----------------|----------------------------------------------------|\n| outDir   | ```\"/types\"``` | The folder where the type file will be generated   |\n| queryResultsLength | ```25```        | Number of items per collection to creates types on |\n\n### Usage\n#### CLI\nParams can be passed as arguments in any order, except for the outDir which might be followed by the path.\n```bash\nnpx fetch-appwrite-types includeDBName outDir /types queryResultsLength 50\n```\n\n#### Library\n```javascript\nawait FetchNewTypes({\n    outDir: \"/types\",\n    queryResultsLength: 50,\n})\n```\n\n## Handled types\n| Appwrite type    | Generated type (simple) |\n|------------------|-------------------------|\n| String           | ```string```            |\n| Integer / Double | ```integer```           |\n| Boolean          | ```boolean```           |\n| Null             | ```null```              |\n| Array            | ```Array\u003cany\u003e```        |\n| Object           | ```Object```            |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysarock%2Ffetch-firestore-types","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysarock%2Ffetch-firestore-types","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysarock%2Ffetch-firestore-types/lists"}