@gleanwork/api-client 0.11.2 → 0.12.0

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 (152) hide show
  1. package/README.md +0 -7
  2. package/dist/commonjs/__tests__/summarize.test.js +2 -4
  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/agentsinsightsv2response.d.ts +60 -0
  7. package/dist/commonjs/models/components/agentsinsightsv2response.d.ts.map +1 -0
  8. package/dist/commonjs/models/components/agentsinsightsv2response.js +91 -0
  9. package/dist/commonjs/models/components/agentsinsightsv2response.js.map +1 -0
  10. package/dist/commonjs/models/components/agentsusagebydepartmentinsight.d.ts +57 -0
  11. package/dist/commonjs/models/components/agentsusagebydepartmentinsight.d.ts.map +1 -0
  12. package/dist/commonjs/models/components/agentsusagebydepartmentinsight.js +79 -0
  13. package/dist/commonjs/models/components/agentsusagebydepartmentinsight.js.map +1 -0
  14. package/dist/commonjs/models/components/agentusersinsight.d.ts +55 -0
  15. package/dist/commonjs/models/components/agentusersinsight.d.ts.map +1 -0
  16. package/dist/commonjs/models/components/agentusersinsight.js +80 -0
  17. package/dist/commonjs/models/components/agentusersinsight.js.map +1 -0
  18. package/dist/commonjs/models/components/assistantinsightsresponse.d.ts +69 -0
  19. package/dist/commonjs/models/components/assistantinsightsresponse.d.ts.map +1 -0
  20. package/dist/commonjs/models/components/assistantinsightsresponse.js +97 -0
  21. package/dist/commonjs/models/components/assistantinsightsresponse.js.map +1 -0
  22. package/dist/commonjs/models/components/currentactiveusers.d.ts +37 -0
  23. package/dist/commonjs/models/components/currentactiveusers.d.ts.map +1 -0
  24. package/dist/commonjs/models/components/currentactiveusers.js +71 -0
  25. package/dist/commonjs/models/components/currentactiveusers.js.map +1 -0
  26. package/dist/commonjs/models/components/feedrequest.d.ts +3 -0
  27. package/dist/commonjs/models/components/feedrequest.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/feedrequest.js +1 -0
  29. package/dist/commonjs/models/components/feedrequest.js.map +1 -1
  30. package/dist/commonjs/models/components/feedresult.d.ts +3 -0
  31. package/dist/commonjs/models/components/feedresult.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/feedresult.js +1 -0
  33. package/dist/commonjs/models/components/feedresult.js.map +1 -1
  34. package/dist/commonjs/models/components/index.d.ts +11 -0
  35. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/index.js +11 -0
  37. package/dist/commonjs/models/components/index.js.map +1 -1
  38. package/dist/commonjs/models/components/insightschatsummary.d.ts +47 -0
  39. package/dist/commonjs/models/components/insightschatsummary.d.ts.map +1 -0
  40. package/dist/commonjs/models/components/insightschatsummary.js +75 -0
  41. package/dist/commonjs/models/components/insightschatsummary.js.map +1 -0
  42. package/dist/commonjs/models/components/insightsoverviewresponse.d.ts +149 -0
  43. package/dist/commonjs/models/components/insightsoverviewresponse.d.ts.map +1 -0
  44. package/dist/commonjs/models/components/insightsoverviewresponse.js +143 -0
  45. package/dist/commonjs/models/components/insightsoverviewresponse.js.map +1 -0
  46. package/dist/commonjs/models/components/insightsresponse.d.ts +13 -0
  47. package/dist/commonjs/models/components/insightsresponse.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/insightsresponse.js +9 -0
  49. package/dist/commonjs/models/components/insightsresponse.js.map +1 -1
  50. package/dist/commonjs/models/components/insightssearchsummary.d.ts +47 -0
  51. package/dist/commonjs/models/components/insightssearchsummary.d.ts.map +1 -0
  52. package/dist/commonjs/models/components/insightssearchsummary.js +75 -0
  53. package/dist/commonjs/models/components/insightssearchsummary.js.map +1 -0
  54. package/dist/commonjs/models/components/peragentinsight.d.ts +47 -0
  55. package/dist/commonjs/models/components/peragentinsight.d.ts.map +1 -0
  56. package/dist/commonjs/models/components/peragentinsight.js +75 -0
  57. package/dist/commonjs/models/components/peragentinsight.js.map +1 -0
  58. package/dist/commonjs/models/components/peruserassistantinsight.d.ts +55 -0
  59. package/dist/commonjs/models/components/peruserassistantinsight.d.ts.map +1 -0
  60. package/dist/commonjs/models/components/peruserassistantinsight.js +80 -0
  61. package/dist/commonjs/models/components/peruserassistantinsight.js.map +1 -0
  62. package/dist/commonjs/models/components/peruserinsight.d.ts +40 -0
  63. package/dist/commonjs/models/components/peruserinsight.d.ts.map +1 -0
  64. package/dist/commonjs/models/components/peruserinsight.js +74 -0
  65. package/dist/commonjs/models/components/peruserinsight.js.map +1 -0
  66. package/dist/esm/__tests__/summarize.test.js +2 -4
  67. package/dist/esm/__tests__/summarize.test.js.map +1 -1
  68. package/dist/esm/lib/config.d.ts +3 -3
  69. package/dist/esm/lib/config.js +3 -3
  70. package/dist/esm/models/components/agentsinsightsv2response.d.ts +60 -0
  71. package/dist/esm/models/components/agentsinsightsv2response.d.ts.map +1 -0
  72. package/dist/esm/models/components/agentsinsightsv2response.js +53 -0
  73. package/dist/esm/models/components/agentsinsightsv2response.js.map +1 -0
  74. package/dist/esm/models/components/agentsusagebydepartmentinsight.d.ts +57 -0
  75. package/dist/esm/models/components/agentsusagebydepartmentinsight.d.ts.map +1 -0
  76. package/dist/esm/models/components/agentsusagebydepartmentinsight.js +41 -0
  77. package/dist/esm/models/components/agentsusagebydepartmentinsight.js.map +1 -0
  78. package/dist/esm/models/components/agentusersinsight.d.ts +55 -0
  79. package/dist/esm/models/components/agentusersinsight.d.ts.map +1 -0
  80. package/dist/esm/models/components/agentusersinsight.js +42 -0
  81. package/dist/esm/models/components/agentusersinsight.js.map +1 -0
  82. package/dist/esm/models/components/assistantinsightsresponse.d.ts +69 -0
  83. package/dist/esm/models/components/assistantinsightsresponse.d.ts.map +1 -0
  84. package/dist/esm/models/components/assistantinsightsresponse.js +59 -0
  85. package/dist/esm/models/components/assistantinsightsresponse.js.map +1 -0
  86. package/dist/esm/models/components/currentactiveusers.d.ts +37 -0
  87. package/dist/esm/models/components/currentactiveusers.d.ts.map +1 -0
  88. package/dist/esm/models/components/currentactiveusers.js +33 -0
  89. package/dist/esm/models/components/currentactiveusers.js.map +1 -0
  90. package/dist/esm/models/components/feedrequest.d.ts +3 -0
  91. package/dist/esm/models/components/feedrequest.d.ts.map +1 -1
  92. package/dist/esm/models/components/feedrequest.js +1 -0
  93. package/dist/esm/models/components/feedrequest.js.map +1 -1
  94. package/dist/esm/models/components/feedresult.d.ts +3 -0
  95. package/dist/esm/models/components/feedresult.d.ts.map +1 -1
  96. package/dist/esm/models/components/feedresult.js +1 -0
  97. package/dist/esm/models/components/feedresult.js.map +1 -1
  98. package/dist/esm/models/components/index.d.ts +11 -0
  99. package/dist/esm/models/components/index.d.ts.map +1 -1
  100. package/dist/esm/models/components/index.js +11 -0
  101. package/dist/esm/models/components/index.js.map +1 -1
  102. package/dist/esm/models/components/insightschatsummary.d.ts +47 -0
  103. package/dist/esm/models/components/insightschatsummary.d.ts.map +1 -0
  104. package/dist/esm/models/components/insightschatsummary.js +37 -0
  105. package/dist/esm/models/components/insightschatsummary.js.map +1 -0
  106. package/dist/esm/models/components/insightsoverviewresponse.d.ts +149 -0
  107. package/dist/esm/models/components/insightsoverviewresponse.d.ts.map +1 -0
  108. package/dist/esm/models/components/insightsoverviewresponse.js +103 -0
  109. package/dist/esm/models/components/insightsoverviewresponse.js.map +1 -0
  110. package/dist/esm/models/components/insightsresponse.d.ts +13 -0
  111. package/dist/esm/models/components/insightsresponse.d.ts.map +1 -1
  112. package/dist/esm/models/components/insightsresponse.js +9 -0
  113. package/dist/esm/models/components/insightsresponse.js.map +1 -1
  114. package/dist/esm/models/components/insightssearchsummary.d.ts +47 -0
  115. package/dist/esm/models/components/insightssearchsummary.d.ts.map +1 -0
  116. package/dist/esm/models/components/insightssearchsummary.js +37 -0
  117. package/dist/esm/models/components/insightssearchsummary.js.map +1 -0
  118. package/dist/esm/models/components/peragentinsight.d.ts +47 -0
  119. package/dist/esm/models/components/peragentinsight.d.ts.map +1 -0
  120. package/dist/esm/models/components/peragentinsight.js +37 -0
  121. package/dist/esm/models/components/peragentinsight.js.map +1 -0
  122. package/dist/esm/models/components/peruserassistantinsight.d.ts +55 -0
  123. package/dist/esm/models/components/peruserassistantinsight.d.ts.map +1 -0
  124. package/dist/esm/models/components/peruserassistantinsight.js +42 -0
  125. package/dist/esm/models/components/peruserassistantinsight.js.map +1 -0
  126. package/dist/esm/models/components/peruserinsight.d.ts +40 -0
  127. package/dist/esm/models/components/peruserinsight.d.ts.map +1 -0
  128. package/dist/esm/models/components/peruserinsight.js +36 -0
  129. package/dist/esm/models/components/peruserinsight.js.map +1 -0
  130. package/examples/package-lock.json +1 -1
  131. package/jsr.json +1 -1
  132. package/package.json +1 -1
  133. package/src/__tests__/summarize.test.ts +2 -4
  134. package/src/lib/config.ts +3 -3
  135. package/src/models/components/agentsinsightsv2response.ts +143 -0
  136. package/src/models/components/agentsusagebydepartmentinsight.ts +106 -0
  137. package/src/models/components/agentusersinsight.ts +107 -0
  138. package/src/models/components/assistantinsightsresponse.ts +142 -0
  139. package/src/models/components/currentactiveusers.ts +76 -0
  140. package/src/models/components/feedrequest.ts +1 -0
  141. package/src/models/components/feedresult.ts +1 -0
  142. package/src/models/components/index.ts +11 -0
  143. package/src/models/components/insightschatsummary.ts +90 -0
  144. package/src/models/components/insightsoverviewresponse.ts +278 -0
  145. package/src/models/components/insightsresponse.ts +34 -0
  146. package/src/models/components/insightssearchsummary.ts +90 -0
  147. package/src/models/components/peragentinsight.ts +88 -0
  148. package/src/models/components/peruserassistantinsight.ts +107 -0
  149. package/src/models/components/peruserinsight.ts +82 -0
  150. package/docs/sdks/client/README.md +0 -6
  151. package/docs/sdks/glean/README.md +0 -23
  152. package/docs/sdks/indexing/README.md +0 -6
@@ -0,0 +1,278 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ CurrentActiveUsers,
11
+ CurrentActiveUsers$inboundSchema,
12
+ CurrentActiveUsers$Outbound,
13
+ CurrentActiveUsers$outboundSchema,
14
+ } from "./currentactiveusers.js";
15
+ import {
16
+ InsightsChatSummary,
17
+ InsightsChatSummary$inboundSchema,
18
+ InsightsChatSummary$Outbound,
19
+ InsightsChatSummary$outboundSchema,
20
+ } from "./insightschatsummary.js";
21
+ import {
22
+ InsightsSearchSummary,
23
+ InsightsSearchSummary$inboundSchema,
24
+ InsightsSearchSummary$Outbound,
25
+ InsightsSearchSummary$outboundSchema,
26
+ } from "./insightssearchsummary.js";
27
+ import {
28
+ LabeledCountInfo,
29
+ LabeledCountInfo$inboundSchema,
30
+ LabeledCountInfo$Outbound,
31
+ LabeledCountInfo$outboundSchema,
32
+ } from "./labeledcountinfo.js";
33
+ import {
34
+ PerUserInsight,
35
+ PerUserInsight$inboundSchema,
36
+ PerUserInsight$Outbound,
37
+ PerUserInsight$outboundSchema,
38
+ } from "./peruserinsight.js";
39
+
40
+ export type EngagementBreakdown = {
41
+ /**
42
+ * Number of non-user employees in the specified departments.
43
+ */
44
+ nonUsers?: number | undefined;
45
+ /**
46
+ * Number of currently dormant users in the specified departments.
47
+ */
48
+ dormantUsers?: number | undefined;
49
+ /**
50
+ * Number of currently regular users in the specified departments.
51
+ */
52
+ regularUsers?: number | undefined;
53
+ /**
54
+ * Number of currently power users in the specified departments.
55
+ */
56
+ powerUsers?: number | undefined;
57
+ };
58
+
59
+ export type InsightsOverviewResponse = {
60
+ /**
61
+ * Number of current Monthly Active Users, in the specified departments.
62
+ */
63
+ monthlyActiveUsers?: number | undefined;
64
+ /**
65
+ * Number of current Weekly Active Users, in the specified departments.
66
+ */
67
+ weeklyActiveUsers?: number | undefined;
68
+ /**
69
+ * Department name(s).
70
+ */
71
+ departments?: Array<string> | undefined;
72
+ /**
73
+ * Number of current employees in the specified departments, according to the Org Chart.
74
+ */
75
+ employeeCount?: number | undefined;
76
+ /**
77
+ * Number of current signed up employees in the specified departments, according to the Org Chart.
78
+ */
79
+ totalSignups?: number | undefined;
80
+ searchSummary?: InsightsSearchSummary | undefined;
81
+ chatSummary?: InsightsChatSummary | undefined;
82
+ extensionSummary?: CurrentActiveUsers | undefined;
83
+ ugcSummary?: CurrentActiveUsers | undefined;
84
+ /**
85
+ * Unix timestamp of the last update for the insights data in the response.
86
+ */
87
+ lastUpdatedTs?: number | undefined;
88
+ /**
89
+ * Search session satisfaction rate, over the specified time period in the specified departments.
90
+ */
91
+ searchSessionSatisfaction?: number | undefined;
92
+ monthlyActiveUserTimeseries?: LabeledCountInfo | undefined;
93
+ weeklyActiveUserTimeseries?: LabeledCountInfo | undefined;
94
+ dailyActiveUserTimeseries?: LabeledCountInfo | undefined;
95
+ /**
96
+ * Counts of search result clicks, by datasource, over the specified time period in the specified departments.
97
+ */
98
+ searchDatasourceCounts?: { [k: string]: number } | undefined;
99
+ /**
100
+ * Counts of cited documents in chat, by datasource, over the specified time period in the specified departments.
101
+ */
102
+ chatDatasourceCounts?: { [k: string]: number } | undefined;
103
+ /**
104
+ * Top power users, over the specified time period in the specified departments.
105
+ */
106
+ perUserInsights?: Array<PerUserInsight> | undefined;
107
+ engagementBreakdown?: EngagementBreakdown | undefined;
108
+ };
109
+
110
+ /** @internal */
111
+ export const EngagementBreakdown$inboundSchema: z.ZodType<
112
+ EngagementBreakdown,
113
+ z.ZodTypeDef,
114
+ unknown
115
+ > = z.object({
116
+ nonUsers: z.number().int().optional(),
117
+ dormantUsers: z.number().int().optional(),
118
+ regularUsers: z.number().int().optional(),
119
+ powerUsers: z.number().int().optional(),
120
+ });
121
+
122
+ /** @internal */
123
+ export type EngagementBreakdown$Outbound = {
124
+ nonUsers?: number | undefined;
125
+ dormantUsers?: number | undefined;
126
+ regularUsers?: number | undefined;
127
+ powerUsers?: number | undefined;
128
+ };
129
+
130
+ /** @internal */
131
+ export const EngagementBreakdown$outboundSchema: z.ZodType<
132
+ EngagementBreakdown$Outbound,
133
+ z.ZodTypeDef,
134
+ EngagementBreakdown
135
+ > = z.object({
136
+ nonUsers: z.number().int().optional(),
137
+ dormantUsers: z.number().int().optional(),
138
+ regularUsers: z.number().int().optional(),
139
+ powerUsers: z.number().int().optional(),
140
+ });
141
+
142
+ /**
143
+ * @internal
144
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
145
+ */
146
+ export namespace EngagementBreakdown$ {
147
+ /** @deprecated use `EngagementBreakdown$inboundSchema` instead. */
148
+ export const inboundSchema = EngagementBreakdown$inboundSchema;
149
+ /** @deprecated use `EngagementBreakdown$outboundSchema` instead. */
150
+ export const outboundSchema = EngagementBreakdown$outboundSchema;
151
+ /** @deprecated use `EngagementBreakdown$Outbound` instead. */
152
+ export type Outbound = EngagementBreakdown$Outbound;
153
+ }
154
+
155
+ export function engagementBreakdownToJSON(
156
+ engagementBreakdown: EngagementBreakdown,
157
+ ): string {
158
+ return JSON.stringify(
159
+ EngagementBreakdown$outboundSchema.parse(engagementBreakdown),
160
+ );
161
+ }
162
+
163
+ export function engagementBreakdownFromJSON(
164
+ jsonString: string,
165
+ ): SafeParseResult<EngagementBreakdown, SDKValidationError> {
166
+ return safeParse(
167
+ jsonString,
168
+ (x) => EngagementBreakdown$inboundSchema.parse(JSON.parse(x)),
169
+ `Failed to parse 'EngagementBreakdown' from JSON`,
170
+ );
171
+ }
172
+
173
+ /** @internal */
174
+ export const InsightsOverviewResponse$inboundSchema: z.ZodType<
175
+ InsightsOverviewResponse,
176
+ z.ZodTypeDef,
177
+ unknown
178
+ > = z.object({
179
+ monthlyActiveUsers: z.number().int().optional(),
180
+ weeklyActiveUsers: z.number().int().optional(),
181
+ departments: z.array(z.string()).optional(),
182
+ employeeCount: z.number().int().optional(),
183
+ totalSignups: z.number().int().optional(),
184
+ searchSummary: InsightsSearchSummary$inboundSchema.optional(),
185
+ chatSummary: InsightsChatSummary$inboundSchema.optional(),
186
+ extensionSummary: CurrentActiveUsers$inboundSchema.optional(),
187
+ ugcSummary: CurrentActiveUsers$inboundSchema.optional(),
188
+ lastUpdatedTs: z.number().int().optional(),
189
+ searchSessionSatisfaction: z.number().optional(),
190
+ monthlyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(),
191
+ weeklyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(),
192
+ dailyActiveUserTimeseries: LabeledCountInfo$inboundSchema.optional(),
193
+ searchDatasourceCounts: z.record(z.number().int()).optional(),
194
+ chatDatasourceCounts: z.record(z.number().int()).optional(),
195
+ perUserInsights: z.array(PerUserInsight$inboundSchema).optional(),
196
+ engagementBreakdown: z.lazy(() => EngagementBreakdown$inboundSchema)
197
+ .optional(),
198
+ });
199
+
200
+ /** @internal */
201
+ export type InsightsOverviewResponse$Outbound = {
202
+ monthlyActiveUsers?: number | undefined;
203
+ weeklyActiveUsers?: number | undefined;
204
+ departments?: Array<string> | undefined;
205
+ employeeCount?: number | undefined;
206
+ totalSignups?: number | undefined;
207
+ searchSummary?: InsightsSearchSummary$Outbound | undefined;
208
+ chatSummary?: InsightsChatSummary$Outbound | undefined;
209
+ extensionSummary?: CurrentActiveUsers$Outbound | undefined;
210
+ ugcSummary?: CurrentActiveUsers$Outbound | undefined;
211
+ lastUpdatedTs?: number | undefined;
212
+ searchSessionSatisfaction?: number | undefined;
213
+ monthlyActiveUserTimeseries?: LabeledCountInfo$Outbound | undefined;
214
+ weeklyActiveUserTimeseries?: LabeledCountInfo$Outbound | undefined;
215
+ dailyActiveUserTimeseries?: LabeledCountInfo$Outbound | undefined;
216
+ searchDatasourceCounts?: { [k: string]: number } | undefined;
217
+ chatDatasourceCounts?: { [k: string]: number } | undefined;
218
+ perUserInsights?: Array<PerUserInsight$Outbound> | undefined;
219
+ engagementBreakdown?: EngagementBreakdown$Outbound | undefined;
220
+ };
221
+
222
+ /** @internal */
223
+ export const InsightsOverviewResponse$outboundSchema: z.ZodType<
224
+ InsightsOverviewResponse$Outbound,
225
+ z.ZodTypeDef,
226
+ InsightsOverviewResponse
227
+ > = z.object({
228
+ monthlyActiveUsers: z.number().int().optional(),
229
+ weeklyActiveUsers: z.number().int().optional(),
230
+ departments: z.array(z.string()).optional(),
231
+ employeeCount: z.number().int().optional(),
232
+ totalSignups: z.number().int().optional(),
233
+ searchSummary: InsightsSearchSummary$outboundSchema.optional(),
234
+ chatSummary: InsightsChatSummary$outboundSchema.optional(),
235
+ extensionSummary: CurrentActiveUsers$outboundSchema.optional(),
236
+ ugcSummary: CurrentActiveUsers$outboundSchema.optional(),
237
+ lastUpdatedTs: z.number().int().optional(),
238
+ searchSessionSatisfaction: z.number().optional(),
239
+ monthlyActiveUserTimeseries: LabeledCountInfo$outboundSchema.optional(),
240
+ weeklyActiveUserTimeseries: LabeledCountInfo$outboundSchema.optional(),
241
+ dailyActiveUserTimeseries: LabeledCountInfo$outboundSchema.optional(),
242
+ searchDatasourceCounts: z.record(z.number().int()).optional(),
243
+ chatDatasourceCounts: z.record(z.number().int()).optional(),
244
+ perUserInsights: z.array(PerUserInsight$outboundSchema).optional(),
245
+ engagementBreakdown: z.lazy(() => EngagementBreakdown$outboundSchema)
246
+ .optional(),
247
+ });
248
+
249
+ /**
250
+ * @internal
251
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
252
+ */
253
+ export namespace InsightsOverviewResponse$ {
254
+ /** @deprecated use `InsightsOverviewResponse$inboundSchema` instead. */
255
+ export const inboundSchema = InsightsOverviewResponse$inboundSchema;
256
+ /** @deprecated use `InsightsOverviewResponse$outboundSchema` instead. */
257
+ export const outboundSchema = InsightsOverviewResponse$outboundSchema;
258
+ /** @deprecated use `InsightsOverviewResponse$Outbound` instead. */
259
+ export type Outbound = InsightsOverviewResponse$Outbound;
260
+ }
261
+
262
+ export function insightsOverviewResponseToJSON(
263
+ insightsOverviewResponse: InsightsOverviewResponse,
264
+ ): string {
265
+ return JSON.stringify(
266
+ InsightsOverviewResponse$outboundSchema.parse(insightsOverviewResponse),
267
+ );
268
+ }
269
+
270
+ export function insightsOverviewResponseFromJSON(
271
+ jsonString: string,
272
+ ): SafeParseResult<InsightsOverviewResponse, SDKValidationError> {
273
+ return safeParse(
274
+ jsonString,
275
+ (x) => InsightsOverviewResponse$inboundSchema.parse(JSON.parse(x)),
276
+ `Failed to parse 'InsightsOverviewResponse' from JSON`,
277
+ );
278
+ }
@@ -6,6 +6,12 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ AgentsInsightsV2Response,
11
+ AgentsInsightsV2Response$inboundSchema,
12
+ AgentsInsightsV2Response$Outbound,
13
+ AgentsInsightsV2Response$outboundSchema,
14
+ } from "./agentsinsightsv2response.js";
9
15
  import {
10
16
  AiAppsInsightsResponse,
11
17
  AiAppsInsightsResponse$inboundSchema,
@@ -18,6 +24,12 @@ import {
18
24
  AiInsightsResponse$Outbound,
19
25
  AiInsightsResponse$outboundSchema,
20
26
  } from "./aiinsightsresponse.js";
27
+ import {
28
+ AssistantInsightsResponse,
29
+ AssistantInsightsResponse$inboundSchema,
30
+ AssistantInsightsResponse$Outbound,
31
+ AssistantInsightsResponse$outboundSchema,
32
+ } from "./assistantinsightsresponse.js";
21
33
  import {
22
34
  ContentInsightsResponse,
23
35
  ContentInsightsResponse$inboundSchema,
@@ -30,6 +42,12 @@ import {
30
42
  GleanAssistInsightsResponse$Outbound,
31
43
  GleanAssistInsightsResponse$outboundSchema,
32
44
  } from "./gleanassistinsightsresponse.js";
45
+ import {
46
+ InsightsOverviewResponse,
47
+ InsightsOverviewResponse$inboundSchema,
48
+ InsightsOverviewResponse$Outbound,
49
+ InsightsOverviewResponse$outboundSchema,
50
+ } from "./insightsoverviewresponse.js";
33
51
  import {
34
52
  LabeledCountInfo,
35
53
  LabeledCountInfo$inboundSchema,
@@ -58,6 +76,8 @@ import {
58
76
  export type InsightsResponse = {
59
77
  /**
60
78
  * List of timeseries to make charts (if applicable).
79
+ *
80
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
61
81
  */
62
82
  timeseries?: Array<LabeledCountInfo> | undefined;
63
83
  users?: UserInsightsResponse | undefined;
@@ -73,8 +93,13 @@ export type InsightsResponse = {
73
93
  gleanAssist?: GleanAssistInsightsResponse | undefined;
74
94
  /**
75
95
  * list of all departments.
96
+ *
97
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
76
98
  */
77
99
  departments?: Array<string> | undefined;
100
+ overviewResponse?: InsightsOverviewResponse | undefined;
101
+ assistantResponse?: AssistantInsightsResponse | undefined;
102
+ agentsResponse?: AgentsInsightsV2Response | undefined;
78
103
  };
79
104
 
80
105
  /** @internal */
@@ -96,6 +121,9 @@ export const InsightsResponse$inboundSchema: z.ZodType<
96
121
  aiApps: AiAppsInsightsResponse$inboundSchema.optional(),
97
122
  gleanAssist: GleanAssistInsightsResponse$inboundSchema.optional(),
98
123
  departments: z.array(z.string()).optional(),
124
+ overviewResponse: InsightsOverviewResponse$inboundSchema.optional(),
125
+ assistantResponse: AssistantInsightsResponse$inboundSchema.optional(),
126
+ agentsResponse: AgentsInsightsV2Response$inboundSchema.optional(),
99
127
  });
100
128
 
101
129
  /** @internal */
@@ -113,6 +141,9 @@ export type InsightsResponse$Outbound = {
113
141
  aiApps?: AiAppsInsightsResponse$Outbound | undefined;
114
142
  gleanAssist?: GleanAssistInsightsResponse$Outbound | undefined;
115
143
  departments?: Array<string> | undefined;
144
+ overviewResponse?: InsightsOverviewResponse$Outbound | undefined;
145
+ assistantResponse?: AssistantInsightsResponse$Outbound | undefined;
146
+ agentsResponse?: AgentsInsightsV2Response$Outbound | undefined;
116
147
  };
117
148
 
118
149
  /** @internal */
@@ -134,6 +165,9 @@ export const InsightsResponse$outboundSchema: z.ZodType<
134
165
  aiApps: AiAppsInsightsResponse$outboundSchema.optional(),
135
166
  gleanAssist: GleanAssistInsightsResponse$outboundSchema.optional(),
136
167
  departments: z.array(z.string()).optional(),
168
+ overviewResponse: InsightsOverviewResponse$outboundSchema.optional(),
169
+ assistantResponse: AssistantInsightsResponse$outboundSchema.optional(),
170
+ agentsResponse: AgentsInsightsV2Response$outboundSchema.optional(),
137
171
  });
138
172
 
139
173
  /**
@@ -0,0 +1,90 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type InsightsSearchSummary = {
11
+ /**
12
+ * Number of current Monthly Active Users, in the specified departments.
13
+ */
14
+ monthlyActiveUsers?: number | undefined;
15
+ /**
16
+ * Number of current Weekly Active Users, in the specified departments.
17
+ */
18
+ weeklyActiveUsers?: number | undefined;
19
+ /**
20
+ * Total number of searches by users over the specified time period.
21
+ */
22
+ numSearches?: number | undefined;
23
+ /**
24
+ * Total number of distinct users who searched over the specified time period.
25
+ */
26
+ numSearchUsers?: number | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const InsightsSearchSummary$inboundSchema: z.ZodType<
31
+ InsightsSearchSummary,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = z.object({
35
+ monthlyActiveUsers: z.number().int().optional(),
36
+ weeklyActiveUsers: z.number().int().optional(),
37
+ numSearches: z.number().int().optional(),
38
+ numSearchUsers: z.number().int().optional(),
39
+ });
40
+
41
+ /** @internal */
42
+ export type InsightsSearchSummary$Outbound = {
43
+ monthlyActiveUsers?: number | undefined;
44
+ weeklyActiveUsers?: number | undefined;
45
+ numSearches?: number | undefined;
46
+ numSearchUsers?: number | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const InsightsSearchSummary$outboundSchema: z.ZodType<
51
+ InsightsSearchSummary$Outbound,
52
+ z.ZodTypeDef,
53
+ InsightsSearchSummary
54
+ > = z.object({
55
+ monthlyActiveUsers: z.number().int().optional(),
56
+ weeklyActiveUsers: z.number().int().optional(),
57
+ numSearches: z.number().int().optional(),
58
+ numSearchUsers: z.number().int().optional(),
59
+ });
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace InsightsSearchSummary$ {
66
+ /** @deprecated use `InsightsSearchSummary$inboundSchema` instead. */
67
+ export const inboundSchema = InsightsSearchSummary$inboundSchema;
68
+ /** @deprecated use `InsightsSearchSummary$outboundSchema` instead. */
69
+ export const outboundSchema = InsightsSearchSummary$outboundSchema;
70
+ /** @deprecated use `InsightsSearchSummary$Outbound` instead. */
71
+ export type Outbound = InsightsSearchSummary$Outbound;
72
+ }
73
+
74
+ export function insightsSearchSummaryToJSON(
75
+ insightsSearchSummary: InsightsSearchSummary,
76
+ ): string {
77
+ return JSON.stringify(
78
+ InsightsSearchSummary$outboundSchema.parse(insightsSearchSummary),
79
+ );
80
+ }
81
+
82
+ export function insightsSearchSummaryFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<InsightsSearchSummary, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) => InsightsSearchSummary$inboundSchema.parse(JSON.parse(x)),
88
+ `Failed to parse 'InsightsSearchSummary' from JSON`,
89
+ );
90
+ }
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type PerAgentInsight = {
11
+ /**
12
+ * Agent ID
13
+ */
14
+ agentId?: string | undefined;
15
+ /**
16
+ * Agent name
17
+ */
18
+ agentName?: string | undefined;
19
+ /**
20
+ * Total number of users for this agent over the specified time period.
21
+ */
22
+ userCount?: number | undefined;
23
+ /**
24
+ * Total number of runs for this agent over the specified time period.
25
+ */
26
+ runCount?: number | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const PerAgentInsight$inboundSchema: z.ZodType<
31
+ PerAgentInsight,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = z.object({
35
+ agentId: z.string().optional(),
36
+ agentName: z.string().optional(),
37
+ userCount: z.number().int().optional(),
38
+ runCount: z.number().int().optional(),
39
+ });
40
+
41
+ /** @internal */
42
+ export type PerAgentInsight$Outbound = {
43
+ agentId?: string | undefined;
44
+ agentName?: string | undefined;
45
+ userCount?: number | undefined;
46
+ runCount?: number | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const PerAgentInsight$outboundSchema: z.ZodType<
51
+ PerAgentInsight$Outbound,
52
+ z.ZodTypeDef,
53
+ PerAgentInsight
54
+ > = z.object({
55
+ agentId: z.string().optional(),
56
+ agentName: z.string().optional(),
57
+ userCount: z.number().int().optional(),
58
+ runCount: z.number().int().optional(),
59
+ });
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace PerAgentInsight$ {
66
+ /** @deprecated use `PerAgentInsight$inboundSchema` instead. */
67
+ export const inboundSchema = PerAgentInsight$inboundSchema;
68
+ /** @deprecated use `PerAgentInsight$outboundSchema` instead. */
69
+ export const outboundSchema = PerAgentInsight$outboundSchema;
70
+ /** @deprecated use `PerAgentInsight$Outbound` instead. */
71
+ export type Outbound = PerAgentInsight$Outbound;
72
+ }
73
+
74
+ export function perAgentInsightToJSON(
75
+ perAgentInsight: PerAgentInsight,
76
+ ): string {
77
+ return JSON.stringify(PerAgentInsight$outboundSchema.parse(perAgentInsight));
78
+ }
79
+
80
+ export function perAgentInsightFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<PerAgentInsight, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => PerAgentInsight$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'PerAgentInsight' from JSON`,
87
+ );
88
+ }
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ Person,
11
+ Person$inboundSchema,
12
+ Person$Outbound,
13
+ Person$outboundSchema,
14
+ } from "./person.js";
15
+
16
+ export type PerUserAssistantInsight = {
17
+ person?: Person | undefined;
18
+ /**
19
+ * Total number of chat messages sent by this user over the specified time period.
20
+ */
21
+ numChatMessages?: number | undefined;
22
+ /**
23
+ * Total number of summarized items by this user over the specified time period.
24
+ */
25
+ numSummarizations?: number | undefined;
26
+ /**
27
+ * Total number of AI Answers interacted with by this user over the specified time period.
28
+ */
29
+ numAiAnswers?: number | undefined;
30
+ /**
31
+ * Total number of Gleanbot interacted with by this user over the specified time period.
32
+ */
33
+ numGleanbotInteractions?: number | undefined;
34
+ /**
35
+ * Total number of days this user was active over the specified time period.
36
+ */
37
+ numDaysActive?: number | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const PerUserAssistantInsight$inboundSchema: z.ZodType<
42
+ PerUserAssistantInsight,
43
+ z.ZodTypeDef,
44
+ unknown
45
+ > = z.object({
46
+ person: Person$inboundSchema.optional(),
47
+ numChatMessages: z.number().int().optional(),
48
+ numSummarizations: z.number().int().optional(),
49
+ numAiAnswers: z.number().int().optional(),
50
+ numGleanbotInteractions: z.number().int().optional(),
51
+ numDaysActive: z.number().int().optional(),
52
+ });
53
+
54
+ /** @internal */
55
+ export type PerUserAssistantInsight$Outbound = {
56
+ person?: Person$Outbound | undefined;
57
+ numChatMessages?: number | undefined;
58
+ numSummarizations?: number | undefined;
59
+ numAiAnswers?: number | undefined;
60
+ numGleanbotInteractions?: number | undefined;
61
+ numDaysActive?: number | undefined;
62
+ };
63
+
64
+ /** @internal */
65
+ export const PerUserAssistantInsight$outboundSchema: z.ZodType<
66
+ PerUserAssistantInsight$Outbound,
67
+ z.ZodTypeDef,
68
+ PerUserAssistantInsight
69
+ > = z.object({
70
+ person: Person$outboundSchema.optional(),
71
+ numChatMessages: z.number().int().optional(),
72
+ numSummarizations: z.number().int().optional(),
73
+ numAiAnswers: z.number().int().optional(),
74
+ numGleanbotInteractions: z.number().int().optional(),
75
+ numDaysActive: z.number().int().optional(),
76
+ });
77
+
78
+ /**
79
+ * @internal
80
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
+ */
82
+ export namespace PerUserAssistantInsight$ {
83
+ /** @deprecated use `PerUserAssistantInsight$inboundSchema` instead. */
84
+ export const inboundSchema = PerUserAssistantInsight$inboundSchema;
85
+ /** @deprecated use `PerUserAssistantInsight$outboundSchema` instead. */
86
+ export const outboundSchema = PerUserAssistantInsight$outboundSchema;
87
+ /** @deprecated use `PerUserAssistantInsight$Outbound` instead. */
88
+ export type Outbound = PerUserAssistantInsight$Outbound;
89
+ }
90
+
91
+ export function perUserAssistantInsightToJSON(
92
+ perUserAssistantInsight: PerUserAssistantInsight,
93
+ ): string {
94
+ return JSON.stringify(
95
+ PerUserAssistantInsight$outboundSchema.parse(perUserAssistantInsight),
96
+ );
97
+ }
98
+
99
+ export function perUserAssistantInsightFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<PerUserAssistantInsight, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => PerUserAssistantInsight$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'PerUserAssistantInsight' from JSON`,
106
+ );
107
+ }