syllable-sdk 1.0.1 → 1.0.2-rc.2
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 +8 -0
- package/bin/mcp-server.js +563 -84
- package/bin/mcp-server.js.map +20 -7
- package/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/pronunciations/README.md +277 -1
- package/docs/sdks/workflows/README.md +8 -8
- package/examples/package-lock.json +1 -1
- package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts +13 -0
- package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
- package/funcs/pronunciationsPronunciationsDeleteCsv.js +101 -0
- package/funcs/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
- package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts +13 -0
- package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
- package/funcs/pronunciationsPronunciationsDownloadCsv.js +101 -0
- package/funcs/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
- package/funcs/pronunciationsPronunciationsGet.d.ts +14 -0
- package/funcs/pronunciationsPronunciationsGet.d.ts.map +1 -0
- package/funcs/pronunciationsPronunciationsGet.js +101 -0
- package/funcs/pronunciationsPronunciationsGet.js.map +1 -0
- package/funcs/pronunciationsPronunciationsGetMetadata.d.ts +14 -0
- package/funcs/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
- package/funcs/pronunciationsPronunciationsGetMetadata.js +101 -0
- package/funcs/pronunciationsPronunciationsGetMetadata.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +9 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts +3 -0
- package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js +23 -0
- package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts +3 -0
- package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js +23 -0
- package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts +3 -0
- package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsGet.js +24 -0
- package/mcp-server/tools/pronunciationsPronunciationsGet.js.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts +3 -0
- package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
- package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js +24 -0
- package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js.map +1 -0
- package/models/components/dictionarymetadata.d.ts +36 -0
- package/models/components/dictionarymetadata.d.ts.map +1 -0
- package/models/components/dictionarymetadata.js +73 -0
- package/models/components/dictionarymetadata.js.map +1 -0
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/matchtype.d.ts +31 -0
- package/models/components/matchtype.d.ts.map +1 -0
- package/models/components/matchtype.js +63 -0
- package/models/components/matchtype.js.map +1 -0
- package/models/components/pronunciationoverride.d.ts +73 -0
- package/models/components/pronunciationoverride.d.ts.map +1 -0
- package/models/components/pronunciationoverride.js +120 -0
- package/models/components/pronunciationoverride.js.map +1 -0
- package/models/components/pronunciationoverridesdictionary.d.ts +68 -0
- package/models/components/pronunciationoverridesdictionary.d.ts.map +1 -0
- package/models/components/pronunciationoverridesdictionary.js +78 -0
- package/models/components/pronunciationoverridesdictionary.js.map +1 -0
- package/models/components/voicedisplayinfo.d.ts +34 -0
- package/models/components/voicedisplayinfo.d.ts.map +1 -0
- package/models/components/voicedisplayinfo.js +80 -0
- package/models/components/voicedisplayinfo.js.map +1 -0
- package/openapi.json +301 -33
- package/package.json +1 -1
- package/sdk/pronunciations.d.ts +16 -0
- package/sdk/pronunciations.d.ts.map +1 -1
- package/sdk/pronunciations.js +28 -0
- package/sdk/pronunciations.js.map +1 -1
- package/src/funcs/pronunciationsPronunciationsDeleteCsv.ts +139 -0
- package/src/funcs/pronunciationsPronunciationsDownloadCsv.ts +139 -0
- package/src/funcs/pronunciationsPronunciationsGet.ts +139 -0
- package/src/funcs/pronunciationsPronunciationsGetMetadata.ts +139 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.ts +26 -0
- package/src/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.ts +26 -0
- package/src/mcp-server/tools/pronunciationsPronunciationsGet.ts +28 -0
- package/src/mcp-server/tools/pronunciationsPronunciationsGetMetadata.ts +28 -0
- package/src/models/components/dictionarymetadata.ts +77 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/components/matchtype.ts +36 -0
- package/src/models/components/pronunciationoverride.ts +166 -0
- package/src/models/components/pronunciationoverridesdictionary.ts +124 -0
- package/src/models/components/voicedisplayinfo.ts +82 -0
- package/src/sdk/pronunciations.ts +52 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { SyllableSDKCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.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 {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
22
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Delete Pronunciations Dictionary
|
|
27
|
+
*/
|
|
28
|
+
export function pronunciationsPronunciationsDeleteCsv(
|
|
29
|
+
client: SyllableSDKCore,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
void,
|
|
34
|
+
| SyllableSDKError
|
|
35
|
+
| ResponseValidationError
|
|
36
|
+
| ConnectionError
|
|
37
|
+
| RequestAbortedError
|
|
38
|
+
| RequestTimeoutError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| UnexpectedClientError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
return new APIPromise($do(
|
|
45
|
+
client,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function $do(
|
|
51
|
+
client: SyllableSDKCore,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<
|
|
54
|
+
[
|
|
55
|
+
Result<
|
|
56
|
+
void,
|
|
57
|
+
| SyllableSDKError
|
|
58
|
+
| ResponseValidationError
|
|
59
|
+
| ConnectionError
|
|
60
|
+
| RequestAbortedError
|
|
61
|
+
| RequestTimeoutError
|
|
62
|
+
| InvalidRequestError
|
|
63
|
+
| UnexpectedClientError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
>,
|
|
66
|
+
APICall,
|
|
67
|
+
]
|
|
68
|
+
> {
|
|
69
|
+
const path = pathToFunc("/api/v1/pronunciations/csv")();
|
|
70
|
+
|
|
71
|
+
const headers = new Headers(compactMap({
|
|
72
|
+
Accept: "*/*",
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
76
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
77
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
+
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "pronunciations_delete_csv",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.apiKeyHeader,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "DELETE",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
userAgent: client._options.userAgent,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return [requestRes, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return [doResult, { status: "request-error", request: req }];
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
void,
|
|
121
|
+
| SyllableSDKError
|
|
122
|
+
| ResponseValidationError
|
|
123
|
+
| ConnectionError
|
|
124
|
+
| RequestAbortedError
|
|
125
|
+
| RequestTimeoutError
|
|
126
|
+
| InvalidRequestError
|
|
127
|
+
| UnexpectedClientError
|
|
128
|
+
| SDKValidationError
|
|
129
|
+
>(
|
|
130
|
+
M.nil(204, z.void()),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response, req);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return [result, { status: "complete", request: req, response }];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { SyllableSDKCore } from "../core.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.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 {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
22
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Download Pronunciations Csv
|
|
27
|
+
*/
|
|
28
|
+
export function pronunciationsPronunciationsDownloadCsv(
|
|
29
|
+
client: SyllableSDKCore,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
void,
|
|
34
|
+
| SyllableSDKError
|
|
35
|
+
| ResponseValidationError
|
|
36
|
+
| ConnectionError
|
|
37
|
+
| RequestAbortedError
|
|
38
|
+
| RequestTimeoutError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| UnexpectedClientError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
return new APIPromise($do(
|
|
45
|
+
client,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function $do(
|
|
51
|
+
client: SyllableSDKCore,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<
|
|
54
|
+
[
|
|
55
|
+
Result<
|
|
56
|
+
void,
|
|
57
|
+
| SyllableSDKError
|
|
58
|
+
| ResponseValidationError
|
|
59
|
+
| ConnectionError
|
|
60
|
+
| RequestAbortedError
|
|
61
|
+
| RequestTimeoutError
|
|
62
|
+
| InvalidRequestError
|
|
63
|
+
| UnexpectedClientError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
>,
|
|
66
|
+
APICall,
|
|
67
|
+
]
|
|
68
|
+
> {
|
|
69
|
+
const path = pathToFunc("/api/v1/pronunciations/csv")();
|
|
70
|
+
|
|
71
|
+
const headers = new Headers(compactMap({
|
|
72
|
+
Accept: "*/*",
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
76
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
77
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
+
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "pronunciations_download_csv",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.apiKeyHeader,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "GET",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
userAgent: client._options.userAgent,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return [requestRes, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return [doResult, { status: "request-error", request: req }];
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
void,
|
|
121
|
+
| SyllableSDKError
|
|
122
|
+
| ResponseValidationError
|
|
123
|
+
| ConnectionError
|
|
124
|
+
| RequestAbortedError
|
|
125
|
+
| RequestTimeoutError
|
|
126
|
+
| InvalidRequestError
|
|
127
|
+
| UnexpectedClientError
|
|
128
|
+
| SDKValidationError
|
|
129
|
+
>(
|
|
130
|
+
M.nil(200, z.void()),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response, req);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return [result, { status: "complete", request: req, response }];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as components from "../models/components/index.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
22
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get Pronunciations Dictionary
|
|
27
|
+
*/
|
|
28
|
+
export function pronunciationsPronunciationsGet(
|
|
29
|
+
client: SyllableSDKCore,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
components.PronunciationOverridesDictionary,
|
|
34
|
+
| SyllableSDKError
|
|
35
|
+
| ResponseValidationError
|
|
36
|
+
| ConnectionError
|
|
37
|
+
| RequestAbortedError
|
|
38
|
+
| RequestTimeoutError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| UnexpectedClientError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
return new APIPromise($do(
|
|
45
|
+
client,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function $do(
|
|
51
|
+
client: SyllableSDKCore,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<
|
|
54
|
+
[
|
|
55
|
+
Result<
|
|
56
|
+
components.PronunciationOverridesDictionary,
|
|
57
|
+
| SyllableSDKError
|
|
58
|
+
| ResponseValidationError
|
|
59
|
+
| ConnectionError
|
|
60
|
+
| RequestAbortedError
|
|
61
|
+
| RequestTimeoutError
|
|
62
|
+
| InvalidRequestError
|
|
63
|
+
| UnexpectedClientError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
>,
|
|
66
|
+
APICall,
|
|
67
|
+
]
|
|
68
|
+
> {
|
|
69
|
+
const path = pathToFunc("/api/v1/pronunciations")();
|
|
70
|
+
|
|
71
|
+
const headers = new Headers(compactMap({
|
|
72
|
+
Accept: "application/json",
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
76
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
77
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
+
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "pronunciations_get",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.apiKeyHeader,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "GET",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
userAgent: client._options.userAgent,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return [requestRes, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return [doResult, { status: "request-error", request: req }];
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
components.PronunciationOverridesDictionary,
|
|
121
|
+
| SyllableSDKError
|
|
122
|
+
| ResponseValidationError
|
|
123
|
+
| ConnectionError
|
|
124
|
+
| RequestAbortedError
|
|
125
|
+
| RequestTimeoutError
|
|
126
|
+
| InvalidRequestError
|
|
127
|
+
| UnexpectedClientError
|
|
128
|
+
| SDKValidationError
|
|
129
|
+
>(
|
|
130
|
+
M.json(200, components.PronunciationOverridesDictionary$inboundSchema),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response, req);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return [result, { status: "complete", request: req, response }];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import * as components from "../models/components/index.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../models/errors/httpclienterrors.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
|
|
22
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get Pronunciations Metadata
|
|
27
|
+
*/
|
|
28
|
+
export function pronunciationsPronunciationsGetMetadata(
|
|
29
|
+
client: SyllableSDKCore,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<
|
|
32
|
+
Result<
|
|
33
|
+
components.DictionaryMetadata,
|
|
34
|
+
| SyllableSDKError
|
|
35
|
+
| ResponseValidationError
|
|
36
|
+
| ConnectionError
|
|
37
|
+
| RequestAbortedError
|
|
38
|
+
| RequestTimeoutError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| UnexpectedClientError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
return new APIPromise($do(
|
|
45
|
+
client,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async function $do(
|
|
51
|
+
client: SyllableSDKCore,
|
|
52
|
+
options?: RequestOptions,
|
|
53
|
+
): Promise<
|
|
54
|
+
[
|
|
55
|
+
Result<
|
|
56
|
+
components.DictionaryMetadata,
|
|
57
|
+
| SyllableSDKError
|
|
58
|
+
| ResponseValidationError
|
|
59
|
+
| ConnectionError
|
|
60
|
+
| RequestAbortedError
|
|
61
|
+
| RequestTimeoutError
|
|
62
|
+
| InvalidRequestError
|
|
63
|
+
| UnexpectedClientError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
>,
|
|
66
|
+
APICall,
|
|
67
|
+
]
|
|
68
|
+
> {
|
|
69
|
+
const path = pathToFunc("/api/v1/pronunciations/metadata")();
|
|
70
|
+
|
|
71
|
+
const headers = new Headers(compactMap({
|
|
72
|
+
Accept: "application/json",
|
|
73
|
+
}));
|
|
74
|
+
|
|
75
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
76
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
77
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
78
|
+
|
|
79
|
+
const context = {
|
|
80
|
+
options: client._options,
|
|
81
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
82
|
+
operationID: "pronunciations_get_metadata",
|
|
83
|
+
oAuth2Scopes: null,
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.apiKeyHeader,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "GET",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
userAgent: client._options.userAgent,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return [requestRes, { status: "invalid" }];
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return [doResult, { status: "request-error", request: req }];
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
components.DictionaryMetadata,
|
|
121
|
+
| SyllableSDKError
|
|
122
|
+
| ResponseValidationError
|
|
123
|
+
| ConnectionError
|
|
124
|
+
| RequestAbortedError
|
|
125
|
+
| RequestTimeoutError
|
|
126
|
+
| InvalidRequestError
|
|
127
|
+
| UnexpectedClientError
|
|
128
|
+
| SDKValidationError
|
|
129
|
+
>(
|
|
130
|
+
M.json(200, components.DictionaryMetadata$inboundSchema),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response, req);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return [result, { status: "complete", request: req, response }];
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return [result, { status: "complete", request: req, response }];
|
|
139
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -61,7 +61,7 @@ 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: "1.0.
|
|
65
|
-
genVersion: "2.723.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 1.0.
|
|
64
|
+
sdkVersion: "1.0.2-rc.2",
|
|
65
|
+
genVersion: "2.723.8",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 1.0.2-rc.2 2.723.8 0.0.2 syllable-sdk",
|
|
67
67
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -115,6 +115,10 @@ import { tool$promptsList } from "./tools/promptsList.js";
|
|
|
115
115
|
import { tool$promptsPromptGetSupportedLlms } from "./tools/promptsPromptGetSupportedLlms.js";
|
|
116
116
|
import { tool$promptsPromptsHistory } from "./tools/promptsPromptsHistory.js";
|
|
117
117
|
import { tool$promptsUpdate } from "./tools/promptsUpdate.js";
|
|
118
|
+
import { tool$pronunciationsPronunciationsDeleteCsv } from "./tools/pronunciationsPronunciationsDeleteCsv.js";
|
|
119
|
+
import { tool$pronunciationsPronunciationsDownloadCsv } from "./tools/pronunciationsPronunciationsDownloadCsv.js";
|
|
120
|
+
import { tool$pronunciationsPronunciationsGet } from "./tools/pronunciationsPronunciationsGet.js";
|
|
121
|
+
import { tool$pronunciationsPronunciationsGetMetadata } from "./tools/pronunciationsPronunciationsGetMetadata.js";
|
|
118
122
|
import { tool$pronunciationsPronunciationsUploadCsv } from "./tools/pronunciationsPronunciationsUploadCsv.js";
|
|
119
123
|
import { tool$rolesCreate } from "./tools/rolesCreate.js";
|
|
120
124
|
import { tool$rolesDelete } from "./tools/rolesDelete.js";
|
|
@@ -165,7 +169,7 @@ export function createMCPServer(deps: {
|
|
|
165
169
|
}) {
|
|
166
170
|
const server = new McpServer({
|
|
167
171
|
name: "SyllableSDK",
|
|
168
|
-
version: "1.0.
|
|
172
|
+
version: "1.0.2-rc.2",
|
|
169
173
|
});
|
|
170
174
|
|
|
171
175
|
const client = new SyllableSDKCore({
|
|
@@ -232,7 +236,11 @@ export function createMCPServer(deps: {
|
|
|
232
236
|
tool(tool$promptsDelete);
|
|
233
237
|
tool(tool$promptsPromptsHistory);
|
|
234
238
|
tool(tool$promptsPromptGetSupportedLlms);
|
|
239
|
+
tool(tool$pronunciationsPronunciationsGet);
|
|
240
|
+
tool(tool$pronunciationsPronunciationsGetMetadata);
|
|
241
|
+
tool(tool$pronunciationsPronunciationsDownloadCsv);
|
|
235
242
|
tool(tool$pronunciationsPronunciationsUploadCsv);
|
|
243
|
+
tool(tool$pronunciationsPronunciationsDeleteCsv);
|
|
236
244
|
tool(tool$rolesList);
|
|
237
245
|
tool(tool$rolesCreate);
|
|
238
246
|
tool(tool$rolesUpdate);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { pronunciationsPronunciationsDeleteCsv } from "../../funcs/pronunciationsPronunciationsDeleteCsv.js";
|
|
6
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
|
+
|
|
8
|
+
export const tool$pronunciationsPronunciationsDeleteCsv: ToolDefinition = {
|
|
9
|
+
name: "pronunciations-pronunciations-delete-csv",
|
|
10
|
+
description: `Delete Pronunciations Dictionary`,
|
|
11
|
+
tool: async (client, ctx) => {
|
|
12
|
+
const [result, apiCall] = await pronunciationsPronunciationsDeleteCsv(
|
|
13
|
+
client,
|
|
14
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
15
|
+
).$inspect();
|
|
16
|
+
|
|
17
|
+
if (!result.ok) {
|
|
18
|
+
return {
|
|
19
|
+
content: [{ type: "text", text: result.error.message }],
|
|
20
|
+
isError: true,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return formatResult(void 0, apiCall);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { pronunciationsPronunciationsDownloadCsv } from "../../funcs/pronunciationsPronunciationsDownloadCsv.js";
|
|
6
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
|
+
|
|
8
|
+
export const tool$pronunciationsPronunciationsDownloadCsv: ToolDefinition = {
|
|
9
|
+
name: "pronunciations-pronunciations-download-csv",
|
|
10
|
+
description: `Download Pronunciations Csv`,
|
|
11
|
+
tool: async (client, ctx) => {
|
|
12
|
+
const [result, apiCall] = await pronunciationsPronunciationsDownloadCsv(
|
|
13
|
+
client,
|
|
14
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
15
|
+
).$inspect();
|
|
16
|
+
|
|
17
|
+
if (!result.ok) {
|
|
18
|
+
return {
|
|
19
|
+
content: [{ type: "text", text: result.error.message }],
|
|
20
|
+
isError: true,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return formatResult(void 0, apiCall);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { pronunciationsPronunciationsGet } from "../../funcs/pronunciationsPronunciationsGet.js";
|
|
6
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
7
|
+
|
|
8
|
+
export const tool$pronunciationsPronunciationsGet: ToolDefinition = {
|
|
9
|
+
name: "pronunciations-pronunciations-get",
|
|
10
|
+
description: `Get Pronunciations Dictionary`,
|
|
11
|
+
tool: async (client, ctx) => {
|
|
12
|
+
const [result, apiCall] = await pronunciationsPronunciationsGet(
|
|
13
|
+
client,
|
|
14
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
15
|
+
).$inspect();
|
|
16
|
+
|
|
17
|
+
if (!result.ok) {
|
|
18
|
+
return {
|
|
19
|
+
content: [{ type: "text", text: result.error.message }],
|
|
20
|
+
isError: true,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const value = result.value;
|
|
25
|
+
|
|
26
|
+
return formatResult(value, apiCall);
|
|
27
|
+
},
|
|
28
|
+
};
|