@unboundcx/sdk 4.13.84 → 4.13.85
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/base.js +14 -0
- package/package.json +1 -1
package/base.js
CHANGED
|
@@ -114,6 +114,20 @@ export class BaseSDK {
|
|
|
114
114
|
process.env?.API_BASE_URL || defaultDomain
|
|
115
115
|
}`;
|
|
116
116
|
}
|
|
117
|
+
} else if (this._constructorBaseURL && !this.namespace) {
|
|
118
|
+
// Forms v2 P3 fix: a browser-environment instance constructed with
|
|
119
|
+
// ONLY a literal baseURL (no namespace) -- e.g. sdk.forms.public /
|
|
120
|
+
// sdk.webchat.visitor on a page that resolves its tenant server-side
|
|
121
|
+
// from an opaque key, never a namespace subdomain -- must hit that
|
|
122
|
+
// exact baseURL. Before this fix, this branch unconditionally built
|
|
123
|
+
// `https://${namespace}.${baseUrl}` even when namespace was
|
|
124
|
+
// undefined, producing a literal "https://undefined.<host>" request
|
|
125
|
+
// URL (caught via forms-v2 marketing-site integration, P3). The
|
|
126
|
+
// Node branch above already had the equivalent guard
|
|
127
|
+
// (`if (!this._constructorBaseURL)`); this mirrors it for browser.
|
|
128
|
+
// A namespace passed ALONGSIDE baseURL still prefixes it (unchanged,
|
|
129
|
+
// existing behavior other callers rely on).
|
|
130
|
+
this.fullUrl = this._constructorBaseURL;
|
|
117
131
|
} else {
|
|
118
132
|
this.fullUrl = `https://${this.namespace}.${this.baseUrl}`;
|
|
119
133
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.85",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|