@gleanwork/api-client 0.14.17 → 0.14.18

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 (69) hide show
  1. package/dist/commonjs/__tests__/messages.test.js +1 -1
  2. package/dist/commonjs/__tests__/summarize.test.js +3 -3
  3. package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
  4. package/dist/commonjs/lib/config.d.ts +3 -3
  5. package/dist/commonjs/lib/config.js +3 -3
  6. package/dist/commonjs/models/components/agentstimesavedinsight.d.ts +4 -0
  7. package/dist/commonjs/models/components/agentstimesavedinsight.d.ts.map +1 -1
  8. package/dist/commonjs/models/components/agentstimesavedinsight.js +1 -0
  9. package/dist/commonjs/models/components/agentstimesavedinsight.js.map +1 -1
  10. package/dist/commonjs/models/components/dlpexportfindingsrequest.d.ts +10 -4
  11. package/dist/commonjs/models/components/dlpexportfindingsrequest.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/dlpexportfindingsrequest.js +6 -5
  13. package/dist/commonjs/models/components/dlpexportfindingsrequest.js.map +1 -1
  14. package/dist/commonjs/models/components/dlpissuefilter.d.ts +58 -0
  15. package/dist/commonjs/models/components/dlpissuefilter.d.ts.map +1 -0
  16. package/dist/commonjs/models/components/dlpissuefilter.js +82 -0
  17. package/dist/commonjs/models/components/dlpissuefilter.js.map +1 -0
  18. package/dist/commonjs/models/components/exportinfo.d.ts +23 -0
  19. package/dist/commonjs/models/components/exportinfo.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/exportinfo.js +14 -1
  21. package/dist/commonjs/models/components/exportinfo.js.map +1 -1
  22. package/dist/commonjs/models/components/index.d.ts +1 -0
  23. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/index.js +1 -0
  25. package/dist/commonjs/models/components/index.js.map +1 -1
  26. package/dist/commonjs/models/components/manualfeedbackinfo.d.ts +4 -0
  27. package/dist/commonjs/models/components/manualfeedbackinfo.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/manualfeedbackinfo.js +4 -0
  29. package/dist/commonjs/models/components/manualfeedbackinfo.js.map +1 -1
  30. package/dist/esm/__tests__/messages.test.js +1 -1
  31. package/dist/esm/__tests__/summarize.test.js +3 -3
  32. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  33. package/dist/esm/lib/config.d.ts +3 -3
  34. package/dist/esm/lib/config.js +3 -3
  35. package/dist/esm/models/components/agentstimesavedinsight.d.ts +4 -0
  36. package/dist/esm/models/components/agentstimesavedinsight.d.ts.map +1 -1
  37. package/dist/esm/models/components/agentstimesavedinsight.js +1 -0
  38. package/dist/esm/models/components/agentstimesavedinsight.js.map +1 -1
  39. package/dist/esm/models/components/dlpexportfindingsrequest.d.ts +10 -4
  40. package/dist/esm/models/components/dlpexportfindingsrequest.d.ts.map +1 -1
  41. package/dist/esm/models/components/dlpexportfindingsrequest.js +5 -4
  42. package/dist/esm/models/components/dlpexportfindingsrequest.js.map +1 -1
  43. package/dist/esm/models/components/dlpissuefilter.d.ts +58 -0
  44. package/dist/esm/models/components/dlpissuefilter.d.ts.map +1 -0
  45. package/dist/esm/models/components/dlpissuefilter.js +44 -0
  46. package/dist/esm/models/components/dlpissuefilter.js.map +1 -0
  47. package/dist/esm/models/components/exportinfo.d.ts +23 -0
  48. package/dist/esm/models/components/exportinfo.d.ts.map +1 -1
  49. package/dist/esm/models/components/exportinfo.js +13 -0
  50. package/dist/esm/models/components/exportinfo.js.map +1 -1
  51. package/dist/esm/models/components/index.d.ts +1 -0
  52. package/dist/esm/models/components/index.d.ts.map +1 -1
  53. package/dist/esm/models/components/index.js +1 -0
  54. package/dist/esm/models/components/index.js.map +1 -1
  55. package/dist/esm/models/components/manualfeedbackinfo.d.ts +4 -0
  56. package/dist/esm/models/components/manualfeedbackinfo.d.ts.map +1 -1
  57. package/dist/esm/models/components/manualfeedbackinfo.js +4 -0
  58. package/dist/esm/models/components/manualfeedbackinfo.js.map +1 -1
  59. package/jsr.json +1 -1
  60. package/package.json +1 -1
  61. package/src/__tests__/messages.test.ts +1 -1
  62. package/src/__tests__/summarize.test.ts +3 -3
  63. package/src/lib/config.ts +3 -3
  64. package/src/models/components/agentstimesavedinsight.ts +5 -0
  65. package/src/models/components/dlpexportfindingsrequest.ts +20 -6
  66. package/src/models/components/dlpissuefilter.ts +122 -0
  67. package/src/models/components/exportinfo.ts +34 -0
  68. package/src/models/components/index.ts +1 -0
  69. package/src/models/components/manualfeedbackinfo.ts +4 -0
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.14.17",
5
+ "version": "0.14.18",
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.14.17",
3
+ "version": "0.14.18",
4
4
  "author": "Speakeasy",
5
5
  "tshy": {
6
6
  "sourceDialects": [
@@ -20,7 +20,7 @@ test("Messages Messages", async () => {
20
20
  idType: "CONVERSATION_ID",
21
21
  id: "<id>",
22
22
  timestampMillis: 558834,
23
- datasource: "SLACK",
23
+ datasource: "GCHAT",
24
24
  });
25
25
  expect(result).toBeDefined();
26
26
  });
@@ -19,11 +19,11 @@ test("Summarize Summarize", async () => {
19
19
  const result = await glean.client.documents.summarize({
20
20
  documentSpecs: [
21
21
  {
22
- ugcType: "COLLECTIONS",
23
- contentId: 993975,
22
+ id: "<id>",
24
23
  },
25
24
  {
26
- id: "<id>",
25
+ ugcType: "COLLECTIONS",
26
+ contentId: 886976,
27
27
  },
28
28
  ],
29
29
  });
package/src/lib/config.ts CHANGED
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "0.9.0",
76
- sdkVersion: "0.14.17",
77
- genVersion: "2.879.11",
76
+ sdkVersion: "0.14.18",
77
+ genVersion: "2.879.13",
78
78
  userAgent:
79
- "speakeasy-sdk/typescript 0.14.17 2.879.11 0.9.0 @gleanwork/api-client",
79
+ "speakeasy-sdk/typescript 0.14.18 2.879.13 0.9.0 @gleanwork/api-client",
80
80
  } as const;
@@ -34,6 +34,10 @@ export type AgentsTimeSavedInsight = {
34
34
  * Average minutes saved per run for this agent over the specified time period.
35
35
  */
36
36
  minsPerRun?: number | undefined;
37
+ /**
38
+ * Total number of users who provided feedback on time saved for this agent over the specified time period.
39
+ */
40
+ feedbackUserCount?: number | undefined;
37
41
  };
38
42
 
39
43
  /** @internal */
@@ -48,6 +52,7 @@ export const AgentsTimeSavedInsight$inboundSchema: z.ZodType<
48
52
  isDeleted: z.boolean().optional(),
49
53
  runCount: z.number().int().optional(),
50
54
  minsPerRun: z.number().optional(),
55
+ feedbackUserCount: z.number().int().optional(),
51
56
  });
52
57
 
53
58
  export function agentsTimeSavedInsightFromJSON(
@@ -10,11 +10,16 @@ import {
10
10
  DlpFindingFilter$Outbound,
11
11
  DlpFindingFilter$outboundSchema,
12
12
  } from "./dlpfindingfilter.js";
13
+ import {
14
+ DlpIssueFilter,
15
+ DlpIssueFilter$Outbound,
16
+ DlpIssueFilter$outboundSchema,
17
+ } from "./dlpissuefilter.js";
13
18
 
14
19
  /**
15
20
  * The type of export to perform
16
21
  */
17
- export const ExportType = {
22
+ export const DlpExportFindingsRequestExportType = {
18
23
  Findings: "FINDINGS",
19
24
  Documents: "DOCUMENTS",
20
25
  Issues: "ISSUES",
@@ -22,7 +27,9 @@ export const ExportType = {
22
27
  /**
23
28
  * The type of export to perform
24
29
  */
25
- export type ExportType = ClosedEnum<typeof ExportType>;
30
+ export type DlpExportFindingsRequestExportType = ClosedEnum<
31
+ typeof DlpExportFindingsRequestExportType
32
+ >;
26
33
 
27
34
  /**
28
35
  * Controls which fields to include in the export
@@ -41,8 +48,12 @@ export type DlpExportFindingsRequest = {
41
48
  /**
42
49
  * The type of export to perform
43
50
  */
44
- exportType?: ExportType | undefined;
51
+ exportType?: DlpExportFindingsRequestExportType | undefined;
45
52
  filter?: DlpFindingFilter | undefined;
53
+ /**
54
+ * Filter for DLP issues. Includes document-level filters and issue-specific filters.
55
+ */
56
+ issueFilter?: DlpIssueFilter | undefined;
46
57
  /**
47
58
  * The name of the file to export the findings to
48
59
  */
@@ -58,8 +69,9 @@ export type DlpExportFindingsRequest = {
58
69
  };
59
70
 
60
71
  /** @internal */
61
- export const ExportType$outboundSchema: z.ZodNativeEnum<typeof ExportType> = z
62
- .nativeEnum(ExportType);
72
+ export const DlpExportFindingsRequestExportType$outboundSchema: z.ZodNativeEnum<
73
+ typeof DlpExportFindingsRequestExportType
74
+ > = z.nativeEnum(DlpExportFindingsRequestExportType);
63
75
 
64
76
  /** @internal */
65
77
  export const FieldScope$outboundSchema: z.ZodNativeEnum<typeof FieldScope> = z
@@ -69,6 +81,7 @@ export const FieldScope$outboundSchema: z.ZodNativeEnum<typeof FieldScope> = z
69
81
  export type DlpExportFindingsRequest$Outbound = {
70
82
  exportType?: string | undefined;
71
83
  filter?: DlpFindingFilter$Outbound | undefined;
84
+ issueFilter?: DlpIssueFilter$Outbound | undefined;
72
85
  fileName?: string | undefined;
73
86
  fieldScope?: string | undefined;
74
87
  fieldsToExclude?: Array<string> | undefined;
@@ -80,8 +93,9 @@ export const DlpExportFindingsRequest$outboundSchema: z.ZodType<
80
93
  z.ZodTypeDef,
81
94
  DlpExportFindingsRequest
82
95
  > = z.object({
83
- exportType: ExportType$outboundSchema.optional(),
96
+ exportType: DlpExportFindingsRequestExportType$outboundSchema.optional(),
84
97
  filter: DlpFindingFilter$outboundSchema.optional(),
98
+ issueFilter: DlpIssueFilter$outboundSchema.optional(),
85
99
  fileName: z.string().optional(),
86
100
  fieldScope: FieldScope$outboundSchema.optional(),
87
101
  fieldsToExclude: z.array(z.string()).optional(),
@@ -0,0 +1,122 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9bb0d9158454
4
+ */
5
+
6
+ import * as z from "zod/v3";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ DlpIssueStatus,
12
+ DlpIssueStatus$inboundSchema,
13
+ DlpIssueStatus$outboundSchema,
14
+ } from "./dlpissuestatus.js";
15
+ import {
16
+ DlpSeverity,
17
+ DlpSeverity$inboundSchema,
18
+ DlpSeverity$outboundSchema,
19
+ } from "./dlpseverity.js";
20
+ import {
21
+ TimeRangeFilter,
22
+ TimeRangeFilter$inboundSchema,
23
+ TimeRangeFilter$Outbound,
24
+ TimeRangeFilter$outboundSchema,
25
+ } from "./timerangefilter.js";
26
+
27
+ /**
28
+ * Filter for DLP issues. Includes document-level filters and issue-specific filters.
29
+ */
30
+ export type DlpIssueFilter = {
31
+ /**
32
+ * Text to search for in issue fields.
33
+ */
34
+ searchText?: string | undefined;
35
+ /**
36
+ * Filter by one or more issue statuses.
37
+ */
38
+ statuses?: Array<DlpIssueStatus> | undefined;
39
+ /**
40
+ * Filter by assignee user ID.
41
+ */
42
+ assigneeId?: string | undefined;
43
+ infoType?: string | undefined;
44
+ regexId?: string | undefined;
45
+ /**
46
+ * Filter by one or more report/policy IDs.
47
+ */
48
+ reportIds?: Array<string> | undefined;
49
+ docId?: string | undefined;
50
+ datasource?: string | undefined;
51
+ visibility?: string | undefined;
52
+ /**
53
+ * Filter by one or more severity levels.
54
+ */
55
+ severities?: Array<DlpSeverity> | undefined;
56
+ timeRange?: TimeRangeFilter | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const DlpIssueFilter$inboundSchema: z.ZodType<
61
+ DlpIssueFilter,
62
+ z.ZodTypeDef,
63
+ unknown
64
+ > = z.object({
65
+ searchText: z.string().optional(),
66
+ statuses: z.array(DlpIssueStatus$inboundSchema).optional(),
67
+ assigneeId: z.string().optional(),
68
+ infoType: z.string().optional(),
69
+ regexId: z.string().optional(),
70
+ reportIds: z.array(z.string()).optional(),
71
+ docId: z.string().optional(),
72
+ datasource: z.string().optional(),
73
+ visibility: z.string().optional(),
74
+ severities: z.array(DlpSeverity$inboundSchema).optional(),
75
+ timeRange: TimeRangeFilter$inboundSchema.optional(),
76
+ });
77
+ /** @internal */
78
+ export type DlpIssueFilter$Outbound = {
79
+ searchText?: string | undefined;
80
+ statuses?: Array<string> | undefined;
81
+ assigneeId?: string | undefined;
82
+ infoType?: string | undefined;
83
+ regexId?: string | undefined;
84
+ reportIds?: Array<string> | undefined;
85
+ docId?: string | undefined;
86
+ datasource?: string | undefined;
87
+ visibility?: string | undefined;
88
+ severities?: Array<string> | undefined;
89
+ timeRange?: TimeRangeFilter$Outbound | undefined;
90
+ };
91
+
92
+ /** @internal */
93
+ export const DlpIssueFilter$outboundSchema: z.ZodType<
94
+ DlpIssueFilter$Outbound,
95
+ z.ZodTypeDef,
96
+ DlpIssueFilter
97
+ > = z.object({
98
+ searchText: z.string().optional(),
99
+ statuses: z.array(DlpIssueStatus$outboundSchema).optional(),
100
+ assigneeId: z.string().optional(),
101
+ infoType: z.string().optional(),
102
+ regexId: z.string().optional(),
103
+ reportIds: z.array(z.string()).optional(),
104
+ docId: z.string().optional(),
105
+ datasource: z.string().optional(),
106
+ visibility: z.string().optional(),
107
+ severities: z.array(DlpSeverity$outboundSchema).optional(),
108
+ timeRange: TimeRangeFilter$outboundSchema.optional(),
109
+ });
110
+
111
+ export function dlpIssueFilterToJSON(dlpIssueFilter: DlpIssueFilter): string {
112
+ return JSON.stringify(DlpIssueFilter$outboundSchema.parse(dlpIssueFilter));
113
+ }
114
+ export function dlpIssueFilterFromJSON(
115
+ jsonString: string,
116
+ ): SafeParseResult<DlpIssueFilter, SDKValidationError> {
117
+ return safeParse(
118
+ jsonString,
119
+ (x) => DlpIssueFilter$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'DlpIssueFilter' from JSON`,
121
+ );
122
+ }
@@ -13,8 +13,25 @@ import {
13
13
  DlpFindingFilter,
14
14
  DlpFindingFilter$inboundSchema,
15
15
  } from "./dlpfindingfilter.js";
16
+ import {
17
+ DlpIssueFilter,
18
+ DlpIssueFilter$inboundSchema,
19
+ } from "./dlpissuefilter.js";
16
20
  import { DlpPerson, DlpPerson$inboundSchema } from "./dlpperson.js";
17
21
 
22
+ /**
23
+ * The type of export to perform
24
+ */
25
+ export const ExportInfoExportType = {
26
+ Findings: "FINDINGS",
27
+ Documents: "DOCUMENTS",
28
+ Issues: "ISSUES",
29
+ } as const;
30
+ /**
31
+ * The type of export to perform
32
+ */
33
+ export type ExportInfoExportType = OpenEnum<typeof ExportInfoExportType>;
34
+
18
35
  /**
19
36
  * The status of the export
20
37
  */
@@ -49,7 +66,15 @@ export type ExportInfo = {
49
66
  * The name of the file to export the findings to
50
67
  */
51
68
  fileName?: string | undefined;
69
+ /**
70
+ * The type of export to perform
71
+ */
72
+ exportType?: ExportInfoExportType | undefined;
52
73
  filter?: DlpFindingFilter | undefined;
74
+ /**
75
+ * Filter for DLP issues. Includes document-level filters and issue-specific filters.
76
+ */
77
+ issueFilter?: DlpIssueFilter | undefined;
53
78
  /**
54
79
  * The status of the export
55
80
  */
@@ -60,6 +85,13 @@ export type ExportInfo = {
60
85
  exportSize?: number | undefined;
61
86
  };
62
87
 
88
+ /** @internal */
89
+ export const ExportInfoExportType$inboundSchema: z.ZodType<
90
+ ExportInfoExportType,
91
+ z.ZodTypeDef,
92
+ unknown
93
+ > = openEnums.inboundSchema(ExportInfoExportType);
94
+
63
95
  /** @internal */
64
96
  export const ExportInfoStatus$inboundSchema: z.ZodType<
65
97
  ExportInfoStatus,
@@ -78,7 +110,9 @@ export const ExportInfo$inboundSchema: z.ZodType<
78
110
  endTime: z.string().optional(),
79
111
  exportId: z.string().optional(),
80
112
  fileName: z.string().optional(),
113
+ exportType: ExportInfoExportType$inboundSchema.optional(),
81
114
  filter: DlpFindingFilter$inboundSchema.optional(),
115
+ issueFilter: DlpIssueFilter$inboundSchema.optional(),
82
116
  status: ExportInfoStatus$inboundSchema.optional(),
83
117
  exportSize: z.number().int().optional(),
84
118
  });
@@ -159,6 +159,7 @@ export * from "./dlpconfig.js";
159
159
  export * from "./dlpexportfindingsrequest.js";
160
160
  export * from "./dlpfindingfilter.js";
161
161
  export * from "./dlpfrequency.js";
162
+ export * from "./dlpissuefilter.js";
162
163
  export * from "./dlpissuestatus.js";
163
164
  export * from "./dlpperson.js";
164
165
  export * from "./dlppersonmetadata.js";
@@ -46,6 +46,10 @@ export type ManualFeedbackInfoSource = ClosedEnum<
46
46
  >;
47
47
 
48
48
  export const Issue = {
49
+ AgentCanvasFailed: "AGENT_CANVAS_FAILED",
50
+ AgentClarifyingQuestions: "AGENT_CLARIFYING_QUESTIONS",
51
+ AgentIntermediateStepsFailed: "AGENT_INTERMEDIATE_STEPS_FAILED",
52
+ AgentToolCallFailed: "AGENT_TOOL_CALL_FAILED",
49
53
  InaccurateResponse: "INACCURATE_RESPONSE",
50
54
  IncompleteOrNoAnswer: "INCOMPLETE_OR_NO_ANSWER",
51
55
  IncorrectCitation: "INCORRECT_CITATION",