graphmind-sdk 0.8.1 → 0.8.3

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.
@@ -31,6 +31,10 @@ export class GraphmindClient {
31
31
  if (options?.token) {
32
32
  headers["Authorization"] = `Bearer ${options.token}`;
33
33
  }
34
+ else if (options?.username && options?.password) {
35
+ const credentials = btoa(`${options.username}:${options.password}`);
36
+ headers["Authorization"] = `Basic ${credentials}`;
37
+ }
34
38
  this.http = new HttpTransport(url, headers);
35
39
  }
36
40
  /**
@@ -124,4 +124,8 @@ export interface ClientOptions {
124
124
  graph?: string;
125
125
  /** Bearer token for authentication */
126
126
  token?: string;
127
+ /** Username for Basic Auth (requires password) */
128
+ username?: string;
129
+ /** Password for Basic Auth (requires username) */
130
+ password?: string;
127
131
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphmind-sdk",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "TypeScript SDK for the Graphmind Graph Database",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",