@kivox/client 0.1.0-beta.33 → 0.1.0-beta.35
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 +187 -270
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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, lintAgent, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createOrgTemplate, createOrgAgent, createOrg, createApiKey, addOrgMember, User,
|
|
2
|
+
export { updateTemplate, updateOrgMember, updateOrg, updateCurrentUserEmail, updateCurrentUser, updateAgentStatus, updateAgent, signup, revokeApiKey, removeOrgMember, logoutAll, logout, login, listUserTemplates, listUserAgents, listOrgs, listOrgTemplates, listOrgMembers, listOrgAgents, listMessages, listConversations, listApiKeys, lintAgent, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createOrgTemplate, createOrgAgent, createOrg, createApiKey, addOrgMember, User, UpdateUserInBody, UpdateTemplateResult, UpdateTemplateInBody, UpdateOrgResult, UpdateOrgMemberResult, UpdateOrgInBody, UpdateMemberInBodyRole, UpdateMemberInBody, UpdateEmailInBody, UpdateCurrentUserResult, UpdateCurrentUserEmailResult, UpdateAgentStatusResult, UpdateAgentStatusInBodyStatus, UpdateAgentStatusInBody, UpdateAgentResult, UpdateAgentInBody, Template, SignupResult, SignupInBody, RevokeApiKeyResult, RemoveOrgMemberResult, PageResponseTemplate, PageResponseAgent, OrgMember, Org, LogoutResult, LogoutAllResult, LoginResult, LoginInBody, ListUserTemplatesResult, ListUserTemplatesParams, ListUserAgentsResult, ListUserAgentsParams, ListOrgsResult, ListOrgTemplatesResult, ListOrgTemplatesParams, ListOrgMembersResult, ListOrgAgentsResult, ListOrgAgentsParams, ListMessagesResult, ListMessagesParams, ListConversationsResult, ListConversationsParams, ListApiKeysResult, LintAgentResult, LintAgentInBody, GetUserResult, GetTemplateResult, GetOrgResult, GetCurrentUserResult, GetConversationResult, GetAgentResult, ErrorModel, ErrorDetail, DeleteTemplateResult, DeleteOrgResult, DeleteCurrentUserResult, DeleteConversationResult, DeleteAgentResult, CursorResponseConversationMessage, CursorResponseConversation, CreateUserTemplateResult, CreateUserTemplateInBody, CreateUserAgentResult, CreateUserAgentInBody, CreateOrgTemplateResult, CreateOrgTemplateInBody, CreateOrgResult, CreateOrgInBody, CreateOrgAgentResult, CreateOrgAgentInBody, CreateApiKeyResult, CreateAPIKeyInBody, ConversationMessage, Conversation, AuthSessionResponse, AuthAPIKeyResponse, AuthAPIKey, AgentSecret, AgentSafeguards, AgentLintDiagnostics, AgentConfig, Agent, AddOrgMemberResult, AddMemberInBodyRole, AddMemberInBody };
|
|
3
3
|
}
|
|
4
4
|
import { AxiosRequestConfig, AxiosResponse } from "axios";
|
|
5
5
|
type IfEquals<
|
|
@@ -13,52 +13,19 @@ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
|
13
13
|
type DistributeReadOnlyOverUnions<T> = T extends any ? NonReadonly<T> : never;
|
|
14
14
|
type Writable<T> = Pick<T, WritableKeys<T>>;
|
|
15
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
|
-
|
|
17
|
-
|
|
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
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Role to assign
|
|
46
|
-
*/
|
|
47
|
-
type AddMemberBodyRole = typeof AddMemberBodyRole[keyof typeof AddMemberBodyRole];
|
|
48
|
-
declare const AddMemberBodyRole: {
|
|
16
|
+
type AddMemberInBodyRole = typeof AddMemberInBodyRole[keyof typeof AddMemberInBodyRole];
|
|
17
|
+
declare const AddMemberInBodyRole: {
|
|
49
18
|
readonly admin: "admin"
|
|
50
19
|
readonly member: "member"
|
|
51
20
|
readonly viewer: "viewer"
|
|
52
21
|
};
|
|
53
|
-
interface
|
|
22
|
+
interface AddMemberInBody {
|
|
54
23
|
/** A URL to the JSON Schema for this object. */
|
|
55
24
|
readonly $schema?: string;
|
|
56
|
-
|
|
57
|
-
role: AddMemberBodyRole;
|
|
58
|
-
/** User to add */
|
|
25
|
+
role: AddMemberInBodyRole;
|
|
59
26
|
user_id: string;
|
|
60
27
|
}
|
|
61
|
-
interface
|
|
28
|
+
interface AgentConfig {
|
|
62
29
|
allow_interruptions?: boolean;
|
|
63
30
|
avatar_url?: string;
|
|
64
31
|
description?: string;
|
|
@@ -69,8 +36,9 @@ interface Config {
|
|
|
69
36
|
max_session_duration_minutes?: number;
|
|
70
37
|
max_silence_timeout_seconds?: number;
|
|
71
38
|
name: string;
|
|
39
|
+
timezone?: string;
|
|
72
40
|
}
|
|
73
|
-
interface
|
|
41
|
+
interface AgentSafeguards {
|
|
74
42
|
max_calls: number;
|
|
75
43
|
max_http_calls: number;
|
|
76
44
|
max_llm_calls: number;
|
|
@@ -79,17 +47,61 @@ interface Safeguards {
|
|
|
79
47
|
interface Agent {
|
|
80
48
|
/** A URL to the JSON Schema for this object. */
|
|
81
49
|
readonly $schema?: string;
|
|
82
|
-
config:
|
|
50
|
+
config: AgentConfig;
|
|
83
51
|
created_at: string;
|
|
84
52
|
id: string;
|
|
85
53
|
ork_source: string;
|
|
86
54
|
owner_org_id?: string;
|
|
87
55
|
owner_user_id?: string;
|
|
88
|
-
safeguards:
|
|
56
|
+
safeguards: AgentSafeguards;
|
|
89
57
|
status: string;
|
|
90
58
|
template_id?: string;
|
|
91
59
|
updated_at: string;
|
|
92
60
|
}
|
|
61
|
+
interface AgentLintDiagnostics {
|
|
62
|
+
/** A URL to the JSON Schema for this object. */
|
|
63
|
+
readonly $schema?: string;
|
|
64
|
+
/** @nullable */
|
|
65
|
+
errors: string[] | null;
|
|
66
|
+
}
|
|
67
|
+
interface AgentSecret {
|
|
68
|
+
description?: string;
|
|
69
|
+
key: string;
|
|
70
|
+
value: string;
|
|
71
|
+
}
|
|
72
|
+
interface AuthAPIKey {
|
|
73
|
+
created_at: string;
|
|
74
|
+
created_by_user_id: string;
|
|
75
|
+
/** @nullable */
|
|
76
|
+
expires_at: string | null;
|
|
77
|
+
id: string;
|
|
78
|
+
/** @nullable */
|
|
79
|
+
last_used_at: string | null;
|
|
80
|
+
name: string;
|
|
81
|
+
owner_org_id: string;
|
|
82
|
+
owner_user_id: string;
|
|
83
|
+
prefix: string;
|
|
84
|
+
/** @nullable */
|
|
85
|
+
scopes: string[] | null;
|
|
86
|
+
}
|
|
87
|
+
interface AuthAPIKeyResponse {
|
|
88
|
+
/** A URL to the JSON Schema for this object. */
|
|
89
|
+
readonly $schema?: string;
|
|
90
|
+
created_at: string;
|
|
91
|
+
/** @nullable */
|
|
92
|
+
expires_at: string | null;
|
|
93
|
+
id: string;
|
|
94
|
+
key: string;
|
|
95
|
+
name: string;
|
|
96
|
+
prefix: string;
|
|
97
|
+
/** @nullable */
|
|
98
|
+
scopes: string[] | null;
|
|
99
|
+
}
|
|
100
|
+
interface AuthSessionResponse {
|
|
101
|
+
/** A URL to the JSON Schema for this object. */
|
|
102
|
+
readonly $schema?: string;
|
|
103
|
+
expires_at: string;
|
|
104
|
+
}
|
|
93
105
|
interface Conversation {
|
|
94
106
|
/** A URL to the JSON Schema for this object. */
|
|
95
107
|
readonly $schema?: string;
|
|
@@ -101,81 +113,73 @@ interface Conversation {
|
|
|
101
113
|
status: string;
|
|
102
114
|
summary?: string;
|
|
103
115
|
}
|
|
104
|
-
interface
|
|
116
|
+
interface ConversationMessage {
|
|
117
|
+
content: string;
|
|
118
|
+
conversation_id: string;
|
|
119
|
+
created_at: string;
|
|
120
|
+
id: string;
|
|
121
|
+
role: string;
|
|
122
|
+
}
|
|
123
|
+
interface CreateAPIKeyInBody {
|
|
105
124
|
/** A URL to the JSON Schema for this object. */
|
|
106
125
|
readonly $schema?: string;
|
|
107
|
-
/** Optional expiration time */
|
|
108
126
|
expires_at?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Human-readable key name
|
|
111
|
-
* @maxLength 50
|
|
112
|
-
*/
|
|
127
|
+
/** @maxLength 50 */
|
|
113
128
|
name: string;
|
|
114
|
-
/**
|
|
115
|
-
* Permission scopes (empty = full access)
|
|
116
|
-
* @nullable
|
|
117
|
-
*/
|
|
129
|
+
/** @nullable */
|
|
118
130
|
scopes?: string[] | null;
|
|
119
131
|
}
|
|
120
|
-
interface
|
|
121
|
-
description?: string;
|
|
122
|
-
key: string;
|
|
123
|
-
value: string;
|
|
124
|
-
}
|
|
125
|
-
interface CreateAgentBody {
|
|
132
|
+
interface CreateOrgAgentInBody {
|
|
126
133
|
/** A URL to the JSON Schema for this object. */
|
|
127
134
|
readonly $schema?: string;
|
|
128
|
-
|
|
129
|
-
config?: Config;
|
|
130
|
-
/** Orchestration source */
|
|
135
|
+
config?: AgentConfig;
|
|
131
136
|
ork_source?: string;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/** Encrypted secrets */
|
|
135
|
-
secrets?: Secret[];
|
|
136
|
-
/** Optional source template */
|
|
137
|
+
safeguards?: AgentSafeguards;
|
|
138
|
+
secrets?: AgentSecret[];
|
|
137
139
|
template_id?: string;
|
|
138
140
|
}
|
|
139
|
-
interface
|
|
141
|
+
interface CreateOrgInBody {
|
|
140
142
|
/** A URL to the JSON Schema for this object. */
|
|
141
143
|
readonly $schema?: string;
|
|
142
|
-
/**
|
|
143
|
-
* Organization description
|
|
144
|
-
* @maxLength 2048
|
|
145
|
-
*/
|
|
144
|
+
/** @maxLength 2048 */
|
|
146
145
|
description?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Organization name
|
|
149
|
-
* @maxLength 256
|
|
150
|
-
*/
|
|
146
|
+
/** @maxLength 256 */
|
|
151
147
|
name: string;
|
|
152
|
-
/**
|
|
153
|
-
* URL-safe slug
|
|
154
|
-
* @pattern ^[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]$
|
|
155
|
-
*/
|
|
148
|
+
/** @pattern ^[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]$ */
|
|
156
149
|
slug: string;
|
|
157
150
|
}
|
|
158
|
-
interface
|
|
151
|
+
interface CreateOrgTemplateInBody {
|
|
159
152
|
/** A URL to the JSON Schema for this object. */
|
|
160
153
|
readonly $schema?: string;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Template description
|
|
165
|
-
* @maxLength 2048
|
|
166
|
-
*/
|
|
154
|
+
config?: AgentConfig;
|
|
155
|
+
/** @maxLength 2048 */
|
|
167
156
|
description?: string;
|
|
168
|
-
/**
|
|
169
|
-
* Template name
|
|
170
|
-
* @maxLength 256
|
|
171
|
-
*/
|
|
157
|
+
/** @maxLength 256 */
|
|
172
158
|
name: string;
|
|
173
|
-
/** Orchestration source */
|
|
174
159
|
ork_source?: string;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
160
|
+
safeguards?: AgentSafeguards;
|
|
161
|
+
secrets?: AgentSecret[];
|
|
162
|
+
}
|
|
163
|
+
interface CreateUserAgentInBody {
|
|
164
|
+
/** A URL to the JSON Schema for this object. */
|
|
165
|
+
readonly $schema?: string;
|
|
166
|
+
config?: AgentConfig;
|
|
167
|
+
ork_source?: string;
|
|
168
|
+
safeguards?: AgentSafeguards;
|
|
169
|
+
secrets?: AgentSecret[];
|
|
170
|
+
template_id?: string;
|
|
171
|
+
}
|
|
172
|
+
interface CreateUserTemplateInBody {
|
|
173
|
+
/** A URL to the JSON Schema for this object. */
|
|
174
|
+
readonly $schema?: string;
|
|
175
|
+
config?: AgentConfig;
|
|
176
|
+
/** @maxLength 2048 */
|
|
177
|
+
description?: string;
|
|
178
|
+
/** @maxLength 256 */
|
|
179
|
+
name: string;
|
|
180
|
+
ork_source?: string;
|
|
181
|
+
safeguards?: AgentSafeguards;
|
|
182
|
+
secrets?: AgentSecret[];
|
|
179
183
|
}
|
|
180
184
|
interface CursorResponseConversation {
|
|
181
185
|
/** A URL to the JSON Schema for this object. */
|
|
@@ -185,19 +189,12 @@ interface CursorResponseConversation {
|
|
|
185
189
|
items: Conversation[] | null;
|
|
186
190
|
next_cursor: string;
|
|
187
191
|
}
|
|
188
|
-
interface
|
|
189
|
-
content: string;
|
|
190
|
-
conversation_id: string;
|
|
191
|
-
created_at: string;
|
|
192
|
-
id: string;
|
|
193
|
-
role: string;
|
|
194
|
-
}
|
|
195
|
-
interface CursorResponseMessage {
|
|
192
|
+
interface CursorResponseConversationMessage {
|
|
196
193
|
/** A URL to the JSON Schema for this object. */
|
|
197
194
|
readonly $schema?: string;
|
|
198
195
|
has_more: boolean;
|
|
199
196
|
/** @nullable */
|
|
200
|
-
items:
|
|
197
|
+
items: ConversationMessage[] | null;
|
|
201
198
|
next_cursor: string;
|
|
202
199
|
}
|
|
203
200
|
interface ErrorDetail {
|
|
@@ -227,38 +224,18 @@ interface ErrorModel {
|
|
|
227
224
|
/** A URI reference to human-readable documentation for the error. */
|
|
228
225
|
type?: string;
|
|
229
226
|
}
|
|
230
|
-
interface
|
|
227
|
+
interface LintAgentInBody {
|
|
231
228
|
/** A URL to the JSON Schema for this object. */
|
|
232
229
|
readonly $schema?: string;
|
|
233
|
-
/** Source to lint; defaults to the agent's stored source */
|
|
234
230
|
source?: string;
|
|
235
231
|
}
|
|
236
|
-
interface
|
|
232
|
+
interface LoginInBody {
|
|
237
233
|
/** A URL to the JSON Schema for this object. */
|
|
238
234
|
readonly $schema?: string;
|
|
239
|
-
/** @nullable */
|
|
240
|
-
errors: string[] | null;
|
|
241
|
-
}
|
|
242
|
-
interface LoginBody {
|
|
243
|
-
/** A URL to the JSON Schema for this object. */
|
|
244
|
-
readonly $schema?: string;
|
|
245
|
-
/** Account email */
|
|
246
235
|
email: string;
|
|
247
|
-
/**
|
|
248
|
-
* Account password
|
|
249
|
-
* @minLength 8
|
|
250
|
-
*/
|
|
236
|
+
/** @minLength 8 */
|
|
251
237
|
password: string;
|
|
252
238
|
}
|
|
253
|
-
interface Member {
|
|
254
|
-
/** A URL to the JSON Schema for this object. */
|
|
255
|
-
readonly $schema?: string;
|
|
256
|
-
created_at: string;
|
|
257
|
-
org_id: string;
|
|
258
|
-
role: string;
|
|
259
|
-
updated_at: string;
|
|
260
|
-
user_id: string;
|
|
261
|
-
}
|
|
262
239
|
interface Org {
|
|
263
240
|
/** A URL to the JSON Schema for this object. */
|
|
264
241
|
readonly $schema?: string;
|
|
@@ -274,6 +251,15 @@ interface Org {
|
|
|
274
251
|
tier: string;
|
|
275
252
|
updated_at: string;
|
|
276
253
|
}
|
|
254
|
+
interface OrgMember {
|
|
255
|
+
/** A URL to the JSON Schema for this object. */
|
|
256
|
+
readonly $schema?: string;
|
|
257
|
+
created_at: string;
|
|
258
|
+
org_id: string;
|
|
259
|
+
role: string;
|
|
260
|
+
updated_at: string;
|
|
261
|
+
user_id: string;
|
|
262
|
+
}
|
|
277
263
|
interface PageResponseAgent {
|
|
278
264
|
/** A URL to the JSON Schema for this object. */
|
|
279
265
|
readonly $schema?: string;
|
|
@@ -286,7 +272,7 @@ interface PageResponseAgent {
|
|
|
286
272
|
interface Template {
|
|
287
273
|
/** A URL to the JSON Schema for this object. */
|
|
288
274
|
readonly $schema?: string;
|
|
289
|
-
config:
|
|
275
|
+
config: AgentConfig;
|
|
290
276
|
created_at: string;
|
|
291
277
|
description?: string;
|
|
292
278
|
id: string;
|
|
@@ -294,7 +280,7 @@ interface Template {
|
|
|
294
280
|
ork_source: string;
|
|
295
281
|
owner_org_id?: string;
|
|
296
282
|
owner_user_id?: string;
|
|
297
|
-
safeguards:
|
|
283
|
+
safeguards: AgentSafeguards;
|
|
298
284
|
updated_at: string;
|
|
299
285
|
}
|
|
300
286
|
interface PageResponseTemplate {
|
|
@@ -306,124 +292,78 @@ interface PageResponseTemplate {
|
|
|
306
292
|
page: number;
|
|
307
293
|
total: number;
|
|
308
294
|
}
|
|
309
|
-
interface
|
|
295
|
+
interface SignupInBody {
|
|
310
296
|
/** A URL to the JSON Schema for this object. */
|
|
311
297
|
readonly $schema?: string;
|
|
312
|
-
expires_at: string;
|
|
313
|
-
}
|
|
314
|
-
interface SignupBody {
|
|
315
|
-
/** A URL to the JSON Schema for this object. */
|
|
316
|
-
readonly $schema?: string;
|
|
317
|
-
/** Account email */
|
|
318
298
|
email: string;
|
|
319
|
-
/**
|
|
320
|
-
* Display name
|
|
321
|
-
* @maxLength 50
|
|
322
|
-
*/
|
|
299
|
+
/** @maxLength 50 */
|
|
323
300
|
name: string;
|
|
324
|
-
/**
|
|
325
|
-
* Account password
|
|
326
|
-
* @minLength 8
|
|
327
|
-
*/
|
|
301
|
+
/** @minLength 8 */
|
|
328
302
|
password: string;
|
|
329
303
|
}
|
|
330
|
-
interface
|
|
304
|
+
interface UpdateAgentInBody {
|
|
331
305
|
/** A URL to the JSON Schema for this object. */
|
|
332
306
|
readonly $schema?: string;
|
|
333
|
-
|
|
334
|
-
config?: Config;
|
|
335
|
-
/** Orchestration source */
|
|
307
|
+
config?: AgentConfig;
|
|
336
308
|
ork_source?: string;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
/** Encrypted secrets */
|
|
340
|
-
secrets?: Secret[];
|
|
309
|
+
safeguards?: AgentSafeguards;
|
|
310
|
+
secrets?: AgentSecret[];
|
|
341
311
|
}
|
|
342
|
-
|
|
312
|
+
type UpdateAgentStatusInBodyStatus = typeof UpdateAgentStatusInBodyStatus[keyof typeof UpdateAgentStatusInBodyStatus];
|
|
313
|
+
declare const UpdateAgentStatusInBodyStatus: {
|
|
314
|
+
readonly draft: "draft"
|
|
315
|
+
readonly live: "live"
|
|
316
|
+
readonly archived: "archived"
|
|
317
|
+
};
|
|
318
|
+
interface UpdateAgentStatusInBody {
|
|
343
319
|
/** A URL to the JSON Schema for this object. */
|
|
344
320
|
readonly $schema?: string;
|
|
345
|
-
|
|
346
|
-
avatar_url?: string;
|
|
347
|
-
/**
|
|
348
|
-
* Display name
|
|
349
|
-
* @maxLength 256
|
|
350
|
-
*/
|
|
351
|
-
name?: string;
|
|
321
|
+
status: UpdateAgentStatusInBodyStatus;
|
|
352
322
|
}
|
|
353
|
-
interface
|
|
323
|
+
interface UpdateEmailInBody {
|
|
354
324
|
/** A URL to the JSON Schema for this object. */
|
|
355
325
|
readonly $schema?: string;
|
|
356
|
-
/** New email address */
|
|
357
326
|
email: string;
|
|
358
327
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
*/
|
|
362
|
-
type UpdateMemberBodyRole = typeof UpdateMemberBodyRole[keyof typeof UpdateMemberBodyRole];
|
|
363
|
-
declare const UpdateMemberBodyRole: {
|
|
328
|
+
type UpdateMemberInBodyRole = typeof UpdateMemberInBodyRole[keyof typeof UpdateMemberInBodyRole];
|
|
329
|
+
declare const UpdateMemberInBodyRole: {
|
|
364
330
|
readonly owner: "owner"
|
|
365
331
|
readonly admin: "admin"
|
|
366
332
|
readonly member: "member"
|
|
367
333
|
readonly viewer: "viewer"
|
|
368
334
|
};
|
|
369
|
-
interface
|
|
335
|
+
interface UpdateMemberInBody {
|
|
370
336
|
/** A URL to the JSON Schema for this object. */
|
|
371
337
|
readonly $schema?: string;
|
|
372
|
-
|
|
373
|
-
role: UpdateMemberBodyRole;
|
|
338
|
+
role: UpdateMemberInBodyRole;
|
|
374
339
|
}
|
|
375
|
-
interface
|
|
340
|
+
interface UpdateOrgInBody {
|
|
376
341
|
/** A URL to the JSON Schema for this object. */
|
|
377
342
|
readonly $schema?: string;
|
|
378
|
-
/** Avatar URL */
|
|
379
343
|
avatar_url?: string;
|
|
380
|
-
/**
|
|
381
|
-
* Organization description
|
|
382
|
-
* @maxLength 2048
|
|
383
|
-
*/
|
|
344
|
+
/** @maxLength 2048 */
|
|
384
345
|
description?: string;
|
|
385
|
-
/**
|
|
386
|
-
* Organization name
|
|
387
|
-
* @maxLength 256
|
|
388
|
-
*/
|
|
346
|
+
/** @maxLength 256 */
|
|
389
347
|
name?: string;
|
|
390
348
|
}
|
|
391
|
-
|
|
392
|
-
* Target lifecycle state
|
|
393
|
-
*/
|
|
394
|
-
type UpdateStatusBodyStatus = typeof UpdateStatusBodyStatus[keyof typeof UpdateStatusBodyStatus];
|
|
395
|
-
declare const UpdateStatusBodyStatus: {
|
|
396
|
-
readonly draft: "draft"
|
|
397
|
-
readonly live: "live"
|
|
398
|
-
readonly archived: "archived"
|
|
399
|
-
};
|
|
400
|
-
interface UpdateStatusBody {
|
|
349
|
+
interface UpdateTemplateInBody {
|
|
401
350
|
/** A URL to the JSON Schema for this object. */
|
|
402
351
|
readonly $schema?: string;
|
|
403
|
-
|
|
404
|
-
|
|
352
|
+
config?: AgentConfig;
|
|
353
|
+
/** @maxLength 2048 */
|
|
354
|
+
description?: string;
|
|
355
|
+
/** @maxLength 256 */
|
|
356
|
+
name?: string;
|
|
357
|
+
ork_source?: string;
|
|
358
|
+
safeguards?: AgentSafeguards;
|
|
359
|
+
secrets?: AgentSecret[];
|
|
405
360
|
}
|
|
406
|
-
interface
|
|
361
|
+
interface UpdateUserInBody {
|
|
407
362
|
/** A URL to the JSON Schema for this object. */
|
|
408
363
|
readonly $schema?: string;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* Template description
|
|
413
|
-
* @maxLength 2048
|
|
414
|
-
*/
|
|
415
|
-
description?: string;
|
|
416
|
-
/**
|
|
417
|
-
* Template name
|
|
418
|
-
* @maxLength 256
|
|
419
|
-
*/
|
|
364
|
+
avatar_url?: string;
|
|
365
|
+
/** @maxLength 256 */
|
|
420
366
|
name?: string;
|
|
421
|
-
/** Orchestration source */
|
|
422
|
-
ork_source?: string;
|
|
423
|
-
/** Resource limits */
|
|
424
|
-
safeguards?: Safeguards;
|
|
425
|
-
/** Encrypted secrets */
|
|
426
|
-
secrets?: Secret[];
|
|
427
367
|
}
|
|
428
368
|
interface User {
|
|
429
369
|
/** A URL to the JSON Schema for this object. */
|
|
@@ -437,24 +377,16 @@ interface User {
|
|
|
437
377
|
updated_at: string;
|
|
438
378
|
}
|
|
439
379
|
type ListConversationsParams = {
|
|
440
|
-
/**
|
|
441
|
-
* Cursor from the previous page
|
|
442
|
-
*/
|
|
443
380
|
after?: string
|
|
444
381
|
/**
|
|
445
|
-
* Page size
|
|
446
382
|
* @minimum 1
|
|
447
383
|
* @maximum 100
|
|
448
384
|
*/
|
|
449
385
|
limit?: number
|
|
450
386
|
};
|
|
451
387
|
type ListMessagesParams = {
|
|
452
|
-
/**
|
|
453
|
-
* Cursor from the previous page
|
|
454
|
-
*/
|
|
455
388
|
after?: string
|
|
456
389
|
/**
|
|
457
|
-
* Page size
|
|
458
390
|
* @minimum 1
|
|
459
391
|
* @maximum 100
|
|
460
392
|
*/
|
|
@@ -462,60 +394,46 @@ type ListMessagesParams = {
|
|
|
462
394
|
};
|
|
463
395
|
type ListOrgAgentsParams = {
|
|
464
396
|
/**
|
|
465
|
-
* Page size
|
|
466
397
|
* @minimum 1
|
|
467
398
|
* @maximum 100
|
|
468
399
|
*/
|
|
469
400
|
limit?: number
|
|
470
401
|
/**
|
|
471
|
-
* Page number
|
|
472
402
|
* @minimum 1
|
|
473
403
|
*/
|
|
474
404
|
page?: number
|
|
475
|
-
/**
|
|
476
|
-
* Search query
|
|
477
|
-
*/
|
|
478
405
|
search?: string
|
|
479
406
|
};
|
|
480
407
|
type ListOrgTemplatesParams = {
|
|
481
408
|
/**
|
|
482
|
-
* Page size
|
|
483
409
|
* @minimum 1
|
|
484
410
|
* @maximum 100
|
|
485
411
|
*/
|
|
486
412
|
limit?: number
|
|
487
413
|
/**
|
|
488
|
-
* Page number
|
|
489
414
|
* @minimum 1
|
|
490
415
|
*/
|
|
491
416
|
page?: number
|
|
492
417
|
};
|
|
493
418
|
type ListUserAgentsParams = {
|
|
494
419
|
/**
|
|
495
|
-
* Page size
|
|
496
420
|
* @minimum 1
|
|
497
421
|
* @maximum 100
|
|
498
422
|
*/
|
|
499
423
|
limit?: number
|
|
500
424
|
/**
|
|
501
|
-
* Page number
|
|
502
425
|
* @minimum 1
|
|
503
426
|
*/
|
|
504
427
|
page?: number
|
|
505
|
-
/**
|
|
506
|
-
* Search query
|
|
507
|
-
*/
|
|
508
428
|
search?: string
|
|
509
429
|
};
|
|
510
430
|
type ListUserTemplatesParams = {
|
|
511
431
|
/**
|
|
512
|
-
* Page size
|
|
513
432
|
* @minimum 1
|
|
514
433
|
* @maximum 100
|
|
515
434
|
*/
|
|
516
435
|
limit?: number
|
|
517
436
|
/**
|
|
518
|
-
* Page number
|
|
519
437
|
* @minimum 1
|
|
520
438
|
*/
|
|
521
439
|
page?: number
|
|
@@ -531,40 +449,39 @@ declare const getAgent: (agentID: string, options?: AxiosRequestConfig) => Promi
|
|
|
531
449
|
/**
|
|
532
450
|
* @summary Update an agent
|
|
533
451
|
*/
|
|
534
|
-
declare const updateAgent: (agentID: string,
|
|
452
|
+
declare const updateAgent: (agentID: string, updateAgentInBody: NonReadonly<UpdateAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
535
453
|
/**
|
|
536
454
|
* @summary List conversations for an agent
|
|
537
455
|
*/
|
|
538
456
|
declare const listConversations: (agentID: string, params?: ListConversationsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseConversation>>;
|
|
539
457
|
/**
|
|
540
|
-
* Returns HTTP 200 with diagnostics regardless of compile outcome. Validation errors are domain results, not HTTP errors.
|
|
541
458
|
* @summary Lint an agent's orchestration source
|
|
542
459
|
*/
|
|
543
|
-
declare const lintAgent: (agentID: string,
|
|
460
|
+
declare const lintAgent: (agentID: string, lintAgentInBody: NonReadonly<LintAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AgentLintDiagnostics>>;
|
|
544
461
|
/**
|
|
545
462
|
* @summary Transition an agent's lifecycle status
|
|
546
463
|
*/
|
|
547
|
-
declare const updateAgentStatus: (agentID: string,
|
|
464
|
+
declare const updateAgentStatus: (agentID: string, updateAgentStatusInBody: NonReadonly<UpdateAgentStatusInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
548
465
|
/**
|
|
549
|
-
* @summary List
|
|
466
|
+
* @summary List API keys
|
|
550
467
|
*/
|
|
551
|
-
declare const listApiKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
468
|
+
declare const listApiKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthAPIKey[] | null>>;
|
|
552
469
|
/**
|
|
553
470
|
* @summary Create a new API key
|
|
554
471
|
*/
|
|
555
|
-
declare const createApiKey: (
|
|
472
|
+
declare const createApiKey: (createAPIKeyInBody: NonReadonly<CreateAPIKeyInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthAPIKeyResponse>>;
|
|
556
473
|
/**
|
|
557
474
|
* @summary Revoke an API key
|
|
558
475
|
*/
|
|
559
476
|
declare const revokeApiKey: (keyID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
560
477
|
/**
|
|
561
|
-
* @summary Revoke all sessions
|
|
478
|
+
* @summary Revoke all sessions
|
|
562
479
|
*/
|
|
563
480
|
declare const logoutAll: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
564
481
|
/**
|
|
565
482
|
* @summary Authenticate and create a session
|
|
566
483
|
*/
|
|
567
|
-
declare const login: (
|
|
484
|
+
declare const login: (loginInBody: NonReadonly<LoginInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthSessionResponse>>;
|
|
568
485
|
/**
|
|
569
486
|
* @summary Revoke the current session
|
|
570
487
|
*/
|
|
@@ -572,7 +489,7 @@ declare const logout: (options?: AxiosRequestConfig) => Promise<AxiosResponse<vo
|
|
|
572
489
|
/**
|
|
573
490
|
* @summary Create a new account and session
|
|
574
491
|
*/
|
|
575
|
-
declare const signup: (
|
|
492
|
+
declare const signup: (signupInBody: NonReadonly<SignupInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthSessionResponse>>;
|
|
576
493
|
/**
|
|
577
494
|
* @summary Soft-delete a conversation
|
|
578
495
|
*/
|
|
@@ -584,15 +501,15 @@ declare const getConversation: (conversationID: string, options?: AxiosRequestCo
|
|
|
584
501
|
/**
|
|
585
502
|
* @summary List messages in a conversation
|
|
586
503
|
*/
|
|
587
|
-
declare const listMessages: (conversationID: string, params?: ListMessagesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
504
|
+
declare const listMessages: (conversationID: string, params?: ListMessagesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseConversationMessage>>;
|
|
588
505
|
/**
|
|
589
|
-
* @summary List organizations
|
|
506
|
+
* @summary List organizations
|
|
590
507
|
*/
|
|
591
508
|
declare const listOrgs: (options?: AxiosRequestConfig) => Promise<AxiosResponse<Org[] | null>>;
|
|
592
509
|
/**
|
|
593
510
|
* @summary Create a new organization
|
|
594
511
|
*/
|
|
595
|
-
declare const createOrg: (
|
|
512
|
+
declare const createOrg: (createOrgInBody: NonReadonly<CreateOrgInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
|
|
596
513
|
/**
|
|
597
514
|
* @summary Soft-delete an organization
|
|
598
515
|
*/
|
|
@@ -604,7 +521,7 @@ declare const getOrg: (orgSlug: string, options?: AxiosRequestConfig) => Promise
|
|
|
604
521
|
/**
|
|
605
522
|
* @summary Update an organization
|
|
606
523
|
*/
|
|
607
|
-
declare const updateOrg: (orgSlug: string,
|
|
524
|
+
declare const updateOrg: (orgSlug: string, updateOrgInBody: NonReadonly<UpdateOrgInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
|
|
608
525
|
/**
|
|
609
526
|
* @summary List agents owned by an organization
|
|
610
527
|
*/
|
|
@@ -612,23 +529,23 @@ declare const listOrgAgents: (orgSlug: string, params?: ListOrgAgentsParams, opt
|
|
|
612
529
|
/**
|
|
613
530
|
* @summary Create an agent owned by an organization
|
|
614
531
|
*/
|
|
615
|
-
declare const createOrgAgent: (orgSlug: string,
|
|
532
|
+
declare const createOrgAgent: (orgSlug: string, createOrgAgentInBody: NonReadonly<CreateOrgAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
616
533
|
/**
|
|
617
534
|
* @summary List organization members
|
|
618
535
|
*/
|
|
619
|
-
declare const listOrgMembers: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
536
|
+
declare const listOrgMembers: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember[] | null>>;
|
|
620
537
|
/**
|
|
621
|
-
* @summary Add a member
|
|
538
|
+
* @summary Add a member
|
|
622
539
|
*/
|
|
623
|
-
declare const addOrgMember: (orgSlug: string,
|
|
540
|
+
declare const addOrgMember: (orgSlug: string, addMemberInBody: NonReadonly<AddMemberInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember>>;
|
|
624
541
|
/**
|
|
625
|
-
* @summary Remove a member
|
|
542
|
+
* @summary Remove a member
|
|
626
543
|
*/
|
|
627
544
|
declare const removeOrgMember: (orgSlug: string, userID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
628
545
|
/**
|
|
629
546
|
* @summary Update a member's role
|
|
630
547
|
*/
|
|
631
|
-
declare const updateOrgMember: (orgSlug: string, userID: string,
|
|
548
|
+
declare const updateOrgMember: (orgSlug: string, userID: string, updateMemberInBody: NonReadonly<UpdateMemberInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember>>;
|
|
632
549
|
/**
|
|
633
550
|
* @summary List templates owned by an organization
|
|
634
551
|
*/
|
|
@@ -636,7 +553,7 @@ declare const listOrgTemplates: (orgSlug: string, params?: ListOrgTemplatesParam
|
|
|
636
553
|
/**
|
|
637
554
|
* @summary Create a template owned by an organization
|
|
638
555
|
*/
|
|
639
|
-
declare const createOrgTemplate: (orgSlug: string,
|
|
556
|
+
declare const createOrgTemplate: (orgSlug: string, createOrgTemplateInBody: NonReadonly<CreateOrgTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
640
557
|
/**
|
|
641
558
|
* @summary Soft-delete a template
|
|
642
559
|
*/
|
|
@@ -648,9 +565,9 @@ declare const getTemplate: (templateID: string, options?: AxiosRequestConfig) =>
|
|
|
648
565
|
/**
|
|
649
566
|
* @summary Update a template
|
|
650
567
|
*/
|
|
651
|
-
declare const updateTemplate: (templateID: string,
|
|
568
|
+
declare const updateTemplate: (templateID: string, updateTemplateInBody: NonReadonly<UpdateTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
652
569
|
/**
|
|
653
|
-
* @summary Soft-delete the
|
|
570
|
+
* @summary Soft-delete the account
|
|
654
571
|
*/
|
|
655
572
|
declare const deleteCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
656
573
|
/**
|
|
@@ -660,7 +577,7 @@ declare const getCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosRes
|
|
|
660
577
|
/**
|
|
661
578
|
* @summary Update the authenticated user's profile
|
|
662
579
|
*/
|
|
663
|
-
declare const updateCurrentUser: (
|
|
580
|
+
declare const updateCurrentUser: (updateUserInBody: NonReadonly<UpdateUserInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
|
|
664
581
|
/**
|
|
665
582
|
* @summary List agents owned by the authenticated user
|
|
666
583
|
*/
|
|
@@ -668,11 +585,11 @@ declare const listUserAgents: (params?: ListUserAgentsParams, options?: AxiosReq
|
|
|
668
585
|
/**
|
|
669
586
|
* @summary Create an agent owned by the authenticated user
|
|
670
587
|
*/
|
|
671
|
-
declare const createUserAgent: (
|
|
588
|
+
declare const createUserAgent: (createUserAgentInBody: NonReadonly<CreateUserAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
672
589
|
/**
|
|
673
|
-
* @summary Update
|
|
590
|
+
* @summary Update email
|
|
674
591
|
*/
|
|
675
|
-
declare const updateCurrentUserEmail: (
|
|
592
|
+
declare const updateCurrentUserEmail: (updateEmailInBody: NonReadonly<UpdateEmailInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
|
|
676
593
|
/**
|
|
677
594
|
* @summary List templates owned by the authenticated user
|
|
678
595
|
*/
|
|
@@ -680,7 +597,7 @@ declare const listUserTemplates: (params?: ListUserTemplatesParams, options?: Ax
|
|
|
680
597
|
/**
|
|
681
598
|
* @summary Create a template owned by the authenticated user
|
|
682
599
|
*/
|
|
683
|
-
declare const createUserTemplate: (
|
|
600
|
+
declare const createUserTemplate: (createUserTemplateInBody: NonReadonly<CreateUserTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
684
601
|
/**
|
|
685
602
|
* @summary Get a user by ID
|
|
686
603
|
*/
|
|
@@ -689,18 +606,18 @@ type DeleteAgentResult = AxiosResponse<void>;
|
|
|
689
606
|
type GetAgentResult = AxiosResponse<Agent>;
|
|
690
607
|
type UpdateAgentResult = AxiosResponse<Agent>;
|
|
691
608
|
type ListConversationsResult = AxiosResponse<CursorResponseConversation>;
|
|
692
|
-
type LintAgentResult = AxiosResponse<
|
|
609
|
+
type LintAgentResult = AxiosResponse<AgentLintDiagnostics>;
|
|
693
610
|
type UpdateAgentStatusResult = AxiosResponse<Agent>;
|
|
694
|
-
type ListApiKeysResult = AxiosResponse<
|
|
695
|
-
type CreateApiKeyResult = AxiosResponse<
|
|
611
|
+
type ListApiKeysResult = AxiosResponse<AuthAPIKey[] | null>;
|
|
612
|
+
type CreateApiKeyResult = AxiosResponse<AuthAPIKeyResponse>;
|
|
696
613
|
type RevokeApiKeyResult = AxiosResponse<void>;
|
|
697
614
|
type LogoutAllResult = AxiosResponse<void>;
|
|
698
|
-
type LoginResult = AxiosResponse<
|
|
615
|
+
type LoginResult = AxiosResponse<AuthSessionResponse>;
|
|
699
616
|
type LogoutResult = AxiosResponse<void>;
|
|
700
|
-
type SignupResult = AxiosResponse<
|
|
617
|
+
type SignupResult = AxiosResponse<AuthSessionResponse>;
|
|
701
618
|
type DeleteConversationResult = AxiosResponse<void>;
|
|
702
619
|
type GetConversationResult = AxiosResponse<Conversation>;
|
|
703
|
-
type ListMessagesResult = AxiosResponse<
|
|
620
|
+
type ListMessagesResult = AxiosResponse<CursorResponseConversationMessage>;
|
|
704
621
|
type ListOrgsResult = AxiosResponse<Org[] | null>;
|
|
705
622
|
type CreateOrgResult = AxiosResponse<Org>;
|
|
706
623
|
type DeleteOrgResult = AxiosResponse<void>;
|
|
@@ -708,10 +625,10 @@ type GetOrgResult = AxiosResponse<Org>;
|
|
|
708
625
|
type UpdateOrgResult = AxiosResponse<Org>;
|
|
709
626
|
type ListOrgAgentsResult = AxiosResponse<PageResponseAgent>;
|
|
710
627
|
type CreateOrgAgentResult = AxiosResponse<Agent>;
|
|
711
|
-
type ListOrgMembersResult = AxiosResponse<
|
|
712
|
-
type AddOrgMemberResult = AxiosResponse<
|
|
628
|
+
type ListOrgMembersResult = AxiosResponse<OrgMember[] | null>;
|
|
629
|
+
type AddOrgMemberResult = AxiosResponse<OrgMember>;
|
|
713
630
|
type RemoveOrgMemberResult = AxiosResponse<void>;
|
|
714
|
-
type UpdateOrgMemberResult = AxiosResponse<
|
|
631
|
+
type UpdateOrgMemberResult = AxiosResponse<OrgMember>;
|
|
715
632
|
type ListOrgTemplatesResult = AxiosResponse<PageResponseTemplate>;
|
|
716
633
|
type CreateOrgTemplateResult = AxiosResponse<Template>;
|
|
717
634
|
type DeleteTemplateResult = AxiosResponse<void>;
|
|
@@ -1103,4 +1020,4 @@ declare function createSessionClient({ baseUrl }?: SessionClientOptions): KivoxC
|
|
|
1103
1020
|
* ```
|
|
1104
1021
|
*/
|
|
1105
1022
|
declare function createApiKeyClient({ apiKey, baseUrl }: ApiKeyClientOptions): KivoxClient;
|
|
1106
|
-
export { updateTemplate, updateOrgMember, updateOrg, updateCurrentUserEmail, updateCurrentUser, updateAgentStatus, updateAgent, signup, revokeApiKey, removeOrgMember, logoutAll, logout, login, listUserTemplates, listUserAgents, listOrgs, listOrgTemplates, listOrgMembers, listOrgAgents, listMessages, listConversations, listApiKeys, lintAgent, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createSessionClient, createOrgTemplate, createOrgAgent, createOrg, createApiKeyClient, createApiKey, addOrgMember, User,
|
|
1023
|
+
export { updateTemplate, updateOrgMember, updateOrg, updateCurrentUserEmail, updateCurrentUser, updateAgentStatus, updateAgent, signup, revokeApiKey, removeOrgMember, logoutAll, logout, login, listUserTemplates, listUserAgents, listOrgs, listOrgTemplates, listOrgMembers, listOrgAgents, listMessages, listConversations, listApiKeys, lintAgent, getUser, getTemplate, getOrg, getCurrentUser, getConversation, getAgent, deleteTemplate, deleteOrg, deleteCurrentUser, deleteConversation, deleteAgent, createUserTemplate, createUserAgent, createSessionClient, createOrgTemplate, createOrgAgent, createOrg, createApiKeyClient, createApiKey, addOrgMember, User, UpdateUserInBody, UpdateTemplateResult, UpdateTemplateInBody, UpdateOrgResult, UpdateOrgMemberResult, UpdateOrgInBody, UpdateMemberInBodyRole, UpdateMemberInBody, UpdateEmailInBody, UpdateCurrentUserResult, UpdateCurrentUserEmailResult, UpdateAgentStatusResult, UpdateAgentStatusInBodyStatus, UpdateAgentStatusInBody, UpdateAgentResult, UpdateAgentInBody, Template, SignupResult, SignupInBody, SessionConnectionLostEvent, SessionClientOptions, ServerTurnComplete, ServerTick, ServerTextFull, ServerTextDelta, ServerSignal, ServerSessionEvent, ServerSessionClosed, ServerMessage, ServerHandshakeOK, ServerHandshakeError, ServerFlowComplete, ServerError, ServerConnectionMessage, ServerAudioDelta, RevokeApiKeyResult, RemoveOrgMemberResult, PageResponseTemplate, PageResponseAgent, OrgMember, Org, LogoutResult, LogoutAllResult, LoginResult, LoginInBody, ListUserTemplatesResult, ListUserTemplatesParams, ListUserAgentsResult, ListUserAgentsParams, ListOrgsResult, ListOrgTemplatesResult, ListOrgTemplatesParams, ListOrgMembersResult, ListOrgAgentsResult, ListOrgAgentsParams, ListMessagesResult, ListMessagesParams, ListConversationsResult, ListConversationsParams, ListApiKeysResult, LintAgentResult, LintAgentInBody, KivoxClient, GetUserResult, GetTemplateResult, GetOrgResult, GetCurrentUserResult, GetConversationResult, GetAgentResult, ErrorModel, ErrorDetail, DeleteTemplateResult, DeleteOrgResult, DeleteCurrentUserResult, DeleteConversationResult, DeleteAgentResult, CursorResponseConversationMessage, CursorResponseConversation, CreateUserTemplateResult, CreateUserTemplateInBody, CreateUserAgentResult, CreateUserAgentInBody, CreateOrgTemplateResult, CreateOrgTemplateInBody, CreateOrgResult, CreateOrgInBody, CreateOrgAgentResult, CreateOrgAgentInBody, CreateApiKeyResult, CreateAPIKeyInBody, ConversationTransportError, ConversationSessionConfig, ConversationSession, ConversationMessage, Conversation, ClientMessage, ClientInputText, ClientInputAudioStream, ClientInputAudio, ClientHandshake, ClientEndSession, ClientCancel, AuthSessionResponse, AuthAPIKeyResponse, AuthAPIKey, ApiKeyClientOptions, AgentSecret, AgentSafeguards, AgentLintDiagnostics, AgentConfig, Agent, AddOrgMemberResult, AddMemberInBodyRole, AddMemberInBody };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var r1=Object.defineProperty;var o1=($)=>$;function e1($,Q){this[$]=o1.bind(null,Q)}var N1=($,Q)=>{for(var Y in Q)r1($,Y,{get:Q[Y],enumerable:!0,configurable:!0,set:e1.bind(Q,Y)})};function s($,Q){return function(){return $.apply(Q,arguments)}}var{toString:$4}=Object.prototype,{getPrototypeOf:k0}=Object,{iterator:B0,toStringTag:H1}=Symbol,P0=(($)=>(Q)=>{let Y=$4.call(Q);return $[Y]||($[Y]=Y.slice(8,-1).toLowerCase())})(Object.create(null)),j=($)=>{return $=$.toLowerCase(),(Q)=>P0(Q)===$},L0=($)=>(Q)=>typeof Q===$,{isArray:p}=Array,l=L0("undefined");function r($){return $!==null&&!l($)&&$.constructor!==null&&!l($.constructor)&&T($.constructor.isBuffer)&&$.constructor.isBuffer($)}var B1=j("ArrayBuffer");function Q4($){let Q;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Q=ArrayBuffer.isView($);else Q=$&&$.buffer&&B1($.buffer);return Q}var Y4=L0("string"),T=L0("function"),P1=L0("number"),o=($)=>$!==null&&typeof $==="object",Z4=($)=>$===!0||$===!1,H0=($)=>{if(P0($)!=="object")return!1;let Q=k0($);return(Q===null||Q===Object.prototype||Object.getPrototypeOf(Q)===null)&&!(H1 in $)&&!(B0 in $)},G4=($)=>{if(!o($)||r($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Q){return!1}},z4=j("Date"),X4=j("File"),W4=($)=>{return!!($&&typeof $.uri<"u")},J4=($)=>$&&typeof $.getParts<"u",N4=j("Blob"),M4=j("FileList"),K4=($)=>o($)&&T($.pipe);function V4(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var M1=V4(),K1=typeof M1.FormData<"u"?M1.FormData:void 0,H4=($)=>{let Q;return $&&(K1&&$ instanceof K1||T($.append)&&((Q=P0($))==="formdata"||Q==="object"&&T($.toString)&&$.toString()==="[object FormData]"))},B4=j("URLSearchParams"),[P4,L4,I4,_4]=["ReadableStream","Request","Response","Headers"].map(j),w4=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function e($,Q,{allOwnKeys:Y=!1}={}){if($===null||typeof $>"u")return;let Z,G;if(typeof $!=="object")$=[$];if(p($))for(Z=0,G=$.length;Z<G;Z++)Q.call(null,$[Z],Z,$);else{if(r($))return;let W=Y?Object.getOwnPropertyNames($):Object.keys($),z=W.length,J;for(Z=0;Z<z;Z++)J=W[Z],Q.call(null,$[J],J,$)}}function L1($,Q){if(r($))return null;Q=Q.toLowerCase();let Y=Object.keys($),Z=Y.length,G;while(Z-- >0)if(G=Y[Z],Q===G.toLowerCase())return G;return null}var c=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),I1=($)=>!l($)&&$!==c;function A0(){let{caseless:$,skipUndefined:Q}=I1(this)&&this||{},Y={},Z=(G,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let z=$&&L1(Y,W)||W;if(H0(Y[z])&&H0(G))Y[z]=A0(Y[z],G);else if(H0(G))Y[z]=A0({},G);else if(p(G))Y[z]=G.slice();else if(!Q||!l(G))Y[z]=G};for(let G=0,W=arguments.length;G<W;G++)arguments[G]&&e(arguments[G],Z);return Y}var F4=($,Q,Y,{allOwnKeys:Z}={})=>{return e(Q,(G,W)=>{if(Y&&T(G))Object.defineProperty($,W,{value:s(G,Y),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,W,{value:G,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Z}),$},U4=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},R4=($,Q,Y,Z)=>{$.prototype=Object.create(Q.prototype,Z),Object.defineProperty($.prototype,"constructor",{value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{value:Q.prototype}),Y&&Object.assign($.prototype,Y)},q4=($,Q,Y,Z)=>{let G,W,z,J={};if(Q=Q||{},$==null)return Q;do{G=Object.getOwnPropertyNames($),W=G.length;while(W-- >0)if(z=G[W],(!Z||Z(z,$,Q))&&!J[z])Q[z]=$[z],J[z]=!0;$=Y!==!1&&k0($)}while($&&(!Y||Y($,Q))&&$!==Object.prototype);return Q},S4=($,Q,Y)=>{if($=String($),Y===void 0||Y>$.length)Y=$.length;Y-=Q.length;let Z=$.indexOf(Q,Y);return Z!==-1&&Z===Y},D4=($)=>{if(!$)return null;if(p($))return $;let Q=$.length;if(!P1(Q))return null;let Y=Array(Q);while(Q-- >0)Y[Q]=$[Q];return Y},E4=(($)=>{return(Q)=>{return $&&Q instanceof $}})(typeof Uint8Array<"u"&&k0(Uint8Array)),O4=($,Q)=>{let Z=($&&$[B0]).call($),G;while((G=Z.next())&&!G.done){let W=G.value;Q.call($,W[0],W[1])}},T4=($,Q)=>{let Y,Z=[];while((Y=$.exec(Q))!==null)Z.push(Y);return Z},C4=j("HTMLFormElement"),A4=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Y,Z,G){return Z.toUpperCase()+G})},V1=(({hasOwnProperty:$})=>(Q,Y)=>$.call(Q,Y))(Object.prototype),k4=j("RegExp"),_1=($,Q)=>{let Y=Object.getOwnPropertyDescriptors($),Z={};e(Y,(G,W)=>{let z;if((z=Q(G,W,$))!==!1)Z[W]=z||G}),Object.defineProperties($,Z)},x4=($)=>{_1($,(Q,Y)=>{if(T($)&&["arguments","caller","callee"].indexOf(Y)!==-1)return!1;let Z=$[Y];if(!T(Z))return;if(Q.enumerable=!1,"writable"in Q){Q.writable=!1;return}if(!Q.set)Q.set=()=>{throw Error("Can not rewrite read-only method '"+Y+"'")}})},j4=($,Q)=>{let Y={},Z=(G)=>{G.forEach((W)=>{Y[W]=!0})};return p($)?Z($):Z(String($).split(Q)),Y},y4=()=>{},b4=($,Q)=>{return $!=null&&Number.isFinite($=+$)?$:Q};function v4($){return!!($&&T($.append)&&$[H1]==="FormData"&&$[B0])}var m4=($)=>{let Q=[,,,,,,,,,,],Y=(Z,G)=>{if(o(Z)){if(Q.indexOf(Z)>=0)return;if(r(Z))return Z;if(!("toJSON"in Z)){Q[G]=Z;let W=p(Z)?[]:{};return e(Z,(z,J)=>{let V=Y(z,G+1);!l(V)&&(W[J]=V)}),Q[G]=void 0,W}}return Z};return Y($,0)},h4=j("AsyncFunction"),f4=($)=>$&&(o($)||T($))&&T($.then)&&T($.catch),w1=(($,Q)=>{if($)return setImmediate;return Q?((Y,Z)=>{return c.addEventListener("message",({source:G,data:W})=>{if(G===c&&W===Y)Z.length&&Z.shift()()},!1),(G)=>{Z.push(G),c.postMessage(Y,"*")}})(`axios@${Math.random()}`,[]):(Y)=>setTimeout(Y)})(typeof setImmediate==="function",T(c.postMessage)),g4=typeof queueMicrotask<"u"?queueMicrotask.bind(c):typeof process<"u"&&process.nextTick||w1,u4=($)=>$!=null&&T($[B0]),X={isArray:p,isArrayBuffer:B1,isBuffer:r,isFormData:H4,isArrayBufferView:Q4,isString:Y4,isNumber:P1,isBoolean:Z4,isObject:o,isPlainObject:H0,isEmptyObject:G4,isReadableStream:P4,isRequest:L4,isResponse:I4,isHeaders:_4,isUndefined:l,isDate:z4,isFile:X4,isReactNativeBlob:W4,isReactNative:J4,isBlob:N4,isRegExp:k4,isFunction:T,isStream:K4,isURLSearchParams:B4,isTypedArray:E4,isFileList:M4,forEach:e,merge:A0,extend:F4,trim:w4,stripBOM:U4,inherits:R4,toFlatObject:q4,kindOf:P0,kindOfTest:j,endsWith:S4,toArray:D4,forEachEntry:O4,matchAll:T4,isHTMLForm:C4,hasOwnProperty:V1,hasOwnProp:V1,reduceDescriptors:_1,freezeMethods:x4,toObjectSet:j4,toCamelCase:A4,noop:y4,toFiniteNumber:b4,findKey:L1,global:c,isContextDefined:I1,isSpecCompliantForm:v4,toJSONObject:m4,isAsyncFn:h4,isThenable:f4,setImmediate:w1,asap:g4,isIterable:u4};class D extends Error{static from($,Q,Y,Z,G,W){let z=new D($.message,Q||$.code,Y,Z,G);if(z.cause=$,z.name=$.name,$.status!=null&&z.status==null)z.status=$.status;return W&&Object.assign(z,W),z}constructor($,Q,Y,Z,G){super($);if(Object.defineProperty(this,"message",{value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Q&&(this.code=Q),Y&&(this.config=Y),Z&&(this.request=Z),G)this.response=G,this.status=G.status}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}}D.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";D.ERR_BAD_OPTION="ERR_BAD_OPTION";D.ECONNABORTED="ECONNABORTED";D.ETIMEDOUT="ETIMEDOUT";D.ERR_NETWORK="ERR_NETWORK";D.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";D.ERR_DEPRECATED="ERR_DEPRECATED";D.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";D.ERR_BAD_REQUEST="ERR_BAD_REQUEST";D.ERR_CANCELED="ERR_CANCELED";D.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";D.ERR_INVALID_URL="ERR_INVALID_URL";var P=D;var I0=null;function j0($){return X.isPlainObject($)||X.isArray($)}function F1($){return X.endsWith($,"[]")?$.slice(0,-2):$}function x0($,Q,Y){if(!$)return Q;return $.concat(Q).map(function(G,W){return G=F1(G),!Y&&W?"["+G+"]":G}).join(Y?".":"")}function c4($){return X.isArray($)&&!$.some(j0)}var d4=X.toFlatObject(X,{},null,function(Q){return/^is[A-Z]/.test(Q)});function l4($,Q,Y){if(!X.isObject($))throw TypeError("target must be an object");Q=Q||new(I0||FormData),Y=X.toFlatObject(Y,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,H){return!X.isUndefined(H[I])});let Z=Y.metaTokens,G=Y.visitor||M,W=Y.dots,z=Y.indexes,V=(Y.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(Q);if(!X.isFunction(G))throw TypeError("visitor must be a function");function N(K){if(K===null)return"";if(X.isDate(K))return K.toISOString();if(X.isBoolean(K))return K.toString();if(!V&&X.isBlob(K))throw new P("Blob is not supported. Use a Buffer instead.");if(X.isArrayBuffer(K)||X.isTypedArray(K))return V&&typeof Blob==="function"?new Blob([K]):Buffer.from(K);return K}function M(K,I,H){let R=K;if(X.isReactNative(Q)&&X.isReactNativeBlob(K))return Q.append(x0(H,I,W),N(K)),!1;if(K&&!H&&typeof K==="object"){if(X.endsWith(I,"{}"))I=Z?I:I.slice(0,-2),K=JSON.stringify(K);else if(X.isArray(K)&&c4(K)||(X.isFileList(K)||X.endsWith(I,"[]"))&&(R=X.toArray(K)))return I=F1(I),R.forEach(function(S,E){!(X.isUndefined(S)||S===null)&&Q.append(z===!0?x0([I],E,W):z===null?I:I+"[]",N(S))}),!1}if(j0(K))return!0;return Q.append(x0(H,I,W),N(K)),!1}let L=[],w=Object.assign(d4,{defaultVisitor:M,convertValue:N,isVisitable:j0});function _(K,I){if(X.isUndefined(K))return;if(L.indexOf(K)!==-1)throw Error("Circular reference detected in "+I.join("."));L.push(K),X.forEach(K,function(R,C){if((!(X.isUndefined(R)||R===null)&&G.call(Q,R,X.isString(C)?C.trim():C,I,w))===!0)_(R,I?I.concat(C):[C])}),L.pop()}if(!X.isObject($))throw TypeError("data must be an object");return _($),Q}var h=l4;function U1($){let Q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent($).replace(/[!'()~]|%20|%00/g,function(Z){return Q[Z]})}function R1($,Q){this._pairs=[],$&&h($,this,Q)}var q1=R1.prototype;q1.append=function(Q,Y){this._pairs.push([Q,Y])};q1.toString=function(Q){let Y=Q?function(Z){return Q.call(this,Z,U1)}:U1;return this._pairs.map(function(G){return Y(G[0])+"="+Y(G[1])},"").join("&")};var _0=R1;function p4($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $0($,Q,Y){if(!Q)return $;let Z=Y&&Y.encode||p4,G=X.isFunction(Y)?{serialize:Y}:Y,W=G&&G.serialize,z;if(W)z=W(Q,G);else z=X.isURLSearchParams(Q)?Q.toString():new _0(Q,G).toString(Z);if(z){let J=$.indexOf("#");if(J!==-1)$=$.slice(0,J);$+=($.indexOf("?")===-1?"?":"&")+z}return $}class S1{constructor(){this.handlers=[]}use($,Q,Y){return this.handlers.push({fulfilled:$,rejected:Q,synchronous:Y?Y.synchronous:!1,runWhen:Y?Y.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){X.forEach(this.handlers,function(Y){if(Y!==null)$(Y)})}}var y0=S1;var n={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var D1=typeof URLSearchParams<"u"?URLSearchParams:_0;var E1=typeof FormData<"u"?FormData:null;var O1=typeof Blob<"u"?Blob:null;var T1={isBrowser:!0,classes:{URLSearchParams:D1,FormData:E1,Blob:O1},protocols:["http","https","file","blob","url","data"]};var m0={};N1(m0,{origin:()=>t4,navigator:()=>b0,hasStandardBrowserWebWorkerEnv:()=>i4,hasStandardBrowserEnv:()=>n4,hasBrowserEnv:()=>v0});var v0=typeof window<"u"&&typeof document<"u",b0=typeof navigator==="object"&&navigator||void 0,n4=v0&&(!b0||["ReactNative","NativeScript","NS"].indexOf(b0.product)<0),i4=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),t4=v0&&window.location.href||"http://localhost";var F={...m0,...T1};function h0($,Q){return h($,new F.classes.URLSearchParams,{visitor:function(Y,Z,G,W){if(F.isNode&&X.isBuffer(Y))return this.append(Z,Y.toString("base64")),!1;return W.defaultVisitor.apply(this,arguments)},...Q})}function a4($){return X.matchAll(/\w+|\[(\w*)]/g,$).map((Q)=>{return Q[0]==="[]"?"":Q[1]||Q[0]})}function s4($){let Q={},Y=Object.keys($),Z,G=Y.length,W;for(Z=0;Z<G;Z++)W=Y[Z],Q[W]=$[W];return Q}function r4($){function Q(Y,Z,G,W){let z=Y[W++];if(z==="__proto__")return!0;let J=Number.isFinite(+z),V=W>=Y.length;if(z=!z&&X.isArray(G)?G.length:z,V){if(X.hasOwnProp(G,z))G[z]=[G[z],Z];else G[z]=Z;return!J}if(!G[z]||!X.isObject(G[z]))G[z]=[];if(Q(Y,Z,G[z],W)&&X.isArray(G[z]))G[z]=s4(G[z]);return!J}if(X.isFormData($)&&X.isFunction($.entries)){let Y={};return X.forEachEntry($,(Z,G)=>{Q(a4(Z),G,Y,0)}),Y}return null}var w0=r4;function o4($,Q,Y){if(X.isString($))try{return(Q||JSON.parse)($),X.trim($)}catch(Z){if(Z.name!=="SyntaxError")throw Z}return(Y||JSON.stringify)($)}var f0={transitional:n,adapter:["xhr","http","fetch"],transformRequest:[function(Q,Y){let Z=Y.getContentType()||"",G=Z.indexOf("application/json")>-1,W=X.isObject(Q);if(W&&X.isHTMLForm(Q))Q=new FormData(Q);if(X.isFormData(Q))return G?JSON.stringify(w0(Q)):Q;if(X.isArrayBuffer(Q)||X.isBuffer(Q)||X.isStream(Q)||X.isFile(Q)||X.isBlob(Q)||X.isReadableStream(Q))return Q;if(X.isArrayBufferView(Q))return Q.buffer;if(X.isURLSearchParams(Q))return Y.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Q.toString();let J;if(W){if(Z.indexOf("application/x-www-form-urlencoded")>-1)return h0(Q,this.formSerializer).toString();if((J=X.isFileList(Q))||Z.indexOf("multipart/form-data")>-1){let V=this.env&&this.env.FormData;return h(J?{"files[]":Q}:Q,V&&new V,this.formSerializer)}}if(W||G)return Y.setContentType("application/json",!1),o4(Q);return Q}],transformResponse:[function(Q){let Y=this.transitional||f0.transitional,Z=Y&&Y.forcedJSONParsing,G=this.responseType==="json";if(X.isResponse(Q)||X.isReadableStream(Q))return Q;if(Q&&X.isString(Q)&&(Z&&!this.responseType||G)){let z=!(Y&&Y.silentJSONParsing)&&G;try{return JSON.parse(Q,this.parseReviver)}catch(J){if(z){if(J.name==="SyntaxError")throw P.from(J,P.ERR_BAD_RESPONSE,this,null,this.response);throw J}}}return Q}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(Q){return Q>=200&&Q<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],($)=>{f0.headers[$]={}});var i=f0;var e4=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),C1=($)=>{let Q={},Y,Z,G;return $&&$.split(`
|
|
2
|
-
`).forEach(function(z){if(G=z.indexOf(":"),Y=z.substring(0,G).trim().toLowerCase(),Z=z.substring(G+1).trim(),!Y||Q[Y]&&e4[Y])return;if(Y==="set-cookie")if(Q[Y])Q[Y].push(Z);else Q[Y]=[Z];else Q[Y]=Q[Y]?Q[Y]+", "+Z:Z}),Q};var A1=Symbol("internals");function Q0($){return $&&String($).trim().toLowerCase()}function
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Q){let Y=new this($);return Q.forEach((Z)=>Y.set(Z)),Y}static accessor($){let Y=(this[A1]=this[A1]={accessors:{}}).accessors,Z=this.prototype;function G(W){let z=Q0(W);if(!Y[z])Z5(Z,W),Y[z]=!0}return X.isArray($)?$.forEach(G):G($),this}}Y0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(Y0.prototype,({value:$},Q)=>{let Y=Q[0].toUpperCase()+Q.slice(1);return{get:()=>$,set(Z){this[Y]=Z}}});X.freezeMethods(Y0);var q=Y0;function Z0($,Q){let Y=this||i,Z=Q||Y,G=q.from(Z.headers),W=Z.data;return X.forEach($,function(J){W=J.call(Y,W,G.normalize(),Q?Q.status:void 0)}),G.normalize(),W}function G0($){return!!($&&$.__CANCEL__)}class k1 extends P{constructor($,Q,Y){super($==null?"canceled":$,P.ERR_CANCELED,Q,Y);this.name="CanceledError",this.__CANCEL__=!0}}var b=k1;function z0($,Q,Y){let Z=Y.config.validateStatus;if(!Y.status||!Z||Z(Y.status))$(Y);else Q(new P("Request failed with status code "+Y.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(Y.status/100)-4],Y.config,Y.request,Y))}function u0($){let Q=/^([-+\w]{1,25})(:?\/\/|:)/.exec($);return Q&&Q[1]||""}function G5($,Q){$=$||10;let Y=Array($),Z=Array($),G=0,W=0,z;return Q=Q!==void 0?Q:1000,function(V){let N=Date.now(),M=Z[W];if(!z)z=N;Y[G]=V,Z[G]=N;let L=W,w=0;while(L!==G)w+=Y[L++],L=L%$;if(G=(G+1)%$,G===W)W=(W+1)%$;if(N-z<Q)return;let _=M&&N-M;return _?Math.round(w*1000/_):void 0}}var x1=G5;function z5($,Q){let Y=0,Z=1000/Q,G,W,z=(N,M=Date.now())=>{if(Y=M,G=null,W)clearTimeout(W),W=null;$(...N)};return[(...N)=>{let M=Date.now(),L=M-Y;if(L>=Z)z(N,M);else if(G=N,!W)W=setTimeout(()=>{W=null,z(G)},Z-L)},()=>G&&z(G)]}var j1=z5;var t=($,Q,Y=3)=>{let Z=0,G=x1(50,250);return j1((W)=>{let z=W.loaded,J=W.lengthComputable?W.total:void 0,V=z-Z,N=G(V),M=z<=J;Z=z;let L={loaded:z,total:J,progress:J?z/J:void 0,bytes:V,rate:N?N:void 0,estimated:N&&J&&M?(J-z)/N:void 0,event:W,lengthComputable:J!=null,[Q?"download":"upload"]:!0};$(L)},Y)},c0=($,Q)=>{let Y=$!=null;return[(Z)=>Q[0]({lengthComputable:Y,total:$,loaded:Z}),Q[1]]},d0=($)=>(...Q)=>X.asap(()=>$(...Q));var y1=F.hasStandardBrowserEnv?(($,Q)=>(Y)=>{return Y=new URL(Y,F.origin),$.protocol===Y.protocol&&$.host===Y.host&&(Q||$.port===Y.port)})(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0;var b1=F.hasStandardBrowserEnv?{write($,Q,Y,Z,G,W,z){if(typeof document>"u")return;let J=[`${$}=${encodeURIComponent(Q)}`];if(X.isNumber(Y))J.push(`expires=${new Date(Y).toUTCString()}`);if(X.isString(Z))J.push(`path=${Z}`);if(X.isString(G))J.push(`domain=${G}`);if(W===!0)J.push("secure");if(X.isString(z))J.push(`SameSite=${z}`);document.cookie=J.join("; ")},read($){if(typeof document>"u")return null;let Q=document.cookie.match(new RegExp("(?:^|; )"+$+"=([^;]*)"));return Q?decodeURIComponent(Q[1]):null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};function l0($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function p0($,Q){return Q?$.replace(/\/?\/$/,"")+"/"+Q.replace(/^\/+/,""):$}function X0($,Q,Y){let Z=!l0(Q);if($&&(Z||Y==!1))return p0($,Q);return Q}var v1=($)=>$ instanceof q?{...$}:$;function y($,Q){Q=Q||{};let Y={};function Z(N,M,L,w){if(X.isPlainObject(N)&&X.isPlainObject(M))return X.merge.call({caseless:w},N,M);else if(X.isPlainObject(M))return X.merge({},M);else if(X.isArray(M))return M.slice();return M}function G(N,M,L,w){if(!X.isUndefined(M))return Z(N,M,L,w);else if(!X.isUndefined(N))return Z(void 0,N,L,w)}function W(N,M){if(!X.isUndefined(M))return Z(void 0,M)}function z(N,M){if(!X.isUndefined(M))return Z(void 0,M);else if(!X.isUndefined(N))return Z(void 0,N)}function J(N,M,L){if(L in Q)return Z(N,M);else if(L in $)return Z(void 0,N)}let V={url:W,method:W,data:W,baseURL:z,transformRequest:z,transformResponse:z,paramsSerializer:z,timeout:z,timeoutMessage:z,withCredentials:z,withXSRFToken:z,adapter:z,responseType:z,xsrfCookieName:z,xsrfHeaderName:z,onUploadProgress:z,onDownloadProgress:z,decompress:z,maxContentLength:z,maxBodyLength:z,beforeRedirect:z,transport:z,httpAgent:z,httpsAgent:z,cancelToken:z,socketPath:z,responseEncoding:z,validateStatus:J,headers:(N,M,L)=>G(v1(N),v1(M),L,!0)};return X.forEach(Object.keys({...$,...Q}),function(M){if(M==="__proto__"||M==="constructor"||M==="prototype")return;let L=X.hasOwnProp(V,M)?V[M]:G,w=L($[M],Q[M],M);X.isUndefined(w)&&L!==J||(Y[M]=w)}),Y}var U0=($)=>{let Q=y({},$),{data:Y,withXSRFToken:Z,xsrfHeaderName:G,xsrfCookieName:W,headers:z,auth:J}=Q;if(Q.headers=z=q.from(z),Q.url=$0(X0(Q.baseURL,Q.url,Q.allowAbsoluteUrls),$.params,$.paramsSerializer),J)z.set("Authorization","Basic "+btoa((J.username||"")+":"+(J.password?unescape(encodeURIComponent(J.password)):"")));if(X.isFormData(Y)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)z.setContentType(void 0);else if(X.isFunction(Y.getHeaders)){let V=Y.getHeaders(),N=["content-type","content-length"];Object.entries(V).forEach(([M,L])=>{if(N.includes(M.toLowerCase()))z.set(M,L)})}}if(F.hasStandardBrowserEnv){if(Z&&X.isFunction(Z)&&(Z=Z(Q)),Z||Z!==!1&&y1(Q.url)){let V=G&&W&&b1.read(W);if(V)z.set(G,V)}}return Q};var X5=typeof XMLHttpRequest<"u",m1=X5&&function($){return new Promise(function(Y,Z){let G=U0($),W=G.data,z=q.from(G.headers).normalize(),{responseType:J,onUploadProgress:V,onDownloadProgress:N}=G,M,L,w,_,K;function I(){_&&_(),K&&K(),G.cancelToken&&G.cancelToken.unsubscribe(M),G.signal&&G.signal.removeEventListener("abort",M)}let H=new XMLHttpRequest;H.open(G.method.toUpperCase(),G.url,!0),H.timeout=G.timeout;function R(){if(!H)return;let S=q.from("getAllResponseHeaders"in H&&H.getAllResponseHeaders()),x={data:!J||J==="text"||J==="json"?H.responseText:H.response,status:H.status,statusText:H.statusText,headers:S,config:$,request:H};z0(function(A){Y(A),I()},function(A){Z(A),I()},x),H=null}if("onloadend"in H)H.onloadend=R;else H.onreadystatechange=function(){if(!H||H.readyState!==4)return;if(H.status===0&&!(H.responseURL&&H.responseURL.indexOf("file:")===0))return;setTimeout(R)};if(H.onabort=function(){if(!H)return;Z(new P("Request aborted",P.ECONNABORTED,$,H)),H=null},H.onerror=function(E){let x=E&&E.message?E.message:"Network Error",g=new P(x,P.ERR_NETWORK,$,H);g.event=E||null,Z(g),H=null},H.ontimeout=function(){let E=G.timeout?"timeout of "+G.timeout+"ms exceeded":"timeout exceeded",x=G.transitional||n;if(G.timeoutErrorMessage)E=G.timeoutErrorMessage;Z(new P(E,x.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,$,H)),H=null},W===void 0&&z.setContentType(null),"setRequestHeader"in H)X.forEach(z.toJSON(),function(E,x){H.setRequestHeader(x,E)});if(!X.isUndefined(G.withCredentials))H.withCredentials=!!G.withCredentials;if(J&&J!=="json")H.responseType=G.responseType;if(N)[w,K]=t(N,!0),H.addEventListener("progress",w);if(V&&H.upload)[L,_]=t(V),H.upload.addEventListener("progress",L),H.upload.addEventListener("loadend",_);if(G.cancelToken||G.signal){if(M=(S)=>{if(!H)return;Z(!S||S.type?new b(null,$,H):S),H.abort(),H=null},G.cancelToken&&G.cancelToken.subscribe(M),G.signal)G.signal.aborted?M():G.signal.addEventListener("abort",M)}let C=u0(G.url);if(C&&F.protocols.indexOf(C)===-1){Z(new P("Unsupported protocol "+C+":",P.ERR_BAD_REQUEST,$));return}H.send(W||null)})};var W5=($,Q)=>{let{length:Y}=$=$?$.filter(Boolean):[];if(Q||Y){let Z=new AbortController,G,W=function(N){if(!G){G=!0,J();let M=N instanceof Error?N:this.reason;Z.abort(M instanceof P?M:new b(M instanceof Error?M.message:M))}},z=Q&&setTimeout(()=>{z=null,W(new P(`timeout of ${Q}ms exceeded`,P.ETIMEDOUT))},Q),J=()=>{if($)z&&clearTimeout(z),z=null,$.forEach((N)=>{N.unsubscribe?N.unsubscribe(W):N.removeEventListener("abort",W)}),$=null};$.forEach((N)=>N.addEventListener("abort",W));let{signal:V}=Z;return V.unsubscribe=()=>X.asap(J),V}},h1=W5;var J5=function*($,Q){let Y=$.byteLength;if(!Q||Y<Q){yield $;return}let Z=0,G;while(Z<Y)G=Z+Q,yield $.slice(Z,G),Z=G},N5=async function*($,Q){for await(let Y of M5($))yield*J5(Y,Q)},M5=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Q=$.getReader();try{for(;;){let{done:Y,value:Z}=await Q.read();if(Y)break;yield Z}}finally{await Q.cancel()}},n0=($,Q,Y,Z)=>{let G=N5($,Q),W=0,z,J=(V)=>{if(!z)z=!0,Z&&Z(V)};return new ReadableStream({async pull(V){try{let{done:N,value:M}=await G.next();if(N){J(),V.close();return}let L=M.byteLength;if(Y){let w=W+=L;Y(w)}V.enqueue(new Uint8Array(M))}catch(N){throw J(N),N}},cancel(V){return J(V),G.return()}},{highWaterMark:2})};var f1=65536,{isFunction:R0}=X,K5=(({Request:$,Response:Q})=>({Request:$,Response:Q}))(X.global),{ReadableStream:g1,TextEncoder:u1}=X.global,c1=($,...Q)=>{try{return!!$(...Q)}catch(Y){return!1}},V5=($)=>{$=X.merge.call({skipUndefined:!0},K5,$);let{fetch:Q,Request:Y,Response:Z}=$,G=Q?R0(Q):typeof fetch==="function",W=R0(Y),z=R0(Z);if(!G)return!1;let J=G&&R0(g1),V=G&&(typeof u1==="function"?((K)=>(I)=>K.encode(I))(new u1):async(K)=>new Uint8Array(await new Y(K).arrayBuffer())),N=W&&J&&c1(()=>{let K=!1,I=new Y(F.origin,{body:new g1,method:"POST",get duplex(){return K=!0,"half"}}).headers.has("Content-Type");return K&&!I}),M=z&&J&&c1(()=>X.isReadableStream(new Z("").body)),L={stream:M&&((K)=>K.body)};G&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((K)=>{!L[K]&&(L[K]=(I,H)=>{let R=I&&I[K];if(R)return R.call(I);throw new P(`Response type '${K}' is not supported`,P.ERR_NOT_SUPPORT,H)})})})();let w=async(K)=>{if(K==null)return 0;if(X.isBlob(K))return K.size;if(X.isSpecCompliantForm(K))return(await new Y(F.origin,{method:"POST",body:K}).arrayBuffer()).byteLength;if(X.isArrayBufferView(K)||X.isArrayBuffer(K))return K.byteLength;if(X.isURLSearchParams(K))K=K+"";if(X.isString(K))return(await V(K)).byteLength},_=async(K,I)=>{let H=X.toFiniteNumber(K.getContentLength());return H==null?w(I):H};return async(K)=>{let{url:I,method:H,data:R,signal:C,cancelToken:S,timeout:E,onDownloadProgress:x,onUploadProgress:g,responseType:A,headers:T0,withCredentials:M0="same-origin",fetchOptions:Z1}=U0(K),G1=Q||fetch;A=A?(A+"").toLowerCase():"text";let K0=h1([C,S&&S.toAbortSignal()],E),a=null,u=K0&&K0.unsubscribe&&(()=>{K0.unsubscribe()}),z1;try{if(g&&N&&H!=="get"&&H!=="head"&&(z1=await _(T0,R))!==0){let m=new Y(I,{method:"POST",body:R,duplex:"half"}),d;if(X.isFormData(R)&&(d=m.headers.get("content-type")))T0.setContentType(d);if(m.body){let[C0,V0]=c0(z1,t(d0(g)));R=n0(m.body,f1,C0,V0)}}if(!X.isString(M0))M0=M0?"include":"omit";let O=W&&"credentials"in Y.prototype,X1={...Z1,signal:K0,method:H.toUpperCase(),headers:T0.normalize().toJSON(),body:R,duplex:"half",credentials:O?M0:void 0};a=W&&new Y(I,X1);let v=await(W?G1(a,Z1):G1(I,X1)),W1=M&&(A==="stream"||A==="response");if(M&&(x||W1&&u)){let m={};["status","statusText","headers"].forEach((J1)=>{m[J1]=v[J1]});let d=X.toFiniteNumber(v.headers.get("content-length")),[C0,V0]=x&&c0(d,t(d0(x),!0))||[];v=new Z(n0(v.body,f1,C0,()=>{V0&&V0(),u&&u()}),m)}A=A||"text";let s1=await L[X.findKey(L,A)||"text"](v,K);return!W1&&u&&u(),await new Promise((m,d)=>{z0(m,d,{data:s1,headers:q.from(v.headers),status:v.status,statusText:v.statusText,config:K,request:a})})}catch(O){if(u&&u(),O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message))throw Object.assign(new P("Network Error",P.ERR_NETWORK,K,a,O&&O.response),{cause:O.cause||O});throw P.from(O,O&&O.code,K,a,O&&O.response)}}},H5=new Map,i0=($)=>{let Q=$&&$.env||{},{fetch:Y,Request:Z,Response:G}=Q,W=[Z,G,Y],z=W.length,J=z,V,N,M=H5;while(J--)V=W[J],N=M.get(V),N===void 0&&M.set(V,N=J?new Map:V5(Q)),M=N;return N},K8=i0();var t0={http:I0,xhr:m1,fetch:{get:i0}};X.forEach(t0,($,Q)=>{if($){try{Object.defineProperty($,"name",{value:Q})}catch(Y){}Object.defineProperty($,"adapterName",{value:Q})}});var d1=($)=>`- ${$}`,P5=($)=>X.isFunction($)||$===null||$===!1;function L5($,Q){$=X.isArray($)?$:[$];let{length:Y}=$,Z,G,W={};for(let z=0;z<Y;z++){Z=$[z];let J;if(G=Z,!P5(Z)){if(G=t0[(J=String(Z)).toLowerCase()],G===void 0)throw new P(`Unknown adapter '${J}'`)}if(G&&(X.isFunction(G)||(G=G.get(Q))))break;W[J||"#"+z]=G}if(!G){let z=Object.entries(W).map(([V,N])=>`adapter ${V} `+(N===!1?"is not supported by the environment":"is not available in the build")),J=Y?z.length>1?`since :
|
|
1
|
+
var r1=Object.defineProperty;var o1=($)=>$;function e1($,Q){this[$]=o1.bind(null,Q)}var N1=($,Q)=>{for(var Y in Q)r1($,Y,{get:Q[Y],enumerable:!0,configurable:!0,set:e1.bind(Q,Y)})};function s($,Q){return function(){return $.apply(Q,arguments)}}var{toString:$4}=Object.prototype,{getPrototypeOf:k0}=Object,{iterator:B0,toStringTag:H1}=Symbol,P0=(($)=>(Q)=>{let Y=$4.call(Q);return $[Y]||($[Y]=Y.slice(8,-1).toLowerCase())})(Object.create(null)),j=($)=>{return $=$.toLowerCase(),(Q)=>P0(Q)===$},L0=($)=>(Q)=>typeof Q===$,{isArray:p}=Array,l=L0("undefined");function r($){return $!==null&&!l($)&&$.constructor!==null&&!l($.constructor)&&T($.constructor.isBuffer)&&$.constructor.isBuffer($)}var B1=j("ArrayBuffer");function Q4($){let Q;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)Q=ArrayBuffer.isView($);else Q=$&&$.buffer&&B1($.buffer);return Q}var Y4=L0("string"),T=L0("function"),P1=L0("number"),o=($)=>$!==null&&typeof $==="object",Z4=($)=>$===!0||$===!1,H0=($)=>{if(P0($)!=="object")return!1;let Q=k0($);return(Q===null||Q===Object.prototype||Object.getPrototypeOf(Q)===null)&&!(H1 in $)&&!(B0 in $)},G4=($)=>{if(!o($)||r($))return!1;try{return Object.keys($).length===0&&Object.getPrototypeOf($)===Object.prototype}catch(Q){return!1}},z4=j("Date"),X4=j("File"),W4=($)=>{return!!($&&typeof $.uri<"u")},J4=($)=>$&&typeof $.getParts<"u",N4=j("Blob"),M4=j("FileList"),K4=($)=>o($)&&T($.pipe);function V4(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var M1=V4(),K1=typeof M1.FormData<"u"?M1.FormData:void 0,H4=($)=>{let Q;return $&&(K1&&$ instanceof K1||T($.append)&&((Q=P0($))==="formdata"||Q==="object"&&T($.toString)&&$.toString()==="[object FormData]"))},B4=j("URLSearchParams"),[P4,L4,_4,w4]=["ReadableStream","Request","Response","Headers"].map(j),F4=($)=>{return $.trim?$.trim():$.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function e($,Q,{allOwnKeys:Y=!1}={}){if($===null||typeof $>"u")return;let Z,G;if(typeof $!=="object")$=[$];if(p($))for(Z=0,G=$.length;Z<G;Z++)Q.call(null,$[Z],Z,$);else{if(r($))return;let W=Y?Object.getOwnPropertyNames($):Object.keys($),z=W.length,J;for(Z=0;Z<z;Z++)J=W[Z],Q.call(null,$[J],J,$)}}function L1($,Q){if(r($))return null;Q=Q.toLowerCase();let Y=Object.keys($),Z=Y.length,G;while(Z-- >0)if(G=Y[Z],Q===G.toLowerCase())return G;return null}var c=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),_1=($)=>!l($)&&$!==c;function A0(){let{caseless:$,skipUndefined:Q}=_1(this)&&this||{},Y={},Z=(G,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let z=$&&L1(Y,W)||W;if(H0(Y[z])&&H0(G))Y[z]=A0(Y[z],G);else if(H0(G))Y[z]=A0({},G);else if(p(G))Y[z]=G.slice();else if(!Q||!l(G))Y[z]=G};for(let G=0,W=arguments.length;G<W;G++)arguments[G]&&e(arguments[G],Z);return Y}var U4=($,Q,Y,{allOwnKeys:Z}={})=>{return e(Q,(G,W)=>{if(Y&&T(G))Object.defineProperty($,W,{value:s(G,Y),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty($,W,{value:G,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:Z}),$},I4=($)=>{if($.charCodeAt(0)===65279)$=$.slice(1);return $},R4=($,Q,Y,Z)=>{$.prototype=Object.create(Q.prototype,Z),Object.defineProperty($.prototype,"constructor",{value:$,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty($,"super",{value:Q.prototype}),Y&&Object.assign($.prototype,Y)},q4=($,Q,Y,Z)=>{let G,W,z,J={};if(Q=Q||{},$==null)return Q;do{G=Object.getOwnPropertyNames($),W=G.length;while(W-- >0)if(z=G[W],(!Z||Z(z,$,Q))&&!J[z])Q[z]=$[z],J[z]=!0;$=Y!==!1&&k0($)}while($&&(!Y||Y($,Q))&&$!==Object.prototype);return Q},S4=($,Q,Y)=>{if($=String($),Y===void 0||Y>$.length)Y=$.length;Y-=Q.length;let Z=$.indexOf(Q,Y);return Z!==-1&&Z===Y},D4=($)=>{if(!$)return null;if(p($))return $;let Q=$.length;if(!P1(Q))return null;let Y=Array(Q);while(Q-- >0)Y[Q]=$[Q];return Y},E4=(($)=>{return(Q)=>{return $&&Q instanceof $}})(typeof Uint8Array<"u"&&k0(Uint8Array)),O4=($,Q)=>{let Z=($&&$[B0]).call($),G;while((G=Z.next())&&!G.done){let W=G.value;Q.call($,W[0],W[1])}},T4=($,Q)=>{let Y,Z=[];while((Y=$.exec(Q))!==null)Z.push(Y);return Z},C4=j("HTMLFormElement"),A4=($)=>{return $.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Y,Z,G){return Z.toUpperCase()+G})},V1=(({hasOwnProperty:$})=>(Q,Y)=>$.call(Q,Y))(Object.prototype),k4=j("RegExp"),w1=($,Q)=>{let Y=Object.getOwnPropertyDescriptors($),Z={};e(Y,(G,W)=>{let z;if((z=Q(G,W,$))!==!1)Z[W]=z||G}),Object.defineProperties($,Z)},x4=($)=>{w1($,(Q,Y)=>{if(T($)&&["arguments","caller","callee"].indexOf(Y)!==-1)return!1;let Z=$[Y];if(!T(Z))return;if(Q.enumerable=!1,"writable"in Q){Q.writable=!1;return}if(!Q.set)Q.set=()=>{throw Error("Can not rewrite read-only method '"+Y+"'")}})},j4=($,Q)=>{let Y={},Z=(G)=>{G.forEach((W)=>{Y[W]=!0})};return p($)?Z($):Z(String($).split(Q)),Y},y4=()=>{},b4=($,Q)=>{return $!=null&&Number.isFinite($=+$)?$:Q};function v4($){return!!($&&T($.append)&&$[H1]==="FormData"&&$[B0])}var m4=($)=>{let Q=[,,,,,,,,,,],Y=(Z,G)=>{if(o(Z)){if(Q.indexOf(Z)>=0)return;if(r(Z))return Z;if(!("toJSON"in Z)){Q[G]=Z;let W=p(Z)?[]:{};return e(Z,(z,J)=>{let V=Y(z,G+1);!l(V)&&(W[J]=V)}),Q[G]=void 0,W}}return Z};return Y($,0)},h4=j("AsyncFunction"),f4=($)=>$&&(o($)||T($))&&T($.then)&&T($.catch),F1=(($,Q)=>{if($)return setImmediate;return Q?((Y,Z)=>{return c.addEventListener("message",({source:G,data:W})=>{if(G===c&&W===Y)Z.length&&Z.shift()()},!1),(G)=>{Z.push(G),c.postMessage(Y,"*")}})(`axios@${Math.random()}`,[]):(Y)=>setTimeout(Y)})(typeof setImmediate==="function",T(c.postMessage)),g4=typeof queueMicrotask<"u"?queueMicrotask.bind(c):typeof process<"u"&&process.nextTick||F1,u4=($)=>$!=null&&T($[B0]),X={isArray:p,isArrayBuffer:B1,isBuffer:r,isFormData:H4,isArrayBufferView:Q4,isString:Y4,isNumber:P1,isBoolean:Z4,isObject:o,isPlainObject:H0,isEmptyObject:G4,isReadableStream:P4,isRequest:L4,isResponse:_4,isHeaders:w4,isUndefined:l,isDate:z4,isFile:X4,isReactNativeBlob:W4,isReactNative:J4,isBlob:N4,isRegExp:k4,isFunction:T,isStream:K4,isURLSearchParams:B4,isTypedArray:E4,isFileList:M4,forEach:e,merge:A0,extend:U4,trim:F4,stripBOM:I4,inherits:R4,toFlatObject:q4,kindOf:P0,kindOfTest:j,endsWith:S4,toArray:D4,forEachEntry:O4,matchAll:T4,isHTMLForm:C4,hasOwnProperty:V1,hasOwnProp:V1,reduceDescriptors:w1,freezeMethods:x4,toObjectSet:j4,toCamelCase:A4,noop:y4,toFiniteNumber:b4,findKey:L1,global:c,isContextDefined:_1,isSpecCompliantForm:v4,toJSONObject:m4,isAsyncFn:h4,isThenable:f4,setImmediate:F1,asap:g4,isIterable:u4};class D extends Error{static from($,Q,Y,Z,G,W){let z=new D($.message,Q||$.code,Y,Z,G);if(z.cause=$,z.name=$.name,$.status!=null&&z.status==null)z.status=$.status;return W&&Object.assign(z,W),z}constructor($,Q,Y,Z,G){super($);if(Object.defineProperty(this,"message",{value:$,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,Q&&(this.code=Q),Y&&(this.config=Y),Z&&(this.request=Z),G)this.response=G,this.status=G.status}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}}D.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";D.ERR_BAD_OPTION="ERR_BAD_OPTION";D.ECONNABORTED="ECONNABORTED";D.ETIMEDOUT="ETIMEDOUT";D.ERR_NETWORK="ERR_NETWORK";D.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";D.ERR_DEPRECATED="ERR_DEPRECATED";D.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";D.ERR_BAD_REQUEST="ERR_BAD_REQUEST";D.ERR_CANCELED="ERR_CANCELED";D.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";D.ERR_INVALID_URL="ERR_INVALID_URL";var P=D;var _0=null;function j0($){return X.isPlainObject($)||X.isArray($)}function U1($){return X.endsWith($,"[]")?$.slice(0,-2):$}function x0($,Q,Y){if(!$)return Q;return $.concat(Q).map(function(G,W){return G=U1(G),!Y&&W?"["+G+"]":G}).join(Y?".":"")}function c4($){return X.isArray($)&&!$.some(j0)}var d4=X.toFlatObject(X,{},null,function(Q){return/^is[A-Z]/.test(Q)});function l4($,Q,Y){if(!X.isObject($))throw TypeError("target must be an object");Q=Q||new(_0||FormData),Y=X.toFlatObject(Y,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,H){return!X.isUndefined(H[_])});let Z=Y.metaTokens,G=Y.visitor||M,W=Y.dots,z=Y.indexes,V=(Y.Blob||typeof Blob<"u"&&Blob)&&X.isSpecCompliantForm(Q);if(!X.isFunction(G))throw TypeError("visitor must be a function");function N(K){if(K===null)return"";if(X.isDate(K))return K.toISOString();if(X.isBoolean(K))return K.toString();if(!V&&X.isBlob(K))throw new P("Blob is not supported. Use a Buffer instead.");if(X.isArrayBuffer(K)||X.isTypedArray(K))return V&&typeof Blob==="function"?new Blob([K]):Buffer.from(K);return K}function M(K,_,H){let R=K;if(X.isReactNative(Q)&&X.isReactNativeBlob(K))return Q.append(x0(H,_,W),N(K)),!1;if(K&&!H&&typeof K==="object"){if(X.endsWith(_,"{}"))_=Z?_:_.slice(0,-2),K=JSON.stringify(K);else if(X.isArray(K)&&c4(K)||(X.isFileList(K)||X.endsWith(_,"[]"))&&(R=X.toArray(K)))return _=U1(_),R.forEach(function(S,E){!(X.isUndefined(S)||S===null)&&Q.append(z===!0?x0([_],E,W):z===null?_:_+"[]",N(S))}),!1}if(j0(K))return!0;return Q.append(x0(H,_,W),N(K)),!1}let L=[],F=Object.assign(d4,{defaultVisitor:M,convertValue:N,isVisitable:j0});function w(K,_){if(X.isUndefined(K))return;if(L.indexOf(K)!==-1)throw Error("Circular reference detected in "+_.join("."));L.push(K),X.forEach(K,function(R,C){if((!(X.isUndefined(R)||R===null)&&G.call(Q,R,X.isString(C)?C.trim():C,_,F))===!0)w(R,_?_.concat(C):[C])}),L.pop()}if(!X.isObject($))throw TypeError("data must be an object");return w($),Q}var h=l4;function I1($){let Q={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\x00"};return encodeURIComponent($).replace(/[!'()~]|%20|%00/g,function(Z){return Q[Z]})}function R1($,Q){this._pairs=[],$&&h($,this,Q)}var q1=R1.prototype;q1.append=function(Q,Y){this._pairs.push([Q,Y])};q1.toString=function(Q){let Y=Q?function(Z){return Q.call(this,Z,I1)}:I1;return this._pairs.map(function(G){return Y(G[0])+"="+Y(G[1])},"").join("&")};var w0=R1;function p4($){return encodeURIComponent($).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function $0($,Q,Y){if(!Q)return $;let Z=Y&&Y.encode||p4,G=X.isFunction(Y)?{serialize:Y}:Y,W=G&&G.serialize,z;if(W)z=W(Q,G);else z=X.isURLSearchParams(Q)?Q.toString():new w0(Q,G).toString(Z);if(z){let J=$.indexOf("#");if(J!==-1)$=$.slice(0,J);$+=($.indexOf("?")===-1?"?":"&")+z}return $}class S1{constructor(){this.handlers=[]}use($,Q,Y){return this.handlers.push({fulfilled:$,rejected:Q,synchronous:Y?Y.synchronous:!1,runWhen:Y?Y.runWhen:null}),this.handlers.length-1}eject($){if(this.handlers[$])this.handlers[$]=null}clear(){if(this.handlers)this.handlers=[]}forEach($){X.forEach(this.handlers,function(Y){if(Y!==null)$(Y)})}}var y0=S1;var i={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var D1=typeof URLSearchParams<"u"?URLSearchParams:w0;var E1=typeof FormData<"u"?FormData:null;var O1=typeof Blob<"u"?Blob:null;var T1={isBrowser:!0,classes:{URLSearchParams:D1,FormData:E1,Blob:O1},protocols:["http","https","file","blob","url","data"]};var m0={};N1(m0,{origin:()=>t4,navigator:()=>b0,hasStandardBrowserWebWorkerEnv:()=>n4,hasStandardBrowserEnv:()=>i4,hasBrowserEnv:()=>v0});var v0=typeof window<"u"&&typeof document<"u",b0=typeof navigator==="object"&&navigator||void 0,i4=v0&&(!b0||["ReactNative","NativeScript","NS"].indexOf(b0.product)<0),n4=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),t4=v0&&window.location.href||"http://localhost";var U={...m0,...T1};function h0($,Q){return h($,new U.classes.URLSearchParams,{visitor:function(Y,Z,G,W){if(U.isNode&&X.isBuffer(Y))return this.append(Z,Y.toString("base64")),!1;return W.defaultVisitor.apply(this,arguments)},...Q})}function a4($){return X.matchAll(/\w+|\[(\w*)]/g,$).map((Q)=>{return Q[0]==="[]"?"":Q[1]||Q[0]})}function s4($){let Q={},Y=Object.keys($),Z,G=Y.length,W;for(Z=0;Z<G;Z++)W=Y[Z],Q[W]=$[W];return Q}function r4($){function Q(Y,Z,G,W){let z=Y[W++];if(z==="__proto__")return!0;let J=Number.isFinite(+z),V=W>=Y.length;if(z=!z&&X.isArray(G)?G.length:z,V){if(X.hasOwnProp(G,z))G[z]=[G[z],Z];else G[z]=Z;return!J}if(!G[z]||!X.isObject(G[z]))G[z]=[];if(Q(Y,Z,G[z],W)&&X.isArray(G[z]))G[z]=s4(G[z]);return!J}if(X.isFormData($)&&X.isFunction($.entries)){let Y={};return X.forEachEntry($,(Z,G)=>{Q(a4(Z),G,Y,0)}),Y}return null}var F0=r4;function o4($,Q,Y){if(X.isString($))try{return(Q||JSON.parse)($),X.trim($)}catch(Z){if(Z.name!=="SyntaxError")throw Z}return(Y||JSON.stringify)($)}var f0={transitional:i,adapter:["xhr","http","fetch"],transformRequest:[function(Q,Y){let Z=Y.getContentType()||"",G=Z.indexOf("application/json")>-1,W=X.isObject(Q);if(W&&X.isHTMLForm(Q))Q=new FormData(Q);if(X.isFormData(Q))return G?JSON.stringify(F0(Q)):Q;if(X.isArrayBuffer(Q)||X.isBuffer(Q)||X.isStream(Q)||X.isFile(Q)||X.isBlob(Q)||X.isReadableStream(Q))return Q;if(X.isArrayBufferView(Q))return Q.buffer;if(X.isURLSearchParams(Q))return Y.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),Q.toString();let J;if(W){if(Z.indexOf("application/x-www-form-urlencoded")>-1)return h0(Q,this.formSerializer).toString();if((J=X.isFileList(Q))||Z.indexOf("multipart/form-data")>-1){let V=this.env&&this.env.FormData;return h(J?{"files[]":Q}:Q,V&&new V,this.formSerializer)}}if(W||G)return Y.setContentType("application/json",!1),o4(Q);return Q}],transformResponse:[function(Q){let Y=this.transitional||f0.transitional,Z=Y&&Y.forcedJSONParsing,G=this.responseType==="json";if(X.isResponse(Q)||X.isReadableStream(Q))return Q;if(Q&&X.isString(Q)&&(Z&&!this.responseType||G)){let z=!(Y&&Y.silentJSONParsing)&&G;try{return JSON.parse(Q,this.parseReviver)}catch(J){if(z){if(J.name==="SyntaxError")throw P.from(J,P.ERR_BAD_RESPONSE,this,null,this.response);throw J}}}return Q}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:U.classes.FormData,Blob:U.classes.Blob},validateStatus:function(Q){return Q>=200&&Q<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],($)=>{f0.headers[$]={}});var n=f0;var e4=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),C1=($)=>{let Q={},Y,Z,G;return $&&$.split(`
|
|
2
|
+
`).forEach(function(z){if(G=z.indexOf(":"),Y=z.substring(0,G).trim().toLowerCase(),Z=z.substring(G+1).trim(),!Y||Q[Y]&&e4[Y])return;if(Y==="set-cookie")if(Q[Y])Q[Y].push(Z);else Q[Y]=[Z];else Q[Y]=Q[Y]?Q[Y]+", "+Z:Z}),Q};var A1=Symbol("internals");function Q0($){return $&&String($).trim().toLowerCase()}function U0($){if($===!1||$==null)return $;return X.isArray($)?$.map(U0):String($)}function $5($){let Q=Object.create(null),Y=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Z;while(Z=Y.exec($))Q[Z[1]]=Z[2];return Q}var Q5=($)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test($.trim());function g0($,Q,Y,Z,G){if(X.isFunction(Z))return Z.call(this,Q,Y);if(G)Q=Y;if(!X.isString(Q))return;if(X.isString(Z))return Q.indexOf(Z)!==-1;if(X.isRegExp(Z))return Z.test(Q)}function Y5($){return $.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Q,Y,Z)=>{return Y.toUpperCase()+Z})}function Z5($,Q){let Y=X.toCamelCase(" "+Q);["get","set","has"].forEach((Z)=>{Object.defineProperty($,Z+Y,{value:function(G,W,z){return this[Z].call(this,Q,G,W,z)},configurable:!0})})}class Y0{constructor($){$&&this.set($)}set($,Q,Y){let Z=this;function G(z,J,V){let N=Q0(J);if(!N)throw Error("header name must be a non-empty string");let M=X.findKey(Z,N);if(!M||Z[M]===void 0||V===!0||V===void 0&&Z[M]!==!1)Z[M||J]=U0(z)}let W=(z,J)=>X.forEach(z,(V,N)=>G(V,N,J));if(X.isPlainObject($)||$ instanceof this.constructor)W($,Q);else if(X.isString($)&&($=$.trim())&&!Q5($))W(C1($),Q);else if(X.isObject($)&&X.isIterable($)){let z={},J,V;for(let N of $){if(!X.isArray(N))throw TypeError("Object iterator must return a key-value pair");z[V=N[0]]=(J=z[V])?X.isArray(J)?[...J,N[1]]:[J,N[1]]:N[1]}W(z,Q)}else $!=null&&G(Q,$,Y);return this}get($,Q){if($=Q0($),$){let Y=X.findKey(this,$);if(Y){let Z=this[Y];if(!Q)return Z;if(Q===!0)return $5(Z);if(X.isFunction(Q))return Q.call(this,Z,Y);if(X.isRegExp(Q))return Q.exec(Z);throw TypeError("parser must be boolean|regexp|function")}}}has($,Q){if($=Q0($),$){let Y=X.findKey(this,$);return!!(Y&&this[Y]!==void 0&&(!Q||g0(this,this[Y],Y,Q)))}return!1}delete($,Q){let Y=this,Z=!1;function G(W){if(W=Q0(W),W){let z=X.findKey(Y,W);if(z&&(!Q||g0(Y,Y[z],z,Q)))delete Y[z],Z=!0}}if(X.isArray($))$.forEach(G);else G($);return Z}clear($){let Q=Object.keys(this),Y=Q.length,Z=!1;while(Y--){let G=Q[Y];if(!$||g0(this,this[G],G,$,!0))delete this[G],Z=!0}return Z}normalize($){let Q=this,Y={};return X.forEach(this,(Z,G)=>{let W=X.findKey(Y,G);if(W){Q[W]=U0(Z),delete Q[G];return}let z=$?Y5(G):String(G).trim();if(z!==G)delete Q[G];Q[z]=U0(Z),Y[z]=!0}),this}concat(...$){return this.constructor.concat(this,...$)}toJSON($){let Q=Object.create(null);return X.forEach(this,(Y,Z)=>{Y!=null&&Y!==!1&&(Q[Z]=$&&X.isArray(Y)?Y.join(", "):Y)}),Q}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([$,Q])=>$+": "+Q).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from($){return $ instanceof this?$:new this($)}static concat($,...Q){let Y=new this($);return Q.forEach((Z)=>Y.set(Z)),Y}static accessor($){let Y=(this[A1]=this[A1]={accessors:{}}).accessors,Z=this.prototype;function G(W){let z=Q0(W);if(!Y[z])Z5(Z,W),Y[z]=!0}return X.isArray($)?$.forEach(G):G($),this}}Y0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(Y0.prototype,({value:$},Q)=>{let Y=Q[0].toUpperCase()+Q.slice(1);return{get:()=>$,set(Z){this[Y]=Z}}});X.freezeMethods(Y0);var q=Y0;function Z0($,Q){let Y=this||n,Z=Q||Y,G=q.from(Z.headers),W=Z.data;return X.forEach($,function(J){W=J.call(Y,W,G.normalize(),Q?Q.status:void 0)}),G.normalize(),W}function G0($){return!!($&&$.__CANCEL__)}class k1 extends P{constructor($,Q,Y){super($==null?"canceled":$,P.ERR_CANCELED,Q,Y);this.name="CanceledError",this.__CANCEL__=!0}}var b=k1;function z0($,Q,Y){let Z=Y.config.validateStatus;if(!Y.status||!Z||Z(Y.status))$(Y);else Q(new P("Request failed with status code "+Y.status,[P.ERR_BAD_REQUEST,P.ERR_BAD_RESPONSE][Math.floor(Y.status/100)-4],Y.config,Y.request,Y))}function u0($){let Q=/^([-+\w]{1,25})(:?\/\/|:)/.exec($);return Q&&Q[1]||""}function G5($,Q){$=$||10;let Y=Array($),Z=Array($),G=0,W=0,z;return Q=Q!==void 0?Q:1000,function(V){let N=Date.now(),M=Z[W];if(!z)z=N;Y[G]=V,Z[G]=N;let L=W,F=0;while(L!==G)F+=Y[L++],L=L%$;if(G=(G+1)%$,G===W)W=(W+1)%$;if(N-z<Q)return;let w=M&&N-M;return w?Math.round(F*1000/w):void 0}}var x1=G5;function z5($,Q){let Y=0,Z=1000/Q,G,W,z=(N,M=Date.now())=>{if(Y=M,G=null,W)clearTimeout(W),W=null;$(...N)};return[(...N)=>{let M=Date.now(),L=M-Y;if(L>=Z)z(N,M);else if(G=N,!W)W=setTimeout(()=>{W=null,z(G)},Z-L)},()=>G&&z(G)]}var j1=z5;var t=($,Q,Y=3)=>{let Z=0,G=x1(50,250);return j1((W)=>{let z=W.loaded,J=W.lengthComputable?W.total:void 0,V=z-Z,N=G(V),M=z<=J;Z=z;let L={loaded:z,total:J,progress:J?z/J:void 0,bytes:V,rate:N?N:void 0,estimated:N&&J&&M?(J-z)/N:void 0,event:W,lengthComputable:J!=null,[Q?"download":"upload"]:!0};$(L)},Y)},c0=($,Q)=>{let Y=$!=null;return[(Z)=>Q[0]({lengthComputable:Y,total:$,loaded:Z}),Q[1]]},d0=($)=>(...Q)=>X.asap(()=>$(...Q));var y1=U.hasStandardBrowserEnv?(($,Q)=>(Y)=>{return Y=new URL(Y,U.origin),$.protocol===Y.protocol&&$.host===Y.host&&(Q||$.port===Y.port)})(new URL(U.origin),U.navigator&&/(msie|trident)/i.test(U.navigator.userAgent)):()=>!0;var b1=U.hasStandardBrowserEnv?{write($,Q,Y,Z,G,W,z){if(typeof document>"u")return;let J=[`${$}=${encodeURIComponent(Q)}`];if(X.isNumber(Y))J.push(`expires=${new Date(Y).toUTCString()}`);if(X.isString(Z))J.push(`path=${Z}`);if(X.isString(G))J.push(`domain=${G}`);if(W===!0)J.push("secure");if(X.isString(z))J.push(`SameSite=${z}`);document.cookie=J.join("; ")},read($){if(typeof document>"u")return null;let Q=document.cookie.match(new RegExp("(?:^|; )"+$+"=([^;]*)"));return Q?decodeURIComponent(Q[1]):null},remove($){this.write($,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};function l0($){if(typeof $!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test($)}function p0($,Q){return Q?$.replace(/\/?\/$/,"")+"/"+Q.replace(/^\/+/,""):$}function X0($,Q,Y){let Z=!l0(Q);if($&&(Z||Y==!1))return p0($,Q);return Q}var v1=($)=>$ instanceof q?{...$}:$;function y($,Q){Q=Q||{};let Y={};function Z(N,M,L,F){if(X.isPlainObject(N)&&X.isPlainObject(M))return X.merge.call({caseless:F},N,M);else if(X.isPlainObject(M))return X.merge({},M);else if(X.isArray(M))return M.slice();return M}function G(N,M,L,F){if(!X.isUndefined(M))return Z(N,M,L,F);else if(!X.isUndefined(N))return Z(void 0,N,L,F)}function W(N,M){if(!X.isUndefined(M))return Z(void 0,M)}function z(N,M){if(!X.isUndefined(M))return Z(void 0,M);else if(!X.isUndefined(N))return Z(void 0,N)}function J(N,M,L){if(L in Q)return Z(N,M);else if(L in $)return Z(void 0,N)}let V={url:W,method:W,data:W,baseURL:z,transformRequest:z,transformResponse:z,paramsSerializer:z,timeout:z,timeoutMessage:z,withCredentials:z,withXSRFToken:z,adapter:z,responseType:z,xsrfCookieName:z,xsrfHeaderName:z,onUploadProgress:z,onDownloadProgress:z,decompress:z,maxContentLength:z,maxBodyLength:z,beforeRedirect:z,transport:z,httpAgent:z,httpsAgent:z,cancelToken:z,socketPath:z,responseEncoding:z,validateStatus:J,headers:(N,M,L)=>G(v1(N),v1(M),L,!0)};return X.forEach(Object.keys({...$,...Q}),function(M){if(M==="__proto__"||M==="constructor"||M==="prototype")return;let L=X.hasOwnProp(V,M)?V[M]:G,F=L($[M],Q[M],M);X.isUndefined(F)&&L!==J||(Y[M]=F)}),Y}var I0=($)=>{let Q=y({},$),{data:Y,withXSRFToken:Z,xsrfHeaderName:G,xsrfCookieName:W,headers:z,auth:J}=Q;if(Q.headers=z=q.from(z),Q.url=$0(X0(Q.baseURL,Q.url,Q.allowAbsoluteUrls),$.params,$.paramsSerializer),J)z.set("Authorization","Basic "+btoa((J.username||"")+":"+(J.password?unescape(encodeURIComponent(J.password)):"")));if(X.isFormData(Y)){if(U.hasStandardBrowserEnv||U.hasStandardBrowserWebWorkerEnv)z.setContentType(void 0);else if(X.isFunction(Y.getHeaders)){let V=Y.getHeaders(),N=["content-type","content-length"];Object.entries(V).forEach(([M,L])=>{if(N.includes(M.toLowerCase()))z.set(M,L)})}}if(U.hasStandardBrowserEnv){if(Z&&X.isFunction(Z)&&(Z=Z(Q)),Z||Z!==!1&&y1(Q.url)){let V=G&&W&&b1.read(W);if(V)z.set(G,V)}}return Q};var X5=typeof XMLHttpRequest<"u",m1=X5&&function($){return new Promise(function(Y,Z){let G=I0($),W=G.data,z=q.from(G.headers).normalize(),{responseType:J,onUploadProgress:V,onDownloadProgress:N}=G,M,L,F,w,K;function _(){w&&w(),K&&K(),G.cancelToken&&G.cancelToken.unsubscribe(M),G.signal&&G.signal.removeEventListener("abort",M)}let H=new XMLHttpRequest;H.open(G.method.toUpperCase(),G.url,!0),H.timeout=G.timeout;function R(){if(!H)return;let S=q.from("getAllResponseHeaders"in H&&H.getAllResponseHeaders()),x={data:!J||J==="text"||J==="json"?H.responseText:H.response,status:H.status,statusText:H.statusText,headers:S,config:$,request:H};z0(function(A){Y(A),_()},function(A){Z(A),_()},x),H=null}if("onloadend"in H)H.onloadend=R;else H.onreadystatechange=function(){if(!H||H.readyState!==4)return;if(H.status===0&&!(H.responseURL&&H.responseURL.indexOf("file:")===0))return;setTimeout(R)};if(H.onabort=function(){if(!H)return;Z(new P("Request aborted",P.ECONNABORTED,$,H)),H=null},H.onerror=function(E){let x=E&&E.message?E.message:"Network Error",g=new P(x,P.ERR_NETWORK,$,H);g.event=E||null,Z(g),H=null},H.ontimeout=function(){let E=G.timeout?"timeout of "+G.timeout+"ms exceeded":"timeout exceeded",x=G.transitional||i;if(G.timeoutErrorMessage)E=G.timeoutErrorMessage;Z(new P(E,x.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,$,H)),H=null},W===void 0&&z.setContentType(null),"setRequestHeader"in H)X.forEach(z.toJSON(),function(E,x){H.setRequestHeader(x,E)});if(!X.isUndefined(G.withCredentials))H.withCredentials=!!G.withCredentials;if(J&&J!=="json")H.responseType=G.responseType;if(N)[F,K]=t(N,!0),H.addEventListener("progress",F);if(V&&H.upload)[L,w]=t(V),H.upload.addEventListener("progress",L),H.upload.addEventListener("loadend",w);if(G.cancelToken||G.signal){if(M=(S)=>{if(!H)return;Z(!S||S.type?new b(null,$,H):S),H.abort(),H=null},G.cancelToken&&G.cancelToken.subscribe(M),G.signal)G.signal.aborted?M():G.signal.addEventListener("abort",M)}let C=u0(G.url);if(C&&U.protocols.indexOf(C)===-1){Z(new P("Unsupported protocol "+C+":",P.ERR_BAD_REQUEST,$));return}H.send(W||null)})};var W5=($,Q)=>{let{length:Y}=$=$?$.filter(Boolean):[];if(Q||Y){let Z=new AbortController,G,W=function(N){if(!G){G=!0,J();let M=N instanceof Error?N:this.reason;Z.abort(M instanceof P?M:new b(M instanceof Error?M.message:M))}},z=Q&&setTimeout(()=>{z=null,W(new P(`timeout of ${Q}ms exceeded`,P.ETIMEDOUT))},Q),J=()=>{if($)z&&clearTimeout(z),z=null,$.forEach((N)=>{N.unsubscribe?N.unsubscribe(W):N.removeEventListener("abort",W)}),$=null};$.forEach((N)=>N.addEventListener("abort",W));let{signal:V}=Z;return V.unsubscribe=()=>X.asap(J),V}},h1=W5;var J5=function*($,Q){let Y=$.byteLength;if(!Q||Y<Q){yield $;return}let Z=0,G;while(Z<Y)G=Z+Q,yield $.slice(Z,G),Z=G},N5=async function*($,Q){for await(let Y of M5($))yield*J5(Y,Q)},M5=async function*($){if($[Symbol.asyncIterator]){yield*$;return}let Q=$.getReader();try{for(;;){let{done:Y,value:Z}=await Q.read();if(Y)break;yield Z}}finally{await Q.cancel()}},i0=($,Q,Y,Z)=>{let G=N5($,Q),W=0,z,J=(V)=>{if(!z)z=!0,Z&&Z(V)};return new ReadableStream({async pull(V){try{let{done:N,value:M}=await G.next();if(N){J(),V.close();return}let L=M.byteLength;if(Y){let F=W+=L;Y(F)}V.enqueue(new Uint8Array(M))}catch(N){throw J(N),N}},cancel(V){return J(V),G.return()}},{highWaterMark:2})};var f1=65536,{isFunction:R0}=X,K5=(({Request:$,Response:Q})=>({Request:$,Response:Q}))(X.global),{ReadableStream:g1,TextEncoder:u1}=X.global,c1=($,...Q)=>{try{return!!$(...Q)}catch(Y){return!1}},V5=($)=>{$=X.merge.call({skipUndefined:!0},K5,$);let{fetch:Q,Request:Y,Response:Z}=$,G=Q?R0(Q):typeof fetch==="function",W=R0(Y),z=R0(Z);if(!G)return!1;let J=G&&R0(g1),V=G&&(typeof u1==="function"?((K)=>(_)=>K.encode(_))(new u1):async(K)=>new Uint8Array(await new Y(K).arrayBuffer())),N=W&&J&&c1(()=>{let K=!1,_=new Y(U.origin,{body:new g1,method:"POST",get duplex(){return K=!0,"half"}}).headers.has("Content-Type");return K&&!_}),M=z&&J&&c1(()=>X.isReadableStream(new Z("").body)),L={stream:M&&((K)=>K.body)};G&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((K)=>{!L[K]&&(L[K]=(_,H)=>{let R=_&&_[K];if(R)return R.call(_);throw new P(`Response type '${K}' is not supported`,P.ERR_NOT_SUPPORT,H)})})})();let F=async(K)=>{if(K==null)return 0;if(X.isBlob(K))return K.size;if(X.isSpecCompliantForm(K))return(await new Y(U.origin,{method:"POST",body:K}).arrayBuffer()).byteLength;if(X.isArrayBufferView(K)||X.isArrayBuffer(K))return K.byteLength;if(X.isURLSearchParams(K))K=K+"";if(X.isString(K))return(await V(K)).byteLength},w=async(K,_)=>{let H=X.toFiniteNumber(K.getContentLength());return H==null?F(_):H};return async(K)=>{let{url:_,method:H,data:R,signal:C,cancelToken:S,timeout:E,onDownloadProgress:x,onUploadProgress:g,responseType:A,headers:T0,withCredentials:M0="same-origin",fetchOptions:Z1}=I0(K),G1=Q||fetch;A=A?(A+"").toLowerCase():"text";let K0=h1([C,S&&S.toAbortSignal()],E),a=null,u=K0&&K0.unsubscribe&&(()=>{K0.unsubscribe()}),z1;try{if(g&&N&&H!=="get"&&H!=="head"&&(z1=await w(T0,R))!==0){let m=new Y(_,{method:"POST",body:R,duplex:"half"}),d;if(X.isFormData(R)&&(d=m.headers.get("content-type")))T0.setContentType(d);if(m.body){let[C0,V0]=c0(z1,t(d0(g)));R=i0(m.body,f1,C0,V0)}}if(!X.isString(M0))M0=M0?"include":"omit";let O=W&&"credentials"in Y.prototype,X1={...Z1,signal:K0,method:H.toUpperCase(),headers:T0.normalize().toJSON(),body:R,duplex:"half",credentials:O?M0:void 0};a=W&&new Y(_,X1);let v=await(W?G1(a,Z1):G1(_,X1)),W1=M&&(A==="stream"||A==="response");if(M&&(x||W1&&u)){let m={};["status","statusText","headers"].forEach((J1)=>{m[J1]=v[J1]});let d=X.toFiniteNumber(v.headers.get("content-length")),[C0,V0]=x&&c0(d,t(d0(x),!0))||[];v=new Z(i0(v.body,f1,C0,()=>{V0&&V0(),u&&u()}),m)}A=A||"text";let s1=await L[X.findKey(L,A)||"text"](v,K);return!W1&&u&&u(),await new Promise((m,d)=>{z0(m,d,{data:s1,headers:q.from(v.headers),status:v.status,statusText:v.statusText,config:K,request:a})})}catch(O){if(u&&u(),O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message))throw Object.assign(new P("Network Error",P.ERR_NETWORK,K,a,O&&O.response),{cause:O.cause||O});throw P.from(O,O&&O.code,K,a,O&&O.response)}}},H5=new Map,n0=($)=>{let Q=$&&$.env||{},{fetch:Y,Request:Z,Response:G}=Q,W=[Z,G,Y],z=W.length,J=z,V,N,M=H5;while(J--)V=W[J],N=M.get(V),N===void 0&&M.set(V,N=J?new Map:V5(Q)),M=N;return N},K8=n0();var t0={http:_0,xhr:m1,fetch:{get:n0}};X.forEach(t0,($,Q)=>{if($){try{Object.defineProperty($,"name",{value:Q})}catch(Y){}Object.defineProperty($,"adapterName",{value:Q})}});var d1=($)=>`- ${$}`,P5=($)=>X.isFunction($)||$===null||$===!1;function L5($,Q){$=X.isArray($)?$:[$];let{length:Y}=$,Z,G,W={};for(let z=0;z<Y;z++){Z=$[z];let J;if(G=Z,!P5(Z)){if(G=t0[(J=String(Z)).toLowerCase()],G===void 0)throw new P(`Unknown adapter '${J}'`)}if(G&&(X.isFunction(G)||(G=G.get(Q))))break;W[J||"#"+z]=G}if(!G){let z=Object.entries(W).map(([V,N])=>`adapter ${V} `+(N===!1?"is not supported by the environment":"is not available in the build")),J=Y?z.length>1?`since :
|
|
4
4
|
`+z.map(d1).join(`
|
|
5
|
-
`):" "+d1(z[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+J,"ERR_NOT_SUPPORT")}return G}var q0={getAdapter:L5,adapters:t0};function a0($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new b(null,$)}function S0($){if(a0($),$.headers=q.from($.headers),$.data=Z0.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return q0.getAdapter($.adapter||
|
|
6
|
-
`+G}catch(W){}}throw Y}}_request($,Q){if(typeof $==="string")Q=Q||{},Q.url=$;else Q=$||{};Q=y(this.defaults,Q);let{transitional:Y,paramsSerializer:Z,headers:G}=Q;if(Y!==void 0)W0.assertOptions(Y,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean),legacyInterceptorReqResOrdering:k.transitional(k.boolean)},!1);if(Z!=null)if(X.isFunction(Z))Q.paramsSerializer={serialize:Z};else W0.assertOptions(Z,{encode:k.function,serialize:k.function},!0);if(Q.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Q.allowAbsoluteUrls=!0;W0.assertOptions(Q,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let W=G&&X.merge(G.common,G[Q.method]);G&&X.forEach(["delete","get","head","post","put","patch","common"],(_)=>{delete G[_]}),Q.headers=q.concat(W,G);let z=[],J=!0;this.interceptors.request.forEach(function(K){if(typeof K.runWhen==="function"&&K.runWhen(Q)===!1)return;J=J&&K.synchronous;let I=Q.transitional||n;if(I&&I.legacyInterceptorReqResOrdering)z.unshift(K.fulfilled,K.rejected);else z.push(K.fulfilled,K.rejected)});let V=[];this.interceptors.response.forEach(function(K){V.push(K.fulfilled,K.rejected)});let N,M=0,L;if(!J){let _=[S0.bind(this),void 0];_.unshift(...z),_.push(...V),L=_.length,N=Promise.resolve(Q);while(M<L)N=N.then(_[M++],_[M++]);return N}L=z.length;let w=Q;while(M<L){let _=z[M++],K=z[M++];try{w=_(w)}catch(I){K.call(this,I);break}}try{N=S0.call(this,w)}catch(_){return Promise.reject(_)}M=0,L=V.length;while(M<L)N=N.then(V[M++],V[M++]);return N}getUri($){$=y(this.defaults,$);let Q=X0($.baseURL,$.url,$.allowAbsoluteUrls);return $0(Q,$.params,$.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(Q){J0.prototype[Q]=function(Y,Z){return this.request(y(Z||{},{method:Q,url:Y,data:(Z||{}).data}))}});X.forEach(["post","put","patch"],function(Q){function Y(Z){return function(W,z,J){return this.request(y(J||{},{method:Q,headers:Z?{"Content-Type":"multipart/form-data"}:{},url:W,data:z}))}}J0.prototype[Q]=Y(),J0.prototype[Q+"Form"]=Y(!0)});var N0=J0;class s0{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Q;this.promise=new Promise(function(G){Q=G});let Y=this;this.promise.then((Z)=>{if(!Y._listeners)return;let G=Y._listeners.length;while(G-- >0)Y._listeners[G](Z);Y._listeners=null}),this.promise.then=(Z)=>{let G,W=new Promise((z)=>{Y.subscribe(z),G=z}).then(Z);return W.cancel=function(){Y.unsubscribe(G)},W},$(function(G,W,z){if(Y.reason)return;Y.reason=new b(G,W,z),Q(Y.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Q=this._listeners.indexOf($);if(Q!==-1)this._listeners.splice(Q,1)}toAbortSignal(){let $=new AbortController,Q=(Y)=>{$.abort(Y)};return this.subscribe(Q),$.signal.unsubscribe=()=>this.unsubscribe(Q),$.signal}static source(){let $;return{token:new s0(function(Z){$=Z}),cancel:$}}}var p1=s0;function r0($){return function(Y){return $.apply(null,Y)}}function o0($){return X.isObject($)&&$.isAxiosError===!0}var e0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e0).forEach(([$,Q])=>{e0[Q]=$});var n1=e0;function i1($){let Q=new N0($),Y=s(N0.prototype.request,Q);return X.extend(Y,N0.prototype,Q,{allOwnKeys:!0}),X.extend(Y,Q,null,{allOwnKeys:!0}),Y.create=function(G){return i1(y($,G))},Y}var U=i1(i);U.Axios=N0;U.CanceledError=b;U.CancelToken=p1;U.isCancel=G0;U.VERSION=D0;U.toFormData=h;U.AxiosError=P;U.Cancel=U.CanceledError;U.all=function(Q){return Promise.all(Q)};U.spread=r0;U.isAxiosError=o0;U.mergeConfig=y;U.AxiosHeaders=q;U.formToJSON=($)=>w0(X.isHTMLForm($)?new FormData($):$);U.getAdapter=q0.getAdapter;U.HttpStatusCode=n1;U.default=U;var B=U;var $1={};N1($1,{updateTemplate:()=>o5,updateOrgMember:()=>i5,updateOrg:()=>u5,updateCurrentUserEmail:()=>G2,updateCurrentUser:()=>Q2,updateAgentStatus:()=>E5,updateAgent:()=>q5,signup:()=>j5,revokeApiKey:()=>C5,removeOrgMember:()=>n5,logoutAll:()=>A5,logout:()=>x5,login:()=>k5,listUserTemplates:()=>z2,listUserAgents:()=>Y2,listOrgs:()=>m5,listOrgTemplates:()=>t5,listOrgMembers:()=>l5,listOrgAgents:()=>c5,listMessages:()=>v5,listConversations:()=>S5,listApiKeys:()=>O5,lintAgent:()=>D5,getUser:()=>W2,getTemplate:()=>r5,getOrg:()=>g5,getCurrentUser:()=>$2,getConversation:()=>b5,getAgent:()=>R5,deleteTemplate:()=>s5,deleteOrg:()=>f5,deleteCurrentUser:()=>e5,deleteConversation:()=>y5,deleteAgent:()=>U5,createUserTemplate:()=>X2,createUserAgent:()=>Z2,createOrgTemplate:()=>a5,createOrgAgent:()=>d5,createOrg:()=>h5,createApiKey:()=>T5,addOrgMember:()=>p5,UpdateStatusBodyStatus:()=>F5,UpdateMemberBodyRole:()=>w5,AddMemberBodyRole:()=>_5});var _5={admin:"admin",member:"member",viewer:"viewer"},w5={owner:"owner",admin:"admin",member:"member",viewer:"viewer"},F5={draft:"draft",live:"live",archived:"archived"},U5=($,Q)=>{return B.delete(`/agents/${$}`,Q)},R5=($,Q)=>{return B.get(`/agents/${$}`,Q)},q5=($,Q,Y)=>{return B.patch(`/agents/${$}`,Q,Y)},S5=($,Q,Y)=>{return B.get(`/agents/${$}/conversations`,{...Y,params:{...Q,...Y?.params}})},D5=($,Q,Y)=>{return B.post(`/agents/${$}/lint`,Q,Y)},E5=($,Q,Y)=>{return B.patch(`/agents/${$}/status`,Q,Y)},O5=($)=>{return B.get("/auth/api-keys",$)},T5=($,Q)=>{return B.post("/auth/api-keys",$,Q)},C5=($,Q)=>{return B.delete(`/auth/api-keys/${$}`,Q)},A5=($)=>{return B.delete("/auth/sessions",$)},k5=($,Q)=>{return B.post("/auth/sessions",$,Q)},x5=($)=>{return B.delete("/auth/sessions/me",$)},j5=($,Q)=>{return B.post("/auth/signup",$,Q)},y5=($,Q)=>{return B.delete(`/conversations/${$}`,Q)},b5=($,Q)=>{return B.get(`/conversations/${$}`,Q)},v5=($,Q,Y)=>{return B.get(`/conversations/${$}/messages`,{...Y,params:{...Q,...Y?.params}})},m5=($)=>{return B.get("/orgs",$)},h5=($,Q)=>{return B.post("/orgs",$,Q)},f5=($,Q)=>{return B.delete(`/orgs/${$}`,Q)},g5=($,Q)=>{return B.get(`/orgs/${$}`,Q)},u5=($,Q,Y)=>{return B.patch(`/orgs/${$}`,Q,Y)},c5=($,Q,Y)=>{return B.get(`/orgs/${$}/agents`,{...Y,params:{...Q,...Y?.params}})},d5=($,Q,Y)=>{return B.post(`/orgs/${$}/agents`,Q,Y)},l5=($,Q)=>{return B.get(`/orgs/${$}/members`,Q)},p5=($,Q,Y)=>{return B.post(`/orgs/${$}/members`,Q,Y)},n5=($,Q,Y)=>{return B.delete(`/orgs/${$}/members/${Q}`,Y)},i5=($,Q,Y,Z)=>{return B.patch(`/orgs/${$}/members/${Q}`,Y,Z)},t5=($,Q,Y)=>{return B.get(`/orgs/${$}/templates`,{...Y,params:{...Q,...Y?.params}})},a5=($,Q,Y)=>{return B.post(`/orgs/${$}/templates`,Q,Y)},s5=($,Q)=>{return B.delete(`/templates/${$}`,Q)},r5=($,Q)=>{return B.get(`/templates/${$}`,Q)},o5=($,Q,Y)=>{return B.patch(`/templates/${$}`,Q,Y)},e5=($)=>{return B.delete("/users/me",$)},$2=($)=>{return B.get("/users/me",$)},Q2=($,Q)=>{return B.patch("/users/me",$,Q)},Y2=($,Q)=>{return B.get("/users/me/agents",{...Q,params:{...$,...Q?.params}})},Z2=($,Q)=>{return B.post("/users/me/agents",$,Q)},G2=($,Q)=>{return B.patch("/users/me/email",$,Q)},z2=($,Q)=>{return B.get("/users/me/templates",{...Q,params:{...$,...Q?.params}})},X2=($,Q)=>{return B.post("/users/me/templates",$,Q)},W2=($,Q)=>{return B.get(`/users/${$}`,Q)};class O0{_transport;_conversationId;_closed=!1;_onEvent;_pendingAudioMetadata=null;_remainingMs=0;_elapsedMs=0;get conversationId(){return this._conversationId}get remainingMs(){return this._remainingMs}get elapsedMs(){return this._elapsedMs}get closed(){return this._closed}constructor($,Q,Y){this._transport=$,this._conversationId=Q,this._onEvent=Y.onEvent,this.#$()}sendText($){if(this._closed){console.warn("Cannot send text: session is closed");return}this._transport.send({type:"input_text",text:$})}sendAudio($){if(this._closed){console.warn("Cannot send audio: session is closed");return}this._transport.send({type:"input_audio"}),this._transport.sendBinary($)}streamAudio($){if(this._closed){console.warn("Cannot stream audio: session is closed");return}this._transport.send({type:"input_audio_stream"}),this._transport.sendBinary($)}cancelRequest(){if(this._closed){console.warn("Cannot cancel request: session is closed");return}this._transport.send({type:"cancel"})}end(){if(this._closed){console.warn("Cannot end session: session is closed");return}this._transport.send({type:"end"})}close(){if(this._closed)return;this._closed=!0,this._transport.close()}#$(){this._transport.onMessage(($)=>{let Q=$;if(Q.type==="audio_delta"){this._pendingAudioMetadata={size:Q.size};return}if(Q.type==="tick")this._remainingMs=Q.remaining_ms,this._elapsedMs=Q.elapsed_ms;if(Q.type==="session_closed")this._closed=!0;this._onEvent?.(Q)}),this._transport.onBinary(($)=>{if(this._pendingAudioMetadata){let Q={type:"audio_delta",size:this._pendingAudioMetadata.size,audio:$};this._pendingAudioMetadata=null,this._onEvent?.(Q)}}),this._transport.onClose(()=>{if(this._closed)return;this._closed=!0,this._onEvent?.({type:"connection_lost",reason:"socket_closed"})}),this._transport.onError(()=>{if(this._closed)return;this._closed=!0,this._onEvent?.({type:"connection_lost",reason:"socket_error"})})}}class f extends Error{code;constructor($,Q="TRANSPORT_ERROR"){super($);this.code=Q;this.name="ConversationTransportError"}}class Q1{_ws;_closed=!1;_onMessage=null;_onBinary=null;_onError=null;_onClose=null;constructor($){this._ws=$}async connect(){if(this._ws.readyState===WebSocket.OPEN)throw new f("Already connected","ALREADY_CONNECTED");if(this._ws.readyState===WebSocket.CLOSING||this._ws.readyState===WebSocket.CLOSED)throw new f("Socket is closing or closed","SOCKET_CLOSED");return new Promise(($,Q)=>{let Y,Z;Y=()=>{this._ws.removeEventListener("open",Y),this._ws.removeEventListener("error",Z),this.#$(),$()},Z=()=>{this._ws.removeEventListener("open",Y),this._ws.removeEventListener("error",Z),Q(new f("Connection failed","CONNECTION_FAILED"))},this._ws.addEventListener("open",Y),this._ws.addEventListener("error",Z)})}send($){if(this._ws.readyState!==WebSocket.OPEN)throw new f("Not connected","NOT_CONNECTED");this._ws.send(JSON.stringify($))}async sendBinary($){if(this._ws.readyState!==WebSocket.OPEN)throw new f("Not connected","NOT_CONNECTED");let Q=await $.arrayBuffer();this._ws.send(Q)}onMessage($){this._onMessage=$}onBinary($){this._onBinary=$}onError($){this._onError=$}onClose($){this._onClose=$}close(){if(this._closed)return;if(this._closed=!0,this._ws.readyState===WebSocket.OPEN||this._ws.readyState===WebSocket.CONNECTING)this._ws.close();this._onClose?.()}#$(){this._ws.addEventListener("message",($)=>{if($.data instanceof Blob)this._onBinary?.($.data);else if($.data instanceof ArrayBuffer)this._onBinary?.(new Blob([$.data]));else if(typeof $.data==="string")try{let Q=JSON.parse($.data);this._onMessage?.(Q)}catch(Q){console.warn("Failed to parse JSON message:",$.data,Q)}}),this._ws.addEventListener("error",()=>{if(this._closed)return;this._onError?.(new f("WebSocket error")),this.close()}),this._ws.addEventListener("close",()=>{if(this._closed)return;this.close()})}}class Y1{#$;constructor($){this.#$=$}async connect($){let Q=this.#Q("/conversations/ws"),Y=new Q1(new WebSocket(Q));return await Y.connect(),Y.send({type:"handshake",agent_id:$.agent_id,channel:$.channel}),new Promise((Z,G)=>{let W=!1;Y.onMessage((z)=>{switch(z.type){case"handshake_ok":W=!0,$.onConnection?.(z),Z(new O0(Y,z.conversation_id,$));break;case"handshake_error":W=!0,$.onConnection?.(z),Y.close(),G(Error(`Handshake rejected: ${z.reason}`));break;default:}}),Y.onError((z)=>{if(!W)G(z)}),Y.onClose(()=>{if(!W)G(Error("Connection lost during handshake"))})})}#Q($){return`${this.#$.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://").replace(/\/$/,"")}${$}`}}var t1="https://server.kivox.com.co";function a1($,Q){$.interceptors.request.use((G)=>G),B.defaults.baseURL=Q,B.defaults.withCredentials=$.defaults.withCredentials??!1;let Y=$.defaults.headers?.Authorization;if(Y)B.defaults.headers.common.Authorization=Y;let Z={realtime:new Y1(Q)};return new Proxy({...Z},{get(G,W){if(W in G)return G[W];let z=$1[W];if(typeof z==="function")return(...J)=>z(...J,{axios:$});return z}})}function _7({baseUrl:$=t1}={}){let Q=B.create({baseURL:$,withCredentials:!0});return a1(Q,$)}function w7({apiKey:$,baseUrl:Q=t1}){let Y=B.create({baseURL:Q,headers:{Authorization:`Bearer ${$}`}});return a1(Y,Q)}export{_7 as createSessionClient,w7 as createApiKeyClient,f as ConversationTransportError,O0 as ConversationSession};
|
|
5
|
+
`):" "+d1(z[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+J,"ERR_NOT_SUPPORT")}return G}var q0={getAdapter:L5,adapters:t0};function a0($){if($.cancelToken)$.cancelToken.throwIfRequested();if($.signal&&$.signal.aborted)throw new b(null,$)}function S0($){if(a0($),$.headers=q.from($.headers),$.data=Z0.call($,$.transformRequest),["post","put","patch"].indexOf($.method)!==-1)$.headers.setContentType("application/x-www-form-urlencoded",!1);return q0.getAdapter($.adapter||n.adapter,$)($).then(function(Z){return a0($),Z.data=Z0.call($,$.transformResponse,Z),Z.headers=q.from(Z.headers),Z},function(Z){if(!G0(Z)){if(a0($),Z&&Z.response)Z.response.data=Z0.call($,$.transformResponse,Z.response),Z.response.headers=q.from(Z.response.headers)}return Promise.reject(Z)})}var D0="1.13.6";var E0={};["object","boolean","number","function","string","symbol"].forEach(($,Q)=>{E0[$]=function(Z){return typeof Z===$||"a"+(Q<1?"n ":" ")+$}});var l1={};E0.transitional=function(Q,Y,Z){function G(W,z){return"[Axios v"+D0+"] Transitional option '"+W+"'"+z+(Z?". "+Z:"")}return(W,z,J)=>{if(Q===!1)throw new P(G(z," has been removed"+(Y?" in "+Y:"")),P.ERR_DEPRECATED);if(Y&&!l1[z])l1[z]=!0,console.warn(G(z," has been deprecated since v"+Y+" and will be removed in the near future"));return Q?Q(W,z,J):!0}};E0.spelling=function(Q){return(Y,Z)=>{return console.warn(`${Z} is likely a misspelling of ${Q}`),!0}};function _5($,Q,Y){if(typeof $!=="object")throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);let Z=Object.keys($),G=Z.length;while(G-- >0){let W=Z[G],z=Q[W];if(z){let J=$[W],V=J===void 0||z(J,W,$);if(V!==!0)throw new P("option "+W+" must be "+V,P.ERR_BAD_OPTION_VALUE);continue}if(Y!==!0)throw new P("Unknown option "+W,P.ERR_BAD_OPTION)}}var W0={assertOptions:_5,validators:E0};var k=W0.validators;class J0{constructor($){this.defaults=$||{},this.interceptors={request:new y0,response:new y0}}async request($,Q){try{return await this._request($,Q)}catch(Y){if(Y instanceof Error){let Z={};Error.captureStackTrace?Error.captureStackTrace(Z):Z=Error();let G=Z.stack?Z.stack.replace(/^.+\n/,""):"";try{if(!Y.stack)Y.stack=G;else if(G&&!String(Y.stack).endsWith(G.replace(/^.+\n.+\n/,"")))Y.stack+=`
|
|
6
|
+
`+G}catch(W){}}throw Y}}_request($,Q){if(typeof $==="string")Q=Q||{},Q.url=$;else Q=$||{};Q=y(this.defaults,Q);let{transitional:Y,paramsSerializer:Z,headers:G}=Q;if(Y!==void 0)W0.assertOptions(Y,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean),legacyInterceptorReqResOrdering:k.transitional(k.boolean)},!1);if(Z!=null)if(X.isFunction(Z))Q.paramsSerializer={serialize:Z};else W0.assertOptions(Z,{encode:k.function,serialize:k.function},!0);if(Q.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)Q.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else Q.allowAbsoluteUrls=!0;W0.assertOptions(Q,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),Q.method=(Q.method||this.defaults.method||"get").toLowerCase();let W=G&&X.merge(G.common,G[Q.method]);G&&X.forEach(["delete","get","head","post","put","patch","common"],(w)=>{delete G[w]}),Q.headers=q.concat(W,G);let z=[],J=!0;this.interceptors.request.forEach(function(K){if(typeof K.runWhen==="function"&&K.runWhen(Q)===!1)return;J=J&&K.synchronous;let _=Q.transitional||i;if(_&&_.legacyInterceptorReqResOrdering)z.unshift(K.fulfilled,K.rejected);else z.push(K.fulfilled,K.rejected)});let V=[];this.interceptors.response.forEach(function(K){V.push(K.fulfilled,K.rejected)});let N,M=0,L;if(!J){let w=[S0.bind(this),void 0];w.unshift(...z),w.push(...V),L=w.length,N=Promise.resolve(Q);while(M<L)N=N.then(w[M++],w[M++]);return N}L=z.length;let F=Q;while(M<L){let w=z[M++],K=z[M++];try{F=w(F)}catch(_){K.call(this,_);break}}try{N=S0.call(this,F)}catch(w){return Promise.reject(w)}M=0,L=V.length;while(M<L)N=N.then(V[M++],V[M++]);return N}getUri($){$=y(this.defaults,$);let Q=X0($.baseURL,$.url,$.allowAbsoluteUrls);return $0(Q,$.params,$.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(Q){J0.prototype[Q]=function(Y,Z){return this.request(y(Z||{},{method:Q,url:Y,data:(Z||{}).data}))}});X.forEach(["post","put","patch"],function(Q){function Y(Z){return function(W,z,J){return this.request(y(J||{},{method:Q,headers:Z?{"Content-Type":"multipart/form-data"}:{},url:W,data:z}))}}J0.prototype[Q]=Y(),J0.prototype[Q+"Form"]=Y(!0)});var N0=J0;class s0{constructor($){if(typeof $!=="function")throw TypeError("executor must be a function.");let Q;this.promise=new Promise(function(G){Q=G});let Y=this;this.promise.then((Z)=>{if(!Y._listeners)return;let G=Y._listeners.length;while(G-- >0)Y._listeners[G](Z);Y._listeners=null}),this.promise.then=(Z)=>{let G,W=new Promise((z)=>{Y.subscribe(z),G=z}).then(Z);return W.cancel=function(){Y.unsubscribe(G)},W},$(function(G,W,z){if(Y.reason)return;Y.reason=new b(G,W,z),Q(Y.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe($){if(this.reason){$(this.reason);return}if(this._listeners)this._listeners.push($);else this._listeners=[$]}unsubscribe($){if(!this._listeners)return;let Q=this._listeners.indexOf($);if(Q!==-1)this._listeners.splice(Q,1)}toAbortSignal(){let $=new AbortController,Q=(Y)=>{$.abort(Y)};return this.subscribe(Q),$.signal.unsubscribe=()=>this.unsubscribe(Q),$.signal}static source(){let $;return{token:new s0(function(Z){$=Z}),cancel:$}}}var p1=s0;function r0($){return function(Y){return $.apply(null,Y)}}function o0($){return X.isObject($)&&$.isAxiosError===!0}var e0={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e0).forEach(([$,Q])=>{e0[Q]=$});var i1=e0;function n1($){let Q=new N0($),Y=s(N0.prototype.request,Q);return X.extend(Y,N0.prototype,Q,{allOwnKeys:!0}),X.extend(Y,Q,null,{allOwnKeys:!0}),Y.create=function(G){return n1(y($,G))},Y}var I=n1(n);I.Axios=N0;I.CanceledError=b;I.CancelToken=p1;I.isCancel=G0;I.VERSION=D0;I.toFormData=h;I.AxiosError=P;I.Cancel=I.CanceledError;I.all=function(Q){return Promise.all(Q)};I.spread=r0;I.isAxiosError=o0;I.mergeConfig=y;I.AxiosHeaders=q;I.formToJSON=($)=>F0(X.isHTMLForm($)?new FormData($):$);I.getAdapter=q0.getAdapter;I.HttpStatusCode=i1;I.default=I;var B=I;var $1={};N1($1,{updateTemplate:()=>o5,updateOrgMember:()=>n5,updateOrg:()=>u5,updateCurrentUserEmail:()=>G2,updateCurrentUser:()=>Q2,updateAgentStatus:()=>E5,updateAgent:()=>q5,signup:()=>j5,revokeApiKey:()=>C5,removeOrgMember:()=>i5,logoutAll:()=>A5,logout:()=>x5,login:()=>k5,listUserTemplates:()=>z2,listUserAgents:()=>Y2,listOrgs:()=>m5,listOrgTemplates:()=>t5,listOrgMembers:()=>l5,listOrgAgents:()=>c5,listMessages:()=>v5,listConversations:()=>S5,listApiKeys:()=>O5,lintAgent:()=>D5,getUser:()=>W2,getTemplate:()=>r5,getOrg:()=>g5,getCurrentUser:()=>$2,getConversation:()=>b5,getAgent:()=>R5,deleteTemplate:()=>s5,deleteOrg:()=>f5,deleteCurrentUser:()=>e5,deleteConversation:()=>y5,deleteAgent:()=>I5,createUserTemplate:()=>X2,createUserAgent:()=>Z2,createOrgTemplate:()=>a5,createOrgAgent:()=>d5,createOrg:()=>h5,createApiKey:()=>T5,addOrgMember:()=>p5,UpdateMemberInBodyRole:()=>U5,UpdateAgentStatusInBodyStatus:()=>F5,AddMemberInBodyRole:()=>w5});var w5={admin:"admin",member:"member",viewer:"viewer"},F5={draft:"draft",live:"live",archived:"archived"},U5={owner:"owner",admin:"admin",member:"member",viewer:"viewer"},I5=($,Q)=>{return B.delete(`/agents/${$}`,Q)},R5=($,Q)=>{return B.get(`/agents/${$}`,Q)},q5=($,Q,Y)=>{return B.patch(`/agents/${$}`,Q,Y)},S5=($,Q,Y)=>{return B.get(`/agents/${$}/conversations`,{...Y,params:{...Q,...Y?.params}})},D5=($,Q,Y)=>{return B.post(`/agents/${$}/lint`,Q,Y)},E5=($,Q,Y)=>{return B.patch(`/agents/${$}/status`,Q,Y)},O5=($)=>{return B.get("/auth/api-keys",$)},T5=($,Q)=>{return B.post("/auth/api-keys",$,Q)},C5=($,Q)=>{return B.delete(`/auth/api-keys/${$}`,Q)},A5=($)=>{return B.delete("/auth/sessions",$)},k5=($,Q)=>{return B.post("/auth/sessions",$,Q)},x5=($)=>{return B.delete("/auth/sessions/me",$)},j5=($,Q)=>{return B.post("/auth/signup",$,Q)},y5=($,Q)=>{return B.delete(`/conversations/${$}`,Q)},b5=($,Q)=>{return B.get(`/conversations/${$}`,Q)},v5=($,Q,Y)=>{return B.get(`/conversations/${$}/messages`,{...Y,params:{...Q,...Y?.params}})},m5=($)=>{return B.get("/orgs",$)},h5=($,Q)=>{return B.post("/orgs",$,Q)},f5=($,Q)=>{return B.delete(`/orgs/${$}`,Q)},g5=($,Q)=>{return B.get(`/orgs/${$}`,Q)},u5=($,Q,Y)=>{return B.patch(`/orgs/${$}`,Q,Y)},c5=($,Q,Y)=>{return B.get(`/orgs/${$}/agents`,{...Y,params:{...Q,...Y?.params}})},d5=($,Q,Y)=>{return B.post(`/orgs/${$}/agents`,Q,Y)},l5=($,Q)=>{return B.get(`/orgs/${$}/members`,Q)},p5=($,Q,Y)=>{return B.post(`/orgs/${$}/members`,Q,Y)},i5=($,Q,Y)=>{return B.delete(`/orgs/${$}/members/${Q}`,Y)},n5=($,Q,Y,Z)=>{return B.patch(`/orgs/${$}/members/${Q}`,Y,Z)},t5=($,Q,Y)=>{return B.get(`/orgs/${$}/templates`,{...Y,params:{...Q,...Y?.params}})},a5=($,Q,Y)=>{return B.post(`/orgs/${$}/templates`,Q,Y)},s5=($,Q)=>{return B.delete(`/templates/${$}`,Q)},r5=($,Q)=>{return B.get(`/templates/${$}`,Q)},o5=($,Q,Y)=>{return B.patch(`/templates/${$}`,Q,Y)},e5=($)=>{return B.delete("/users/me",$)},$2=($)=>{return B.get("/users/me",$)},Q2=($,Q)=>{return B.patch("/users/me",$,Q)},Y2=($,Q)=>{return B.get("/users/me/agents",{...Q,params:{...$,...Q?.params}})},Z2=($,Q)=>{return B.post("/users/me/agents",$,Q)},G2=($,Q)=>{return B.patch("/users/me/email",$,Q)},z2=($,Q)=>{return B.get("/users/me/templates",{...Q,params:{...$,...Q?.params}})},X2=($,Q)=>{return B.post("/users/me/templates",$,Q)},W2=($,Q)=>{return B.get(`/users/${$}`,Q)};class O0{_transport;_conversationId;_closed=!1;_onEvent;_pendingAudioMetadata=null;_remainingMs=0;_elapsedMs=0;get conversationId(){return this._conversationId}get remainingMs(){return this._remainingMs}get elapsedMs(){return this._elapsedMs}get closed(){return this._closed}constructor($,Q,Y){this._transport=$,this._conversationId=Q,this._onEvent=Y.onEvent,this.#$()}sendText($){if(this._closed){console.warn("Cannot send text: session is closed");return}this._transport.send({type:"input_text",text:$})}sendAudio($){if(this._closed){console.warn("Cannot send audio: session is closed");return}this._transport.send({type:"input_audio"}),this._transport.sendBinary($)}streamAudio($){if(this._closed){console.warn("Cannot stream audio: session is closed");return}this._transport.send({type:"input_audio_stream"}),this._transport.sendBinary($)}cancelRequest(){if(this._closed){console.warn("Cannot cancel request: session is closed");return}this._transport.send({type:"cancel"})}end(){if(this._closed){console.warn("Cannot end session: session is closed");return}this._transport.send({type:"end"})}close(){if(this._closed)return;this._closed=!0,this._transport.close()}#$(){this._transport.onMessage(($)=>{let Q=$;if(Q.type==="audio_delta"){this._pendingAudioMetadata={size:Q.size};return}if(Q.type==="tick")this._remainingMs=Q.remaining_ms,this._elapsedMs=Q.elapsed_ms;if(Q.type==="session_closed")this._closed=!0;this._onEvent?.(Q)}),this._transport.onBinary(($)=>{if(this._pendingAudioMetadata){let Q={type:"audio_delta",size:this._pendingAudioMetadata.size,audio:$};this._pendingAudioMetadata=null,this._onEvent?.(Q)}}),this._transport.onClose(()=>{if(this._closed)return;this._closed=!0,this._onEvent?.({type:"connection_lost",reason:"socket_closed"})}),this._transport.onError(()=>{if(this._closed)return;this._closed=!0,this._onEvent?.({type:"connection_lost",reason:"socket_error"})})}}class f extends Error{code;constructor($,Q="TRANSPORT_ERROR"){super($);this.code=Q;this.name="ConversationTransportError"}}class Q1{_ws;_closed=!1;_onMessage=null;_onBinary=null;_onError=null;_onClose=null;constructor($){this._ws=$}async connect(){if(this._ws.readyState===WebSocket.OPEN)throw new f("Already connected","ALREADY_CONNECTED");if(this._ws.readyState===WebSocket.CLOSING||this._ws.readyState===WebSocket.CLOSED)throw new f("Socket is closing or closed","SOCKET_CLOSED");return new Promise(($,Q)=>{let Y,Z;Y=()=>{this._ws.removeEventListener("open",Y),this._ws.removeEventListener("error",Z),this.#$(),$()},Z=()=>{this._ws.removeEventListener("open",Y),this._ws.removeEventListener("error",Z),Q(new f("Connection failed","CONNECTION_FAILED"))},this._ws.addEventListener("open",Y),this._ws.addEventListener("error",Z)})}send($){if(this._ws.readyState!==WebSocket.OPEN)throw new f("Not connected","NOT_CONNECTED");this._ws.send(JSON.stringify($))}async sendBinary($){if(this._ws.readyState!==WebSocket.OPEN)throw new f("Not connected","NOT_CONNECTED");let Q=await $.arrayBuffer();this._ws.send(Q)}onMessage($){this._onMessage=$}onBinary($){this._onBinary=$}onError($){this._onError=$}onClose($){this._onClose=$}close(){if(this._closed)return;if(this._closed=!0,this._ws.readyState===WebSocket.OPEN||this._ws.readyState===WebSocket.CONNECTING)this._ws.close();this._onClose?.()}#$(){this._ws.addEventListener("message",($)=>{if($.data instanceof Blob)this._onBinary?.($.data);else if($.data instanceof ArrayBuffer)this._onBinary?.(new Blob([$.data]));else if(typeof $.data==="string")try{let Q=JSON.parse($.data);this._onMessage?.(Q)}catch(Q){console.warn("Failed to parse JSON message:",$.data,Q)}}),this._ws.addEventListener("error",()=>{if(this._closed)return;this._onError?.(new f("WebSocket error")),this.close()}),this._ws.addEventListener("close",()=>{if(this._closed)return;this.close()})}}class Y1{#$;constructor($){this.#$=$}async connect($){let Q=this.#Q("/conversations/ws"),Y=new Q1(new WebSocket(Q));return await Y.connect(),Y.send({type:"handshake",agent_id:$.agent_id,channel:$.channel}),new Promise((Z,G)=>{let W=!1;Y.onMessage((z)=>{switch(z.type){case"handshake_ok":W=!0,$.onConnection?.(z),Z(new O0(Y,z.conversation_id,$));break;case"handshake_error":W=!0,$.onConnection?.(z),Y.close(),G(Error(`Handshake rejected: ${z.reason}`));break;default:}}),Y.onError((z)=>{if(!W)G(z)}),Y.onClose(()=>{if(!W)G(Error("Connection lost during handshake"))})})}#Q($){return`${this.#$.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://").replace(/\/$/,"")}${$}`}}var t1="https://server.kivox.com.co";function a1($,Q){$.interceptors.request.use((G)=>G),B.defaults.baseURL=Q,B.defaults.withCredentials=$.defaults.withCredentials??!1;let Y=$.defaults.headers?.Authorization;if(Y)B.defaults.headers.common.Authorization=Y;let Z={realtime:new Y1(Q)};return new Proxy({...Z},{get(G,W){if(W in G)return G[W];let z=$1[W];if(typeof z==="function")return(...J)=>z(...J,{axios:$});return z}})}function w7({baseUrl:$=t1}={}){let Q=B.create({baseURL:$,withCredentials:!0});return a1(Q,$)}function F7({apiKey:$,baseUrl:Q=t1}){let Y=B.create({baseURL:Q,headers:{Authorization:`Bearer ${$}`}});return a1(Y,Q)}export{w7 as createSessionClient,F7 as createApiKeyClient,f as ConversationTransportError,O0 as ConversationSession};
|