@gleanwork/api-client 0.13.1 → 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 (76) 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 +4 -3
  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/agentsinsightsv2response.d.ts +4 -0
  9. package/dist/commonjs/models/components/agentsinsightsv2response.d.ts.map +1 -1
  10. package/dist/commonjs/models/components/agentsinsightsv2response.js +4 -0
  11. package/dist/commonjs/models/components/agentsinsightsv2response.js.map +1 -1
  12. package/dist/commonjs/models/components/chatmessagefragment.d.ts +1 -1
  13. package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts +3 -1
  14. package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/debugdatasourcestatusresponse.js.map +1 -1
  16. package/dist/commonjs/models/components/peragentinsight.d.ts +10 -0
  17. package/dist/commonjs/models/components/peragentinsight.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/peragentinsight.js +4 -0
  19. package/dist/commonjs/models/components/peragentinsight.js.map +1 -1
  20. package/dist/esm/__tests__/messages.test.js +1 -1
  21. package/dist/esm/__tests__/messages.test.js.map +1 -1
  22. package/dist/esm/__tests__/summarize.test.js +4 -3
  23. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  24. package/dist/esm/lib/config.d.ts +3 -3
  25. package/dist/esm/lib/config.js +3 -3
  26. package/dist/esm/models/components/agentsinsightsv2response.d.ts +4 -0
  27. package/dist/esm/models/components/agentsinsightsv2response.d.ts.map +1 -1
  28. package/dist/esm/models/components/agentsinsightsv2response.js +4 -0
  29. package/dist/esm/models/components/agentsinsightsv2response.js.map +1 -1
  30. package/dist/esm/models/components/chatmessagefragment.d.ts +1 -1
  31. package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts +3 -1
  32. package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
  33. package/dist/esm/models/components/debugdatasourcestatusresponse.js.map +1 -1
  34. package/dist/esm/models/components/peragentinsight.d.ts +10 -0
  35. package/dist/esm/models/components/peragentinsight.d.ts.map +1 -1
  36. package/dist/esm/models/components/peragentinsight.js +4 -0
  37. package/dist/esm/models/components/peragentinsight.js.map +1 -1
  38. package/examples/package-lock.json +1 -1
  39. package/jsr.json +1 -1
  40. package/package.json +1 -1
  41. package/src/__tests__/messages.test.ts +1 -1
  42. package/src/__tests__/summarize.test.ts +4 -3
  43. package/src/lib/config.ts +3 -3
  44. package/src/models/components/agentsinsightsv2response.ts +8 -0
  45. package/src/models/components/chatmessagefragment.ts +1 -1
  46. package/src/models/components/debugdatasourcestatusresponse.ts +3 -1
  47. package/src/models/components/peragentinsight.ts +14 -0
  48. package/.devcontainer/README.md +0 -35
  49. package/docs/sdks/activity/README.md +0 -242
  50. package/docs/sdks/agents/README.md +0 -498
  51. package/docs/sdks/announcements/README.md +0 -137560
  52. package/docs/sdks/answers/README.md +0 -4966
  53. package/docs/sdks/chat/README.md +0 -967
  54. package/docs/sdks/clientauthentication/README.md +0 -98
  55. package/docs/sdks/clientdocuments/README.md +0 -457
  56. package/docs/sdks/clientshortcuts/README.md +0 -9340
  57. package/docs/sdks/collections/README.md +0 -4148
  58. package/docs/sdks/datasource/README.md +0 -98
  59. package/docs/sdks/datasources/README.md +0 -211
  60. package/docs/sdks/entities/README.md +0 -225
  61. package/docs/sdks/indexingauthentication/README.md +0 -93
  62. package/docs/sdks/indexingdocuments/README.md +0 -983
  63. package/docs/sdks/indexingshortcuts/README.md +0 -251
  64. package/docs/sdks/insights/README.md +0 -94
  65. package/docs/sdks/messages/README.md +0 -102
  66. package/docs/sdks/people/README.md +0 -1052
  67. package/docs/sdks/permissions/README.md +0 -1198
  68. package/docs/sdks/pins/README.md +0 -506
  69. package/docs/sdks/policies/README.md +0 -478
  70. package/docs/sdks/reports/README.md +0 -290
  71. package/docs/sdks/search/README.md +0 -986
  72. package/docs/sdks/tools/README.md +0 -208
  73. package/docs/sdks/verification/README.md +0 -276
  74. package/docs/sdks/visibilityoverrides/README.md +0 -192
  75. package/examples/README.md +0 -31
  76. package/src/__tests__/mockserver/README.md +0 -52
@@ -1,208 +0,0 @@
1
- # Tools
2
- (*client.tools*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List available tools
9
- * [run](#run) - Execute the specified tool
10
-
11
- ## list
12
-
13
- Returns a filtered set of available tools based on optional tool name parameters. If no filters are provided, all available tools are returned.
14
-
15
- ### Example Usage
16
-
17
- <!-- UsageSnippet language="typescript" operationID="get_/rest/api/v1/tools/list" method="get" path="/rest/api/v1/tools/list" -->
18
- ```typescript
19
- import { Glean } from "@gleanwork/api-client";
20
-
21
- const glean = new Glean({
22
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
23
- });
24
-
25
- async function run() {
26
- const result = await glean.client.tools.list();
27
-
28
- console.log(result);
29
- }
30
-
31
- run();
32
- ```
33
-
34
- ### Standalone function
35
-
36
- The standalone function version of this method:
37
-
38
- ```typescript
39
- import { GleanCore } from "@gleanwork/api-client/core.js";
40
- import { clientToolsList } from "@gleanwork/api-client/funcs/clientToolsList.js";
41
-
42
- // Use `GleanCore` for best tree-shaking performance.
43
- // You can create one instance of it to use across an application.
44
- const glean = new GleanCore({
45
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
46
- });
47
-
48
- async function run() {
49
- const res = await clientToolsList(glean);
50
- if (res.ok) {
51
- const { value: result } = res;
52
- console.log(result);
53
- } else {
54
- console.log("clientToolsList failed:", res.error);
55
- }
56
- }
57
-
58
- run();
59
- ```
60
-
61
- ### React hooks and utilities
62
-
63
- This method can be used in React components through the following hooks and
64
- associated utilities.
65
-
66
- > Check out [this guide][hook-guide] for information about each of the utilities
67
- > below and how to get started using React hooks.
68
-
69
- [hook-guide]: ../../../REACT_QUERY.md
70
-
71
- ```tsx
72
- import {
73
- // Query hooks for fetching data.
74
- useClientToolsList,
75
- useClientToolsListSuspense,
76
-
77
- // Utility for prefetching data during server-side rendering and in React
78
- // Server Components that will be immediately available to client components
79
- // using the hooks.
80
- prefetchClientToolsList,
81
-
82
- // Utilities to invalidate the query cache for this query in response to
83
- // mutations and other user actions.
84
- invalidateClientToolsList,
85
- invalidateAllClientToolsList,
86
- } from "@gleanwork/api-client/react-query/clientToolsList.js";
87
- ```
88
-
89
- ### Parameters
90
-
91
- | Parameter | Type | Required | Description |
92
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
93
- | `toolNames` | *string*[] | :heavy_minus_sign: | Optional array of tool names to filter by |
94
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
95
- | `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. |
96
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
97
-
98
- ### Response
99
-
100
- **Promise\<[components.ToolsListResponse](../../models/components/toolslistresponse.md)\>**
101
-
102
- ### Errors
103
-
104
- | Error Type | Status Code | Content Type |
105
- | ----------------- | ----------------- | ----------------- |
106
- | errors.GleanError | 4XX, 5XX | \*/\* |
107
-
108
- ## run
109
-
110
- Execute the specified tool with provided parameters
111
-
112
- ### Example Usage
113
-
114
- <!-- UsageSnippet language="typescript" operationID="post_/rest/api/v1/tools/call" method="post" path="/rest/api/v1/tools/call" -->
115
- ```typescript
116
- import { Glean } from "@gleanwork/api-client";
117
-
118
- const glean = new Glean({
119
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
120
- });
121
-
122
- async function run() {
123
- const result = await glean.client.tools.run({
124
- name: "<value>",
125
- parameters: {
126
- "key": {
127
- name: "<value>",
128
- value: "<value>",
129
- },
130
- },
131
- });
132
-
133
- console.log(result);
134
- }
135
-
136
- run();
137
- ```
138
-
139
- ### Standalone function
140
-
141
- The standalone function version of this method:
142
-
143
- ```typescript
144
- import { GleanCore } from "@gleanwork/api-client/core.js";
145
- import { clientToolsRun } from "@gleanwork/api-client/funcs/clientToolsRun.js";
146
-
147
- // Use `GleanCore` for best tree-shaking performance.
148
- // You can create one instance of it to use across an application.
149
- const glean = new GleanCore({
150
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
151
- });
152
-
153
- async function run() {
154
- const res = await clientToolsRun(glean, {
155
- name: "<value>",
156
- parameters: {
157
- "key": {
158
- name: "<value>",
159
- value: "<value>",
160
- },
161
- },
162
- });
163
- if (res.ok) {
164
- const { value: result } = res;
165
- console.log(result);
166
- } else {
167
- console.log("clientToolsRun failed:", res.error);
168
- }
169
- }
170
-
171
- run();
172
- ```
173
-
174
- ### React hooks and utilities
175
-
176
- This method can be used in React components through the following hooks and
177
- associated utilities.
178
-
179
- > Check out [this guide][hook-guide] for information about each of the utilities
180
- > below and how to get started using React hooks.
181
-
182
- [hook-guide]: ../../../REACT_QUERY.md
183
-
184
- ```tsx
185
- import {
186
- // Mutation hook for triggering the API call.
187
- useClientToolsRunMutation
188
- } from "@gleanwork/api-client/react-query/clientToolsRun.js";
189
- ```
190
-
191
- ### Parameters
192
-
193
- | Parameter | Type | Required | Description |
194
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
195
- | `request` | [components.ToolsCallRequest](../../models/components/toolscallrequest.md) | :heavy_check_mark: | The request object to use for the request. |
196
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
197
- | `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. |
198
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
199
-
200
- ### Response
201
-
202
- **Promise\<[components.ToolsCallResponse](../../models/components/toolscallresponse.md)\>**
203
-
204
- ### Errors
205
-
206
- | Error Type | Status Code | Content Type |
207
- | ----------------- | ----------------- | ----------------- |
208
- | errors.GleanError | 4XX, 5XX | \*/\* |
@@ -1,276 +0,0 @@
1
- # Verification
2
- (*client.verification*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [addReminder](#addreminder) - Create verification
9
- * [list](#list) - List verifications
10
- * [verify](#verify) - Update verification
11
-
12
- ## addReminder
13
-
14
- Creates a verification reminder for the document. Users can create verification reminders from different product surfaces.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="addverificationreminder" method="post" path="/rest/api/v1/addverificationreminder" -->
19
- ```typescript
20
- import { Glean } from "@gleanwork/api-client";
21
-
22
- const glean = new Glean({
23
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
24
- });
25
-
26
- async function run() {
27
- const result = await glean.client.verification.addReminder({
28
- documentId: "<id>",
29
- });
30
-
31
- console.log(result);
32
- }
33
-
34
- run();
35
- ```
36
-
37
- ### Standalone function
38
-
39
- The standalone function version of this method:
40
-
41
- ```typescript
42
- import { GleanCore } from "@gleanwork/api-client/core.js";
43
- import { clientVerificationAddReminder } from "@gleanwork/api-client/funcs/clientVerificationAddReminder.js";
44
-
45
- // Use `GleanCore` for best tree-shaking performance.
46
- // You can create one instance of it to use across an application.
47
- const glean = new GleanCore({
48
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
49
- });
50
-
51
- async function run() {
52
- const res = await clientVerificationAddReminder(glean, {
53
- documentId: "<id>",
54
- });
55
- if (res.ok) {
56
- const { value: result } = res;
57
- console.log(result);
58
- } else {
59
- console.log("clientVerificationAddReminder failed:", res.error);
60
- }
61
- }
62
-
63
- run();
64
- ```
65
-
66
- ### React hooks and utilities
67
-
68
- This method can be used in React components through the following hooks and
69
- associated utilities.
70
-
71
- > Check out [this guide][hook-guide] for information about each of the utilities
72
- > below and how to get started using React hooks.
73
-
74
- [hook-guide]: ../../../REACT_QUERY.md
75
-
76
- ```tsx
77
- import {
78
- // Mutation hook for triggering the API call.
79
- useClientVerificationAddReminderMutation
80
- } from "@gleanwork/api-client/react-query/clientVerificationAddReminder.js";
81
- ```
82
-
83
- ### Parameters
84
-
85
- | Parameter | Type | Required | Description |
86
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
87
- | `request` | [components.ReminderRequest](../../models/components/reminderrequest.md) | :heavy_check_mark: | The request object to use for the request. |
88
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
89
- | `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. |
90
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
91
-
92
- ### Response
93
-
94
- **Promise\<[components.Verification](../../models/components/verification.md)\>**
95
-
96
- ### Errors
97
-
98
- | Error Type | Status Code | Content Type |
99
- | ----------------- | ----------------- | ----------------- |
100
- | errors.GleanError | 4XX, 5XX | \*/\* |
101
-
102
- ## list
103
-
104
- Returns the information to be rendered in verification dashboard. Includes information for each document owned by user regarding their verifications.
105
-
106
- ### Example Usage
107
-
108
- <!-- UsageSnippet language="typescript" operationID="listverifications" method="post" path="/rest/api/v1/listverifications" -->
109
- ```typescript
110
- import { Glean } from "@gleanwork/api-client";
111
-
112
- const glean = new Glean({
113
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
114
- });
115
-
116
- async function run() {
117
- const result = await glean.client.verification.list();
118
-
119
- console.log(result);
120
- }
121
-
122
- run();
123
- ```
124
-
125
- ### Standalone function
126
-
127
- The standalone function version of this method:
128
-
129
- ```typescript
130
- import { GleanCore } from "@gleanwork/api-client/core.js";
131
- import { clientVerificationList } from "@gleanwork/api-client/funcs/clientVerificationList.js";
132
-
133
- // Use `GleanCore` for best tree-shaking performance.
134
- // You can create one instance of it to use across an application.
135
- const glean = new GleanCore({
136
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
137
- });
138
-
139
- async function run() {
140
- const res = await clientVerificationList(glean);
141
- if (res.ok) {
142
- const { value: result } = res;
143
- console.log(result);
144
- } else {
145
- console.log("clientVerificationList failed:", res.error);
146
- }
147
- }
148
-
149
- run();
150
- ```
151
-
152
- ### React hooks and utilities
153
-
154
- This method can be used in React components through the following hooks and
155
- associated utilities.
156
-
157
- > Check out [this guide][hook-guide] for information about each of the utilities
158
- > below and how to get started using React hooks.
159
-
160
- [hook-guide]: ../../../REACT_QUERY.md
161
-
162
- ```tsx
163
- import {
164
- // Mutation hook for triggering the API call.
165
- useClientVerificationListMutation
166
- } from "@gleanwork/api-client/react-query/clientVerificationList.js";
167
- ```
168
-
169
- ### Parameters
170
-
171
- | Parameter | Type | Required | Description |
172
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
173
- | `count` | *number* | :heavy_minus_sign: | Maximum number of documents to return |
174
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
175
- | `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. |
176
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
177
-
178
- ### Response
179
-
180
- **Promise\<[components.VerificationFeed](../../models/components/verificationfeed.md)\>**
181
-
182
- ### Errors
183
-
184
- | Error Type | Status Code | Content Type |
185
- | ----------------- | ----------------- | ----------------- |
186
- | errors.GleanError | 4XX, 5XX | \*/\* |
187
-
188
- ## verify
189
-
190
- Verify documents to keep the knowledge up to date within customer corpus.
191
-
192
- ### Example Usage
193
-
194
- <!-- UsageSnippet language="typescript" operationID="verify" method="post" path="/rest/api/v1/verify" -->
195
- ```typescript
196
- import { Glean } from "@gleanwork/api-client";
197
-
198
- const glean = new Glean({
199
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
200
- });
201
-
202
- async function run() {
203
- const result = await glean.client.verification.verify({
204
- documentId: "<id>",
205
- });
206
-
207
- console.log(result);
208
- }
209
-
210
- run();
211
- ```
212
-
213
- ### Standalone function
214
-
215
- The standalone function version of this method:
216
-
217
- ```typescript
218
- import { GleanCore } from "@gleanwork/api-client/core.js";
219
- import { clientVerificationVerify } from "@gleanwork/api-client/funcs/clientVerificationVerify.js";
220
-
221
- // Use `GleanCore` for best tree-shaking performance.
222
- // You can create one instance of it to use across an application.
223
- const glean = new GleanCore({
224
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
225
- });
226
-
227
- async function run() {
228
- const res = await clientVerificationVerify(glean, {
229
- documentId: "<id>",
230
- });
231
- if (res.ok) {
232
- const { value: result } = res;
233
- console.log(result);
234
- } else {
235
- console.log("clientVerificationVerify failed:", res.error);
236
- }
237
- }
238
-
239
- run();
240
- ```
241
-
242
- ### React hooks and utilities
243
-
244
- This method can be used in React components through the following hooks and
245
- associated utilities.
246
-
247
- > Check out [this guide][hook-guide] for information about each of the utilities
248
- > below and how to get started using React hooks.
249
-
250
- [hook-guide]: ../../../REACT_QUERY.md
251
-
252
- ```tsx
253
- import {
254
- // Mutation hook for triggering the API call.
255
- useClientVerificationVerifyMutation
256
- } from "@gleanwork/api-client/react-query/clientVerificationVerify.js";
257
- ```
258
-
259
- ### Parameters
260
-
261
- | Parameter | Type | Required | Description |
262
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
263
- | `request` | [components.VerifyRequest](../../models/components/verifyrequest.md) | :heavy_check_mark: | The request object to use for the request. |
264
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
265
- | `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. |
266
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
267
-
268
- ### Response
269
-
270
- **Promise\<[components.Verification](../../models/components/verification.md)\>**
271
-
272
- ### Errors
273
-
274
- | Error Type | Status Code | Content Type |
275
- | ----------------- | ----------------- | ----------------- |
276
- | errors.GleanError | 4XX, 5XX | \*/\* |