{"id":19383893,"url":"https://github.com/docspring/docspring-typescript","last_synced_at":"2026-02-27T10:12:20.863Z","repository":{"id":191566210,"uuid":"684879221","full_name":"DocSpring/docspring-typescript","owner":"DocSpring","description":"TypeScript API client for DocSpring","archived":false,"fork":false,"pushed_at":"2025-09-24T00:59:59.000Z","size":5228,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T13:48:00.028Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/DocSpring.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2023-08-30T03:24:06.000Z","updated_at":"2025-09-24T01:00:03.000Z","dependencies_parsed_at":"2024-11-10T09:28:25.909Z","dependency_job_id":"5fe749e5-0869-4ed2-aa01-616ed1f7c4e9","html_url":"https://github.com/DocSpring/docspring-typescript","commit_stats":null,"previous_names":["docspring/docspring-typescript"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/DocSpring/docspring-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fdocspring-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fdocspring-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fdocspring-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fdocspring-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DocSpring","download_url":"https://codeload.github.com/DocSpring/docspring-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DocSpring%2Fdocspring-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29890775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-10T09:28:18.254Z","updated_at":"2026-02-27T10:12:20.856Z","avatar_url":"https://github.com/DocSpring.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## docspring-ts@3.0.0\n\nThis generator creates TypeScript/JavaScript client that utilizes fetch-api.\n\n### Building\n\nTo build and compile the typescript sources to javascript use:\n```\nnpm install\nnpm run build\n```\n\n### Publishing\n\nFirst build the package then run ```npm publish```\n\n### Consuming\n\nNavigate to the folder of your consuming project and run one of the following commands.\n\n_published:_\n\n```\nnpm install docspring-ts@3.0.0 --save\n```\n\n_unPublished (not recommended):_\n\n```\nnpm install PATH_TO_GENERATED_PACKAGE --save\n```\n\n### Usage\n\nBelow code snippet shows exemplary usage of the configuration and the API based \non the typical `PetStore` example used for OpenAPI. \n\n```\nimport * as your_api from 'your_api_package'\n\n// Covers all auth methods included in your OpenAPI yaml definition\nconst authConfig: your_api.AuthMethodsConfiguration = {\n    \"api_key\": \"YOUR_API_KEY\"\n}\n\n// Implements a simple middleware to modify requests before (`pre`) they are sent\n// and after (`post`) they have been received \nclass Test implements your_api.Middleware {\n    pre(context: your_api.RequestContext): Promise\u003cyour_api.RequestContext\u003e {\n        // Modify context here and return\n        return Promise.resolve(context);\n    }\n\n    post(context: your_api.ResponseContext): Promise\u003cyour_api.ResponseContext\u003e {\n        return Promise.resolve(context);\n    }\n\n}\n\n// Create configuration parameter object\nconst configurationParameters = {\n    httpApi: new your_api.JQueryHttpLibrary(), // Can also be ignored - default is usually fine\n    baseServer: your_api.servers[0], // First server is default\n    authMethods: authConfig, // No auth is default\n    promiseMiddleware: [new Test()],\n}\n\n// Convert to actual configuration\nconst config = your_api.createConfiguration(configurationParameters);\n\n// Use configuration with your_api\nconst api = new your_api.PetApi(config);\nyour_api.Pet p = new your_api.Pet();\np.name = \"My new pet\";\np.photoUrls = [];\np.tags = [];\np.status = \"available\";\nPromise\u003cyour_api.Pet\u003e createdPet = api.addPet(p);\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocspring%2Fdocspring-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocspring%2Fdocspring-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocspring%2Fdocspring-typescript/lists"}