/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: b55bee723a63 */ import { indexingPeopleBulkIndex } from "../funcs/indexingPeopleBulkIndex.js"; import { indexingPeopleBulkIndexTeams } from "../funcs/indexingPeopleBulkIndexTeams.js"; import { indexingPeopleCount } from "../funcs/indexingPeopleCount.js"; import { indexingPeopleDebug } from "../funcs/indexingPeopleDebug.js"; import { indexingPeopleDelete } from "../funcs/indexingPeopleDelete.js"; import { indexingPeopleDeleteTeam } from "../funcs/indexingPeopleDeleteTeam.js"; import { indexingPeopleIndex } from "../funcs/indexingPeopleIndex.js"; import { indexingPeopleIndexTeam } from "../funcs/indexingPeopleIndexTeam.js"; import { indexingPeopleProcessAllEmployeesAndTeams } from "../funcs/indexingPeopleProcessAllEmployeesAndTeams.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import { unwrapAsync } from "../types/fp.js"; export class People extends ClientSDK { /** * Beta: Get user information * * @remarks * Gives various information that would help in debugging related to a particular user. Currently in beta, might undergo breaking changes without prior notice. * * Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/indexing/debugging/datasource-config) for more information. */ async debug( debugUserRequest: components.DebugUserRequest, datasource: string, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleDebug( this, debugUserRequest, datasource, options, )); } /** * Get user count * * @remarks * Fetches user count for the specified custom datasource. * * Tip: Use [/debug/{datasource}/status](https://developers.glean.com/indexing/debugging/datasource-status) for richer information. * * @deprecated method: Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated. */ async count( request: components.GetUserCountRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleCount( this, request, options, )); } /** * Index employee * * @remarks * Adds an employee or replaces the existing information about an employee. */ async index( request: components.IndexEmployeeRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleIndex( this, request, options, )); } /** * Bulk index employees * * @remarks * Replaces all the currently indexed employees using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. * * @deprecated method: Deprecated on 2026-02-03, removal scheduled for 2026-10-15: Endpoint is deprecated. */ async bulkIndex( request: components.BulkIndexEmployeesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleBulkIndex( this, request, options, )); } /** * Schedules the processing of uploaded employees and teams * * @remarks * Schedules the immediate processing of employees and teams uploaded through the indexing API. By default all uploaded people data will be processed asynchronously but this API can be used to schedule its processing on demand. */ async processAllEmployeesAndTeams( options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleProcessAllEmployeesAndTeams( this, options, )); } /** * Delete employee * * @remarks * Delete an employee. Silently succeeds if employee is not present. */ async delete( request: components.DeleteEmployeeRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleDelete( this, request, options, )); } /** * Index team * * @remarks * Adds a team or updates information about a team */ async indexTeam( request: components.IndexTeamRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleIndexTeam( this, request, options, )); } /** * Delete team * * @remarks * Delete a team based on provided id. */ async deleteTeam( request: components.DeleteTeamRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleDeleteTeam( this, request, options, )); } /** * Bulk index teams * * @remarks * Replaces all the currently indexed teams using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/indexing/documents/bulk-upload-model) documentation for an explanation of how to use bulk endpoints. */ async bulkIndexTeams( request: components.BulkIndexTeamsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(indexingPeopleBulkIndexTeams( this, request, options, )); } }