@mtaap/mcp 0.2.13 → 0.4.1

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/dist/index.d.ts CHANGED
@@ -11,10 +11,19 @@ import { TaskState, ErrorType } from '@mtaap/core';
11
11
 
12
12
  /**
13
13
  * API Client Configuration
14
+ *
15
+ * Supports two authentication methods:
16
+ * - apiKey: Traditional API key authentication (X-API-Key header)
17
+ * - oauthToken: OAuth 2.0 Bearer token (Authorization header)
18
+ *
19
+ * At least one authentication method must be provided.
14
20
  */
15
21
  interface ApiClientConfig {
16
22
  baseUrl: string;
17
- apiKey: string;
23
+ /** API key for X-API-Key authentication */
24
+ apiKey?: string;
25
+ /** OAuth access token for Bearer authentication */
26
+ oauthToken?: string;
18
27
  timeout?: number;
19
28
  debug?: boolean;
20
29
  }
@@ -23,8 +32,9 @@ interface ApiClientConfig {
23
32
  */
24
33
  interface AuthContext {
25
34
  userId: string;
26
- organizationId: string | undefined;
27
- permissions: string[];
35
+ organizationId?: string;
36
+ /** Permission level: "READ" | "WRITE" | "ADMIN" for OAuth, or string[] for API keys */
37
+ permissions: string | string[];
28
38
  userName: string;
29
39
  userEmail: string;
30
40
  }
@@ -84,6 +94,8 @@ interface Task {
84
94
  message: string;
85
95
  checkpoints: string[];
86
96
  userId: string;
97
+ apiKeyNickname: string | null;
98
+ createdVia: "UI" | "API_KEY" | "OAUTH";
87
99
  createdAt: string;
88
100
  }>;
89
101
  notes?: Array<{
@@ -91,6 +103,8 @@ interface Task {
91
103
  content: string;
92
104
  userId: string;
93
105
  userName: string | null;
106
+ apiKeyNickname: string | null;
107
+ createdVia: "UI" | "API_KEY" | "OAUTH";
94
108
  createdAt: string;
95
109
  }>;
96
110
  createdAt: string;
@@ -130,7 +144,8 @@ declare class ApiError extends Error {
130
144
  */
131
145
  declare class MCPApiClient {
132
146
  private baseUrl;
133
- private apiKey;
147
+ private apiKey?;
148
+ private oauthToken?;
134
149
  private timeout;
135
150
  private debug;
136
151
  private authContext;