@gleanwork/api-client 0.13.2 → 0.13.3

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.
Files changed (58) hide show
  1. package/README.md +2 -1
  2. package/dist/commonjs/__tests__/messages.test.js +1 -1
  3. package/dist/commonjs/__tests__/messages.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/summarize.test.js +3 -2
  5. package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
  6. package/dist/commonjs/lib/config.d.ts +3 -3
  7. package/dist/commonjs/lib/config.js +3 -3
  8. package/dist/commonjs/models/components/chatmessagefragment.d.ts +1 -1
  9. package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts +3 -1
  10. package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/debugdatasourcestatusresponse.js.map +1 -1
  12. package/dist/esm/__tests__/messages.test.js +1 -1
  13. package/dist/esm/__tests__/messages.test.js.map +1 -1
  14. package/dist/esm/__tests__/summarize.test.js +3 -2
  15. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  16. package/dist/esm/lib/config.d.ts +3 -3
  17. package/dist/esm/lib/config.js +3 -3
  18. package/dist/esm/models/components/chatmessagefragment.d.ts +1 -1
  19. package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts +3 -1
  20. package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
  21. package/dist/esm/models/components/debugdatasourcestatusresponse.js.map +1 -1
  22. package/examples/package-lock.json +1 -1
  23. package/jsr.json +1 -1
  24. package/package.json +1 -1
  25. package/src/__tests__/messages.test.ts +1 -1
  26. package/src/__tests__/summarize.test.ts +3 -2
  27. package/src/lib/config.ts +3 -3
  28. package/src/models/components/chatmessagefragment.ts +1 -1
  29. package/src/models/components/debugdatasourcestatusresponse.ts +3 -1
  30. package/.devcontainer/README.md +0 -35
  31. package/docs/sdks/activity/README.md +0 -242
  32. package/docs/sdks/agents/README.md +0 -498
  33. package/docs/sdks/announcements/README.md +0 -137560
  34. package/docs/sdks/answers/README.md +0 -4966
  35. package/docs/sdks/chat/README.md +0 -967
  36. package/docs/sdks/clientauthentication/README.md +0 -98
  37. package/docs/sdks/clientdocuments/README.md +0 -457
  38. package/docs/sdks/clientshortcuts/README.md +0 -9340
  39. package/docs/sdks/collections/README.md +0 -4148
  40. package/docs/sdks/datasource/README.md +0 -98
  41. package/docs/sdks/datasources/README.md +0 -211
  42. package/docs/sdks/entities/README.md +0 -225
  43. package/docs/sdks/indexingauthentication/README.md +0 -93
  44. package/docs/sdks/indexingdocuments/README.md +0 -983
  45. package/docs/sdks/indexingshortcuts/README.md +0 -251
  46. package/docs/sdks/insights/README.md +0 -94
  47. package/docs/sdks/messages/README.md +0 -102
  48. package/docs/sdks/people/README.md +0 -1052
  49. package/docs/sdks/permissions/README.md +0 -1198
  50. package/docs/sdks/pins/README.md +0 -506
  51. package/docs/sdks/policies/README.md +0 -478
  52. package/docs/sdks/reports/README.md +0 -290
  53. package/docs/sdks/search/README.md +0 -986
  54. package/docs/sdks/tools/README.md +0 -208
  55. package/docs/sdks/verification/README.md +0 -276
  56. package/docs/sdks/visibilityoverrides/README.md +0 -192
  57. package/examples/README.md +0 -31
  58. package/src/__tests__/mockserver/README.md +0 -52
@@ -1,506 +0,0 @@
1
- # Pins
2
- (*client.pins*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [update](#update) - Update pin
9
- * [retrieve](#retrieve) - Read pin
10
- * [list](#list) - List pins
11
- * [create](#create) - Create pin
12
- * [remove](#remove) - Delete pin
13
-
14
- ## update
15
-
16
- Update an existing user-generated pin.
17
-
18
- ### Example Usage
19
-
20
- <!-- UsageSnippet language="typescript" operationID="editpin" method="post" path="/rest/api/v1/editpin" -->
21
- ```typescript
22
- import { Glean } from "@gleanwork/api-client";
23
-
24
- const glean = new Glean({
25
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
26
- });
27
-
28
- async function run() {
29
- const result = await glean.client.pins.update({
30
- audienceFilters: [
31
- {
32
- fieldName: "type",
33
- values: [
34
- {
35
- value: "Spreadsheet",
36
- relationType: "EQUALS",
37
- },
38
- {
39
- value: "Presentation",
40
- relationType: "EQUALS",
41
- },
42
- ],
43
- },
44
- ],
45
- });
46
-
47
- console.log(result);
48
- }
49
-
50
- run();
51
- ```
52
-
53
- ### Standalone function
54
-
55
- The standalone function version of this method:
56
-
57
- ```typescript
58
- import { GleanCore } from "@gleanwork/api-client/core.js";
59
- import { clientPinsUpdate } from "@gleanwork/api-client/funcs/clientPinsUpdate.js";
60
-
61
- // Use `GleanCore` for best tree-shaking performance.
62
- // You can create one instance of it to use across an application.
63
- const glean = new GleanCore({
64
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
65
- });
66
-
67
- async function run() {
68
- const res = await clientPinsUpdate(glean, {
69
- audienceFilters: [
70
- {
71
- fieldName: "type",
72
- values: [
73
- {
74
- value: "Spreadsheet",
75
- relationType: "EQUALS",
76
- },
77
- {
78
- value: "Presentation",
79
- relationType: "EQUALS",
80
- },
81
- ],
82
- },
83
- ],
84
- });
85
- if (res.ok) {
86
- const { value: result } = res;
87
- console.log(result);
88
- } else {
89
- console.log("clientPinsUpdate failed:", res.error);
90
- }
91
- }
92
-
93
- run();
94
- ```
95
-
96
- ### React hooks and utilities
97
-
98
- This method can be used in React components through the following hooks and
99
- associated utilities.
100
-
101
- > Check out [this guide][hook-guide] for information about each of the utilities
102
- > below and how to get started using React hooks.
103
-
104
- [hook-guide]: ../../../REACT_QUERY.md
105
-
106
- ```tsx
107
- import {
108
- // Mutation hook for triggering the API call.
109
- useClientPinsUpdateMutation
110
- } from "@gleanwork/api-client/react-query/clientPinsUpdate.js";
111
- ```
112
-
113
- ### Parameters
114
-
115
- | Parameter | Type | Required | Description |
116
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
117
- | `request` | [components.EditPinRequest](../../models/components/editpinrequest.md) | :heavy_check_mark: | The request object to use for the request. |
118
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
119
- | `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. |
120
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
121
-
122
- ### Response
123
-
124
- **Promise\<[components.PinDocument](../../models/components/pindocument.md)\>**
125
-
126
- ### Errors
127
-
128
- | Error Type | Status Code | Content Type |
129
- | ----------------- | ----------------- | ----------------- |
130
- | errors.GleanError | 4XX, 5XX | \*/\* |
131
-
132
- ## retrieve
133
-
134
- Read pin details given its ID.
135
-
136
- ### Example Usage
137
-
138
- <!-- UsageSnippet language="typescript" operationID="getpin" method="post" path="/rest/api/v1/getpin" -->
139
- ```typescript
140
- import { Glean } from "@gleanwork/api-client";
141
-
142
- const glean = new Glean({
143
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
144
- });
145
-
146
- async function run() {
147
- const result = await glean.client.pins.retrieve({});
148
-
149
- console.log(result);
150
- }
151
-
152
- run();
153
- ```
154
-
155
- ### Standalone function
156
-
157
- The standalone function version of this method:
158
-
159
- ```typescript
160
- import { GleanCore } from "@gleanwork/api-client/core.js";
161
- import { clientPinsRetrieve } from "@gleanwork/api-client/funcs/clientPinsRetrieve.js";
162
-
163
- // Use `GleanCore` for best tree-shaking performance.
164
- // You can create one instance of it to use across an application.
165
- const glean = new GleanCore({
166
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
167
- });
168
-
169
- async function run() {
170
- const res = await clientPinsRetrieve(glean, {});
171
- if (res.ok) {
172
- const { value: result } = res;
173
- console.log(result);
174
- } else {
175
- console.log("clientPinsRetrieve failed:", res.error);
176
- }
177
- }
178
-
179
- run();
180
- ```
181
-
182
- ### React hooks and utilities
183
-
184
- This method can be used in React components through the following hooks and
185
- associated utilities.
186
-
187
- > Check out [this guide][hook-guide] for information about each of the utilities
188
- > below and how to get started using React hooks.
189
-
190
- [hook-guide]: ../../../REACT_QUERY.md
191
-
192
- ```tsx
193
- import {
194
- // Mutation hook for triggering the API call.
195
- useClientPinsRetrieveMutation
196
- } from "@gleanwork/api-client/react-query/clientPinsRetrieve.js";
197
- ```
198
-
199
- ### Parameters
200
-
201
- | Parameter | Type | Required | Description |
202
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
203
- | `request` | [components.GetPinRequest](../../models/components/getpinrequest.md) | :heavy_check_mark: | The request object to use for the request. |
204
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
205
- | `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. |
206
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
207
-
208
- ### Response
209
-
210
- **Promise\<[components.GetPinResponse](../../models/components/getpinresponse.md)\>**
211
-
212
- ### Errors
213
-
214
- | Error Type | Status Code | Content Type |
215
- | ----------------- | ----------------- | ----------------- |
216
- | errors.GleanError | 4XX, 5XX | \*/\* |
217
-
218
- ## list
219
-
220
- Lists all pins.
221
-
222
- ### Example Usage
223
-
224
- <!-- UsageSnippet language="typescript" operationID="listpins" method="post" path="/rest/api/v1/listpins" -->
225
- ```typescript
226
- import { Glean } from "@gleanwork/api-client";
227
-
228
- const glean = new Glean({
229
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
230
- });
231
-
232
- async function run() {
233
- const result = await glean.client.pins.list({});
234
-
235
- console.log(result);
236
- }
237
-
238
- run();
239
- ```
240
-
241
- ### Standalone function
242
-
243
- The standalone function version of this method:
244
-
245
- ```typescript
246
- import { GleanCore } from "@gleanwork/api-client/core.js";
247
- import { clientPinsList } from "@gleanwork/api-client/funcs/clientPinsList.js";
248
-
249
- // Use `GleanCore` for best tree-shaking performance.
250
- // You can create one instance of it to use across an application.
251
- const glean = new GleanCore({
252
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
253
- });
254
-
255
- async function run() {
256
- const res = await clientPinsList(glean, {});
257
- if (res.ok) {
258
- const { value: result } = res;
259
- console.log(result);
260
- } else {
261
- console.log("clientPinsList failed:", res.error);
262
- }
263
- }
264
-
265
- run();
266
- ```
267
-
268
- ### React hooks and utilities
269
-
270
- This method can be used in React components through the following hooks and
271
- associated utilities.
272
-
273
- > Check out [this guide][hook-guide] for information about each of the utilities
274
- > below and how to get started using React hooks.
275
-
276
- [hook-guide]: ../../../REACT_QUERY.md
277
-
278
- ```tsx
279
- import {
280
- // Mutation hook for triggering the API call.
281
- useClientPinsListMutation
282
- } from "@gleanwork/api-client/react-query/clientPinsList.js";
283
- ```
284
-
285
- ### Parameters
286
-
287
- | Parameter | Type | Required | Description |
288
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
289
- | `request` | [operations.ListpinsRequest](../../models/operations/listpinsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
290
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
291
- | `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. |
292
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
293
-
294
- ### Response
295
-
296
- **Promise\<[components.ListPinsResponse](../../models/components/listpinsresponse.md)\>**
297
-
298
- ### Errors
299
-
300
- | Error Type | Status Code | Content Type |
301
- | ----------------- | ----------------- | ----------------- |
302
- | errors.GleanError | 4XX, 5XX | \*/\* |
303
-
304
- ## create
305
-
306
- Pin a document as a result for a given search query.Pin results that are known to be a good match.
307
-
308
- ### Example Usage
309
-
310
- <!-- UsageSnippet language="typescript" operationID="pin" method="post" path="/rest/api/v1/pin" -->
311
- ```typescript
312
- import { Glean } from "@gleanwork/api-client";
313
-
314
- const glean = new Glean({
315
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
316
- });
317
-
318
- async function run() {
319
- const result = await glean.client.pins.create({
320
- audienceFilters: [
321
- {
322
- fieldName: "type",
323
- values: [
324
- {
325
- value: "Spreadsheet",
326
- relationType: "EQUALS",
327
- },
328
- {
329
- value: "Presentation",
330
- relationType: "EQUALS",
331
- },
332
- ],
333
- },
334
- ],
335
- });
336
-
337
- console.log(result);
338
- }
339
-
340
- run();
341
- ```
342
-
343
- ### Standalone function
344
-
345
- The standalone function version of this method:
346
-
347
- ```typescript
348
- import { GleanCore } from "@gleanwork/api-client/core.js";
349
- import { clientPinsCreate } from "@gleanwork/api-client/funcs/clientPinsCreate.js";
350
-
351
- // Use `GleanCore` for best tree-shaking performance.
352
- // You can create one instance of it to use across an application.
353
- const glean = new GleanCore({
354
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
355
- });
356
-
357
- async function run() {
358
- const res = await clientPinsCreate(glean, {
359
- audienceFilters: [
360
- {
361
- fieldName: "type",
362
- values: [
363
- {
364
- value: "Spreadsheet",
365
- relationType: "EQUALS",
366
- },
367
- {
368
- value: "Presentation",
369
- relationType: "EQUALS",
370
- },
371
- ],
372
- },
373
- ],
374
- });
375
- if (res.ok) {
376
- const { value: result } = res;
377
- console.log(result);
378
- } else {
379
- console.log("clientPinsCreate failed:", res.error);
380
- }
381
- }
382
-
383
- run();
384
- ```
385
-
386
- ### React hooks and utilities
387
-
388
- This method can be used in React components through the following hooks and
389
- associated utilities.
390
-
391
- > Check out [this guide][hook-guide] for information about each of the utilities
392
- > below and how to get started using React hooks.
393
-
394
- [hook-guide]: ../../../REACT_QUERY.md
395
-
396
- ```tsx
397
- import {
398
- // Mutation hook for triggering the API call.
399
- useClientPinsCreateMutation
400
- } from "@gleanwork/api-client/react-query/clientPinsCreate.js";
401
- ```
402
-
403
- ### Parameters
404
-
405
- | Parameter | Type | Required | Description |
406
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
407
- | `request` | [components.PinRequest](../../models/components/pinrequest.md) | :heavy_check_mark: | The request object to use for the request. |
408
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
409
- | `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. |
410
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
411
-
412
- ### Response
413
-
414
- **Promise\<[components.PinDocument](../../models/components/pindocument.md)\>**
415
-
416
- ### Errors
417
-
418
- | Error Type | Status Code | Content Type |
419
- | ----------------- | ----------------- | ----------------- |
420
- | errors.GleanError | 4XX, 5XX | \*/\* |
421
-
422
- ## remove
423
-
424
- Unpin a previously pinned result.
425
-
426
- ### Example Usage
427
-
428
- <!-- UsageSnippet language="typescript" operationID="unpin" method="post" path="/rest/api/v1/unpin" -->
429
- ```typescript
430
- import { Glean } from "@gleanwork/api-client";
431
-
432
- const glean = new Glean({
433
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
434
- });
435
-
436
- async function run() {
437
- await glean.client.pins.remove({});
438
-
439
-
440
- }
441
-
442
- run();
443
- ```
444
-
445
- ### Standalone function
446
-
447
- The standalone function version of this method:
448
-
449
- ```typescript
450
- import { GleanCore } from "@gleanwork/api-client/core.js";
451
- import { clientPinsRemove } from "@gleanwork/api-client/funcs/clientPinsRemove.js";
452
-
453
- // Use `GleanCore` for best tree-shaking performance.
454
- // You can create one instance of it to use across an application.
455
- const glean = new GleanCore({
456
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
457
- });
458
-
459
- async function run() {
460
- const res = await clientPinsRemove(glean, {});
461
- if (res.ok) {
462
- const { value: result } = res;
463
-
464
- } else {
465
- console.log("clientPinsRemove failed:", res.error);
466
- }
467
- }
468
-
469
- run();
470
- ```
471
-
472
- ### React hooks and utilities
473
-
474
- This method can be used in React components through the following hooks and
475
- associated utilities.
476
-
477
- > Check out [this guide][hook-guide] for information about each of the utilities
478
- > below and how to get started using React hooks.
479
-
480
- [hook-guide]: ../../../REACT_QUERY.md
481
-
482
- ```tsx
483
- import {
484
- // Mutation hook for triggering the API call.
485
- useClientPinsRemoveMutation
486
- } from "@gleanwork/api-client/react-query/clientPinsRemove.js";
487
- ```
488
-
489
- ### Parameters
490
-
491
- | Parameter | Type | Required | Description |
492
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
493
- | `request` | [components.Unpin](../../models/components/unpin.md) | :heavy_check_mark: | The request object to use for the request. |
494
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
495
- | `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. |
496
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
497
-
498
- ### Response
499
-
500
- **Promise\<void\>**
501
-
502
- ### Errors
503
-
504
- | Error Type | Status Code | Content Type |
505
- | ----------------- | ----------------- | ----------------- |
506
- | errors.GleanError | 4XX, 5XX | \*/\* |