@gleanwork/api-client 0.4.4 → 0.5.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 +45 -45
- package/dist/commonjs/__tests__/agents.test.js +3 -1
- package/dist/commonjs/__tests__/agents.test.js.map +1 -1
- package/dist/commonjs/funcs/clientAgentsList.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsList.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieve.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieve.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRun.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRun.js +2 -2
- package/dist/commonjs/funcs/clientAgentsRunStream.d.ts +2 -2
- package/dist/commonjs/funcs/clientAgentsRunStream.js +2 -2
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesCreate.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesCreate.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesDownload.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesDownload.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesList.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesList.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesRetrieve.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesRetrieve.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataPoliciesUpdate.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsCreate.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsCreate.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsDownload.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsDownload.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsStatus.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDataReportsStatus.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
- package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesList.d.ts +1 -1
- package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesList.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/agent.d.ts +16 -6
- package/dist/commonjs/models/components/agent.d.ts.map +1 -1
- package/dist/commonjs/models/components/agent.js.map +1 -1
- package/dist/commonjs/models/components/agentrun.d.ts +2 -2
- package/dist/commonjs/models/components/agentrun.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentrun.js +2 -2
- package/dist/commonjs/models/components/agentrun.js.map +1 -1
- package/dist/commonjs/models/components/agentruncreate.d.ts +2 -2
- package/dist/commonjs/models/components/agentruncreate.d.ts.map +1 -1
- package/dist/commonjs/models/components/agentruncreate.js +2 -2
- package/dist/commonjs/models/components/agentruncreate.js.map +1 -1
- package/dist/commonjs/models/components/agentschemas.d.ts +4 -4
- package/dist/commonjs/models/components/chatrequest.d.ts +3 -0
- package/dist/commonjs/models/components/chatrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/chatrequest.js +3 -0
- package/dist/commonjs/models/components/chatrequest.js.map +1 -1
- package/dist/commonjs/models/components/searchagentsrequest.d.ts +1 -1
- package/dist/commonjs/models/components/workflow.d.ts +5 -5
- package/dist/commonjs/models/components/workflow.d.ts.map +1 -1
- package/dist/commonjs/models/components/workflow.js +2 -2
- package/dist/commonjs/models/components/workflow.js.map +1 -1
- package/dist/commonjs/react-query/clientAgentsList.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsList.js +2 -2
- package/dist/commonjs/react-query/clientAgentsRetrieve.d.ts +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieve.js +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
- package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.js +4 -4
- package/dist/commonjs/react-query/clientAgentsRun.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsRun.js +2 -2
- package/dist/commonjs/react-query/clientAgentsRunStream.d.ts +2 -2
- package/dist/commonjs/react-query/clientAgentsRunStream.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesCreate.d.ts +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesCreate.js +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesDownload.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesDownload.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesList.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesList.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesRetrieve.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesRetrieve.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataPoliciesUpdate.js +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataReportsCreate.d.ts +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataReportsCreate.js +1 -1
- package/dist/commonjs/react-query/clientGovernanceDataReportsDownload.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataReportsDownload.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataReportsStatus.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDataReportsStatus.js +2 -2
- package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
- package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
- package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesList.d.ts +2 -2
- package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesList.js +2 -2
- package/dist/commonjs/sdk/agents.d.ts +10 -10
- package/dist/commonjs/sdk/agents.js +10 -10
- package/dist/commonjs/sdk/policies.d.ts +5 -5
- package/dist/commonjs/sdk/policies.js +5 -5
- package/dist/commonjs/sdk/reports.d.ts +3 -3
- package/dist/commonjs/sdk/reports.js +3 -3
- package/dist/commonjs/sdk/visibilityoverrides.d.ts +2 -2
- package/dist/commonjs/sdk/visibilityoverrides.js +2 -2
- package/dist/esm/__tests__/agents.test.js +3 -1
- package/dist/esm/__tests__/agents.test.js.map +1 -1
- package/dist/esm/funcs/clientAgentsList.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsList.js +2 -2
- package/dist/esm/funcs/clientAgentsRetrieve.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRetrieve.js +2 -2
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRetrieveSchemas.js +2 -2
- package/dist/esm/funcs/clientAgentsRun.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRun.js +2 -2
- package/dist/esm/funcs/clientAgentsRunStream.d.ts +2 -2
- package/dist/esm/funcs/clientAgentsRunStream.js +2 -2
- package/dist/esm/funcs/clientGovernanceDataPoliciesCreate.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesCreate.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesDownload.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesDownload.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesList.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesList.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesRetrieve.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesRetrieve.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataPoliciesUpdate.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsCreate.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsCreate.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsDownload.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsDownload.js +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsStatus.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDataReportsStatus.js +1 -1
- package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
- package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesList.d.ts +1 -1
- package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesList.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/agent.d.ts +16 -6
- package/dist/esm/models/components/agent.d.ts.map +1 -1
- package/dist/esm/models/components/agent.js.map +1 -1
- package/dist/esm/models/components/agentrun.d.ts +2 -2
- package/dist/esm/models/components/agentrun.d.ts.map +1 -1
- package/dist/esm/models/components/agentrun.js +2 -2
- package/dist/esm/models/components/agentrun.js.map +1 -1
- package/dist/esm/models/components/agentruncreate.d.ts +2 -2
- package/dist/esm/models/components/agentruncreate.d.ts.map +1 -1
- package/dist/esm/models/components/agentruncreate.js +2 -2
- package/dist/esm/models/components/agentruncreate.js.map +1 -1
- package/dist/esm/models/components/agentschemas.d.ts +4 -4
- package/dist/esm/models/components/chatrequest.d.ts +3 -0
- package/dist/esm/models/components/chatrequest.d.ts.map +1 -1
- package/dist/esm/models/components/chatrequest.js +3 -0
- package/dist/esm/models/components/chatrequest.js.map +1 -1
- package/dist/esm/models/components/searchagentsrequest.d.ts +1 -1
- package/dist/esm/models/components/workflow.d.ts +5 -5
- package/dist/esm/models/components/workflow.d.ts.map +1 -1
- package/dist/esm/models/components/workflow.js +2 -2
- package/dist/esm/models/components/workflow.js.map +1 -1
- package/dist/esm/react-query/clientAgentsList.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsList.js +2 -2
- package/dist/esm/react-query/clientAgentsRetrieve.d.ts +4 -4
- package/dist/esm/react-query/clientAgentsRetrieve.js +4 -4
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
- package/dist/esm/react-query/clientAgentsRetrieveSchemas.js +4 -4
- package/dist/esm/react-query/clientAgentsRun.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsRun.js +2 -2
- package/dist/esm/react-query/clientAgentsRunStream.d.ts +2 -2
- package/dist/esm/react-query/clientAgentsRunStream.js +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesCreate.d.ts +1 -1
- package/dist/esm/react-query/clientGovernanceDataPoliciesCreate.js +1 -1
- package/dist/esm/react-query/clientGovernanceDataPoliciesDownload.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesDownload.js +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesList.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesList.js +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesRetrieve.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesRetrieve.js +2 -2
- package/dist/esm/react-query/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
- package/dist/esm/react-query/clientGovernanceDataPoliciesUpdate.js +1 -1
- package/dist/esm/react-query/clientGovernanceDataReportsCreate.d.ts +1 -1
- package/dist/esm/react-query/clientGovernanceDataReportsCreate.js +1 -1
- package/dist/esm/react-query/clientGovernanceDataReportsDownload.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDataReportsDownload.js +2 -2
- package/dist/esm/react-query/clientGovernanceDataReportsStatus.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDataReportsStatus.js +2 -2
- package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
- package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
- package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesList.d.ts +2 -2
- package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesList.js +2 -2
- package/dist/esm/sdk/agents.d.ts +10 -10
- package/dist/esm/sdk/agents.js +10 -10
- package/dist/esm/sdk/policies.d.ts +5 -5
- package/dist/esm/sdk/policies.js +5 -5
- package/dist/esm/sdk/reports.d.ts +3 -3
- package/dist/esm/sdk/reports.js +3 -3
- package/dist/esm/sdk/visibilityoverrides.d.ts +2 -2
- package/dist/esm/sdk/visibilityoverrides.js +2 -2
- package/docs/sdks/agents/README.md +28 -16
- package/docs/sdks/policies/README.md +5 -5
- package/docs/sdks/reports/README.md +3 -3
- package/docs/sdks/visibilityoverrides/README.md +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/agents.test.ts +3 -1
- package/src/funcs/clientAgentsList.ts +2 -2
- package/src/funcs/clientAgentsRetrieve.ts +2 -2
- package/src/funcs/clientAgentsRetrieveSchemas.ts +2 -2
- package/src/funcs/clientAgentsRun.ts +2 -2
- package/src/funcs/clientAgentsRunStream.ts +2 -2
- package/src/funcs/clientGovernanceDataPoliciesCreate.ts +1 -1
- package/src/funcs/clientGovernanceDataPoliciesDownload.ts +1 -1
- package/src/funcs/clientGovernanceDataPoliciesList.ts +1 -1
- package/src/funcs/clientGovernanceDataPoliciesRetrieve.ts +1 -1
- package/src/funcs/clientGovernanceDataPoliciesUpdate.ts +1 -1
- package/src/funcs/clientGovernanceDataReportsCreate.ts +1 -1
- package/src/funcs/clientGovernanceDataReportsDownload.ts +1 -1
- package/src/funcs/clientGovernanceDataReportsStatus.ts +1 -1
- package/src/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.ts +1 -1
- package/src/funcs/clientGovernanceDocumentsVisibilityoverridesList.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/agent.ts +16 -6
- package/src/models/components/agentrun.ts +4 -4
- package/src/models/components/agentruncreate.ts +4 -4
- package/src/models/components/agentschemas.ts +4 -4
- package/src/models/components/chatrequest.ts +10 -0
- package/src/models/components/searchagentsrequest.ts +1 -1
- package/src/models/components/workflow.ts +7 -7
- package/src/react-query/clientAgentsList.ts +2 -2
- package/src/react-query/clientAgentsRetrieve.ts +4 -4
- package/src/react-query/clientAgentsRetrieveSchemas.ts +4 -4
- package/src/react-query/clientAgentsRun.ts +2 -2
- package/src/react-query/clientAgentsRunStream.ts +2 -2
- package/src/react-query/clientGovernanceDataPoliciesCreate.ts +1 -1
- package/src/react-query/clientGovernanceDataPoliciesDownload.ts +2 -2
- package/src/react-query/clientGovernanceDataPoliciesList.ts +2 -2
- package/src/react-query/clientGovernanceDataPoliciesRetrieve.ts +2 -2
- package/src/react-query/clientGovernanceDataPoliciesUpdate.ts +1 -1
- package/src/react-query/clientGovernanceDataReportsCreate.ts +1 -1
- package/src/react-query/clientGovernanceDataReportsDownload.ts +2 -2
- package/src/react-query/clientGovernanceDataReportsStatus.ts +2 -2
- package/src/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.ts +1 -1
- package/src/react-query/clientGovernanceDocumentsVisibilityoverridesList.ts +2 -2
- package/src/sdk/agents.ts +10 -10
- package/src/sdk/policies.ts +5 -5
- package/src/sdk/reports.ts +3 -3
- package/src/sdk/visibilityoverrides.ts +2 -2
|
@@ -7,7 +7,7 @@ import { combineSignals } from "../lib/primitives.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
import { useGleanContext } from "./_context.js";
|
|
9
9
|
/**
|
|
10
|
-
* Fetches documents visibility
|
|
10
|
+
* Fetches documents visibility
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* Fetches the visibility override status of the documents passed.
|
|
@@ -20,7 +20,7 @@ export function useClientGovernanceDocumentsVisibilityoverridesList(docIds, opti
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Fetches documents visibility
|
|
23
|
+
* Fetches documents visibility
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
26
|
* Fetches the visibility override status of the documents passed.
|
package/dist/esm/sdk/agents.d.ts
CHANGED
|
@@ -2,38 +2,38 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class Agents extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Retrieve an agent
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
*
|
|
8
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
9
9
|
*/
|
|
10
10
|
retrieve(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.Agent>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* List an agent's schemas
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
16
16
|
*/
|
|
17
17
|
retrieveSchemas(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.AgentSchemas>;
|
|
18
18
|
/**
|
|
19
|
-
* Search
|
|
19
|
+
* Search agents
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
*
|
|
22
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
23
23
|
*/
|
|
24
24
|
list(request: components.SearchAgentsRequest, options?: RequestOptions): Promise<components.SearchAgentsResponse>;
|
|
25
25
|
/**
|
|
26
|
-
* Create
|
|
26
|
+
* Create an agent run and stream the response
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
*
|
|
29
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
30
30
|
*/
|
|
31
31
|
runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
|
|
32
32
|
/**
|
|
33
|
-
* Create
|
|
33
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
*
|
|
36
|
+
* Executes an agent run and returns the final response.
|
|
37
37
|
*/
|
|
38
38
|
run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
|
|
39
39
|
}
|
package/dist/esm/sdk/agents.js
CHANGED
|
@@ -10,46 +10,46 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
10
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
11
|
export class Agents extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Retrieve an agent
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
*
|
|
16
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
17
17
|
*/
|
|
18
18
|
async retrieve(agentId, timezoneOffset, options) {
|
|
19
19
|
return unwrapAsync(clientAgentsRetrieve(this, agentId, timezoneOffset, options));
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* List an agent's schemas
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
|
-
*
|
|
25
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
26
26
|
*/
|
|
27
27
|
async retrieveSchemas(agentId, timezoneOffset, options) {
|
|
28
28
|
return unwrapAsync(clientAgentsRetrieveSchemas(this, agentId, timezoneOffset, options));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Search
|
|
31
|
+
* Search agents
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
*
|
|
34
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
35
35
|
*/
|
|
36
36
|
async list(request, options) {
|
|
37
37
|
return unwrapAsync(clientAgentsList(this, request, options));
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Create
|
|
40
|
+
* Create an agent run and stream the response
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
|
-
*
|
|
43
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
44
44
|
*/
|
|
45
45
|
async runStream(request, options) {
|
|
46
46
|
return unwrapAsync(clientAgentsRunStream(this, request, options));
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Create
|
|
49
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
*
|
|
52
|
+
* Executes an agent run and returns the final response.
|
|
53
53
|
*/
|
|
54
54
|
async run(request, options) {
|
|
55
55
|
return unwrapAsync(clientAgentsRun(this, request, options));
|
|
@@ -2,35 +2,35 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class Policies extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
* Gets specified
|
|
5
|
+
* Gets specified policy
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Fetches the specified policy version, or the latest if no version is provided.
|
|
9
9
|
*/
|
|
10
10
|
retrieve(id: string, version?: number | undefined, options?: RequestOptions): Promise<components.GetDlpReportResponse>;
|
|
11
11
|
/**
|
|
12
|
-
* Updates an existing policy
|
|
12
|
+
* Updates an existing policy
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Updates an existing policy.
|
|
16
16
|
*/
|
|
17
17
|
update(updateDlpReportRequest: components.UpdateDlpReportRequest, id: string, options?: RequestOptions): Promise<components.UpdateDlpReportResponse>;
|
|
18
18
|
/**
|
|
19
|
-
* Lists policies
|
|
19
|
+
* Lists policies
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
22
|
* Lists policies with filtering.
|
|
23
23
|
*/
|
|
24
24
|
list(autoHide?: boolean | undefined, frequency?: string | undefined, options?: RequestOptions): Promise<components.ListDlpReportsResponse>;
|
|
25
25
|
/**
|
|
26
|
-
* Creates new policy
|
|
26
|
+
* Creates new policy
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
29
|
* Creates a new policy with specified specifications and returns its id.
|
|
30
30
|
*/
|
|
31
31
|
create(request: components.CreateDlpReportRequest, options?: RequestOptions): Promise<components.CreateDlpReportResponse>;
|
|
32
32
|
/**
|
|
33
|
-
* Downloads violations CSV for policy
|
|
33
|
+
* Downloads violations CSV for policy
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
36
|
* Downloads CSV violations report for a specific policy id. This does not support continuous policies.
|
package/dist/esm/sdk/policies.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
10
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
11
|
export class Policies extends ClientSDK {
|
|
12
12
|
/**
|
|
13
|
-
* Gets specified
|
|
13
|
+
* Gets specified policy
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
* Fetches the specified policy version, or the latest if no version is provided.
|
|
@@ -19,7 +19,7 @@ export class Policies extends ClientSDK {
|
|
|
19
19
|
return unwrapAsync(clientGovernanceDataPoliciesRetrieve(this, id, version, options));
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Updates an existing policy
|
|
22
|
+
* Updates an existing policy
|
|
23
23
|
*
|
|
24
24
|
* @remarks
|
|
25
25
|
* Updates an existing policy.
|
|
@@ -28,7 +28,7 @@ export class Policies extends ClientSDK {
|
|
|
28
28
|
return unwrapAsync(clientGovernanceDataPoliciesUpdate(this, updateDlpReportRequest, id, options));
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Lists policies
|
|
31
|
+
* Lists policies
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
34
|
* Lists policies with filtering.
|
|
@@ -37,7 +37,7 @@ export class Policies extends ClientSDK {
|
|
|
37
37
|
return unwrapAsync(clientGovernanceDataPoliciesList(this, autoHide, frequency, options));
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* Creates new policy
|
|
40
|
+
* Creates new policy
|
|
41
41
|
*
|
|
42
42
|
* @remarks
|
|
43
43
|
* Creates a new policy with specified specifications and returns its id.
|
|
@@ -46,7 +46,7 @@ export class Policies extends ClientSDK {
|
|
|
46
46
|
return unwrapAsync(clientGovernanceDataPoliciesCreate(this, request, options));
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
* Downloads violations CSV for policy
|
|
49
|
+
* Downloads violations CSV for policy
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
52
|
* Downloads CSV violations report for a specific policy id. This does not support continuous policies.
|
|
@@ -2,21 +2,21 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class Reports extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
* Creates new one-time report
|
|
5
|
+
* Creates new one-time report
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Creates a new one-time report and executes its batch job.
|
|
9
9
|
*/
|
|
10
10
|
create(request: components.UpdateDlpConfigRequest, options?: RequestOptions): Promise<components.UpdateDlpConfigResponse>;
|
|
11
11
|
/**
|
|
12
|
-
* Downloads violations CSV for report
|
|
12
|
+
* Downloads violations CSV for report
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Downloads CSV violations report for a specific report id.
|
|
16
16
|
*/
|
|
17
17
|
download(id: string, options?: RequestOptions): Promise<string>;
|
|
18
18
|
/**
|
|
19
|
-
* Fetches report run status
|
|
19
|
+
* Fetches report run status
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
22
|
* Fetches the status of the run corresponding to the report-id.
|
package/dist/esm/sdk/reports.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
8
8
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
9
|
export class Reports extends ClientSDK {
|
|
10
10
|
/**
|
|
11
|
-
* Creates new one-time report
|
|
11
|
+
* Creates new one-time report
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
14
|
* Creates a new one-time report and executes its batch job.
|
|
@@ -17,7 +17,7 @@ export class Reports extends ClientSDK {
|
|
|
17
17
|
return unwrapAsync(clientGovernanceDataReportsCreate(this, request, options));
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Downloads violations CSV for report
|
|
20
|
+
* Downloads violations CSV for report
|
|
21
21
|
*
|
|
22
22
|
* @remarks
|
|
23
23
|
* Downloads CSV violations report for a specific report id.
|
|
@@ -26,7 +26,7 @@ export class Reports extends ClientSDK {
|
|
|
26
26
|
return unwrapAsync(clientGovernanceDataReportsDownload(this, id, options));
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
* Fetches report run status
|
|
29
|
+
* Fetches report run status
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Fetches the status of the run corresponding to the report-id.
|
|
@@ -2,14 +2,14 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
2
2
|
import * as components from "../models/components/index.js";
|
|
3
3
|
export declare class Visibilityoverrides extends ClientSDK {
|
|
4
4
|
/**
|
|
5
|
-
* Fetches documents visibility
|
|
5
|
+
* Fetches documents visibility
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
8
|
* Fetches the visibility override status of the documents passed.
|
|
9
9
|
*/
|
|
10
10
|
list(docIds?: Array<string> | undefined, options?: RequestOptions): Promise<components.GetDocumentVisibilityOverridesResponse>;
|
|
11
11
|
/**
|
|
12
|
-
* Hide
|
|
12
|
+
* Hide or unhide docs
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
15
|
* Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents.
|
|
@@ -7,7 +7,7 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
7
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
8
8
|
export class Visibilityoverrides extends ClientSDK {
|
|
9
9
|
/**
|
|
10
|
-
* Fetches documents visibility
|
|
10
|
+
* Fetches documents visibility
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* Fetches the visibility override status of the documents passed.
|
|
@@ -16,7 +16,7 @@ export class Visibilityoverrides extends ClientSDK {
|
|
|
16
16
|
return unwrapAsync(clientGovernanceDocumentsVisibilityoverridesList(this, docIds, options));
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
* Hide
|
|
19
|
+
* Hide or unhide docs
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
22
|
* Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents.
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [retrieve](#retrieve) -
|
|
9
|
-
* [retrieveSchemas](#retrieveschemas) -
|
|
10
|
-
* [list](#list) - Search
|
|
11
|
-
* [runStream](#runstream) - Create
|
|
12
|
-
* [run](#run) - Create
|
|
8
|
+
* [retrieve](#retrieve) - Retrieve an agent
|
|
9
|
+
* [retrieveSchemas](#retrieveschemas) - List an agent's schemas
|
|
10
|
+
* [list](#list) - Search agents
|
|
11
|
+
* [runStream](#runstream) - Create an agent run and stream the response
|
|
12
|
+
* [run](#run) - Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
13
13
|
|
|
14
14
|
## retrieve
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
17
17
|
|
|
18
18
|
### Example Usage
|
|
19
19
|
|
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
|
|
115
115
|
## retrieveSchemas
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
118
118
|
|
|
119
119
|
### Example Usage
|
|
120
120
|
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
|
|
216
216
|
## list
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
219
219
|
|
|
220
220
|
### Example Usage
|
|
221
221
|
|
|
@@ -227,7 +227,9 @@ const glean = new Glean({
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
async function run() {
|
|
230
|
-
const result = await glean.client.agents.list({
|
|
230
|
+
const result = await glean.client.agents.list({
|
|
231
|
+
name: "HR Policy Agent",
|
|
232
|
+
});
|
|
231
233
|
|
|
232
234
|
// Handle the result
|
|
233
235
|
console.log(result);
|
|
@@ -251,7 +253,9 @@ const glean = new GleanCore({
|
|
|
251
253
|
});
|
|
252
254
|
|
|
253
255
|
async function run() {
|
|
254
|
-
const res = await clientAgentsList(glean, {
|
|
256
|
+
const res = await clientAgentsList(glean, {
|
|
257
|
+
name: "HR Policy Agent",
|
|
258
|
+
});
|
|
255
259
|
|
|
256
260
|
if (!res.ok) {
|
|
257
261
|
throw res.error;
|
|
@@ -304,7 +308,7 @@ import {
|
|
|
304
308
|
|
|
305
309
|
## runStream
|
|
306
310
|
|
|
307
|
-
|
|
311
|
+
Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
308
312
|
|
|
309
313
|
### Example Usage
|
|
310
314
|
|
|
@@ -316,7 +320,9 @@ const glean = new Glean({
|
|
|
316
320
|
});
|
|
317
321
|
|
|
318
322
|
async function run() {
|
|
319
|
-
const result = await glean.client.agents.runStream({
|
|
323
|
+
const result = await glean.client.agents.runStream({
|
|
324
|
+
agentId: "<id>",
|
|
325
|
+
});
|
|
320
326
|
|
|
321
327
|
// Handle the result
|
|
322
328
|
console.log(result);
|
|
@@ -340,7 +346,9 @@ const glean = new GleanCore({
|
|
|
340
346
|
});
|
|
341
347
|
|
|
342
348
|
async function run() {
|
|
343
|
-
const res = await clientAgentsRunStream(glean, {
|
|
349
|
+
const res = await clientAgentsRunStream(glean, {
|
|
350
|
+
agentId: "<id>",
|
|
351
|
+
});
|
|
344
352
|
|
|
345
353
|
if (!res.ok) {
|
|
346
354
|
throw res.error;
|
|
@@ -393,7 +401,7 @@ import {
|
|
|
393
401
|
|
|
394
402
|
## run
|
|
395
403
|
|
|
396
|
-
|
|
404
|
+
Executes an agent run and returns the final response.
|
|
397
405
|
|
|
398
406
|
### Example Usage
|
|
399
407
|
|
|
@@ -405,7 +413,9 @@ const glean = new Glean({
|
|
|
405
413
|
});
|
|
406
414
|
|
|
407
415
|
async function run() {
|
|
408
|
-
const result = await glean.client.agents.run({
|
|
416
|
+
const result = await glean.client.agents.run({
|
|
417
|
+
agentId: "<id>",
|
|
418
|
+
});
|
|
409
419
|
|
|
410
420
|
// Handle the result
|
|
411
421
|
console.log(result);
|
|
@@ -429,7 +439,9 @@ const glean = new GleanCore({
|
|
|
429
439
|
});
|
|
430
440
|
|
|
431
441
|
async function run() {
|
|
432
|
-
const res = await clientAgentsRun(glean, {
|
|
442
|
+
const res = await clientAgentsRun(glean, {
|
|
443
|
+
agentId: "<id>",
|
|
444
|
+
});
|
|
433
445
|
|
|
434
446
|
if (!res.ok) {
|
|
435
447
|
throw res.error;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [retrieve](#retrieve) - Gets specified
|
|
9
|
-
* [update](#update) - Updates an existing policy
|
|
10
|
-
* [list](#list) - Lists policies
|
|
11
|
-
* [create](#create) - Creates new policy
|
|
12
|
-
* [download](#download) - Downloads violations CSV for policy
|
|
8
|
+
* [retrieve](#retrieve) - Gets specified policy
|
|
9
|
+
* [update](#update) - Updates an existing policy
|
|
10
|
+
* [list](#list) - Lists policies
|
|
11
|
+
* [create](#create) - Creates new policy
|
|
12
|
+
* [download](#download) - Downloads violations CSV for policy
|
|
13
13
|
|
|
14
14
|
## retrieve
|
|
15
15
|
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [create](#create) - Creates new one-time report
|
|
9
|
-
* [download](#download) - Downloads violations CSV for report
|
|
10
|
-
* [status](#status) - Fetches report run status
|
|
8
|
+
* [create](#create) - Creates new one-time report
|
|
9
|
+
* [download](#download) - Downloads violations CSV for report
|
|
10
|
+
* [status](#status) - Fetches report run status
|
|
11
11
|
|
|
12
12
|
## create
|
|
13
13
|
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -78,6 +78,8 @@ test("Agents Create And Wait Run", async () => {
|
|
|
78
78
|
apiToken: process.env["GLEAN_API_TOKEN"] ?? "value",
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
const result = await glean.client.agents.run({
|
|
81
|
+
const result = await glean.client.agents.run({
|
|
82
|
+
agentId: "<id>",
|
|
83
|
+
});
|
|
82
84
|
expect(result).toBeDefined();
|
|
83
85
|
});
|
|
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Search
|
|
27
|
+
* Search agents
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
|
|
31
31
|
*/
|
|
32
32
|
export function clientAgentsList(
|
|
33
33
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Retrieve an agent
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRetrieve(
|
|
34
34
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* List an agent's schemas
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRetrieveSchemas(
|
|
34
34
|
client: GleanCore,
|
|
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Create
|
|
27
|
+
* Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Executes an agent run and returns the final response.
|
|
31
31
|
*/
|
|
32
32
|
export function clientAgentsRun(
|
|
33
33
|
client: GleanCore,
|
|
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Create
|
|
28
|
+
* Create an agent run and stream the response
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
31
|
+
* Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
|
|
32
32
|
*/
|
|
33
33
|
export function clientAgentsRunStream(
|
|
34
34
|
client: GleanCore,
|
|
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Downloads violations CSV for policy
|
|
28
|
+
* Downloads violations CSV for policy
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
31
|
* Downloads CSV violations report for a specific policy id. This does not support continuous policies.
|
|
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Gets specified
|
|
28
|
+
* Gets specified policy
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
31
|
* Fetches the specified policy version, or the latest if no version is provided.
|