@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.
- package/README.md +2 -1
- package/dist/commonjs/__tests__/messages.test.js +1 -1
- package/dist/commonjs/__tests__/messages.test.js.map +1 -1
- package/dist/commonjs/__tests__/summarize.test.js +4 -3
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/models/components/agentsinsightsv2response.d.ts +4 -0
- package/dist/commonjs/models/components/agentsinsightsv2response.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentsinsightsv2response.js +4 -0
- package/dist/commonjs/models/components/agentsinsightsv2response.js.map +1 -1
- package/dist/commonjs/models/components/chatmessagefragment.d.ts +1 -1
- package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts +3 -1
- package/dist/commonjs/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/debugdatasourcestatusresponse.js.map +1 -1
- package/dist/commonjs/models/components/peragentinsight.d.ts +10 -0
- package/dist/commonjs/models/components/peragentinsight.d.ts.map +1 -1
- package/dist/commonjs/models/components/peragentinsight.js +4 -0
- package/dist/commonjs/models/components/peragentinsight.js.map +1 -1
- package/dist/esm/__tests__/messages.test.js +1 -1
- package/dist/esm/__tests__/messages.test.js.map +1 -1
- package/dist/esm/__tests__/summarize.test.js +4 -3
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/models/components/agentsinsightsv2response.d.ts +4 -0
- package/dist/esm/models/components/agentsinsightsv2response.d.ts.map +1 -1
- package/dist/esm/models/components/agentsinsightsv2response.js +4 -0
- package/dist/esm/models/components/agentsinsightsv2response.js.map +1 -1
- package/dist/esm/models/components/chatmessagefragment.d.ts +1 -1
- package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts +3 -1
- package/dist/esm/models/components/debugdatasourcestatusresponse.d.ts.map +1 -1
- package/dist/esm/models/components/debugdatasourcestatusresponse.js.map +1 -1
- package/dist/esm/models/components/peragentinsight.d.ts +10 -0
- package/dist/esm/models/components/peragentinsight.d.ts.map +1 -1
- package/dist/esm/models/components/peragentinsight.js +4 -0
- package/dist/esm/models/components/peragentinsight.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/messages.test.ts +1 -1
- package/src/__tests__/summarize.test.ts +4 -3
- package/src/lib/config.ts +3 -3
- package/src/models/components/agentsinsightsv2response.ts +8 -0
- package/src/models/components/chatmessagefragment.ts +1 -1
- package/src/models/components/debugdatasourcestatusresponse.ts +3 -1
- package/src/models/components/peragentinsight.ts +14 -0
- package/.devcontainer/README.md +0 -35
- package/docs/sdks/activity/README.md +0 -242
- package/docs/sdks/agents/README.md +0 -498
- package/docs/sdks/announcements/README.md +0 -137560
- package/docs/sdks/answers/README.md +0 -4966
- package/docs/sdks/chat/README.md +0 -967
- package/docs/sdks/clientauthentication/README.md +0 -98
- package/docs/sdks/clientdocuments/README.md +0 -457
- package/docs/sdks/clientshortcuts/README.md +0 -9340
- package/docs/sdks/collections/README.md +0 -4148
- package/docs/sdks/datasource/README.md +0 -98
- package/docs/sdks/datasources/README.md +0 -211
- package/docs/sdks/entities/README.md +0 -225
- package/docs/sdks/indexingauthentication/README.md +0 -93
- package/docs/sdks/indexingdocuments/README.md +0 -983
- package/docs/sdks/indexingshortcuts/README.md +0 -251
- package/docs/sdks/insights/README.md +0 -94
- package/docs/sdks/messages/README.md +0 -102
- package/docs/sdks/people/README.md +0 -1052
- package/docs/sdks/permissions/README.md +0 -1198
- package/docs/sdks/pins/README.md +0 -506
- package/docs/sdks/policies/README.md +0 -478
- package/docs/sdks/reports/README.md +0 -290
- package/docs/sdks/search/README.md +0 -986
- package/docs/sdks/tools/README.md +0 -208
- package/docs/sdks/verification/README.md +0 -276
- package/docs/sdks/visibilityoverrides/README.md +0 -192
- package/examples/README.md +0 -31
- 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 | \*/\* |
|