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

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 (219) hide show
  1. package/README.md +22 -0
  2. package/RUNTIMES.md +27 -1
  3. package/docs/sdks/dashboards/README.md +309 -0
  4. package/docs/sdks/v1/README.md +307 -0
  5. package/funcs/agentsAgentGetAvailableVoices.js +4 -4
  6. package/funcs/agentsAgentGetAvailableVoices.js.map +1 -1
  7. package/funcs/agentsCreate.js +4 -4
  8. package/funcs/agentsCreate.js.map +1 -1
  9. package/funcs/agentsDelete.js +4 -4
  10. package/funcs/agentsDelete.js.map +1 -1
  11. package/funcs/agentsGetById.js +4 -4
  12. package/funcs/agentsGetById.js.map +1 -1
  13. package/funcs/agentsList.js +4 -4
  14. package/funcs/agentsList.js.map +1 -1
  15. package/funcs/agentsTestSendTestMessage.js +4 -4
  16. package/funcs/agentsTestSendTestMessage.js.map +1 -1
  17. package/funcs/agentsUpdate.js +4 -4
  18. package/funcs/agentsUpdate.js.map +1 -1
  19. package/funcs/channelsDelete.js +4 -4
  20. package/funcs/channelsDelete.js.map +1 -1
  21. package/funcs/channelsList.js +4 -4
  22. package/funcs/channelsList.js.map +1 -1
  23. package/funcs/channelsTargetsAvailableTargets.js +4 -4
  24. package/funcs/channelsTargetsAvailableTargets.js.map +1 -1
  25. package/funcs/channelsTargetsCreate.js +4 -4
  26. package/funcs/channelsTargetsCreate.js.map +1 -1
  27. package/funcs/channelsTargetsGetById.js +4 -4
  28. package/funcs/channelsTargetsGetById.js.map +1 -1
  29. package/funcs/channelsTargetsList.js +4 -4
  30. package/funcs/channelsTargetsList.js.map +1 -1
  31. package/funcs/channelsTargetsUpdate.js +4 -4
  32. package/funcs/channelsTargetsUpdate.js.map +1 -1
  33. package/funcs/conversationsList.js +4 -4
  34. package/funcs/conversationsList.js.map +1 -1
  35. package/funcs/customMessagesCreate.js +4 -4
  36. package/funcs/customMessagesCreate.js.map +1 -1
  37. package/funcs/customMessagesDelete.js +4 -4
  38. package/funcs/customMessagesDelete.js.map +1 -1
  39. package/funcs/customMessagesGetById.js +4 -4
  40. package/funcs/customMessagesGetById.js.map +1 -1
  41. package/funcs/customMessagesList.js +4 -4
  42. package/funcs/customMessagesList.js.map +1 -1
  43. package/funcs/customMessagesUpdate.js +4 -4
  44. package/funcs/customMessagesUpdate.js.map +1 -1
  45. package/funcs/dashboardsPostSessionEventsDashboard.d.ts +18 -0
  46. package/funcs/dashboardsPostSessionEventsDashboard.d.ts.map +1 -0
  47. package/funcs/dashboardsPostSessionEventsDashboard.js +89 -0
  48. package/funcs/dashboardsPostSessionEventsDashboard.js.map +1 -0
  49. package/funcs/dashboardsPostSessionSummaryDashboard.d.ts +18 -0
  50. package/funcs/dashboardsPostSessionSummaryDashboard.d.ts.map +1 -0
  51. package/funcs/dashboardsPostSessionSummaryDashboard.js +89 -0
  52. package/funcs/dashboardsPostSessionSummaryDashboard.js.map +1 -0
  53. package/funcs/dashboardsPostSessionTransfersDashboard.d.ts +18 -0
  54. package/funcs/dashboardsPostSessionTransfersDashboard.d.ts.map +1 -0
  55. package/funcs/dashboardsPostSessionTransfersDashboard.js +89 -0
  56. package/funcs/dashboardsPostSessionTransfersDashboard.js.map +1 -0
  57. package/funcs/dashboardsPostSessionsDashboard.d.ts +18 -0
  58. package/funcs/dashboardsPostSessionsDashboard.d.ts.map +1 -0
  59. package/funcs/dashboardsPostSessionsDashboard.js +89 -0
  60. package/funcs/dashboardsPostSessionsDashboard.js.map +1 -0
  61. package/funcs/directoryCreate.js +4 -4
  62. package/funcs/directoryCreate.js.map +1 -1
  63. package/funcs/directoryDelete.js +4 -4
  64. package/funcs/directoryDelete.js.map +1 -1
  65. package/funcs/directoryDirectoryMemberBulkLoad.js +4 -4
  66. package/funcs/directoryDirectoryMemberBulkLoad.js.map +1 -1
  67. package/funcs/directoryDirectoryMemberDownload.js +4 -4
  68. package/funcs/directoryDirectoryMemberDownload.js.map +1 -1
  69. package/funcs/directoryGetById.js +4 -4
  70. package/funcs/directoryGetById.js.map +1 -1
  71. package/funcs/directoryList.js +4 -4
  72. package/funcs/directoryList.js.map +1 -1
  73. package/funcs/directoryUpdate.js +4 -4
  74. package/funcs/directoryUpdate.js.map +1 -1
  75. package/funcs/eventsList.js +4 -4
  76. package/funcs/eventsList.js.map +1 -1
  77. package/funcs/promptsCreate.js +4 -4
  78. package/funcs/promptsCreate.js.map +1 -1
  79. package/funcs/promptsDelete.js +4 -4
  80. package/funcs/promptsDelete.js.map +1 -1
  81. package/funcs/promptsGetById.js +4 -4
  82. package/funcs/promptsGetById.js.map +1 -1
  83. package/funcs/promptsList.js +4 -4
  84. package/funcs/promptsList.js.map +1 -1
  85. package/funcs/promptsPromptsHistory.js +4 -4
  86. package/funcs/promptsPromptsHistory.js.map +1 -1
  87. package/funcs/promptsUpdate.js +4 -4
  88. package/funcs/promptsUpdate.js.map +1 -1
  89. package/funcs/servicesCreate.js +4 -4
  90. package/funcs/servicesCreate.js.map +1 -1
  91. package/funcs/servicesList.js +4 -4
  92. package/funcs/servicesList.js.map +1 -1
  93. package/funcs/servicesUpdate.js +4 -4
  94. package/funcs/servicesUpdate.js.map +1 -1
  95. package/funcs/sessionLabelsCreate.js +4 -4
  96. package/funcs/sessionLabelsCreate.js.map +1 -1
  97. package/funcs/sessionLabelsGetById.js +4 -4
  98. package/funcs/sessionLabelsGetById.js.map +1 -1
  99. package/funcs/sessionLabelsList.js +4 -4
  100. package/funcs/sessionLabelsList.js.map +1 -1
  101. package/funcs/sessionsGenerateSessionRecordingUrls.js +4 -4
  102. package/funcs/sessionsGenerateSessionRecordingUrls.js.map +1 -1
  103. package/funcs/sessionsGetById.js +4 -4
  104. package/funcs/sessionsGetById.js.map +1 -1
  105. package/funcs/sessionsList.js +4 -4
  106. package/funcs/sessionsList.js.map +1 -1
  107. package/funcs/sessionsSessionRecordingStream.js +4 -4
  108. package/funcs/sessionsSessionRecordingStream.js.map +1 -1
  109. package/funcs/sessionsTranscriptGetById.js +4 -4
  110. package/funcs/sessionsTranscriptGetById.js.map +1 -1
  111. package/funcs/toolsCreate.js +4 -4
  112. package/funcs/toolsCreate.js.map +1 -1
  113. package/funcs/toolsGetByName.js +4 -4
  114. package/funcs/toolsGetByName.js.map +1 -1
  115. package/funcs/toolsList.js +4 -4
  116. package/funcs/toolsList.js.map +1 -1
  117. package/funcs/toolsUpdate.js +4 -4
  118. package/funcs/toolsUpdate.js.map +1 -1
  119. package/funcs/v1PostSessionEventsDashboard.d.ts +18 -0
  120. package/funcs/v1PostSessionEventsDashboard.d.ts.map +1 -0
  121. package/funcs/v1PostSessionEventsDashboard.js +89 -0
  122. package/funcs/v1PostSessionEventsDashboard.js.map +1 -0
  123. package/funcs/v1PostSessionSummaryDashboard.d.ts +18 -0
  124. package/funcs/v1PostSessionSummaryDashboard.d.ts.map +1 -0
  125. package/funcs/v1PostSessionSummaryDashboard.js +89 -0
  126. package/funcs/v1PostSessionSummaryDashboard.js.map +1 -0
  127. package/funcs/v1PostSessionTransfersDashboard.d.ts +18 -0
  128. package/funcs/v1PostSessionTransfersDashboard.d.ts.map +1 -0
  129. package/funcs/v1PostSessionTransfersDashboard.js +89 -0
  130. package/funcs/v1PostSessionTransfersDashboard.js.map +1 -0
  131. package/funcs/v1PostSessionsDashboard.d.ts +18 -0
  132. package/funcs/v1PostSessionsDashboard.d.ts.map +1 -0
  133. package/funcs/v1PostSessionsDashboard.js +89 -0
  134. package/funcs/v1PostSessionsDashboard.js.map +1 -0
  135. package/lib/config.d.ts +3 -3
  136. package/lib/config.js +4 -5
  137. package/lib/config.js.map +1 -1
  138. package/lib/encodings.js +18 -19
  139. package/lib/encodings.js.map +1 -1
  140. package/lib/env.js +1 -2
  141. package/lib/env.js.map +1 -1
  142. package/lib/http.js +1 -2
  143. package/lib/http.js.map +1 -1
  144. package/lib/matchers.js +5 -6
  145. package/lib/matchers.js.map +1 -1
  146. package/lib/primitives.js +1 -1
  147. package/lib/primitives.js.map +1 -1
  148. package/lib/retries.js +3 -4
  149. package/lib/retries.js.map +1 -1
  150. package/lib/sdks.js +15 -16
  151. package/lib/sdks.js.map +1 -1
  152. package/lib/security.js +2 -3
  153. package/lib/security.js.map +1 -1
  154. package/lib/url.js +1 -1
  155. package/lib/url.js.map +1 -1
  156. package/mintlify/scripts/create-md-script.js +46 -0
  157. package/mintlify/scripts/generate-mintlify-sdk-docs.js +117 -0
  158. package/models/components/channeltargetproperties.d.ts +3 -0
  159. package/models/components/channeltargetproperties.d.ts.map +1 -1
  160. package/models/components/channeltargetproperties.js +1 -0
  161. package/models/components/channeltargetproperties.js.map +1 -1
  162. package/models/components/dashboard.d.ts +35 -0
  163. package/models/components/dashboard.d.ts.map +1 -0
  164. package/models/components/dashboard.js +78 -0
  165. package/models/components/dashboard.js.map +1 -0
  166. package/models/components/index.d.ts +1 -0
  167. package/models/components/index.d.ts.map +1 -1
  168. package/models/components/index.js +1 -0
  169. package/models/components/index.js.map +1 -1
  170. package/models/components/toolparameterdefault.d.ts +6 -0
  171. package/models/components/toolparameterdefault.d.ts.map +1 -1
  172. package/models/components/toolparameterdefault.js.map +1 -1
  173. package/models/components/toolparametertransform.d.ts +14 -3
  174. package/models/components/toolparametertransform.d.ts.map +1 -1
  175. package/models/components/toolparametertransform.js +4 -2
  176. package/models/components/toolparametertransform.js.map +1 -1
  177. package/models/errors/httpclienterrors.js +2 -2
  178. package/models/errors/httpclienterrors.js.map +1 -1
  179. package/package.json +1 -1
  180. package/sdk/agents.js +1 -2
  181. package/sdk/agents.js.map +1 -1
  182. package/sdk/channels.js +1 -2
  183. package/sdk/channels.js.map +1 -1
  184. package/sdk/dashboards.d.ts +45 -0
  185. package/sdk/dashboards.d.ts.map +1 -0
  186. package/sdk/dashboards.js +64 -0
  187. package/sdk/dashboards.js.map +1 -0
  188. package/sdk/sdk.d.ts +6 -0
  189. package/sdk/sdk.d.ts.map +1 -1
  190. package/sdk/sdk.js +19 -22
  191. package/sdk/sdk.js.map +1 -1
  192. package/sdk/sessions.js +1 -2
  193. package/sdk/sessions.js.map +1 -1
  194. package/sdk/v1.d.ts +45 -0
  195. package/sdk/v1.d.ts.map +1 -0
  196. package/sdk/v1.js +64 -0
  197. package/sdk/v1.js.map +1 -0
  198. package/src/funcs/dashboardsPostSessionEventsDashboard.ts +111 -0
  199. package/src/funcs/dashboardsPostSessionSummaryDashboard.ts +111 -0
  200. package/src/funcs/dashboardsPostSessionTransfersDashboard.ts +111 -0
  201. package/src/funcs/dashboardsPostSessionsDashboard.ts +111 -0
  202. package/src/funcs/v1PostSessionEventsDashboard.ts +111 -0
  203. package/src/funcs/v1PostSessionSummaryDashboard.ts +111 -0
  204. package/src/funcs/v1PostSessionTransfersDashboard.ts +111 -0
  205. package/src/funcs/v1PostSessionsDashboard.ts +111 -0
  206. package/src/lib/config.ts +3 -3
  207. package/src/lib/security.ts +1 -1
  208. package/src/models/components/channeltargetproperties.ts +1 -0
  209. package/src/models/components/dashboard.ts +87 -0
  210. package/src/models/components/index.ts +1 -0
  211. package/src/models/components/toolparameterdefault.ts +6 -0
  212. package/src/models/components/toolparametertransform.ts +18 -5
  213. package/src/sdk/dashboards.ts +85 -0
  214. package/src/sdk/sdk.ts +12 -0
  215. package/src/sdk/v1.ts +85 -0
  216. package/test/sdk/contract/agents.test.ts +113 -0
  217. package/test/sdk/contract/custommessages.test.ts +109 -0
  218. package/test/sdk/contract/helper.ts +190 -0
  219. package/test/sdk/contract/prompts.test.ts +70 -0
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import { SDKError } from "../models/errors/sdkerror.js";
19
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
20
+ import { Result } from "../types/fp.js";
21
+
22
+ /**
23
+ * Post Session Summary
24
+ *
25
+ * @remarks
26
+ * METHOD: POST
27
+ * URL: /dashboard/session_summary
28
+ * ARGUMENTS: None
29
+ * RETURNS: Dashboard info for embedding
30
+ */
31
+ export async function v1PostSessionSummaryDashboard(
32
+ client: SyllableSDKCore,
33
+ options?: RequestOptions,
34
+ ): Promise<
35
+ Result<
36
+ components.Dashboard,
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const path = pathToFunc("/api/v1/dashboards/session_summary")();
47
+
48
+ const headers = new Headers({
49
+ Accept: "application/json",
50
+ });
51
+
52
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
53
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
54
+ const requestSecurity = resolveGlobalSecurity(securityInput);
55
+
56
+ const context = {
57
+ operationID: "post_session_summary_dashboard",
58
+ oAuth2Scopes: [],
59
+
60
+ resolvedSecurity: requestSecurity,
61
+
62
+ securitySource: client._options.apiKeyHeader,
63
+ retryConfig: options?.retries
64
+ || client._options.retryConfig
65
+ || { strategy: "none" },
66
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
67
+ };
68
+
69
+ const requestRes = client._createRequest(context, {
70
+ security: requestSecurity,
71
+ method: "POST",
72
+ baseURL: options?.serverURL,
73
+ path: path,
74
+ headers: headers,
75
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
76
+ }, options);
77
+ if (!requestRes.ok) {
78
+ return requestRes;
79
+ }
80
+ const req = requestRes.value;
81
+
82
+ const doResult = await client._do(req, {
83
+ context,
84
+ errorCodes: ["4XX", "5XX"],
85
+ retryConfig: context.retryConfig,
86
+ retryCodes: context.retryCodes,
87
+ });
88
+ if (!doResult.ok) {
89
+ return doResult;
90
+ }
91
+ const response = doResult.value;
92
+
93
+ const [result] = await M.match<
94
+ components.Dashboard,
95
+ | SDKError
96
+ | SDKValidationError
97
+ | UnexpectedClientError
98
+ | InvalidRequestError
99
+ | RequestAbortedError
100
+ | RequestTimeoutError
101
+ | ConnectionError
102
+ >(
103
+ M.json(200, components.Dashboard$inboundSchema),
104
+ M.fail(["4XX", "5XX"]),
105
+ )(response);
106
+ if (!result.ok) {
107
+ return result;
108
+ }
109
+
110
+ return result;
111
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import { SDKError } from "../models/errors/sdkerror.js";
19
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
20
+ import { Result } from "../types/fp.js";
21
+
22
+ /**
23
+ * Post Session Transfers
24
+ *
25
+ * @remarks
26
+ * METHOD: POST
27
+ * URL: /dashboard/session_transfers
28
+ * ARGUMENTS: None
29
+ * RETURNS: Dashboard info for embedding
30
+ */
31
+ export async function v1PostSessionTransfersDashboard(
32
+ client: SyllableSDKCore,
33
+ options?: RequestOptions,
34
+ ): Promise<
35
+ Result<
36
+ components.Dashboard,
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const path = pathToFunc("/api/v1/dashboards/session_transfers")();
47
+
48
+ const headers = new Headers({
49
+ Accept: "application/json",
50
+ });
51
+
52
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
53
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
54
+ const requestSecurity = resolveGlobalSecurity(securityInput);
55
+
56
+ const context = {
57
+ operationID: "post_session_transfers_dashboard",
58
+ oAuth2Scopes: [],
59
+
60
+ resolvedSecurity: requestSecurity,
61
+
62
+ securitySource: client._options.apiKeyHeader,
63
+ retryConfig: options?.retries
64
+ || client._options.retryConfig
65
+ || { strategy: "none" },
66
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
67
+ };
68
+
69
+ const requestRes = client._createRequest(context, {
70
+ security: requestSecurity,
71
+ method: "POST",
72
+ baseURL: options?.serverURL,
73
+ path: path,
74
+ headers: headers,
75
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
76
+ }, options);
77
+ if (!requestRes.ok) {
78
+ return requestRes;
79
+ }
80
+ const req = requestRes.value;
81
+
82
+ const doResult = await client._do(req, {
83
+ context,
84
+ errorCodes: ["4XX", "5XX"],
85
+ retryConfig: context.retryConfig,
86
+ retryCodes: context.retryCodes,
87
+ });
88
+ if (!doResult.ok) {
89
+ return doResult;
90
+ }
91
+ const response = doResult.value;
92
+
93
+ const [result] = await M.match<
94
+ components.Dashboard,
95
+ | SDKError
96
+ | SDKValidationError
97
+ | UnexpectedClientError
98
+ | InvalidRequestError
99
+ | RequestAbortedError
100
+ | RequestTimeoutError
101
+ | ConnectionError
102
+ >(
103
+ M.json(200, components.Dashboard$inboundSchema),
104
+ M.fail(["4XX", "5XX"]),
105
+ )(response);
106
+ if (!result.ok) {
107
+ return result;
108
+ }
109
+
110
+ return result;
111
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import { SDKError } from "../models/errors/sdkerror.js";
19
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
20
+ import { Result } from "../types/fp.js";
21
+
22
+ /**
23
+ * Post Sessions
24
+ *
25
+ * @remarks
26
+ * METHOD: POST
27
+ * URL: /dashboard/sessions
28
+ * ARGUMENTS: None
29
+ * RETURNS: Dashboard info for embedding
30
+ */
31
+ export async function v1PostSessionsDashboard(
32
+ client: SyllableSDKCore,
33
+ options?: RequestOptions,
34
+ ): Promise<
35
+ Result<
36
+ components.Dashboard,
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const path = pathToFunc("/api/v1/dashboards/sessions")();
47
+
48
+ const headers = new Headers({
49
+ Accept: "application/json",
50
+ });
51
+
52
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
53
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
54
+ const requestSecurity = resolveGlobalSecurity(securityInput);
55
+
56
+ const context = {
57
+ operationID: "post_sessions_dashboard",
58
+ oAuth2Scopes: [],
59
+
60
+ resolvedSecurity: requestSecurity,
61
+
62
+ securitySource: client._options.apiKeyHeader,
63
+ retryConfig: options?.retries
64
+ || client._options.retryConfig
65
+ || { strategy: "none" },
66
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
67
+ };
68
+
69
+ const requestRes = client._createRequest(context, {
70
+ security: requestSecurity,
71
+ method: "POST",
72
+ baseURL: options?.serverURL,
73
+ path: path,
74
+ headers: headers,
75
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
76
+ }, options);
77
+ if (!requestRes.ok) {
78
+ return requestRes;
79
+ }
80
+ const req = requestRes.value;
81
+
82
+ const doResult = await client._do(req, {
83
+ context,
84
+ errorCodes: ["4XX", "5XX"],
85
+ retryConfig: context.retryConfig,
86
+ retryCodes: context.retryCodes,
87
+ });
88
+ if (!doResult.ok) {
89
+ return doResult;
90
+ }
91
+ const response = doResult.value;
92
+
93
+ const [result] = await M.match<
94
+ components.Dashboard,
95
+ | SDKError
96
+ | SDKValidationError
97
+ | UnexpectedClientError
98
+ | InvalidRequestError
99
+ | RequestAbortedError
100
+ | RequestTimeoutError
101
+ | ConnectionError
102
+ >(
103
+ M.json(200, components.Dashboard$inboundSchema),
104
+ M.fail(["4XX", "5XX"]),
105
+ )(response);
106
+ if (!result.ok) {
107
+ return result;
108
+ }
109
+
110
+ return result;
111
+ }
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.28",
65
- genVersion: "2.481.0",
64
+ sdkVersion: "0.1.0-alpha.29",
65
+ genVersion: "2.492.3",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.28 2.481.0 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.29 2.492.3 0.0.2 syllable-sdk",
68
68
  } as const;
@@ -118,7 +118,7 @@ export function resolveSecurity(
118
118
  ...options: SecurityInput[][]
119
119
  ): SecurityState | null {
120
120
  const state: SecurityState = {
121
- basic: { username: "", password: "" },
121
+ basic: {},
122
122
  headers: {},
123
123
  queryParams: {},
124
124
  cookies: {},
@@ -14,6 +14,7 @@ export const ChannelTargetProperties = {
14
14
  TargetMode: "target_mode",
15
15
  FallbackTarget: "fallback_target",
16
16
  IsTest: "is_test",
17
+ UpdatedAt: "updated_at",
17
18
  } as const;
18
19
  export type ChannelTargetProperties = ClosedEnum<
19
20
  typeof ChannelTargetProperties
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type Dashboard = {
12
+ embeddedId: string;
13
+ guestToken: string;
14
+ name: string;
15
+ supersetUrl: string;
16
+ };
17
+
18
+ /** @internal */
19
+ export const Dashboard$inboundSchema: z.ZodType<
20
+ Dashboard,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ embedded_id: z.string(),
25
+ guest_token: z.string(),
26
+ name: z.string(),
27
+ superset_url: z.string(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "embedded_id": "embeddedId",
31
+ "guest_token": "guestToken",
32
+ "superset_url": "supersetUrl",
33
+ });
34
+ });
35
+
36
+ /** @internal */
37
+ export type Dashboard$Outbound = {
38
+ embedded_id: string;
39
+ guest_token: string;
40
+ name: string;
41
+ superset_url: string;
42
+ };
43
+
44
+ /** @internal */
45
+ export const Dashboard$outboundSchema: z.ZodType<
46
+ Dashboard$Outbound,
47
+ z.ZodTypeDef,
48
+ Dashboard
49
+ > = z.object({
50
+ embeddedId: z.string(),
51
+ guestToken: z.string(),
52
+ name: z.string(),
53
+ supersetUrl: z.string(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ embeddedId: "embedded_id",
57
+ guestToken: "guest_token",
58
+ supersetUrl: "superset_url",
59
+ });
60
+ });
61
+
62
+ /**
63
+ * @internal
64
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
+ */
66
+ export namespace Dashboard$ {
67
+ /** @deprecated use `Dashboard$inboundSchema` instead. */
68
+ export const inboundSchema = Dashboard$inboundSchema;
69
+ /** @deprecated use `Dashboard$outboundSchema` instead. */
70
+ export const outboundSchema = Dashboard$outboundSchema;
71
+ /** @deprecated use `Dashboard$Outbound` instead. */
72
+ export type Outbound = Dashboard$Outbound;
73
+ }
74
+
75
+ export function dashboardToJSON(dashboard: Dashboard): string {
76
+ return JSON.stringify(Dashboard$outboundSchema.parse(dashboard));
77
+ }
78
+
79
+ export function dashboardFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<Dashboard, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => Dashboard$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'Dashboard' from JSON`,
86
+ );
87
+ }
@@ -30,6 +30,7 @@ export * from "./custommessageresponse.js";
30
30
  export * from "./custommessageupdaterequest.js";
31
31
  export * from "./daochanneltargetagent.js";
32
32
  export * from "./daocustommessagerule.js";
33
+ export * from "./dashboard.js";
33
34
  export * from "./dayofweek.js";
34
35
  export * from "./directoryextension.js";
35
36
  export * from "./directorymember.js";
@@ -19,6 +19,12 @@ import {
19
19
  export type ToolParameterDefault = {
20
20
  /**
21
21
  * A transform to be applied to the value of a parameter.
22
+ *
23
+ * @remarks
24
+ *
25
+ * Either `value` or `format` must be set:
26
+ * - `value` is any arbitrary value: string, list or dictionary.
27
+ * - `format` is a string composed of other parameters or context variables.
22
28
  */
23
29
  transform: ToolParameterTransform;
24
30
  };
@@ -29,16 +29,26 @@ export type Action = ClosedEnum<typeof Action>;
29
29
 
30
30
  /**
31
31
  * A transform to be applied to the value of a parameter.
32
+ *
33
+ * @remarks
34
+ *
35
+ * Either `value` or `format` must be set:
36
+ * - `value` is any arbitrary value: string, list or dictionary.
37
+ * - `format` is a string composed of other parameters or context variables.
32
38
  */
33
39
  export type ToolParameterTransform = {
40
+ /**
41
+ * The action to perform on the value: `default` means only set the value (using the `format` field) if the parameter doesn't exist or is empty, `override` means always set the value, and `remove` means remove the parameter value.
42
+ */
43
+ action?: Action | undefined;
34
44
  /**
35
45
  * Only apply the transform if the condition is met.
36
46
  */
37
47
  when?: ToolParameterTransformCondition | null | undefined;
38
48
  /**
39
- * The action to perform on the value: `default` means only set the value (using the `format` field) if the parameter doesn't exist or is empty, `override` means always set the value, and `remove` means remove the parameter value.
49
+ * The default value to use for the parameter.
40
50
  */
41
- action?: Action | undefined;
51
+ value?: any | null | undefined;
42
52
  /**
43
53
  * The string value to use for the parameter. The value will be evaluated with the Python `str.format` method, for example, `Hello, {name}!`
44
54
  */
@@ -70,15 +80,17 @@ export const ToolParameterTransform$inboundSchema: z.ZodType<
70
80
  z.ZodTypeDef,
71
81
  unknown
72
82
  > = z.object({
73
- when: z.nullable(ToolParameterTransformCondition$inboundSchema).optional(),
74
83
  action: Action$inboundSchema.default("default"),
84
+ when: z.nullable(ToolParameterTransformCondition$inboundSchema).optional(),
85
+ value: z.nullable(z.any()).optional(),
75
86
  format: z.nullable(z.string()).optional(),
76
87
  });
77
88
 
78
89
  /** @internal */
79
90
  export type ToolParameterTransform$Outbound = {
80
- when?: ToolParameterTransformCondition$Outbound | null | undefined;
81
91
  action: string;
92
+ when?: ToolParameterTransformCondition$Outbound | null | undefined;
93
+ value?: any | null | undefined;
82
94
  format?: string | null | undefined;
83
95
  };
84
96
 
@@ -88,8 +100,9 @@ export const ToolParameterTransform$outboundSchema: z.ZodType<
88
100
  z.ZodTypeDef,
89
101
  ToolParameterTransform
90
102
  > = z.object({
91
- when: z.nullable(ToolParameterTransformCondition$outboundSchema).optional(),
92
103
  action: Action$outboundSchema.default("default"),
104
+ when: z.nullable(ToolParameterTransformCondition$outboundSchema).optional(),
105
+ value: z.nullable(z.any()).optional(),
93
106
  format: z.nullable(z.string()).optional(),
94
107
  });
95
108
 
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { dashboardsPostSessionEventsDashboard } from "../funcs/dashboardsPostSessionEventsDashboard.js";
6
+ import { dashboardsPostSessionsDashboard } from "../funcs/dashboardsPostSessionsDashboard.js";
7
+ import { dashboardsPostSessionSummaryDashboard } from "../funcs/dashboardsPostSessionSummaryDashboard.js";
8
+ import { dashboardsPostSessionTransfersDashboard } from "../funcs/dashboardsPostSessionTransfersDashboard.js";
9
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
10
+ import * as components from "../models/components/index.js";
11
+ import { unwrapAsync } from "../types/fp.js";
12
+
13
+ export class Dashboards extends ClientSDK {
14
+ /**
15
+ * Post Session Events
16
+ *
17
+ * @remarks
18
+ * METHOD: POST
19
+ * URL: /dashboard/session_events
20
+ * ARGUMENTS: None
21
+ * RETURNS: Dashboard info for embedding
22
+ */
23
+ async postSessionEventsDashboard(
24
+ options?: RequestOptions,
25
+ ): Promise<components.Dashboard> {
26
+ return unwrapAsync(dashboardsPostSessionEventsDashboard(
27
+ this,
28
+ options,
29
+ ));
30
+ }
31
+
32
+ /**
33
+ * Post Session Summary
34
+ *
35
+ * @remarks
36
+ * METHOD: POST
37
+ * URL: /dashboard/session_summary
38
+ * ARGUMENTS: None
39
+ * RETURNS: Dashboard info for embedding
40
+ */
41
+ async postSessionSummaryDashboard(
42
+ options?: RequestOptions,
43
+ ): Promise<components.Dashboard> {
44
+ return unwrapAsync(dashboardsPostSessionSummaryDashboard(
45
+ this,
46
+ options,
47
+ ));
48
+ }
49
+
50
+ /**
51
+ * Post Session Transfers
52
+ *
53
+ * @remarks
54
+ * METHOD: POST
55
+ * URL: /dashboard/session_transfers
56
+ * ARGUMENTS: None
57
+ * RETURNS: Dashboard info for embedding
58
+ */
59
+ async postSessionTransfersDashboard(
60
+ options?: RequestOptions,
61
+ ): Promise<components.Dashboard> {
62
+ return unwrapAsync(dashboardsPostSessionTransfersDashboard(
63
+ this,
64
+ options,
65
+ ));
66
+ }
67
+
68
+ /**
69
+ * Post Sessions
70
+ *
71
+ * @remarks
72
+ * METHOD: POST
73
+ * URL: /dashboard/sessions
74
+ * ARGUMENTS: None
75
+ * RETURNS: Dashboard info for embedding
76
+ */
77
+ async postSessionsDashboard(
78
+ options?: RequestOptions,
79
+ ): Promise<components.Dashboard> {
80
+ return unwrapAsync(dashboardsPostSessionsDashboard(
81
+ this,
82
+ options,
83
+ ));
84
+ }
85
+ }
package/src/sdk/sdk.ts CHANGED
@@ -7,6 +7,7 @@ import { Agents } from "./agents.js";
7
7
  import { Channels } from "./channels.js";
8
8
  import { Conversations } from "./conversations.js";
9
9
  import { CustomMessages } from "./custommessages.js";
10
+ import { Dashboards } from "./dashboards.js";
10
11
  import { Directory } from "./directory.js";
11
12
  import { Events } from "./events.js";
12
13
  import { Prompts } from "./prompts.js";
@@ -14,6 +15,7 @@ import { Services } from "./services.js";
14
15
  import { SessionLabels } from "./sessionlabels.js";
15
16
  import { Sessions } from "./sessions.js";
16
17
  import { Tools } from "./tools.js";
18
+ import { V1 } from "./v1.js";
17
19
 
18
20
  export class SyllableSDK extends ClientSDK {
19
21
  private _agents?: Agents;
@@ -70,4 +72,14 @@ export class SyllableSDK extends ClientSDK {
70
72
  get directory(): Directory {
71
73
  return (this._directory ??= new Directory(this._options));
72
74
  }
75
+
76
+ private _dashboards?: Dashboards;
77
+ get dashboards(): Dashboards {
78
+ return (this._dashboards ??= new Dashboards(this._options));
79
+ }
80
+
81
+ private _v1?: V1;
82
+ get v1(): V1 {
83
+ return (this._v1 ??= new V1(this._options));
84
+ }
73
85
  }