@hypelabs-llc/ts-sdk 0.2.5 → 0.2.6

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.
@@ -11,5 +11,6 @@
11
11
  * the generated Kiota plumbing directly.
12
12
  *
13
13
  * @param apiKey A Connect API key (e.g. `hl_live_…`).
14
+ * @param baseUrl Optional API base URL; leave empty to use the SDK default.
14
15
  */
15
- export declare function createConnectClient(apiKey: string): any;
16
+ export declare function createConnectClient(apiKey: string, baseUrl?: string): any;
@@ -14,11 +14,15 @@ import { ApiKeyAuthenticationProvider } from "./apiKeyAuthenticationProvider.js"
14
14
  * the generated Kiota plumbing directly.
15
15
  *
16
16
  * @param apiKey A Connect API key (e.g. `hl_live_…`).
17
+ * @param baseUrl Optional API base URL; leave empty to use the SDK default.
17
18
  */
18
- export function createConnectClient(apiKey) {
19
+ export function createConnectClient(apiKey, baseUrl) {
19
20
  if (!apiKey || !apiKey.trim()) {
20
21
  throw new Error("An API key is required.");
21
22
  }
22
23
  const adapter = new DefaultRequestAdapter(new ApiKeyAuthenticationProvider(apiKey));
24
+ if (baseUrl?.trim()) {
25
+ adapter.baseUrl = baseUrl;
26
+ }
23
27
  return createConnectApiClient(adapter);
24
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypelabs-llc/ts-sdk",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "The TypeScript client for the HypeLabs Connect API, for internal services.",
5
5
  "license": "MIT",
6
6
  "repository": {