syllable-sdk 0.1.0-alpha.46 → 0.1.0-alpha.47

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 (192) hide show
  1. package/README.md +34 -0
  2. package/docs/sdks/insights/README.md +6 -0
  3. package/docs/sdks/summary/README.md +85 -0
  4. package/docs/sdks/syllablesdktools/README.md +411 -0
  5. package/docs/sdks/workflows/README.md +429 -0
  6. package/funcs/insightsToolsCreate.d.ts +16 -0
  7. package/funcs/insightsToolsCreate.d.ts.map +1 -0
  8. package/funcs/insightsToolsCreate.js +102 -0
  9. package/funcs/insightsToolsCreate.js.map +1 -0
  10. package/funcs/insightsToolsGetById.d.ts +17 -0
  11. package/funcs/insightsToolsGetById.d.ts.map +1 -0
  12. package/funcs/insightsToolsGetById.js +108 -0
  13. package/funcs/insightsToolsGetById.js.map +1 -0
  14. package/funcs/insightsToolsInsightToolGetDefinitions.d.ts +15 -0
  15. package/funcs/insightsToolsInsightToolGetDefinitions.d.ts.map +1 -0
  16. package/funcs/insightsToolsInsightToolGetDefinitions.js +89 -0
  17. package/funcs/insightsToolsInsightToolGetDefinitions.js.map +1 -0
  18. package/funcs/insightsToolsList.d.ts +17 -0
  19. package/funcs/insightsToolsList.d.ts.map +1 -0
  20. package/funcs/insightsToolsList.js +114 -0
  21. package/funcs/insightsToolsList.js.map +1 -0
  22. package/funcs/insightsToolsUpdate.d.ts +17 -0
  23. package/funcs/insightsToolsUpdate.d.ts.map +1 -0
  24. package/funcs/insightsToolsUpdate.js +109 -0
  25. package/funcs/insightsToolsUpdate.js.map +1 -0
  26. package/funcs/insightsWorkflowsCreate.d.ts +16 -0
  27. package/funcs/insightsWorkflowsCreate.d.ts.map +1 -0
  28. package/funcs/insightsWorkflowsCreate.js +102 -0
  29. package/funcs/insightsWorkflowsCreate.js.map +1 -0
  30. package/funcs/insightsWorkflowsDelete.d.ts +16 -0
  31. package/funcs/insightsWorkflowsDelete.d.ts.map +1 -0
  32. package/funcs/insightsWorkflowsDelete.js +108 -0
  33. package/funcs/insightsWorkflowsDelete.js.map +1 -0
  34. package/funcs/insightsWorkflowsGetById.d.ts +17 -0
  35. package/funcs/insightsWorkflowsGetById.d.ts.map +1 -0
  36. package/funcs/insightsWorkflowsGetById.js +108 -0
  37. package/funcs/insightsWorkflowsGetById.js.map +1 -0
  38. package/funcs/insightsWorkflowsList.d.ts +17 -0
  39. package/funcs/insightsWorkflowsList.d.ts.map +1 -0
  40. package/funcs/insightsWorkflowsList.js +114 -0
  41. package/funcs/insightsWorkflowsList.js.map +1 -0
  42. package/funcs/insightsWorkflowsUpdate.d.ts +17 -0
  43. package/funcs/insightsWorkflowsUpdate.d.ts.map +1 -0
  44. package/funcs/insightsWorkflowsUpdate.js +111 -0
  45. package/funcs/insightsWorkflowsUpdate.js.map +1 -0
  46. package/funcs/sessionsSummaryGetById.d.ts +13 -0
  47. package/funcs/sessionsSummaryGetById.d.ts.map +1 -0
  48. package/funcs/sessionsSummaryGetById.js +105 -0
  49. package/funcs/sessionsSummaryGetById.js.map +1 -0
  50. package/jsr.json +1 -1
  51. package/lib/config.d.ts +2 -2
  52. package/lib/config.js +2 -2
  53. package/mintlify/mint.json +4 -2
  54. package/models/components/index.d.ts +9 -0
  55. package/models/components/index.d.ts.map +1 -1
  56. package/models/components/index.js +9 -0
  57. package/models/components/index.js.map +1 -1
  58. package/models/components/insighttooldefinition.d.ts +105 -0
  59. package/models/components/insighttooldefinition.d.ts.map +1 -0
  60. package/models/components/insighttooldefinition.js +126 -0
  61. package/models/components/insighttooldefinition.js.map +1 -0
  62. package/models/components/insighttoolinput.d.ts +76 -0
  63. package/models/components/insighttoolinput.d.ts.map +1 -0
  64. package/models/components/insighttoolinput.js +101 -0
  65. package/models/components/insighttoolinput.js.map +1 -0
  66. package/models/components/insighttooloutput.d.ts +102 -0
  67. package/models/components/insighttooloutput.d.ts.map +1 -0
  68. package/models/components/insighttooloutput.js +124 -0
  69. package/models/components/insighttooloutput.js.map +1 -0
  70. package/models/components/insighttoolproperties.d.ts +40 -0
  71. package/models/components/insighttoolproperties.d.ts.map +1 -0
  72. package/models/components/insighttoolproperties.js +54 -0
  73. package/models/components/insighttoolproperties.js.map +1 -0
  74. package/models/components/insightworkflowinput.d.ts +76 -0
  75. package/models/components/insightworkflowinput.d.ts.map +1 -0
  76. package/models/components/insightworkflowinput.js +99 -0
  77. package/models/components/insightworkflowinput.js.map +1 -0
  78. package/models/components/insightworkflowoutput.d.ts +102 -0
  79. package/models/components/insightworkflowoutput.d.ts.map +1 -0
  80. package/models/components/insightworkflowoutput.js +120 -0
  81. package/models/components/insightworkflowoutput.js.map +1 -0
  82. package/models/components/insightworkflowproperties.d.ts +43 -0
  83. package/models/components/insightworkflowproperties.d.ts.map +1 -0
  84. package/models/components/insightworkflowproperties.js +55 -0
  85. package/models/components/insightworkflowproperties.js.map +1 -0
  86. package/models/components/listresponseinsighttooloutput.d.ts +38 -0
  87. package/models/components/listresponseinsighttooloutput.d.ts.map +1 -0
  88. package/models/components/listresponseinsighttooloutput.js +81 -0
  89. package/models/components/listresponseinsighttooloutput.js.map +1 -0
  90. package/models/components/listresponseinsightworkflowoutput.d.ts +38 -0
  91. package/models/components/listresponseinsightworkflowoutput.d.ts.map +1 -0
  92. package/models/components/listresponseinsightworkflowoutput.js +81 -0
  93. package/models/components/listresponseinsightworkflowoutput.js.map +1 -0
  94. package/models/operations/directoryworkflowdelete.d.ts +29 -0
  95. package/models/operations/directoryworkflowdelete.d.ts.map +1 -0
  96. package/models/operations/directoryworkflowdelete.js +68 -0
  97. package/models/operations/directoryworkflowdelete.js.map +1 -0
  98. package/models/operations/index.d.ts +8 -0
  99. package/models/operations/index.d.ts.map +1 -1
  100. package/models/operations/index.js +8 -0
  101. package/models/operations/index.js.map +1 -1
  102. package/models/operations/insightstoolupdate.d.ts +32 -0
  103. package/models/operations/insightstoolupdate.d.ts.map +1 -0
  104. package/models/operations/insightstoolupdate.js +73 -0
  105. package/models/operations/insightstoolupdate.js.map +1 -0
  106. package/models/operations/insightsworkflowgetbyid.d.ts +29 -0
  107. package/models/operations/insightsworkflowgetbyid.d.ts.map +1 -0
  108. package/models/operations/insightsworkflowgetbyid.js +68 -0
  109. package/models/operations/insightsworkflowgetbyid.js.map +1 -0
  110. package/models/operations/insightsworkflowlist.d.ts +46 -0
  111. package/models/operations/insightsworkflowlist.d.ts.map +1 -0
  112. package/models/operations/insightsworkflowlist.js +101 -0
  113. package/models/operations/insightsworkflowlist.js.map +1 -0
  114. package/models/operations/insightsworkflowupdate.d.ts +32 -0
  115. package/models/operations/insightsworkflowupdate.d.ts.map +1 -0
  116. package/models/operations/insightsworkflowupdate.js +73 -0
  117. package/models/operations/insightsworkflowupdate.js.map +1 -0
  118. package/models/operations/insighttoolgetbyid.d.ts +29 -0
  119. package/models/operations/insighttoolgetbyid.d.ts.map +1 -0
  120. package/models/operations/insighttoolgetbyid.js +68 -0
  121. package/models/operations/insighttoolgetbyid.js.map +1 -0
  122. package/models/operations/insighttoollist.d.ts +46 -0
  123. package/models/operations/insighttoollist.d.ts.map +1 -0
  124. package/models/operations/insighttoollist.js +103 -0
  125. package/models/operations/insighttoollist.js.map +1 -0
  126. package/models/operations/sessionsummarygetbyid.d.ts +29 -0
  127. package/models/operations/sessionsummarygetbyid.d.ts.map +1 -0
  128. package/models/operations/sessionsummarygetbyid.js +68 -0
  129. package/models/operations/sessionsummarygetbyid.js.map +1 -0
  130. package/openapi.json +1255 -35
  131. package/package.json +1 -1
  132. package/sdk/insights.d.ts +10 -0
  133. package/sdk/insights.d.ts.map +1 -0
  134. package/sdk/insights.js +19 -0
  135. package/sdk/insights.js.map +1 -0
  136. package/sdk/sdk.d.ts +3 -0
  137. package/sdk/sdk.d.ts.map +1 -1
  138. package/sdk/sdk.js +4 -0
  139. package/sdk/sdk.js.map +1 -1
  140. package/sdk/sessions.d.ts +3 -0
  141. package/sdk/sessions.d.ts.map +1 -1
  142. package/sdk/sessions.js +4 -0
  143. package/sdk/sessions.js.map +1 -1
  144. package/sdk/summary.d.ts +9 -0
  145. package/sdk/summary.d.ts.map +1 -0
  146. package/sdk/summary.js +19 -0
  147. package/sdk/summary.js.map +1 -0
  148. package/sdk/syllablesdktools.d.ts +41 -0
  149. package/sdk/syllablesdktools.d.ts.map +1 -0
  150. package/sdk/syllablesdktools.js +62 -0
  151. package/sdk/syllablesdktools.js.map +1 -0
  152. package/sdk/workflows.d.ts +41 -0
  153. package/sdk/workflows.d.ts.map +1 -0
  154. package/sdk/workflows.js +62 -0
  155. package/sdk/workflows.js.map +1 -0
  156. package/src/funcs/insightsToolsCreate.ts +135 -0
  157. package/src/funcs/insightsToolsGetById.ts +142 -0
  158. package/src/funcs/insightsToolsInsightToolGetDefinitions.ts +112 -0
  159. package/src/funcs/insightsToolsList.ts +148 -0
  160. package/src/funcs/insightsToolsUpdate.ts +143 -0
  161. package/src/funcs/insightsWorkflowsCreate.ts +135 -0
  162. package/src/funcs/insightsWorkflowsDelete.ts +145 -0
  163. package/src/funcs/insightsWorkflowsGetById.ts +145 -0
  164. package/src/funcs/insightsWorkflowsList.ts +149 -0
  165. package/src/funcs/insightsWorkflowsUpdate.ts +148 -0
  166. package/src/funcs/sessionsSummaryGetById.ts +140 -0
  167. package/src/lib/config.ts +2 -2
  168. package/src/models/components/index.ts +9 -0
  169. package/src/models/components/insighttooldefinition.ts +213 -0
  170. package/src/models/components/insighttoolinput.ts +163 -0
  171. package/src/models/components/insighttooloutput.ts +210 -0
  172. package/src/models/components/insighttoolproperties.ts +37 -0
  173. package/src/models/components/insightworkflowinput.ts +161 -0
  174. package/src/models/components/insightworkflowoutput.ts +206 -0
  175. package/src/models/components/insightworkflowproperties.ts +40 -0
  176. package/src/models/components/listresponseinsighttooloutput.ts +103 -0
  177. package/src/models/components/listresponseinsightworkflowoutput.ts +104 -0
  178. package/src/models/operations/directoryworkflowdelete.ts +77 -0
  179. package/src/models/operations/index.ts +8 -0
  180. package/src/models/operations/insightstoolupdate.ts +82 -0
  181. package/src/models/operations/insightsworkflowgetbyid.ts +77 -0
  182. package/src/models/operations/insightsworkflowlist.ts +130 -0
  183. package/src/models/operations/insightsworkflowupdate.ts +84 -0
  184. package/src/models/operations/insighttoolgetbyid.ts +75 -0
  185. package/src/models/operations/insighttoollist.ts +126 -0
  186. package/src/models/operations/sessionsummarygetbyid.ts +77 -0
  187. package/src/sdk/insights.ts +19 -0
  188. package/src/sdk/sdk.ts +6 -0
  189. package/src/sdk/sessions.ts +6 -0
  190. package/src/sdk/summary.ts +24 -0
  191. package/src/sdk/syllablesdktools.ts +98 -0
  192. package/src/sdk/workflows.ts +100 -0
@@ -0,0 +1,140 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { SyllableSDKCore } from "../core.js";
7
+ import { encodeSimple } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { SDKError } from "../models/errors/sdkerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Get Session Summary By Id
29
+ */
30
+ export async function sessionsSummaryGetById(
31
+ client: SyllableSDKCore,
32
+ request: operations.SessionSummaryGetByIdRequest,
33
+ options?: RequestOptions,
34
+ ): Promise<
35
+ Result<
36
+ string,
37
+ | errors.HTTPValidationError
38
+ | SDKError
39
+ | SDKValidationError
40
+ | UnexpectedClientError
41
+ | InvalidRequestError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | ConnectionError
45
+ >
46
+ > {
47
+ const parsed = safeParse(
48
+ request,
49
+ (value) =>
50
+ operations.SessionSummaryGetByIdRequest$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = null;
58
+
59
+ const pathParams = {
60
+ session_id: encodeSimple("session_id", payload.session_id, {
61
+ explode: false,
62
+ charEncoding: "percent",
63
+ }),
64
+ };
65
+
66
+ const path = pathToFunc("/api/v1/sessions/summary/{session_id}")(pathParams);
67
+
68
+ const headers = new Headers(compactMap({
69
+ Accept: "application/json",
70
+ }));
71
+
72
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
73
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
74
+ const requestSecurity = resolveGlobalSecurity(securityInput);
75
+
76
+ const context = {
77
+ baseURL: options?.serverURL ?? "",
78
+ operationID: "session_summary_get_by_id",
79
+ oAuth2Scopes: [],
80
+
81
+ resolvedSecurity: requestSecurity,
82
+
83
+ securitySource: client._options.apiKeyHeader,
84
+ retryConfig: options?.retries
85
+ || client._options.retryConfig
86
+ || { strategy: "none" },
87
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
88
+ };
89
+
90
+ const requestRes = client._createRequest(context, {
91
+ security: requestSecurity,
92
+ method: "GET",
93
+ baseURL: options?.serverURL,
94
+ path: path,
95
+ headers: headers,
96
+ body: body,
97
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
98
+ }, options);
99
+ if (!requestRes.ok) {
100
+ return requestRes;
101
+ }
102
+ const req = requestRes.value;
103
+
104
+ const doResult = await client._do(req, {
105
+ context,
106
+ errorCodes: ["422", "4XX", "5XX"],
107
+ retryConfig: context.retryConfig,
108
+ retryCodes: context.retryCodes,
109
+ });
110
+ if (!doResult.ok) {
111
+ return doResult;
112
+ }
113
+ const response = doResult.value;
114
+
115
+ const responseFields = {
116
+ HttpMeta: { Response: response, Request: req },
117
+ };
118
+
119
+ const [result] = await M.match<
120
+ string,
121
+ | errors.HTTPValidationError
122
+ | SDKError
123
+ | SDKValidationError
124
+ | UnexpectedClientError
125
+ | InvalidRequestError
126
+ | RequestAbortedError
127
+ | RequestTimeoutError
128
+ | ConnectionError
129
+ >(
130
+ M.json(200, z.string()),
131
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
132
+ M.fail("4XX"),
133
+ M.fail("5XX"),
134
+ )(response, { extraFields: responseFields });
135
+ if (!result.ok) {
136
+ return result;
137
+ }
138
+
139
+ return result;
140
+ }
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.2",
60
- sdkVersion: "0.1.0-alpha.46",
60
+ sdkVersion: "0.1.0-alpha.47",
61
61
  genVersion: "2.512.4",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.1.0-alpha.46 2.512.4 0.0.2 syllable-sdk",
63
+ "speakeasy-sdk/typescript 0.1.0-alpha.47 2.512.4 0.0.2 syllable-sdk",
64
64
  } as const;
@@ -38,6 +38,13 @@ export * from "./datasourceupdaterequest.js";
38
38
  export * from "./dayofweek.js";
39
39
  export * from "./event.js";
40
40
  export * from "./eventproperties.js";
41
+ export * from "./insighttooldefinition.js";
42
+ export * from "./insighttoolinput.js";
43
+ export * from "./insighttooloutput.js";
44
+ export * from "./insighttoolproperties.js";
45
+ export * from "./insightworkflowinput.js";
46
+ export * from "./insightworkflowoutput.js";
47
+ export * from "./insightworkflowproperties.js";
41
48
  export * from "./internaltool.js";
42
49
  export * from "./listresponseagentresponse.js";
43
50
  export * from "./listresponseavailabletarget.js";
@@ -48,6 +55,8 @@ export * from "./listresponsecustommessageresponse.js";
48
55
  export * from "./listresponsedashboardresponse.js";
49
56
  export * from "./listresponsedatasourcemetadataresponse.js";
50
57
  export * from "./listresponseevent.js";
58
+ export * from "./listresponseinsighttooloutput.js";
59
+ export * from "./listresponseinsightworkflowoutput.js";
51
60
  export * from "./listresponsepromptresponse.js";
52
61
  export * from "./listresponseserviceresponse.js";
53
62
  export * from "./listresponsesession.js";
@@ -0,0 +1,213 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Parameters for Insight Tool Definition
13
+ */
14
+ export type ToolParameters = {};
15
+
16
+ /**
17
+ * Result key/types for Insight Tool Definition
18
+ */
19
+ export type ToolResultSet = {};
20
+
21
+ export type InsightToolDefinition = {
22
+ /**
23
+ * Unique ID for Insight Tool Definition
24
+ */
25
+ id: number;
26
+ /**
27
+ * Human readable name of Insight Tool Definition
28
+ */
29
+ name: string;
30
+ /**
31
+ * Type of Insight Tool Definition
32
+ */
33
+ type: string;
34
+ /**
35
+ * Text description of Insight Tool Definition
36
+ */
37
+ description: string;
38
+ /**
39
+ * Parameters for Insight Tool Definition
40
+ */
41
+ toolParameters: ToolParameters;
42
+ /**
43
+ * Result key/types for Insight Tool Definition
44
+ */
45
+ toolResultSet: ToolResultSet;
46
+ };
47
+
48
+ /** @internal */
49
+ export const ToolParameters$inboundSchema: z.ZodType<
50
+ ToolParameters,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({});
54
+
55
+ /** @internal */
56
+ export type ToolParameters$Outbound = {};
57
+
58
+ /** @internal */
59
+ export const ToolParameters$outboundSchema: z.ZodType<
60
+ ToolParameters$Outbound,
61
+ z.ZodTypeDef,
62
+ ToolParameters
63
+ > = z.object({});
64
+
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export namespace ToolParameters$ {
70
+ /** @deprecated use `ToolParameters$inboundSchema` instead. */
71
+ export const inboundSchema = ToolParameters$inboundSchema;
72
+ /** @deprecated use `ToolParameters$outboundSchema` instead. */
73
+ export const outboundSchema = ToolParameters$outboundSchema;
74
+ /** @deprecated use `ToolParameters$Outbound` instead. */
75
+ export type Outbound = ToolParameters$Outbound;
76
+ }
77
+
78
+ export function toolParametersToJSON(toolParameters: ToolParameters): string {
79
+ return JSON.stringify(ToolParameters$outboundSchema.parse(toolParameters));
80
+ }
81
+
82
+ export function toolParametersFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<ToolParameters, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) => ToolParameters$inboundSchema.parse(JSON.parse(x)),
88
+ `Failed to parse 'ToolParameters' from JSON`,
89
+ );
90
+ }
91
+
92
+ /** @internal */
93
+ export const ToolResultSet$inboundSchema: z.ZodType<
94
+ ToolResultSet,
95
+ z.ZodTypeDef,
96
+ unknown
97
+ > = z.object({});
98
+
99
+ /** @internal */
100
+ export type ToolResultSet$Outbound = {};
101
+
102
+ /** @internal */
103
+ export const ToolResultSet$outboundSchema: z.ZodType<
104
+ ToolResultSet$Outbound,
105
+ z.ZodTypeDef,
106
+ ToolResultSet
107
+ > = z.object({});
108
+
109
+ /**
110
+ * @internal
111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
112
+ */
113
+ export namespace ToolResultSet$ {
114
+ /** @deprecated use `ToolResultSet$inboundSchema` instead. */
115
+ export const inboundSchema = ToolResultSet$inboundSchema;
116
+ /** @deprecated use `ToolResultSet$outboundSchema` instead. */
117
+ export const outboundSchema = ToolResultSet$outboundSchema;
118
+ /** @deprecated use `ToolResultSet$Outbound` instead. */
119
+ export type Outbound = ToolResultSet$Outbound;
120
+ }
121
+
122
+ export function toolResultSetToJSON(toolResultSet: ToolResultSet): string {
123
+ return JSON.stringify(ToolResultSet$outboundSchema.parse(toolResultSet));
124
+ }
125
+
126
+ export function toolResultSetFromJSON(
127
+ jsonString: string,
128
+ ): SafeParseResult<ToolResultSet, SDKValidationError> {
129
+ return safeParse(
130
+ jsonString,
131
+ (x) => ToolResultSet$inboundSchema.parse(JSON.parse(x)),
132
+ `Failed to parse 'ToolResultSet' from JSON`,
133
+ );
134
+ }
135
+
136
+ /** @internal */
137
+ export const InsightToolDefinition$inboundSchema: z.ZodType<
138
+ InsightToolDefinition,
139
+ z.ZodTypeDef,
140
+ unknown
141
+ > = z.object({
142
+ id: z.number().int(),
143
+ name: z.string(),
144
+ type: z.string(),
145
+ description: z.string(),
146
+ tool_parameters: z.lazy(() => ToolParameters$inboundSchema),
147
+ tool_result_set: z.lazy(() => ToolResultSet$inboundSchema),
148
+ }).transform((v) => {
149
+ return remap$(v, {
150
+ "tool_parameters": "toolParameters",
151
+ "tool_result_set": "toolResultSet",
152
+ });
153
+ });
154
+
155
+ /** @internal */
156
+ export type InsightToolDefinition$Outbound = {
157
+ id: number;
158
+ name: string;
159
+ type: string;
160
+ description: string;
161
+ tool_parameters: ToolParameters$Outbound;
162
+ tool_result_set: ToolResultSet$Outbound;
163
+ };
164
+
165
+ /** @internal */
166
+ export const InsightToolDefinition$outboundSchema: z.ZodType<
167
+ InsightToolDefinition$Outbound,
168
+ z.ZodTypeDef,
169
+ InsightToolDefinition
170
+ > = z.object({
171
+ id: z.number().int(),
172
+ name: z.string(),
173
+ type: z.string(),
174
+ description: z.string(),
175
+ toolParameters: z.lazy(() => ToolParameters$outboundSchema),
176
+ toolResultSet: z.lazy(() => ToolResultSet$outboundSchema),
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ toolParameters: "tool_parameters",
180
+ toolResultSet: "tool_result_set",
181
+ });
182
+ });
183
+
184
+ /**
185
+ * @internal
186
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
187
+ */
188
+ export namespace InsightToolDefinition$ {
189
+ /** @deprecated use `InsightToolDefinition$inboundSchema` instead. */
190
+ export const inboundSchema = InsightToolDefinition$inboundSchema;
191
+ /** @deprecated use `InsightToolDefinition$outboundSchema` instead. */
192
+ export const outboundSchema = InsightToolDefinition$outboundSchema;
193
+ /** @deprecated use `InsightToolDefinition$Outbound` instead. */
194
+ export type Outbound = InsightToolDefinition$Outbound;
195
+ }
196
+
197
+ export function insightToolDefinitionToJSON(
198
+ insightToolDefinition: InsightToolDefinition,
199
+ ): string {
200
+ return JSON.stringify(
201
+ InsightToolDefinition$outboundSchema.parse(insightToolDefinition),
202
+ );
203
+ }
204
+
205
+ export function insightToolDefinitionFromJSON(
206
+ jsonString: string,
207
+ ): SafeParseResult<InsightToolDefinition, SDKValidationError> {
208
+ return safeParse(
209
+ jsonString,
210
+ (x) => InsightToolDefinition$inboundSchema.parse(JSON.parse(x)),
211
+ `Failed to parse 'InsightToolDefinition' from JSON`,
212
+ );
213
+ }
@@ -0,0 +1,163 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * Arguments for Insight Tool
13
+ */
14
+ export type InsightToolInputToolArguments = {};
15
+
16
+ export type InsightToolInput = {
17
+ /**
18
+ * Human readable name of Insight Tool
19
+ */
20
+ name: string;
21
+ /**
22
+ * Text description of Insight Tool
23
+ */
24
+ description: string;
25
+ /**
26
+ * Version number of Insight Tool
27
+ */
28
+ version: number;
29
+ /**
30
+ * Arguments for Insight Tool
31
+ */
32
+ toolArguments: InsightToolInputToolArguments;
33
+ /**
34
+ * Unique ID for Insight Tool Definition
35
+ */
36
+ insightToolDefinitionId: number;
37
+ };
38
+
39
+ /** @internal */
40
+ export const InsightToolInputToolArguments$inboundSchema: z.ZodType<
41
+ InsightToolInputToolArguments,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({});
45
+
46
+ /** @internal */
47
+ export type InsightToolInputToolArguments$Outbound = {};
48
+
49
+ /** @internal */
50
+ export const InsightToolInputToolArguments$outboundSchema: z.ZodType<
51
+ InsightToolInputToolArguments$Outbound,
52
+ z.ZodTypeDef,
53
+ InsightToolInputToolArguments
54
+ > = z.object({});
55
+
56
+ /**
57
+ * @internal
58
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
+ */
60
+ export namespace InsightToolInputToolArguments$ {
61
+ /** @deprecated use `InsightToolInputToolArguments$inboundSchema` instead. */
62
+ export const inboundSchema = InsightToolInputToolArguments$inboundSchema;
63
+ /** @deprecated use `InsightToolInputToolArguments$outboundSchema` instead. */
64
+ export const outboundSchema = InsightToolInputToolArguments$outboundSchema;
65
+ /** @deprecated use `InsightToolInputToolArguments$Outbound` instead. */
66
+ export type Outbound = InsightToolInputToolArguments$Outbound;
67
+ }
68
+
69
+ export function insightToolInputToolArgumentsToJSON(
70
+ insightToolInputToolArguments: InsightToolInputToolArguments,
71
+ ): string {
72
+ return JSON.stringify(
73
+ InsightToolInputToolArguments$outboundSchema.parse(
74
+ insightToolInputToolArguments,
75
+ ),
76
+ );
77
+ }
78
+
79
+ export function insightToolInputToolArgumentsFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<InsightToolInputToolArguments, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => InsightToolInputToolArguments$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'InsightToolInputToolArguments' from JSON`,
86
+ );
87
+ }
88
+
89
+ /** @internal */
90
+ export const InsightToolInput$inboundSchema: z.ZodType<
91
+ InsightToolInput,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ name: z.string(),
96
+ description: z.string(),
97
+ version: z.number().int(),
98
+ tool_arguments: z.lazy(() => InsightToolInputToolArguments$inboundSchema),
99
+ insight_tool_definition_id: z.number().int(),
100
+ }).transform((v) => {
101
+ return remap$(v, {
102
+ "tool_arguments": "toolArguments",
103
+ "insight_tool_definition_id": "insightToolDefinitionId",
104
+ });
105
+ });
106
+
107
+ /** @internal */
108
+ export type InsightToolInput$Outbound = {
109
+ name: string;
110
+ description: string;
111
+ version: number;
112
+ tool_arguments: InsightToolInputToolArguments$Outbound;
113
+ insight_tool_definition_id: number;
114
+ };
115
+
116
+ /** @internal */
117
+ export const InsightToolInput$outboundSchema: z.ZodType<
118
+ InsightToolInput$Outbound,
119
+ z.ZodTypeDef,
120
+ InsightToolInput
121
+ > = z.object({
122
+ name: z.string(),
123
+ description: z.string(),
124
+ version: z.number().int(),
125
+ toolArguments: z.lazy(() => InsightToolInputToolArguments$outboundSchema),
126
+ insightToolDefinitionId: z.number().int(),
127
+ }).transform((v) => {
128
+ return remap$(v, {
129
+ toolArguments: "tool_arguments",
130
+ insightToolDefinitionId: "insight_tool_definition_id",
131
+ });
132
+ });
133
+
134
+ /**
135
+ * @internal
136
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
137
+ */
138
+ export namespace InsightToolInput$ {
139
+ /** @deprecated use `InsightToolInput$inboundSchema` instead. */
140
+ export const inboundSchema = InsightToolInput$inboundSchema;
141
+ /** @deprecated use `InsightToolInput$outboundSchema` instead. */
142
+ export const outboundSchema = InsightToolInput$outboundSchema;
143
+ /** @deprecated use `InsightToolInput$Outbound` instead. */
144
+ export type Outbound = InsightToolInput$Outbound;
145
+ }
146
+
147
+ export function insightToolInputToJSON(
148
+ insightToolInput: InsightToolInput,
149
+ ): string {
150
+ return JSON.stringify(
151
+ InsightToolInput$outboundSchema.parse(insightToolInput),
152
+ );
153
+ }
154
+
155
+ export function insightToolInputFromJSON(
156
+ jsonString: string,
157
+ ): SafeParseResult<InsightToolInput, SDKValidationError> {
158
+ return safeParse(
159
+ jsonString,
160
+ (x) => InsightToolInput$inboundSchema.parse(JSON.parse(x)),
161
+ `Failed to parse 'InsightToolInput' from JSON`,
162
+ );
163
+ }