Skip to content

Commit c59bdb0

Browse files
committed
chore: tsdoc comments
1 parent afb70a4 commit c59bdb0

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

src/custom/CortiClient.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/custom/agents/CustomAgents.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ import * as core from "../../core/index.js";
1111

1212
export 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");

0 commit comments

Comments
 (0)