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.
Files changed (96) hide show
  1. package/README.md +8 -0
  2. package/bin/mcp-server.js +563 -84
  3. package/bin/mcp-server.js.map +20 -7
  4. package/docs/sdks/batches/README.md +4 -4
  5. package/docs/sdks/pronunciations/README.md +277 -1
  6. package/docs/sdks/workflows/README.md +8 -8
  7. package/examples/package-lock.json +1 -1
  8. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts +13 -0
  9. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  10. package/funcs/pronunciationsPronunciationsDeleteCsv.js +101 -0
  11. package/funcs/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  12. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts +13 -0
  13. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  14. package/funcs/pronunciationsPronunciationsDownloadCsv.js +101 -0
  15. package/funcs/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  16. package/funcs/pronunciationsPronunciationsGet.d.ts +14 -0
  17. package/funcs/pronunciationsPronunciationsGet.d.ts.map +1 -0
  18. package/funcs/pronunciationsPronunciationsGet.js +101 -0
  19. package/funcs/pronunciationsPronunciationsGet.js.map +1 -0
  20. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts +14 -0
  21. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  22. package/funcs/pronunciationsPronunciationsGetMetadata.js +101 -0
  23. package/funcs/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  24. package/jsr.json +1 -1
  25. package/lib/config.d.ts +3 -3
  26. package/lib/config.js +3 -3
  27. package/lib/config.js.map +1 -1
  28. package/mcp-server/mcp-server.js +1 -1
  29. package/mcp-server/mcp-server.js.map +1 -1
  30. package/mcp-server/server.d.ts.map +1 -1
  31. package/mcp-server/server.js +9 -1
  32. package/mcp-server/server.js.map +1 -1
  33. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts +3 -0
  34. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  35. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js +23 -0
  36. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  37. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts +3 -0
  38. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  39. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js +23 -0
  40. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  41. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts +3 -0
  42. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts.map +1 -0
  43. package/mcp-server/tools/pronunciationsPronunciationsGet.js +24 -0
  44. package/mcp-server/tools/pronunciationsPronunciationsGet.js.map +1 -0
  45. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts +3 -0
  46. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  47. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js +24 -0
  48. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  49. package/models/components/dictionarymetadata.d.ts +36 -0
  50. package/models/components/dictionarymetadata.d.ts.map +1 -0
  51. package/models/components/dictionarymetadata.js +73 -0
  52. package/models/components/dictionarymetadata.js.map +1 -0
  53. package/models/components/index.d.ts +5 -0
  54. package/models/components/index.d.ts.map +1 -1
  55. package/models/components/index.js +5 -0
  56. package/models/components/index.js.map +1 -1
  57. package/models/components/matchtype.d.ts +31 -0
  58. package/models/components/matchtype.d.ts.map +1 -0
  59. package/models/components/matchtype.js +63 -0
  60. package/models/components/matchtype.js.map +1 -0
  61. package/models/components/pronunciationoverride.d.ts +73 -0
  62. package/models/components/pronunciationoverride.d.ts.map +1 -0
  63. package/models/components/pronunciationoverride.js +120 -0
  64. package/models/components/pronunciationoverride.js.map +1 -0
  65. package/models/components/pronunciationoverridesdictionary.d.ts +68 -0
  66. package/models/components/pronunciationoverridesdictionary.d.ts.map +1 -0
  67. package/models/components/pronunciationoverridesdictionary.js +78 -0
  68. package/models/components/pronunciationoverridesdictionary.js.map +1 -0
  69. package/models/components/voicedisplayinfo.d.ts +34 -0
  70. package/models/components/voicedisplayinfo.d.ts.map +1 -0
  71. package/models/components/voicedisplayinfo.js +80 -0
  72. package/models/components/voicedisplayinfo.js.map +1 -0
  73. package/openapi.json +301 -33
  74. package/package.json +1 -1
  75. package/sdk/pronunciations.d.ts +16 -0
  76. package/sdk/pronunciations.d.ts.map +1 -1
  77. package/sdk/pronunciations.js +28 -0
  78. package/sdk/pronunciations.js.map +1 -1
  79. package/src/funcs/pronunciationsPronunciationsDeleteCsv.ts +139 -0
  80. package/src/funcs/pronunciationsPronunciationsDownloadCsv.ts +139 -0
  81. package/src/funcs/pronunciationsPronunciationsGet.ts +139 -0
  82. package/src/funcs/pronunciationsPronunciationsGetMetadata.ts +139 -0
  83. package/src/lib/config.ts +3 -3
  84. package/src/mcp-server/mcp-server.ts +1 -1
  85. package/src/mcp-server/server.ts +9 -1
  86. package/src/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.ts +26 -0
  87. package/src/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.ts +26 -0
  88. package/src/mcp-server/tools/pronunciationsPronunciationsGet.ts +28 -0
  89. package/src/mcp-server/tools/pronunciationsPronunciationsGetMetadata.ts +28 -0
  90. package/src/models/components/dictionarymetadata.ts +77 -0
  91. package/src/models/components/index.ts +5 -0
  92. package/src/models/components/matchtype.ts +36 -0
  93. package/src/models/components/pronunciationoverride.ts +166 -0
  94. package/src/models/components/pronunciationoverridesdictionary.ts +124 -0
  95. package/src/models/components/voicedisplayinfo.ts +82 -0
  96. 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.1",
65
- genVersion: "2.723.2",
66
- userAgent: "speakeasy-sdk/typescript 1.0.1 2.723.2 0.0.2 syllable-sdk",
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;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "1.0.1",
22
+ currentVersion: "1.0.2-rc.2",
23
23
  },
24
24
  });
25
25
 
@@ -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.1",
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
+ };