{"id":46332632,"url":"https://github.com/gleanwork/api-client-typescript","last_synced_at":"2026-04-06T21:00:54.639Z","repository":{"id":291185207,"uuid":"972260372","full_name":"gleanwork/api-client-typescript","owner":"gleanwork","description":"TypeScript API client for the Glean API","archived":false,"fork":false,"pushed_at":"2026-04-03T02:08:30.000Z","size":11671,"stargazers_count":9,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-04-03T11:45:48.854Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gleanwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-24T19:36:31.000Z","updated_at":"2026-03-27T16:52:26.000Z","dependencies_parsed_at":"2025-05-02T23:51:35.651Z","dependency_job_id":"a9495a60-62d7-46cf-b3de-f0dc160569e3","html_url":"https://github.com/gleanwork/api-client-typescript","commit_stats":null,"previous_names":["gleanwork/api-client-typescript"],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/gleanwork/api-client-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fapi-client-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fapi-client-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fapi-client-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fapi-client-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gleanwork","download_url":"https://codeload.github.com/gleanwork/api-client-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gleanwork%2Fapi-client-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31489427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"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":"2026-03-04T18:03:49.661Z","updated_at":"2026-04-06T21:00:54.587Z","avatar_url":"https://github.com/gleanwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Glean TypeScript API Client\n\nThe Glean TypeScript SDK provides convenient access to the Glean REST API in both browser and Node.js environments. It offers full TypeScript types, modern async/await support, and uses the [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) API under the hood.\n\n## Unified SDK Architecture\n\nThis SDK combines both the Client and Indexing API namespaces into a single unified package:\n\n- **Client API**: Used for search, retrieval, and end-user interactions with Glean content\n- **Indexing API**: Used for indexing content, permissions, and other administrative operations\n\nEach namespace has its own authentication requirements and access patterns. While they serve different purposes, having them in a single SDK provides a consistent developer experience across all Glean API interactions.\n\n```typescript\n// Example of accessing Client namespace\nconst glean = new Glean({\n  serverURL: \"https://mycompany-be.glean.com\",\n  apiToken: 'client-token'\n});\n\nawait glean.client.search.query({ \n  query: 'search term' \n});\n\n// Example of accessing Indexing namespace \nconst glean = new Glean({\n  serverURL: \"https://mycompany-be.glean.com\",\n  apiToken: 'indexing-token'\n});\n\nawait glean.indexing.documents.index({ \n  /* document data */ \n});\n```\n\nRemember that each namespace requires its own authentication token type as described in the [Authentication Methods](#authentication-methods) section.\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nGlean API: # Introduction\nIn addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.\n\n# Usage guidelines\nThis API is evolving fast. Glean will provide advance notice of any planned backwards incompatible changes along\nwith a 6-month sunset period for anything that requires developers to adopt the new versions.\n\n# API Clients\nOfficial API clients for the Glean Indexing API are available in multiple languages:\n\n- [Python](https://github.com/gleanwork/api-client-python)\n- [TypeScript](https://github.com/gleanwork/api-client-typescript)\n- [Go](https://github.com/gleanwork/api-client-go)\n- [Java](https://github.com/gleanwork/api-client-java)\n\nThese API clients provide type-safe, idiomatic interfaces for working with Glean IndexingAPIs in your language of choice.\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\u003c!-- $toc-max-depth=2 --\u003e\n* [Glean TypeScript API Client](#glean-typescript-api-client)\n  * [Unified SDK Architecture](#unified-sdk-architecture)\n* [Usage guidelines](#usage-guidelines)\n* [API Clients](#api-clients)\n  * [SDK Installation](#sdk-installation)\n  * [Requirements](#requirements)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [Authentication](#authentication)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Standalone functions](#standalone-functions)\n  * [React hooks with TanStack Query](#react-hooks-with-tanstack-query)\n  * [File uploads](#file-uploads)\n  * [Retries](#retries)\n  * [Error Handling](#error-handling)\n  * [Server Selection](#server-selection)\n  * [Custom HTTP Client](#custom-http-client)\n  * [Debugging](#debugging)\n  * [Experimental Features and Deprecation Testing](#experimental-features-and-deprecation-testing)\n* [Development](#development)\n  * [Maturity](#maturity)\n  * [Contributions](#contributions)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\nThe SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.\n\n### NPM\n\n```bash\nnpm add @gleanwork/api-client\n# Install optional peer dependencies if you plan to use React hooks\nnpm add @tanstack/react-query react react-dom\n```\n\n### PNPM\n\n```bash\npnpm add @gleanwork/api-client\n# Install optional peer dependencies if you plan to use React hooks\npnpm add @tanstack/react-query react react-dom\n```\n\n### Bun\n\n```bash\nbun add @gleanwork/api-client\n# Install optional peer dependencies if you plan to use React hooks\nbun add @tanstack/react-query react react-dom\n```\n\n### Yarn\n\n```bash\nyarn add @gleanwork/api-client\n# Install optional peer dependencies if you plan to use React hooks\nyarn add @tanstack/react-query react react-dom\n```\n\n\u003e [!NOTE]\n\u003e This package is published with CommonJS and ES Modules (ESM) support.\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start Requirements [requirements] --\u003e\n## Requirements\n\nFor supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).\n\u003c!-- End Requirements [requirements] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example 1\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await glean.client.chat.create({\n    messages: [\n      {\n        fragments: [\n          {\n            text: \"What are the company holidays this year?\",\n          },\n        ],\n      },\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();\n\n```\n\n### Example 2\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await glean.client.chat.createStream({\n    messages: [\n      {\n        fragments: [\n          {\n            text: \"What are the company holidays this year?\",\n          },\n        ],\n      },\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security scheme globally:\n\n| Name       | Type | Scheme      | Environment Variable |\n| ---------- | ---- | ----------- | -------------------- |\n| `apiToken` | http | HTTP Bearer | `GLEAN_API_TOKEN`    |\n\nTo authenticate with the API the `apiToken` parameter must be set when initializing the SDK client instance. For example:\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  await glean.client.activity.report({\n    events: [\n      {\n        action: \"HISTORICAL_VIEW\",\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n      {\n        action: \"SEARCH\",\n        params: {\n          query: \"query\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/search?q=query\",\n      },\n      {\n        action: \"VIEW\",\n        params: {\n          duration: 20,\n          referrer: \"https://example.com/document\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n    ],\n  });\n}\n\nrun();\n\n```\n\u003c!-- End Authentication [security] --\u003e\n\n### Authentication Methods\n\nGlean supports different authentication methods depending on which API namespace you're using:\n\n#### Client Namespace\n\nThe Client namespace supports two authentication methods:\n\n1. **Manually Provisioned API Tokens**\n   - Can be created by an Admin or a user with the API Token Creator role\n   - Used for server-to-server integrations\n\n2. **OAuth**\n   - Requires OAuth setup to be completed by an Admin\n   - Used for user-based authentication flows\n\n#### Indexing Namespace\n\nThe Indexing namespace supports only one authentication method:\n\n1. **Manually Provisioned API Tokens**\n   - Can be created by an Admin or a user with the API Token Creator role\n   - Used for secure document indexing operations\n\n\u003e [!IMPORTANT]\n\u003e Client tokens **will not work** for Indexing operations, and Indexing tokens **will not work** for Client operations. You must use the appropriate token type for the namespace you're accessing.\n\nFor more information on obtaining the appropriate token type, please contact your Glean administrator.\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n### [Authentication](docs/sdks/authentication/README.md)\n\n* [checkdatasourceauth](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization\n\n### [Client.Activity](docs/sdks/activity/README.md)\n\n* [report](docs/sdks/activity/README.md#report) - Report document activity\n* [feedback](docs/sdks/activity/README.md#feedback) - Report client activity\n\n### [Client.Agents](docs/sdks/agents/README.md)\n\n* [retrieve](docs/sdks/agents/README.md#retrieve) - Retrieve an agent\n* [retrieveSchemas](docs/sdks/agents/README.md#retrieveschemas) - List an agent's schemas\n* [list](docs/sdks/agents/README.md#list) - Search agents\n* [runStream](docs/sdks/agents/README.md#runstream) - Create an agent run and stream the response\n* [run](docs/sdks/agents/README.md#run) - Create an agent run and wait for the response\n\n### [Client.Announcements](docs/sdks/announcements/README.md)\n\n* [create](docs/sdks/announcements/README.md#create) - Create Announcement\n* [delete](docs/sdks/announcements/README.md#delete) - Delete Announcement\n* [update](docs/sdks/announcements/README.md#update) - Update Announcement\n\n### [Client.Answers](docs/sdks/answers/README.md)\n\n* [create](docs/sdks/answers/README.md#create) - Create Answer\n* [delete](docs/sdks/answers/README.md#delete) - Delete Answer\n* [update](docs/sdks/answers/README.md#update) - Update Answer\n* [retrieve](docs/sdks/answers/README.md#retrieve) - Read Answer\n* [~~list~~](docs/sdks/answers/README.md#list) - List Answers :warning: **Deprecated**\n\n### [Client.Authentication](docs/sdks/clientauthentication/README.md)\n\n* [createToken](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token\n\n### [Client.Chat](docs/sdks/chat/README.md)\n\n* [create](docs/sdks/chat/README.md#create) - Chat\n* [deleteAll](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user\n* [delete](docs/sdks/chat/README.md#delete) - Deletes saved Chats\n* [retrieve](docs/sdks/chat/README.md#retrieve) - Retrieves a Chat\n* [list](docs/sdks/chat/README.md#list) - Retrieves all saved Chats\n* [retrieveApplication](docs/sdks/chat/README.md#retrieveapplication) - Gets the metadata for a custom Chat application\n* [uploadFiles](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat\n* [retrieveFiles](docs/sdks/chat/README.md#retrievefiles) - Get files uploaded by a user for Chat\n* [deleteFiles](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat\n* [createStream](docs/sdks/chat/README.md#createstream) - Chat\n\n### [Client.Collections](docs/sdks/collections/README.md)\n\n* [addItems](docs/sdks/collections/README.md#additems) - Add Collection item\n* [create](docs/sdks/collections/README.md#create) - Create Collection\n* [delete](docs/sdks/collections/README.md#delete) - Delete Collection\n* [deleteItem](docs/sdks/collections/README.md#deleteitem) - Delete Collection item\n* [update](docs/sdks/collections/README.md#update) - Update Collection\n* [updateItem](docs/sdks/collections/README.md#updateitem) - Update Collection item\n* [retrieve](docs/sdks/collections/README.md#retrieve) - Read Collection\n* [list](docs/sdks/collections/README.md#list) - List Collections\n\n### [Client.Documents](docs/sdks/clientdocuments/README.md)\n\n* [retrievePermissions](docs/sdks/clientdocuments/README.md#retrievepermissions) - Read document permissions\n* [retrieve](docs/sdks/clientdocuments/README.md#retrieve) - Read documents\n* [retrieveByFacets](docs/sdks/clientdocuments/README.md#retrievebyfacets) - Read documents by facets\n* [summarize](docs/sdks/clientdocuments/README.md#summarize) - Summarize documents\n\n### [Client.Entities](docs/sdks/entities/README.md)\n\n* [list](docs/sdks/entities/README.md#list) - List entities\n* [readPeople](docs/sdks/entities/README.md#readpeople) - Read people\n\n### [Client.Governance.Data.Policies](docs/sdks/policies/README.md)\n\n* [retrieve](docs/sdks/policies/README.md#retrieve) - Gets specified policy\n* [update](docs/sdks/policies/README.md#update) - Updates an existing policy\n* [list](docs/sdks/policies/README.md#list) - Lists policies\n* [create](docs/sdks/policies/README.md#create) - Creates new policy\n* [download](docs/sdks/policies/README.md#download) - Downloads violations CSV for policy\n\n### [Client.Governance.Data.Reports](docs/sdks/reports/README.md)\n\n* [create](docs/sdks/reports/README.md#create) - Creates new one-time report\n* [download](docs/sdks/reports/README.md#download) - Downloads violations CSV for report\n* [status](docs/sdks/reports/README.md#status) - Fetches report run status\n\n### [Client.Governance.Documents.Visibilityoverrides](docs/sdks/visibilityoverrides/README.md)\n\n* [list](docs/sdks/visibilityoverrides/README.md#list) - Fetches documents visibility\n* [create](docs/sdks/visibilityoverrides/README.md#create) - Hide or unhide docs\n\n### [Client.Insights](docs/sdks/insights/README.md)\n\n* [retrieve](docs/sdks/insights/README.md#retrieve) - Get insights\n\n### [Client.Messages](docs/sdks/messages/README.md)\n\n* [retrieve](docs/sdks/messages/README.md#retrieve) - Read messages\n\n### [Client.Pins](docs/sdks/pins/README.md)\n\n* [update](docs/sdks/pins/README.md#update) - Update pin\n* [retrieve](docs/sdks/pins/README.md#retrieve) - Read pin\n* [list](docs/sdks/pins/README.md#list) - List pins\n* [create](docs/sdks/pins/README.md#create) - Create pin\n* [remove](docs/sdks/pins/README.md#remove) - Delete pin\n\n### [Client.Search](docs/sdks/search/README.md)\n\n* [queryAsAdmin](docs/sdks/search/README.md#queryasadmin) - Search the index (admin)\n* [autocomplete](docs/sdks/search/README.md#autocomplete) - Autocomplete\n* [retrieveFeed](docs/sdks/search/README.md#retrievefeed) - Feed of documents and events\n* [recommendations](docs/sdks/search/README.md#recommendations) - Recommend documents\n* [query](docs/sdks/search/README.md#query) - Search\n\n### [Client.Shortcuts](docs/sdks/clientshortcuts/README.md)\n\n* [create](docs/sdks/clientshortcuts/README.md#create) - Create shortcut\n* [delete](docs/sdks/clientshortcuts/README.md#delete) - Delete shortcut\n* [retrieve](docs/sdks/clientshortcuts/README.md#retrieve) - Read shortcut\n* [list](docs/sdks/clientshortcuts/README.md#list) - List shortcuts\n* [update](docs/sdks/clientshortcuts/README.md#update) - Update shortcut\n\n### [Client.Tools](docs/sdks/tools/README.md)\n\n* [list](docs/sdks/tools/README.md#list) - List available tools\n* [run](docs/sdks/tools/README.md#run) - Execute the specified tool\n\n### [Client.Verification](docs/sdks/verification/README.md)\n\n* [addReminder](docs/sdks/verification/README.md#addreminder) - Create verification\n* [list](docs/sdks/verification/README.md#list) - List verifications\n* [verify](docs/sdks/verification/README.md#verify) - Update verification\n\n### [Datasources](docs/sdks/datasources/README.md)\n\n* [getDatasourceInstanceConfiguration](docs/sdks/datasources/README.md#getdatasourceinstanceconfiguration) - Get datasource instance configuration\n* [updateDatasourceInstanceConfiguration](docs/sdks/datasources/README.md#updatedatasourceinstanceconfiguration) - Update datasource instance configuration\n\n### [Governance](docs/sdks/governance/README.md)\n\n* [createfindingsexport](docs/sdks/governance/README.md#createfindingsexport) - Creates findings export\n* [listfindingsexports](docs/sdks/governance/README.md#listfindingsexports) - Lists findings exports\n* [downloadfindingsexport](docs/sdks/governance/README.md#downloadfindingsexport) - Downloads findings export\n* [deletefindingsexport](docs/sdks/governance/README.md#deletefindingsexport) - Deletes findings export\n\n### [Indexing.Authentication](docs/sdks/indexingauthentication/README.md)\n\n* [rotateToken](docs/sdks/indexingauthentication/README.md#rotatetoken) - Rotate token\n\n### [Indexing.Datasource](docs/sdks/datasource/README.md)\n\n* [status](docs/sdks/datasource/README.md#status) - Beta: Get datasource status\n\n\n### [Indexing.Datasources](docs/sdks/indexingdatasources/README.md)\n\n* [add](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource\n* [retrieveConfig](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config\n\n### [Indexing.Documents](docs/sdks/indexingdocuments/README.md)\n\n* [addOrUpdate](docs/sdks/indexingdocuments/README.md#addorupdate) - Index document\n* [index](docs/sdks/indexingdocuments/README.md#index) - Index documents\n* [bulkIndex](docs/sdks/indexingdocuments/README.md#bulkindex) - Bulk index documents\n* [processAll](docs/sdks/indexingdocuments/README.md#processall) - Schedules the processing of uploaded documents\n* [delete](docs/sdks/indexingdocuments/README.md#delete) - Delete document\n* [debug](docs/sdks/indexingdocuments/README.md#debug) - Beta: Get document information\n\n* [debugMany](docs/sdks/indexingdocuments/README.md#debugmany) - Beta: Get information of a batch of documents\n\n* [checkAccess](docs/sdks/indexingdocuments/README.md#checkaccess) - Check document access\n* [~~status~~](docs/sdks/indexingdocuments/README.md#status) - Get document upload and indexing status :warning: **Deprecated**\n* [~~count~~](docs/sdks/indexingdocuments/README.md#count) - Get document count :warning: **Deprecated**\n\n### [Indexing.People](docs/sdks/people/README.md)\n\n* [debug](docs/sdks/people/README.md#debug) - Beta: Get user information\n\n* [~~count~~](docs/sdks/people/README.md#count) - Get user count :warning: **Deprecated**\n* [index](docs/sdks/people/README.md#index) - Index employee\n* [~~bulkIndex~~](docs/sdks/people/README.md#bulkindex) - Bulk index employees :warning: **Deprecated**\n* [processAllEmployeesAndTeams](docs/sdks/people/README.md#processallemployeesandteams) - Schedules the processing of uploaded employees and teams\n* [delete](docs/sdks/people/README.md#delete) - Delete employee\n* [indexTeam](docs/sdks/people/README.md#indexteam) - Index team\n* [deleteTeam](docs/sdks/people/README.md#deleteteam) - Delete team\n* [bulkIndexTeams](docs/sdks/people/README.md#bulkindexteams) - Bulk index teams\n\n### [Indexing.Permissions](docs/sdks/permissions/README.md)\n\n* [updatePermissions](docs/sdks/permissions/README.md#updatepermissions) - Update document permissions\n* [indexUser](docs/sdks/permissions/README.md#indexuser) - Index user\n* [bulkIndexUsers](docs/sdks/permissions/README.md#bulkindexusers) - Bulk index users\n* [indexGroup](docs/sdks/permissions/README.md#indexgroup) - Index group\n* [bulkIndexGroups](docs/sdks/permissions/README.md#bulkindexgroups) - Bulk index groups\n* [indexMembership](docs/sdks/permissions/README.md#indexmembership) - Index membership\n* [bulkIndexMemberships](docs/sdks/permissions/README.md#bulkindexmemberships) - Bulk index memberships for a group\n* [processMemberships](docs/sdks/permissions/README.md#processmemberships) - Schedules the processing of group memberships\n* [deleteUser](docs/sdks/permissions/README.md#deleteuser) - Delete user\n* [deleteGroup](docs/sdks/permissions/README.md#deletegroup) - Delete group\n* [deleteMembership](docs/sdks/permissions/README.md#deletemembership) - Delete membership\n* [authorizeBetaUsers](docs/sdks/permissions/README.md#authorizebetausers) - Beta users\n\n### [Indexing.Shortcuts](docs/sdks/indexingshortcuts/README.md)\n\n* [bulkIndex](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts\n* [upload](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\u003c!-- Start Standalone functions [standalone-funcs] --\u003e\n## Standalone functions\n\nAll the methods listed above are available as standalone functions. These\nfunctions are ideal for use in applications running in the browser, serverless\nruntimes or other environments where application bundle size is a primary\nconcern. When using a bundler to build your application, all unused\nfunctionality will be either excluded from the final bundle or tree-shaken away.\n\nTo read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAvailable standalone functions\u003c/summary\u003e\n\n- [`authenticationCheckdatasourceauth`](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization\n- [`clientActivityFeedback`](docs/sdks/activity/README.md#feedback) - Report client activity\n- [`clientActivityReport`](docs/sdks/activity/README.md#report) - Report document activity\n- [`clientAgentsList`](docs/sdks/agents/README.md#list) - Search agents\n- [`clientAgentsRetrieve`](docs/sdks/agents/README.md#retrieve) - Retrieve an agent\n- [`clientAgentsRetrieveSchemas`](docs/sdks/agents/README.md#retrieveschemas) - List an agent's schemas\n- [`clientAgentsRun`](docs/sdks/agents/README.md#run) - Create an agent run and wait for the response\n- [`clientAgentsRunStream`](docs/sdks/agents/README.md#runstream) - Create an agent run and stream the response\n- [`clientAnnouncementsCreate`](docs/sdks/announcements/README.md#create) - Create Announcement\n- [`clientAnnouncementsDelete`](docs/sdks/announcements/README.md#delete) - Delete Announcement\n- [`clientAnnouncementsUpdate`](docs/sdks/announcements/README.md#update) - Update Announcement\n- [`clientAnswersCreate`](docs/sdks/answers/README.md#create) - Create Answer\n- [`clientAnswersDelete`](docs/sdks/answers/README.md#delete) - Delete Answer\n- [`clientAnswersRetrieve`](docs/sdks/answers/README.md#retrieve) - Read Answer\n- [`clientAnswersUpdate`](docs/sdks/answers/README.md#update) - Update Answer\n- [`clientAuthenticationCreateToken`](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token\n- [`clientChatCreate`](docs/sdks/chat/README.md#create) - Chat\n- [`clientChatCreateStream`](docs/sdks/chat/README.md#createstream) - Chat\n- [`clientChatDelete`](docs/sdks/chat/README.md#delete) - Deletes saved Chats\n- [`clientChatDeleteAll`](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user\n- [`clientChatDeleteFiles`](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat\n- [`clientChatList`](docs/sdks/chat/README.md#list) - Retrieves all saved Chats\n- [`clientChatRetrieve`](docs/sdks/chat/README.md#retrieve) - Retrieves a Chat\n- [`clientChatRetrieveApplication`](docs/sdks/chat/README.md#retrieveapplication) - Gets the metadata for a custom Chat application\n- [`clientChatRetrieveFiles`](docs/sdks/chat/README.md#retrievefiles) - Get files uploaded by a user for Chat\n- [`clientChatUploadFiles`](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat\n- [`clientCollectionsAddItems`](docs/sdks/collections/README.md#additems) - Add Collection item\n- [`clientCollectionsCreate`](docs/sdks/collections/README.md#create) - Create Collection\n- [`clientCollectionsDelete`](docs/sdks/collections/README.md#delete) - Delete Collection\n- [`clientCollectionsDeleteItem`](docs/sdks/collections/README.md#deleteitem) - Delete Collection item\n- [`clientCollectionsList`](docs/sdks/collections/README.md#list) - List Collections\n- [`clientCollectionsRetrieve`](docs/sdks/collections/README.md#retrieve) - Read Collection\n- [`clientCollectionsUpdate`](docs/sdks/collections/README.md#update) - Update Collection\n- [`clientCollectionsUpdateItem`](docs/sdks/collections/README.md#updateitem) - Update Collection item\n- [`clientDocumentsRetrieve`](docs/sdks/clientdocuments/README.md#retrieve) - Read documents\n- [`clientDocumentsRetrieveByFacets`](docs/sdks/clientdocuments/README.md#retrievebyfacets) - Read documents by facets\n- [`clientDocumentsRetrievePermissions`](docs/sdks/clientdocuments/README.md#retrievepermissions) - Read document permissions\n- [`clientDocumentsSummarize`](docs/sdks/clientdocuments/README.md#summarize) - Summarize documents\n- [`clientEntitiesList`](docs/sdks/entities/README.md#list) - List entities\n- [`clientEntitiesReadPeople`](docs/sdks/entities/README.md#readpeople) - Read people\n- [`clientGovernanceDataPoliciesCreate`](docs/sdks/policies/README.md#create) - Creates new policy\n- [`clientGovernanceDataPoliciesDownload`](docs/sdks/policies/README.md#download) - Downloads violations CSV for policy\n- [`clientGovernanceDataPoliciesList`](docs/sdks/policies/README.md#list) - Lists policies\n- [`clientGovernanceDataPoliciesRetrieve`](docs/sdks/policies/README.md#retrieve) - Gets specified policy\n- [`clientGovernanceDataPoliciesUpdate`](docs/sdks/policies/README.md#update) - Updates an existing policy\n- [`clientGovernanceDataReportsCreate`](docs/sdks/reports/README.md#create) - Creates new one-time report\n- [`clientGovernanceDataReportsDownload`](docs/sdks/reports/README.md#download) - Downloads violations CSV for report\n- [`clientGovernanceDataReportsStatus`](docs/sdks/reports/README.md#status) - Fetches report run status\n- [`clientGovernanceDocumentsVisibilityoverridesCreate`](docs/sdks/visibilityoverrides/README.md#create) - Hide or unhide docs\n- [`clientGovernanceDocumentsVisibilityoverridesList`](docs/sdks/visibilityoverrides/README.md#list) - Fetches documents visibility\n- [`clientInsightsRetrieve`](docs/sdks/insights/README.md#retrieve) - Get insights\n- [`clientMessagesRetrieve`](docs/sdks/messages/README.md#retrieve) - Read messages\n- [`clientPinsCreate`](docs/sdks/pins/README.md#create) - Create pin\n- [`clientPinsList`](docs/sdks/pins/README.md#list) - List pins\n- [`clientPinsRemove`](docs/sdks/pins/README.md#remove) - Delete pin\n- [`clientPinsRetrieve`](docs/sdks/pins/README.md#retrieve) - Read pin\n- [`clientPinsUpdate`](docs/sdks/pins/README.md#update) - Update pin\n- [`clientSearchAutocomplete`](docs/sdks/search/README.md#autocomplete) - Autocomplete\n- [`clientSearchQuery`](docs/sdks/search/README.md#query) - Search\n- [`clientSearchQueryAsAdmin`](docs/sdks/search/README.md#queryasadmin) - Search the index (admin)\n- [`clientSearchRecommendations`](docs/sdks/search/README.md#recommendations) - Recommend documents\n- [`clientSearchRetrieveFeed`](docs/sdks/search/README.md#retrievefeed) - Feed of documents and events\n- [`clientShortcutsCreate`](docs/sdks/clientshortcuts/README.md#create) - Create shortcut\n- [`clientShortcutsDelete`](docs/sdks/clientshortcuts/README.md#delete) - Delete shortcut\n- [`clientShortcutsList`](docs/sdks/clientshortcuts/README.md#list) - List shortcuts\n- [`clientShortcutsRetrieve`](docs/sdks/clientshortcuts/README.md#retrieve) - Read shortcut\n- [`clientShortcutsUpdate`](docs/sdks/clientshortcuts/README.md#update) - Update shortcut\n- [`clientToolsList`](docs/sdks/tools/README.md#list) - List available tools\n- [`clientToolsRun`](docs/sdks/tools/README.md#run) - Execute the specified tool\n- [`clientVerificationAddReminder`](docs/sdks/verification/README.md#addreminder) - Create verification\n- [`clientVerificationList`](docs/sdks/verification/README.md#list) - List verifications\n- [`clientVerificationVerify`](docs/sdks/verification/README.md#verify) - Update verification\n- [`datasourcesGetDatasourceInstanceConfiguration`](docs/sdks/datasources/README.md#getdatasourceinstanceconfiguration) - Get datasource instance configuration\n- [`datasourcesUpdateDatasourceInstanceConfiguration`](docs/sdks/datasources/README.md#updatedatasourceinstanceconfiguration) - Update datasource instance configuration\n- [`governanceCreatefindingsexport`](docs/sdks/governance/README.md#createfindingsexport) - Creates findings export\n- [`governanceDeletefindingsexport`](docs/sdks/governance/README.md#deletefindingsexport) - Deletes findings export\n- [`governanceDownloadfindingsexport`](docs/sdks/governance/README.md#downloadfindingsexport) - Downloads findings export\n- [`governanceListfindingsexports`](docs/sdks/governance/README.md#listfindingsexports) - Lists findings exports\n- [`indexingAuthenticationRotateToken`](docs/sdks/indexingauthentication/README.md#rotatetoken) - Rotate token\n- [`indexingDatasourcesAdd`](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource\n- [`indexingDatasourcesRetrieveConfig`](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config\n- [`indexingDatasourceStatus`](docs/sdks/datasource/README.md#status) - Beta: Get datasource status\n\n- [`indexingDocumentsAddOrUpdate`](docs/sdks/indexingdocuments/README.md#addorupdate) - Index document\n- [`indexingDocumentsBulkIndex`](docs/sdks/indexingdocuments/README.md#bulkindex) - Bulk index documents\n- [`indexingDocumentsCheckAccess`](docs/sdks/indexingdocuments/README.md#checkaccess) - Check document access\n- [`indexingDocumentsDebug`](docs/sdks/indexingdocuments/README.md#debug) - Beta: Get document information\n\n- [`indexingDocumentsDebugMany`](docs/sdks/indexingdocuments/README.md#debugmany) - Beta: Get information of a batch of documents\n\n- [`indexingDocumentsDelete`](docs/sdks/indexingdocuments/README.md#delete) - Delete document\n- [`indexingDocumentsIndex`](docs/sdks/indexingdocuments/README.md#index) - Index documents\n- [`indexingDocumentsProcessAll`](docs/sdks/indexingdocuments/README.md#processall) - Schedules the processing of uploaded documents\n- [`indexingPeopleBulkIndexTeams`](docs/sdks/people/README.md#bulkindexteams) - Bulk index teams\n- [`indexingPeopleDebug`](docs/sdks/people/README.md#debug) - Beta: Get user information\n\n- [`indexingPeopleDelete`](docs/sdks/people/README.md#delete) - Delete employee\n- [`indexingPeopleDeleteTeam`](docs/sdks/people/README.md#deleteteam) - Delete team\n- [`indexingPeopleIndex`](docs/sdks/people/README.md#index) - Index employee\n- [`indexingPeopleIndexTeam`](docs/sdks/people/README.md#indexteam) - Index team\n- [`indexingPeopleProcessAllEmployeesAndTeams`](docs/sdks/people/README.md#processallemployeesandteams) - Schedules the processing of uploaded employees and teams\n- [`indexingPermissionsAuthorizeBetaUsers`](docs/sdks/permissions/README.md#authorizebetausers) - Beta users\n- [`indexingPermissionsBulkIndexGroups`](docs/sdks/permissions/README.md#bulkindexgroups) - Bulk index groups\n- [`indexingPermissionsBulkIndexMemberships`](docs/sdks/permissions/README.md#bulkindexmemberships) - Bulk index memberships for a group\n- [`indexingPermissionsBulkIndexUsers`](docs/sdks/permissions/README.md#bulkindexusers) - Bulk index users\n- [`indexingPermissionsDeleteGroup`](docs/sdks/permissions/README.md#deletegroup) - Delete group\n- [`indexingPermissionsDeleteMembership`](docs/sdks/permissions/README.md#deletemembership) - Delete membership\n- [`indexingPermissionsDeleteUser`](docs/sdks/permissions/README.md#deleteuser) - Delete user\n- [`indexingPermissionsIndexGroup`](docs/sdks/permissions/README.md#indexgroup) - Index group\n- [`indexingPermissionsIndexMembership`](docs/sdks/permissions/README.md#indexmembership) - Index membership\n- [`indexingPermissionsIndexUser`](docs/sdks/permissions/README.md#indexuser) - Index user\n- [`indexingPermissionsProcessMemberships`](docs/sdks/permissions/README.md#processmemberships) - Schedules the processing of group memberships\n- [`indexingPermissionsUpdatePermissions`](docs/sdks/permissions/README.md#updatepermissions) - Update document permissions\n- [`indexingShortcutsBulkIndex`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts\n- [`indexingShortcutsUpload`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts\n- ~~[`clientAnswersList`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated**\n- ~~[`indexingDocumentsCount`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated**\n- ~~[`indexingDocumentsStatus`](docs/sdks/indexingdocuments/README.md#status)~~ - Get document upload and indexing status :warning: **Deprecated**\n- ~~[`indexingPeopleBulkIndex`](docs/sdks/people/README.md#bulkindex)~~ - Bulk index employees :warning: **Deprecated**\n- ~~[`indexingPeopleCount`](docs/sdks/people/README.md#count)~~ - Get user count :warning: **Deprecated**\n\n\u003c/details\u003e\n\u003c!-- End Standalone functions [standalone-funcs] --\u003e\n\n\u003c!-- Start React hooks with TanStack Query [react-query] --\u003e\n## React hooks with TanStack Query\n\nReact hooks built on [TanStack Query][tanstack-query] are included in this SDK.\nThese hooks and the utility functions provided alongside them can be used to\nbuild rich applications that pull data from the API using one of the most\npopular asynchronous state management library.\n\n[tanstack-query]: https://tanstack.com/query/v5/docs/framework/react/overview\n\nTo learn about this feature and how to get started, check\n[REACT_QUERY.md](./REACT_QUERY.md).\n\n\u003e [!WARNING]\n\u003e\n\u003e This feature is currently in **preview** and is subject to breaking changes\n\u003e within the current major version of the SDK as we gather user feedback on it.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eAvailable React hooks\u003c/summary\u003e\n\n- [`useAuthenticationCheckdatasourceauthMutation`](docs/sdks/authentication/README.md#checkdatasourceauth) - Check datasource authorization\n- [`useClientActivityFeedbackMutation`](docs/sdks/activity/README.md#feedback) - Report client activity\n- [`useClientActivityReportMutation`](docs/sdks/activity/README.md#report) - Report document activity\n- [`useClientAgentsListMutation`](docs/sdks/agents/README.md#list) - Search agents\n- [`useClientAgentsRetrieve`](docs/sdks/agents/README.md#retrieve) - Retrieve an agent\n- [`useClientAgentsRetrieveSchemas`](docs/sdks/agents/README.md#retrieveschemas) - List an agent's schemas\n- [`useClientAgentsRunMutation`](docs/sdks/agents/README.md#run) - Create an agent run and wait for the response\n- [`useClientAgentsRunStreamMutation`](docs/sdks/agents/README.md#runstream) - Create an agent run and stream the response\n- [`useClientAnnouncementsCreateMutation`](docs/sdks/announcements/README.md#create) - Create Announcement\n- [`useClientAnnouncementsDeleteMutation`](docs/sdks/announcements/README.md#delete) - Delete Announcement\n- [`useClientAnnouncementsUpdateMutation`](docs/sdks/announcements/README.md#update) - Update Announcement\n- [`useClientAnswersCreateMutation`](docs/sdks/answers/README.md#create) - Create Answer\n- [`useClientAnswersDeleteMutation`](docs/sdks/answers/README.md#delete) - Delete Answer\n- [`useClientAnswersRetrieveMutation`](docs/sdks/answers/README.md#retrieve) - Read Answer\n- [`useClientAnswersUpdateMutation`](docs/sdks/answers/README.md#update) - Update Answer\n- [`useClientAuthenticationCreateTokenMutation`](docs/sdks/clientauthentication/README.md#createtoken) - Create authentication token\n- [`useClientChatCreateMutation`](docs/sdks/chat/README.md#create) - Chat\n- [`useClientChatCreateStreamMutation`](docs/sdks/chat/README.md#createstream) - Chat\n- [`useClientChatDeleteAllMutation`](docs/sdks/chat/README.md#deleteall) - Deletes all saved Chats owned by a user\n- [`useClientChatDeleteFilesMutation`](docs/sdks/chat/README.md#deletefiles) - Delete files uploaded by a user for chat\n- [`useClientChatDeleteMutation`](docs/sdks/chat/README.md#delete) - Deletes saved Chats\n- [`useClientChatListMutation`](docs/sdks/chat/README.md#list) - Retrieves all saved Chats\n- [`useClientChatRetrieveApplicationMutation`](docs/sdks/chat/README.md#retrieveapplication) - Gets the metadata for a custom Chat application\n- [`useClientChatRetrieveFilesMutation`](docs/sdks/chat/README.md#retrievefiles) - Get files uploaded by a user for Chat\n- [`useClientChatRetrieveMutation`](docs/sdks/chat/README.md#retrieve) - Retrieves a Chat\n- [`useClientChatUploadFilesMutation`](docs/sdks/chat/README.md#uploadfiles) - Upload files for Chat\n- [`useClientCollectionsAddItemsMutation`](docs/sdks/collections/README.md#additems) - Add Collection item\n- [`useClientCollectionsCreateMutation`](docs/sdks/collections/README.md#create) - Create Collection\n- [`useClientCollectionsDeleteItemMutation`](docs/sdks/collections/README.md#deleteitem) - Delete Collection item\n- [`useClientCollectionsDeleteMutation`](docs/sdks/collections/README.md#delete) - Delete Collection\n- [`useClientCollectionsListMutation`](docs/sdks/collections/README.md#list) - List Collections\n- [`useClientCollectionsRetrieveMutation`](docs/sdks/collections/README.md#retrieve) - Read Collection\n- [`useClientCollectionsUpdateItemMutation`](docs/sdks/collections/README.md#updateitem) - Update Collection item\n- [`useClientCollectionsUpdateMutation`](docs/sdks/collections/README.md#update) - Update Collection\n- [`useClientDocumentsRetrieveByFacetsMutation`](docs/sdks/clientdocuments/README.md#retrievebyfacets) - Read documents by facets\n- [`useClientDocumentsRetrieveMutation`](docs/sdks/clientdocuments/README.md#retrieve) - Read documents\n- [`useClientDocumentsRetrievePermissionsMutation`](docs/sdks/clientdocuments/README.md#retrievepermissions) - Read document permissions\n- [`useClientDocumentsSummarizeMutation`](docs/sdks/clientdocuments/README.md#summarize) - Summarize documents\n- [`useClientEntitiesListMutation`](docs/sdks/entities/README.md#list) - List entities\n- [`useClientEntitiesReadPeopleMutation`](docs/sdks/entities/README.md#readpeople) - Read people\n- [`useClientGovernanceDataPoliciesCreateMutation`](docs/sdks/policies/README.md#create) - Creates new policy\n- [`useClientGovernanceDataPoliciesDownload`](docs/sdks/policies/README.md#download) - Downloads violations CSV for policy\n- [`useClientGovernanceDataPoliciesList`](docs/sdks/policies/README.md#list) - Lists policies\n- [`useClientGovernanceDataPoliciesRetrieve`](docs/sdks/policies/README.md#retrieve) - Gets specified policy\n- [`useClientGovernanceDataPoliciesUpdateMutation`](docs/sdks/policies/README.md#update) - Updates an existing policy\n- [`useClientGovernanceDataReportsCreateMutation`](docs/sdks/reports/README.md#create) - Creates new one-time report\n- [`useClientGovernanceDataReportsDownload`](docs/sdks/reports/README.md#download) - Downloads violations CSV for report\n- [`useClientGovernanceDataReportsStatus`](docs/sdks/reports/README.md#status) - Fetches report run status\n- [`useClientGovernanceDocumentsVisibilityoverridesCreateMutation`](docs/sdks/visibilityoverrides/README.md#create) - Hide or unhide docs\n- [`useClientGovernanceDocumentsVisibilityoverridesList`](docs/sdks/visibilityoverrides/README.md#list) - Fetches documents visibility\n- [`useClientInsightsRetrieveMutation`](docs/sdks/insights/README.md#retrieve) - Get insights\n- [`useClientMessagesRetrieveMutation`](docs/sdks/messages/README.md#retrieve) - Read messages\n- [`useClientPinsCreateMutation`](docs/sdks/pins/README.md#create) - Create pin\n- [`useClientPinsListMutation`](docs/sdks/pins/README.md#list) - List pins\n- [`useClientPinsRemoveMutation`](docs/sdks/pins/README.md#remove) - Delete pin\n- [`useClientPinsRetrieveMutation`](docs/sdks/pins/README.md#retrieve) - Read pin\n- [`useClientPinsUpdateMutation`](docs/sdks/pins/README.md#update) - Update pin\n- [`useClientSearchAutocompleteMutation`](docs/sdks/search/README.md#autocomplete) - Autocomplete\n- [`useClientSearchQueryAsAdminMutation`](docs/sdks/search/README.md#queryasadmin) - Search the index (admin)\n- [`useClientSearchQueryMutation`](docs/sdks/search/README.md#query) - Search\n- [`useClientSearchRecommendationsMutation`](docs/sdks/search/README.md#recommendations) - Recommend documents\n- [`useClientSearchRetrieveFeedMutation`](docs/sdks/search/README.md#retrievefeed) - Feed of documents and events\n- [`useClientShortcutsCreateMutation`](docs/sdks/clientshortcuts/README.md#create) - Create shortcut\n- [`useClientShortcutsDeleteMutation`](docs/sdks/clientshortcuts/README.md#delete) - Delete shortcut\n- [`useClientShortcutsListMutation`](docs/sdks/clientshortcuts/README.md#list) - List shortcuts\n- [`useClientShortcutsRetrieveMutation`](docs/sdks/clientshortcuts/README.md#retrieve) - Read shortcut\n- [`useClientShortcutsUpdateMutation`](docs/sdks/clientshortcuts/README.md#update) - Update shortcut\n- [`useClientToolsList`](docs/sdks/tools/README.md#list) - List available tools\n- [`useClientToolsRunMutation`](docs/sdks/tools/README.md#run) - Execute the specified tool\n- [`useClientVerificationAddReminderMutation`](docs/sdks/verification/README.md#addreminder) - Create verification\n- [`useClientVerificationListMutation`](docs/sdks/verification/README.md#list) - List verifications\n- [`useClientVerificationVerifyMutation`](docs/sdks/verification/README.md#verify) - Update verification\n- [`useDatasourcesGetDatasourceInstanceConfiguration`](docs/sdks/datasources/README.md#getdatasourceinstanceconfiguration) - Get datasource instance configuration\n- [`useDatasourcesUpdateDatasourceInstanceConfigurationMutation`](docs/sdks/datasources/README.md#updatedatasourceinstanceconfiguration) - Update datasource instance configuration\n- [`useGovernanceCreatefindingsexportMutation`](docs/sdks/governance/README.md#createfindingsexport) - Creates findings export\n- [`useGovernanceDeletefindingsexportMutation`](docs/sdks/governance/README.md#deletefindingsexport) - Deletes findings export\n- [`useGovernanceDownloadfindingsexport`](docs/sdks/governance/README.md#downloadfindingsexport) - Downloads findings export\n- [`useGovernanceListfindingsexports`](docs/sdks/governance/README.md#listfindingsexports) - Lists findings exports\n- [`useIndexingAuthenticationRotateTokenMutation`](docs/sdks/indexingauthentication/README.md#rotatetoken) - Rotate token\n- [`useIndexingDatasourcesAddMutation`](docs/sdks/indexingdatasources/README.md#add) - Add or update datasource\n- [`useIndexingDatasourcesRetrieveConfigMutation`](docs/sdks/indexingdatasources/README.md#retrieveconfig) - Get datasource config\n- [`useIndexingDatasourceStatusMutation`](docs/sdks/datasource/README.md#status) - Beta: Get datasource status\n\n- [`useIndexingDocumentsAddOrUpdateMutation`](docs/sdks/indexingdocuments/README.md#addorupdate) - Index document\n- [`useIndexingDocumentsBulkIndexMutation`](docs/sdks/indexingdocuments/README.md#bulkindex) - Bulk index documents\n- [`useIndexingDocumentsCheckAccessMutation`](docs/sdks/indexingdocuments/README.md#checkaccess) - Check document access\n- [`useIndexingDocumentsDebugManyMutation`](docs/sdks/indexingdocuments/README.md#debugmany) - Beta: Get information of a batch of documents\n\n- [`useIndexingDocumentsDebugMutation`](docs/sdks/indexingdocuments/README.md#debug) - Beta: Get document information\n\n- [`useIndexingDocumentsDeleteMutation`](docs/sdks/indexingdocuments/README.md#delete) - Delete document\n- [`useIndexingDocumentsIndexMutation`](docs/sdks/indexingdocuments/README.md#index) - Index documents\n- [`useIndexingDocumentsProcessAllMutation`](docs/sdks/indexingdocuments/README.md#processall) - Schedules the processing of uploaded documents\n- [`useIndexingPeopleBulkIndexTeamsMutation`](docs/sdks/people/README.md#bulkindexteams) - Bulk index teams\n- [`useIndexingPeopleDebugMutation`](docs/sdks/people/README.md#debug) - Beta: Get user information\n\n- [`useIndexingPeopleDeleteMutation`](docs/sdks/people/README.md#delete) - Delete employee\n- [`useIndexingPeopleDeleteTeamMutation`](docs/sdks/people/README.md#deleteteam) - Delete team\n- [`useIndexingPeopleIndexMutation`](docs/sdks/people/README.md#index) - Index employee\n- [`useIndexingPeopleIndexTeamMutation`](docs/sdks/people/README.md#indexteam) - Index team\n- [`useIndexingPeopleProcessAllEmployeesAndTeamsMutation`](docs/sdks/people/README.md#processallemployeesandteams) - Schedules the processing of uploaded employees and teams\n- [`useIndexingPermissionsAuthorizeBetaUsersMutation`](docs/sdks/permissions/README.md#authorizebetausers) - Beta users\n- [`useIndexingPermissionsBulkIndexGroupsMutation`](docs/sdks/permissions/README.md#bulkindexgroups) - Bulk index groups\n- [`useIndexingPermissionsBulkIndexMembershipsMutation`](docs/sdks/permissions/README.md#bulkindexmemberships) - Bulk index memberships for a group\n- [`useIndexingPermissionsBulkIndexUsersMutation`](docs/sdks/permissions/README.md#bulkindexusers) - Bulk index users\n- [`useIndexingPermissionsDeleteGroupMutation`](docs/sdks/permissions/README.md#deletegroup) - Delete group\n- [`useIndexingPermissionsDeleteMembershipMutation`](docs/sdks/permissions/README.md#deletemembership) - Delete membership\n- [`useIndexingPermissionsDeleteUserMutation`](docs/sdks/permissions/README.md#deleteuser) - Delete user\n- [`useIndexingPermissionsIndexGroupMutation`](docs/sdks/permissions/README.md#indexgroup) - Index group\n- [`useIndexingPermissionsIndexMembershipMutation`](docs/sdks/permissions/README.md#indexmembership) - Index membership\n- [`useIndexingPermissionsIndexUserMutation`](docs/sdks/permissions/README.md#indexuser) - Index user\n- [`useIndexingPermissionsProcessMembershipsMutation`](docs/sdks/permissions/README.md#processmemberships) - Schedules the processing of group memberships\n- [`useIndexingPermissionsUpdatePermissionsMutation`](docs/sdks/permissions/README.md#updatepermissions) - Update document permissions\n- [`useIndexingShortcutsBulkIndexMutation`](docs/sdks/indexingshortcuts/README.md#bulkindex) - Bulk index external shortcuts\n- [`useIndexingShortcutsUploadMutation`](docs/sdks/indexingshortcuts/README.md#upload) - Upload shortcuts\n- ~~[`useClientAnswersListMutation`](docs/sdks/answers/README.md#list)~~ - List Answers :warning: **Deprecated**\n- ~~[`useIndexingDocumentsCountMutation`](docs/sdks/indexingdocuments/README.md#count)~~ - Get document count :warning: **Deprecated**\n- ~~[`useIndexingDocumentsStatusMutation`](docs/sdks/indexingdocuments/README.md#status)~~ - Get document upload and indexing status :warning: **Deprecated**\n- ~~[`useIndexingPeopleBulkIndexMutation`](docs/sdks/people/README.md#bulkindex)~~ - Bulk index employees :warning: **Deprecated**\n- ~~[`useIndexingPeopleCountMutation`](docs/sdks/people/README.md#count)~~ - Get user count :warning: **Deprecated**\n\n\u003c/details\u003e\n\u003c!-- End React hooks with TanStack Query [react-query] --\u003e\n\n\u003c!-- Start File uploads [file-upload] --\u003e\n## File uploads\n\nCertain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.\n\n\u003e [!TIP]\n\u003e\n\u003e Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:\n\u003e\n\u003e - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).\n\u003e - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.\n\u003e - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `\u003cinput type=\"file\"\u003e` element.\n\u003e - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\nimport { openAsBlob } from \"node:fs\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await glean.client.chat.uploadFiles({\n    files: [\n      await openAsBlob(\"example.file\"),\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();\n\n```\n\u003c!-- End File uploads [file-upload] --\u003e\n\n\u003c!-- Start Retries [retries] --\u003e\n## Retries\n\nSome of the endpoints in this SDK support retries.  If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API.  However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.\n\nTo change the default retry strategy for a single API call, simply provide a retryConfig object to the call:\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  await glean.client.activity.report({\n    events: [\n      {\n        action: \"HISTORICAL_VIEW\",\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n      {\n        action: \"SEARCH\",\n        params: {\n          query: \"query\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/search?q=query\",\n      },\n      {\n        action: \"VIEW\",\n        params: {\n          duration: 20,\n          referrer: \"https://example.com/document\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n    ],\n  }, {\n    retries: {\n      strategy: \"backoff\",\n      backoff: {\n        initialInterval: 1,\n        maxInterval: 50,\n        exponent: 1.1,\n        maxElapsedTime: 100,\n      },\n      retryConnectionErrors: false,\n    },\n  });\n}\n\nrun();\n\n```\n\nIf you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  retryConfig: {\n    strategy: \"backoff\",\n    backoff: {\n      initialInterval: 1,\n      maxInterval: 50,\n      exponent: 1.1,\n      maxElapsedTime: 100,\n    },\n    retryConnectionErrors: false,\n  },\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  await glean.client.activity.report({\n    events: [\n      {\n        action: \"HISTORICAL_VIEW\",\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n      {\n        action: \"SEARCH\",\n        params: {\n          query: \"query\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/search?q=query\",\n      },\n      {\n        action: \"VIEW\",\n        params: {\n          duration: 20,\n          referrer: \"https://example.com/document\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n    ],\n  });\n}\n\nrun();\n\n```\n\u003c!-- End Retries [retries] --\u003e\n\n## Error Handling\n\nThe following errors may be thrown by the SDK:\n\n| Status Code | Description             | Error Type             | Content Type     |\n| ----------- | ----------------------- | ---------------------- | ---------------- |\n| 400         | Invalid Request         | errors.GleanError      | \\*/\\*            |\n| 401         | Not Authorized          | errors.GleanError      | \\*/\\*            |\n| 403         | Permission Denied       | errors.GleanDataError  | application/json |\n| 408         | Request Timeout         | errors.GleanError      | \\*/\\*            |\n| 422         | Invalid Query           | errors.GleanDataError  | application/json |\n| 429         | Too Many Requests       | errors.GleanError      | \\*/\\*            |\n| 4XX         | Other Client Errors     | errors.GleanError      | \\*/\\*            |\n| 5XX         | Internal Server Errors  | errors.GleanError      | \\*/\\*            |\n\n### Example\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";****\nimport { GleanDataError, GleanError } from \"glean/models/errors\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_BEARER_AUTH\"] ?? \"\",\n});\n\ntry {\n  const data = await glean.client.search.execute({\n    query: \"What are the company holidays this year?\",\n  });\n  console.log(data);\n} catch (error) {\n  if (error instanceof GleanError) {\n    console.error(error.message);\n    console.error(error.statusCode);\n    console.error(error.rawResponse);\n    console.error(error.body);\n  }\n\n  // If the server returned structured data\n  if (error instanceof GleanDataError) {\n    console.error(error.errorMessages);\n    console.error(error.invalidOperators);\n  }\n\n  throw error;\n}\n```\n\n### Advanced Error Handling\n\nValidation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.\n\nIn some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:\n\n| HTTP Client Error                                    | Description                                          |\n| ---------------------------------------------------- | ---------------------------------------------------- |\n| RequestAbortedError                                  | HTTP request was aborted by the client               |\n| RequestTimeoutError                                  | HTTP request timed out due to an AbortSignal signal  |\n| ConnectionError                                      | HTTP client was unable to make a request to a server |\n| InvalidRequestError                                  | Any input used to create a request is invalid        |\n| UnexpectedClientError                                | Unrecognised or unexpected error                     |\n\u003c!-- No Error Handling [errors] --\u003e\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Server Variables\n\nThe default server `https://{instance}-be.glean.com` contains variables and is set to `https://instance-name-be.glean.com` by default. To override default values, the following parameters are available when initializing the SDK client instance:\n\n| Variable   | Parameter          | Default           | Description                                                                                            |\n| ---------- | ------------------ | ----------------- | ------------------------------------------------------------------------------------------------------ |\n| `instance` | `instance: string` | `\"instance-name\"` | The instance name (typically the email domain without the TLD) that determines the deployment backend. |\n\n#### Example\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  serverIdx: 0,\n  instance: \"instance-name\",\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  await glean.client.activity.report({\n    events: [\n      {\n        action: \"HISTORICAL_VIEW\",\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n      {\n        action: \"SEARCH\",\n        params: {\n          query: \"query\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/search?q=query\",\n      },\n      {\n        action: \"VIEW\",\n        params: {\n          duration: 20,\n          referrer: \"https://example.com/document\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n    ],\n  });\n}\n\nrun();\n\n```\n\n### Override Server URL Per-Client\n\nThe default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  serverURL: \"https://instance-name-be.glean.com\",\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n});\n\nasync function run() {\n  await glean.client.activity.report({\n    events: [\n      {\n        action: \"HISTORICAL_VIEW\",\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n      {\n        action: \"SEARCH\",\n        params: {\n          query: \"query\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/search?q=query\",\n      },\n      {\n        action: \"VIEW\",\n        params: {\n          duration: 20,\n          referrer: \"https://example.com/document\",\n        },\n        timestamp: new Date(\"2000-01-23T04:56:07.000Z\"),\n        url: \"https://example.com/\",\n      },\n    ],\n  });\n}\n\nrun();\n\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\u003c!-- Start Custom HTTP Client [http-client] --\u003e\n## Custom HTTP Client\n\nThe TypeScript SDK makes API calls using an `HTTPClient` that wraps the native\n[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This\nclient is a thin wrapper around `fetch` and provides the ability to attach hooks\naround the request lifecycle that can be used to modify the request or handle\nerrors and response.\n\nThe `HTTPClient` constructor takes an optional `fetcher` argument that can be\nused to integrate a third-party HTTP client or when writing tests to mock out\nthe HTTP client and feed in fixtures.\n\nThe following example shows how to:\n- route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent\n- use the `\"beforeRequest\"` hook to add a custom header and a timeout to requests\n- use the `\"requestError\"` hook to log errors\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\nimport { ProxyAgent } from \"undici\";\nimport { HTTPClient } from \"@gleanwork/api-client/lib/http\";\n\nconst dispatcher = new ProxyAgent(\"http://proxy.example.com:8080\");\n\nconst httpClient = new HTTPClient({\n  // 'fetcher' takes a function that has the same signature as native 'fetch'.\n  fetcher: (input, init) =\u003e\n    // 'dispatcher' is specific to undici and not part of the standard Fetch API.\n    fetch(input, { ...init, dispatcher } as RequestInit),\n});\n\nhttpClient.addHook(\"beforeRequest\", (request) =\u003e {\n  const nextRequest = new Request(request, {\n    signal: request.signal || AbortSignal.timeout(5000)\n  });\n\n  nextRequest.headers.set(\"x-custom-header\", \"custom value\");\n\n  return nextRequest;\n});\n\nhttpClient.addHook(\"requestError\", (error, request) =\u003e {\n  console.group(\"Request Error\");\n  console.log(\"Reason:\", `${error}`);\n  console.log(\"Endpoint:\", `${request.method} ${request.url}`);\n  console.groupEnd();\n});\n\nconst sdk = new Glean({ httpClient: httpClient });\n```\n\u003c!-- End Custom HTTP Client [http-client] --\u003e\n\n\u003c!-- Start Debugging [debug] --\u003e\n## Debugging\n\nYou can setup your SDK to emit debug logs for SDK requests and responses.\n\nYou can pass a logger that matches `console`'s interface as an SDK option.\n\n\u003e [!WARNING]\n\u003e Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst sdk = new Glean({ debugLogger: console });\n```\n\nYou can also enable a default debug logger by setting an environment variable `GLEAN_DEBUG` to true.\n\u003c!-- End Debugging [debug] --\u003e\n\n## Experimental Features and Deprecation Testing\n\nThe SDK provides options to test upcoming API changes before they become the default behavior. This is useful for:\n\n- **Testing experimental features** before they are generally available\n- **Preparing for deprecations** by excluding deprecated endpoints ahead of their removal\n\n### Configuration Options\n\nYou can configure these options either via environment variables or SDK constructor options:\n\n#### Using Environment Variables\n\n```typescript\n// Set environment variables before initializing the SDK\nprocess.env.X_GLEAN_EXCLUDE_DEPRECATED_AFTER = '2026-10-15';\nprocess.env.X_GLEAN_INCLUDE_EXPERIMENTAL = 'true';\n\nimport { Glean } from \"@gleanwork/api-client\";\n\nconst glean = new Glean({\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n  serverURL: \"https://mycompany-be.glean.com\",\n});\n```\n\n#### Using SDK Constructor Options\n\n```typescript\nimport { Glean } from \"@gleanwork/api-client\";\nimport type { SDKOptions } from \"@gleanwork/api-client\";\nimport type { XGleanOptions } from \"@gleanwork/api-client/hooks/x-glean-options.js\";\n\nconst opts = {\n  apiToken: process.env[\"GLEAN_API_TOKEN\"] ?? \"\",\n  serverURL: \"https://mycompany-be.glean.com\",\n  excludeDeprecatedAfter: \"2026-10-15\",\n  includeExperimental: true,\n} satisfies SDKOptions \u0026 XGleanOptions;\n\nconst glean = new Glean(opts);\n```\n\n### Option Reference\n\n| Option | Environment Variable | Type | Description |\n| ------ | -------------------- | ---- | ----------- |\n| `excludeDeprecatedAfter` | `X_GLEAN_EXCLUDE_DEPRECATED_AFTER` | `string` (date) | Exclude API endpoints that will be deprecated after this date (format: `YYYY-MM-DD`). Use this to test your integration against upcoming deprecations. |\n| `includeExperimental` | `X_GLEAN_INCLUDE_EXPERIMENTAL` | `boolean` | When `true`, enables experimental API features that are not yet generally available. Use this to preview and test new functionality. |\n\n\u003e [!NOTE]\n\u003e Environment variables take precedence over SDK constructor options when both are set.\n\n\u003e [!WARNING]\n\u003e Experimental features may change or be removed without notice. Do not rely on experimental features in production environments.\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n# Development\n\n## Maturity\n\nThis SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage\nto a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally\nlooking for the latest version.\n\n## Contributions\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. \nWe look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. \n\n### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=glean\u0026utm_campaign=typescript)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleanwork%2Fapi-client-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgleanwork%2Fapi-client-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgleanwork%2Fapi-client-typescript/lists"}