syllable-sdk 0.1.0-alpha.27 → 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.
- package/README.md +22 -0
- package/RUNTIMES.md +27 -1
- package/docs/sdks/dashboards/README.md +309 -0
- package/docs/sdks/tools/README.md +36 -0
- package/docs/sdks/v1/README.md +307 -0
- package/funcs/agentsAgentGetAvailableVoices.js +4 -4
- package/funcs/agentsAgentGetAvailableVoices.js.map +1 -1
- package/funcs/agentsCreate.js +4 -4
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsDelete.js +4 -4
- package/funcs/agentsDelete.js.map +1 -1
- package/funcs/agentsGetById.js +4 -4
- package/funcs/agentsGetById.js.map +1 -1
- package/funcs/agentsList.js +4 -4
- package/funcs/agentsList.js.map +1 -1
- package/funcs/agentsTestSendTestMessage.js +4 -4
- package/funcs/agentsTestSendTestMessage.js.map +1 -1
- package/funcs/agentsUpdate.js +4 -4
- package/funcs/agentsUpdate.js.map +1 -1
- package/funcs/channelsDelete.js +4 -4
- package/funcs/channelsDelete.js.map +1 -1
- package/funcs/channelsList.js +4 -4
- package/funcs/channelsList.js.map +1 -1
- package/funcs/channelsTargetsAvailableTargets.js +4 -4
- package/funcs/channelsTargetsAvailableTargets.js.map +1 -1
- package/funcs/channelsTargetsCreate.js +4 -4
- package/funcs/channelsTargetsCreate.js.map +1 -1
- package/funcs/channelsTargetsGetById.js +4 -4
- package/funcs/channelsTargetsGetById.js.map +1 -1
- package/funcs/channelsTargetsList.js +4 -4
- package/funcs/channelsTargetsList.js.map +1 -1
- package/funcs/channelsTargetsUpdate.js +4 -4
- package/funcs/channelsTargetsUpdate.js.map +1 -1
- package/funcs/conversationsList.js +4 -4
- package/funcs/conversationsList.js.map +1 -1
- package/funcs/customMessagesCreate.js +4 -4
- package/funcs/customMessagesCreate.js.map +1 -1
- package/funcs/customMessagesDelete.js +4 -4
- package/funcs/customMessagesDelete.js.map +1 -1
- package/funcs/customMessagesGetById.js +4 -4
- package/funcs/customMessagesGetById.js.map +1 -1
- package/funcs/customMessagesList.js +4 -4
- package/funcs/customMessagesList.js.map +1 -1
- package/funcs/customMessagesUpdate.js +4 -4
- package/funcs/customMessagesUpdate.js.map +1 -1
- package/funcs/dashboardsPostSessionEventsDashboard.d.ts +18 -0
- package/funcs/dashboardsPostSessionEventsDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostSessionEventsDashboard.js +89 -0
- package/funcs/dashboardsPostSessionEventsDashboard.js.map +1 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.d.ts +18 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.js +89 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.js.map +1 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.d.ts +18 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.js +89 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.js.map +1 -0
- package/funcs/dashboardsPostSessionsDashboard.d.ts +18 -0
- package/funcs/dashboardsPostSessionsDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostSessionsDashboard.js +89 -0
- package/funcs/dashboardsPostSessionsDashboard.js.map +1 -0
- package/funcs/directoryCreate.js +4 -4
- package/funcs/directoryCreate.js.map +1 -1
- package/funcs/directoryDelete.js +4 -4
- package/funcs/directoryDelete.js.map +1 -1
- package/funcs/directoryDirectoryMemberBulkLoad.js +4 -4
- package/funcs/directoryDirectoryMemberBulkLoad.js.map +1 -1
- package/funcs/directoryDirectoryMemberDownload.js +4 -4
- package/funcs/directoryDirectoryMemberDownload.js.map +1 -1
- package/funcs/directoryGetById.js +4 -4
- package/funcs/directoryGetById.js.map +1 -1
- package/funcs/directoryList.js +4 -4
- package/funcs/directoryList.js.map +1 -1
- package/funcs/directoryUpdate.js +4 -4
- package/funcs/directoryUpdate.js.map +1 -1
- package/funcs/eventsList.js +4 -4
- package/funcs/eventsList.js.map +1 -1
- package/funcs/promptsCreate.js +4 -4
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsDelete.js +4 -4
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetById.js +4 -4
- package/funcs/promptsGetById.js.map +1 -1
- package/funcs/promptsList.js +4 -4
- package/funcs/promptsList.js.map +1 -1
- package/funcs/promptsPromptsHistory.js +4 -4
- package/funcs/promptsPromptsHistory.js.map +1 -1
- package/funcs/promptsUpdate.js +4 -4
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/servicesCreate.js +4 -4
- package/funcs/servicesCreate.js.map +1 -1
- package/funcs/servicesList.js +4 -4
- package/funcs/servicesList.js.map +1 -1
- package/funcs/servicesUpdate.js +4 -4
- package/funcs/servicesUpdate.js.map +1 -1
- package/funcs/sessionLabelsCreate.js +4 -4
- package/funcs/sessionLabelsCreate.js.map +1 -1
- package/funcs/sessionLabelsGetById.js +4 -4
- package/funcs/sessionLabelsGetById.js.map +1 -1
- package/funcs/sessionLabelsList.js +4 -4
- package/funcs/sessionLabelsList.js.map +1 -1
- package/funcs/sessionsGenerateSessionRecordingUrls.js +4 -4
- package/funcs/sessionsGenerateSessionRecordingUrls.js.map +1 -1
- package/funcs/sessionsGetById.js +4 -4
- package/funcs/sessionsGetById.js.map +1 -1
- package/funcs/sessionsList.js +4 -4
- package/funcs/sessionsList.js.map +1 -1
- package/funcs/sessionsSessionRecordingStream.js +4 -4
- package/funcs/sessionsSessionRecordingStream.js.map +1 -1
- package/funcs/sessionsTranscriptGetById.js +4 -4
- package/funcs/sessionsTranscriptGetById.js.map +1 -1
- package/funcs/toolsCreate.js +4 -4
- package/funcs/toolsCreate.js.map +1 -1
- package/funcs/toolsGetByName.js +4 -4
- package/funcs/toolsGetByName.js.map +1 -1
- package/funcs/toolsList.js +4 -4
- package/funcs/toolsList.js.map +1 -1
- package/funcs/toolsUpdate.js +4 -4
- package/funcs/toolsUpdate.js.map +1 -1
- package/funcs/v1PostSessionEventsDashboard.d.ts +18 -0
- package/funcs/v1PostSessionEventsDashboard.d.ts.map +1 -0
- package/funcs/v1PostSessionEventsDashboard.js +89 -0
- package/funcs/v1PostSessionEventsDashboard.js.map +1 -0
- package/funcs/v1PostSessionSummaryDashboard.d.ts +18 -0
- package/funcs/v1PostSessionSummaryDashboard.d.ts.map +1 -0
- package/funcs/v1PostSessionSummaryDashboard.js +89 -0
- package/funcs/v1PostSessionSummaryDashboard.js.map +1 -0
- package/funcs/v1PostSessionTransfersDashboard.d.ts +18 -0
- package/funcs/v1PostSessionTransfersDashboard.d.ts.map +1 -0
- package/funcs/v1PostSessionTransfersDashboard.js +89 -0
- package/funcs/v1PostSessionTransfersDashboard.js.map +1 -0
- package/funcs/v1PostSessionsDashboard.d.ts +18 -0
- package/funcs/v1PostSessionsDashboard.d.ts.map +1 -0
- package/funcs/v1PostSessionsDashboard.js +89 -0
- package/funcs/v1PostSessionsDashboard.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +4 -5
- package/lib/config.js.map +1 -1
- package/lib/encodings.js +18 -19
- package/lib/encodings.js.map +1 -1
- package/lib/env.js +1 -2
- package/lib/env.js.map +1 -1
- package/lib/http.js +1 -2
- package/lib/http.js.map +1 -1
- package/lib/matchers.js +5 -6
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.js +1 -1
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +3 -4
- package/lib/retries.js.map +1 -1
- package/lib/sdks.js +15 -16
- package/lib/sdks.js.map +1 -1
- package/lib/security.js +2 -3
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/lib/url.js.map +1 -1
- package/mintlify/scripts/create-md-script.js +46 -0
- package/mintlify/scripts/generate-mintlify-sdk-docs.js +117 -0
- package/models/components/channel.d.ts +0 -3
- package/models/components/channel.d.ts.map +1 -1
- package/models/components/channel.js.map +1 -1
- package/models/components/channeltarget.d.ts +16 -16
- package/models/components/channeltarget.d.ts.map +1 -1
- package/models/components/channeltarget.js +16 -16
- package/models/components/channeltarget.js.map +1 -1
- package/models/components/channeltargetcreaterequest.d.ts +12 -12
- package/models/components/channeltargetcreaterequest.d.ts.map +1 -1
- package/models/components/channeltargetcreaterequest.js +12 -12
- package/models/components/channeltargetcreaterequest.js.map +1 -1
- package/models/components/channeltargetproperties.d.ts +3 -0
- package/models/components/channeltargetproperties.d.ts.map +1 -1
- package/models/components/channeltargetproperties.js +1 -0
- package/models/components/channeltargetproperties.js.map +1 -1
- package/models/components/channeltargetupdaterequest.d.ts +12 -12
- package/models/components/channeltargetupdaterequest.d.ts.map +1 -1
- package/models/components/channeltargetupdaterequest.js +12 -12
- package/models/components/channeltargetupdaterequest.js.map +1 -1
- package/models/components/dashboard.d.ts +35 -0
- package/models/components/dashboard.d.ts.map +1 -0
- package/models/components/dashboard.js +78 -0
- package/models/components/dashboard.js.map +1 -0
- package/models/components/function.d.ts +74 -0
- package/models/components/function.d.ts.map +1 -0
- package/models/components/function.js +86 -0
- package/models/components/function.js.map +1 -0
- package/models/components/httpendpoint.d.ts +114 -0
- package/models/components/httpendpoint.d.ts.map +1 -0
- package/models/components/httpendpoint.js +119 -0
- package/models/components/httpendpoint.js.map +1 -0
- package/models/components/index.d.ts +9 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -0
- package/models/components/index.js.map +1 -1
- package/models/components/llmconfig.d.ts +3 -34
- package/models/components/llmconfig.d.ts.map +1 -1
- package/models/components/llmconfig.js +4 -26
- package/models/components/llmconfig.js.map +1 -1
- package/models/components/prompt.d.ts +0 -3
- package/models/components/prompt.d.ts.map +1 -1
- package/models/components/prompt.js.map +1 -1
- package/models/components/promptcreate.d.ts +0 -3
- package/models/components/promptcreate.d.ts.map +1 -1
- package/models/components/promptcreate.js.map +1 -1
- package/models/components/promptupdate.d.ts +0 -3
- package/models/components/promptupdate.d.ts.map +1 -1
- package/models/components/promptupdate.js.map +1 -1
- package/models/components/provider.d.ts +34 -0
- package/models/components/provider.d.ts.map +1 -0
- package/models/components/provider.js +54 -0
- package/models/components/provider.js.map +1 -0
- package/models/components/sdkinternaltool.d.ts +46 -0
- package/models/components/sdkinternaltool.d.ts.map +1 -0
- package/models/components/sdkinternaltool.js +62 -0
- package/models/components/sdkinternaltool.js.map +1 -0
- package/models/components/sdktooldefinition.d.ts +161 -0
- package/models/components/sdktooldefinition.d.ts.map +1 -0
- package/models/components/sdktooldefinition.js +175 -0
- package/models/components/sdktooldefinition.js.map +1 -0
- package/models/components/target.d.ts +0 -3
- package/models/components/target.d.ts.map +1 -1
- package/models/components/target.js.map +1 -1
- package/models/components/tool.d.ts +3 -29
- package/models/components/tool.d.ts.map +1 -1
- package/models/components/tool.js +4 -26
- package/models/components/tool.js.map +1 -1
- package/models/components/toolcreate.d.ts +3 -29
- package/models/components/toolcreate.d.ts.map +1 -1
- package/models/components/toolcreate.js +4 -26
- package/models/components/toolcreate.js.map +1 -1
- package/models/components/toolparameterdefault.d.ts +42 -0
- package/models/components/toolparameterdefault.d.ts.map +1 -0
- package/models/components/toolparameterdefault.js +60 -0
- package/models/components/toolparameterdefault.js.map +1 -0
- package/models/components/toolparametertransform.d.ts +92 -0
- package/models/components/toolparametertransform.d.ts.map +1 -0
- package/models/components/toolparametertransform.js +90 -0
- package/models/components/toolparametertransform.js.map +1 -0
- package/models/components/toolparametertransformcondition.d.ts +45 -0
- package/models/components/toolparametertransformcondition.d.ts.map +1 -0
- package/models/components/toolparametertransformcondition.js +63 -0
- package/models/components/toolparametertransformcondition.js.map +1 -0
- package/models/components/toolupdate.d.ts +3 -29
- package/models/components/toolupdate.d.ts.map +1 -1
- package/models/components/toolupdate.js +4 -26
- package/models/components/toolupdate.js.map +1 -1
- package/models/errors/httpclienterrors.js +2 -2
- package/models/errors/httpclienterrors.js.map +1 -1
- package/package.json +1 -1
- package/sdk/agents.js +1 -2
- package/sdk/agents.js.map +1 -1
- package/sdk/channels.js +1 -2
- package/sdk/channels.js.map +1 -1
- package/sdk/dashboards.d.ts +45 -0
- package/sdk/dashboards.d.ts.map +1 -0
- package/sdk/dashboards.js +64 -0
- package/sdk/dashboards.js.map +1 -0
- package/sdk/sdk.d.ts +6 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +19 -22
- package/sdk/sdk.js.map +1 -1
- package/sdk/sessions.js +1 -2
- package/sdk/sessions.js.map +1 -1
- package/sdk/v1.d.ts +45 -0
- package/sdk/v1.d.ts.map +1 -0
- package/sdk/v1.js +64 -0
- package/sdk/v1.js.map +1 -0
- package/src/funcs/dashboardsPostSessionEventsDashboard.ts +111 -0
- package/src/funcs/dashboardsPostSessionSummaryDashboard.ts +111 -0
- package/src/funcs/dashboardsPostSessionTransfersDashboard.ts +111 -0
- package/src/funcs/dashboardsPostSessionsDashboard.ts +111 -0
- package/src/funcs/v1PostSessionEventsDashboard.ts +111 -0
- package/src/funcs/v1PostSessionSummaryDashboard.ts +111 -0
- package/src/funcs/v1PostSessionTransfersDashboard.ts +111 -0
- package/src/funcs/v1PostSessionsDashboard.ts +111 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +1 -1
- package/src/models/components/channel.ts +0 -3
- package/src/models/components/channeltarget.ts +32 -32
- package/src/models/components/channeltargetcreaterequest.ts +24 -24
- package/src/models/components/channeltargetproperties.ts +1 -0
- package/src/models/components/channeltargetupdaterequest.ts +24 -24
- package/src/models/components/dashboard.ts +87 -0
- package/src/models/components/function.ts +136 -0
- package/src/models/components/httpendpoint.ts +158 -0
- package/src/models/components/index.ts +9 -0
- package/src/models/components/llmconfig.ts +9 -36
- package/src/models/components/prompt.ts +0 -3
- package/src/models/components/promptcreate.ts +0 -3
- package/src/models/components/promptupdate.ts +0 -3
- package/src/models/components/provider.ts +37 -0
- package/src/models/components/sdkinternaltool.ts +88 -0
- package/src/models/components/sdktooldefinition.ts +298 -0
- package/src/models/components/target.ts +0 -3
- package/src/models/components/tool.ts +10 -56
- package/src/models/components/toolcreate.ts +10 -60
- package/src/models/components/toolparameterdefault.ts +84 -0
- package/src/models/components/toolparametertransform.ts +138 -0
- package/src/models/components/toolparametertransformcondition.ts +88 -0
- package/src/models/components/toolupdate.ts +10 -60
- package/src/sdk/dashboards.ts +85 -0
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/v1.ts +85 -0
- package/test/sdk/contract/agents.test.ts +113 -0
- package/test/sdk/contract/custommessages.test.ts +109 -0
- package/test/sdk/contract/helper.ts +190 -0
- 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.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.29",
|
|
65
|
+
genVersion: "2.492.3",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.29 2.492.3 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
*/
|
|
20
20
|
export type ChannelTarget = {
|
|
21
21
|
id: number;
|
|
22
|
-
channelId: number
|
|
23
|
-
channelName: string
|
|
24
|
-
agentId: number
|
|
25
|
-
agent: DaoChannelTargetAgent
|
|
26
|
-
target: string
|
|
27
|
-
targetMode: string
|
|
28
|
-
fallbackTarget
|
|
29
|
-
isTest
|
|
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.
|
|
42
|
-
channel_name: z.
|
|
43
|
-
agent_id: z.
|
|
44
|
-
agent:
|
|
45
|
-
target: z.
|
|
46
|
-
target_mode: z.
|
|
47
|
-
fallback_target: z.nullable(z.string()),
|
|
48
|
-
is_test: z.
|
|
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
|
|
70
|
-
channel_name: string
|
|
71
|
-
agent_id: number
|
|
72
|
-
agent: DaoChannelTargetAgent$Outbound
|
|
73
|
-
target: string
|
|
74
|
-
target_mode: string
|
|
75
|
-
fallback_target
|
|
76
|
-
is_test: boolean
|
|
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.
|
|
89
|
-
channelName: z.
|
|
90
|
-
agentId: z.
|
|
91
|
-
agent:
|
|
92
|
-
target: z.
|
|
93
|
-
targetMode: z.
|
|
94
|
-
fallbackTarget: z.nullable(z.string()),
|
|
95
|
-
isTest: z.
|
|
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
|
|
13
|
-
agentId: number
|
|
14
|
-
target: string
|
|
15
|
-
targetMode: string
|
|
16
|
-
fallbackTarget
|
|
17
|
-
isTest
|
|
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.
|
|
27
|
-
agent_id: z.
|
|
28
|
-
target: z.
|
|
29
|
-
target_mode: z.
|
|
30
|
-
fallback_target: z.nullable(z.string()),
|
|
31
|
-
is_test: z.
|
|
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
|
|
45
|
-
agent_id: number
|
|
46
|
-
target: string
|
|
47
|
-
target_mode: string
|
|
48
|
-
fallback_target
|
|
49
|
-
is_test: boolean
|
|
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.
|
|
59
|
-
agentId: z.
|
|
60
|
-
target: z.
|
|
61
|
-
targetMode: z.
|
|
62
|
-
fallbackTarget: z.nullable(z.string()),
|
|
63
|
-
isTest: z.
|
|
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
|
|
14
|
-
agentId: number
|
|
15
|
-
target: string
|
|
16
|
-
targetMode: string
|
|
17
|
-
fallbackTarget
|
|
18
|
-
isTest
|
|
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.
|
|
29
|
-
agent_id: z.
|
|
30
|
-
target: z.
|
|
31
|
-
target_mode: z.
|
|
32
|
-
fallback_target: z.nullable(z.string()),
|
|
33
|
-
is_test: z.
|
|
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
|
|
48
|
-
agent_id: number
|
|
49
|
-
target: string
|
|
50
|
-
target_mode: string
|
|
51
|
-
fallback_target
|
|
52
|
-
is_test: boolean
|
|
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.
|
|
63
|
-
agentId: z.
|
|
64
|
-
target: z.
|
|
65
|
-
targetMode: z.
|
|
66
|
-
fallbackTarget: z.nullable(z.string()),
|
|
67
|
-
isTest: z.
|
|
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",
|