@gleanwork/api-client 0.10.1 → 0.10.5
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 +3 -3
- package/dist/commonjs/__tests__/summarize.test.js +2 -4
- package/dist/commonjs/__tests__/summarize.test.js.map +1 -1
- package/dist/commonjs/funcs/clientInsightsRetrieve.d.ts +2 -2
- package/dist/commonjs/funcs/clientInsightsRetrieve.js +2 -2
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/agentsinsightsv2request.d.ts +40 -0
- package/dist/commonjs/models/components/agentsinsightsv2request.d.ts.map +1 -0
- package/dist/commonjs/models/components/agentsinsightsv2request.js +74 -0
- package/dist/commonjs/models/components/agentsinsightsv2request.js.map +1 -0
- package/dist/commonjs/models/components/digestsection.d.ts +8 -0
- package/dist/commonjs/models/components/digestsection.d.ts.map +1 -1
- package/dist/commonjs/models/components/digestsection.js +2 -0
- package/dist/commonjs/models/components/digestsection.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +3 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +3 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/insightsassistantrequest.d.ts +35 -0
- package/dist/commonjs/models/components/insightsassistantrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/insightsassistantrequest.js +72 -0
- package/dist/commonjs/models/components/insightsassistantrequest.js.map +1 -0
- package/dist/commonjs/models/components/insightsoverviewrequest.d.ts +35 -0
- package/dist/commonjs/models/components/insightsoverviewrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/insightsoverviewrequest.js +72 -0
- package/dist/commonjs/models/components/insightsoverviewrequest.js.map +1 -0
- package/dist/commonjs/models/components/insightsrequest.d.ts +31 -7
- package/dist/commonjs/models/components/insightsrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/insightsrequest.js +16 -4
- package/dist/commonjs/models/components/insightsrequest.js.map +1 -1
- package/dist/commonjs/react-query/clientInsightsRetrieve.d.ts +2 -2
- package/dist/commonjs/react-query/clientInsightsRetrieve.js +2 -2
- package/dist/commonjs/sdk/insights.d.ts +2 -2
- package/dist/commonjs/sdk/insights.js +2 -2
- package/dist/esm/__tests__/summarize.test.js +2 -4
- package/dist/esm/__tests__/summarize.test.js.map +1 -1
- package/dist/esm/funcs/clientInsightsRetrieve.d.ts +2 -2
- package/dist/esm/funcs/clientInsightsRetrieve.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/agentsinsightsv2request.d.ts +40 -0
- package/dist/esm/models/components/agentsinsightsv2request.d.ts.map +1 -0
- package/dist/esm/models/components/agentsinsightsv2request.js +36 -0
- package/dist/esm/models/components/agentsinsightsv2request.js.map +1 -0
- package/dist/esm/models/components/digestsection.d.ts +8 -0
- package/dist/esm/models/components/digestsection.d.ts.map +1 -1
- package/dist/esm/models/components/digestsection.js +2 -0
- package/dist/esm/models/components/digestsection.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +3 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +3 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/insightsassistantrequest.d.ts +35 -0
- package/dist/esm/models/components/insightsassistantrequest.d.ts.map +1 -0
- package/dist/esm/models/components/insightsassistantrequest.js +34 -0
- package/dist/esm/models/components/insightsassistantrequest.js.map +1 -0
- package/dist/esm/models/components/insightsoverviewrequest.d.ts +35 -0
- package/dist/esm/models/components/insightsoverviewrequest.d.ts.map +1 -0
- package/dist/esm/models/components/insightsoverviewrequest.js +34 -0
- package/dist/esm/models/components/insightsoverviewrequest.js.map +1 -0
- package/dist/esm/models/components/insightsrequest.d.ts +31 -7
- package/dist/esm/models/components/insightsrequest.d.ts.map +1 -1
- package/dist/esm/models/components/insightsrequest.js +16 -4
- package/dist/esm/models/components/insightsrequest.js.map +1 -1
- package/dist/esm/react-query/clientInsightsRetrieve.d.ts +2 -2
- package/dist/esm/react-query/clientInsightsRetrieve.js +2 -2
- package/dist/esm/sdk/insights.d.ts +2 -2
- package/dist/esm/sdk/insights.js +2 -2
- package/docs/sdks/insights/README.md +4 -16
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/summarize.test.ts +2 -4
- package/src/funcs/clientInsightsRetrieve.ts +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentsinsightsv2request.ts +86 -0
- package/src/models/components/digestsection.ts +10 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/insightsassistantrequest.ts +79 -0
- package/src/models/components/insightsoverviewrequest.ts +79 -0
- package/src/models/components/insightsrequest.ts +50 -11
- package/src/react-query/clientInsightsRetrieve.ts +2 -2
- package/src/sdk/insights.ts +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
Period,
|
|
11
|
+
Period$inboundSchema,
|
|
12
|
+
Period$Outbound,
|
|
13
|
+
Period$outboundSchema,
|
|
14
|
+
} from "./period.js";
|
|
15
|
+
|
|
16
|
+
export type AgentsInsightsV2Request = {
|
|
17
|
+
/**
|
|
18
|
+
* IDs of the Agents for which Insights should be returned. An empty array signifies all.
|
|
19
|
+
*/
|
|
20
|
+
agentIds?: Array<string> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Departments for which Insights are requested.
|
|
23
|
+
*/
|
|
24
|
+
departments?: Array<string> | undefined;
|
|
25
|
+
dayRange?: Period | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const AgentsInsightsV2Request$inboundSchema: z.ZodType<
|
|
30
|
+
AgentsInsightsV2Request,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
agentIds: z.array(z.string()).optional(),
|
|
35
|
+
departments: z.array(z.string()).optional(),
|
|
36
|
+
dayRange: Period$inboundSchema.optional(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type AgentsInsightsV2Request$Outbound = {
|
|
41
|
+
agentIds?: Array<string> | undefined;
|
|
42
|
+
departments?: Array<string> | undefined;
|
|
43
|
+
dayRange?: Period$Outbound | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const AgentsInsightsV2Request$outboundSchema: z.ZodType<
|
|
48
|
+
AgentsInsightsV2Request$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
AgentsInsightsV2Request
|
|
51
|
+
> = z.object({
|
|
52
|
+
agentIds: z.array(z.string()).optional(),
|
|
53
|
+
departments: z.array(z.string()).optional(),
|
|
54
|
+
dayRange: Period$outboundSchema.optional(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace AgentsInsightsV2Request$ {
|
|
62
|
+
/** @deprecated use `AgentsInsightsV2Request$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = AgentsInsightsV2Request$inboundSchema;
|
|
64
|
+
/** @deprecated use `AgentsInsightsV2Request$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = AgentsInsightsV2Request$outboundSchema;
|
|
66
|
+
/** @deprecated use `AgentsInsightsV2Request$Outbound` instead. */
|
|
67
|
+
export type Outbound = AgentsInsightsV2Request$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function agentsInsightsV2RequestToJSON(
|
|
71
|
+
agentsInsightsV2Request: AgentsInsightsV2Request,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
AgentsInsightsV2Request$outboundSchema.parse(agentsInsightsV2Request),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function agentsInsightsV2RequestFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<AgentsInsightsV2Request, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => AgentsInsightsV2Request$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'AgentsInsightsV2Request' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -35,6 +35,13 @@ export type DigestSection = {
|
|
|
35
35
|
* Name of the channel (applicable for CHANNEL type sections). Used to display in the frontend.
|
|
36
36
|
*/
|
|
37
37
|
channelName?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Channel visibility/type for CHANNEL sections. For Slack this is typically one of
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* PublicChannel, PrivateChannel. Omit if not applicable or unknown.
|
|
43
|
+
*/
|
|
44
|
+
channelType?: string | undefined;
|
|
38
45
|
/**
|
|
39
46
|
* Instance identifier for the channel or workspace. Used for constructing channel URLs to display in the frontend.
|
|
40
47
|
*/
|
|
@@ -59,6 +66,7 @@ export const DigestSection$inboundSchema: z.ZodType<
|
|
|
59
66
|
type: SectionType$inboundSchema,
|
|
60
67
|
displayName: z.string().optional(),
|
|
61
68
|
channelName: z.string().optional(),
|
|
69
|
+
channelType: z.string().optional(),
|
|
62
70
|
instanceId: z.string().optional(),
|
|
63
71
|
url: z.string().optional(),
|
|
64
72
|
updates: z.array(DigestUpdate$inboundSchema),
|
|
@@ -70,6 +78,7 @@ export type DigestSection$Outbound = {
|
|
|
70
78
|
type: string;
|
|
71
79
|
displayName?: string | undefined;
|
|
72
80
|
channelName?: string | undefined;
|
|
81
|
+
channelType?: string | undefined;
|
|
73
82
|
instanceId?: string | undefined;
|
|
74
83
|
url?: string | undefined;
|
|
75
84
|
updates: Array<DigestUpdate$Outbound>;
|
|
@@ -85,6 +94,7 @@ export const DigestSection$outboundSchema: z.ZodType<
|
|
|
85
94
|
type: SectionType$outboundSchema,
|
|
86
95
|
displayName: z.string().optional(),
|
|
87
96
|
channelName: z.string().optional(),
|
|
97
|
+
channelType: z.string().optional(),
|
|
88
98
|
instanceId: z.string().optional(),
|
|
89
99
|
url: z.string().optional(),
|
|
90
100
|
updates: z.array(DigestUpdate$outboundSchema),
|
|
@@ -16,6 +16,7 @@ export * from "./agentrun.js";
|
|
|
16
16
|
export * from "./agentruncreate.js";
|
|
17
17
|
export * from "./agentrunwaitresponse.js";
|
|
18
18
|
export * from "./agentschemas.js";
|
|
19
|
+
export * from "./agentsinsightsv2request.js";
|
|
19
20
|
export * from "./aiappactioncounts.js";
|
|
20
21
|
export * from "./aiappsinsightsresponse.js";
|
|
21
22
|
export * from "./aiinsightsresponse.js";
|
|
@@ -253,6 +254,8 @@ export * from "./indexuserrequest.js";
|
|
|
253
254
|
export * from "./inputoptions.js";
|
|
254
255
|
export * from "./insightsagentsrequestoptions.js";
|
|
255
256
|
export * from "./insightsaiapprequestoptions.js";
|
|
257
|
+
export * from "./insightsassistantrequest.js";
|
|
258
|
+
export * from "./insightsoverviewrequest.js";
|
|
256
259
|
export * from "./insightsrequest.js";
|
|
257
260
|
export * from "./insightsresponse.js";
|
|
258
261
|
export * from "./invalidoperatorvalueerror.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
Period,
|
|
11
|
+
Period$inboundSchema,
|
|
12
|
+
Period$Outbound,
|
|
13
|
+
Period$outboundSchema,
|
|
14
|
+
} from "./period.js";
|
|
15
|
+
|
|
16
|
+
export type InsightsAssistantRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* Departments for which Insights are requested.
|
|
19
|
+
*/
|
|
20
|
+
departments?: Array<string> | undefined;
|
|
21
|
+
dayRange?: Period | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const InsightsAssistantRequest$inboundSchema: z.ZodType<
|
|
26
|
+
InsightsAssistantRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
departments: z.array(z.string()).optional(),
|
|
31
|
+
dayRange: Period$inboundSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type InsightsAssistantRequest$Outbound = {
|
|
36
|
+
departments?: Array<string> | undefined;
|
|
37
|
+
dayRange?: Period$Outbound | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const InsightsAssistantRequest$outboundSchema: z.ZodType<
|
|
42
|
+
InsightsAssistantRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
InsightsAssistantRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
departments: z.array(z.string()).optional(),
|
|
47
|
+
dayRange: Period$outboundSchema.optional(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace InsightsAssistantRequest$ {
|
|
55
|
+
/** @deprecated use `InsightsAssistantRequest$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = InsightsAssistantRequest$inboundSchema;
|
|
57
|
+
/** @deprecated use `InsightsAssistantRequest$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = InsightsAssistantRequest$outboundSchema;
|
|
59
|
+
/** @deprecated use `InsightsAssistantRequest$Outbound` instead. */
|
|
60
|
+
export type Outbound = InsightsAssistantRequest$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function insightsAssistantRequestToJSON(
|
|
64
|
+
insightsAssistantRequest: InsightsAssistantRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
InsightsAssistantRequest$outboundSchema.parse(insightsAssistantRequest),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function insightsAssistantRequestFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<InsightsAssistantRequest, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => InsightsAssistantRequest$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'InsightsAssistantRequest' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
Period,
|
|
11
|
+
Period$inboundSchema,
|
|
12
|
+
Period$Outbound,
|
|
13
|
+
Period$outboundSchema,
|
|
14
|
+
} from "./period.js";
|
|
15
|
+
|
|
16
|
+
export type InsightsOverviewRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* Departments for which Insights are requested.
|
|
19
|
+
*/
|
|
20
|
+
departments?: Array<string> | undefined;
|
|
21
|
+
dayRange?: Period | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const InsightsOverviewRequest$inboundSchema: z.ZodType<
|
|
26
|
+
InsightsOverviewRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
departments: z.array(z.string()).optional(),
|
|
31
|
+
dayRange: Period$inboundSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type InsightsOverviewRequest$Outbound = {
|
|
36
|
+
departments?: Array<string> | undefined;
|
|
37
|
+
dayRange?: Period$Outbound | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const InsightsOverviewRequest$outboundSchema: z.ZodType<
|
|
42
|
+
InsightsOverviewRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
InsightsOverviewRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
departments: z.array(z.string()).optional(),
|
|
47
|
+
dayRange: Period$outboundSchema.optional(),
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @internal
|
|
52
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
53
|
+
*/
|
|
54
|
+
export namespace InsightsOverviewRequest$ {
|
|
55
|
+
/** @deprecated use `InsightsOverviewRequest$inboundSchema` instead. */
|
|
56
|
+
export const inboundSchema = InsightsOverviewRequest$inboundSchema;
|
|
57
|
+
/** @deprecated use `InsightsOverviewRequest$outboundSchema` instead. */
|
|
58
|
+
export const outboundSchema = InsightsOverviewRequest$outboundSchema;
|
|
59
|
+
/** @deprecated use `InsightsOverviewRequest$Outbound` instead. */
|
|
60
|
+
export type Outbound = InsightsOverviewRequest$Outbound;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function insightsOverviewRequestToJSON(
|
|
64
|
+
insightsOverviewRequest: InsightsOverviewRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
InsightsOverviewRequest$outboundSchema.parse(insightsOverviewRequest),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function insightsOverviewRequestFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<InsightsOverviewRequest, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => InsightsOverviewRequest$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'InsightsOverviewRequest' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -7,6 +7,12 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AgentsInsightsV2Request,
|
|
12
|
+
AgentsInsightsV2Request$inboundSchema,
|
|
13
|
+
AgentsInsightsV2Request$Outbound,
|
|
14
|
+
AgentsInsightsV2Request$outboundSchema,
|
|
15
|
+
} from "./agentsinsightsv2request.js";
|
|
10
16
|
import {
|
|
11
17
|
InsightsAgentsRequestOptions,
|
|
12
18
|
InsightsAgentsRequestOptions$inboundSchema,
|
|
@@ -19,6 +25,18 @@ import {
|
|
|
19
25
|
InsightsAiAppRequestOptions$Outbound,
|
|
20
26
|
InsightsAiAppRequestOptions$outboundSchema,
|
|
21
27
|
} from "./insightsaiapprequestoptions.js";
|
|
28
|
+
import {
|
|
29
|
+
InsightsAssistantRequest,
|
|
30
|
+
InsightsAssistantRequest$inboundSchema,
|
|
31
|
+
InsightsAssistantRequest$Outbound,
|
|
32
|
+
InsightsAssistantRequest$outboundSchema,
|
|
33
|
+
} from "./insightsassistantrequest.js";
|
|
34
|
+
import {
|
|
35
|
+
InsightsOverviewRequest,
|
|
36
|
+
InsightsOverviewRequest$inboundSchema,
|
|
37
|
+
InsightsOverviewRequest$Outbound,
|
|
38
|
+
InsightsOverviewRequest$outboundSchema,
|
|
39
|
+
} from "./insightsoverviewrequest.js";
|
|
22
40
|
import {
|
|
23
41
|
Period,
|
|
24
42
|
Period$inboundSchema,
|
|
@@ -28,6 +46,9 @@ import {
|
|
|
28
46
|
|
|
29
47
|
export const InsightsRequestCategory = {
|
|
30
48
|
Agents: "AGENTS",
|
|
49
|
+
AgentUsers: "AGENT_USERS",
|
|
50
|
+
TopAgents: "TOP_AGENTS",
|
|
51
|
+
AgentsUsageByDepartment: "AGENTS_USAGE_BY_DEPARTMENT",
|
|
31
52
|
Ai: "AI",
|
|
32
53
|
AiApps: "AI_APPS",
|
|
33
54
|
Announcements: "ANNOUNCEMENTS",
|
|
@@ -52,12 +73,23 @@ export const AssistantActivityType = {
|
|
|
52
73
|
export type AssistantActivityType = ClosedEnum<typeof AssistantActivityType>;
|
|
53
74
|
|
|
54
75
|
export type InsightsRequest = {
|
|
76
|
+
overviewRequest?: InsightsOverviewRequest | undefined;
|
|
77
|
+
assistantRequest?: InsightsAssistantRequest | undefined;
|
|
78
|
+
agentsRequest?: AgentsInsightsV2Request | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* If true, suppresses the generation of per-user Insights in the response. Default is false.
|
|
81
|
+
*/
|
|
82
|
+
disablePerUserInsights?: boolean | undefined;
|
|
55
83
|
/**
|
|
56
84
|
* Categories of data requested. Request can include single or multiple types.
|
|
85
|
+
*
|
|
86
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
57
87
|
*/
|
|
58
|
-
categories
|
|
88
|
+
categories?: Array<InsightsRequestCategory> | undefined;
|
|
59
89
|
/**
|
|
60
90
|
* Departments that the data is requested for. If this is empty, corresponds to whole company.
|
|
91
|
+
*
|
|
92
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
61
93
|
*/
|
|
62
94
|
departments?: Array<string> | undefined;
|
|
63
95
|
dayRange?: Period | undefined;
|
|
@@ -65,12 +97,10 @@ export type InsightsRequest = {
|
|
|
65
97
|
agentsRequestOptions?: InsightsAgentsRequestOptions | undefined;
|
|
66
98
|
/**
|
|
67
99
|
* Types of activity that should count in the definition of an Assistant Active User. Affects only insights for AI category.
|
|
100
|
+
*
|
|
101
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
68
102
|
*/
|
|
69
103
|
assistantActivityTypes?: Array<AssistantActivityType> | undefined;
|
|
70
|
-
/**
|
|
71
|
-
* If true, suppresses the generation of per-user Insights in the response. Default is false.
|
|
72
|
-
*/
|
|
73
|
-
disablePerUserInsights?: boolean | undefined;
|
|
74
104
|
};
|
|
75
105
|
|
|
76
106
|
/** @internal */
|
|
@@ -121,25 +151,31 @@ export const InsightsRequest$inboundSchema: z.ZodType<
|
|
|
121
151
|
z.ZodTypeDef,
|
|
122
152
|
unknown
|
|
123
153
|
> = z.object({
|
|
124
|
-
|
|
154
|
+
overviewRequest: InsightsOverviewRequest$inboundSchema.optional(),
|
|
155
|
+
assistantRequest: InsightsAssistantRequest$inboundSchema.optional(),
|
|
156
|
+
agentsRequest: AgentsInsightsV2Request$inboundSchema.optional(),
|
|
157
|
+
disablePerUserInsights: z.boolean().optional(),
|
|
158
|
+
categories: z.array(InsightsRequestCategory$inboundSchema).optional(),
|
|
125
159
|
departments: z.array(z.string()).optional(),
|
|
126
160
|
dayRange: Period$inboundSchema.optional(),
|
|
127
161
|
aiAppRequestOptions: InsightsAiAppRequestOptions$inboundSchema.optional(),
|
|
128
162
|
agentsRequestOptions: InsightsAgentsRequestOptions$inboundSchema.optional(),
|
|
129
163
|
assistantActivityTypes: z.array(AssistantActivityType$inboundSchema)
|
|
130
164
|
.optional(),
|
|
131
|
-
disablePerUserInsights: z.boolean().optional(),
|
|
132
165
|
});
|
|
133
166
|
|
|
134
167
|
/** @internal */
|
|
135
168
|
export type InsightsRequest$Outbound = {
|
|
136
|
-
|
|
169
|
+
overviewRequest?: InsightsOverviewRequest$Outbound | undefined;
|
|
170
|
+
assistantRequest?: InsightsAssistantRequest$Outbound | undefined;
|
|
171
|
+
agentsRequest?: AgentsInsightsV2Request$Outbound | undefined;
|
|
172
|
+
disablePerUserInsights?: boolean | undefined;
|
|
173
|
+
categories?: Array<string> | undefined;
|
|
137
174
|
departments?: Array<string> | undefined;
|
|
138
175
|
dayRange?: Period$Outbound | undefined;
|
|
139
176
|
aiAppRequestOptions?: InsightsAiAppRequestOptions$Outbound | undefined;
|
|
140
177
|
agentsRequestOptions?: InsightsAgentsRequestOptions$Outbound | undefined;
|
|
141
178
|
assistantActivityTypes?: Array<string> | undefined;
|
|
142
|
-
disablePerUserInsights?: boolean | undefined;
|
|
143
179
|
};
|
|
144
180
|
|
|
145
181
|
/** @internal */
|
|
@@ -148,14 +184,17 @@ export const InsightsRequest$outboundSchema: z.ZodType<
|
|
|
148
184
|
z.ZodTypeDef,
|
|
149
185
|
InsightsRequest
|
|
150
186
|
> = z.object({
|
|
151
|
-
|
|
187
|
+
overviewRequest: InsightsOverviewRequest$outboundSchema.optional(),
|
|
188
|
+
assistantRequest: InsightsAssistantRequest$outboundSchema.optional(),
|
|
189
|
+
agentsRequest: AgentsInsightsV2Request$outboundSchema.optional(),
|
|
190
|
+
disablePerUserInsights: z.boolean().optional(),
|
|
191
|
+
categories: z.array(InsightsRequestCategory$outboundSchema).optional(),
|
|
152
192
|
departments: z.array(z.string()).optional(),
|
|
153
193
|
dayRange: Period$outboundSchema.optional(),
|
|
154
194
|
aiAppRequestOptions: InsightsAiAppRequestOptions$outboundSchema.optional(),
|
|
155
195
|
agentsRequestOptions: InsightsAgentsRequestOptions$outboundSchema.optional(),
|
|
156
196
|
assistantActivityTypes: z.array(AssistantActivityType$outboundSchema)
|
|
157
197
|
.optional(),
|
|
158
|
-
disablePerUserInsights: z.boolean().optional(),
|
|
159
198
|
});
|
|
160
199
|
|
|
161
200
|
/**
|
|
@@ -24,10 +24,10 @@ export type ClientInsightsRetrieveMutationVariables = {
|
|
|
24
24
|
export type ClientInsightsRetrieveMutationData = components.InsightsResponse;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Get insights
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* Gets the aggregate usage insights data displayed in the Insights Dashboards.
|
|
31
31
|
*/
|
|
32
32
|
export function useClientInsightsRetrieveMutation(
|
|
33
33
|
options?: MutationHookOptions<
|
package/src/sdk/insights.ts
CHANGED
|
@@ -9,10 +9,10 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
9
9
|
|
|
10
10
|
export class Insights extends ClientSDK {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Get insights
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
15
|
+
* Gets the aggregate usage insights data displayed in the Insights Dashboards.
|
|
16
16
|
*/
|
|
17
17
|
async retrieve(
|
|
18
18
|
request: components.InsightsRequest,
|