syllable-sdk 0.1.0-alpha.5 → 0.1.0-alpha.6

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 (209) hide show
  1. package/README.md +18 -2
  2. package/docs/sdks/prompts/README.md +78 -0
  3. package/docs/sdks/services/README.md +245 -0
  4. package/docs/sdks/syllablesdk/README.md +3 -2
  5. package/docs/sdks/tools/README.md +163 -1
  6. package/docs/sdks/transcript/README.md +2 -0
  7. package/funcs/promptsPromptsHistory.d.ts +17 -0
  8. package/funcs/promptsPromptsHistory.d.ts.map +1 -0
  9. package/funcs/promptsPromptsHistory.js +106 -0
  10. package/funcs/promptsPromptsHistory.js.map +1 -0
  11. package/funcs/servicesCreate.d.ts +13 -0
  12. package/funcs/servicesCreate.d.ts.map +1 -0
  13. package/funcs/servicesCreate.js +96 -0
  14. package/funcs/servicesCreate.js.map +1 -0
  15. package/funcs/servicesList.d.ts +17 -0
  16. package/funcs/servicesList.d.ts.map +1 -0
  17. package/funcs/servicesList.js +111 -0
  18. package/funcs/servicesList.js.map +1 -0
  19. package/funcs/servicesUpdate.d.ts +13 -0
  20. package/funcs/servicesUpdate.d.ts.map +1 -0
  21. package/funcs/servicesUpdate.js +96 -0
  22. package/funcs/servicesUpdate.js.map +1 -0
  23. package/funcs/toolsCreate.d.ts +16 -0
  24. package/funcs/toolsCreate.d.ts.map +1 -0
  25. package/funcs/toolsCreate.js +99 -0
  26. package/funcs/toolsCreate.js.map +1 -0
  27. package/funcs/toolsList.d.ts +1 -1
  28. package/funcs/toolsList.js +1 -1
  29. package/funcs/toolsUpdate.d.ts +16 -0
  30. package/funcs/toolsUpdate.d.ts.map +1 -0
  31. package/funcs/toolsUpdate.js +99 -0
  32. package/funcs/toolsUpdate.js.map +1 -0
  33. package/lib/config.d.ts +3 -3
  34. package/lib/config.js +3 -3
  35. package/models/components/channel.d.ts +3 -0
  36. package/models/components/channel.d.ts.map +1 -1
  37. package/models/components/channel.js.map +1 -1
  38. package/models/components/index.d.ts +8 -2
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +8 -2
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/listresponseservice.d.ts +38 -0
  43. package/models/components/listresponseservice.d.ts.map +1 -0
  44. package/models/components/listresponseservice.js +81 -0
  45. package/models/components/listresponseservice.js.map +1 -0
  46. package/models/components/llmconfig.d.ts +34 -3
  47. package/models/components/llmconfig.d.ts.map +1 -1
  48. package/models/components/llmconfig.js +26 -4
  49. package/models/components/llmconfig.js.map +1 -1
  50. package/models/components/prompt.d.ts +13 -0
  51. package/models/components/prompt.d.ts.map +1 -1
  52. package/models/components/prompt.js +8 -0
  53. package/models/components/prompt.js.map +1 -1
  54. package/models/components/promptcreate.d.ts +3 -0
  55. package/models/components/promptcreate.d.ts.map +1 -1
  56. package/models/components/promptcreate.js.map +1 -1
  57. package/models/components/prompthistory.d.ts +41 -0
  58. package/models/components/prompthistory.d.ts.map +1 -0
  59. package/models/components/prompthistory.js +88 -0
  60. package/models/components/prompthistory.js.map +1 -0
  61. package/models/components/promptproperties.d.ts +3 -0
  62. package/models/components/promptproperties.d.ts.map +1 -1
  63. package/models/components/promptproperties.js +1 -0
  64. package/models/components/promptproperties.js.map +1 -1
  65. package/models/components/service.d.ts +47 -0
  66. package/models/components/service.d.ts.map +1 -0
  67. package/models/components/{provider.js → service.js} +30 -19
  68. package/models/components/service.js.map +1 -0
  69. package/models/components/servicecreate.d.ts +37 -0
  70. package/models/components/servicecreate.d.ts.map +1 -0
  71. package/models/components/servicecreate.js +61 -0
  72. package/models/components/servicecreate.js.map +1 -0
  73. package/models/components/serviceproperties.d.ts +28 -0
  74. package/models/components/serviceproperties.d.ts.map +1 -0
  75. package/models/components/{orderbydirection.js → serviceproperties.js} +14 -14
  76. package/models/components/serviceproperties.js.map +1 -0
  77. package/models/components/serviceupdate.d.ts +42 -0
  78. package/models/components/serviceupdate.d.ts.map +1 -0
  79. package/models/components/serviceupdate.js +63 -0
  80. package/models/components/serviceupdate.js.map +1 -0
  81. package/models/components/toolcreate.d.ts +66 -0
  82. package/models/components/toolcreate.d.ts.map +1 -0
  83. package/models/components/toolcreate.js +95 -0
  84. package/models/components/toolcreate.js.map +1 -0
  85. package/models/components/toolupdate.d.ts +71 -0
  86. package/models/components/toolupdate.d.ts.map +1 -0
  87. package/models/components/toolupdate.js +97 -0
  88. package/models/components/toolupdate.js.map +1 -0
  89. package/models/operations/agentlist.d.ts +77 -2
  90. package/models/operations/agentlist.d.ts.map +1 -1
  91. package/models/operations/agentlist.js +52 -5
  92. package/models/operations/agentlist.js.map +1 -1
  93. package/models/operations/availabletargets.d.ts +56 -2
  94. package/models/operations/availabletargets.d.ts.map +1 -1
  95. package/models/operations/availabletargets.js +47 -5
  96. package/models/operations/availabletargets.js.map +1 -1
  97. package/models/operations/channelslist.d.ts +59 -2
  98. package/models/operations/channelslist.d.ts.map +1 -1
  99. package/models/operations/channelslist.js +45 -5
  100. package/models/operations/channelslist.js.map +1 -1
  101. package/models/operations/channeltargetslist.d.ts +71 -2
  102. package/models/operations/channeltargetslist.d.ts.map +1 -1
  103. package/models/operations/channeltargetslist.js +52 -5
  104. package/models/operations/channeltargetslist.js.map +1 -1
  105. package/models/operations/conversationslist.d.ts +77 -2
  106. package/models/operations/conversationslist.d.ts.map +1 -1
  107. package/models/operations/conversationslist.js +54 -5
  108. package/models/operations/conversationslist.js.map +1 -1
  109. package/models/operations/custommessageslist.d.ts +56 -2
  110. package/models/operations/custommessageslist.d.ts.map +1 -1
  111. package/models/operations/custommessageslist.js +47 -5
  112. package/models/operations/custommessageslist.js.map +1 -1
  113. package/models/operations/eventslist.d.ts +77 -2
  114. package/models/operations/eventslist.d.ts.map +1 -1
  115. package/models/operations/eventslist.js +53 -5
  116. package/models/operations/eventslist.js.map +1 -1
  117. package/models/operations/index.d.ts +2 -0
  118. package/models/operations/index.d.ts.map +1 -1
  119. package/models/operations/index.js +2 -0
  120. package/models/operations/index.js.map +1 -1
  121. package/models/operations/promptshistory.d.ts +29 -0
  122. package/models/operations/promptshistory.d.ts.map +1 -0
  123. package/models/operations/promptshistory.js +68 -0
  124. package/models/operations/promptshistory.js.map +1 -0
  125. package/models/operations/promptslist.d.ts +65 -2
  126. package/models/operations/promptslist.d.ts.map +1 -1
  127. package/models/operations/promptslist.js +49 -5
  128. package/models/operations/promptslist.js.map +1 -1
  129. package/models/operations/servicelist.d.ts +97 -0
  130. package/models/operations/servicelist.d.ts.map +1 -0
  131. package/models/operations/servicelist.js +137 -0
  132. package/models/operations/servicelist.js.map +1 -0
  133. package/models/operations/sessionlabelslist.d.ts +68 -2
  134. package/models/operations/sessionlabelslist.d.ts.map +1 -1
  135. package/models/operations/sessionlabelslist.js +51 -5
  136. package/models/operations/sessionlabelslist.js.map +1 -1
  137. package/models/operations/sessionslist.d.ts +95 -2
  138. package/models/operations/sessionslist.d.ts.map +1 -1
  139. package/models/operations/sessionslist.js +59 -5
  140. package/models/operations/sessionslist.js.map +1 -1
  141. package/models/operations/toollist.d.ts +62 -2
  142. package/models/operations/toollist.d.ts.map +1 -1
  143. package/models/operations/toollist.js +48 -5
  144. package/models/operations/toollist.js.map +1 -1
  145. package/package.json +1 -1
  146. package/sdk/prompts.d.ts +7 -0
  147. package/sdk/prompts.d.ts.map +1 -1
  148. package/sdk/prompts.js +10 -0
  149. package/sdk/prompts.js.map +1 -1
  150. package/sdk/sdk.d.ts +3 -0
  151. package/sdk/sdk.d.ts.map +1 -1
  152. package/sdk/sdk.js +5 -0
  153. package/sdk/sdk.js.map +1 -1
  154. package/sdk/services.d.ts +21 -0
  155. package/sdk/services.d.ts.map +1 -0
  156. package/sdk/services.js +36 -0
  157. package/sdk/services.js.map +1 -0
  158. package/sdk/tools.d.ts +15 -1
  159. package/sdk/tools.d.ts.map +1 -1
  160. package/sdk/tools.js +21 -1
  161. package/sdk/tools.js.map +1 -1
  162. package/src/funcs/promptsPromptsHistory.ts +139 -0
  163. package/src/funcs/servicesCreate.ts +128 -0
  164. package/src/funcs/servicesList.ts +144 -0
  165. package/src/funcs/servicesUpdate.ts +128 -0
  166. package/src/funcs/toolsCreate.ts +131 -0
  167. package/src/funcs/toolsList.ts +1 -1
  168. package/src/funcs/toolsUpdate.ts +131 -0
  169. package/src/lib/config.ts +3 -3
  170. package/src/models/components/channel.ts +3 -0
  171. package/src/models/components/index.ts +8 -2
  172. package/src/models/components/listresponseservice.ts +101 -0
  173. package/src/models/components/llmconfig.ts +36 -9
  174. package/src/models/components/prompt.ts +21 -0
  175. package/src/models/components/promptcreate.ts +3 -0
  176. package/src/models/components/prompthistory.ts +103 -0
  177. package/src/models/components/promptproperties.ts +1 -0
  178. package/src/models/components/service.ts +83 -0
  179. package/src/models/components/servicecreate.ts +72 -0
  180. package/src/models/components/serviceproperties.ts +33 -0
  181. package/src/models/components/serviceupdate.ts +79 -0
  182. package/src/models/components/toolcreate.ts +141 -0
  183. package/src/models/components/toolupdate.ts +148 -0
  184. package/src/models/operations/agentlist.ts +67 -6
  185. package/src/models/operations/availabletargets.ts +71 -6
  186. package/src/models/operations/channelslist.ts +65 -6
  187. package/src/models/operations/channeltargetslist.ts +77 -6
  188. package/src/models/operations/conversationslist.ts +78 -6
  189. package/src/models/operations/custommessageslist.ts +72 -6
  190. package/src/models/operations/eventslist.ts +78 -6
  191. package/src/models/operations/index.ts +2 -0
  192. package/src/models/operations/promptshistory.ts +75 -0
  193. package/src/models/operations/promptslist.ts +74 -6
  194. package/src/models/operations/servicelist.ts +184 -0
  195. package/src/models/operations/sessionlabelslist.ts +75 -6
  196. package/src/models/operations/sessionslist.ts +84 -6
  197. package/src/models/operations/toollist.ts +71 -6
  198. package/src/sdk/prompts.ts +18 -0
  199. package/src/sdk/sdk.ts +6 -0
  200. package/src/sdk/services.ts +58 -0
  201. package/src/sdk/tools.ts +37 -1
  202. package/models/components/orderbydirection.d.ts +0 -28
  203. package/models/components/orderbydirection.d.ts.map +0 -1
  204. package/models/components/orderbydirection.js.map +0 -1
  205. package/models/components/provider.d.ts +0 -34
  206. package/models/components/provider.d.ts.map +0 -1
  207. package/models/components/provider.js.map +0 -1
  208. package/src/models/components/orderbydirection.ts +0 -33
  209. package/src/models/components/provider.ts +0 -37
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Service List
28
+ *
29
+ * @remarks
30
+ * List the existing agents
31
+ */
32
+ export async function servicesList(
33
+ client: SyllableSDKCore,
34
+ request: operations.ServiceListRequest,
35
+ options?: RequestOptions,
36
+ ): Promise<
37
+ Result<
38
+ components.ListResponseService,
39
+ | errors.HTTPValidationError
40
+ | SDKError
41
+ | SDKValidationError
42
+ | UnexpectedClientError
43
+ | InvalidRequestError
44
+ | RequestAbortedError
45
+ | RequestTimeoutError
46
+ | ConnectionError
47
+ >
48
+ > {
49
+ const parsed = safeParse(
50
+ request,
51
+ (value) => operations.ServiceListRequest$outboundSchema.parse(value),
52
+ "Input validation failed",
53
+ );
54
+ if (!parsed.ok) {
55
+ return parsed;
56
+ }
57
+ const payload = parsed.value;
58
+ const body = null;
59
+
60
+ const path = pathToFunc("/api/v1/services/")();
61
+
62
+ const query = encodeFormQuery({
63
+ "end_datetime": payload.end_datetime,
64
+ "fields": payload.fields,
65
+ "limit": payload.limit,
66
+ "order_by": payload.order_by,
67
+ "order_by_direction": payload.order_by_direction,
68
+ "page": payload.page,
69
+ "search_field_values": payload.search_field_values,
70
+ "search_fields": payload.search_fields,
71
+ "start_datetime": payload.start_datetime,
72
+ });
73
+
74
+ const headers = new Headers({
75
+ Accept: "application/json",
76
+ });
77
+
78
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
79
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
80
+ const requestSecurity = resolveGlobalSecurity(securityInput);
81
+
82
+ const context = {
83
+ operationID: "service_list",
84
+ oAuth2Scopes: [],
85
+
86
+ resolvedSecurity: requestSecurity,
87
+
88
+ securitySource: client._options.apiKeyHeader,
89
+ retryConfig: options?.retries
90
+ || client._options.retryConfig
91
+ || { strategy: "none" },
92
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
93
+ };
94
+
95
+ const requestRes = client._createRequest(context, {
96
+ security: requestSecurity,
97
+ method: "GET",
98
+ path: path,
99
+ headers: headers,
100
+ query: query,
101
+ body: body,
102
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
103
+ }, options);
104
+ if (!requestRes.ok) {
105
+ return requestRes;
106
+ }
107
+ const req = requestRes.value;
108
+
109
+ const doResult = await client._do(req, {
110
+ context,
111
+ errorCodes: ["422", "4XX", "5XX"],
112
+ retryConfig: context.retryConfig,
113
+ retryCodes: context.retryCodes,
114
+ });
115
+ if (!doResult.ok) {
116
+ return doResult;
117
+ }
118
+ const response = doResult.value;
119
+
120
+ const responseFields = {
121
+ HttpMeta: { Response: response, Request: req },
122
+ };
123
+
124
+ const [result] = await M.match<
125
+ components.ListResponseService,
126
+ | errors.HTTPValidationError
127
+ | SDKError
128
+ | SDKValidationError
129
+ | UnexpectedClientError
130
+ | InvalidRequestError
131
+ | RequestAbortedError
132
+ | RequestTimeoutError
133
+ | ConnectionError
134
+ >(
135
+ M.json(200, components.ListResponseService$inboundSchema),
136
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
137
+ M.fail(["4XX", "5XX"]),
138
+ )(response, { extraFields: responseFields });
139
+ if (!result.ok) {
140
+ return result;
141
+ }
142
+
143
+ return result;
144
+ }
@@ -0,0 +1,128 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Update Service
27
+ */
28
+ export async function servicesUpdate(
29
+ client: SyllableSDKCore,
30
+ request: components.ServiceUpdate,
31
+ options?: RequestOptions,
32
+ ): Promise<
33
+ Result<
34
+ components.Service,
35
+ | errors.HTTPValidationError
36
+ | SDKError
37
+ | SDKValidationError
38
+ | UnexpectedClientError
39
+ | InvalidRequestError
40
+ | RequestAbortedError
41
+ | RequestTimeoutError
42
+ | ConnectionError
43
+ >
44
+ > {
45
+ const parsed = safeParse(
46
+ request,
47
+ (value) => components.ServiceUpdate$outboundSchema.parse(value),
48
+ "Input validation failed",
49
+ );
50
+ if (!parsed.ok) {
51
+ return parsed;
52
+ }
53
+ const payload = parsed.value;
54
+ const body = encodeJSON("body", payload, { explode: true });
55
+
56
+ const path = pathToFunc("/api/v1/services/")();
57
+
58
+ const headers = new Headers({
59
+ "Content-Type": "application/json",
60
+ Accept: "application/json",
61
+ });
62
+
63
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
64
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
65
+ const requestSecurity = resolveGlobalSecurity(securityInput);
66
+
67
+ const context = {
68
+ operationID: "service_update",
69
+ oAuth2Scopes: [],
70
+
71
+ resolvedSecurity: requestSecurity,
72
+
73
+ securitySource: client._options.apiKeyHeader,
74
+ retryConfig: options?.retries
75
+ || client._options.retryConfig
76
+ || { strategy: "none" },
77
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
78
+ };
79
+
80
+ const requestRes = client._createRequest(context, {
81
+ security: requestSecurity,
82
+ method: "PUT",
83
+ path: path,
84
+ headers: headers,
85
+ body: body,
86
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
87
+ }, options);
88
+ if (!requestRes.ok) {
89
+ return requestRes;
90
+ }
91
+ const req = requestRes.value;
92
+
93
+ const doResult = await client._do(req, {
94
+ context,
95
+ errorCodes: ["422", "4XX", "5XX"],
96
+ retryConfig: context.retryConfig,
97
+ retryCodes: context.retryCodes,
98
+ });
99
+ if (!doResult.ok) {
100
+ return doResult;
101
+ }
102
+ const response = doResult.value;
103
+
104
+ const responseFields = {
105
+ HttpMeta: { Response: response, Request: req },
106
+ };
107
+
108
+ const [result] = await M.match<
109
+ components.Service,
110
+ | errors.HTTPValidationError
111
+ | SDKError
112
+ | SDKValidationError
113
+ | UnexpectedClientError
114
+ | InvalidRequestError
115
+ | RequestAbortedError
116
+ | RequestTimeoutError
117
+ | ConnectionError
118
+ >(
119
+ M.json(200, components.Service$inboundSchema),
120
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
121
+ M.fail(["4XX", "5XX"]),
122
+ )(response, { extraFields: responseFields });
123
+ if (!result.ok) {
124
+ return result;
125
+ }
126
+
127
+ return result;
128
+ }
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Create Tool
27
+ *
28
+ * @remarks
29
+ * Create a new tool
30
+ */
31
+ export async function toolsCreate(
32
+ client: SyllableSDKCore,
33
+ request: components.ToolCreate,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.Tool,
38
+ | errors.HTTPValidationError
39
+ | SDKError
40
+ | SDKValidationError
41
+ | UnexpectedClientError
42
+ | InvalidRequestError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | ConnectionError
46
+ >
47
+ > {
48
+ const parsed = safeParse(
49
+ request,
50
+ (value) => components.ToolCreate$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload, { explode: true });
58
+
59
+ const path = pathToFunc("/api/v1/tools/")();
60
+
61
+ const headers = new Headers({
62
+ "Content-Type": "application/json",
63
+ Accept: "application/json",
64
+ });
65
+
66
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
67
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
68
+ const requestSecurity = resolveGlobalSecurity(securityInput);
69
+
70
+ const context = {
71
+ operationID: "tool_create",
72
+ oAuth2Scopes: [],
73
+
74
+ resolvedSecurity: requestSecurity,
75
+
76
+ securitySource: client._options.apiKeyHeader,
77
+ retryConfig: options?.retries
78
+ || client._options.retryConfig
79
+ || { strategy: "none" },
80
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
81
+ };
82
+
83
+ const requestRes = client._createRequest(context, {
84
+ security: requestSecurity,
85
+ method: "POST",
86
+ path: path,
87
+ headers: headers,
88
+ body: body,
89
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
90
+ }, options);
91
+ if (!requestRes.ok) {
92
+ return requestRes;
93
+ }
94
+ const req = requestRes.value;
95
+
96
+ const doResult = await client._do(req, {
97
+ context,
98
+ errorCodes: ["422", "4XX", "5XX"],
99
+ retryConfig: context.retryConfig,
100
+ retryCodes: context.retryCodes,
101
+ });
102
+ if (!doResult.ok) {
103
+ return doResult;
104
+ }
105
+ const response = doResult.value;
106
+
107
+ const responseFields = {
108
+ HttpMeta: { Response: response, Request: req },
109
+ };
110
+
111
+ const [result] = await M.match<
112
+ components.Tool,
113
+ | errors.HTTPValidationError
114
+ | SDKError
115
+ | SDKValidationError
116
+ | UnexpectedClientError
117
+ | InvalidRequestError
118
+ | RequestAbortedError
119
+ | RequestTimeoutError
120
+ | ConnectionError
121
+ >(
122
+ M.json(200, components.Tool$inboundSchema),
123
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
124
+ M.fail(["4XX", "5XX"]),
125
+ )(response, { extraFields: responseFields });
126
+ if (!result.ok) {
127
+ return result;
128
+ }
129
+
130
+ return result;
131
+ }
@@ -27,7 +27,7 @@ import { Result } from "../types/fp.js";
27
27
  * Tool List
28
28
  *
29
29
  * @remarks
30
- * List the existing agents
30
+ * List the existing tools
31
31
  */
32
32
  export async function toolsList(
33
33
  client: SyllableSDKCore,
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import { Result } from "../types/fp.js";
24
+
25
+ /**
26
+ * Update Tool
27
+ *
28
+ * @remarks
29
+ * Update an existing tool
30
+ */
31
+ export async function toolsUpdate(
32
+ client: SyllableSDKCore,
33
+ request: components.ToolUpdate,
34
+ options?: RequestOptions,
35
+ ): Promise<
36
+ Result<
37
+ components.Tool,
38
+ | errors.HTTPValidationError
39
+ | SDKError
40
+ | SDKValidationError
41
+ | UnexpectedClientError
42
+ | InvalidRequestError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | ConnectionError
46
+ >
47
+ > {
48
+ const parsed = safeParse(
49
+ request,
50
+ (value) => components.ToolUpdate$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload, { explode: true });
58
+
59
+ const path = pathToFunc("/api/v1/tools/")();
60
+
61
+ const headers = new Headers({
62
+ "Content-Type": "application/json",
63
+ Accept: "application/json",
64
+ });
65
+
66
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
67
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
68
+ const requestSecurity = resolveGlobalSecurity(securityInput);
69
+
70
+ const context = {
71
+ operationID: "tool_update",
72
+ oAuth2Scopes: [],
73
+
74
+ resolvedSecurity: requestSecurity,
75
+
76
+ securitySource: client._options.apiKeyHeader,
77
+ retryConfig: options?.retries
78
+ || client._options.retryConfig
79
+ || { strategy: "none" },
80
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
81
+ };
82
+
83
+ const requestRes = client._createRequest(context, {
84
+ security: requestSecurity,
85
+ method: "PUT",
86
+ path: path,
87
+ headers: headers,
88
+ body: body,
89
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
90
+ }, options);
91
+ if (!requestRes.ok) {
92
+ return requestRes;
93
+ }
94
+ const req = requestRes.value;
95
+
96
+ const doResult = await client._do(req, {
97
+ context,
98
+ errorCodes: ["422", "4XX", "5XX"],
99
+ retryConfig: context.retryConfig,
100
+ retryCodes: context.retryCodes,
101
+ });
102
+ if (!doResult.ok) {
103
+ return doResult;
104
+ }
105
+ const response = doResult.value;
106
+
107
+ const responseFields = {
108
+ HttpMeta: { Response: response, Request: req },
109
+ };
110
+
111
+ const [result] = await M.match<
112
+ components.Tool,
113
+ | errors.HTTPValidationError
114
+ | SDKError
115
+ | SDKValidationError
116
+ | UnexpectedClientError
117
+ | InvalidRequestError
118
+ | RequestAbortedError
119
+ | RequestTimeoutError
120
+ | ConnectionError
121
+ >(
122
+ M.json(200, components.Tool$inboundSchema),
123
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
124
+ M.fail(["4XX", "5XX"]),
125
+ )(response, { extraFields: responseFields });
126
+ if (!result.ok) {
127
+ return result;
128
+ }
129
+
130
+ return result;
131
+ }
package/src/lib/config.ts CHANGED
@@ -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.5",
65
- genVersion: "2.460.1",
64
+ sdkVersion: "0.1.0-alpha.6",
65
+ genVersion: "2.461.2",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.5 2.460.1 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.6 2.461.2 0.0.2 syllable-sdk",
68
68
  } as const;
@@ -18,6 +18,9 @@ export type Channel = {
18
18
  * The channel name
19
19
  */
20
20
  name: string;
21
+ /**
22
+ * The service for the channel
23
+ */
21
24
  channelService: ChannelServices;
22
25
  /**
23
26
  * The comma-delimited list of supported modes for the channel
@@ -30,16 +30,20 @@ export * from "./listresponseconversation.js";
30
30
  export * from "./listresponsecustommessage.js";
31
31
  export * from "./listresponseevent.js";
32
32
  export * from "./listresponseprompt.js";
33
+ export * from "./listresponseservice.js";
33
34
  export * from "./listresponsesession.js";
34
35
  export * from "./listresponsesessionlabel.js";
35
36
  export * from "./listresponsetool.js";
36
37
  export * from "./llmconfig.js";
37
- export * from "./orderbydirection.js";
38
38
  export * from "./prompt.js";
39
39
  export * from "./promptcreate.js";
40
+ export * from "./prompthistory.js";
40
41
  export * from "./promptproperties.js";
41
- export * from "./provider.js";
42
42
  export * from "./security.js";
43
+ export * from "./service.js";
44
+ export * from "./servicecreate.js";
45
+ export * from "./serviceproperties.js";
46
+ export * from "./serviceupdate.js";
43
47
  export * from "./session.js";
44
48
  export * from "./sessionaction.js";
45
49
  export * from "./sessionlabel.js";
@@ -52,6 +56,8 @@ export * from "./sessiontranscriptionresponse.js";
52
56
  export * from "./testmessage.js";
53
57
  export * from "./testmessageresponse.js";
54
58
  export * from "./tool.js";
59
+ export * from "./toolcreate.js";
55
60
  export * from "./tooldetailresponse.js";
56
61
  export * from "./toolproperties.js";
62
+ export * from "./toolupdate.js";
57
63
  export * from "./validationerror.js";
@@ -0,0 +1,101 @@
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
+ Service,
12
+ Service$inboundSchema,
13
+ Service$Outbound,
14
+ Service$outboundSchema,
15
+ } from "./service.js";
16
+
17
+ export type ListResponseService = {
18
+ items: Array<Service>;
19
+ page: number;
20
+ pageSize: number;
21
+ totalPages?: number | null | undefined;
22
+ totalCount?: number | null | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const ListResponseService$inboundSchema: z.ZodType<
27
+ ListResponseService,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ items: z.array(Service$inboundSchema),
32
+ page: z.number().int(),
33
+ page_size: z.number().int(),
34
+ total_pages: z.nullable(z.number().int()).optional(),
35
+ total_count: z.nullable(z.number().int()).optional(),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ "page_size": "pageSize",
39
+ "total_pages": "totalPages",
40
+ "total_count": "totalCount",
41
+ });
42
+ });
43
+
44
+ /** @internal */
45
+ export type ListResponseService$Outbound = {
46
+ items: Array<Service$Outbound>;
47
+ page: number;
48
+ page_size: number;
49
+ total_pages?: number | null | undefined;
50
+ total_count?: number | null | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const ListResponseService$outboundSchema: z.ZodType<
55
+ ListResponseService$Outbound,
56
+ z.ZodTypeDef,
57
+ ListResponseService
58
+ > = z.object({
59
+ items: z.array(Service$outboundSchema),
60
+ page: z.number().int(),
61
+ pageSize: z.number().int(),
62
+ totalPages: z.nullable(z.number().int()).optional(),
63
+ totalCount: z.nullable(z.number().int()).optional(),
64
+ }).transform((v) => {
65
+ return remap$(v, {
66
+ pageSize: "page_size",
67
+ totalPages: "total_pages",
68
+ totalCount: "total_count",
69
+ });
70
+ });
71
+
72
+ /**
73
+ * @internal
74
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
+ */
76
+ export namespace ListResponseService$ {
77
+ /** @deprecated use `ListResponseService$inboundSchema` instead. */
78
+ export const inboundSchema = ListResponseService$inboundSchema;
79
+ /** @deprecated use `ListResponseService$outboundSchema` instead. */
80
+ export const outboundSchema = ListResponseService$outboundSchema;
81
+ /** @deprecated use `ListResponseService$Outbound` instead. */
82
+ export type Outbound = ListResponseService$Outbound;
83
+ }
84
+
85
+ export function listResponseServiceToJSON(
86
+ listResponseService: ListResponseService,
87
+ ): string {
88
+ return JSON.stringify(
89
+ ListResponseService$outboundSchema.parse(listResponseService),
90
+ );
91
+ }
92
+
93
+ export function listResponseServiceFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<ListResponseService, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => ListResponseService$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'ListResponseService' from JSON`,
100
+ );
101
+ }