syllable-sdk 0.1.0-alpha.42 → 0.1.0-alpha.44

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 (71) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/mintlify/mint.json +6 -4
  5. package/models/components/agentcreate.d.ts +1 -1
  6. package/models/components/agentresponse.d.ts +7 -1
  7. package/models/components/agentresponse.d.ts.map +1 -1
  8. package/models/components/agentresponse.js +3 -0
  9. package/models/components/agentresponse.js.map +1 -1
  10. package/models/components/agentupdate.d.ts +1 -1
  11. package/models/components/datasourcecreaterequest.d.ts +3 -3
  12. package/models/components/datasourcecreaterequest.d.ts.map +1 -1
  13. package/models/components/datasourcecreaterequest.js +2 -2
  14. package/models/components/datasourcecreaterequest.js.map +1 -1
  15. package/models/components/datasourcedetailresponse.d.ts +3 -3
  16. package/models/components/datasourcedetailresponse.d.ts.map +1 -1
  17. package/models/components/datasourcedetailresponse.js +2 -2
  18. package/models/components/datasourcedetailresponse.js.map +1 -1
  19. package/models/components/datasourcemetadataresponse.d.ts +3 -3
  20. package/models/components/datasourcemetadataresponse.d.ts.map +1 -1
  21. package/models/components/datasourcemetadataresponse.js +2 -2
  22. package/models/components/datasourcemetadataresponse.js.map +1 -1
  23. package/models/components/datasourceupdaterequest.d.ts +3 -3
  24. package/models/components/datasourceupdaterequest.d.ts.map +1 -1
  25. package/models/components/datasourceupdaterequest.js +2 -2
  26. package/models/components/datasourceupdaterequest.js.map +1 -1
  27. package/models/components/index.d.ts +3 -0
  28. package/models/components/index.d.ts.map +1 -1
  29. package/models/components/index.js +3 -0
  30. package/models/components/index.js.map +1 -1
  31. package/models/components/statictoolparameter.d.ts +56 -0
  32. package/models/components/statictoolparameter.d.ts.map +1 -0
  33. package/models/components/statictoolparameter.js +68 -0
  34. package/models/components/statictoolparameter.js.map +1 -0
  35. package/models/components/statictoolparametertype.d.ts +40 -0
  36. package/models/components/statictoolparametertype.d.ts.map +1 -0
  37. package/models/components/statictoolparametertype.js +55 -0
  38. package/models/components/statictoolparametertype.js.map +1 -0
  39. package/models/components/tooldefinition.d.ts +6 -0
  40. package/models/components/tooldefinition.d.ts.map +1 -1
  41. package/models/components/tooldefinition.js +14 -0
  42. package/models/components/tooldefinition.js.map +1 -1
  43. package/models/components/tooldetailresponse.d.ts +6 -0
  44. package/models/components/tooldetailresponse.d.ts.map +1 -1
  45. package/models/components/tooldetailresponse.js +5 -0
  46. package/models/components/tooldetailresponse.js.map +1 -1
  47. package/models/components/toolpromptinfo.d.ts +40 -0
  48. package/models/components/toolpromptinfo.d.ts.map +1 -0
  49. package/models/components/toolpromptinfo.js +61 -0
  50. package/models/components/toolpromptinfo.js.map +1 -0
  51. package/models/components/toolresponse.d.ts +6 -0
  52. package/models/components/toolresponse.d.ts.map +1 -1
  53. package/models/components/toolresponse.js +5 -0
  54. package/models/components/toolresponse.js.map +1 -1
  55. package/openapi.json +161 -39
  56. package/package.json +1 -1
  57. package/src/lib/config.ts +3 -3
  58. package/src/models/components/agentcreate.ts +1 -1
  59. package/src/models/components/agentresponse.ts +14 -1
  60. package/src/models/components/agentupdate.ts +1 -1
  61. package/src/models/components/datasourcecreaterequest.ts +5 -5
  62. package/src/models/components/datasourcedetailresponse.ts +5 -5
  63. package/src/models/components/datasourcemetadataresponse.ts +5 -5
  64. package/src/models/components/datasourceupdaterequest.ts +5 -5
  65. package/src/models/components/index.ts +3 -0
  66. package/src/models/components/statictoolparameter.ts +105 -0
  67. package/src/models/components/statictoolparametertype.ts +43 -0
  68. package/src/models/components/tooldefinition.ts +24 -0
  69. package/src/models/components/tooldetailresponse.ts +15 -0
  70. package/src/models/components/toolpromptinfo.ts +75 -0
  71. package/src/models/components/toolresponse.ts +15 -0
@@ -0,0 +1,43 @@
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
+ /**
9
+ * The expected type for a static tool parameter.
10
+ */
11
+ export const StaticToolParameterType = {
12
+ String: "string",
13
+ Int: "int",
14
+ Boolean: "boolean",
15
+ DataSourceList: "data_source_list",
16
+ } as const;
17
+ /**
18
+ * The expected type for a static tool parameter.
19
+ */
20
+ export type StaticToolParameterType = ClosedEnum<
21
+ typeof StaticToolParameterType
22
+ >;
23
+
24
+ /** @internal */
25
+ export const StaticToolParameterType$inboundSchema: z.ZodNativeEnum<
26
+ typeof StaticToolParameterType
27
+ > = z.nativeEnum(StaticToolParameterType);
28
+
29
+ /** @internal */
30
+ export const StaticToolParameterType$outboundSchema: z.ZodNativeEnum<
31
+ typeof StaticToolParameterType
32
+ > = StaticToolParameterType$inboundSchema;
33
+
34
+ /**
35
+ * @internal
36
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
37
+ */
38
+ export namespace StaticToolParameterType$ {
39
+ /** @deprecated use `StaticToolParameterType$inboundSchema` instead. */
40
+ export const inboundSchema = StaticToolParameterType$inboundSchema;
41
+ /** @deprecated use `StaticToolParameterType$outboundSchema` instead. */
42
+ export const outboundSchema = StaticToolParameterType$outboundSchema;
43
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { safeParse } from "../../lib/schemas.js";
7
8
  import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
@@ -13,6 +14,12 @@ import {
13
14
  InternalTool$Outbound,
14
15
  InternalTool$outboundSchema,
15
16
  } from "./internaltool.js";
17
+ import {
18
+ StaticToolParameter,
19
+ StaticToolParameter$inboundSchema,
20
+ StaticToolParameter$Outbound,
21
+ StaticToolParameter$outboundSchema,
22
+ } from "./statictoolparameter.js";
16
23
  import {
17
24
  ToolHttpEndpoint,
18
25
  ToolHttpEndpoint$inboundSchema,
@@ -59,6 +66,10 @@ export type ToolDefinition = {
59
66
  * The default values for the parameters of the function/tool call.
60
67
  */
61
68
  defaults?: any | { [k: string]: ToolParameterDefault } | null | undefined;
69
+ /**
70
+ * Parameters for the tool whose values should be set at config time (i.e., not provided by the LLM).
71
+ */
72
+ staticParameters?: Array<StaticToolParameter> | null | undefined;
62
73
  /**
63
74
  * The optional result of the tool call. Only used for `context` tools.
64
75
  */
@@ -143,7 +154,13 @@ export const ToolDefinition$inboundSchema: z.ZodType<
143
154
  defaults: z.nullable(
144
155
  z.union([z.any(), z.record(ToolParameterDefault$inboundSchema)]),
145
156
  ).optional(),
157
+ static_parameters: z.nullable(z.array(StaticToolParameter$inboundSchema))
158
+ .optional(),
146
159
  result: z.nullable(z.any()).optional(),
160
+ }).transform((v) => {
161
+ return remap$(v, {
162
+ "static_parameters": "staticParameters",
163
+ });
147
164
  });
148
165
 
149
166
  /** @internal */
@@ -156,6 +173,7 @@ export type ToolDefinition$Outbound = {
156
173
  | { [k: string]: ToolParameterDefault$Outbound }
157
174
  | null
158
175
  | undefined;
176
+ static_parameters?: Array<StaticToolParameter$Outbound> | null | undefined;
159
177
  result?: any | null | undefined;
160
178
  };
161
179
 
@@ -171,7 +189,13 @@ export const ToolDefinition$outboundSchema: z.ZodType<
171
189
  defaults: z.nullable(
172
190
  z.union([z.any(), z.record(ToolParameterDefault$outboundSchema)]),
173
191
  ).optional(),
192
+ staticParameters: z.nullable(z.array(StaticToolParameter$outboundSchema))
193
+ .optional(),
174
194
  result: z.nullable(z.any()).optional(),
195
+ }).transform((v) => {
196
+ return remap$(v, {
197
+ staticParameters: "static_parameters",
198
+ });
175
199
  });
176
200
 
177
201
  /**
@@ -13,6 +13,12 @@ import {
13
13
  ToolDefinition$Outbound,
14
14
  ToolDefinition$outboundSchema,
15
15
  } from "./tooldefinition.js";
16
+ import {
17
+ ToolPromptInfo,
18
+ ToolPromptInfo$inboundSchema,
19
+ ToolPromptInfo$Outbound,
20
+ ToolPromptInfo$outboundSchema,
21
+ } from "./toolpromptinfo.js";
16
22
 
17
23
  /**
18
24
  * A tool is a function that an agent can call to perform actions like accessing databases,
@@ -46,6 +52,10 @@ export type ToolDetailResponse = {
46
52
  * The name of the service to which the tool belongs
47
53
  */
48
54
  serviceName?: string | null | undefined;
55
+ /**
56
+ * IDs and names of the prompts linked to the tool
57
+ */
58
+ promptsInfo?: Array<ToolPromptInfo> | null | undefined;
49
59
  /**
50
60
  * The timestamp of the most recent update to the service
51
61
  */
@@ -72,6 +82,7 @@ export const ToolDetailResponse$inboundSchema: z.ZodType<
72
82
  id: z.number().int(),
73
83
  last_updated_comments: z.nullable(z.string()).optional(),
74
84
  service_name: z.nullable(z.string()).optional(),
85
+ prompts_info: z.nullable(z.array(ToolPromptInfo$inboundSchema)).optional(),
75
86
  last_updated: z.string().datetime({ offset: true }).transform(v =>
76
87
  new Date(v)
77
88
  ),
@@ -82,6 +93,7 @@ export const ToolDetailResponse$inboundSchema: z.ZodType<
82
93
  "service_id": "serviceId",
83
94
  "last_updated_comments": "lastUpdatedComments",
84
95
  "service_name": "serviceName",
96
+ "prompts_info": "promptsInfo",
85
97
  "last_updated": "lastUpdated",
86
98
  "last_updated_by": "lastUpdatedBy",
87
99
  });
@@ -95,6 +107,7 @@ export type ToolDetailResponse$Outbound = {
95
107
  id: number;
96
108
  last_updated_comments?: string | null | undefined;
97
109
  service_name?: string | null | undefined;
110
+ prompts_info?: Array<ToolPromptInfo$Outbound> | null | undefined;
98
111
  last_updated: string;
99
112
  last_updated_by: string;
100
113
  fields: Array<string>;
@@ -112,6 +125,7 @@ export const ToolDetailResponse$outboundSchema: z.ZodType<
112
125
  id: z.number().int(),
113
126
  lastUpdatedComments: z.nullable(z.string()).optional(),
114
127
  serviceName: z.nullable(z.string()).optional(),
128
+ promptsInfo: z.nullable(z.array(ToolPromptInfo$outboundSchema)).optional(),
115
129
  lastUpdated: z.date().transform(v => v.toISOString()),
116
130
  lastUpdatedBy: z.string(),
117
131
  fields: z.array(z.string()),
@@ -120,6 +134,7 @@ export const ToolDetailResponse$outboundSchema: z.ZodType<
120
134
  serviceId: "service_id",
121
135
  lastUpdatedComments: "last_updated_comments",
122
136
  serviceName: "service_name",
137
+ promptsInfo: "prompts_info",
123
138
  lastUpdated: "last_updated",
124
139
  lastUpdatedBy: "last_updated_by",
125
140
  });
@@ -0,0 +1,75 @@
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
+ /**
11
+ * Information about a prompt linked to a tool.
12
+ */
13
+ export type ToolPromptInfo = {
14
+ /**
15
+ * The ID of the prompt
16
+ */
17
+ id: number;
18
+ /**
19
+ * The name of the prompt
20
+ */
21
+ name: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const ToolPromptInfo$inboundSchema: z.ZodType<
26
+ ToolPromptInfo,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ id: z.number().int(),
31
+ name: z.string(),
32
+ });
33
+
34
+ /** @internal */
35
+ export type ToolPromptInfo$Outbound = {
36
+ id: number;
37
+ name: string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const ToolPromptInfo$outboundSchema: z.ZodType<
42
+ ToolPromptInfo$Outbound,
43
+ z.ZodTypeDef,
44
+ ToolPromptInfo
45
+ > = z.object({
46
+ id: z.number().int(),
47
+ name: z.string(),
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 ToolPromptInfo$ {
55
+ /** @deprecated use `ToolPromptInfo$inboundSchema` instead. */
56
+ export const inboundSchema = ToolPromptInfo$inboundSchema;
57
+ /** @deprecated use `ToolPromptInfo$outboundSchema` instead. */
58
+ export const outboundSchema = ToolPromptInfo$outboundSchema;
59
+ /** @deprecated use `ToolPromptInfo$Outbound` instead. */
60
+ export type Outbound = ToolPromptInfo$Outbound;
61
+ }
62
+
63
+ export function toolPromptInfoToJSON(toolPromptInfo: ToolPromptInfo): string {
64
+ return JSON.stringify(ToolPromptInfo$outboundSchema.parse(toolPromptInfo));
65
+ }
66
+
67
+ export function toolPromptInfoFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<ToolPromptInfo, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => ToolPromptInfo$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'ToolPromptInfo' from JSON`,
74
+ );
75
+ }
@@ -13,6 +13,12 @@ import {
13
13
  ToolDefinition$Outbound,
14
14
  ToolDefinition$outboundSchema,
15
15
  } from "./tooldefinition.js";
16
+ import {
17
+ ToolPromptInfo,
18
+ ToolPromptInfo$inboundSchema,
19
+ ToolPromptInfo$Outbound,
20
+ ToolPromptInfo$outboundSchema,
21
+ } from "./toolpromptinfo.js";
16
22
 
17
23
  /**
18
24
  * A tool is a function that an agent can call to perform actions like accessing databases,
@@ -46,6 +52,10 @@ export type ToolResponse = {
46
52
  * The name of the service to which the tool belongs
47
53
  */
48
54
  serviceName?: string | null | undefined;
55
+ /**
56
+ * IDs and names of the prompts linked to the tool
57
+ */
58
+ promptsInfo?: Array<ToolPromptInfo> | null | undefined;
49
59
  /**
50
60
  * The timestamp of the most recent update to the service
51
61
  */
@@ -68,6 +78,7 @@ export const ToolResponse$inboundSchema: z.ZodType<
68
78
  id: z.number().int(),
69
79
  last_updated_comments: z.nullable(z.string()).optional(),
70
80
  service_name: z.nullable(z.string()).optional(),
81
+ prompts_info: z.nullable(z.array(ToolPromptInfo$inboundSchema)).optional(),
71
82
  last_updated: z.string().datetime({ offset: true }).transform(v =>
72
83
  new Date(v)
73
84
  ),
@@ -77,6 +88,7 @@ export const ToolResponse$inboundSchema: z.ZodType<
77
88
  "service_id": "serviceId",
78
89
  "last_updated_comments": "lastUpdatedComments",
79
90
  "service_name": "serviceName",
91
+ "prompts_info": "promptsInfo",
80
92
  "last_updated": "lastUpdated",
81
93
  "last_updated_by": "lastUpdatedBy",
82
94
  });
@@ -90,6 +102,7 @@ export type ToolResponse$Outbound = {
90
102
  id: number;
91
103
  last_updated_comments?: string | null | undefined;
92
104
  service_name?: string | null | undefined;
105
+ prompts_info?: Array<ToolPromptInfo$Outbound> | null | undefined;
93
106
  last_updated: string;
94
107
  last_updated_by: string;
95
108
  };
@@ -106,6 +119,7 @@ export const ToolResponse$outboundSchema: z.ZodType<
106
119
  id: z.number().int(),
107
120
  lastUpdatedComments: z.nullable(z.string()).optional(),
108
121
  serviceName: z.nullable(z.string()).optional(),
122
+ promptsInfo: z.nullable(z.array(ToolPromptInfo$outboundSchema)).optional(),
109
123
  lastUpdated: z.date().transform(v => v.toISOString()),
110
124
  lastUpdatedBy: z.string(),
111
125
  }).transform((v) => {
@@ -113,6 +127,7 @@ export const ToolResponse$outboundSchema: z.ZodType<
113
127
  serviceId: "service_id",
114
128
  lastUpdatedComments: "last_updated_comments",
115
129
  serviceName: "service_name",
130
+ promptsInfo: "prompts_info",
116
131
  lastUpdated: "last_updated",
117
132
  lastUpdatedBy: "last_updated_by",
118
133
  });