@gleanwork/api-client 0.4.3 → 0.5.1

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 (168) hide show
  1. package/README.md +30 -30
  2. package/dist/commonjs/__tests__/agents.test.js +3 -1
  3. package/dist/commonjs/__tests__/agents.test.js.map +1 -1
  4. package/dist/commonjs/funcs/clientGovernanceDataPoliciesCreate.d.ts +1 -1
  5. package/dist/commonjs/funcs/clientGovernanceDataPoliciesCreate.js +1 -1
  6. package/dist/commonjs/funcs/clientGovernanceDataPoliciesDownload.d.ts +1 -1
  7. package/dist/commonjs/funcs/clientGovernanceDataPoliciesDownload.js +1 -1
  8. package/dist/commonjs/funcs/clientGovernanceDataPoliciesList.d.ts +1 -1
  9. package/dist/commonjs/funcs/clientGovernanceDataPoliciesList.js +1 -1
  10. package/dist/commonjs/funcs/clientGovernanceDataPoliciesRetrieve.d.ts +1 -1
  11. package/dist/commonjs/funcs/clientGovernanceDataPoliciesRetrieve.js +1 -1
  12. package/dist/commonjs/funcs/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
  13. package/dist/commonjs/funcs/clientGovernanceDataPoliciesUpdate.js +1 -1
  14. package/dist/commonjs/funcs/clientGovernanceDataReportsCreate.d.ts +1 -1
  15. package/dist/commonjs/funcs/clientGovernanceDataReportsCreate.js +1 -1
  16. package/dist/commonjs/funcs/clientGovernanceDataReportsDownload.d.ts +1 -1
  17. package/dist/commonjs/funcs/clientGovernanceDataReportsDownload.js +1 -1
  18. package/dist/commonjs/funcs/clientGovernanceDataReportsStatus.d.ts +1 -1
  19. package/dist/commonjs/funcs/clientGovernanceDataReportsStatus.js +1 -1
  20. package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
  21. package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
  22. package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesList.d.ts +1 -1
  23. package/dist/commonjs/funcs/clientGovernanceDocumentsVisibilityoverridesList.js +1 -1
  24. package/dist/commonjs/lib/config.d.ts +2 -2
  25. package/dist/commonjs/lib/config.js +2 -2
  26. package/dist/commonjs/models/components/agentrun.d.ts +2 -2
  27. package/dist/commonjs/models/components/agentrun.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/agentrun.js +2 -2
  29. package/dist/commonjs/models/components/agentrun.js.map +1 -1
  30. package/dist/commonjs/models/components/agentruncreate.d.ts +2 -2
  31. package/dist/commonjs/models/components/agentruncreate.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/agentruncreate.js +2 -2
  33. package/dist/commonjs/models/components/agentruncreate.js.map +1 -1
  34. package/dist/commonjs/models/components/chatrequest.d.ts +3 -0
  35. package/dist/commonjs/models/components/chatrequest.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/chatrequest.js +3 -0
  37. package/dist/commonjs/models/components/chatrequest.js.map +1 -1
  38. package/dist/commonjs/models/components/textrange.d.ts +3 -0
  39. package/dist/commonjs/models/components/textrange.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/textrange.js +1 -0
  41. package/dist/commonjs/models/components/textrange.js.map +1 -1
  42. package/dist/commonjs/react-query/clientGovernanceDataPoliciesCreate.d.ts +1 -1
  43. package/dist/commonjs/react-query/clientGovernanceDataPoliciesCreate.js +1 -1
  44. package/dist/commonjs/react-query/clientGovernanceDataPoliciesDownload.d.ts +2 -2
  45. package/dist/commonjs/react-query/clientGovernanceDataPoliciesDownload.js +2 -2
  46. package/dist/commonjs/react-query/clientGovernanceDataPoliciesList.d.ts +2 -2
  47. package/dist/commonjs/react-query/clientGovernanceDataPoliciesList.js +2 -2
  48. package/dist/commonjs/react-query/clientGovernanceDataPoliciesRetrieve.d.ts +2 -2
  49. package/dist/commonjs/react-query/clientGovernanceDataPoliciesRetrieve.js +2 -2
  50. package/dist/commonjs/react-query/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
  51. package/dist/commonjs/react-query/clientGovernanceDataPoliciesUpdate.js +1 -1
  52. package/dist/commonjs/react-query/clientGovernanceDataReportsCreate.d.ts +1 -1
  53. package/dist/commonjs/react-query/clientGovernanceDataReportsCreate.js +1 -1
  54. package/dist/commonjs/react-query/clientGovernanceDataReportsDownload.d.ts +2 -2
  55. package/dist/commonjs/react-query/clientGovernanceDataReportsDownload.js +2 -2
  56. package/dist/commonjs/react-query/clientGovernanceDataReportsStatus.d.ts +2 -2
  57. package/dist/commonjs/react-query/clientGovernanceDataReportsStatus.js +2 -2
  58. package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
  59. package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
  60. package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesList.d.ts +2 -2
  61. package/dist/commonjs/react-query/clientGovernanceDocumentsVisibilityoverridesList.js +2 -2
  62. package/dist/commonjs/sdk/policies.d.ts +5 -5
  63. package/dist/commonjs/sdk/policies.js +5 -5
  64. package/dist/commonjs/sdk/reports.d.ts +3 -3
  65. package/dist/commonjs/sdk/reports.js +3 -3
  66. package/dist/commonjs/sdk/visibilityoverrides.d.ts +2 -2
  67. package/dist/commonjs/sdk/visibilityoverrides.js +2 -2
  68. package/dist/esm/__tests__/agents.test.js +3 -1
  69. package/dist/esm/__tests__/agents.test.js.map +1 -1
  70. package/dist/esm/funcs/clientGovernanceDataPoliciesCreate.d.ts +1 -1
  71. package/dist/esm/funcs/clientGovernanceDataPoliciesCreate.js +1 -1
  72. package/dist/esm/funcs/clientGovernanceDataPoliciesDownload.d.ts +1 -1
  73. package/dist/esm/funcs/clientGovernanceDataPoliciesDownload.js +1 -1
  74. package/dist/esm/funcs/clientGovernanceDataPoliciesList.d.ts +1 -1
  75. package/dist/esm/funcs/clientGovernanceDataPoliciesList.js +1 -1
  76. package/dist/esm/funcs/clientGovernanceDataPoliciesRetrieve.d.ts +1 -1
  77. package/dist/esm/funcs/clientGovernanceDataPoliciesRetrieve.js +1 -1
  78. package/dist/esm/funcs/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
  79. package/dist/esm/funcs/clientGovernanceDataPoliciesUpdate.js +1 -1
  80. package/dist/esm/funcs/clientGovernanceDataReportsCreate.d.ts +1 -1
  81. package/dist/esm/funcs/clientGovernanceDataReportsCreate.js +1 -1
  82. package/dist/esm/funcs/clientGovernanceDataReportsDownload.d.ts +1 -1
  83. package/dist/esm/funcs/clientGovernanceDataReportsDownload.js +1 -1
  84. package/dist/esm/funcs/clientGovernanceDataReportsStatus.d.ts +1 -1
  85. package/dist/esm/funcs/clientGovernanceDataReportsStatus.js +1 -1
  86. package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
  87. package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
  88. package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesList.d.ts +1 -1
  89. package/dist/esm/funcs/clientGovernanceDocumentsVisibilityoverridesList.js +1 -1
  90. package/dist/esm/lib/config.d.ts +2 -2
  91. package/dist/esm/lib/config.js +2 -2
  92. package/dist/esm/models/components/agentrun.d.ts +2 -2
  93. package/dist/esm/models/components/agentrun.d.ts.map +1 -1
  94. package/dist/esm/models/components/agentrun.js +2 -2
  95. package/dist/esm/models/components/agentrun.js.map +1 -1
  96. package/dist/esm/models/components/agentruncreate.d.ts +2 -2
  97. package/dist/esm/models/components/agentruncreate.d.ts.map +1 -1
  98. package/dist/esm/models/components/agentruncreate.js +2 -2
  99. package/dist/esm/models/components/agentruncreate.js.map +1 -1
  100. package/dist/esm/models/components/chatrequest.d.ts +3 -0
  101. package/dist/esm/models/components/chatrequest.d.ts.map +1 -1
  102. package/dist/esm/models/components/chatrequest.js +3 -0
  103. package/dist/esm/models/components/chatrequest.js.map +1 -1
  104. package/dist/esm/models/components/textrange.d.ts +3 -0
  105. package/dist/esm/models/components/textrange.d.ts.map +1 -1
  106. package/dist/esm/models/components/textrange.js +1 -0
  107. package/dist/esm/models/components/textrange.js.map +1 -1
  108. package/dist/esm/react-query/clientGovernanceDataPoliciesCreate.d.ts +1 -1
  109. package/dist/esm/react-query/clientGovernanceDataPoliciesCreate.js +1 -1
  110. package/dist/esm/react-query/clientGovernanceDataPoliciesDownload.d.ts +2 -2
  111. package/dist/esm/react-query/clientGovernanceDataPoliciesDownload.js +2 -2
  112. package/dist/esm/react-query/clientGovernanceDataPoliciesList.d.ts +2 -2
  113. package/dist/esm/react-query/clientGovernanceDataPoliciesList.js +2 -2
  114. package/dist/esm/react-query/clientGovernanceDataPoliciesRetrieve.d.ts +2 -2
  115. package/dist/esm/react-query/clientGovernanceDataPoliciesRetrieve.js +2 -2
  116. package/dist/esm/react-query/clientGovernanceDataPoliciesUpdate.d.ts +1 -1
  117. package/dist/esm/react-query/clientGovernanceDataPoliciesUpdate.js +1 -1
  118. package/dist/esm/react-query/clientGovernanceDataReportsCreate.d.ts +1 -1
  119. package/dist/esm/react-query/clientGovernanceDataReportsCreate.js +1 -1
  120. package/dist/esm/react-query/clientGovernanceDataReportsDownload.d.ts +2 -2
  121. package/dist/esm/react-query/clientGovernanceDataReportsDownload.js +2 -2
  122. package/dist/esm/react-query/clientGovernanceDataReportsStatus.d.ts +2 -2
  123. package/dist/esm/react-query/clientGovernanceDataReportsStatus.js +2 -2
  124. package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.d.ts +1 -1
  125. package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.js +1 -1
  126. package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesList.d.ts +2 -2
  127. package/dist/esm/react-query/clientGovernanceDocumentsVisibilityoverridesList.js +2 -2
  128. package/dist/esm/sdk/policies.d.ts +5 -5
  129. package/dist/esm/sdk/policies.js +5 -5
  130. package/dist/esm/sdk/reports.d.ts +3 -3
  131. package/dist/esm/sdk/reports.js +3 -3
  132. package/dist/esm/sdk/visibilityoverrides.d.ts +2 -2
  133. package/dist/esm/sdk/visibilityoverrides.js +2 -2
  134. package/docs/sdks/agents/README.md +12 -4
  135. package/docs/sdks/policies/README.md +5 -5
  136. package/docs/sdks/reports/README.md +3 -3
  137. package/docs/sdks/visibilityoverrides/README.md +2 -2
  138. package/jsr.json +1 -1
  139. package/package.json +1 -1
  140. package/src/__tests__/agents.test.ts +3 -1
  141. package/src/funcs/clientGovernanceDataPoliciesCreate.ts +1 -1
  142. package/src/funcs/clientGovernanceDataPoliciesDownload.ts +1 -1
  143. package/src/funcs/clientGovernanceDataPoliciesList.ts +1 -1
  144. package/src/funcs/clientGovernanceDataPoliciesRetrieve.ts +1 -1
  145. package/src/funcs/clientGovernanceDataPoliciesUpdate.ts +1 -1
  146. package/src/funcs/clientGovernanceDataReportsCreate.ts +1 -1
  147. package/src/funcs/clientGovernanceDataReportsDownload.ts +1 -1
  148. package/src/funcs/clientGovernanceDataReportsStatus.ts +1 -1
  149. package/src/funcs/clientGovernanceDocumentsVisibilityoverridesCreate.ts +1 -1
  150. package/src/funcs/clientGovernanceDocumentsVisibilityoverridesList.ts +1 -1
  151. package/src/lib/config.ts +2 -2
  152. package/src/models/components/agentrun.ts +4 -4
  153. package/src/models/components/agentruncreate.ts +4 -4
  154. package/src/models/components/chatrequest.ts +10 -0
  155. package/src/models/components/textrange.ts +1 -0
  156. package/src/react-query/clientGovernanceDataPoliciesCreate.ts +1 -1
  157. package/src/react-query/clientGovernanceDataPoliciesDownload.ts +2 -2
  158. package/src/react-query/clientGovernanceDataPoliciesList.ts +2 -2
  159. package/src/react-query/clientGovernanceDataPoliciesRetrieve.ts +2 -2
  160. package/src/react-query/clientGovernanceDataPoliciesUpdate.ts +1 -1
  161. package/src/react-query/clientGovernanceDataReportsCreate.ts +1 -1
  162. package/src/react-query/clientGovernanceDataReportsDownload.ts +2 -2
  163. package/src/react-query/clientGovernanceDataReportsStatus.ts +2 -2
  164. package/src/react-query/clientGovernanceDocumentsVisibilityoverridesCreate.ts +1 -1
  165. package/src/react-query/clientGovernanceDocumentsVisibilityoverridesList.ts +2 -2
  166. package/src/sdk/policies.ts +5 -5
  167. package/src/sdk/reports.ts +3 -3
  168. 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.
@@ -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 Policy.
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.
@@ -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 Policy.
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.
@@ -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/Un-hide docs.
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/Un-hide docs.
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.
@@ -316,7 +316,9 @@ const glean = new Glean({
316
316
  });
317
317
 
318
318
  async function run() {
319
- const result = await glean.client.agents.runStream({});
319
+ const result = await glean.client.agents.runStream({
320
+ agentId: "<id>",
321
+ });
320
322
 
321
323
  // Handle the result
322
324
  console.log(result);
@@ -340,7 +342,9 @@ const glean = new GleanCore({
340
342
  });
341
343
 
342
344
  async function run() {
343
- const res = await clientAgentsRunStream(glean, {});
345
+ const res = await clientAgentsRunStream(glean, {
346
+ agentId: "<id>",
347
+ });
344
348
 
345
349
  if (!res.ok) {
346
350
  throw res.error;
@@ -405,7 +409,9 @@ const glean = new Glean({
405
409
  });
406
410
 
407
411
  async function run() {
408
- const result = await glean.client.agents.run({});
412
+ const result = await glean.client.agents.run({
413
+ agentId: "<id>",
414
+ });
409
415
 
410
416
  // Handle the result
411
417
  console.log(result);
@@ -429,7 +435,9 @@ const glean = new GleanCore({
429
435
  });
430
436
 
431
437
  async function run() {
432
- const res = await clientAgentsRun(glean, {});
438
+ const res = await clientAgentsRun(glean, {
439
+ agentId: "<id>",
440
+ });
433
441
 
434
442
  if (!res.ok) {
435
443
  throw res.error;
@@ -5,11 +5,11 @@
5
5
 
6
6
  ### Available Operations
7
7
 
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.
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
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [list](#list) - Fetches documents visibility.
9
- * [create](#create) - Hide/Un-hide docs.
8
+ * [list](#list) - Fetches documents visibility
9
+ * [create](#create) - Hide or unhide docs
10
10
 
11
11
  ## list
12
12
 
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.4.3",
5
+ "version": "0.5.1",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gleanwork/api-client",
3
- "version": "0.4.3",
3
+ "version": "0.5.1",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -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,7 +24,7 @@ import { APICall, APIPromise } from "../types/async.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Creates new policy.
27
+ * Creates new policy
28
28
  *
29
29
  * @remarks
30
30
  * Creates a new policy with specified specifications and returns its id.
@@ -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
- * Lists policies.
28
+ * Lists policies
29
29
  *
30
30
  * @remarks
31
31
  * Lists policies with filtering.
@@ -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 Policy.
28
+ * Gets specified policy
29
29
  *
30
30
  * @remarks
31
31
  * Fetches the specified policy version, or the latest if no version is provided.
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Updates an existing policy.
28
+ * Updates an existing policy
29
29
  *
30
30
  * @remarks
31
31
  * Updates an existing policy.
@@ -24,7 +24,7 @@ import { APICall, APIPromise } from "../types/async.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Creates new one-time report.
27
+ * Creates new one-time report
28
28
  *
29
29
  * @remarks
30
30
  * Creates a new one-time report and executes its batch job.
@@ -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 report.
28
+ * Downloads violations CSV for report
29
29
  *
30
30
  * @remarks
31
31
  * Downloads CSV violations report for a specific report id.
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Fetches report run status.
28
+ * Fetches report run status
29
29
  *
30
30
  * @remarks
31
31
  * Fetches the status of the run corresponding to the report-id.
@@ -24,7 +24,7 @@ import { APICall, APIPromise } from "../types/async.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Hide/Un-hide docs.
27
+ * Hide or unhide docs
28
28
  *
29
29
  * @remarks
30
30
  * Sets the visibility-override state of the documents specified, effectively hiding or un-hiding documents.
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Fetches documents visibility.
28
+ * Fetches documents visibility
29
29
  *
30
30
  * @remarks
31
31
  * Fetches the visibility override status of the documents passed.
package/src/lib/config.ts CHANGED
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
66
  openapiDocVersion: "0.9.0",
67
- sdkVersion: "0.4.3",
67
+ sdkVersion: "0.5.1",
68
68
  genVersion: "2.610.0",
69
69
  userAgent:
70
- "speakeasy-sdk/typescript 0.4.3 2.610.0 0.9.0 @gleanwork/api-client",
70
+ "speakeasy-sdk/typescript 0.5.1 2.610.0 0.9.0 @gleanwork/api-client",
71
71
  } as const;
@@ -26,7 +26,7 @@ export type AgentRun = {
26
26
  /**
27
27
  * The ID of the agent to run.
28
28
  */
29
- agentId?: string | undefined;
29
+ agentId: string;
30
30
  /**
31
31
  * The input to the agent.
32
32
  */
@@ -47,7 +47,7 @@ export const AgentRun$inboundSchema: z.ZodType<
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.object({
50
- agent_id: z.string().optional(),
50
+ agent_id: z.string(),
51
51
  input: z.record(z.any()).optional(),
52
52
  messages: z.array(Message$inboundSchema).optional(),
53
53
  status: AgentExecutionStatus$inboundSchema.optional(),
@@ -59,7 +59,7 @@ export const AgentRun$inboundSchema: z.ZodType<
59
59
 
60
60
  /** @internal */
61
61
  export type AgentRun$Outbound = {
62
- agent_id?: string | undefined;
62
+ agent_id: string;
63
63
  input?: { [k: string]: any } | undefined;
64
64
  messages?: Array<Message$Outbound> | undefined;
65
65
  status?: string | undefined;
@@ -71,7 +71,7 @@ export const AgentRun$outboundSchema: z.ZodType<
71
71
  z.ZodTypeDef,
72
72
  AgentRun
73
73
  > = z.object({
74
- agentId: z.string().optional(),
74
+ agentId: z.string(),
75
75
  input: z.record(z.any()).optional(),
76
76
  messages: z.array(Message$outboundSchema).optional(),
77
77
  status: AgentExecutionStatus$outboundSchema.optional(),
@@ -21,7 +21,7 @@ export type AgentRunCreate = {
21
21
  /**
22
22
  * The ID of the agent to run.
23
23
  */
24
- agentId?: string | undefined;
24
+ agentId: string;
25
25
  /**
26
26
  * The input to the agent.
27
27
  */
@@ -38,7 +38,7 @@ export const AgentRunCreate$inboundSchema: z.ZodType<
38
38
  z.ZodTypeDef,
39
39
  unknown
40
40
  > = z.object({
41
- agent_id: z.string().optional(),
41
+ agent_id: z.string(),
42
42
  input: z.record(z.any()).optional(),
43
43
  messages: z.array(Message$inboundSchema).optional(),
44
44
  }).transform((v) => {
@@ -49,7 +49,7 @@ export const AgentRunCreate$inboundSchema: z.ZodType<
49
49
 
50
50
  /** @internal */
51
51
  export type AgentRunCreate$Outbound = {
52
- agent_id?: string | undefined;
52
+ agent_id: string;
53
53
  input?: { [k: string]: any } | undefined;
54
54
  messages?: Array<Message$Outbound> | undefined;
55
55
  };
@@ -60,7 +60,7 @@ export const AgentRunCreate$outboundSchema: z.ZodType<
60
60
  z.ZodTypeDef,
61
61
  AgentRunCreate
62
62
  > = z.object({
63
- agentId: z.string().optional(),
63
+ agentId: z.string(),
64
64
  input: z.record(z.any()).optional(),
65
65
  messages: z.array(Message$outboundSchema).optional(),
66
66
  }).transform((v) => {
@@ -24,6 +24,12 @@ import {
24
24
  ChatRestrictionFilters$Outbound,
25
25
  ChatRestrictionFilters$outboundSchema,
26
26
  } from "./chatrestrictionfilters.js";
27
+ import {
28
+ SessionInfo,
29
+ SessionInfo$inboundSchema,
30
+ SessionInfo$Outbound,
31
+ SessionInfo$outboundSchema,
32
+ } from "./sessioninfo.js";
27
33
 
28
34
  export type ChatRequest = {
29
35
  /**
@@ -48,6 +54,7 @@ export type ChatRequest = {
48
54
  * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer.
49
55
  */
50
56
  timeoutMillis?: number | undefined;
57
+ sessionInfo?: SessionInfo | undefined;
51
58
  /**
52
59
  * The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used.
53
60
  */
@@ -71,6 +78,7 @@ export const ChatRequest$inboundSchema: z.ZodType<
71
78
  inclusions: ChatRestrictionFilters$inboundSchema.optional(),
72
79
  exclusions: ChatRestrictionFilters$inboundSchema.optional(),
73
80
  timeoutMillis: z.number().int().optional(),
81
+ sessionInfo: SessionInfo$inboundSchema.optional(),
74
82
  applicationId: z.string().optional(),
75
83
  stream: z.boolean().optional(),
76
84
  });
@@ -84,6 +92,7 @@ export type ChatRequest$Outbound = {
84
92
  inclusions?: ChatRestrictionFilters$Outbound | undefined;
85
93
  exclusions?: ChatRestrictionFilters$Outbound | undefined;
86
94
  timeoutMillis?: number | undefined;
95
+ sessionInfo?: SessionInfo$Outbound | undefined;
87
96
  applicationId?: string | undefined;
88
97
  stream?: boolean | undefined;
89
98
  };
@@ -101,6 +110,7 @@ export const ChatRequest$outboundSchema: z.ZodType<
101
110
  inclusions: ChatRestrictionFilters$outboundSchema.optional(),
102
111
  exclusions: ChatRestrictionFilters$outboundSchema.optional(),
103
112
  timeoutMillis: z.number().int().optional(),
113
+ sessionInfo: SessionInfo$outboundSchema.optional(),
104
114
  applicationId: z.string().optional(),
105
115
  stream: z.boolean().optional(),
106
116
  });
@@ -17,6 +17,7 @@ import {
17
17
  export const TextRangeType = {
18
18
  Bold: "BOLD",
19
19
  Citation: "CITATION",
20
+ Highlight: "HIGHLIGHT",
20
21
  Link: "LINK",
21
22
  } as const;
22
23
  export type TextRangeType = ClosedEnum<typeof TextRangeType>;
@@ -25,7 +25,7 @@ export type ClientGovernanceDataPoliciesCreateMutationData =
25
25
  components.CreateDlpReportResponse;
26
26
 
27
27
  /**
28
- * Creates new policy.
28
+ * Creates new policy
29
29
  *
30
30
  * @remarks
31
31
  * Creates a new policy with specified specifications and returns its id.
@@ -27,7 +27,7 @@ import {
27
27
  export type ClientGovernanceDataPoliciesDownloadQueryData = string;
28
28
 
29
29
  /**
30
- * Downloads violations CSV for policy.
30
+ * Downloads violations CSV for policy
31
31
  *
32
32
  * @remarks
33
33
  * Downloads CSV violations report for a specific policy id. This does not support continuous policies.
@@ -48,7 +48,7 @@ export function useClientGovernanceDataPoliciesDownload(
48
48
  }
49
49
 
50
50
  /**
51
- * Downloads violations CSV for policy.
51
+ * Downloads violations CSV for policy
52
52
  *
53
53
  * @remarks
54
54
  * Downloads CSV violations report for a specific policy id. This does not support continuous policies.
@@ -29,7 +29,7 @@ export type ClientGovernanceDataPoliciesListQueryData =
29
29
  components.ListDlpReportsResponse;
30
30
 
31
31
  /**
32
- * Lists policies.
32
+ * Lists policies
33
33
  *
34
34
  * @remarks
35
35
  * Lists policies with filtering.
@@ -52,7 +52,7 @@ export function useClientGovernanceDataPoliciesList(
52
52
  }
53
53
 
54
54
  /**
55
- * Lists policies.
55
+ * Lists policies
56
56
  *
57
57
  * @remarks
58
58
  * Lists policies with filtering.
@@ -29,7 +29,7 @@ export type ClientGovernanceDataPoliciesRetrieveQueryData =
29
29
  components.GetDlpReportResponse;
30
30
 
31
31
  /**
32
- * Gets specified Policy.
32
+ * Gets specified policy
33
33
  *
34
34
  * @remarks
35
35
  * Fetches the specified policy version, or the latest if no version is provided.
@@ -52,7 +52,7 @@ export function useClientGovernanceDataPoliciesRetrieve(
52
52
  }
53
53
 
54
54
  /**
55
- * Gets specified Policy.
55
+ * Gets specified policy
56
56
  *
57
57
  * @remarks
58
58
  * Fetches the specified policy version, or the latest if no version is provided.
@@ -26,7 +26,7 @@ export type ClientGovernanceDataPoliciesUpdateMutationData =
26
26
  components.UpdateDlpReportResponse;
27
27
 
28
28
  /**
29
- * Updates an existing policy.
29
+ * Updates an existing policy
30
30
  *
31
31
  * @remarks
32
32
  * Updates an existing policy.
@@ -25,7 +25,7 @@ export type ClientGovernanceDataReportsCreateMutationData =
25
25
  components.UpdateDlpConfigResponse;
26
26
 
27
27
  /**
28
- * Creates new one-time report.
28
+ * Creates new one-time report
29
29
  *
30
30
  * @remarks
31
31
  * Creates a new one-time report and executes its batch job.
@@ -27,7 +27,7 @@ import {
27
27
  export type ClientGovernanceDataReportsDownloadQueryData = string;
28
28
 
29
29
  /**
30
- * Downloads violations CSV for report.
30
+ * Downloads violations CSV for report
31
31
  *
32
32
  * @remarks
33
33
  * Downloads CSV violations report for a specific report id.
@@ -48,7 +48,7 @@ export function useClientGovernanceDataReportsDownload(
48
48
  }
49
49
 
50
50
  /**
51
- * Downloads violations CSV for report.
51
+ * Downloads violations CSV for report
52
52
  *
53
53
  * @remarks
54
54
  * Downloads CSV violations report for a specific report id.