@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,290 +0,0 @@
1
- # Reports
2
- (*client.governance.data.reports*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [create](#create) - Creates new one-time report
9
- * [download](#download) - Downloads violations CSV for report
10
- * [status](#status) - Fetches report run status
11
-
12
- ## create
13
-
14
- Creates a new one-time report and executes its batch job.
15
-
16
- ### Example Usage
17
-
18
- <!-- UsageSnippet language="typescript" operationID="createreport" method="post" path="/rest/api/v1/governance/data/reports" -->
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.governance.data.reports.create({});
28
-
29
- console.log(result);
30
- }
31
-
32
- run();
33
- ```
34
-
35
- ### Standalone function
36
-
37
- The standalone function version of this method:
38
-
39
- ```typescript
40
- import { GleanCore } from "@gleanwork/api-client/core.js";
41
- import { clientGovernanceDataReportsCreate } from "@gleanwork/api-client/funcs/clientGovernanceDataReportsCreate.js";
42
-
43
- // Use `GleanCore` for best tree-shaking performance.
44
- // You can create one instance of it to use across an application.
45
- const glean = new GleanCore({
46
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
47
- });
48
-
49
- async function run() {
50
- const res = await clientGovernanceDataReportsCreate(glean, {});
51
- if (res.ok) {
52
- const { value: result } = res;
53
- console.log(result);
54
- } else {
55
- console.log("clientGovernanceDataReportsCreate failed:", res.error);
56
- }
57
- }
58
-
59
- run();
60
- ```
61
-
62
- ### React hooks and utilities
63
-
64
- This method can be used in React components through the following hooks and
65
- associated utilities.
66
-
67
- > Check out [this guide][hook-guide] for information about each of the utilities
68
- > below and how to get started using React hooks.
69
-
70
- [hook-guide]: ../../../REACT_QUERY.md
71
-
72
- ```tsx
73
- import {
74
- // Mutation hook for triggering the API call.
75
- useClientGovernanceDataReportsCreateMutation
76
- } from "@gleanwork/api-client/react-query/clientGovernanceDataReportsCreate.js";
77
- ```
78
-
79
- ### Parameters
80
-
81
- | Parameter | Type | Required | Description |
82
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
83
- | `request` | [components.UpdateDlpConfigRequest](../../models/components/updatedlpconfigrequest.md) | :heavy_check_mark: | The request object to use for the request. |
84
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
85
- | `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. |
86
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
87
-
88
- ### Response
89
-
90
- **Promise\<[components.UpdateDlpConfigResponse](../../models/components/updatedlpconfigresponse.md)\>**
91
-
92
- ### Errors
93
-
94
- | Error Type | Status Code | Content Type |
95
- | ----------------- | ----------------- | ----------------- |
96
- | errors.GleanError | 4XX, 5XX | \*/\* |
97
-
98
- ## download
99
-
100
- Downloads CSV violations report for a specific report id.
101
-
102
- ### Example Usage
103
-
104
- <!-- UsageSnippet language="typescript" operationID="downloadreportcsv" method="get" path="/rest/api/v1/governance/data/reports/{id}/download" -->
105
- ```typescript
106
- import { Glean } from "@gleanwork/api-client";
107
-
108
- const glean = new Glean({
109
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
110
- });
111
-
112
- async function run() {
113
- const result = await glean.client.governance.data.reports.download("<id>");
114
-
115
- console.log(result);
116
- }
117
-
118
- run();
119
- ```
120
-
121
- ### Standalone function
122
-
123
- The standalone function version of this method:
124
-
125
- ```typescript
126
- import { GleanCore } from "@gleanwork/api-client/core.js";
127
- import { clientGovernanceDataReportsDownload } from "@gleanwork/api-client/funcs/clientGovernanceDataReportsDownload.js";
128
-
129
- // Use `GleanCore` for best tree-shaking performance.
130
- // You can create one instance of it to use across an application.
131
- const glean = new GleanCore({
132
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
133
- });
134
-
135
- async function run() {
136
- const res = await clientGovernanceDataReportsDownload(glean, "<id>");
137
- if (res.ok) {
138
- const { value: result } = res;
139
- console.log(result);
140
- } else {
141
- console.log("clientGovernanceDataReportsDownload failed:", res.error);
142
- }
143
- }
144
-
145
- run();
146
- ```
147
-
148
- ### React hooks and utilities
149
-
150
- This method can be used in React components through the following hooks and
151
- associated utilities.
152
-
153
- > Check out [this guide][hook-guide] for information about each of the utilities
154
- > below and how to get started using React hooks.
155
-
156
- [hook-guide]: ../../../REACT_QUERY.md
157
-
158
- ```tsx
159
- import {
160
- // Query hooks for fetching data.
161
- useClientGovernanceDataReportsDownload,
162
- useClientGovernanceDataReportsDownloadSuspense,
163
-
164
- // Utility for prefetching data during server-side rendering and in React
165
- // Server Components that will be immediately available to client components
166
- // using the hooks.
167
- prefetchClientGovernanceDataReportsDownload,
168
-
169
- // Utilities to invalidate the query cache for this query in response to
170
- // mutations and other user actions.
171
- invalidateClientGovernanceDataReportsDownload,
172
- invalidateAllClientGovernanceDataReportsDownload,
173
- } from "@gleanwork/api-client/react-query/clientGovernanceDataReportsDownload.js";
174
- ```
175
-
176
- ### Parameters
177
-
178
- | Parameter | Type | Required | Description |
179
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
180
- | `id` | *string* | :heavy_check_mark: | The id of the report to download violations for. |
181
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
182
- | `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. |
183
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
184
-
185
- ### Response
186
-
187
- **Promise\<[string](../../models/.md)\>**
188
-
189
- ### Errors
190
-
191
- | Error Type | Status Code | Content Type |
192
- | ----------------- | ----------------- | ----------------- |
193
- | errors.GleanError | 4XX, 5XX | \*/\* |
194
-
195
- ## status
196
-
197
- Fetches the status of the run corresponding to the report-id.
198
-
199
- ### Example Usage
200
-
201
- <!-- UsageSnippet language="typescript" operationID="getreportstatus" method="get" path="/rest/api/v1/governance/data/reports/{id}/status" -->
202
- ```typescript
203
- import { Glean } from "@gleanwork/api-client";
204
-
205
- const glean = new Glean({
206
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
207
- });
208
-
209
- async function run() {
210
- const result = await glean.client.governance.data.reports.status("<id>");
211
-
212
- console.log(result);
213
- }
214
-
215
- run();
216
- ```
217
-
218
- ### Standalone function
219
-
220
- The standalone function version of this method:
221
-
222
- ```typescript
223
- import { GleanCore } from "@gleanwork/api-client/core.js";
224
- import { clientGovernanceDataReportsStatus } from "@gleanwork/api-client/funcs/clientGovernanceDataReportsStatus.js";
225
-
226
- // Use `GleanCore` for best tree-shaking performance.
227
- // You can create one instance of it to use across an application.
228
- const glean = new GleanCore({
229
- apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
230
- });
231
-
232
- async function run() {
233
- const res = await clientGovernanceDataReportsStatus(glean, "<id>");
234
- if (res.ok) {
235
- const { value: result } = res;
236
- console.log(result);
237
- } else {
238
- console.log("clientGovernanceDataReportsStatus failed:", res.error);
239
- }
240
- }
241
-
242
- run();
243
- ```
244
-
245
- ### React hooks and utilities
246
-
247
- This method can be used in React components through the following hooks and
248
- associated utilities.
249
-
250
- > Check out [this guide][hook-guide] for information about each of the utilities
251
- > below and how to get started using React hooks.
252
-
253
- [hook-guide]: ../../../REACT_QUERY.md
254
-
255
- ```tsx
256
- import {
257
- // Query hooks for fetching data.
258
- useClientGovernanceDataReportsStatus,
259
- useClientGovernanceDataReportsStatusSuspense,
260
-
261
- // Utility for prefetching data during server-side rendering and in React
262
- // Server Components that will be immediately available to client components
263
- // using the hooks.
264
- prefetchClientGovernanceDataReportsStatus,
265
-
266
- // Utilities to invalidate the query cache for this query in response to
267
- // mutations and other user actions.
268
- invalidateClientGovernanceDataReportsStatus,
269
- invalidateAllClientGovernanceDataReportsStatus,
270
- } from "@gleanwork/api-client/react-query/clientGovernanceDataReportsStatus.js";
271
- ```
272
-
273
- ### Parameters
274
-
275
- | Parameter | Type | Required | Description |
276
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
277
- | `id` | *string* | :heavy_check_mark: | The id of the report to get run status for. |
278
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
279
- | `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. |
280
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
281
-
282
- ### Response
283
-
284
- **Promise\<[components.ReportStatusResponse](../../models/components/reportstatusresponse.md)\>**
285
-
286
- ### Errors
287
-
288
- | Error Type | Status Code | Content Type |
289
- | ----------------- | ----------------- | ----------------- |
290
- | errors.GleanError | 4XX, 5XX | \*/\* |