@gleanwork/api-client 0.1.0-beta.7 → 0.1.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -45
- package/dist/commonjs/__tests__/adminsearch.test.js +1 -1
- package/dist/commonjs/__tests__/adminsearch.test.js.map +1 -1
- package/dist/commonjs/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
- package/dist/commonjs/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
- package/dist/commonjs/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +3 -3
- package/dist/commonjs/funcs/clientSearchQueryAsAdmin.js.map +1 -0
- package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts +2 -4
- package/dist/commonjs/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
- package/dist/commonjs/funcs/indexingPeopleBulkIndex.js +4 -6
- package/dist/commonjs/funcs/indexingPeopleBulkIndex.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
- package/dist/commonjs/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
- package/dist/commonjs/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +13 -13
- package/dist/commonjs/react-query/clientSearchQueryAsAdmin.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -2
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -2
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts +2 -4
- package/dist/commonjs/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
- package/dist/commonjs/react-query/indexingPeopleBulkIndex.js +1 -3
- package/dist/commonjs/react-query/indexingPeopleBulkIndex.js.map +1 -1
- package/dist/commonjs/sdk/client.d.ts +0 -3
- package/dist/commonjs/sdk/client.d.ts.map +1 -1
- package/dist/commonjs/sdk/client.js +0 -4
- package/dist/commonjs/sdk/client.js.map +1 -1
- package/dist/commonjs/sdk/clientsearch.d.ts +7 -0
- package/dist/commonjs/sdk/clientsearch.d.ts.map +1 -1
- package/dist/commonjs/sdk/clientsearch.js +10 -0
- package/dist/commonjs/sdk/clientsearch.js.map +1 -1
- package/dist/commonjs/sdk/indexing.d.ts +2 -2
- package/dist/commonjs/sdk/indexing.d.ts.map +1 -1
- package/dist/commonjs/sdk/indexing.js +2 -2
- package/dist/commonjs/sdk/indexing.js.map +1 -1
- package/dist/commonjs/sdk/people.d.ts +63 -1
- package/dist/commonjs/sdk/people.d.ts.map +1 -1
- package/dist/commonjs/sdk/people.js +89 -3
- package/dist/commonjs/sdk/people.js.map +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +0 -3
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +0 -4
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/__tests__/adminsearch.test.js +1 -1
- package/dist/esm/__tests__/adminsearch.test.js.map +1 -1
- package/dist/esm/funcs/{clientAdminSearchQuery.d.ts → clientSearchQueryAsAdmin.d.ts} +2 -2
- package/dist/esm/funcs/clientSearchQueryAsAdmin.d.ts.map +1 -0
- package/dist/esm/funcs/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +2 -2
- package/dist/esm/funcs/clientSearchQueryAsAdmin.js.map +1 -0
- package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts +2 -4
- package/dist/esm/funcs/indexingPeopleBulkIndex.d.ts.map +1 -1
- package/dist/esm/funcs/indexingPeopleBulkIndex.js +4 -6
- package/dist/esm/funcs/indexingPeopleBulkIndex.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts +23 -0
- package/dist/esm/react-query/clientSearchQueryAsAdmin.d.ts.map +1 -0
- package/dist/esm/react-query/{clientAdminSearchQuery.js → clientSearchQueryAsAdmin.js} +10 -10
- package/dist/esm/react-query/clientSearchQueryAsAdmin.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -2
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -2
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts +2 -4
- package/dist/esm/react-query/indexingPeopleBulkIndex.d.ts.map +1 -1
- package/dist/esm/react-query/indexingPeopleBulkIndex.js +1 -3
- package/dist/esm/react-query/indexingPeopleBulkIndex.js.map +1 -1
- package/dist/esm/sdk/client.d.ts +0 -3
- package/dist/esm/sdk/client.d.ts.map +1 -1
- package/dist/esm/sdk/client.js +0 -4
- package/dist/esm/sdk/client.js.map +1 -1
- package/dist/esm/sdk/clientsearch.d.ts +7 -0
- package/dist/esm/sdk/clientsearch.d.ts.map +1 -1
- package/dist/esm/sdk/clientsearch.js +10 -0
- package/dist/esm/sdk/clientsearch.js.map +1 -1
- package/dist/esm/sdk/indexing.d.ts +2 -2
- package/dist/esm/sdk/indexing.d.ts.map +1 -1
- package/dist/esm/sdk/indexing.js +2 -2
- package/dist/esm/sdk/indexing.js.map +1 -1
- package/dist/esm/sdk/people.d.ts +63 -1
- package/dist/esm/sdk/people.d.ts.map +1 -1
- package/dist/esm/sdk/people.js +89 -3
- package/dist/esm/sdk/people.js.map +1 -1
- package/dist/esm/sdk/sdk.d.ts +0 -3
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +0 -4
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/clientsearch/README.md +513 -0
- package/docs/sdks/people/README.md +838 -10
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/adminsearch.test.ts +1 -1
- package/src/funcs/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +1 -1
- package/src/funcs/indexingPeopleBulkIndex.ts +6 -8
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +0 -1
- package/src/react-query/{clientAdminSearchQuery.ts → clientSearchQueryAsAdmin.ts} +18 -18
- package/src/react-query/index.ts +1 -2
- package/src/react-query/indexingPeopleBulkIndex.ts +2 -4
- package/src/sdk/client.ts +0 -6
- package/src/sdk/clientsearch.ts +18 -0
- package/src/sdk/indexing.ts +4 -4
- package/src/sdk/people.ts +153 -3
- package/src/sdk/sdk.ts +0 -6
- package/dist/commonjs/funcs/clientAdminSearchQuery.d.ts.map +0 -1
- package/dist/commonjs/funcs/clientAdminSearchQuery.js.map +0 -1
- package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
- package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
- package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -113
- package/dist/commonjs/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
- package/dist/commonjs/models/components/indexemployeelistrequest.d.ts +0 -36
- package/dist/commonjs/models/components/indexemployeelistrequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/indexemployeelistrequest.js +0 -70
- package/dist/commonjs/models/components/indexemployeelistrequest.js.map +0 -1
- package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts +0 -23
- package/dist/commonjs/react-query/clientAdminSearchQuery.d.ts.map +0 -1
- package/dist/commonjs/react-query/clientAdminSearchQuery.js.map +0 -1
- package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
- package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
- package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -51
- package/dist/commonjs/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
- package/dist/commonjs/sdk/admin.d.ts +0 -7
- package/dist/commonjs/sdk/admin.d.ts.map +0 -1
- package/dist/commonjs/sdk/admin.js +0 -15
- package/dist/commonjs/sdk/admin.js.map +0 -1
- package/dist/commonjs/sdk/adminsearch.d.ts +0 -12
- package/dist/commonjs/sdk/adminsearch.d.ts.map +0 -1
- package/dist/commonjs/sdk/adminsearch.js +0 -22
- package/dist/commonjs/sdk/adminsearch.js.map +0 -1
- package/dist/commonjs/sdk/indexingpeople.d.ts +0 -76
- package/dist/commonjs/sdk/indexingpeople.d.ts.map +0 -1
- package/dist/commonjs/sdk/indexingpeople.js +0 -110
- package/dist/commonjs/sdk/indexingpeople.js.map +0 -1
- package/dist/esm/funcs/clientAdminSearchQuery.d.ts.map +0 -1
- package/dist/esm/funcs/clientAdminSearchQuery.js.map +0 -1
- package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -16
- package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
- package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js +0 -77
- package/dist/esm/funcs/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
- package/dist/esm/models/components/indexemployeelistrequest.d.ts +0 -36
- package/dist/esm/models/components/indexemployeelistrequest.d.ts.map +0 -1
- package/dist/esm/models/components/indexemployeelistrequest.js +0 -32
- package/dist/esm/models/components/indexemployeelistrequest.js.map +0 -1
- package/dist/esm/react-query/clientAdminSearchQuery.d.ts +0 -23
- package/dist/esm/react-query/clientAdminSearchQuery.d.ts.map +0 -1
- package/dist/esm/react-query/clientAdminSearchQuery.js.map +0 -1
- package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts +0 -23
- package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.d.ts.map +0 -1
- package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js +0 -46
- package/dist/esm/react-query/peoplePostApiIndexV1Bulkindexemployees.js.map +0 -1
- package/dist/esm/sdk/admin.d.ts +0 -7
- package/dist/esm/sdk/admin.d.ts.map +0 -1
- package/dist/esm/sdk/admin.js +0 -11
- package/dist/esm/sdk/admin.js.map +0 -1
- package/dist/esm/sdk/adminsearch.d.ts +0 -12
- package/dist/esm/sdk/adminsearch.d.ts.map +0 -1
- package/dist/esm/sdk/adminsearch.js +0 -18
- package/dist/esm/sdk/adminsearch.js.map +0 -1
- package/dist/esm/sdk/indexingpeople.d.ts +0 -76
- package/dist/esm/sdk/indexingpeople.d.ts.map +0 -1
- package/dist/esm/sdk/indexingpeople.js +0 -106
- package/dist/esm/sdk/indexingpeople.js.map +0 -1
- package/docs/sdks/admin/README.md +0 -6
- package/docs/sdks/adminsearch/README.md +0 -520
- package/docs/sdks/indexingpeople/README.md +0 -1005
- package/src/funcs/peoplePostApiIndexV1Bulkindexemployees.ts +0 -155
- package/src/models/components/indexemployeelistrequest.ts +0 -78
- package/src/react-query/peoplePostApiIndexV1Bulkindexemployees.ts +0 -92
- package/src/sdk/admin.ts +0 -13
- package/src/sdk/adminsearch.ts +0 -27
- package/src/sdk/indexingpeople.ts +0 -179
|
@@ -1,1005 +0,0 @@
|
|
|
1
|
-
# IndexingPeople
|
|
2
|
-
(*indexing.people*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [debug](#debug) - Beta: Get user information
|
|
9
|
-
|
|
10
|
-
* [~~count~~](#count) - Get user count :warning: **Deprecated**
|
|
11
|
-
* [index](#index) - Index employee
|
|
12
|
-
* [~~bulkIndex~~](#bulkindex) - Bulk index employees :warning: **Deprecated**
|
|
13
|
-
* [processAllEmployeesAndTeams](#processallemployeesandteams) - Schedules the processing of uploaded employees and teams
|
|
14
|
-
* [delete](#delete) - Delete employee
|
|
15
|
-
* [indexTeam](#indexteam) - Index team
|
|
16
|
-
* [deleteTeam](#deleteteam) - Delete team
|
|
17
|
-
* [bulkIndexTeams](#bulkindexteams) - Bulk index teams
|
|
18
|
-
|
|
19
|
-
## debug
|
|
20
|
-
|
|
21
|
-
Gives various information that would help in debugging related to a particular user. Currently in beta, might undergo breaking changes without prior notice.
|
|
22
|
-
|
|
23
|
-
Tip: Refer to the [Troubleshooting tutorial](https://developers.glean.com/docs/indexing_api/indexing_api_troubleshooting/) for more information.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### Example Usage
|
|
27
|
-
|
|
28
|
-
```typescript
|
|
29
|
-
import { Glean } from "@gleanwork/api-client";
|
|
30
|
-
|
|
31
|
-
const glean = new Glean({
|
|
32
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
async function run() {
|
|
36
|
-
const result = await glean.indexing.people.debug({
|
|
37
|
-
email: "u1@foo.com",
|
|
38
|
-
}, "<value>");
|
|
39
|
-
|
|
40
|
-
// Handle the result
|
|
41
|
-
console.log(result);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
run();
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Standalone function
|
|
48
|
-
|
|
49
|
-
The standalone function version of this method:
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
53
|
-
import { indexingPeopleDebug } from "@gleanwork/api-client/funcs/indexingPeopleDebug.js";
|
|
54
|
-
|
|
55
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
56
|
-
// You can create one instance of it to use across an application.
|
|
57
|
-
const glean = new GleanCore({
|
|
58
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
async function run() {
|
|
62
|
-
const res = await indexingPeopleDebug(glean, {
|
|
63
|
-
email: "u1@foo.com",
|
|
64
|
-
}, "<value>");
|
|
65
|
-
|
|
66
|
-
if (!res.ok) {
|
|
67
|
-
throw res.error;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const { value: result } = res;
|
|
71
|
-
|
|
72
|
-
// Handle the result
|
|
73
|
-
console.log(result);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
run();
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### React hooks and utilities
|
|
80
|
-
|
|
81
|
-
This method can be used in React components through the following hooks and
|
|
82
|
-
associated utilities.
|
|
83
|
-
|
|
84
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
85
|
-
> below and how to get started using React hooks.
|
|
86
|
-
|
|
87
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
import {
|
|
91
|
-
// Mutation hook for triggering the API call.
|
|
92
|
-
useIndexingPeopleDebugMutation
|
|
93
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleDebug.js";
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
### Parameters
|
|
97
|
-
|
|
98
|
-
| Parameter | Type | Required | Description |
|
|
99
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
100
|
-
| `datasource` | *string* | :heavy_check_mark: | The datasource to which the user belongs |
|
|
101
|
-
| `debugUserRequest` | [components.DebugUserRequest](../../models/components/debuguserrequest.md) | :heavy_check_mark: | N/A |
|
|
102
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
103
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
104
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
105
|
-
|
|
106
|
-
### Response
|
|
107
|
-
|
|
108
|
-
**Promise\<[components.DebugUserResponse](../../models/components/debuguserresponse.md)\>**
|
|
109
|
-
|
|
110
|
-
### Errors
|
|
111
|
-
|
|
112
|
-
| Error Type | Status Code | Content Type |
|
|
113
|
-
| ----------------- | ----------------- | ----------------- |
|
|
114
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
115
|
-
|
|
116
|
-
## ~~count~~
|
|
117
|
-
|
|
118
|
-
Fetches user count for the specified custom datasource.
|
|
119
|
-
|
|
120
|
-
Tip: Use [/debug/{datasource}/status](https://developers.glean.com/docs/indexing_api/indexing_api_troubleshooting/#debug-datasource-status) for richer information.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
124
|
-
|
|
125
|
-
### Example Usage
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
import { Glean } from "@gleanwork/api-client";
|
|
129
|
-
|
|
130
|
-
const glean = new Glean({
|
|
131
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
async function run() {
|
|
135
|
-
const result = await glean.indexing.people.count({
|
|
136
|
-
datasource: "<value>",
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// Handle the result
|
|
140
|
-
console.log(result);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
run();
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Standalone function
|
|
147
|
-
|
|
148
|
-
The standalone function version of this method:
|
|
149
|
-
|
|
150
|
-
```typescript
|
|
151
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
152
|
-
import { indexingPeopleCount } from "@gleanwork/api-client/funcs/indexingPeopleCount.js";
|
|
153
|
-
|
|
154
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
155
|
-
// You can create one instance of it to use across an application.
|
|
156
|
-
const glean = new GleanCore({
|
|
157
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
async function run() {
|
|
161
|
-
const res = await indexingPeopleCount(glean, {
|
|
162
|
-
datasource: "<value>",
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
if (!res.ok) {
|
|
166
|
-
throw res.error;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const { value: result } = res;
|
|
170
|
-
|
|
171
|
-
// Handle the result
|
|
172
|
-
console.log(result);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
run();
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### React hooks and utilities
|
|
179
|
-
|
|
180
|
-
This method can be used in React components through the following hooks and
|
|
181
|
-
associated utilities.
|
|
182
|
-
|
|
183
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
184
|
-
> below and how to get started using React hooks.
|
|
185
|
-
|
|
186
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
187
|
-
|
|
188
|
-
```tsx
|
|
189
|
-
import {
|
|
190
|
-
// Mutation hook for triggering the API call.
|
|
191
|
-
useIndexingPeopleCountMutation
|
|
192
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleCount.js";
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### Parameters
|
|
196
|
-
|
|
197
|
-
| Parameter | Type | Required | Description |
|
|
198
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
199
|
-
| `request` | [components.GetUserCountRequest](../../models/components/getusercountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
200
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
201
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
202
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
203
|
-
|
|
204
|
-
### Response
|
|
205
|
-
|
|
206
|
-
**Promise\<[components.GetUserCountResponse](../../models/components/getusercountresponse.md)\>**
|
|
207
|
-
|
|
208
|
-
### Errors
|
|
209
|
-
|
|
210
|
-
| Error Type | Status Code | Content Type |
|
|
211
|
-
| ----------------- | ----------------- | ----------------- |
|
|
212
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
213
|
-
|
|
214
|
-
## index
|
|
215
|
-
|
|
216
|
-
Adds an employee or updates information about an employee
|
|
217
|
-
|
|
218
|
-
### Example Usage
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
import { Glean } from "@gleanwork/api-client";
|
|
222
|
-
|
|
223
|
-
const glean = new Glean({
|
|
224
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
async function run() {
|
|
228
|
-
await glean.indexing.people.index({
|
|
229
|
-
employee: {
|
|
230
|
-
email: "Santos.Turcotte@yahoo.com",
|
|
231
|
-
department: "<value>",
|
|
232
|
-
datasourceProfiles: [
|
|
233
|
-
{
|
|
234
|
-
datasource: "github",
|
|
235
|
-
handle: "<value>",
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
datasource: "github",
|
|
239
|
-
handle: "<value>",
|
|
240
|
-
},
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
run();
|
|
249
|
-
```
|
|
250
|
-
|
|
251
|
-
### Standalone function
|
|
252
|
-
|
|
253
|
-
The standalone function version of this method:
|
|
254
|
-
|
|
255
|
-
```typescript
|
|
256
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
257
|
-
import { indexingPeopleIndex } from "@gleanwork/api-client/funcs/indexingPeopleIndex.js";
|
|
258
|
-
|
|
259
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
260
|
-
// You can create one instance of it to use across an application.
|
|
261
|
-
const glean = new GleanCore({
|
|
262
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
async function run() {
|
|
266
|
-
const res = await indexingPeopleIndex(glean, {
|
|
267
|
-
employee: {
|
|
268
|
-
email: "Santos.Turcotte@yahoo.com",
|
|
269
|
-
department: "<value>",
|
|
270
|
-
datasourceProfiles: [
|
|
271
|
-
{
|
|
272
|
-
datasource: "github",
|
|
273
|
-
handle: "<value>",
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
datasource: "github",
|
|
277
|
-
handle: "<value>",
|
|
278
|
-
},
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
if (!res.ok) {
|
|
284
|
-
throw res.error;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
const { value: result } = res;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
run();
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### React hooks and utilities
|
|
296
|
-
|
|
297
|
-
This method can be used in React components through the following hooks and
|
|
298
|
-
associated utilities.
|
|
299
|
-
|
|
300
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
301
|
-
> below and how to get started using React hooks.
|
|
302
|
-
|
|
303
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
304
|
-
|
|
305
|
-
```tsx
|
|
306
|
-
import {
|
|
307
|
-
// Mutation hook for triggering the API call.
|
|
308
|
-
useIndexingPeopleIndexMutation
|
|
309
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleIndex.js";
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### Parameters
|
|
313
|
-
|
|
314
|
-
| Parameter | Type | Required | Description |
|
|
315
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
316
|
-
| `request` | [components.IndexEmployeeRequest](../../models/components/indexemployeerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
317
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
318
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
319
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
320
|
-
|
|
321
|
-
### Response
|
|
322
|
-
|
|
323
|
-
**Promise\<void\>**
|
|
324
|
-
|
|
325
|
-
### Errors
|
|
326
|
-
|
|
327
|
-
| Error Type | Status Code | Content Type |
|
|
328
|
-
| ----------------- | ----------------- | ----------------- |
|
|
329
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
330
|
-
|
|
331
|
-
## ~~bulkIndex~~
|
|
332
|
-
|
|
333
|
-
Bulk upload details of all the employees. This deletes all employees uploaded in the prior batch. SOON TO BE DEPRECATED in favor of /bulkindexemployees.
|
|
334
|
-
|
|
335
|
-
> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
336
|
-
|
|
337
|
-
### Example Usage
|
|
338
|
-
|
|
339
|
-
```typescript
|
|
340
|
-
import { Glean } from "@gleanwork/api-client";
|
|
341
|
-
|
|
342
|
-
const glean = new Glean({
|
|
343
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
async function run() {
|
|
347
|
-
await glean.indexing.people.bulkIndex({
|
|
348
|
-
employees: [
|
|
349
|
-
{
|
|
350
|
-
employee: {
|
|
351
|
-
email: "Kiera_Bashirian18@yahoo.com",
|
|
352
|
-
department: "<value>",
|
|
353
|
-
datasourceProfiles: [
|
|
354
|
-
{
|
|
355
|
-
datasource: "github",
|
|
356
|
-
handle: "<value>",
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
datasource: "github",
|
|
360
|
-
handle: "<value>",
|
|
361
|
-
},
|
|
362
|
-
],
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
employee: {
|
|
367
|
-
email: "Madie_Hayes48@gmail.com",
|
|
368
|
-
department: "<value>",
|
|
369
|
-
datasourceProfiles: [
|
|
370
|
-
{
|
|
371
|
-
datasource: "github",
|
|
372
|
-
handle: "<value>",
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
datasource: "github",
|
|
376
|
-
handle: "<value>",
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
datasource: "github",
|
|
380
|
-
handle: "<value>",
|
|
381
|
-
},
|
|
382
|
-
],
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
],
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
run();
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
### Standalone function
|
|
395
|
-
|
|
396
|
-
The standalone function version of this method:
|
|
397
|
-
|
|
398
|
-
```typescript
|
|
399
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
400
|
-
import { indexingPeopleBulkIndex } from "@gleanwork/api-client/funcs/indexingPeopleBulkIndex.js";
|
|
401
|
-
|
|
402
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
403
|
-
// You can create one instance of it to use across an application.
|
|
404
|
-
const glean = new GleanCore({
|
|
405
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
async function run() {
|
|
409
|
-
const res = await indexingPeopleBulkIndex(glean, {
|
|
410
|
-
employees: [
|
|
411
|
-
{
|
|
412
|
-
employee: {
|
|
413
|
-
email: "Kiera_Bashirian18@yahoo.com",
|
|
414
|
-
department: "<value>",
|
|
415
|
-
datasourceProfiles: [
|
|
416
|
-
{
|
|
417
|
-
datasource: "github",
|
|
418
|
-
handle: "<value>",
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
datasource: "github",
|
|
422
|
-
handle: "<value>",
|
|
423
|
-
},
|
|
424
|
-
],
|
|
425
|
-
},
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
employee: {
|
|
429
|
-
email: "Madie_Hayes48@gmail.com",
|
|
430
|
-
department: "<value>",
|
|
431
|
-
datasourceProfiles: [
|
|
432
|
-
{
|
|
433
|
-
datasource: "github",
|
|
434
|
-
handle: "<value>",
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
datasource: "github",
|
|
438
|
-
handle: "<value>",
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
datasource: "github",
|
|
442
|
-
handle: "<value>",
|
|
443
|
-
},
|
|
444
|
-
],
|
|
445
|
-
},
|
|
446
|
-
},
|
|
447
|
-
],
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
if (!res.ok) {
|
|
451
|
-
throw res.error;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
const { value: result } = res;
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
run();
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
### React hooks and utilities
|
|
463
|
-
|
|
464
|
-
This method can be used in React components through the following hooks and
|
|
465
|
-
associated utilities.
|
|
466
|
-
|
|
467
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
468
|
-
> below and how to get started using React hooks.
|
|
469
|
-
|
|
470
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
471
|
-
|
|
472
|
-
```tsx
|
|
473
|
-
import {
|
|
474
|
-
// Mutation hook for triggering the API call.
|
|
475
|
-
useIndexingPeopleBulkIndexMutation
|
|
476
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleBulkIndex.js";
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
### Parameters
|
|
480
|
-
|
|
481
|
-
| Parameter | Type | Required | Description |
|
|
482
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
483
|
-
| `request` | [components.IndexEmployeeListRequest](../../models/components/indexemployeelistrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
484
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
485
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
486
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
487
|
-
|
|
488
|
-
### Response
|
|
489
|
-
|
|
490
|
-
**Promise\<void\>**
|
|
491
|
-
|
|
492
|
-
### Errors
|
|
493
|
-
|
|
494
|
-
| Error Type | Status Code | Content Type |
|
|
495
|
-
| ----------------- | ----------------- | ----------------- |
|
|
496
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
497
|
-
|
|
498
|
-
## processAllEmployeesAndTeams
|
|
499
|
-
|
|
500
|
-
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.
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
### Example Usage
|
|
504
|
-
|
|
505
|
-
```typescript
|
|
506
|
-
import { Glean } from "@gleanwork/api-client";
|
|
507
|
-
|
|
508
|
-
const glean = new Glean({
|
|
509
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
async function run() {
|
|
513
|
-
await glean.indexing.people.processAllEmployeesAndTeams();
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
run();
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### Standalone function
|
|
522
|
-
|
|
523
|
-
The standalone function version of this method:
|
|
524
|
-
|
|
525
|
-
```typescript
|
|
526
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
527
|
-
import { indexingPeopleProcessAllEmployeesAndTeams } from "@gleanwork/api-client/funcs/indexingPeopleProcessAllEmployeesAndTeams.js";
|
|
528
|
-
|
|
529
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
530
|
-
// You can create one instance of it to use across an application.
|
|
531
|
-
const glean = new GleanCore({
|
|
532
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
533
|
-
});
|
|
534
|
-
|
|
535
|
-
async function run() {
|
|
536
|
-
const res = await indexingPeopleProcessAllEmployeesAndTeams(glean);
|
|
537
|
-
|
|
538
|
-
if (!res.ok) {
|
|
539
|
-
throw res.error;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
const { value: result } = res;
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
run();
|
|
548
|
-
```
|
|
549
|
-
|
|
550
|
-
### React hooks and utilities
|
|
551
|
-
|
|
552
|
-
This method can be used in React components through the following hooks and
|
|
553
|
-
associated utilities.
|
|
554
|
-
|
|
555
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
556
|
-
> below and how to get started using React hooks.
|
|
557
|
-
|
|
558
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
559
|
-
|
|
560
|
-
```tsx
|
|
561
|
-
import {
|
|
562
|
-
// Mutation hook for triggering the API call.
|
|
563
|
-
useIndexingPeopleProcessAllEmployeesAndTeamsMutation
|
|
564
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleProcessAllEmployeesAndTeams.js";
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
### Parameters
|
|
568
|
-
|
|
569
|
-
| Parameter | Type | Required | Description |
|
|
570
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
571
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
572
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
573
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
574
|
-
|
|
575
|
-
### Response
|
|
576
|
-
|
|
577
|
-
**Promise\<void\>**
|
|
578
|
-
|
|
579
|
-
### Errors
|
|
580
|
-
|
|
581
|
-
| Error Type | Status Code | Content Type |
|
|
582
|
-
| ----------------- | ----------------- | ----------------- |
|
|
583
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
584
|
-
|
|
585
|
-
## delete
|
|
586
|
-
|
|
587
|
-
Delete an employee. Silently succeeds if employee is not present.
|
|
588
|
-
|
|
589
|
-
### Example Usage
|
|
590
|
-
|
|
591
|
-
```typescript
|
|
592
|
-
import { Glean } from "@gleanwork/api-client";
|
|
593
|
-
|
|
594
|
-
const glean = new Glean({
|
|
595
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
async function run() {
|
|
599
|
-
await glean.indexing.people.delete({
|
|
600
|
-
employeeEmail: "<value>",
|
|
601
|
-
});
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
run();
|
|
607
|
-
```
|
|
608
|
-
|
|
609
|
-
### Standalone function
|
|
610
|
-
|
|
611
|
-
The standalone function version of this method:
|
|
612
|
-
|
|
613
|
-
```typescript
|
|
614
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
615
|
-
import { indexingPeopleDelete } from "@gleanwork/api-client/funcs/indexingPeopleDelete.js";
|
|
616
|
-
|
|
617
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
618
|
-
// You can create one instance of it to use across an application.
|
|
619
|
-
const glean = new GleanCore({
|
|
620
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
621
|
-
});
|
|
622
|
-
|
|
623
|
-
async function run() {
|
|
624
|
-
const res = await indexingPeopleDelete(glean, {
|
|
625
|
-
employeeEmail: "<value>",
|
|
626
|
-
});
|
|
627
|
-
|
|
628
|
-
if (!res.ok) {
|
|
629
|
-
throw res.error;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
const { value: result } = res;
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
run();
|
|
638
|
-
```
|
|
639
|
-
|
|
640
|
-
### React hooks and utilities
|
|
641
|
-
|
|
642
|
-
This method can be used in React components through the following hooks and
|
|
643
|
-
associated utilities.
|
|
644
|
-
|
|
645
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
646
|
-
> below and how to get started using React hooks.
|
|
647
|
-
|
|
648
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
649
|
-
|
|
650
|
-
```tsx
|
|
651
|
-
import {
|
|
652
|
-
// Mutation hook for triggering the API call.
|
|
653
|
-
useIndexingPeopleDeleteMutation
|
|
654
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleDelete.js";
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
### Parameters
|
|
658
|
-
|
|
659
|
-
| Parameter | Type | Required | Description |
|
|
660
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
661
|
-
| `request` | [components.DeleteEmployeeRequest](../../models/components/deleteemployeerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
662
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
663
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
664
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
665
|
-
|
|
666
|
-
### Response
|
|
667
|
-
|
|
668
|
-
**Promise\<void\>**
|
|
669
|
-
|
|
670
|
-
### Errors
|
|
671
|
-
|
|
672
|
-
| Error Type | Status Code | Content Type |
|
|
673
|
-
| ----------------- | ----------------- | ----------------- |
|
|
674
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
675
|
-
|
|
676
|
-
## indexTeam
|
|
677
|
-
|
|
678
|
-
Adds a team or updates information about a team
|
|
679
|
-
|
|
680
|
-
### Example Usage
|
|
681
|
-
|
|
682
|
-
```typescript
|
|
683
|
-
import { Glean } from "@gleanwork/api-client";
|
|
684
|
-
|
|
685
|
-
const glean = new Glean({
|
|
686
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
687
|
-
});
|
|
688
|
-
|
|
689
|
-
async function run() {
|
|
690
|
-
await glean.indexing.people.indexTeam({
|
|
691
|
-
team: {
|
|
692
|
-
id: "<id>",
|
|
693
|
-
name: "<value>",
|
|
694
|
-
datasourceProfiles: [
|
|
695
|
-
{
|
|
696
|
-
datasource: "github",
|
|
697
|
-
handle: "<value>",
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
datasource: "github",
|
|
701
|
-
handle: "<value>",
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
datasource: "github",
|
|
705
|
-
handle: "<value>",
|
|
706
|
-
},
|
|
707
|
-
],
|
|
708
|
-
members: [
|
|
709
|
-
{
|
|
710
|
-
email: "Rachelle20@yahoo.com",
|
|
711
|
-
},
|
|
712
|
-
{
|
|
713
|
-
email: "Rebeka.Gerhold@hotmail.com",
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
email: "Jace86@yahoo.com",
|
|
717
|
-
},
|
|
718
|
-
],
|
|
719
|
-
},
|
|
720
|
-
});
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
run();
|
|
726
|
-
```
|
|
727
|
-
|
|
728
|
-
### Standalone function
|
|
729
|
-
|
|
730
|
-
The standalone function version of this method:
|
|
731
|
-
|
|
732
|
-
```typescript
|
|
733
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
734
|
-
import { indexingPeopleIndexTeam } from "@gleanwork/api-client/funcs/indexingPeopleIndexTeam.js";
|
|
735
|
-
|
|
736
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
737
|
-
// You can create one instance of it to use across an application.
|
|
738
|
-
const glean = new GleanCore({
|
|
739
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
740
|
-
});
|
|
741
|
-
|
|
742
|
-
async function run() {
|
|
743
|
-
const res = await indexingPeopleIndexTeam(glean, {
|
|
744
|
-
team: {
|
|
745
|
-
id: "<id>",
|
|
746
|
-
name: "<value>",
|
|
747
|
-
datasourceProfiles: [
|
|
748
|
-
{
|
|
749
|
-
datasource: "github",
|
|
750
|
-
handle: "<value>",
|
|
751
|
-
},
|
|
752
|
-
{
|
|
753
|
-
datasource: "github",
|
|
754
|
-
handle: "<value>",
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
datasource: "github",
|
|
758
|
-
handle: "<value>",
|
|
759
|
-
},
|
|
760
|
-
],
|
|
761
|
-
members: [
|
|
762
|
-
{
|
|
763
|
-
email: "Rachelle20@yahoo.com",
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
email: "Rebeka.Gerhold@hotmail.com",
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
email: "Jace86@yahoo.com",
|
|
770
|
-
},
|
|
771
|
-
],
|
|
772
|
-
},
|
|
773
|
-
});
|
|
774
|
-
|
|
775
|
-
if (!res.ok) {
|
|
776
|
-
throw res.error;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
const { value: result } = res;
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
run();
|
|
785
|
-
```
|
|
786
|
-
|
|
787
|
-
### React hooks and utilities
|
|
788
|
-
|
|
789
|
-
This method can be used in React components through the following hooks and
|
|
790
|
-
associated utilities.
|
|
791
|
-
|
|
792
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
793
|
-
> below and how to get started using React hooks.
|
|
794
|
-
|
|
795
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
796
|
-
|
|
797
|
-
```tsx
|
|
798
|
-
import {
|
|
799
|
-
// Mutation hook for triggering the API call.
|
|
800
|
-
useIndexingPeopleIndexTeamMutation
|
|
801
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleIndexTeam.js";
|
|
802
|
-
```
|
|
803
|
-
|
|
804
|
-
### Parameters
|
|
805
|
-
|
|
806
|
-
| Parameter | Type | Required | Description |
|
|
807
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
808
|
-
| `request` | [components.IndexTeamRequest](../../models/components/indexteamrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
809
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
810
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
811
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
812
|
-
|
|
813
|
-
### Response
|
|
814
|
-
|
|
815
|
-
**Promise\<void\>**
|
|
816
|
-
|
|
817
|
-
### Errors
|
|
818
|
-
|
|
819
|
-
| Error Type | Status Code | Content Type |
|
|
820
|
-
| ----------------- | ----------------- | ----------------- |
|
|
821
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
822
|
-
|
|
823
|
-
## deleteTeam
|
|
824
|
-
|
|
825
|
-
Delete a team based on provided id.
|
|
826
|
-
|
|
827
|
-
### Example Usage
|
|
828
|
-
|
|
829
|
-
```typescript
|
|
830
|
-
import { Glean } from "@gleanwork/api-client";
|
|
831
|
-
|
|
832
|
-
const glean = new Glean({
|
|
833
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
834
|
-
});
|
|
835
|
-
|
|
836
|
-
async function run() {
|
|
837
|
-
await glean.indexing.people.deleteTeam({
|
|
838
|
-
id: "<id>",
|
|
839
|
-
});
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
run();
|
|
845
|
-
```
|
|
846
|
-
|
|
847
|
-
### Standalone function
|
|
848
|
-
|
|
849
|
-
The standalone function version of this method:
|
|
850
|
-
|
|
851
|
-
```typescript
|
|
852
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
853
|
-
import { indexingPeopleDeleteTeam } from "@gleanwork/api-client/funcs/indexingPeopleDeleteTeam.js";
|
|
854
|
-
|
|
855
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
856
|
-
// You can create one instance of it to use across an application.
|
|
857
|
-
const glean = new GleanCore({
|
|
858
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
859
|
-
});
|
|
860
|
-
|
|
861
|
-
async function run() {
|
|
862
|
-
const res = await indexingPeopleDeleteTeam(glean, {
|
|
863
|
-
id: "<id>",
|
|
864
|
-
});
|
|
865
|
-
|
|
866
|
-
if (!res.ok) {
|
|
867
|
-
throw res.error;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
const { value: result } = res;
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
run();
|
|
876
|
-
```
|
|
877
|
-
|
|
878
|
-
### React hooks and utilities
|
|
879
|
-
|
|
880
|
-
This method can be used in React components through the following hooks and
|
|
881
|
-
associated utilities.
|
|
882
|
-
|
|
883
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
884
|
-
> below and how to get started using React hooks.
|
|
885
|
-
|
|
886
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
887
|
-
|
|
888
|
-
```tsx
|
|
889
|
-
import {
|
|
890
|
-
// Mutation hook for triggering the API call.
|
|
891
|
-
useIndexingPeopleDeleteTeamMutation
|
|
892
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleDeleteTeam.js";
|
|
893
|
-
```
|
|
894
|
-
|
|
895
|
-
### Parameters
|
|
896
|
-
|
|
897
|
-
| Parameter | Type | Required | Description |
|
|
898
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
899
|
-
| `request` | [components.DeleteTeamRequest](../../models/components/deleteteamrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
900
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
901
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
902
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
903
|
-
|
|
904
|
-
### Response
|
|
905
|
-
|
|
906
|
-
**Promise\<void\>**
|
|
907
|
-
|
|
908
|
-
### Errors
|
|
909
|
-
|
|
910
|
-
| Error Type | Status Code | Content Type |
|
|
911
|
-
| ----------------- | ----------------- | ----------------- |
|
|
912
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
913
|
-
|
|
914
|
-
## bulkIndexTeams
|
|
915
|
-
|
|
916
|
-
Replaces all the currently indexed teams using paginated batch API calls. Please refer to the [bulk indexing](https://developers.glean.com/docs/indexing_api_bulk_indexing/#bulk-upload-model) documentation for an explanation of how to use bulk endpoints.
|
|
917
|
-
|
|
918
|
-
### Example Usage
|
|
919
|
-
|
|
920
|
-
```typescript
|
|
921
|
-
import { Glean } from "@gleanwork/api-client";
|
|
922
|
-
|
|
923
|
-
const glean = new Glean({
|
|
924
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
925
|
-
});
|
|
926
|
-
|
|
927
|
-
async function run() {
|
|
928
|
-
await glean.indexing.people.bulkIndexTeams({
|
|
929
|
-
uploadId: "<id>",
|
|
930
|
-
teams: [],
|
|
931
|
-
});
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
run();
|
|
937
|
-
```
|
|
938
|
-
|
|
939
|
-
### Standalone function
|
|
940
|
-
|
|
941
|
-
The standalone function version of this method:
|
|
942
|
-
|
|
943
|
-
```typescript
|
|
944
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
945
|
-
import { indexingPeopleBulkIndexTeams } from "@gleanwork/api-client/funcs/indexingPeopleBulkIndexTeams.js";
|
|
946
|
-
|
|
947
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
948
|
-
// You can create one instance of it to use across an application.
|
|
949
|
-
const glean = new GleanCore({
|
|
950
|
-
bearerAuth: process.env["GLEAN_BEARER_AUTH"] ?? "",
|
|
951
|
-
});
|
|
952
|
-
|
|
953
|
-
async function run() {
|
|
954
|
-
const res = await indexingPeopleBulkIndexTeams(glean, {
|
|
955
|
-
uploadId: "<id>",
|
|
956
|
-
teams: [],
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
if (!res.ok) {
|
|
960
|
-
throw res.error;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
const { value: result } = res;
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
run();
|
|
969
|
-
```
|
|
970
|
-
|
|
971
|
-
### React hooks and utilities
|
|
972
|
-
|
|
973
|
-
This method can be used in React components through the following hooks and
|
|
974
|
-
associated utilities.
|
|
975
|
-
|
|
976
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
977
|
-
> below and how to get started using React hooks.
|
|
978
|
-
|
|
979
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
980
|
-
|
|
981
|
-
```tsx
|
|
982
|
-
import {
|
|
983
|
-
// Mutation hook for triggering the API call.
|
|
984
|
-
useIndexingPeopleBulkIndexTeamsMutation
|
|
985
|
-
} from "@gleanwork/api-client/react-query/indexingPeopleBulkIndexTeams.js";
|
|
986
|
-
```
|
|
987
|
-
|
|
988
|
-
### Parameters
|
|
989
|
-
|
|
990
|
-
| Parameter | Type | Required | Description |
|
|
991
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
992
|
-
| `request` | [components.BulkIndexTeamsRequest](../../models/components/bulkindexteamsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
993
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
994
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
995
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
996
|
-
|
|
997
|
-
### Response
|
|
998
|
-
|
|
999
|
-
**Promise\<void\>**
|
|
1000
|
-
|
|
1001
|
-
### Errors
|
|
1002
|
-
|
|
1003
|
-
| Error Type | Status Code | Content Type |
|
|
1004
|
-
| ----------------- | ----------------- | ----------------- |
|
|
1005
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|