syllable-sdk 0.1.0-alpha.45 → 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 (215) 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 +5 -2
  54. package/models/components/datasourcecreaterequest.d.ts +1 -1
  55. package/models/components/datasourcedetailresponse.d.ts +1 -1
  56. package/models/components/datasourcemetadataresponse.d.ts +1 -1
  57. package/models/components/datasourceupdaterequest.d.ts +1 -1
  58. package/models/components/index.d.ts +10 -0
  59. package/models/components/index.d.ts.map +1 -1
  60. package/models/components/index.js +10 -0
  61. package/models/components/index.js.map +1 -1
  62. package/models/components/insighttooldefinition.d.ts +105 -0
  63. package/models/components/insighttooldefinition.d.ts.map +1 -0
  64. package/models/components/insighttooldefinition.js +126 -0
  65. package/models/components/insighttooldefinition.js.map +1 -0
  66. package/models/components/insighttoolinput.d.ts +76 -0
  67. package/models/components/insighttoolinput.d.ts.map +1 -0
  68. package/models/components/insighttoolinput.js +101 -0
  69. package/models/components/insighttoolinput.js.map +1 -0
  70. package/models/components/insighttooloutput.d.ts +102 -0
  71. package/models/components/insighttooloutput.d.ts.map +1 -0
  72. package/models/components/insighttooloutput.js +124 -0
  73. package/models/components/insighttooloutput.js.map +1 -0
  74. package/models/components/insighttoolproperties.d.ts +40 -0
  75. package/models/components/insighttoolproperties.d.ts.map +1 -0
  76. package/models/components/insighttoolproperties.js +54 -0
  77. package/models/components/insighttoolproperties.js.map +1 -0
  78. package/models/components/insightworkflowinput.d.ts +76 -0
  79. package/models/components/insightworkflowinput.d.ts.map +1 -0
  80. package/models/components/insightworkflowinput.js +99 -0
  81. package/models/components/insightworkflowinput.js.map +1 -0
  82. package/models/components/insightworkflowoutput.d.ts +102 -0
  83. package/models/components/insightworkflowoutput.d.ts.map +1 -0
  84. package/models/components/insightworkflowoutput.js +120 -0
  85. package/models/components/insightworkflowoutput.js.map +1 -0
  86. package/models/components/insightworkflowproperties.d.ts +43 -0
  87. package/models/components/insightworkflowproperties.d.ts.map +1 -0
  88. package/models/components/insightworkflowproperties.js +55 -0
  89. package/models/components/insightworkflowproperties.js.map +1 -0
  90. package/models/components/listresponseinsighttooloutput.d.ts +38 -0
  91. package/models/components/listresponseinsighttooloutput.d.ts.map +1 -0
  92. package/models/components/listresponseinsighttooloutput.js +81 -0
  93. package/models/components/listresponseinsighttooloutput.js.map +1 -0
  94. package/models/components/listresponseinsightworkflowoutput.d.ts +38 -0
  95. package/models/components/listresponseinsightworkflowoutput.d.ts.map +1 -0
  96. package/models/components/listresponseinsightworkflowoutput.js +81 -0
  97. package/models/components/listresponseinsightworkflowoutput.js.map +1 -0
  98. package/models/components/toolagentinfo.d.ts +40 -0
  99. package/models/components/toolagentinfo.d.ts.map +1 -0
  100. package/models/components/toolagentinfo.js +61 -0
  101. package/models/components/toolagentinfo.js.map +1 -0
  102. package/models/components/tooldetailresponse.d.ts +6 -0
  103. package/models/components/tooldetailresponse.d.ts.map +1 -1
  104. package/models/components/tooldetailresponse.js +5 -0
  105. package/models/components/tooldetailresponse.js.map +1 -1
  106. package/models/components/toolresponse.d.ts +6 -0
  107. package/models/components/toolresponse.d.ts.map +1 -1
  108. package/models/components/toolresponse.js +5 -0
  109. package/models/components/toolresponse.js.map +1 -1
  110. package/models/operations/directoryworkflowdelete.d.ts +29 -0
  111. package/models/operations/directoryworkflowdelete.d.ts.map +1 -0
  112. package/models/operations/directoryworkflowdelete.js +68 -0
  113. package/models/operations/directoryworkflowdelete.js.map +1 -0
  114. package/models/operations/index.d.ts +8 -0
  115. package/models/operations/index.d.ts.map +1 -1
  116. package/models/operations/index.js +8 -0
  117. package/models/operations/index.js.map +1 -1
  118. package/models/operations/insightstoolupdate.d.ts +32 -0
  119. package/models/operations/insightstoolupdate.d.ts.map +1 -0
  120. package/models/operations/insightstoolupdate.js +73 -0
  121. package/models/operations/insightstoolupdate.js.map +1 -0
  122. package/models/operations/insightsworkflowgetbyid.d.ts +29 -0
  123. package/models/operations/insightsworkflowgetbyid.d.ts.map +1 -0
  124. package/models/operations/insightsworkflowgetbyid.js +68 -0
  125. package/models/operations/insightsworkflowgetbyid.js.map +1 -0
  126. package/models/operations/insightsworkflowlist.d.ts +46 -0
  127. package/models/operations/insightsworkflowlist.d.ts.map +1 -0
  128. package/models/operations/insightsworkflowlist.js +101 -0
  129. package/models/operations/insightsworkflowlist.js.map +1 -0
  130. package/models/operations/insightsworkflowupdate.d.ts +32 -0
  131. package/models/operations/insightsworkflowupdate.d.ts.map +1 -0
  132. package/models/operations/insightsworkflowupdate.js +73 -0
  133. package/models/operations/insightsworkflowupdate.js.map +1 -0
  134. package/models/operations/insighttoolgetbyid.d.ts +29 -0
  135. package/models/operations/insighttoolgetbyid.d.ts.map +1 -0
  136. package/models/operations/insighttoolgetbyid.js +68 -0
  137. package/models/operations/insighttoolgetbyid.js.map +1 -0
  138. package/models/operations/insighttoollist.d.ts +46 -0
  139. package/models/operations/insighttoollist.d.ts.map +1 -0
  140. package/models/operations/insighttoollist.js +103 -0
  141. package/models/operations/insighttoollist.js.map +1 -0
  142. package/models/operations/sessionsummarygetbyid.d.ts +29 -0
  143. package/models/operations/sessionsummarygetbyid.d.ts.map +1 -0
  144. package/models/operations/sessionsummarygetbyid.js +68 -0
  145. package/models/operations/sessionsummarygetbyid.js.map +1 -0
  146. package/openapi.json +1315 -35
  147. package/package.json +1 -1
  148. package/sdk/insights.d.ts +10 -0
  149. package/sdk/insights.d.ts.map +1 -0
  150. package/sdk/insights.js +19 -0
  151. package/sdk/insights.js.map +1 -0
  152. package/sdk/sdk.d.ts +3 -0
  153. package/sdk/sdk.d.ts.map +1 -1
  154. package/sdk/sdk.js +4 -0
  155. package/sdk/sdk.js.map +1 -1
  156. package/sdk/sessions.d.ts +3 -0
  157. package/sdk/sessions.d.ts.map +1 -1
  158. package/sdk/sessions.js +4 -0
  159. package/sdk/sessions.js.map +1 -1
  160. package/sdk/summary.d.ts +9 -0
  161. package/sdk/summary.d.ts.map +1 -0
  162. package/sdk/summary.js +19 -0
  163. package/sdk/summary.js.map +1 -0
  164. package/sdk/syllablesdktools.d.ts +41 -0
  165. package/sdk/syllablesdktools.d.ts.map +1 -0
  166. package/sdk/syllablesdktools.js +62 -0
  167. package/sdk/syllablesdktools.js.map +1 -0
  168. package/sdk/workflows.d.ts +41 -0
  169. package/sdk/workflows.d.ts.map +1 -0
  170. package/sdk/workflows.js +62 -0
  171. package/sdk/workflows.js.map +1 -0
  172. package/src/funcs/insightsToolsCreate.ts +135 -0
  173. package/src/funcs/insightsToolsGetById.ts +142 -0
  174. package/src/funcs/insightsToolsInsightToolGetDefinitions.ts +112 -0
  175. package/src/funcs/insightsToolsList.ts +148 -0
  176. package/src/funcs/insightsToolsUpdate.ts +143 -0
  177. package/src/funcs/insightsWorkflowsCreate.ts +135 -0
  178. package/src/funcs/insightsWorkflowsDelete.ts +145 -0
  179. package/src/funcs/insightsWorkflowsGetById.ts +145 -0
  180. package/src/funcs/insightsWorkflowsList.ts +149 -0
  181. package/src/funcs/insightsWorkflowsUpdate.ts +148 -0
  182. package/src/funcs/sessionsSummaryGetById.ts +140 -0
  183. package/src/lib/config.ts +2 -2
  184. package/src/models/components/datasourcecreaterequest.ts +1 -1
  185. package/src/models/components/datasourcedetailresponse.ts +1 -1
  186. package/src/models/components/datasourcemetadataresponse.ts +1 -1
  187. package/src/models/components/datasourceupdaterequest.ts +1 -1
  188. package/src/models/components/index.ts +10 -0
  189. package/src/models/components/insighttooldefinition.ts +213 -0
  190. package/src/models/components/insighttoolinput.ts +163 -0
  191. package/src/models/components/insighttooloutput.ts +210 -0
  192. package/src/models/components/insighttoolproperties.ts +37 -0
  193. package/src/models/components/insightworkflowinput.ts +161 -0
  194. package/src/models/components/insightworkflowoutput.ts +206 -0
  195. package/src/models/components/insightworkflowproperties.ts +40 -0
  196. package/src/models/components/listresponseinsighttooloutput.ts +103 -0
  197. package/src/models/components/listresponseinsightworkflowoutput.ts +104 -0
  198. package/src/models/components/toolagentinfo.ts +75 -0
  199. package/src/models/components/tooldetailresponse.ts +15 -0
  200. package/src/models/components/toolresponse.ts +15 -0
  201. package/src/models/operations/directoryworkflowdelete.ts +77 -0
  202. package/src/models/operations/index.ts +8 -0
  203. package/src/models/operations/insightstoolupdate.ts +82 -0
  204. package/src/models/operations/insightsworkflowgetbyid.ts +77 -0
  205. package/src/models/operations/insightsworkflowlist.ts +130 -0
  206. package/src/models/operations/insightsworkflowupdate.ts +84 -0
  207. package/src/models/operations/insighttoolgetbyid.ts +75 -0
  208. package/src/models/operations/insighttoollist.ts +126 -0
  209. package/src/models/operations/sessionsummarygetbyid.ts +77 -0
  210. package/src/sdk/insights.ts +19 -0
  211. package/src/sdk/sdk.ts +6 -0
  212. package/src/sdk/sessions.ts +6 -0
  213. package/src/sdk/summary.ts +24 -0
  214. package/src/sdk/syllablesdktools.ts +98 -0
  215. package/src/sdk/workflows.ts +100 -0
@@ -0,0 +1,210 @@
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
+ import {
11
+ InsightToolDefinition,
12
+ InsightToolDefinition$inboundSchema,
13
+ InsightToolDefinition$Outbound,
14
+ InsightToolDefinition$outboundSchema,
15
+ } from "./insighttooldefinition.js";
16
+
17
+ /**
18
+ * Arguments for Insight Tool
19
+ */
20
+ export type ToolArguments = {};
21
+
22
+ export type InsightToolOutput = {
23
+ /**
24
+ * Human readable name of Insight Tool
25
+ */
26
+ name: string;
27
+ /**
28
+ * Text description of Insight Tool
29
+ */
30
+ description: string;
31
+ /**
32
+ * Version of Insight Tool
33
+ */
34
+ version: number;
35
+ /**
36
+ * Arguments for Insight Tool
37
+ */
38
+ toolArguments: ToolArguments;
39
+ /**
40
+ * Unique ID for Insight Tool Definition
41
+ */
42
+ insightToolDefinitionId: number;
43
+ /**
44
+ * Unique ID for Insight Tool
45
+ */
46
+ id: number;
47
+ /**
48
+ * Insight Tool Definition
49
+ */
50
+ insightToolDefinition?: InsightToolDefinition | null | undefined;
51
+ /**
52
+ * Timestamp of Insight Tool creation
53
+ */
54
+ createdAt?: Date | undefined;
55
+ /**
56
+ * Timestamp of Insight Tool update
57
+ */
58
+ updatedAt?: Date | undefined;
59
+ /**
60
+ * User who last updated Insight Tool
61
+ */
62
+ lastUpdatedBy: string;
63
+ };
64
+
65
+ /** @internal */
66
+ export const ToolArguments$inboundSchema: z.ZodType<
67
+ ToolArguments,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({});
71
+
72
+ /** @internal */
73
+ export type ToolArguments$Outbound = {};
74
+
75
+ /** @internal */
76
+ export const ToolArguments$outboundSchema: z.ZodType<
77
+ ToolArguments$Outbound,
78
+ z.ZodTypeDef,
79
+ ToolArguments
80
+ > = z.object({});
81
+
82
+ /**
83
+ * @internal
84
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
+ */
86
+ export namespace ToolArguments$ {
87
+ /** @deprecated use `ToolArguments$inboundSchema` instead. */
88
+ export const inboundSchema = ToolArguments$inboundSchema;
89
+ /** @deprecated use `ToolArguments$outboundSchema` instead. */
90
+ export const outboundSchema = ToolArguments$outboundSchema;
91
+ /** @deprecated use `ToolArguments$Outbound` instead. */
92
+ export type Outbound = ToolArguments$Outbound;
93
+ }
94
+
95
+ export function toolArgumentsToJSON(toolArguments: ToolArguments): string {
96
+ return JSON.stringify(ToolArguments$outboundSchema.parse(toolArguments));
97
+ }
98
+
99
+ export function toolArgumentsFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<ToolArguments, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => ToolArguments$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'ToolArguments' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const InsightToolOutput$inboundSchema: z.ZodType<
111
+ InsightToolOutput,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ name: z.string(),
116
+ description: z.string(),
117
+ version: z.number().int(),
118
+ tool_arguments: z.lazy(() => ToolArguments$inboundSchema),
119
+ insight_tool_definition_id: z.number().int(),
120
+ id: z.number().int(),
121
+ insight_tool_definition: z.nullable(InsightToolDefinition$inboundSchema)
122
+ .optional(),
123
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
124
+ .optional(),
125
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
126
+ .optional(),
127
+ last_updated_by: z.string(),
128
+ }).transform((v) => {
129
+ return remap$(v, {
130
+ "tool_arguments": "toolArguments",
131
+ "insight_tool_definition_id": "insightToolDefinitionId",
132
+ "insight_tool_definition": "insightToolDefinition",
133
+ "created_at": "createdAt",
134
+ "updated_at": "updatedAt",
135
+ "last_updated_by": "lastUpdatedBy",
136
+ });
137
+ });
138
+
139
+ /** @internal */
140
+ export type InsightToolOutput$Outbound = {
141
+ name: string;
142
+ description: string;
143
+ version: number;
144
+ tool_arguments: ToolArguments$Outbound;
145
+ insight_tool_definition_id: number;
146
+ id: number;
147
+ insight_tool_definition?: InsightToolDefinition$Outbound | null | undefined;
148
+ created_at?: string | undefined;
149
+ updated_at?: string | undefined;
150
+ last_updated_by: string;
151
+ };
152
+
153
+ /** @internal */
154
+ export const InsightToolOutput$outboundSchema: z.ZodType<
155
+ InsightToolOutput$Outbound,
156
+ z.ZodTypeDef,
157
+ InsightToolOutput
158
+ > = z.object({
159
+ name: z.string(),
160
+ description: z.string(),
161
+ version: z.number().int(),
162
+ toolArguments: z.lazy(() => ToolArguments$outboundSchema),
163
+ insightToolDefinitionId: z.number().int(),
164
+ id: z.number().int(),
165
+ insightToolDefinition: z.nullable(InsightToolDefinition$outboundSchema)
166
+ .optional(),
167
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
168
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
169
+ lastUpdatedBy: z.string(),
170
+ }).transform((v) => {
171
+ return remap$(v, {
172
+ toolArguments: "tool_arguments",
173
+ insightToolDefinitionId: "insight_tool_definition_id",
174
+ insightToolDefinition: "insight_tool_definition",
175
+ createdAt: "created_at",
176
+ updatedAt: "updated_at",
177
+ lastUpdatedBy: "last_updated_by",
178
+ });
179
+ });
180
+
181
+ /**
182
+ * @internal
183
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
184
+ */
185
+ export namespace InsightToolOutput$ {
186
+ /** @deprecated use `InsightToolOutput$inboundSchema` instead. */
187
+ export const inboundSchema = InsightToolOutput$inboundSchema;
188
+ /** @deprecated use `InsightToolOutput$outboundSchema` instead. */
189
+ export const outboundSchema = InsightToolOutput$outboundSchema;
190
+ /** @deprecated use `InsightToolOutput$Outbound` instead. */
191
+ export type Outbound = InsightToolOutput$Outbound;
192
+ }
193
+
194
+ export function insightToolOutputToJSON(
195
+ insightToolOutput: InsightToolOutput,
196
+ ): string {
197
+ return JSON.stringify(
198
+ InsightToolOutput$outboundSchema.parse(insightToolOutput),
199
+ );
200
+ }
201
+
202
+ export function insightToolOutputFromJSON(
203
+ jsonString: string,
204
+ ): SafeParseResult<InsightToolOutput, SDKValidationError> {
205
+ return safeParse(
206
+ jsonString,
207
+ (x) => InsightToolOutput$inboundSchema.parse(JSON.parse(x)),
208
+ `Failed to parse 'InsightToolOutput' from JSON`,
209
+ );
210
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const InsightToolProperties = {
9
+ Id: "id",
10
+ Name: "name",
11
+ Description: "description",
12
+ ToolArguments: "tool_arguments",
13
+ InsightToolDefinitionId: "insight_tool_definition_id",
14
+ UpdatedAt: "updated_at",
15
+ } as const;
16
+ export type InsightToolProperties = ClosedEnum<typeof InsightToolProperties>;
17
+
18
+ /** @internal */
19
+ export const InsightToolProperties$inboundSchema: z.ZodNativeEnum<
20
+ typeof InsightToolProperties
21
+ > = z.nativeEnum(InsightToolProperties);
22
+
23
+ /** @internal */
24
+ export const InsightToolProperties$outboundSchema: z.ZodNativeEnum<
25
+ typeof InsightToolProperties
26
+ > = InsightToolProperties$inboundSchema;
27
+
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export namespace InsightToolProperties$ {
33
+ /** @deprecated use `InsightToolProperties$inboundSchema` instead. */
34
+ export const inboundSchema = InsightToolProperties$inboundSchema;
35
+ /** @deprecated use `InsightToolProperties$outboundSchema` instead. */
36
+ export const outboundSchema = InsightToolProperties$outboundSchema;
37
+ }
@@ -0,0 +1,161 @@
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
+ * Conditions for Insight Workflow
13
+ */
14
+ export type InsightWorkflowInputConditions = {};
15
+
16
+ export type InsightWorkflowInput = {
17
+ /**
18
+ * Human readable name of Insight Workflow
19
+ */
20
+ name: string;
21
+ /**
22
+ * Text description of Insight Workflow
23
+ */
24
+ description: string;
25
+ /**
26
+ * List of Insight Tool IDs
27
+ */
28
+ insightToolIds: Array<number>;
29
+ /**
30
+ * Conditions for Insight Workflow
31
+ */
32
+ conditions: InsightWorkflowInputConditions;
33
+ /**
34
+ * Status of the Insight Workflow
35
+ */
36
+ status: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const InsightWorkflowInputConditions$inboundSchema: z.ZodType<
41
+ InsightWorkflowInputConditions,
42
+ z.ZodTypeDef,
43
+ unknown
44
+ > = z.object({});
45
+
46
+ /** @internal */
47
+ export type InsightWorkflowInputConditions$Outbound = {};
48
+
49
+ /** @internal */
50
+ export const InsightWorkflowInputConditions$outboundSchema: z.ZodType<
51
+ InsightWorkflowInputConditions$Outbound,
52
+ z.ZodTypeDef,
53
+ InsightWorkflowInputConditions
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 InsightWorkflowInputConditions$ {
61
+ /** @deprecated use `InsightWorkflowInputConditions$inboundSchema` instead. */
62
+ export const inboundSchema = InsightWorkflowInputConditions$inboundSchema;
63
+ /** @deprecated use `InsightWorkflowInputConditions$outboundSchema` instead. */
64
+ export const outboundSchema = InsightWorkflowInputConditions$outboundSchema;
65
+ /** @deprecated use `InsightWorkflowInputConditions$Outbound` instead. */
66
+ export type Outbound = InsightWorkflowInputConditions$Outbound;
67
+ }
68
+
69
+ export function insightWorkflowInputConditionsToJSON(
70
+ insightWorkflowInputConditions: InsightWorkflowInputConditions,
71
+ ): string {
72
+ return JSON.stringify(
73
+ InsightWorkflowInputConditions$outboundSchema.parse(
74
+ insightWorkflowInputConditions,
75
+ ),
76
+ );
77
+ }
78
+
79
+ export function insightWorkflowInputConditionsFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<InsightWorkflowInputConditions, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => InsightWorkflowInputConditions$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'InsightWorkflowInputConditions' from JSON`,
86
+ );
87
+ }
88
+
89
+ /** @internal */
90
+ export const InsightWorkflowInput$inboundSchema: z.ZodType<
91
+ InsightWorkflowInput,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ name: z.string(),
96
+ description: z.string(),
97
+ insight_tool_ids: z.array(z.number().int()),
98
+ conditions: z.lazy(() => InsightWorkflowInputConditions$inboundSchema),
99
+ status: z.string(),
100
+ }).transform((v) => {
101
+ return remap$(v, {
102
+ "insight_tool_ids": "insightToolIds",
103
+ });
104
+ });
105
+
106
+ /** @internal */
107
+ export type InsightWorkflowInput$Outbound = {
108
+ name: string;
109
+ description: string;
110
+ insight_tool_ids: Array<number>;
111
+ conditions: InsightWorkflowInputConditions$Outbound;
112
+ status: string;
113
+ };
114
+
115
+ /** @internal */
116
+ export const InsightWorkflowInput$outboundSchema: z.ZodType<
117
+ InsightWorkflowInput$Outbound,
118
+ z.ZodTypeDef,
119
+ InsightWorkflowInput
120
+ > = z.object({
121
+ name: z.string(),
122
+ description: z.string(),
123
+ insightToolIds: z.array(z.number().int()),
124
+ conditions: z.lazy(() => InsightWorkflowInputConditions$outboundSchema),
125
+ status: z.string(),
126
+ }).transform((v) => {
127
+ return remap$(v, {
128
+ insightToolIds: "insight_tool_ids",
129
+ });
130
+ });
131
+
132
+ /**
133
+ * @internal
134
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
+ */
136
+ export namespace InsightWorkflowInput$ {
137
+ /** @deprecated use `InsightWorkflowInput$inboundSchema` instead. */
138
+ export const inboundSchema = InsightWorkflowInput$inboundSchema;
139
+ /** @deprecated use `InsightWorkflowInput$outboundSchema` instead. */
140
+ export const outboundSchema = InsightWorkflowInput$outboundSchema;
141
+ /** @deprecated use `InsightWorkflowInput$Outbound` instead. */
142
+ export type Outbound = InsightWorkflowInput$Outbound;
143
+ }
144
+
145
+ export function insightWorkflowInputToJSON(
146
+ insightWorkflowInput: InsightWorkflowInput,
147
+ ): string {
148
+ return JSON.stringify(
149
+ InsightWorkflowInput$outboundSchema.parse(insightWorkflowInput),
150
+ );
151
+ }
152
+
153
+ export function insightWorkflowInputFromJSON(
154
+ jsonString: string,
155
+ ): SafeParseResult<InsightWorkflowInput, SDKValidationError> {
156
+ return safeParse(
157
+ jsonString,
158
+ (x) => InsightWorkflowInput$inboundSchema.parse(JSON.parse(x)),
159
+ `Failed to parse 'InsightWorkflowInput' from JSON`,
160
+ );
161
+ }
@@ -0,0 +1,206 @@
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
+ import {
11
+ InsightToolOutput,
12
+ InsightToolOutput$inboundSchema,
13
+ InsightToolOutput$Outbound,
14
+ InsightToolOutput$outboundSchema,
15
+ } from "./insighttooloutput.js";
16
+
17
+ /**
18
+ * Conditions for Insight Workflow
19
+ */
20
+ export type Conditions = {};
21
+
22
+ export type InsightWorkflowOutput = {
23
+ /**
24
+ * Human readable name of Insight Workflow
25
+ */
26
+ name: string;
27
+ /**
28
+ * Text description of Insight Workflow
29
+ */
30
+ description: string;
31
+ /**
32
+ * List of Insight Tool IDs
33
+ */
34
+ insightToolIds: Array<number>;
35
+ /**
36
+ * Conditions for Insight Workflow
37
+ */
38
+ conditions: Conditions;
39
+ /**
40
+ * Status of the Insight Workflow
41
+ */
42
+ status: string;
43
+ /**
44
+ * Unique ID for Insight Workflow
45
+ */
46
+ id: number;
47
+ /**
48
+ * List of Insight Tools
49
+ */
50
+ insightTools: Array<InsightToolOutput>;
51
+ /**
52
+ * Timestamp of Insight Workflow creation
53
+ */
54
+ createdAt?: Date | undefined;
55
+ /**
56
+ * Timestamp of Insight Workflow update
57
+ */
58
+ updatedAt?: Date | undefined;
59
+ /**
60
+ * User who last updated Insight Workflow
61
+ */
62
+ lastUpdatedBy: string;
63
+ };
64
+
65
+ /** @internal */
66
+ export const Conditions$inboundSchema: z.ZodType<
67
+ Conditions,
68
+ z.ZodTypeDef,
69
+ unknown
70
+ > = z.object({});
71
+
72
+ /** @internal */
73
+ export type Conditions$Outbound = {};
74
+
75
+ /** @internal */
76
+ export const Conditions$outboundSchema: z.ZodType<
77
+ Conditions$Outbound,
78
+ z.ZodTypeDef,
79
+ Conditions
80
+ > = z.object({});
81
+
82
+ /**
83
+ * @internal
84
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
+ */
86
+ export namespace Conditions$ {
87
+ /** @deprecated use `Conditions$inboundSchema` instead. */
88
+ export const inboundSchema = Conditions$inboundSchema;
89
+ /** @deprecated use `Conditions$outboundSchema` instead. */
90
+ export const outboundSchema = Conditions$outboundSchema;
91
+ /** @deprecated use `Conditions$Outbound` instead. */
92
+ export type Outbound = Conditions$Outbound;
93
+ }
94
+
95
+ export function conditionsToJSON(conditions: Conditions): string {
96
+ return JSON.stringify(Conditions$outboundSchema.parse(conditions));
97
+ }
98
+
99
+ export function conditionsFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<Conditions, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => Conditions$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'Conditions' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const InsightWorkflowOutput$inboundSchema: z.ZodType<
111
+ InsightWorkflowOutput,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ name: z.string(),
116
+ description: z.string(),
117
+ insight_tool_ids: z.array(z.number().int()),
118
+ conditions: z.lazy(() => Conditions$inboundSchema),
119
+ status: z.string(),
120
+ id: z.number().int(),
121
+ insight_tools: z.array(InsightToolOutput$inboundSchema),
122
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
123
+ .optional(),
124
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
125
+ .optional(),
126
+ last_updated_by: z.string(),
127
+ }).transform((v) => {
128
+ return remap$(v, {
129
+ "insight_tool_ids": "insightToolIds",
130
+ "insight_tools": "insightTools",
131
+ "created_at": "createdAt",
132
+ "updated_at": "updatedAt",
133
+ "last_updated_by": "lastUpdatedBy",
134
+ });
135
+ });
136
+
137
+ /** @internal */
138
+ export type InsightWorkflowOutput$Outbound = {
139
+ name: string;
140
+ description: string;
141
+ insight_tool_ids: Array<number>;
142
+ conditions: Conditions$Outbound;
143
+ status: string;
144
+ id: number;
145
+ insight_tools: Array<InsightToolOutput$Outbound>;
146
+ created_at?: string | undefined;
147
+ updated_at?: string | undefined;
148
+ last_updated_by: string;
149
+ };
150
+
151
+ /** @internal */
152
+ export const InsightWorkflowOutput$outboundSchema: z.ZodType<
153
+ InsightWorkflowOutput$Outbound,
154
+ z.ZodTypeDef,
155
+ InsightWorkflowOutput
156
+ > = z.object({
157
+ name: z.string(),
158
+ description: z.string(),
159
+ insightToolIds: z.array(z.number().int()),
160
+ conditions: z.lazy(() => Conditions$outboundSchema),
161
+ status: z.string(),
162
+ id: z.number().int(),
163
+ insightTools: z.array(InsightToolOutput$outboundSchema),
164
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
165
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
166
+ lastUpdatedBy: z.string(),
167
+ }).transform((v) => {
168
+ return remap$(v, {
169
+ insightToolIds: "insight_tool_ids",
170
+ insightTools: "insight_tools",
171
+ createdAt: "created_at",
172
+ updatedAt: "updated_at",
173
+ lastUpdatedBy: "last_updated_by",
174
+ });
175
+ });
176
+
177
+ /**
178
+ * @internal
179
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
180
+ */
181
+ export namespace InsightWorkflowOutput$ {
182
+ /** @deprecated use `InsightWorkflowOutput$inboundSchema` instead. */
183
+ export const inboundSchema = InsightWorkflowOutput$inboundSchema;
184
+ /** @deprecated use `InsightWorkflowOutput$outboundSchema` instead. */
185
+ export const outboundSchema = InsightWorkflowOutput$outboundSchema;
186
+ /** @deprecated use `InsightWorkflowOutput$Outbound` instead. */
187
+ export type Outbound = InsightWorkflowOutput$Outbound;
188
+ }
189
+
190
+ export function insightWorkflowOutputToJSON(
191
+ insightWorkflowOutput: InsightWorkflowOutput,
192
+ ): string {
193
+ return JSON.stringify(
194
+ InsightWorkflowOutput$outboundSchema.parse(insightWorkflowOutput),
195
+ );
196
+ }
197
+
198
+ export function insightWorkflowOutputFromJSON(
199
+ jsonString: string,
200
+ ): SafeParseResult<InsightWorkflowOutput, SDKValidationError> {
201
+ return safeParse(
202
+ jsonString,
203
+ (x) => InsightWorkflowOutput$inboundSchema.parse(JSON.parse(x)),
204
+ `Failed to parse 'InsightWorkflowOutput' from JSON`,
205
+ );
206
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const InsightWorkflowProperties = {
9
+ Id: "id",
10
+ Name: "name",
11
+ Description: "description",
12
+ Status: "status",
13
+ Conditions: "conditions",
14
+ InsightToolIds: "insight_tool_ids",
15
+ UpdatedAt: "updated_at",
16
+ } as const;
17
+ export type InsightWorkflowProperties = ClosedEnum<
18
+ typeof InsightWorkflowProperties
19
+ >;
20
+
21
+ /** @internal */
22
+ export const InsightWorkflowProperties$inboundSchema: z.ZodNativeEnum<
23
+ typeof InsightWorkflowProperties
24
+ > = z.nativeEnum(InsightWorkflowProperties);
25
+
26
+ /** @internal */
27
+ export const InsightWorkflowProperties$outboundSchema: z.ZodNativeEnum<
28
+ typeof InsightWorkflowProperties
29
+ > = InsightWorkflowProperties$inboundSchema;
30
+
31
+ /**
32
+ * @internal
33
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
+ */
35
+ export namespace InsightWorkflowProperties$ {
36
+ /** @deprecated use `InsightWorkflowProperties$inboundSchema` instead. */
37
+ export const inboundSchema = InsightWorkflowProperties$inboundSchema;
38
+ /** @deprecated use `InsightWorkflowProperties$outboundSchema` instead. */
39
+ export const outboundSchema = InsightWorkflowProperties$outboundSchema;
40
+ }