syllable-sdk 1.0.47 → 1.0.48-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/bin/mcp-server.js CHANGED
@@ -53072,9 +53072,9 @@ var init_config = __esm(() => {
53072
53072
  SDK_METADATA = {
53073
53073
  language: "typescript",
53074
53074
  openapiDocVersion: "0.0.3",
53075
- sdkVersion: "1.0.47",
53076
- genVersion: "2.899.0",
53077
- userAgent: "speakeasy-sdk/typescript 1.0.47 2.899.0 0.0.3 syllable-sdk"
53075
+ sdkVersion: "1.0.48-rc.2",
53076
+ genVersion: "2.900.1",
53077
+ userAgent: "speakeasy-sdk/typescript 1.0.48-rc.2 2.900.1 0.0.3 syllable-sdk"
53078
53078
  };
53079
53079
  });
53080
53080
 
@@ -53821,24 +53821,41 @@ class ClientSDK {
53821
53821
  if (path) {
53822
53822
  baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
53823
53823
  reqURL = new URL(path, baseURL);
53824
+ if (!reqURL.search && baseURL.search) {
53825
+ reqURL.search = baseURL.search;
53826
+ }
53824
53827
  } else {
53825
53828
  reqURL = baseURL;
53826
53829
  }
53827
53830
  reqURL.hash = "";
53828
- let finalQuery = query || "";
53829
- const secQuery = [];
53830
- for (const [k2, v2] of Object.entries(security?.queryParams || {})) {
53831
- const q2 = encodeForm(k2, v2, { charEncoding: "percent" });
53832
- if (typeof q2 !== "undefined") {
53833
- secQuery.push(q2);
53831
+ const mergeQuery = (current, additions) => {
53832
+ if (!additions) {
53833
+ return current;
53834
53834
  }
53835
- }
53836
- if (secQuery.length) {
53837
- finalQuery += `&${secQuery.join("&")}`;
53838
- }
53835
+ const additionKeys = new Set(additions.split("&").filter((pair) => pair !== "").map((pair) => pair.split("=")[0] ?? ""));
53836
+ const kept = current.split("&").filter((pair) => {
53837
+ return pair !== "" && !additionKeys.has(pair.split("=")[0] ?? "");
53838
+ });
53839
+ return [...kept, additions].join("&");
53840
+ };
53841
+ const encodeQueryRecord = (record3) => {
53842
+ return Object.entries(record3).map(([k2, v2]) => {
53843
+ if (v2 == null) {
53844
+ return;
53845
+ }
53846
+ const value = v2;
53847
+ return encodeForm(k2, value, {
53848
+ explode: Array.isArray(value),
53849
+ charEncoding: "percent"
53850
+ });
53851
+ }).filter((pair) => typeof pair !== "undefined").join("&");
53852
+ };
53853
+ const finalQuery = [
53854
+ query || "",
53855
+ encodeQueryRecord(security?.queryParams || {})
53856
+ ].reduce(mergeQuery, reqURL.search.slice(1));
53839
53857
  if (finalQuery) {
53840
- const q2 = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery;
53841
- reqURL.search = `?${q2}`;
53858
+ reqURL.search = `?${finalQuery}`;
53842
53859
  }
53843
53860
  const headers = new Headers(opHeaders);
53844
53861
  const username = security?.basic.username;
@@ -86945,7 +86962,7 @@ Generate voice sample.`,
86945
86962
  function createMCPServer(deps) {
86946
86963
  const server = new McpServer({
86947
86964
  name: "SyllableSDK",
86948
- version: "1.0.47"
86965
+ version: "1.0.48-rc.2"
86949
86966
  });
86950
86967
  const client = new SyllableSDKCore({
86951
86968
  apiKeyHeader: deps.apiKeyHeader,
@@ -88501,7 +88518,7 @@ var routes = ln({
88501
88518
  var app = _e(routes, {
88502
88519
  name: "mcp",
88503
88520
  versionInfo: {
88504
- currentVersion: "1.0.47"
88521
+ currentVersion: "1.0.48-rc.2"
88505
88522
  }
88506
88523
  });
88507
88524
  Yt(app, process3.argv.slice(2), buildContext(process3));
@@ -88509,5 +88526,5 @@ export {
88509
88526
  app
88510
88527
  };
88511
88528
 
88512
- //# debugId=D55C1A7C13F249D864756E2164756E21
88529
+ //# debugId=DCFC603332FB3C9A64756E2164756E21
88513
88530
  //# sourceMappingURL=mcp-server.js.map