@kivox/client 0.1.0-beta.23 → 0.1.0-beta.25

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
@@ -1,247 +1,733 @@
1
+ declare namespace exports_api {
2
+ export { updateTemplate, updateOrgMember, updateOrg, updateCurrentUserEmail, updateCurrentUser, updateAgentStatus, updateAgent, signup, revokeApiKey, removeOrgMember, logoutAll, logout, login, listUserTemplates, listUserAgents, listOrgs, listOrgTemplates, listOrgMembers, listOrgAgents, listMessages, listConversations, listApiKeys, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createOrgTemplate, createOrgAgent, createOrg, createApiKey, compileAgent, addOrgMember, User, UpdateTemplateResult, UpdateTemplateBody, UpdateStatusBodyStatus, UpdateStatusBody, UpdateOrgResult, UpdateOrgMemberResult, UpdateOrgBody, UpdateMemberBodyRole, UpdateMemberBody, UpdateCurrentUserResult, UpdateCurrentUserEmailResult, UpdateCurrentUserEmailBody, UpdateCurrentUserBody, UpdateAgentStatusResult, UpdateAgentResult, UpdateAgentBody, Template, SignupResult, SignupBody, SessionResponse, Secret, Safeguards, RevokeApiKeyResult, RemoveOrgMemberResult, PageResponseTemplate, PageResponseAgent, Org, Message, Member, LogoutResult, LogoutAllResult, LoginResult, LoginBody, ListUserTemplatesResult, ListUserTemplatesParams, ListUserAgentsResult, ListUserAgentsParams, ListOrgsResult, ListOrgTemplatesResult, ListOrgTemplatesParams, ListOrgMembersResult, ListOrgAgentsResult, ListOrgAgentsParams, ListMessagesResult, ListMessagesParams, ListConversationsResult, ListConversationsParams, ListApiKeysResult, GetUserResult, GetTemplateResult, GetOrgResult, GetCurrentUserResult, GetConversationResult, GetAgentResult, ErrorModel, ErrorDetail, DeleteTemplateResult, DeleteOrgResult, DeleteCurrentUserResult, DeleteConversationResult, DeleteAgentResult, CursorResponseMessage, CursorResponseConversation, CreateUserTemplateResult, CreateUserAgentResult, CreateTemplateBody, CreateOrgTemplateResult, CreateOrgResult, CreateOrgBody, CreateOrgAgentResult, CreateApiKeyResult, CreateAgentBody, CreateAPIKeyBody, Conversation, Config, CompileDiagnostics, CompileBody, CompileAgentResult, Agent, AddOrgMemberResult, AddMemberBodyRole, AddMemberBody, APIKeyResponse, APIKey };
3
+ }
4
+ import { AxiosRequestConfig, AxiosResponse } from "axios";
5
+ type IfEquals<
6
+ X,
7
+ Y,
8
+ A = X,
9
+ B = never
10
+ > = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
11
+ type WritableKeys<T> = { [P in keyof T]-? : IfEquals<{ [Q in P] : T[P] }, { -readonly [Q in P] : T[P] }, P> }[keyof T];
12
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
13
+ type DistributeReadOnlyOverUnions<T> = T extends any ? NonReadonly<T> : never;
14
+ type Writable<T> = Pick<T, WritableKeys<T>>;
15
+ type NonReadonly<T> = [T] extends [UnionToIntersection<T>] ? { [P in keyof Writable<T>] : T[P] extends object ? NonReadonly<NonNullable<T[P]>> : T[P] } : DistributeReadOnlyOverUnions<T>;
16
+ interface APIKey {
17
+ created_at: string;
18
+ created_by_user_id: string;
19
+ /** @nullable */
20
+ expires_at: string | null;
21
+ id: string;
22
+ /** @nullable */
23
+ last_used_at: string | null;
24
+ name: string;
25
+ owner_org_id: string;
26
+ owner_user_id: string;
27
+ prefix: string;
28
+ /** @nullable */
29
+ scopes: string[] | null;
30
+ }
31
+ interface APIKeyResponse {
32
+ /** A URL to the JSON Schema for this object. */
33
+ readonly $schema?: string;
34
+ created_at: string;
35
+ /** @nullable */
36
+ expires_at: string | null;
37
+ id: string;
38
+ key: string;
39
+ name: string;
40
+ prefix: string;
41
+ /** @nullable */
42
+ scopes: string[] | null;
43
+ }
1
44
  /**
2
- * Configuration for HTTP transport.
45
+ * Role to assign
3
46
  */
4
- type HttpTransportConfig = {
5
- /** Base URL for all requests */
6
- baseUrl: string
7
- /** Optional default headers */
8
- headers?: Record<string, string>
47
+ type AddMemberBodyRole = typeof AddMemberBodyRole[keyof typeof AddMemberBodyRole];
48
+ declare const AddMemberBodyRole: {
49
+ readonly admin: "admin"
50
+ readonly member: "member"
51
+ readonly viewer: "viewer"
9
52
  };
10
- /**
11
- * Error thrown by HTTP transport operations.
12
- */
13
- declare class HttpTransportError extends Error {
14
- readonly status: number;
15
- readonly statusText: string;
16
- readonly body?: unknown;
17
- constructor(message: string, status: number, statusText: string, body?: unknown);
53
+ interface AddMemberBody {
54
+ /** A URL to the JSON Schema for this object. */
55
+ readonly $schema?: string;
56
+ /** Role to assign */
57
+ role: AddMemberBodyRole;
58
+ /** User to add */
59
+ user_id: string;
18
60
  }
19
- /**
20
- * Shared HTTP transport layer for REST API requests.
21
- * Handles request/response cycles with automatic JSON parsing.
22
- */
23
- declare class HttpTransport {
24
- private readonly config;
25
- constructor(config: HttpTransportConfig);
61
+ interface Config {
62
+ allow_interruptions?: boolean;
63
+ avatar_url?: string;
64
+ description?: string;
65
+ global_system_prompt?: string;
66
+ language?: string;
67
+ llm_engine?: string;
68
+ llm_model?: string;
69
+ max_session_duration_minutes?: number;
70
+ max_silence_timeout_seconds?: number;
71
+ name: string;
72
+ }
73
+ interface Safeguards {
74
+ max_calls: number;
75
+ max_http_calls: number;
76
+ max_llm_calls: number;
77
+ max_transitions: number;
78
+ }
79
+ interface Agent {
80
+ /** A URL to the JSON Schema for this object. */
81
+ readonly $schema?: string;
82
+ config: Config;
83
+ created_at: string;
84
+ id: string;
85
+ ork_source: string;
86
+ owner_org_id?: string;
87
+ owner_user_id?: string;
88
+ safeguards: Safeguards;
89
+ status: string;
90
+ template_id?: string;
91
+ updated_at: string;
92
+ }
93
+ interface CompileBody {
94
+ /** A URL to the JSON Schema for this object. */
95
+ readonly $schema?: string;
96
+ /** Source to compile; defaults to the agent's stored source */
97
+ ork_source?: string;
98
+ }
99
+ interface CompileDiagnostics {
100
+ /** A URL to the JSON Schema for this object. */
101
+ readonly $schema?: string;
102
+ /** @nullable */
103
+ errors: string[] | null;
104
+ /** @nullable */
105
+ warnings: string[] | null;
106
+ }
107
+ interface Conversation {
108
+ /** A URL to the JSON Schema for this object. */
109
+ readonly $schema?: string;
110
+ agent_id: string;
111
+ end_reason?: string;
112
+ ended_at?: string;
113
+ id: string;
114
+ started_at: string;
115
+ status: string;
116
+ summary?: string;
117
+ }
118
+ interface CreateAPIKeyBody {
119
+ /** A URL to the JSON Schema for this object. */
120
+ readonly $schema?: string;
121
+ /** Optional expiration time */
122
+ expires_at?: string;
26
123
  /**
27
- * Makes an HTTP request to the specified path.
28
- *
29
- * @param path API path (e.g., '/agents')
30
- * @param init Fetch request options
31
- * @returns Parsed JSON response
32
- * @throws {HttpTransportError} If request fails
124
+ * Human-readable key name
125
+ * @maxLength 50
126
+ */
127
+ name: string;
128
+ /**
129
+ * Permission scopes (empty = full access)
130
+ * @nullable
131
+ */
132
+ scopes?: string[] | null;
133
+ }
134
+ interface Secret {
135
+ description?: string;
136
+ key: string;
137
+ value: string;
138
+ }
139
+ interface CreateAgentBody {
140
+ /** A URL to the JSON Schema for this object. */
141
+ readonly $schema?: string;
142
+ /** Agent configuration */
143
+ config?: Config;
144
+ /** Orchestration source */
145
+ ork_source?: string;
146
+ /** Resource limits */
147
+ safeguards?: Safeguards;
148
+ /** Encrypted secrets */
149
+ secrets?: Secret[];
150
+ /** Optional source template */
151
+ template_id?: string;
152
+ }
153
+ interface CreateOrgBody {
154
+ /** A URL to the JSON Schema for this object. */
155
+ readonly $schema?: string;
156
+ /**
157
+ * Organization description
158
+ * @maxLength 2048
33
159
  */
34
- request<T>(path: string, init?: RequestInit): Promise<T>;
160
+ description?: string;
35
161
  /**
36
- * Makes a GET request.
162
+ * Organization name
163
+ * @maxLength 256
37
164
  */
38
- get<T>(path: string, params?: Record<string, string>): Promise<T>;
165
+ name: string;
39
166
  /**
40
- * Makes a POST request.
167
+ * URL-safe slug
168
+ * @pattern ^[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]$
41
169
  */
42
- post<T>(path: string, body?: unknown): Promise<T>;
170
+ slug: string;
171
+ }
172
+ interface CreateTemplateBody {
173
+ /** A URL to the JSON Schema for this object. */
174
+ readonly $schema?: string;
175
+ /** Agent configuration */
176
+ config?: Config;
43
177
  /**
44
- * Makes a PUT request.
178
+ * Template description
179
+ * @maxLength 2048
45
180
  */
46
- put<T>(path: string, body?: unknown): Promise<T>;
181
+ description?: string;
47
182
  /**
48
- * Makes a PATCH request.
183
+ * Template name
184
+ * @maxLength 256
49
185
  */
50
- patch<T>(path: string, body?: unknown): Promise<T>;
186
+ name: string;
187
+ /** Orchestration source */
188
+ ork_source?: string;
189
+ /** Resource limits */
190
+ safeguards?: Safeguards;
191
+ /** Encrypted secrets */
192
+ secrets?: Secret[];
193
+ }
194
+ interface CursorResponseConversation {
195
+ /** A URL to the JSON Schema for this object. */
196
+ readonly $schema?: string;
197
+ has_more: boolean;
198
+ /** @nullable */
199
+ items: Conversation[] | null;
200
+ next_cursor: string;
201
+ }
202
+ interface Message {
203
+ content: string;
204
+ conversation_id: string;
205
+ created_at: string;
206
+ id: string;
207
+ role: string;
208
+ }
209
+ interface CursorResponseMessage {
210
+ /** A URL to the JSON Schema for this object. */
211
+ readonly $schema?: string;
212
+ has_more: boolean;
213
+ /** @nullable */
214
+ items: Message[] | null;
215
+ next_cursor: string;
216
+ }
217
+ interface ErrorDetail {
218
+ /** Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id' */
219
+ location?: string;
220
+ /** Error message text */
221
+ message?: string;
222
+ /** The value at the given location */
223
+ value?: unknown;
224
+ }
225
+ interface ErrorModel {
226
+ /** A URL to the JSON Schema for this object. */
227
+ readonly $schema?: string;
228
+ /** A human-readable explanation specific to this occurrence of the problem. */
229
+ detail?: string;
230
+ /**
231
+ * Optional list of individual error details
232
+ * @nullable
233
+ */
234
+ errors?: ErrorDetail[] | null;
235
+ /** A URI reference that identifies the specific occurrence of the problem. */
236
+ instance?: string;
237
+ /** HTTP status code */
238
+ status?: number;
239
+ /** A short, human-readable summary of the problem type. This value should not change between occurrences of the error. */
240
+ title?: string;
241
+ /** A URI reference to human-readable documentation for the error. */
242
+ type?: string;
243
+ }
244
+ interface LoginBody {
245
+ /** A URL to the JSON Schema for this object. */
246
+ readonly $schema?: string;
247
+ /** Account email */
248
+ email: string;
51
249
  /**
52
- * Makes a DELETE request.
250
+ * Account password
251
+ * @minLength 8
53
252
  */
54
- delete<T>(path: string): Promise<T>;
253
+ password: string;
254
+ }
255
+ interface Member {
256
+ /** A URL to the JSON Schema for this object. */
257
+ readonly $schema?: string;
258
+ created_at: string;
259
+ org_id: string;
260
+ role: string;
261
+ updated_at: string;
262
+ user_id: string;
263
+ }
264
+ interface Org {
265
+ /** A URL to the JSON Schema for this object. */
266
+ readonly $schema?: string;
267
+ /** @nullable */
268
+ avatar_url: string | null;
269
+ created_at: string;
270
+ created_by: string;
271
+ /** @nullable */
272
+ description: string | null;
273
+ id: string;
274
+ name: string;
275
+ slug: string;
276
+ tier: string;
277
+ updated_at: string;
278
+ }
279
+ interface PageResponseAgent {
280
+ /** A URL to the JSON Schema for this object. */
281
+ readonly $schema?: string;
282
+ /** @nullable */
283
+ items: Agent[] | null;
284
+ limit: number;
285
+ page: number;
286
+ total: number;
287
+ }
288
+ interface Template {
289
+ /** A URL to the JSON Schema for this object. */
290
+ readonly $schema?: string;
291
+ config: Config;
292
+ created_at: string;
293
+ description?: string;
294
+ id: string;
295
+ name: string;
296
+ ork_source: string;
297
+ owner_org_id?: string;
298
+ owner_user_id?: string;
299
+ safeguards: Safeguards;
300
+ updated_at: string;
301
+ }
302
+ interface PageResponseTemplate {
303
+ /** A URL to the JSON Schema for this object. */
304
+ readonly $schema?: string;
305
+ /** @nullable */
306
+ items: Template[] | null;
307
+ limit: number;
308
+ page: number;
309
+ total: number;
310
+ }
311
+ interface SessionResponse {
312
+ /** A URL to the JSON Schema for this object. */
313
+ readonly $schema?: string;
314
+ expires_at: string;
315
+ }
316
+ interface SignupBody {
317
+ /** A URL to the JSON Schema for this object. */
318
+ readonly $schema?: string;
319
+ /** Account email */
320
+ email: string;
321
+ /**
322
+ * Display name
323
+ * @maxLength 50
324
+ */
325
+ name: string;
326
+ /**
327
+ * Account password
328
+ * @minLength 8
329
+ */
330
+ password: string;
331
+ }
332
+ interface UpdateAgentBody {
333
+ /** A URL to the JSON Schema for this object. */
334
+ readonly $schema?: string;
335
+ /** Agent configuration */
336
+ config?: Config;
337
+ /** Orchestration source */
338
+ ork_source?: string;
339
+ /** Resource limits */
340
+ safeguards?: Safeguards;
341
+ /** Encrypted secrets */
342
+ secrets?: Secret[];
343
+ }
344
+ interface UpdateCurrentUserBody {
345
+ /** A URL to the JSON Schema for this object. */
346
+ readonly $schema?: string;
347
+ /** Avatar URL */
348
+ avatar_url?: string;
349
+ /**
350
+ * Display name
351
+ * @maxLength 256
352
+ */
353
+ name?: string;
354
+ }
355
+ interface UpdateCurrentUserEmailBody {
356
+ /** A URL to the JSON Schema for this object. */
357
+ readonly $schema?: string;
358
+ /** New email address */
359
+ email: string;
55
360
  }
56
361
  /**
57
- * Paginated represents a paginated response containing items and metadata.
362
+ * New role
58
363
  */
59
- type Paginated<T> = {
60
- items: T
61
- total: number
62
- page: number
63
- page_size: number
64
- total_pages: number
65
- };
66
- type AgentStatus = "live" | "draft" | "archived";
67
- type Agent = {
68
- id: string
69
- template_id: string
70
- config: AgentConfig
71
- secrets: AgentSecret[]
72
- ork_source: string
73
- status: AgentStatus
74
- created_at: Date
75
- updated_at: Date
76
- };
77
- type AgentConfig = {
78
- avatar_url?: string
79
- name: string
80
- description?: string
81
- language?: string
82
- global_system_prompt?: string
83
- max_session_duration_minutes?: number
84
- max_silence_timeout_seconds?: number
85
- allow_interruptions?: boolean
86
- llm_engine?: string
87
- llm_model?: string
88
- };
89
- type AgentSecret = {
90
- key: string
91
- value: string
92
- description: string
93
- };
94
- type AgentCreate = Partial<Pick<Agent, "config" | "secrets" | "ork_source" | "status" | "template_id">>;
95
- type AgentUpdate = Partial<Pick<AgentCreate, "config" | "secrets" | "ork_source">>;
96
- type AgentCompilationDiagnostic = {
97
- errors: string[]
98
- warnings: string[]
364
+ type UpdateMemberBodyRole = typeof UpdateMemberBodyRole[keyof typeof UpdateMemberBodyRole];
365
+ declare const UpdateMemberBodyRole: {
366
+ readonly owner: "owner"
367
+ readonly admin: "admin"
368
+ readonly member: "member"
369
+ readonly viewer: "viewer"
99
370
  };
371
+ interface UpdateMemberBody {
372
+ /** A URL to the JSON Schema for this object. */
373
+ readonly $schema?: string;
374
+ /** New role */
375
+ role: UpdateMemberBodyRole;
376
+ }
377
+ interface UpdateOrgBody {
378
+ /** A URL to the JSON Schema for this object. */
379
+ readonly $schema?: string;
380
+ /** Avatar URL */
381
+ avatar_url?: string;
382
+ /**
383
+ * Organization description
384
+ * @maxLength 2048
385
+ */
386
+ description?: string;
387
+ /**
388
+ * Organization name
389
+ * @maxLength 256
390
+ */
391
+ name?: string;
392
+ }
100
393
  /**
101
- * Configuration for listing agents.
394
+ * Target lifecycle state
102
395
  */
103
- type AgentListParams = {
104
- /** Number of results per page */
105
- limit?: number
106
- /** Page number (1-indexed) */
107
- page?: number
108
- /** Search query */
109
- search?: string
396
+ type UpdateStatusBodyStatus = typeof UpdateStatusBodyStatus[keyof typeof UpdateStatusBodyStatus];
397
+ declare const UpdateStatusBodyStatus: {
398
+ readonly draft: "draft"
399
+ readonly live: "live"
400
+ readonly archived: "archived"
110
401
  };
111
- /**
112
- * Client for interacting with Kivox agents.
113
- *
114
- * @example
115
- * ```ts
116
- * const agents = await kivox.agents.list({ limit: 20 });
117
- * const agent = await kivox.agents.get('019bb51e-e45f-75e3-b828-94fdf231711e');
118
- * ```
119
- */
120
- declare class AgentClient {
121
- private readonly http;
122
- constructor(http: HttpTransport);
402
+ interface UpdateStatusBody {
403
+ /** A URL to the JSON Schema for this object. */
404
+ readonly $schema?: string;
405
+ /** Target lifecycle state */
406
+ status: UpdateStatusBodyStatus;
407
+ }
408
+ interface UpdateTemplateBody {
409
+ /** A URL to the JSON Schema for this object. */
410
+ readonly $schema?: string;
411
+ /** Agent configuration */
412
+ config?: Config;
123
413
  /**
124
- * Lists all agents with optional filtering and pagination.
125
- *
126
- * @param params List configuration
127
- * @returns Paginated list of agents
414
+ * Template description
415
+ * @maxLength 2048
128
416
  */
129
- list(params?: AgentListParams): Promise<Paginated<Agent[]>>;
417
+ description?: string;
130
418
  /**
131
- * Lists all live agents with optional filtering and pagination.
132
- *
133
- * @param params List configuration
134
- * @returns Paginated list of live agents
419
+ * Template name
420
+ * @maxLength 256
135
421
  */
136
- listLive(params?: AgentListParams): Promise<Paginated<Agent[]>>;
422
+ name?: string;
423
+ /** Orchestration source */
424
+ ork_source?: string;
425
+ /** Resource limits */
426
+ safeguards?: Safeguards;
427
+ /** Encrypted secrets */
428
+ secrets?: Secret[];
429
+ }
430
+ interface User {
431
+ /** A URL to the JSON Schema for this object. */
432
+ readonly $schema?: string;
433
+ /** @nullable */
434
+ avatar_url: string | null;
435
+ created_at: string;
436
+ email: string;
437
+ id: string;
438
+ name: string;
439
+ updated_at: string;
440
+ }
441
+ type ListConversationsParams = {
137
442
  /**
138
- * Lists all draft agents with optional filtering and pagination.
139
- *
140
- * @param params List configuration
141
- * @returns Paginated list of draft agents
443
+ * Cursor from the previous page
142
444
  */
143
- listDraft(params?: AgentListParams): Promise<Paginated<Agent[]>>;
445
+ after?: string
144
446
  /**
145
- * Lists all archived agents with optional filtering and pagination.
146
- *
147
- * @param params List configuration
148
- * @returns Paginated list of archived agents
447
+ * Page size
448
+ * @minimum 1
449
+ * @maximum 100
149
450
  */
150
- listArchived(params?: AgentListParams): Promise<Paginated<Agent[]>>;
451
+ limit?: number
452
+ };
453
+ type ListMessagesParams = {
151
454
  /**
152
- * Gets a single agent by ID.
153
- *
154
- * @param id Agent ID
155
- * @returns Agent details
455
+ * Cursor from the previous page
156
456
  */
157
- get(id: string): Promise<Agent>;
457
+ after?: string
158
458
  /**
159
- * Creates a new agent.
160
- *
161
- * @param data Agent data
162
- * @returns Created agent
459
+ * Page size
460
+ * @minimum 1
461
+ * @maximum 100
163
462
  */
164
- create(data: AgentCreate): Promise<Agent>;
463
+ limit?: number
464
+ };
465
+ type ListOrgAgentsParams = {
165
466
  /**
166
- * Updates an existing agent.
167
- *
168
- * @param id Agent ID
169
- * @param data Updated agent data
170
- * @returns Updated agent
467
+ * Page size
468
+ * @minimum 1
469
+ * @maximum 100
171
470
  */
172
- update(id: string, data: AgentUpdate): Promise<Agent>;
471
+ limit?: number
173
472
  /**
174
- * Marks an agent as live.
175
- *
176
- * @param id Agent ID
177
- * @returns Updated agent
473
+ * Page number
474
+ * @minimum 1
178
475
  */
179
- markAsLive(id: string): Promise<Agent>;
476
+ page?: number
180
477
  /**
181
- * Marks an agent as draft.
182
- *
183
- * @param id Agent ID
184
- * @returns Updated agent
478
+ * Search query
185
479
  */
186
- markAsDraft(id: string): Promise<Agent>;
480
+ search?: string
481
+ };
482
+ type ListOrgTemplatesParams = {
187
483
  /**
188
- * Marks an agent as archived.
189
- *
190
- * @param id Agent ID
191
- * @returns Updated agent
484
+ * Page size
485
+ * @minimum 1
486
+ * @maximum 100
192
487
  */
193
- markAsArchived(id: string): Promise<Agent>;
488
+ limit?: number
194
489
  /**
195
- * Deletes an agent.
196
- *
197
- * @param id Agent ID
490
+ * Page number
491
+ * @minimum 1
198
492
  */
199
- delete(id: string): Promise<Agent>;
493
+ page?: number
494
+ };
495
+ type ListUserAgentsParams = {
200
496
  /**
201
- * Compiles the Ork source code of an agent.
202
- *
203
- * @param id Agent ID
204
- * @param orkSource Updated Ork source code. If not provided, the current Ork source code is used.
205
- * @returns Compiled agent
497
+ * Page size
498
+ * @minimum 1
499
+ * @maximum 100
500
+ */
501
+ limit?: number
502
+ /**
503
+ * Page number
504
+ * @minimum 1
206
505
  */
207
- compile(id: string, orkSource?: string): Promise<AgentCompilationDiagnostic>;
506
+ page?: number
208
507
  /**
209
- * Parses a list of agents with stringified config and blueprint fields.
210
- *
211
- * @returns List of parsed agents.
508
+ * Search query
212
509
  */
213
- private static parseAgents;
510
+ search?: string
511
+ };
512
+ type ListUserTemplatesParams = {
214
513
  /**
215
- * Parses an agent with stringified config and blueprint fields.
216
- *
217
- * @returns Agent with parsed config and blueprint.
514
+ * Page size
515
+ * @minimum 1
516
+ * @maximum 100
218
517
  */
219
- private static parseAgent;
220
- }
518
+ limit?: number
519
+ /**
520
+ * Page number
521
+ * @minimum 1
522
+ */
523
+ page?: number
524
+ };
221
525
  /**
222
- * Configuration for WebSocket transport.
526
+ * @summary Soft-delete an agent
223
527
  */
224
- type WebSocketTransportConfig = {
225
- /** Base WebSocket URL */
226
- baseUrl: string
227
- /** Optional default headers (for protocol support) */
228
- headers?: Record<string, string>
229
- };
528
+ declare const deleteAgent: (agentID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
230
529
  /**
231
- * Shared WebSocket transport layer.
232
- * Provides WebSocket connection creation.
530
+ * @summary Get an agent by ID
233
531
  */
234
- declare class WebSocketTransport {
235
- private readonly config;
236
- constructor(config: WebSocketTransportConfig);
237
- /**
238
- * Creates a WebSocket connection to the specified path.
239
- *
240
- * @param path WebSocket path (e.g., '/conversations/websocket')
241
- * @returns Raw WebSocket instance
242
- */
243
- connect(path: string): WebSocket;
244
- }
532
+ declare const getAgent: (agentID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
533
+ /**
534
+ * @summary Update an agent
535
+ */
536
+ declare const updateAgent: (agentID: string, updateAgentBody: NonReadonly<UpdateAgentBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
537
+ /**
538
+ * Returns HTTP 200 with diagnostics regardless of compile outcome. Compile errors are domain results, not HTTP errors.
539
+ * @summary Parse and validate an agent's orchestration source
540
+ */
541
+ declare const compileAgent: (agentID: string, compileBody: NonReadonly<CompileBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<CompileDiagnostics>>;
542
+ /**
543
+ * @summary List conversations for an agent
544
+ */
545
+ declare const listConversations: (agentID: string, params?: ListConversationsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseConversation>>;
546
+ /**
547
+ * @summary Transition an agent's lifecycle status
548
+ */
549
+ declare const updateAgentStatus: (agentID: string, updateStatusBody: NonReadonly<UpdateStatusBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
550
+ /**
551
+ * @summary List the authenticated user's API keys
552
+ */
553
+ declare const listApiKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<APIKey[] | null>>;
554
+ /**
555
+ * @summary Create a new API key
556
+ */
557
+ declare const createApiKey: (createAPIKeyBody: NonReadonly<CreateAPIKeyBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<APIKeyResponse>>;
558
+ /**
559
+ * @summary Revoke an API key
560
+ */
561
+ declare const revokeApiKey: (keyID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
562
+ /**
563
+ * @summary Revoke all sessions for the authenticated user
564
+ */
565
+ declare const logoutAll: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
566
+ /**
567
+ * @summary Authenticate and create a session
568
+ */
569
+ declare const login: (loginBody: NonReadonly<LoginBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<SessionResponse>>;
570
+ /**
571
+ * @summary Revoke the current session
572
+ */
573
+ declare const logout: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
574
+ /**
575
+ * @summary Create a new account and session
576
+ */
577
+ declare const signup: (signupBody: NonReadonly<SignupBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<SessionResponse>>;
578
+ /**
579
+ * @summary Soft-delete a conversation
580
+ */
581
+ declare const deleteConversation: (conversationID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
582
+ /**
583
+ * @summary Get a conversation by ID
584
+ */
585
+ declare const getConversation: (conversationID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Conversation>>;
586
+ /**
587
+ * @summary List messages in a conversation
588
+ */
589
+ declare const listMessages: (conversationID: string, params?: ListMessagesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseMessage>>;
590
+ /**
591
+ * @summary List organizations the authenticated user belongs to
592
+ */
593
+ declare const listOrgs: (options?: AxiosRequestConfig) => Promise<AxiosResponse<Org[] | null>>;
594
+ /**
595
+ * @summary Create a new organization
596
+ */
597
+ declare const createOrg: (createOrgBody: NonReadonly<CreateOrgBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
598
+ /**
599
+ * @summary Soft-delete an organization
600
+ */
601
+ declare const deleteOrg: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
602
+ /**
603
+ * @summary Get an organization by slug
604
+ */
605
+ declare const getOrg: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
606
+ /**
607
+ * @summary Update an organization
608
+ */
609
+ declare const updateOrg: (orgSlug: string, updateOrgBody: NonReadonly<UpdateOrgBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
610
+ /**
611
+ * @summary List agents owned by an organization
612
+ */
613
+ declare const listOrgAgents: (orgSlug: string, params?: ListOrgAgentsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<PageResponseAgent>>;
614
+ /**
615
+ * @summary Create an agent owned by an organization
616
+ */
617
+ declare const createOrgAgent: (orgSlug: string, createAgentBody: NonReadonly<CreateAgentBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
618
+ /**
619
+ * @summary List organization members
620
+ */
621
+ declare const listOrgMembers: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Member[] | null>>;
622
+ /**
623
+ * @summary Add a member to an organization
624
+ */
625
+ declare const addOrgMember: (orgSlug: string, addMemberBody: NonReadonly<AddMemberBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Member>>;
626
+ /**
627
+ * @summary Remove a member from an organization
628
+ */
629
+ declare const removeOrgMember: (orgSlug: string, userID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
630
+ /**
631
+ * @summary Update a member's role
632
+ */
633
+ declare const updateOrgMember: (orgSlug: string, userID: string, updateMemberBody: NonReadonly<UpdateMemberBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Member>>;
634
+ /**
635
+ * @summary List templates owned by an organization
636
+ */
637
+ declare const listOrgTemplates: (orgSlug: string, params?: ListOrgTemplatesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<PageResponseTemplate>>;
638
+ /**
639
+ * @summary Create a template owned by an organization
640
+ */
641
+ declare const createOrgTemplate: (orgSlug: string, createTemplateBody: NonReadonly<CreateTemplateBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
642
+ /**
643
+ * @summary Soft-delete a template
644
+ */
645
+ declare const deleteTemplate: (templateID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
646
+ /**
647
+ * @summary Get a template by ID
648
+ */
649
+ declare const getTemplate: (templateID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
650
+ /**
651
+ * @summary Update a template
652
+ */
653
+ declare const updateTemplate: (templateID: string, updateTemplateBody: NonReadonly<UpdateTemplateBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
654
+ /**
655
+ * @summary Soft-delete the authenticated user's account
656
+ */
657
+ declare const deleteCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
658
+ /**
659
+ * @summary Get the authenticated user's profile
660
+ */
661
+ declare const getCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
662
+ /**
663
+ * @summary Update the authenticated user's profile
664
+ */
665
+ declare const updateCurrentUser: (updateCurrentUserBody: NonReadonly<UpdateCurrentUserBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
666
+ /**
667
+ * @summary List agents owned by the authenticated user
668
+ */
669
+ declare const listUserAgents: (params?: ListUserAgentsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<PageResponseAgent>>;
670
+ /**
671
+ * @summary Create an agent owned by the authenticated user
672
+ */
673
+ declare const createUserAgent: (createAgentBody: NonReadonly<CreateAgentBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
674
+ /**
675
+ * @summary Update the authenticated user's email
676
+ */
677
+ declare const updateCurrentUserEmail: (updateCurrentUserEmailBody: NonReadonly<UpdateCurrentUserEmailBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
678
+ /**
679
+ * @summary List templates owned by the authenticated user
680
+ */
681
+ declare const listUserTemplates: (params?: ListUserTemplatesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<PageResponseTemplate>>;
682
+ /**
683
+ * @summary Create a template owned by the authenticated user
684
+ */
685
+ declare const createUserTemplate: (createTemplateBody: NonReadonly<CreateTemplateBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
686
+ /**
687
+ * @summary Get a user by ID
688
+ */
689
+ declare const getUser: (userID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
690
+ type DeleteAgentResult = AxiosResponse<void>;
691
+ type GetAgentResult = AxiosResponse<Agent>;
692
+ type UpdateAgentResult = AxiosResponse<Agent>;
693
+ type CompileAgentResult = AxiosResponse<CompileDiagnostics>;
694
+ type ListConversationsResult = AxiosResponse<CursorResponseConversation>;
695
+ type UpdateAgentStatusResult = AxiosResponse<Agent>;
696
+ type ListApiKeysResult = AxiosResponse<APIKey[] | null>;
697
+ type CreateApiKeyResult = AxiosResponse<APIKeyResponse>;
698
+ type RevokeApiKeyResult = AxiosResponse<void>;
699
+ type LogoutAllResult = AxiosResponse<void>;
700
+ type LoginResult = AxiosResponse<SessionResponse>;
701
+ type LogoutResult = AxiosResponse<void>;
702
+ type SignupResult = AxiosResponse<SessionResponse>;
703
+ type DeleteConversationResult = AxiosResponse<void>;
704
+ type GetConversationResult = AxiosResponse<Conversation>;
705
+ type ListMessagesResult = AxiosResponse<CursorResponseMessage>;
706
+ type ListOrgsResult = AxiosResponse<Org[] | null>;
707
+ type CreateOrgResult = AxiosResponse<Org>;
708
+ type DeleteOrgResult = AxiosResponse<void>;
709
+ type GetOrgResult = AxiosResponse<Org>;
710
+ type UpdateOrgResult = AxiosResponse<Org>;
711
+ type ListOrgAgentsResult = AxiosResponse<PageResponseAgent>;
712
+ type CreateOrgAgentResult = AxiosResponse<Agent>;
713
+ type ListOrgMembersResult = AxiosResponse<Member[] | null>;
714
+ type AddOrgMemberResult = AxiosResponse<Member>;
715
+ type RemoveOrgMemberResult = AxiosResponse<void>;
716
+ type UpdateOrgMemberResult = AxiosResponse<Member>;
717
+ type ListOrgTemplatesResult = AxiosResponse<PageResponseTemplate>;
718
+ type CreateOrgTemplateResult = AxiosResponse<Template>;
719
+ type DeleteTemplateResult = AxiosResponse<void>;
720
+ type GetTemplateResult = AxiosResponse<Template>;
721
+ type UpdateTemplateResult = AxiosResponse<Template>;
722
+ type DeleteCurrentUserResult = AxiosResponse<void>;
723
+ type GetCurrentUserResult = AxiosResponse<User>;
724
+ type UpdateCurrentUserResult = AxiosResponse<User>;
725
+ type ListUserAgentsResult = AxiosResponse<PageResponseAgent>;
726
+ type CreateUserAgentResult = AxiosResponse<Agent>;
727
+ type UpdateCurrentUserEmailResult = AxiosResponse<User>;
728
+ type ListUserTemplatesResult = AxiosResponse<PageResponseTemplate>;
729
+ type CreateUserTemplateResult = AxiosResponse<Template>;
730
+ type GetUserResult = AxiosResponse<User>;
245
731
  /**
246
732
  * Initializes a new conversational session.
247
733
  * It must be the first message sent after connection establishment.
@@ -539,251 +1025,77 @@ declare class ConversationSession {
539
1025
  */
540
1026
  close(): void;
541
1027
  }
542
- type Conversation = {
543
- id: string
544
- agent_id: string
545
- started_at: Date
546
- ended_at?: Date
547
- };
548
- /**
549
- * Configuration parameters for fetching a list of past conversations.
550
- */
551
- type ConversationListParams = {
552
- /** Agent ID to filter the conversations by */
553
- agentId: string
554
- /** Number of results per page (defaults to 20) */
555
- limit?: number
556
- /** Page number, 1-indexed (defaults to 1) */
557
- page?: number
558
- };
559
- /**
560
- * Configuration parameters for connecting to an agent and establishing a session.
561
- */
562
1028
  type ConversationConnectParams = ConversationSessionConfig & {
563
1029
  /** The unique ID of the agent to connect to */
564
1030
  agentId: string
565
- /**
566
- * Optional callback invoked during the initial handshake phase.
567
- * Can be used to hook into successful or failed connection attempts before the session object is returned.
568
- */
1031
+ /** Optional callback invoked during the initial handshake phase */
569
1032
  onConnection?: (event: ServerConnectionMessage) => void
570
1033
  };
571
1034
  /**
572
- * Client service for managing conversational records and establishing real-time WebSocket sessions.
1035
+ * Provides real-time WebSocket session management for Kivox agents.
1036
+ * REST operations (list, get) are handled directly via the Kiota client.
573
1037
  *
574
1038
  * @example
575
1039
  * ```ts
576
- * // Connect to a Kivox agent
577
- * const session = await kivox.conversations.connect({
578
- * agentId: 'agent-123',
579
- * onEvent: (event) => {
580
- * if (event.type === 'text_delta') {
581
- * console.log(event.chunk);
582
- * } else if (event.type === 'audio_delta') {
583
- * audioPlayer.enqueue(event.audio);
584
- * }
585
- * }
1040
+ * const session = await kivox.realtime.connect({
1041
+ * agentId: 'agent-123',
1042
+ * onEvent: (event) => {
1043
+ * if (event.type === 'text_delta') console.log(event.chunk);
1044
+ * }
586
1045
  * });
587
- *
588
1046
  * session.sendText('Hello!');
589
1047
  * ```
590
1048
  */
591
- declare class ConversationClient {
592
- private readonly http;
593
- private readonly ws;
594
- /**
595
- * Instantiates a new ConversationClient.
596
- * @param http The HTTP transport for REST endpoints.
597
- * @param ws The WebSocket transport factory.
598
- */
599
- constructor(http: HttpTransport, ws: WebSocketTransport);
600
- /**
601
- * Retrieves a paginated list of past conversations for a specific agent.
602
- *
603
- * @param params Query parameters for pagination and filtering.
604
- * @returns A promise resolving to a paginated list of conversations.
605
- */
606
- list(params: ConversationListParams): Promise<Paginated<Conversation[]>>;
607
- /**
608
- * Retrieves the details of a single conversation by its ID.
609
- *
610
- * @param id The unique identifier of the conversation.
611
- * @returns A promise resolving to the conversation data.
612
- */
613
- get(id: string): Promise<Conversation>;
1049
+ declare class RealtimeClient {
1050
+ private;
1051
+ /** @internal */
1052
+ constructor(baseUrl: string);
614
1053
  /**
615
- * Establishes a real-time WebSocket session with an agent.
616
- * Handles the handshake protocol and returns an active session instance.
1054
+ * Establishes a real-time WebSocket session with a Kivox agent.
1055
+ * Authentication is passed as a query parameter since browser WebSockets
1056
+ * do not support custom headers.
617
1057
  *
618
- * @param params Configuration for the connection and subsequent session.
619
- * @returns A promise resolving to an active `ConversationSession`.
1058
+ * @param params - Connection and session configuration.
1059
+ * @returns A promise resolving to an active {@link ConversationSession}.
620
1060
  * @throws {Error} If the handshake fails or the connection drops during negotiation.
621
1061
  */
622
1062
  connect(params: ConversationConnectParams): Promise<ConversationSession>;
623
1063
  }
624
- type MessageRole = "system" | "user" | "assistant";
625
- type Message = {
626
- id: string
627
- conversation_id: string
628
- role: MessageRole
629
- content: string
630
- created_at: Date
1064
+ type KivoxClient = typeof exports_api & {
1065
+ realtime: RealtimeClient
631
1066
  };
632
- /**
633
- * Configuration for listing messages.
634
- */
635
- type MessageListParams = {
636
- /** Conversation ID to filter by */
637
- conversationId?: string
638
- /** Number of results per page */
639
- limit?: number
640
- /** Page number (1-indexed) */
641
- page?: number
642
- };
643
- /**
644
- * Client for interacting with conversation messages.
645
- *
646
- * @example
647
- * ```ts
648
- * const messages = await kivox.messages.list({
649
- * conversationId: 'conv-123'
650
- * });
651
- * ```
652
- */
653
- declare class MessageClient {
654
- private readonly http;
655
- constructor(http: HttpTransport);
656
- /**
657
- * Lists messages with optional filtering and pagination.
658
- *
659
- * @param params List configuration
660
- * @returns Paginated list of messages
661
- */
662
- list(params?: MessageListParams): Promise<Paginated<Message[]>>;
663
- /**
664
- * Gets a single message by ID.
665
- *
666
- * @param id Message ID
667
- * @returns Message details
668
- */
669
- get(id: string): Promise<Message>;
670
- }
671
- type Template = {
672
- id: string
673
- name: string
674
- description?: string
675
- ork_source: string
676
- created_at: Date
677
- updated_at: Date
1067
+ type SessionClientOptions = {
1068
+ /** Base URL of the Kivox API. Defaults to 'https://server.kivox.com.co'. */
1069
+ baseUrl?: string
678
1070
  };
679
- type TemplateCreate = Pick<Template, "name" | "description" | "ork_source">;
680
- type TemplateUpdate = Partial<TemplateCreate>;
681
- /**
682
- * Configuration for listing templates.
683
- */
684
- type TemplateListParams = {
685
- /** Number of results per page */
686
- limit?: number
687
- /** Page number (1-indexed) */
688
- page?: number
1071
+ type ApiKeyClientOptions = {
1072
+ /** API key used for Bearer token authentication. */
1073
+ apiKey: string
1074
+ /** Base URL of the Kivox API. Defaults to 'https://server.kivox.com.co'. */
1075
+ baseUrl?: string
689
1076
  };
690
1077
  /**
691
- * Client for interacting with Kivox templates.
1078
+ * Creates a Kivox client for browser-based Studio usage.
1079
+ * Authenticates via HttpOnly session cookie — no token required in JS.
1080
+ * Requires the user to be logged in via `POST /auth/sessions` first.
692
1081
  *
693
1082
  * @example
694
1083
  * ```ts
695
- * const templates = await kivox.templates.list();
696
- * const template = await kivox.templates.get('template-123');
1084
+ * const client = createSessionClient();
1085
+ * await client.postAuthSessions({ email, password });
1086
+ * const { data: agents } = await client.getUsersMeAgents();
697
1087
  * ```
698
1088
  */
699
- declare class TemplateClient {
700
- private readonly http;
701
- constructor(http: HttpTransport);
702
- /**
703
- * Lists all templates with optional filtering and pagination.
704
- *
705
- * @param params List configuration
706
- * @returns Paginated list of templates
707
- */
708
- list(params?: TemplateListParams): Promise<Paginated<Template[]>>;
709
- /**
710
- * Gets a single template by ID.
711
- *
712
- * @param id Template ID
713
- * @returns Template details
714
- */
715
- get(id: string): Promise<Template>;
716
- /**
717
- * Creates a new template.
718
- *
719
- * @param data Template data
720
- * @returns Created template
721
- */
722
- create(data: TemplateCreate): Promise<Template>;
723
- /**
724
- * Updates an existing template.
725
- *
726
- * @param id Template ID
727
- * @param data Updated template data
728
- * @returns Updated template
729
- */
730
- update(id: string, data: TemplateUpdate): Promise<Template>;
731
- /**
732
- * Deletes a template.
733
- *
734
- * @param id Template ID
735
- */
736
- delete(id: string): Promise<void>;
737
- }
738
- /**
739
- * Configuration for the Kivox client.
740
- */
741
- type KivoxConfig = {
742
- /**
743
- * Base URL of your self-hosted Kivox instance.
744
- * @example 'http://localhost:8787'
745
- * @example 'https://api.kivox.io'
746
- */
747
- baseUrl: string
748
- /**
749
- * Optional headers to include with all requests.
750
- * @example { Authorization: 'Bearer token' }
751
- */
752
- headers?: Record<string, string>
753
- };
1089
+ declare function createSessionClient({ baseUrl }?: SessionClientOptions): KivoxClient;
754
1090
  /**
755
- * Main Kivox client.
756
- * Provides unified access to all Kivox resources.
1091
+ * Creates a Kivox client for programmatic / server-side usage.
1092
+ * Authenticates via `Authorization: Bearer <apiKey>` on every request.
757
1093
  *
758
1094
  * @example
759
1095
  * ```ts
760
- * import { KivoxClient } from '@kivox/client';
761
- *
762
- * const kivox = new KivoxClient({
763
- * baseUrl: 'http://localhost:8787',
764
- * });
765
- *
766
- * // List agents
767
- * const agents = await kivox.agents.list();
768
- *
769
- * // Start a conversation
770
- * const session = await kivox.conversations.connect({
771
- * agentId: '019bb51e-e45f-75e3-b828-94fdf231711e',
772
- * onEvent: (event) => {
773
- * console.log(event);
774
- * }
775
- * });
1096
+ * const client = createApiKeyClient({ apiKey: 'sk_live_...' });
1097
+ * const { data: agents } = await client.getUsersMeAgents();
776
1098
  * ```
777
1099
  */
778
- declare class KivoxClient {
779
- /** Agent resource client */
780
- readonly agents: AgentClient;
781
- /** Conversation resource client */
782
- readonly conversations: ConversationClient;
783
- /** Template resource client */
784
- readonly templates: TemplateClient;
785
- /** Message resource client */
786
- readonly messages: MessageClient;
787
- constructor(config: KivoxConfig);
788
- }
789
- export { TemplateUpdate, TemplateCreate, Template, SessionConnectionLostEvent, ServerTurnComplete, ServerTick, ServerTextFull, ServerTextDelta, ServerSessionEvent, ServerSessionClosed, ServerMessage, ServerHandshakeOK, ServerHandshakeError, ServerFlowComplete, ServerError, ServerConnectionMessage, ServerAudioDelta, Paginated, MessageRole, Message, KivoxConfig, KivoxClient, HttpTransportError, ConversationTransportError, ConversationSessionConfig, ConversationSession, Conversation, ClientMessage, ClientInputText, ClientInputAudioStream, ClientInputAudio, ClientHandshake, ClientEndSession, ClientCancel, AgentUpdate, AgentStatus, AgentSecret, AgentCreate, AgentConfig, AgentCompilationDiagnostic, Agent };
1100
+ declare function createApiKeyClient({ apiKey, baseUrl }: ApiKeyClientOptions): KivoxClient;
1101
+ export { updateTemplate, updateOrgMember, updateOrg, updateCurrentUserEmail, updateCurrentUser, updateAgentStatus, updateAgent, signup, revokeApiKey, removeOrgMember, logoutAll, logout, login, listUserTemplates, listUserAgents, listOrgs, listOrgTemplates, listOrgMembers, listOrgAgents, listMessages, listConversations, listApiKeys, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createSessionClient, createOrgTemplate, createOrgAgent, createOrg, createApiKeyClient, createApiKey, compileAgent, addOrgMember, User, UpdateTemplateResult, UpdateTemplateBody, UpdateStatusBodyStatus, UpdateStatusBody, UpdateOrgResult, UpdateOrgMemberResult, UpdateOrgBody, UpdateMemberBodyRole, UpdateMemberBody, UpdateCurrentUserResult, UpdateCurrentUserEmailResult, UpdateCurrentUserEmailBody, UpdateCurrentUserBody, UpdateAgentStatusResult, UpdateAgentResult, UpdateAgentBody, Template, SignupResult, SignupBody, SessionResponse, SessionConnectionLostEvent, SessionClientOptions, ServerTurnComplete, ServerTick, ServerTextFull, ServerTextDelta, ServerSessionEvent, ServerSessionClosed, ServerMessage, ServerHandshakeOK, ServerHandshakeError, ServerFlowComplete, ServerError, ServerConnectionMessage, ServerAudioDelta, Secret, Safeguards, RevokeApiKeyResult, RemoveOrgMemberResult, PageResponseTemplate, PageResponseAgent, Org, Message, Member, LogoutResult, LogoutAllResult, LoginResult, LoginBody, ListUserTemplatesResult, ListUserTemplatesParams, ListUserAgentsResult, ListUserAgentsParams, ListOrgsResult, ListOrgTemplatesResult, ListOrgTemplatesParams, ListOrgMembersResult, ListOrgAgentsResult, ListOrgAgentsParams, ListMessagesResult, ListMessagesParams, ListConversationsResult, ListConversationsParams, ListApiKeysResult, KivoxClient, GetUserResult, GetTemplateResult, GetOrgResult, GetCurrentUserResult, GetConversationResult, GetAgentResult, ErrorModel, ErrorDetail, DeleteTemplateResult, DeleteOrgResult, DeleteCurrentUserResult, DeleteConversationResult, DeleteAgentResult, CursorResponseMessage, CursorResponseConversation, CreateUserTemplateResult, CreateUserAgentResult, CreateTemplateBody, CreateOrgTemplateResult, CreateOrgResult, CreateOrgBody, CreateOrgAgentResult, CreateApiKeyResult, CreateAgentBody, CreateAPIKeyBody, ConversationTransportError, ConversationSessionConfig, ConversationSession, Conversation, Config, CompileDiagnostics, CompileBody, CompileAgentResult, ClientMessage, ClientInputText, ClientInputAudioStream, ClientInputAudio, ClientHandshake, ClientEndSession, ClientCancel, ApiKeyClientOptions, Agent, AddOrgMemberResult, AddMemberBodyRole, AddMemberBody, APIKeyResponse, APIKey };