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
package/sdk/sdk.js CHANGED
@@ -16,16 +16,11 @@ const services_js_1 = require("./services.js");
16
16
  const sessionlabels_js_1 = require("./sessionlabels.js");
17
17
  const sessions_js_1 = require("./sessions.js");
18
18
  const tools_js_1 = require("./tools.js");
19
- const v1_js_1 = require("./v1.js");
20
19
  class SyllableSDK extends sdks_js_1.ClientSDK {
21
20
  get agents() {
22
21
  var _a;
23
22
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new agents_js_1.Agents(this._options)));
24
23
  }
25
- get v1() {
26
- var _a;
27
- return ((_a = this._v1) !== null && _a !== void 0 ? _a : (this._v1 = new v1_js_1.V1(this._options)));
28
- }
29
24
  get channels() {
30
25
  var _a;
31
26
  return ((_a = this._channels) !== null && _a !== void 0 ? _a : (this._channels = new channels_js_1.Channels(this._options)));
package/sdk/sdk.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,2CAAqC;AACrC,+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,SAAS,GAAK,IAAI,sBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC1D,CAAC;IAGD,IAAI,KAAK;;QACP,OAAO,OAAC,IAAI,CAAC,MAAM,oCAAX,IAAI,CAAC,MAAM,GAAK,IAAI,gBAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpD,CAAC;IAGD,IAAI,SAAS;;QACX,OAAO,OAAC,IAAI,CAAC,UAAU,oCAAf,IAAI,CAAC,UAAU,GAAK,IAAI,wBAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5D,CAAC;CACF;AAvDD,kCAuDC"}
package/src/lib/config.ts CHANGED
@@ -12,13 +12,13 @@ import { Params, pathToFunc } from "./url.js";
12
12
  */
13
13
  export const ServerList = [
14
14
  /**
15
- * production server
15
+ * API server
16
16
  */
17
- "http://localhost:8001",
17
+ "https://api.syllable.ai",
18
18
  /**
19
- * production / port-forwarding server
19
+ * Trial API server
20
20
  */
21
- "http://localhost:8001",
21
+ "https://trial.api.syllable.ai",
22
22
  ] as const;
23
23
 
24
24
  export type SDKOptions = {
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
61
61
  export const SDK_METADATA = {
62
62
  language: "typescript",
63
63
  openapiDocVersion: "0.0.2",
64
- sdkVersion: "0.1.0-alpha.26",
64
+ sdkVersion: "0.1.0-alpha.28",
65
65
  genVersion: "2.481.0",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.26 2.481.0 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.28 2.481.0 0.0.2 syllable-sdk",
68
68
  } as const;
@@ -19,14 +19,14 @@ import {
19
19
  */
20
20
  export type ChannelTarget = {
21
21
  id: number;
22
- channelId: number | null;
23
- channelName: string | null;
24
- agentId: number | null;
25
- agent: DaoChannelTargetAgent | null;
26
- target: string | null;
27
- targetMode: string | null;
28
- fallbackTarget: string | null;
29
- isTest: boolean | null;
22
+ channelId: number;
23
+ channelName: string;
24
+ agentId: number;
25
+ agent: DaoChannelTargetAgent;
26
+ target: string;
27
+ targetMode: string;
28
+ fallbackTarget?: string | null | undefined;
29
+ isTest?: boolean | undefined;
30
30
  updatedAt: Date | null;
31
31
  lastUpdatedBy: string | null;
32
32
  };
@@ -38,14 +38,14 @@ export const ChannelTarget$inboundSchema: z.ZodType<
38
38
  unknown
39
39
  > = z.object({
40
40
  id: z.number().int(),
41
- channel_id: z.nullable(z.number().int()),
42
- channel_name: z.nullable(z.string()),
43
- agent_id: z.nullable(z.number().int()),
44
- agent: z.nullable(DaoChannelTargetAgent$inboundSchema),
45
- target: z.nullable(z.string()),
46
- target_mode: z.nullable(z.string()),
47
- fallback_target: z.nullable(z.string()),
48
- is_test: z.nullable(z.boolean()),
41
+ channel_id: z.number().int(),
42
+ channel_name: z.string(),
43
+ agent_id: z.number().int(),
44
+ agent: DaoChannelTargetAgent$inboundSchema,
45
+ target: z.string(),
46
+ target_mode: z.string(),
47
+ fallback_target: z.nullable(z.string()).optional(),
48
+ is_test: z.boolean().default(false),
49
49
  updated_at: z.nullable(
50
50
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
51
51
  ),
@@ -66,14 +66,14 @@ export const ChannelTarget$inboundSchema: z.ZodType<
66
66
  /** @internal */
67
67
  export type ChannelTarget$Outbound = {
68
68
  id: number;
69
- channel_id: number | null;
70
- channel_name: string | null;
71
- agent_id: number | null;
72
- agent: DaoChannelTargetAgent$Outbound | null;
73
- target: string | null;
74
- target_mode: string | null;
75
- fallback_target: string | null;
76
- is_test: boolean | null;
69
+ channel_id: number;
70
+ channel_name: string;
71
+ agent_id: number;
72
+ agent: DaoChannelTargetAgent$Outbound;
73
+ target: string;
74
+ target_mode: string;
75
+ fallback_target?: string | null | undefined;
76
+ is_test: boolean;
77
77
  updated_at: string | null;
78
78
  last_updated_by: string | null;
79
79
  };
@@ -85,14 +85,14 @@ export const ChannelTarget$outboundSchema: z.ZodType<
85
85
  ChannelTarget
86
86
  > = z.object({
87
87
  id: z.number().int(),
88
- channelId: z.nullable(z.number().int()),
89
- channelName: z.nullable(z.string()),
90
- agentId: z.nullable(z.number().int()),
91
- agent: z.nullable(DaoChannelTargetAgent$outboundSchema),
92
- target: z.nullable(z.string()),
93
- targetMode: z.nullable(z.string()),
94
- fallbackTarget: z.nullable(z.string()),
95
- isTest: z.nullable(z.boolean()),
88
+ channelId: z.number().int(),
89
+ channelName: z.string(),
90
+ agentId: z.number().int(),
91
+ agent: DaoChannelTargetAgent$outboundSchema,
92
+ target: z.string(),
93
+ targetMode: z.string(),
94
+ fallbackTarget: z.nullable(z.string()).optional(),
95
+ isTest: z.boolean().default(false),
96
96
  updatedAt: z.nullable(z.date().transform(v => v.toISOString())),
97
97
  lastUpdatedBy: z.nullable(z.string()),
98
98
  }).transform((v) => {
@@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ChannelTargetCreateRequest = {
12
- channelId: number | null;
13
- agentId: number | null;
14
- target: string | null;
15
- targetMode: string | null;
16
- fallbackTarget: string | null;
17
- isTest: boolean | null;
12
+ channelId: number;
13
+ agentId: number;
14
+ target: string;
15
+ targetMode: string;
16
+ fallbackTarget?: string | null | undefined;
17
+ isTest?: boolean | undefined;
18
18
  };
19
19
 
20
20
  /** @internal */
@@ -23,12 +23,12 @@ export const ChannelTargetCreateRequest$inboundSchema: z.ZodType<
23
23
  z.ZodTypeDef,
24
24
  unknown
25
25
  > = z.object({
26
- channel_id: z.nullable(z.number().int()),
27
- agent_id: z.nullable(z.number().int()),
28
- target: z.nullable(z.string()),
29
- target_mode: z.nullable(z.string()),
30
- fallback_target: z.nullable(z.string()),
31
- is_test: z.nullable(z.boolean()),
26
+ channel_id: z.number().int(),
27
+ agent_id: z.number().int(),
28
+ target: z.string(),
29
+ target_mode: z.string(),
30
+ fallback_target: z.nullable(z.string()).optional(),
31
+ is_test: z.boolean().default(false),
32
32
  }).transform((v) => {
33
33
  return remap$(v, {
34
34
  "channel_id": "channelId",
@@ -41,12 +41,12 @@ export const ChannelTargetCreateRequest$inboundSchema: z.ZodType<
41
41
 
42
42
  /** @internal */
43
43
  export type ChannelTargetCreateRequest$Outbound = {
44
- channel_id: number | null;
45
- agent_id: number | null;
46
- target: string | null;
47
- target_mode: string | null;
48
- fallback_target: string | null;
49
- is_test: boolean | null;
44
+ channel_id: number;
45
+ agent_id: number;
46
+ target: string;
47
+ target_mode: string;
48
+ fallback_target?: string | null | undefined;
49
+ is_test: boolean;
50
50
  };
51
51
 
52
52
  /** @internal */
@@ -55,12 +55,12 @@ export const ChannelTargetCreateRequest$outboundSchema: z.ZodType<
55
55
  z.ZodTypeDef,
56
56
  ChannelTargetCreateRequest
57
57
  > = z.object({
58
- channelId: z.nullable(z.number().int()),
59
- agentId: z.nullable(z.number().int()),
60
- target: z.nullable(z.string()),
61
- targetMode: z.nullable(z.string()),
62
- fallbackTarget: z.nullable(z.string()),
63
- isTest: z.nullable(z.boolean()),
58
+ channelId: z.number().int(),
59
+ agentId: z.number().int(),
60
+ target: z.string(),
61
+ targetMode: z.string(),
62
+ fallbackTarget: z.nullable(z.string()).optional(),
63
+ isTest: z.boolean().default(false),
64
64
  }).transform((v) => {
65
65
  return remap$(v, {
66
66
  channelId: "channel_id",
@@ -10,12 +10,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ChannelTargetUpdateRequest = {
12
12
  id: number;
13
- channelId: number | null;
14
- agentId: number | null;
15
- target: string | null;
16
- targetMode: string | null;
17
- fallbackTarget: string | null;
18
- isTest: boolean | null;
13
+ channelId: number;
14
+ agentId: number;
15
+ target: string;
16
+ targetMode: string;
17
+ fallbackTarget?: string | null | undefined;
18
+ isTest?: boolean | undefined;
19
19
  };
20
20
 
21
21
  /** @internal */
@@ -25,12 +25,12 @@ export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
25
25
  unknown
26
26
  > = z.object({
27
27
  id: z.number().int(),
28
- channel_id: z.nullable(z.number().int()),
29
- agent_id: z.nullable(z.number().int()),
30
- target: z.nullable(z.string()),
31
- target_mode: z.nullable(z.string()),
32
- fallback_target: z.nullable(z.string()),
33
- is_test: z.nullable(z.boolean()),
28
+ channel_id: z.number().int(),
29
+ agent_id: z.number().int(),
30
+ target: z.string(),
31
+ target_mode: z.string(),
32
+ fallback_target: z.nullable(z.string()).optional(),
33
+ is_test: z.boolean().default(false),
34
34
  }).transform((v) => {
35
35
  return remap$(v, {
36
36
  "channel_id": "channelId",
@@ -44,12 +44,12 @@ export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
44
44
  /** @internal */
45
45
  export type ChannelTargetUpdateRequest$Outbound = {
46
46
  id: number;
47
- channel_id: number | null;
48
- agent_id: number | null;
49
- target: string | null;
50
- target_mode: string | null;
51
- fallback_target: string | null;
52
- is_test: boolean | null;
47
+ channel_id: number;
48
+ agent_id: number;
49
+ target: string;
50
+ target_mode: string;
51
+ fallback_target?: string | null | undefined;
52
+ is_test: boolean;
53
53
  };
54
54
 
55
55
  /** @internal */
@@ -59,12 +59,12 @@ export const ChannelTargetUpdateRequest$outboundSchema: z.ZodType<
59
59
  ChannelTargetUpdateRequest
60
60
  > = z.object({
61
61
  id: z.number().int(),
62
- channelId: z.nullable(z.number().int()),
63
- agentId: z.nullable(z.number().int()),
64
- target: z.nullable(z.string()),
65
- targetMode: z.nullable(z.string()),
66
- fallbackTarget: z.nullable(z.string()),
67
- isTest: z.nullable(z.boolean()),
62
+ channelId: z.number().int(),
63
+ agentId: z.number().int(),
64
+ target: z.string(),
65
+ targetMode: z.string(),
66
+ fallbackTarget: z.nullable(z.string()).optional(),
67
+ isTest: z.boolean().default(false),
68
68
  }).transform((v) => {
69
69
  return remap$(v, {
70
70
  channelId: "channel_id",
@@ -0,0 +1,136 @@
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
+ * The JSON Schema of parameters of the function/tool call.
12
+ */
13
+ export type ParametersT = {};
14
+
15
+ /**
16
+ * A tool definition to be used by the OpenAI API.
17
+ *
18
+ * @remarks
19
+ *
20
+ * See:
21
+ * - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling
22
+ */
23
+ export type FunctionT = {
24
+ /**
25
+ * The name of the function/tool call.
26
+ */
27
+ name: string;
28
+ /**
29
+ * The description of the tool.
30
+ */
31
+ description: string;
32
+ /**
33
+ * The JSON Schema of parameters of the function/tool call.
34
+ */
35
+ parameters: ParametersT;
36
+ };
37
+
38
+ /** @internal */
39
+ export const ParametersT$inboundSchema: z.ZodType<
40
+ ParametersT,
41
+ z.ZodTypeDef,
42
+ unknown
43
+ > = z.object({});
44
+
45
+ /** @internal */
46
+ export type ParametersT$Outbound = {};
47
+
48
+ /** @internal */
49
+ export const ParametersT$outboundSchema: z.ZodType<
50
+ ParametersT$Outbound,
51
+ z.ZodTypeDef,
52
+ ParametersT
53
+ > = z.object({});
54
+
55
+ /**
56
+ * @internal
57
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
58
+ */
59
+ export namespace ParametersT$ {
60
+ /** @deprecated use `ParametersT$inboundSchema` instead. */
61
+ export const inboundSchema = ParametersT$inboundSchema;
62
+ /** @deprecated use `ParametersT$outboundSchema` instead. */
63
+ export const outboundSchema = ParametersT$outboundSchema;
64
+ /** @deprecated use `ParametersT$Outbound` instead. */
65
+ export type Outbound = ParametersT$Outbound;
66
+ }
67
+
68
+ export function parametersToJSON(parametersT: ParametersT): string {
69
+ return JSON.stringify(ParametersT$outboundSchema.parse(parametersT));
70
+ }
71
+
72
+ export function parametersFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<ParametersT, SDKValidationError> {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) => ParametersT$inboundSchema.parse(JSON.parse(x)),
78
+ `Failed to parse 'ParametersT' from JSON`,
79
+ );
80
+ }
81
+
82
+ /** @internal */
83
+ export const FunctionT$inboundSchema: z.ZodType<
84
+ FunctionT,
85
+ z.ZodTypeDef,
86
+ unknown
87
+ > = z.object({
88
+ name: z.string(),
89
+ description: z.string(),
90
+ parameters: z.lazy(() => ParametersT$inboundSchema),
91
+ });
92
+
93
+ /** @internal */
94
+ export type FunctionT$Outbound = {
95
+ name: string;
96
+ description: string;
97
+ parameters: ParametersT$Outbound;
98
+ };
99
+
100
+ /** @internal */
101
+ export const FunctionT$outboundSchema: z.ZodType<
102
+ FunctionT$Outbound,
103
+ z.ZodTypeDef,
104
+ FunctionT
105
+ > = z.object({
106
+ name: z.string(),
107
+ description: z.string(),
108
+ parameters: z.lazy(() => ParametersT$outboundSchema),
109
+ });
110
+
111
+ /**
112
+ * @internal
113
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
114
+ */
115
+ export namespace FunctionT$ {
116
+ /** @deprecated use `FunctionT$inboundSchema` instead. */
117
+ export const inboundSchema = FunctionT$inboundSchema;
118
+ /** @deprecated use `FunctionT$outboundSchema` instead. */
119
+ export const outboundSchema = FunctionT$outboundSchema;
120
+ /** @deprecated use `FunctionT$Outbound` instead. */
121
+ export type Outbound = FunctionT$Outbound;
122
+ }
123
+
124
+ export function functionToJSON(functionT: FunctionT): string {
125
+ return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
126
+ }
127
+
128
+ export function functionFromJSON(
129
+ jsonString: string,
130
+ ): SafeParseResult<FunctionT, SDKValidationError> {
131
+ return safeParse(
132
+ jsonString,
133
+ (x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
134
+ `Failed to parse 'FunctionT' from JSON`,
135
+ );
136
+ }
@@ -0,0 +1,158 @@
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 { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * The HTTP method to use for the service call.
14
+ */
15
+ export const Method = {
16
+ Get: "get",
17
+ Post: "post",
18
+ } as const;
19
+ /**
20
+ * The HTTP method to use for the service call.
21
+ */
22
+ export type Method = ClosedEnum<typeof Method>;
23
+
24
+ /**
25
+ * How to pass the arguments to the request.
26
+ */
27
+ export const ArgumentLocation = {
28
+ Body: "body",
29
+ Form: "form",
30
+ Path: "path",
31
+ Query: "query",
32
+ } as const;
33
+ /**
34
+ * How to pass the arguments to the request.
35
+ */
36
+ export type ArgumentLocation = ClosedEnum<typeof ArgumentLocation>;
37
+
38
+ /**
39
+ * The configuration for an HTTP API call.
40
+ */
41
+ export type HttpEndpoint = {
42
+ /**
43
+ * The endpoint URL of the external service to call.
44
+ */
45
+ url: string;
46
+ /**
47
+ * The HTTP method to use for the service call.
48
+ */
49
+ method: Method;
50
+ /**
51
+ * How to pass the arguments to the request.
52
+ */
53
+ argumentLocation: ArgumentLocation;
54
+ };
55
+
56
+ /** @internal */
57
+ export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
58
+ .nativeEnum(Method);
59
+
60
+ /** @internal */
61
+ export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
62
+ Method$inboundSchema;
63
+
64
+ /**
65
+ * @internal
66
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
67
+ */
68
+ export namespace Method$ {
69
+ /** @deprecated use `Method$inboundSchema` instead. */
70
+ export const inboundSchema = Method$inboundSchema;
71
+ /** @deprecated use `Method$outboundSchema` instead. */
72
+ export const outboundSchema = Method$outboundSchema;
73
+ }
74
+
75
+ /** @internal */
76
+ export const ArgumentLocation$inboundSchema: z.ZodNativeEnum<
77
+ typeof ArgumentLocation
78
+ > = z.nativeEnum(ArgumentLocation);
79
+
80
+ /** @internal */
81
+ export const ArgumentLocation$outboundSchema: z.ZodNativeEnum<
82
+ typeof ArgumentLocation
83
+ > = ArgumentLocation$inboundSchema;
84
+
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export namespace ArgumentLocation$ {
90
+ /** @deprecated use `ArgumentLocation$inboundSchema` instead. */
91
+ export const inboundSchema = ArgumentLocation$inboundSchema;
92
+ /** @deprecated use `ArgumentLocation$outboundSchema` instead. */
93
+ export const outboundSchema = ArgumentLocation$outboundSchema;
94
+ }
95
+
96
+ /** @internal */
97
+ export const HttpEndpoint$inboundSchema: z.ZodType<
98
+ HttpEndpoint,
99
+ z.ZodTypeDef,
100
+ unknown
101
+ > = z.object({
102
+ url: z.string(),
103
+ method: Method$inboundSchema,
104
+ argument_location: ArgumentLocation$inboundSchema,
105
+ }).transform((v) => {
106
+ return remap$(v, {
107
+ "argument_location": "argumentLocation",
108
+ });
109
+ });
110
+
111
+ /** @internal */
112
+ export type HttpEndpoint$Outbound = {
113
+ url: string;
114
+ method: string;
115
+ argument_location: string;
116
+ };
117
+
118
+ /** @internal */
119
+ export const HttpEndpoint$outboundSchema: z.ZodType<
120
+ HttpEndpoint$Outbound,
121
+ z.ZodTypeDef,
122
+ HttpEndpoint
123
+ > = z.object({
124
+ url: z.string(),
125
+ method: Method$outboundSchema,
126
+ argumentLocation: ArgumentLocation$outboundSchema,
127
+ }).transform((v) => {
128
+ return remap$(v, {
129
+ argumentLocation: "argument_location",
130
+ });
131
+ });
132
+
133
+ /**
134
+ * @internal
135
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
136
+ */
137
+ export namespace HttpEndpoint$ {
138
+ /** @deprecated use `HttpEndpoint$inboundSchema` instead. */
139
+ export const inboundSchema = HttpEndpoint$inboundSchema;
140
+ /** @deprecated use `HttpEndpoint$outboundSchema` instead. */
141
+ export const outboundSchema = HttpEndpoint$outboundSchema;
142
+ /** @deprecated use `HttpEndpoint$Outbound` instead. */
143
+ export type Outbound = HttpEndpoint$Outbound;
144
+ }
145
+
146
+ export function httpEndpointToJSON(httpEndpoint: HttpEndpoint): string {
147
+ return JSON.stringify(HttpEndpoint$outboundSchema.parse(httpEndpoint));
148
+ }
149
+
150
+ export function httpEndpointFromJSON(
151
+ jsonString: string,
152
+ ): SafeParseResult<HttpEndpoint, SDKValidationError> {
153
+ return safeParse(
154
+ jsonString,
155
+ (x) => HttpEndpoint$inboundSchema.parse(JSON.parse(x)),
156
+ `Failed to parse 'HttpEndpoint' from JSON`,
157
+ );
158
+ }
@@ -37,6 +37,8 @@ export * from "./directorymembercreate.js";
37
37
  export * from "./directorymemberproperties.js";
38
38
  export * from "./event.js";
39
39
  export * from "./eventproperties.js";
40
+ export * from "./function.js";
41
+ export * from "./httpendpoint.js";
40
42
  export * from "./listresponseagentresponse.js";
41
43
  export * from "./listresponseavailabletarget.js";
42
44
  export * from "./listresponsechannel.js";
@@ -58,6 +60,8 @@ export * from "./prompthistory.js";
58
60
  export * from "./promptproperties.js";
59
61
  export * from "./promptupdate.js";
60
62
  export * from "./provider.js";
63
+ export * from "./sdkinternaltool.js";
64
+ export * from "./sdktooldefinition.js";
61
65
  export * from "./security.js";
62
66
  export * from "./service.js";
63
67
  export * from "./servicecreate.js";
@@ -80,6 +84,9 @@ export * from "./testmessageresponse.js";
80
84
  export * from "./tool.js";
81
85
  export * from "./toolcreate.js";
82
86
  export * from "./tooldetailresponse.js";
87
+ export * from "./toolparameterdefault.js";
88
+ export * from "./toolparametertransform.js";
89
+ export * from "./toolparametertransformcondition.js";
83
90
  export * from "./toolproperties.js";
84
91
  export * from "./toolupdate.js";
85
92
  export * from "./validationerror.js";