syllable-sdk 0.1.0-alpha.26 → 0.1.0-alpha.28

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 (134) hide show
  1. package/README.md +6 -25
  2. package/docs/sdks/tools/README.md +36 -0
  3. package/lib/config.d.ts +3 -3
  4. package/lib/config.d.ts.map +1 -1
  5. package/lib/config.js +6 -6
  6. package/lib/config.js.map +1 -1
  7. package/models/components/channeltarget.d.ts +16 -16
  8. package/models/components/channeltarget.d.ts.map +1 -1
  9. package/models/components/channeltarget.js +16 -16
  10. package/models/components/channeltarget.js.map +1 -1
  11. package/models/components/channeltargetcreaterequest.d.ts +12 -12
  12. package/models/components/channeltargetcreaterequest.d.ts.map +1 -1
  13. package/models/components/channeltargetcreaterequest.js +12 -12
  14. package/models/components/channeltargetcreaterequest.js.map +1 -1
  15. package/models/components/channeltargetupdaterequest.d.ts +12 -12
  16. package/models/components/channeltargetupdaterequest.d.ts.map +1 -1
  17. package/models/components/channeltargetupdaterequest.js +12 -12
  18. package/models/components/channeltargetupdaterequest.js.map +1 -1
  19. package/models/components/function.d.ts +74 -0
  20. package/models/components/function.d.ts.map +1 -0
  21. package/models/components/function.js +86 -0
  22. package/models/components/function.js.map +1 -0
  23. package/models/components/httpendpoint.d.ts +114 -0
  24. package/models/components/httpendpoint.d.ts.map +1 -0
  25. package/models/components/httpendpoint.js +119 -0
  26. package/models/components/httpendpoint.js.map +1 -0
  27. package/models/components/index.d.ts +7 -0
  28. package/models/components/index.d.ts.map +1 -1
  29. package/models/components/index.js +7 -0
  30. package/models/components/index.js.map +1 -1
  31. package/models/components/sdkinternaltool.d.ts +46 -0
  32. package/models/components/sdkinternaltool.d.ts.map +1 -0
  33. package/models/components/sdkinternaltool.js +62 -0
  34. package/models/components/sdkinternaltool.js.map +1 -0
  35. package/models/components/sdktooldefinition.d.ts +161 -0
  36. package/models/components/sdktooldefinition.d.ts.map +1 -0
  37. package/models/components/sdktooldefinition.js +175 -0
  38. package/models/components/sdktooldefinition.js.map +1 -0
  39. package/models/components/testmessage.d.ts +2 -0
  40. package/models/components/testmessage.d.ts.map +1 -1
  41. package/models/components/testmessage.js +4 -0
  42. package/models/components/testmessage.js.map +1 -1
  43. package/models/components/tool.d.ts +3 -29
  44. package/models/components/tool.d.ts.map +1 -1
  45. package/models/components/tool.js +4 -26
  46. package/models/components/tool.js.map +1 -1
  47. package/models/components/toolcreate.d.ts +3 -29
  48. package/models/components/toolcreate.d.ts.map +1 -1
  49. package/models/components/toolcreate.js +4 -26
  50. package/models/components/toolcreate.js.map +1 -1
  51. package/models/components/toolparameterdefault.d.ts +36 -0
  52. package/models/components/toolparameterdefault.d.ts.map +1 -0
  53. package/models/components/toolparameterdefault.js +60 -0
  54. package/models/components/toolparameterdefault.js.map +1 -0
  55. package/models/components/toolparametertransform.d.ts +81 -0
  56. package/models/components/toolparametertransform.d.ts.map +1 -0
  57. package/models/components/toolparametertransform.js +88 -0
  58. package/models/components/toolparametertransform.js.map +1 -0
  59. package/models/components/toolparametertransformcondition.d.ts +45 -0
  60. package/models/components/toolparametertransformcondition.d.ts.map +1 -0
  61. package/models/components/toolparametertransformcondition.js +63 -0
  62. package/models/components/toolparametertransformcondition.js.map +1 -0
  63. package/models/components/toolupdate.d.ts +3 -29
  64. package/models/components/toolupdate.d.ts.map +1 -1
  65. package/models/components/toolupdate.js +4 -26
  66. package/models/components/toolupdate.js.map +1 -1
  67. package/package.json +1 -1
  68. package/sdk/sdk.d.ts +0 -3
  69. package/sdk/sdk.d.ts.map +1 -1
  70. package/sdk/sdk.js +0 -5
  71. package/sdk/sdk.js.map +1 -1
  72. package/src/lib/config.ts +6 -6
  73. package/src/models/components/channeltarget.ts +32 -32
  74. package/src/models/components/channeltargetcreaterequest.ts +24 -24
  75. package/src/models/components/channeltargetupdaterequest.ts +24 -24
  76. package/src/models/components/function.ts +136 -0
  77. package/src/models/components/httpendpoint.ts +158 -0
  78. package/src/models/components/index.ts +7 -0
  79. package/src/models/components/sdkinternaltool.ts +88 -0
  80. package/src/models/components/sdktooldefinition.ts +298 -0
  81. package/src/models/components/testmessage.ts +6 -0
  82. package/src/models/components/tool.ts +10 -56
  83. package/src/models/components/toolcreate.ts +10 -60
  84. package/src/models/components/toolparameterdefault.ts +78 -0
  85. package/src/models/components/toolparametertransform.ts +125 -0
  86. package/src/models/components/toolparametertransformcondition.ts +88 -0
  87. package/src/models/components/toolupdate.ts +10 -60
  88. package/src/sdk/sdk.ts +0 -6
  89. package/docs/sdks/v1/README.md +0 -629
  90. package/funcs/v1AgentGetAvailableVoices.d.ts +0 -15
  91. package/funcs/v1AgentGetAvailableVoices.d.ts.map +0 -1
  92. package/funcs/v1AgentGetAvailableVoices.js +0 -87
  93. package/funcs/v1AgentGetAvailableVoices.js.map +0 -1
  94. package/funcs/v1Create.d.ts +0 -16
  95. package/funcs/v1Create.d.ts.map +0 -1
  96. package/funcs/v1Create.js +0 -100
  97. package/funcs/v1Create.js.map +0 -1
  98. package/funcs/v1Delete.d.ts +0 -16
  99. package/funcs/v1Delete.d.ts.map +0 -1
  100. package/funcs/v1Delete.js +0 -106
  101. package/funcs/v1Delete.js.map +0 -1
  102. package/funcs/v1DirectoryMemberBulkLoad.d.ts +0 -16
  103. package/funcs/v1DirectoryMemberBulkLoad.d.ts.map +0 -1
  104. package/funcs/v1DirectoryMemberBulkLoad.js +0 -113
  105. package/funcs/v1DirectoryMemberBulkLoad.js.map +0 -1
  106. package/funcs/v1DirectoryMemberDownload.d.ts +0 -14
  107. package/funcs/v1DirectoryMemberDownload.d.ts.map +0 -1
  108. package/funcs/v1DirectoryMemberDownload.js +0 -86
  109. package/funcs/v1DirectoryMemberDownload.js.map +0 -1
  110. package/funcs/v1GetById.d.ts +0 -17
  111. package/funcs/v1GetById.d.ts.map +0 -1
  112. package/funcs/v1GetById.js +0 -106
  113. package/funcs/v1GetById.js.map +0 -1
  114. package/funcs/v1List.d.ts +0 -17
  115. package/funcs/v1List.d.ts.map +0 -1
  116. package/funcs/v1List.js +0 -112
  117. package/funcs/v1List.js.map +0 -1
  118. package/funcs/v1Update.d.ts +0 -17
  119. package/funcs/v1Update.d.ts.map +0 -1
  120. package/funcs/v1Update.js +0 -107
  121. package/funcs/v1Update.js.map +0 -1
  122. package/sdk/v1.d.ts +0 -62
  123. package/sdk/v1.d.ts.map +0 -1
  124. package/sdk/v1.js +0 -92
  125. package/sdk/v1.js.map +0 -1
  126. package/src/funcs/v1AgentGetAvailableVoices.ts +0 -109
  127. package/src/funcs/v1Create.ts +0 -132
  128. package/src/funcs/v1Delete.ts +0 -140
  129. package/src/funcs/v1DirectoryMemberBulkLoad.ts +0 -149
  130. package/src/funcs/v1DirectoryMemberDownload.ts +0 -108
  131. package/src/funcs/v1GetById.ts +0 -140
  132. package/src/funcs/v1List.ts +0 -146
  133. package/src/funcs/v1Update.ts +0 -141
  134. package/src/sdk/v1.ts +0 -150
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ FunctionT,
11
+ FunctionT$inboundSchema,
12
+ FunctionT$Outbound,
13
+ FunctionT$outboundSchema,
14
+ } from "./function.js";
15
+
16
+ /**
17
+ * A tool definition to be used by the OpenAI API.
18
+ */
19
+ export type SDKInternalTool = {
20
+ /**
21
+ * Always `function`.
22
+ */
23
+ type?: "function" | undefined;
24
+ /**
25
+ * A tool definition to be used by the OpenAI API.
26
+ *
27
+ * @remarks
28
+ *
29
+ * See:
30
+ * - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling
31
+ */
32
+ function: FunctionT;
33
+ };
34
+
35
+ /** @internal */
36
+ export const SDKInternalTool$inboundSchema: z.ZodType<
37
+ SDKInternalTool,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ type: z.literal("function").default("function"),
42
+ function: FunctionT$inboundSchema,
43
+ });
44
+
45
+ /** @internal */
46
+ export type SDKInternalTool$Outbound = {
47
+ type: "function";
48
+ function: FunctionT$Outbound;
49
+ };
50
+
51
+ /** @internal */
52
+ export const SDKInternalTool$outboundSchema: z.ZodType<
53
+ SDKInternalTool$Outbound,
54
+ z.ZodTypeDef,
55
+ SDKInternalTool
56
+ > = z.object({
57
+ type: z.literal("function").default("function" as const),
58
+ function: FunctionT$outboundSchema,
59
+ });
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace SDKInternalTool$ {
66
+ /** @deprecated use `SDKInternalTool$inboundSchema` instead. */
67
+ export const inboundSchema = SDKInternalTool$inboundSchema;
68
+ /** @deprecated use `SDKInternalTool$outboundSchema` instead. */
69
+ export const outboundSchema = SDKInternalTool$outboundSchema;
70
+ /** @deprecated use `SDKInternalTool$Outbound` instead. */
71
+ export type Outbound = SDKInternalTool$Outbound;
72
+ }
73
+
74
+ export function sdkInternalToolToJSON(
75
+ sdkInternalTool: SDKInternalTool,
76
+ ): string {
77
+ return JSON.stringify(SDKInternalTool$outboundSchema.parse(sdkInternalTool));
78
+ }
79
+
80
+ export function sdkInternalToolFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<SDKInternalTool, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => SDKInternalTool$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'SDKInternalTool' from JSON`,
87
+ );
88
+ }
@@ -0,0 +1,298 @@
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 { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ HttpEndpoint,
12
+ HttpEndpoint$inboundSchema,
13
+ HttpEndpoint$Outbound,
14
+ HttpEndpoint$outboundSchema,
15
+ } from "./httpendpoint.js";
16
+ import {
17
+ SDKInternalTool,
18
+ SDKInternalTool$inboundSchema,
19
+ SDKInternalTool$Outbound,
20
+ SDKInternalTool$outboundSchema,
21
+ } from "./sdkinternaltool.js";
22
+ import {
23
+ ToolParameterDefault,
24
+ ToolParameterDefault$inboundSchema,
25
+ ToolParameterDefault$Outbound,
26
+ ToolParameterDefault$outboundSchema,
27
+ } from "./toolparameterdefault.js";
28
+
29
+ export const Type = {
30
+ Action: "action",
31
+ Endpoint: "endpoint",
32
+ Context: "context",
33
+ Log: "log",
34
+ } as const;
35
+ export type Type = ClosedEnum<typeof Type>;
36
+
37
+ export type One = {};
38
+
39
+ /**
40
+ * The default values for the parameters of the function/tool call.
41
+ */
42
+ export type Defaults = One | { [k: string]: ToolParameterDefault };
43
+
44
+ export type Result = {};
45
+
46
+ export type SDKToolDefinition = {
47
+ /**
48
+ * The action to take when GPT calls the tool.
49
+ */
50
+ type?: Type | null | undefined;
51
+ /**
52
+ * A tool definition to be used by the OpenAI API.
53
+ */
54
+ tool: SDKInternalTool;
55
+ /**
56
+ * The configuration for an HTTP API call.
57
+ */
58
+ endpoint?: HttpEndpoint | null | undefined;
59
+ /**
60
+ * The default values for the parameters of the function/tool call.
61
+ */
62
+ defaults?: One | { [k: string]: ToolParameterDefault } | null | undefined;
63
+ /**
64
+ * The optional result of the tool call. Only used for `context` tools.
65
+ */
66
+ result?: Result | null | undefined;
67
+ };
68
+
69
+ /** @internal */
70
+ export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
71
+ Type,
72
+ );
73
+
74
+ /** @internal */
75
+ export const Type$outboundSchema: z.ZodNativeEnum<typeof Type> =
76
+ Type$inboundSchema;
77
+
78
+ /**
79
+ * @internal
80
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
+ */
82
+ export namespace Type$ {
83
+ /** @deprecated use `Type$inboundSchema` instead. */
84
+ export const inboundSchema = Type$inboundSchema;
85
+ /** @deprecated use `Type$outboundSchema` instead. */
86
+ export const outboundSchema = Type$outboundSchema;
87
+ }
88
+
89
+ /** @internal */
90
+ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
91
+ .object({});
92
+
93
+ /** @internal */
94
+ export type One$Outbound = {};
95
+
96
+ /** @internal */
97
+ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
98
+ .object({});
99
+
100
+ /**
101
+ * @internal
102
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
103
+ */
104
+ export namespace One$ {
105
+ /** @deprecated use `One$inboundSchema` instead. */
106
+ export const inboundSchema = One$inboundSchema;
107
+ /** @deprecated use `One$outboundSchema` instead. */
108
+ export const outboundSchema = One$outboundSchema;
109
+ /** @deprecated use `One$Outbound` instead. */
110
+ export type Outbound = One$Outbound;
111
+ }
112
+
113
+ export function oneToJSON(one: One): string {
114
+ return JSON.stringify(One$outboundSchema.parse(one));
115
+ }
116
+
117
+ export function oneFromJSON(
118
+ jsonString: string,
119
+ ): SafeParseResult<One, SDKValidationError> {
120
+ return safeParse(
121
+ jsonString,
122
+ (x) => One$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'One' from JSON`,
124
+ );
125
+ }
126
+
127
+ /** @internal */
128
+ export const Defaults$inboundSchema: z.ZodType<
129
+ Defaults,
130
+ z.ZodTypeDef,
131
+ unknown
132
+ > = z.union([
133
+ z.lazy(() => One$inboundSchema),
134
+ z.record(ToolParameterDefault$inboundSchema),
135
+ ]);
136
+
137
+ /** @internal */
138
+ export type Defaults$Outbound = One$Outbound | {
139
+ [k: string]: ToolParameterDefault$Outbound;
140
+ };
141
+
142
+ /** @internal */
143
+ export const Defaults$outboundSchema: z.ZodType<
144
+ Defaults$Outbound,
145
+ z.ZodTypeDef,
146
+ Defaults
147
+ > = z.union([
148
+ z.lazy(() => One$outboundSchema),
149
+ z.record(ToolParameterDefault$outboundSchema),
150
+ ]);
151
+
152
+ /**
153
+ * @internal
154
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
155
+ */
156
+ export namespace Defaults$ {
157
+ /** @deprecated use `Defaults$inboundSchema` instead. */
158
+ export const inboundSchema = Defaults$inboundSchema;
159
+ /** @deprecated use `Defaults$outboundSchema` instead. */
160
+ export const outboundSchema = Defaults$outboundSchema;
161
+ /** @deprecated use `Defaults$Outbound` instead. */
162
+ export type Outbound = Defaults$Outbound;
163
+ }
164
+
165
+ export function defaultsToJSON(defaults: Defaults): string {
166
+ return JSON.stringify(Defaults$outboundSchema.parse(defaults));
167
+ }
168
+
169
+ export function defaultsFromJSON(
170
+ jsonString: string,
171
+ ): SafeParseResult<Defaults, SDKValidationError> {
172
+ return safeParse(
173
+ jsonString,
174
+ (x) => Defaults$inboundSchema.parse(JSON.parse(x)),
175
+ `Failed to parse 'Defaults' from JSON`,
176
+ );
177
+ }
178
+
179
+ /** @internal */
180
+ export const Result$inboundSchema: z.ZodType<Result, z.ZodTypeDef, unknown> = z
181
+ .object({});
182
+
183
+ /** @internal */
184
+ export type Result$Outbound = {};
185
+
186
+ /** @internal */
187
+ export const Result$outboundSchema: z.ZodType<
188
+ Result$Outbound,
189
+ z.ZodTypeDef,
190
+ Result
191
+ > = z.object({});
192
+
193
+ /**
194
+ * @internal
195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
+ */
197
+ export namespace Result$ {
198
+ /** @deprecated use `Result$inboundSchema` instead. */
199
+ export const inboundSchema = Result$inboundSchema;
200
+ /** @deprecated use `Result$outboundSchema` instead. */
201
+ export const outboundSchema = Result$outboundSchema;
202
+ /** @deprecated use `Result$Outbound` instead. */
203
+ export type Outbound = Result$Outbound;
204
+ }
205
+
206
+ export function resultToJSON(result: Result): string {
207
+ return JSON.stringify(Result$outboundSchema.parse(result));
208
+ }
209
+
210
+ export function resultFromJSON(
211
+ jsonString: string,
212
+ ): SafeParseResult<Result, SDKValidationError> {
213
+ return safeParse(
214
+ jsonString,
215
+ (x) => Result$inboundSchema.parse(JSON.parse(x)),
216
+ `Failed to parse 'Result' from JSON`,
217
+ );
218
+ }
219
+
220
+ /** @internal */
221
+ export const SDKToolDefinition$inboundSchema: z.ZodType<
222
+ SDKToolDefinition,
223
+ z.ZodTypeDef,
224
+ unknown
225
+ > = z.object({
226
+ type: z.nullable(Type$inboundSchema).optional(),
227
+ tool: SDKInternalTool$inboundSchema,
228
+ endpoint: z.nullable(HttpEndpoint$inboundSchema).optional(),
229
+ defaults: z.nullable(
230
+ z.union([
231
+ z.lazy(() => One$inboundSchema),
232
+ z.record(ToolParameterDefault$inboundSchema),
233
+ ]),
234
+ ).optional(),
235
+ result: z.nullable(z.lazy(() => Result$inboundSchema)).optional(),
236
+ });
237
+
238
+ /** @internal */
239
+ export type SDKToolDefinition$Outbound = {
240
+ type?: string | null | undefined;
241
+ tool: SDKInternalTool$Outbound;
242
+ endpoint?: HttpEndpoint$Outbound | null | undefined;
243
+ defaults?:
244
+ | One$Outbound
245
+ | { [k: string]: ToolParameterDefault$Outbound }
246
+ | null
247
+ | undefined;
248
+ result?: Result$Outbound | null | undefined;
249
+ };
250
+
251
+ /** @internal */
252
+ export const SDKToolDefinition$outboundSchema: z.ZodType<
253
+ SDKToolDefinition$Outbound,
254
+ z.ZodTypeDef,
255
+ SDKToolDefinition
256
+ > = z.object({
257
+ type: z.nullable(Type$outboundSchema).optional(),
258
+ tool: SDKInternalTool$outboundSchema,
259
+ endpoint: z.nullable(HttpEndpoint$outboundSchema).optional(),
260
+ defaults: z.nullable(
261
+ z.union([
262
+ z.lazy(() => One$outboundSchema),
263
+ z.record(ToolParameterDefault$outboundSchema),
264
+ ]),
265
+ ).optional(),
266
+ result: z.nullable(z.lazy(() => Result$outboundSchema)).optional(),
267
+ });
268
+
269
+ /**
270
+ * @internal
271
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
272
+ */
273
+ export namespace SDKToolDefinition$ {
274
+ /** @deprecated use `SDKToolDefinition$inboundSchema` instead. */
275
+ export const inboundSchema = SDKToolDefinition$inboundSchema;
276
+ /** @deprecated use `SDKToolDefinition$outboundSchema` instead. */
277
+ export const outboundSchema = SDKToolDefinition$outboundSchema;
278
+ /** @deprecated use `SDKToolDefinition$Outbound` instead. */
279
+ export type Outbound = SDKToolDefinition$Outbound;
280
+ }
281
+
282
+ export function sdkToolDefinitionToJSON(
283
+ sdkToolDefinition: SDKToolDefinition,
284
+ ): string {
285
+ return JSON.stringify(
286
+ SDKToolDefinition$outboundSchema.parse(sdkToolDefinition),
287
+ );
288
+ }
289
+
290
+ export function sdkToolDefinitionFromJSON(
291
+ jsonString: string,
292
+ ): SafeParseResult<SDKToolDefinition, SDKValidationError> {
293
+ return safeParse(
294
+ jsonString,
295
+ (x) => SDKToolDefinition$inboundSchema.parse(JSON.parse(x)),
296
+ `Failed to parse 'SDKToolDefinition' from JSON`,
297
+ );
298
+ }
@@ -22,6 +22,7 @@ export type TestMessage = {
22
22
  agentId: string;
23
23
  orgName: string;
24
24
  overrideTimestamp?: string | null | undefined;
25
+ sessionStart?: boolean | undefined;
25
26
  };
26
27
 
27
28
  /** @internal */
@@ -37,6 +38,7 @@ export const TestMessage$inboundSchema: z.ZodType<
37
38
  agent_id: z.string(),
38
39
  org_name: z.string(),
39
40
  override_timestamp: z.nullable(z.string()).optional(),
41
+ session_start: z.boolean().default(false),
40
42
  }).transform((v) => {
41
43
  return remap$(v, {
42
44
  "service_name": "serviceName",
@@ -44,6 +46,7 @@ export const TestMessage$inboundSchema: z.ZodType<
44
46
  "agent_id": "agentId",
45
47
  "org_name": "orgName",
46
48
  "override_timestamp": "overrideTimestamp",
49
+ "session_start": "sessionStart",
47
50
  });
48
51
  });
49
52
 
@@ -56,6 +59,7 @@ export type TestMessage$Outbound = {
56
59
  agent_id: string;
57
60
  org_name: string;
58
61
  override_timestamp?: string | null | undefined;
62
+ session_start: boolean;
59
63
  };
60
64
 
61
65
  /** @internal */
@@ -71,6 +75,7 @@ export const TestMessage$outboundSchema: z.ZodType<
71
75
  agentId: z.string(),
72
76
  orgName: z.string(),
73
77
  overrideTimestamp: z.nullable(z.string()).optional(),
78
+ sessionStart: z.boolean().default(false),
74
79
  }).transform((v) => {
75
80
  return remap$(v, {
76
81
  serviceName: "service_name",
@@ -78,6 +83,7 @@ export const TestMessage$outboundSchema: z.ZodType<
78
83
  agentId: "agent_id",
79
84
  orgName: "org_name",
80
85
  overrideTimestamp: "override_timestamp",
86
+ sessionStart: "session_start",
81
87
  });
82
88
  });
83
89
 
@@ -7,21 +7,19 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * The definition of the tool
13
- */
14
- export type Definition = {};
10
+ import {
11
+ SDKToolDefinition,
12
+ SDKToolDefinition$inboundSchema,
13
+ SDKToolDefinition$Outbound,
14
+ SDKToolDefinition$outboundSchema,
15
+ } from "./sdktooldefinition.js";
15
16
 
16
17
  export type Tool = {
17
18
  /**
18
19
  * The name of the tool
19
20
  */
20
21
  name: string;
21
- /**
22
- * The definition of the tool
23
- */
24
- definition?: Definition | undefined;
22
+ definition: SDKToolDefinition;
25
23
  /**
26
24
  * The service this tool belongs to
27
25
  */
@@ -36,55 +34,11 @@ export type Tool = {
36
34
  serviceName?: string | null | undefined;
37
35
  };
38
36
 
39
- /** @internal */
40
- export const Definition$inboundSchema: z.ZodType<
41
- Definition,
42
- z.ZodTypeDef,
43
- unknown
44
- > = z.object({});
45
-
46
- /** @internal */
47
- export type Definition$Outbound = {};
48
-
49
- /** @internal */
50
- export const Definition$outboundSchema: z.ZodType<
51
- Definition$Outbound,
52
- z.ZodTypeDef,
53
- Definition
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 Definition$ {
61
- /** @deprecated use `Definition$inboundSchema` instead. */
62
- export const inboundSchema = Definition$inboundSchema;
63
- /** @deprecated use `Definition$outboundSchema` instead. */
64
- export const outboundSchema = Definition$outboundSchema;
65
- /** @deprecated use `Definition$Outbound` instead. */
66
- export type Outbound = Definition$Outbound;
67
- }
68
-
69
- export function definitionToJSON(definition: Definition): string {
70
- return JSON.stringify(Definition$outboundSchema.parse(definition));
71
- }
72
-
73
- export function definitionFromJSON(
74
- jsonString: string,
75
- ): SafeParseResult<Definition, SDKValidationError> {
76
- return safeParse(
77
- jsonString,
78
- (x) => Definition$inboundSchema.parse(JSON.parse(x)),
79
- `Failed to parse 'Definition' from JSON`,
80
- );
81
- }
82
-
83
37
  /** @internal */
84
38
  export const Tool$inboundSchema: z.ZodType<Tool, z.ZodTypeDef, unknown> = z
85
39
  .object({
86
40
  name: z.string(),
87
- definition: z.lazy(() => Definition$inboundSchema).optional(),
41
+ definition: SDKToolDefinition$inboundSchema,
88
42
  service_id: z.number().int(),
89
43
  id: z.number().int(),
90
44
  service_name: z.nullable(z.string()).optional(),
@@ -98,7 +52,7 @@ export const Tool$inboundSchema: z.ZodType<Tool, z.ZodTypeDef, unknown> = z
98
52
  /** @internal */
99
53
  export type Tool$Outbound = {
100
54
  name: string;
101
- definition?: Definition$Outbound | undefined;
55
+ definition: SDKToolDefinition$Outbound;
102
56
  service_id: number;
103
57
  id: number;
104
58
  service_name?: string | null | undefined;
@@ -108,7 +62,7 @@ export type Tool$Outbound = {
108
62
  export const Tool$outboundSchema: z.ZodType<Tool$Outbound, z.ZodTypeDef, Tool> =
109
63
  z.object({
110
64
  name: z.string(),
111
- definition: z.lazy(() => Definition$outboundSchema).optional(),
65
+ definition: SDKToolDefinition$outboundSchema,
112
66
  serviceId: z.number().int(),
113
67
  id: z.number().int(),
114
68
  serviceName: z.nullable(z.string()).optional(),
@@ -7,75 +7,25 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * The definition of the tool
13
- */
14
- export type ToolCreateDefinition = {};
10
+ import {
11
+ SDKToolDefinition,
12
+ SDKToolDefinition$inboundSchema,
13
+ SDKToolDefinition$Outbound,
14
+ SDKToolDefinition$outboundSchema,
15
+ } from "./sdktooldefinition.js";
15
16
 
16
17
  export type ToolCreate = {
17
18
  /**
18
19
  * The name of the tool
19
20
  */
20
21
  name: string;
21
- /**
22
- * The definition of the tool
23
- */
24
- definition?: ToolCreateDefinition | undefined;
22
+ definition: SDKToolDefinition;
25
23
  /**
26
24
  * The service this tool belongs to
27
25
  */
28
26
  serviceId: number;
29
27
  };
30
28
 
31
- /** @internal */
32
- export const ToolCreateDefinition$inboundSchema: z.ZodType<
33
- ToolCreateDefinition,
34
- z.ZodTypeDef,
35
- unknown
36
- > = z.object({});
37
-
38
- /** @internal */
39
- export type ToolCreateDefinition$Outbound = {};
40
-
41
- /** @internal */
42
- export const ToolCreateDefinition$outboundSchema: z.ZodType<
43
- ToolCreateDefinition$Outbound,
44
- z.ZodTypeDef,
45
- ToolCreateDefinition
46
- > = z.object({});
47
-
48
- /**
49
- * @internal
50
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
- */
52
- export namespace ToolCreateDefinition$ {
53
- /** @deprecated use `ToolCreateDefinition$inboundSchema` instead. */
54
- export const inboundSchema = ToolCreateDefinition$inboundSchema;
55
- /** @deprecated use `ToolCreateDefinition$outboundSchema` instead. */
56
- export const outboundSchema = ToolCreateDefinition$outboundSchema;
57
- /** @deprecated use `ToolCreateDefinition$Outbound` instead. */
58
- export type Outbound = ToolCreateDefinition$Outbound;
59
- }
60
-
61
- export function toolCreateDefinitionToJSON(
62
- toolCreateDefinition: ToolCreateDefinition,
63
- ): string {
64
- return JSON.stringify(
65
- ToolCreateDefinition$outboundSchema.parse(toolCreateDefinition),
66
- );
67
- }
68
-
69
- export function toolCreateDefinitionFromJSON(
70
- jsonString: string,
71
- ): SafeParseResult<ToolCreateDefinition, SDKValidationError> {
72
- return safeParse(
73
- jsonString,
74
- (x) => ToolCreateDefinition$inboundSchema.parse(JSON.parse(x)),
75
- `Failed to parse 'ToolCreateDefinition' from JSON`,
76
- );
77
- }
78
-
79
29
  /** @internal */
80
30
  export const ToolCreate$inboundSchema: z.ZodType<
81
31
  ToolCreate,
@@ -83,7 +33,7 @@ export const ToolCreate$inboundSchema: z.ZodType<
83
33
  unknown
84
34
  > = z.object({
85
35
  name: z.string(),
86
- definition: z.lazy(() => ToolCreateDefinition$inboundSchema).optional(),
36
+ definition: SDKToolDefinition$inboundSchema,
87
37
  service_id: z.number().int(),
88
38
  }).transform((v) => {
89
39
  return remap$(v, {
@@ -94,7 +44,7 @@ export const ToolCreate$inboundSchema: z.ZodType<
94
44
  /** @internal */
95
45
  export type ToolCreate$Outbound = {
96
46
  name: string;
97
- definition?: ToolCreateDefinition$Outbound | undefined;
47
+ definition: SDKToolDefinition$Outbound;
98
48
  service_id: number;
99
49
  };
100
50
 
@@ -105,7 +55,7 @@ export const ToolCreate$outboundSchema: z.ZodType<
105
55
  ToolCreate
106
56
  > = z.object({
107
57
  name: z.string(),
108
- definition: z.lazy(() => ToolCreateDefinition$outboundSchema).optional(),
58
+ definition: SDKToolDefinition$outboundSchema,
109
59
  serviceId: z.number().int(),
110
60
  }).transform((v) => {
111
61
  return remap$(v, {