{"id":25871717,"url":"https://github.com/n1rjal/postman-to-typescript","last_synced_at":"2025-10-07T07:59:55.837Z","repository":{"id":182989354,"uuid":"669428553","full_name":"n1rjal/postman-to-typescript","owner":"n1rjal","description":"A simple nodejs script that looks into the postman collection json and produces typescript interfaces ","archived":false,"fork":false,"pushed_at":"2024-04-17T11:10:10.000Z","size":8102,"stargazers_count":131,"open_issues_count":2,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-02T01:39:04.554Z","etag":null,"topics":["hacktoberfest","hacktoberfest-accepted"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/n1rjal.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-07-22T08:44:26.000Z","updated_at":"2025-08-31T02:58:33.000Z","dependencies_parsed_at":"2024-01-05T17:43:13.281Z","dependency_job_id":null,"html_url":"https://github.com/n1rjal/postman-to-typescript","commit_stats":null,"previous_names":["n1rjal/postman-to-typescript"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/n1rjal/postman-to-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n1rjal%2Fpostman-to-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n1rjal%2Fpostman-to-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n1rjal%2Fpostman-to-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n1rjal%2Fpostman-to-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n1rjal","download_url":"https://codeload.github.com/n1rjal/postman-to-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n1rjal%2Fpostman-to-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343042,"owners_count":25971397,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest","hacktoberfest-accepted"],"created_at":"2025-03-02T07:23:27.638Z","updated_at":"2025-10-07T07:59:55.817Z","avatar_url":"https://github.com/n1rjal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POSTMAN TO TYPESCRIPT\n\nA simple tool built on top of nodejs that scans for all the content of a postman json document and creates interface according to\nthe examples response output, url request query params and url request query body\n\n## Too bored to read ?\nI got you covered 😉\n\nhttps://github.com/n1rjal/postman-to-typescript/assets/60036262/a1443a38-b0f3-4164-9282-a27756c108f2\n\n\n\n## How to use\n\nFirst of all, you'll either need to\n - export the postman collection [Learn more about it here](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#exporting-collections), or,\n - use remote postman collection, for which you need to have a postman API key and a remote postman collection.\n   - To generate your own API key, check [docs](https://learning.postman.com/docs/developer/postman-api/authentication/#generate-a-postman-api-key).\n   - To get a remote postman collection, you can either make your workspace [public](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/public-workspaces/) and access your collection remotely, or [explore](https://www.postman.com/explore) public API network.\n     A collection url is in the format of `https://www.postman.com/\u003cteam\u003e/workspace/\u003cworkspace\u003e/collection/\u003ccollection-id\u003e`.\n\nThen,\n1. Download node version \u003e=16\n2. Git clone the repo:\n\n```bash\ngit clone https://github.com/n1rjal/postman-to-typescript.git\n```\n\n3. Change the config file `eator.json` accordingly or you can use the sample type here. The config and index.js file must be in same directory\n\n```bash\nnode index.js\n```\n\n## Use npx\n\n```bash\nnpx @n1rjal/pm_ts -i cit-input.json -o types # using input file\nnpx @n1rjal/pm_ts -X YOUR_API_KEY -U REMOTE_POSTMAN_COLLECTION_URL -o types # using remote postman collection\n```\n\n## Command-line Arguments\n\nThe script file is most stable for -i and -o flags. Other files may bring unwanted results. And postman form data can perform errors.\n`pm_ts` supports the following command-line arguments:\n\n| Argument            | Description                                                                                                         |\n| ------------------- | ------------------------------------------------------------------------------------------------------------------- |\n| -i, --input         | The export of postman data as json v2.0                                                                             |\n| -X, --api-key       | This specifies your postman API key                                                                                 |\n| -U, --collection-url| This specifies the remote postman collection url                                                                    |\n| -o, --output        | The output directory for all types                                                                                  |\n| -ia, --include-any  | This specifies if any must be included in typescript types or not. Default value is false                           |\n| -sc, --status-codes | This specifies if we can add type support for response of the types provided. Default value is 200[comma separated] |\n| -ft, --force-text   | This specifies if we need to parse text content in postman request or not. Default value is false                   |\n| -te, --throw-error  | This specifies if the program should throw an error                                                                 |\n| -p, --prefix        | This specifies if the output files need prefix                                                                      |\n\nYou can use these arguments when running the script or program to provide additional options or information.\n\n## After successful execution\n\nOn local run, before your folder structure, should look like this\n\n```bash\n.\n├── eater.json\n├── index.js\n├── readme.md\n├── sample.json\n└── types\n\n\n```\n\n## Interface\n\nEvery interface here will have the following format\n\n```typescript\n/*\nGet all requests from one time to another\nGET: {{host}}/report/time-stamps?startDate=05-22-2021\u0026endDate=07-30-2021\n*/\nexport interface GetAllRequestsFromOneTimeToAnother {\n  startDate: string;\n  endDate: string;\n}\n```\n\n## Option Flag\n\nThe option flags, we have for the command are listed below\n\nThis will prompt you for some basic information about your project, such as the project name and the package manager you want to use (`npm` or `yarn`). After providing the required information, `pm_ts` will set up a new TypeScript project for you with the selected package manager.\n\n## Contributing\n\nPlease see [CONTRIBUTING.md](https://github.com/bigyanse/postman-to-typescript/blob/main/CONTRIBUTING.md) for contributing guide.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\nUse this table as a quick reference for understanding the purpose of each field in the configuration file.\n\n## Warning\n\nNote that this project is still in beta stage and might return files with undefined in it every here and there. So feel free to create issues and contribute the project as necessary\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn1rjal%2Fpostman-to-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn1rjal%2Fpostman-to-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn1rjal%2Fpostman-to-typescript/lists"}