{"id":15297165,"url":"https://github.com/affinda/affinda-typescript","last_synced_at":"2025-10-15T00:45:50.281Z","repository":{"id":42455544,"uuid":"394158914","full_name":"affinda/affinda-typescript","owner":"affinda","description":"TypeScript client library for the Affinda API","archived":false,"fork":false,"pushed_at":"2024-10-01T07:54:39.000Z","size":15592,"stargazers_count":9,"open_issues_count":3,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T12:52:31.854Z","etag":null,"topics":["affinda","api","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://affinda.com","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/affinda.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}},"created_at":"2021-08-09T05:19:46.000Z","updated_at":"2025-03-05T15:28:18.000Z","dependencies_parsed_at":"2022-08-12T10:00:46.805Z","dependency_job_id":"e2666891-a077-4fd7-9c7a-cc95c41b12b7","html_url":"https://github.com/affinda/affinda-typescript","commit_stats":{"total_commits":178,"total_committers":11,"mean_commits":"16.181818181818183","dds":0.5561797752808989,"last_synced_commit":"97f5a3be07afd5cad7e3f96b4e4aedddd86df90c"},"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affinda%2Faffinda-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affinda%2Faffinda-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affinda%2Faffinda-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/affinda%2Faffinda-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/affinda","download_url":"https://codeload.github.com/affinda/affinda-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790624,"owners_count":21162058,"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":["affinda","api","javascript","typescript"],"created_at":"2024-09-30T19:15:27.812Z","updated_at":"2025-10-15T00:45:50.259Z","avatar_url":"https://github.com/affinda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript Client Library for Affinda Resume Parser API\n\n![affinda logo](https://api.affinda.com/static/documentation/affinda_logo_light.png)\n[![license](https://img.shields.io/github/license/affinda/affinda-typescript)](https://choosealicense.com/licenses/mit/)\n\n[![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/affinda/affinda-typescript)\n\n- [Installation](#installation)\n- [Quickstart](#quickstart)\n- [API reference](#api-reference)\n- [Samples](#samples)\n- [Troubleshooting](#troubleshooting)\n\nGenerated using [autorest](https://github.com/Azure/autorest)\nand [autorest.typescript](https://github.com/Azure/autorest.typescript).\n\n[Package (NPM)](https://www.npmjs.com/package/@affinda/affinda)\n\n## Installation\n\n```bash\nnpm install @affinda/affinda\n```\n\n## API Version Compatibility\n\nThe Affinda API is currently on `v3`, with breaking changes meant the release of new versions of the client library.\nPlease see below for which versions are compatible with which API version.\n\n| Affinda API version | `affinda-typescript` versions |\n| ------------------- | ----------------------------- |\n| v2                  | 0.1.0 - 5.x.x                 |\n| v3                  | \\\u003e= 6.x.x                     |\n\n## Quickstart\n\nBefore using the API, you need to create an account, setup a workspace, and obtain an API key. Follow the steps in our [documentation](https://docs.affinda.com/docs/getting-started-with-affinda).\n\n### Currently supported environments\n\n- [LTS versions of Node.js](https://nodejs.org/about/releases/)\n- Latest versions of Safari, Chrome, Edge, and Firefox.\n\n### Install the `affinda` package\n\nInstall the Service client library for JavaScript with `npm`:\n\n```bash\nnpm install @affinda/affinda\n```\n\nor build from source:\n\n```shell\ngit clone git@github.com:affinda/affinda-typescript.git\nnpm install\nnpm build\n```\n\nExample parsing a resume:\n\n```javascript\nimport { AffindaAPI, AffindaCredential } from \"@affinda/affinda\";\nimport * as fs from \"fs\";\n\nconst credential = new AffindaCredential(\"YOUR_API_KEY\");\nconst client = new AffindaAPI(credential);\n\nconst file = fs.createReadStream(\"resume.pdf\");\n\nclient\n  .createDocument({\n    file,\n    workspace: \"YOUR_WORKSPACE_IDENTIFIER\",\n  })\n  .then(doc =\u003e {\n    console.log(\"Parsed data:\", doc.data);\n  })\n  .catch(err =\u003e console.error(\"Error:\", err));\n```\n\n## Typescript interfaces\n\nYou can generate typescript interfaces to help with consuming the API response in a type-safe way.\n\nUse the `affinda-generate-interfaces` command to auto-generate typescript interfaces from your document type configuration.\n\nFor example, this will generate typescript interfaces for your \"Resume Parser\" document type:\n\n```bash\n# Assuming your Resume Parser document type ID is \"rLERIsHk\"\nnpm exec affinda-generate-interfaces -- --document-type-id=rLERIsHk\n```\n\nYou will be prompted for your API key, unless you already have the `AFFINDA_API_KEY` environment variable set.\n\nThe generated typescript interfaces will be in `./affinda-interfaces` by default.\n\nFor all the options you can use, run:\n\n```bash\nnpm exec affinda-generate-interfaces -- --help\n```\n\n## API reference\n\nA full API reference generated with [typedoc](https://github.com/TypeStrong/typedoc)\nis [available here](./docs/globals.md)\n\n## Troubleshooting\n\n### Logging\n\nEnabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and\nresponses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by\ncalling `setLogLevel` in the `@azure/logger`:\n\n```javascript\nimport { setLogLevel } from \"@azure/logger\";\n\nsetLogLevel(\"info\");\n```\n\nFor more detailed instructions on how to enable logs, you can look at\nthe [@azure/logger](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger) package docs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faffinda%2Faffinda-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faffinda%2Faffinda-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faffinda%2Faffinda-typescript/lists"}