File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,6 +91,22 @@ export class CortiClient extends BaseCortiClient {
9191 return ( this . _agents ??= new CustomAgents ( this . _options ) ) ;
9292 }
9393
94+ /**
95+ * Retrieves authentication headers for API requests.
96+ *
97+ * This method returns a Headers object containing the Authorization header with a valid
98+ * bearer token and the Tenant-Name header. The token is automatically refreshed if needed.
99+ *
100+ * @returns A Promise that resolves to a Headers object with Authorization and Tenant-Name headers
101+ *
102+ * @example
103+ * ```typescript
104+ * const client = new CortiClient({ ... });
105+ * const headers = await client.getAuthHeaders();
106+ * console.log(headers.get("Authorization")); // "Bearer ..."
107+ * console.log(headers.get("Tenant-Name")); // "your-tenant"
108+ * ```
109+ */
94110 public getAuthHeaders = async ( ) : Promise < Headers > => {
95111 const req = await this . _options . authProvider . getAuthRequest ( ) ;
96112
Original file line number Diff line number Diff line change @@ -11,12 +11,10 @@ import * as core from "../../core/index.js";
1111
1212export class CustomAgents extends AgentsClient {
1313 /**
14- * Patch: added helper method to get agent card URL
15- *
1614 * Returns the URL for the agent card JSON file.
1715 *
1816 * @param {string } agentId - The ID of the agent
19- * @returns {Promise<URL> } The URL for the agent card
17+ * @returns {Promise<URL> } A Promise that resolves to the URL for the agent card
2018 *
2119 * @example
2220 * const url = await client.agents.getAgentCardUrl("agent-123");
You can’t perform that action at this time.
0 commit comments