@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,192 +0,0 @@
|
|
|
1
|
-
# Visibilityoverrides
|
|
2
|
-
(*client.governance.documents.visibilityoverrides*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - Fetches documents visibility
|
|
9
|
-
* [create](#create) - Hide or unhide docs
|
|
10
|
-
|
|
11
|
-
## list
|
|
12
|
-
|
|
13
|
-
Fetches the visibility override status of the documents passed.
|
|
14
|
-
|
|
15
|
-
### Example Usage
|
|
16
|
-
|
|
17
|
-
<!-- UsageSnippet language="typescript" operationID="getdocvisibility" method="get" path="/rest/api/v1/governance/documents/visibilityoverrides" -->
|
|
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.governance.documents.visibilityoverrides.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 { clientGovernanceDocumentsVisibilityoverridesList } from "@gleanwork/api-client/funcs/clientGovernanceDocumentsVisibilityoverridesList.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 clientGovernanceDocumentsVisibilityoverridesList(glean);
|
|
50
|
-
if (res.ok) {
|
|
51
|
-
const { value: result } = res;
|
|
52
|
-
console.log(result);
|
|
53
|
-
} else {
|
|
54
|
-
console.log("clientGovernanceDocumentsVisibilityoverridesList 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
|
-
useClientGovernanceDocumentsVisibilityoverridesList,
|
|
75
|
-
useClientGovernanceDocumentsVisibilityoverridesListSuspense,
|
|
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
|
-
prefetchClientGovernanceDocumentsVisibilityoverridesList,
|
|
81
|
-
|
|
82
|
-
// Utilities to invalidate the query cache for this query in response to
|
|
83
|
-
// mutations and other user actions.
|
|
84
|
-
invalidateClientGovernanceDocumentsVisibilityoverridesList,
|
|
85
|
-
invalidateAllClientGovernanceDocumentsVisibilityoverridesList,
|
|
86
|
-
} from "@gleanwork/api-client/react-query/clientGovernanceDocumentsVisibilityoverridesList.js";
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Parameters
|
|
90
|
-
|
|
91
|
-
| Parameter | Type | Required | Description |
|
|
92
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
93
|
-
| `docIds` | *string*[] | :heavy_minus_sign: | List of doc-ids which will have their hide status fetched. |
|
|
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.GetDocumentVisibilityOverridesResponse](../../models/components/getdocumentvisibilityoverridesresponse.md)\>**
|
|
101
|
-
|
|
102
|
-
### Errors
|
|
103
|
-
|
|
104
|
-
| Error Type | Status Code | Content Type |
|
|
105
|
-
| ----------------- | ----------------- | ----------------- |
|
|
106
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
|
107
|
-
|
|
108
|
-
## create
|
|
109
|
-
|
|
110
|
-
Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents.
|
|
111
|
-
|
|
112
|
-
### Example Usage
|
|
113
|
-
|
|
114
|
-
<!-- UsageSnippet language="typescript" operationID="setdocvisibility" method="post" path="/rest/api/v1/governance/documents/visibilityoverrides" -->
|
|
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.governance.documents.visibilityoverrides.create({});
|
|
124
|
-
|
|
125
|
-
console.log(result);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
run();
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Standalone function
|
|
132
|
-
|
|
133
|
-
The standalone function version of this method:
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
import { GleanCore } from "@gleanwork/api-client/core.js";
|
|
137
|
-
import { clientGovernanceDocumentsVisibilityoverridesCreate } from "@gleanwork/api-client/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.js";
|
|
138
|
-
|
|
139
|
-
// Use `GleanCore` for best tree-shaking performance.
|
|
140
|
-
// You can create one instance of it to use across an application.
|
|
141
|
-
const glean = new GleanCore({
|
|
142
|
-
apiToken: process.env["GLEAN_API_TOKEN"] ?? "",
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
async function run() {
|
|
146
|
-
const res = await clientGovernanceDocumentsVisibilityoverridesCreate(glean, {});
|
|
147
|
-
if (res.ok) {
|
|
148
|
-
const { value: result } = res;
|
|
149
|
-
console.log(result);
|
|
150
|
-
} else {
|
|
151
|
-
console.log("clientGovernanceDocumentsVisibilityoverridesCreate failed:", res.error);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
run();
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
### React hooks and utilities
|
|
159
|
-
|
|
160
|
-
This method can be used in React components through the following hooks and
|
|
161
|
-
associated utilities.
|
|
162
|
-
|
|
163
|
-
> Check out [this guide][hook-guide] for information about each of the utilities
|
|
164
|
-
> below and how to get started using React hooks.
|
|
165
|
-
|
|
166
|
-
[hook-guide]: ../../../REACT_QUERY.md
|
|
167
|
-
|
|
168
|
-
```tsx
|
|
169
|
-
import {
|
|
170
|
-
// Mutation hook for triggering the API call.
|
|
171
|
-
useClientGovernanceDocumentsVisibilityoverridesCreateMutation
|
|
172
|
-
} from "@gleanwork/api-client/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.js";
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Parameters
|
|
176
|
-
|
|
177
|
-
| Parameter | Type | Required | Description |
|
|
178
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
179
|
-
| `request` | [components.UpdateDocumentVisibilityOverridesRequest](../../models/components/updatedocumentvisibilityoverridesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
180
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
181
|
-
| `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. |
|
|
182
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
183
|
-
|
|
184
|
-
### Response
|
|
185
|
-
|
|
186
|
-
**Promise\<[components.UpdateDocumentVisibilityOverridesResponse](../../models/components/updatedocumentvisibilityoverridesresponse.md)\>**
|
|
187
|
-
|
|
188
|
-
### Errors
|
|
189
|
-
|
|
190
|
-
| Error Type | Status Code | Content Type |
|
|
191
|
-
| ----------------- | ----------------- | ----------------- |
|
|
192
|
-
| errors.GleanError | 4XX, 5XX | \*/\* |
|
package/examples/README.md
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# @gleanwork/api-client Examples
|
|
2
|
-
|
|
3
|
-
This directory contains example scripts demonstrating how to use the @gleanwork/api-client SDK.
|
|
4
|
-
|
|
5
|
-
## Prerequisites
|
|
6
|
-
|
|
7
|
-
- Node.js (v18 or higher)
|
|
8
|
-
- npm
|
|
9
|
-
|
|
10
|
-
## Setup
|
|
11
|
-
|
|
12
|
-
1. Copy `.env.template` to `.env`:
|
|
13
|
-
```bash
|
|
14
|
-
cp .env.template .env
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
2. Edit `.env` and add your actual credentials (API keys, tokens, etc.)
|
|
18
|
-
|
|
19
|
-
## Running the Examples
|
|
20
|
-
|
|
21
|
-
To run an example file from the examples directory:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm run build && npx tsx example.ts
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Creating new examples
|
|
28
|
-
|
|
29
|
-
Duplicate an existing example file, they won't be overwritten by the generation process.
|
|
30
|
-
|
|
31
|
-
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Mock Server
|
|
2
|
-
|
|
3
|
-
A generated HTTP mock server based on your OpenAPI Specification (OAS). Use this mock server for integration and contract testing.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
The server can be built and started via the [Go programming language toolchain](https://go.dev/) or [Docker](https://www.docker.com/).
|
|
8
|
-
|
|
9
|
-
If you have Go installed, start the server directly via:
|
|
10
|
-
|
|
11
|
-
```shell
|
|
12
|
-
go run .
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Otherwise, if you have Docker installed, build and run the server via:
|
|
16
|
-
|
|
17
|
-
```shell
|
|
18
|
-
docker build -t mockserver .
|
|
19
|
-
docker run -i -p 18080:18080 -t --rm mockserver
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
By default, the server runs on port `18080`.
|
|
23
|
-
|
|
24
|
-
### Server Paths
|
|
25
|
-
|
|
26
|
-
The server contains generated paths from the OAS and the following additional built-in paths.
|
|
27
|
-
|
|
28
|
-
| Path | Description |
|
|
29
|
-
|---|---|
|
|
30
|
-
| [`/_mockserver/health`](https://localhost:18080/_mockserver/health) | verify server is running |
|
|
31
|
-
| [`/_mockserver/log`](https://localhost:18080/_mockserver/log) | view per-OAS-operation logs |
|
|
32
|
-
|
|
33
|
-
Any request outside the generated and built-in paths will return a `404 Not Found` response.
|
|
34
|
-
|
|
35
|
-
### Server Customization
|
|
36
|
-
|
|
37
|
-
The server supports the following flags for customization.
|
|
38
|
-
|
|
39
|
-
| Flag | Default | Description |
|
|
40
|
-
|---|---|---|
|
|
41
|
-
| `-address` | `:18080` | server listen address |
|
|
42
|
-
| `-log-format` | `text` | logging format (supported: `JSON`, `text`) |
|
|
43
|
-
| `-log-level` | `INFO` | logging level (supported: `DEBUG`, `INFO`, `WARN`, `ERROR`) |
|
|
44
|
-
|
|
45
|
-
For example, enabling server debug logging:
|
|
46
|
-
|
|
47
|
-
```shell
|
|
48
|
-
# via `go run`
|
|
49
|
-
go run . -log-level=DEBUG
|
|
50
|
-
# via `docker run`
|
|
51
|
-
docker run -i -p 18080:18080 -t --rm mockserver -log-level=DEBUG
|
|
52
|
-
```
|