syllable-sdk 1.0.1 → 1.0.2-rc.10

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 (157) hide show
  1. package/README.md +8 -0
  2. package/bin/mcp-server.js +628 -111
  3. package/bin/mcp-server.js.map +32 -18
  4. package/docs/sdks/batches/README.md +4 -4
  5. package/docs/sdks/campaigns/README.md +24 -0
  6. package/docs/sdks/incidents/README.md +0 -8
  7. package/docs/sdks/prompts/README.md +4 -2
  8. package/docs/sdks/pronunciations/README.md +277 -1
  9. package/docs/sdks/workflows/README.md +8 -8
  10. package/examples/package-lock.json +1 -1
  11. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts +13 -0
  12. package/funcs/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  13. package/funcs/pronunciationsPronunciationsDeleteCsv.js +101 -0
  14. package/funcs/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  15. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts +14 -0
  16. package/funcs/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  17. package/funcs/pronunciationsPronunciationsDownloadCsv.js +108 -0
  18. package/funcs/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  19. package/funcs/pronunciationsPronunciationsGet.d.ts +14 -0
  20. package/funcs/pronunciationsPronunciationsGet.d.ts.map +1 -0
  21. package/funcs/pronunciationsPronunciationsGet.js +101 -0
  22. package/funcs/pronunciationsPronunciationsGet.js.map +1 -0
  23. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts +14 -0
  24. package/funcs/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  25. package/funcs/pronunciationsPronunciationsGetMetadata.js +101 -0
  26. package/funcs/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  27. package/jsr.json +1 -1
  28. package/lib/config.d.ts +3 -3
  29. package/lib/config.js +3 -3
  30. package/lib/config.js.map +1 -1
  31. package/mcp-server/mcp-server.js +1 -1
  32. package/mcp-server/mcp-server.js.map +1 -1
  33. package/mcp-server/server.d.ts.map +1 -1
  34. package/mcp-server/server.js +9 -1
  35. package/mcp-server/server.js.map +1 -1
  36. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts +3 -0
  37. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.d.ts.map +1 -0
  38. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js +23 -0
  39. package/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.js.map +1 -0
  40. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts +3 -0
  41. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.d.ts.map +1 -0
  42. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js +24 -0
  43. package/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.js.map +1 -0
  44. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts +3 -0
  45. package/mcp-server/tools/pronunciationsPronunciationsGet.d.ts.map +1 -0
  46. package/mcp-server/tools/pronunciationsPronunciationsGet.js +24 -0
  47. package/mcp-server/tools/pronunciationsPronunciationsGet.js.map +1 -0
  48. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts +3 -0
  49. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.d.ts.map +1 -0
  50. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js +24 -0
  51. package/mcp-server/tools/pronunciationsPronunciationsGetMetadata.js.map +1 -0
  52. package/models/components/campaignproperties.d.ts +3 -0
  53. package/models/components/campaignproperties.d.ts.map +1 -1
  54. package/models/components/campaignproperties.js +1 -0
  55. package/models/components/campaignproperties.js.map +1 -1
  56. package/models/components/dictionarymetadata.d.ts +36 -0
  57. package/models/components/dictionarymetadata.d.ts.map +1 -0
  58. package/models/components/dictionarymetadata.js +73 -0
  59. package/models/components/dictionarymetadata.js.map +1 -0
  60. package/models/components/incidentcreaterequest.d.ts +3 -1
  61. package/models/components/incidentcreaterequest.d.ts.map +1 -1
  62. package/models/components/incidentcreaterequest.js.map +1 -1
  63. package/models/components/incidentresponse.d.ts +3 -1
  64. package/models/components/incidentresponse.d.ts.map +1 -1
  65. package/models/components/incidentresponse.js.map +1 -1
  66. package/models/components/incidentupdaterequest.d.ts +3 -11
  67. package/models/components/incidentupdaterequest.d.ts.map +1 -1
  68. package/models/components/incidentupdaterequest.js +0 -8
  69. package/models/components/incidentupdaterequest.js.map +1 -1
  70. package/models/components/index.d.ts +5 -0
  71. package/models/components/index.d.ts.map +1 -1
  72. package/models/components/index.js +5 -0
  73. package/models/components/index.js.map +1 -1
  74. package/models/components/matchtype.d.ts +34 -0
  75. package/models/components/matchtype.d.ts.map +1 -0
  76. package/models/components/matchtype.js +64 -0
  77. package/models/components/matchtype.js.map +1 -0
  78. package/models/components/outboundcampaign.d.ts +9 -0
  79. package/models/components/outboundcampaign.d.ts.map +1 -1
  80. package/models/components/outboundcampaign.js +4 -0
  81. package/models/components/outboundcampaign.js.map +1 -1
  82. package/models/components/outboundcampaigninput.d.ts +9 -0
  83. package/models/components/outboundcampaigninput.d.ts.map +1 -1
  84. package/models/components/outboundcampaigninput.js +4 -0
  85. package/models/components/outboundcampaigninput.js.map +1 -1
  86. package/models/components/promptcreaterequest.d.ts +5 -0
  87. package/models/components/promptcreaterequest.d.ts.map +1 -1
  88. package/models/components/promptcreaterequest.js +4 -0
  89. package/models/components/promptcreaterequest.js.map +1 -1
  90. package/models/components/promptresponse.d.ts +5 -5
  91. package/models/components/promptresponse.d.ts.map +1 -1
  92. package/models/components/promptresponse.js +2 -2
  93. package/models/components/promptresponse.js.map +1 -1
  94. package/models/components/promptupdaterequest.d.ts +5 -5
  95. package/models/components/promptupdaterequest.d.ts.map +1 -1
  96. package/models/components/promptupdaterequest.js +2 -2
  97. package/models/components/promptupdaterequest.js.map +1 -1
  98. package/models/components/pronunciationoverride.d.ts +52 -0
  99. package/models/components/pronunciationoverride.d.ts.map +1 -0
  100. package/models/components/pronunciationoverride.js +97 -0
  101. package/models/components/pronunciationoverride.js.map +1 -0
  102. package/models/components/pronunciationoverridesdictionary.d.ts +68 -0
  103. package/models/components/pronunciationoverridesdictionary.d.ts.map +1 -0
  104. package/models/components/pronunciationoverridesdictionary.js +78 -0
  105. package/models/components/pronunciationoverridesdictionary.js.map +1 -0
  106. package/models/components/pronunciationscsvuploadresponse.d.ts +6 -6
  107. package/models/components/pronunciationscsvuploadresponse.d.ts.map +1 -1
  108. package/models/components/pronunciationscsvuploadresponse.js +6 -6
  109. package/models/components/pronunciationscsvuploadresponse.js.map +1 -1
  110. package/models/components/voicedisplayinfo.d.ts +34 -0
  111. package/models/components/voicedisplayinfo.d.ts.map +1 -0
  112. package/models/components/voicedisplayinfo.js +80 -0
  113. package/models/components/voicedisplayinfo.js.map +1 -0
  114. package/models/operations/index.d.ts +1 -0
  115. package/models/operations/index.d.ts.map +1 -1
  116. package/models/operations/index.js +1 -0
  117. package/models/operations/index.js.map +1 -1
  118. package/models/operations/pronunciationsdownloadcsv.d.ts +35 -0
  119. package/models/operations/pronunciationsdownloadcsv.d.ts.map +1 -0
  120. package/models/operations/pronunciationsdownloadcsv.js +82 -0
  121. package/models/operations/pronunciationsdownloadcsv.js.map +1 -0
  122. package/openapi.json +387 -110
  123. package/package.json +1 -1
  124. package/sdk/pronunciations.d.ts +17 -0
  125. package/sdk/pronunciations.d.ts.map +1 -1
  126. package/sdk/pronunciations.js +28 -0
  127. package/sdk/pronunciations.js.map +1 -1
  128. package/src/funcs/pronunciationsPronunciationsDeleteCsv.ts +139 -0
  129. package/src/funcs/pronunciationsPronunciationsDownloadCsv.ts +147 -0
  130. package/src/funcs/pronunciationsPronunciationsGet.ts +139 -0
  131. package/src/funcs/pronunciationsPronunciationsGetMetadata.ts +139 -0
  132. package/src/lib/config.ts +3 -3
  133. package/src/mcp-server/mcp-server.ts +1 -1
  134. package/src/mcp-server/server.ts +9 -1
  135. package/src/mcp-server/tools/pronunciationsPronunciationsDeleteCsv.ts +26 -0
  136. package/src/mcp-server/tools/pronunciationsPronunciationsDownloadCsv.ts +28 -0
  137. package/src/mcp-server/tools/pronunciationsPronunciationsGet.ts +28 -0
  138. package/src/mcp-server/tools/pronunciationsPronunciationsGetMetadata.ts +28 -0
  139. package/src/models/components/campaignproperties.ts +1 -0
  140. package/src/models/components/dictionarymetadata.ts +77 -0
  141. package/src/models/components/incidentcreaterequest.ts +3 -1
  142. package/src/models/components/incidentresponse.ts +3 -1
  143. package/src/models/components/incidentupdaterequest.ts +3 -23
  144. package/src/models/components/index.ts +5 -0
  145. package/src/models/components/matchtype.ts +37 -0
  146. package/src/models/components/outboundcampaign.ts +9 -0
  147. package/src/models/components/outboundcampaigninput.ts +9 -0
  148. package/src/models/components/promptcreaterequest.ts +9 -0
  149. package/src/models/components/promptresponse.ts +7 -7
  150. package/src/models/components/promptupdaterequest.ts +7 -7
  151. package/src/models/components/pronunciationoverride.ts +120 -0
  152. package/src/models/components/pronunciationoverridesdictionary.ts +124 -0
  153. package/src/models/components/pronunciationscsvuploadresponse.ts +12 -12
  154. package/src/models/components/voicedisplayinfo.ts +82 -0
  155. package/src/models/operations/index.ts +1 -0
  156. package/src/models/operations/pronunciationsdownloadcsv.ts +84 -0
  157. package/src/sdk/pronunciations.ts +53 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syllable-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-rc.10",
4
4
  "author": "Syllable",
5
5
  "bin": {
6
6
  "mcp": "bin/mcp-server.js"
@@ -1,9 +1,26 @@
1
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
2
  import * as components from "../models/components/index.js";
3
+ import * as operations from "../models/operations/index.js";
3
4
  export declare class Pronunciations extends ClientSDK {
5
+ /**
6
+ * Get Pronunciations Dictionary
7
+ */
8
+ pronunciationsGet(options?: RequestOptions): Promise<components.PronunciationOverridesDictionary>;
9
+ /**
10
+ * Get Pronunciations Metadata
11
+ */
12
+ pronunciationsGetMetadata(options?: RequestOptions): Promise<components.DictionaryMetadata>;
13
+ /**
14
+ * Download Pronunciations Csv
15
+ */
16
+ pronunciationsDownloadCsv(options?: RequestOptions): Promise<operations.PronunciationsDownloadCsvResponse>;
4
17
  /**
5
18
  * Upload Pronunciations Csv
6
19
  */
7
20
  pronunciationsUploadCsv(request: components.BodyPronunciationsUploadCsv, options?: RequestOptions): Promise<components.PronunciationsCsvUploadResponse>;
21
+ /**
22
+ * Delete Pronunciations Dictionary
23
+ */
24
+ pronunciationsDeleteCsv(options?: RequestOptions): Promise<void>;
8
25
  }
9
26
  //# sourceMappingURL=pronunciations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pronunciations.d.ts","sourceRoot":"","sources":["../src/sdk/pronunciations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,cAAe,SAAQ,SAAS;IAC3C;;OAEG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;CAOvD"}
1
+ {"version":3,"file":"pronunciations.d.ts","sourceRoot":"","sources":["../src/sdk/pronunciations.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,cAAe,SAAQ,SAAS;IAC3C;;OAEG;IACG,iBAAiB,CACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gCAAgC,CAAC;IAOvD;;OAEG;IACG,yBAAyB,CAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAOzC;;OAEG;IACG,yBAAyB,CAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAOxD;;OAEG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;OAEG;IACG,uBAAuB,CAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;CAMjB"}
@@ -4,16 +4,44 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Pronunciations = void 0;
7
+ const pronunciationsPronunciationsDeleteCsv_js_1 = require("../funcs/pronunciationsPronunciationsDeleteCsv.js");
8
+ const pronunciationsPronunciationsDownloadCsv_js_1 = require("../funcs/pronunciationsPronunciationsDownloadCsv.js");
9
+ const pronunciationsPronunciationsGet_js_1 = require("../funcs/pronunciationsPronunciationsGet.js");
10
+ const pronunciationsPronunciationsGetMetadata_js_1 = require("../funcs/pronunciationsPronunciationsGetMetadata.js");
7
11
  const pronunciationsPronunciationsUploadCsv_js_1 = require("../funcs/pronunciationsPronunciationsUploadCsv.js");
8
12
  const sdks_js_1 = require("../lib/sdks.js");
9
13
  const fp_js_1 = require("../types/fp.js");
10
14
  class Pronunciations extends sdks_js_1.ClientSDK {
15
+ /**
16
+ * Get Pronunciations Dictionary
17
+ */
18
+ async pronunciationsGet(options) {
19
+ return (0, fp_js_1.unwrapAsync)((0, pronunciationsPronunciationsGet_js_1.pronunciationsPronunciationsGet)(this, options));
20
+ }
21
+ /**
22
+ * Get Pronunciations Metadata
23
+ */
24
+ async pronunciationsGetMetadata(options) {
25
+ return (0, fp_js_1.unwrapAsync)((0, pronunciationsPronunciationsGetMetadata_js_1.pronunciationsPronunciationsGetMetadata)(this, options));
26
+ }
27
+ /**
28
+ * Download Pronunciations Csv
29
+ */
30
+ async pronunciationsDownloadCsv(options) {
31
+ return (0, fp_js_1.unwrapAsync)((0, pronunciationsPronunciationsDownloadCsv_js_1.pronunciationsPronunciationsDownloadCsv)(this, options));
32
+ }
11
33
  /**
12
34
  * Upload Pronunciations Csv
13
35
  */
14
36
  async pronunciationsUploadCsv(request, options) {
15
37
  return (0, fp_js_1.unwrapAsync)((0, pronunciationsPronunciationsUploadCsv_js_1.pronunciationsPronunciationsUploadCsv)(this, request, options));
16
38
  }
39
+ /**
40
+ * Delete Pronunciations Dictionary
41
+ */
42
+ async pronunciationsDeleteCsv(options) {
43
+ return (0, fp_js_1.unwrapAsync)((0, pronunciationsPronunciationsDeleteCsv_js_1.pronunciationsPronunciationsDeleteCsv)(this, options));
44
+ }
17
45
  }
18
46
  exports.Pronunciations = Pronunciations;
19
47
  //# sourceMappingURL=pronunciations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pronunciations.js","sourceRoot":"","sources":["../src/sdk/pronunciations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gHAA0G;AAC1G,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,cAAe,SAAQ,mBAAS;IAC3C;;OAEG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAdD,wCAcC"}
1
+ {"version":3,"file":"pronunciations.js","sourceRoot":"","sources":["../src/sdk/pronunciations.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gHAA0G;AAC1G,oHAA8G;AAC9G,oGAA8F;AAC9F,oHAA8G;AAC9G,gHAA0G;AAC1G,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,cAAe,SAAQ,mBAAS;IAC3C;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oEAA+B,EAChD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,yBAAyB,CAC7B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,yBAAyB,CAC7B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oFAAuC,EACxD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gFAAqC,EACtD,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA9DD,wCA8DC"}
@@ -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,147 @@
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 {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
19
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
20
+ import { SyllableSDKError } from "../models/errors/syllablesdkerror.js";
21
+ import * as operations from "../models/operations/index.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
+ operations.PronunciationsDownloadCsvResponse,
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
+ operations.PronunciationsDownloadCsvResponse,
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: "text/csv",
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 responseFields = {
120
+ HttpMeta: { Response: response, Request: req },
121
+ };
122
+
123
+ const [result] = await M.match<
124
+ operations.PronunciationsDownloadCsvResponse,
125
+ | SyllableSDKError
126
+ | ResponseValidationError
127
+ | ConnectionError
128
+ | RequestAbortedError
129
+ | RequestTimeoutError
130
+ | InvalidRequestError
131
+ | UnexpectedClientError
132
+ | SDKValidationError
133
+ >(
134
+ M.stream(200, operations.PronunciationsDownloadCsvResponse$inboundSchema, {
135
+ ctype: "text/csv",
136
+ hdrs: true,
137
+ key: "Result",
138
+ }),
139
+ M.fail("4XX"),
140
+ M.fail("5XX"),
141
+ )(response, req, { extraFields: responseFields });
142
+ if (!result.ok) {
143
+ return [result, { status: "complete", request: req, response }];
144
+ }
145
+
146
+ return [result, { status: "complete", request: req, response }];
147
+ }
@@ -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.10",
65
+ genVersion: "2.723.11",
66
+ userAgent: "speakeasy-sdk/typescript 1.0.2-rc.10 2.723.11 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.10",
23
23
  },
24
24
  });
25
25