@kivox/client 0.1.0-beta.34 → 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 +186 -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;
|
|
@@ -71,7 +38,7 @@ interface Config {
|
|
|
71
38
|
name: string;
|
|
72
39
|
timezone?: string;
|
|
73
40
|
}
|
|
74
|
-
interface
|
|
41
|
+
interface AgentSafeguards {
|
|
75
42
|
max_calls: number;
|
|
76
43
|
max_http_calls: number;
|
|
77
44
|
max_llm_calls: number;
|
|
@@ -80,17 +47,61 @@ interface Safeguards {
|
|
|
80
47
|
interface Agent {
|
|
81
48
|
/** A URL to the JSON Schema for this object. */
|
|
82
49
|
readonly $schema?: string;
|
|
83
|
-
config:
|
|
50
|
+
config: AgentConfig;
|
|
84
51
|
created_at: string;
|
|
85
52
|
id: string;
|
|
86
53
|
ork_source: string;
|
|
87
54
|
owner_org_id?: string;
|
|
88
55
|
owner_user_id?: string;
|
|
89
|
-
safeguards:
|
|
56
|
+
safeguards: AgentSafeguards;
|
|
90
57
|
status: string;
|
|
91
58
|
template_id?: string;
|
|
92
59
|
updated_at: string;
|
|
93
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
|
+
}
|
|
94
105
|
interface Conversation {
|
|
95
106
|
/** A URL to the JSON Schema for this object. */
|
|
96
107
|
readonly $schema?: string;
|
|
@@ -102,81 +113,73 @@ interface Conversation {
|
|
|
102
113
|
status: string;
|
|
103
114
|
summary?: string;
|
|
104
115
|
}
|
|
105
|
-
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 {
|
|
106
124
|
/** A URL to the JSON Schema for this object. */
|
|
107
125
|
readonly $schema?: string;
|
|
108
|
-
/** Optional expiration time */
|
|
109
126
|
expires_at?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Human-readable key name
|
|
112
|
-
* @maxLength 50
|
|
113
|
-
*/
|
|
127
|
+
/** @maxLength 50 */
|
|
114
128
|
name: string;
|
|
115
|
-
/**
|
|
116
|
-
* Permission scopes (empty = full access)
|
|
117
|
-
* @nullable
|
|
118
|
-
*/
|
|
129
|
+
/** @nullable */
|
|
119
130
|
scopes?: string[] | null;
|
|
120
131
|
}
|
|
121
|
-
interface
|
|
122
|
-
description?: string;
|
|
123
|
-
key: string;
|
|
124
|
-
value: string;
|
|
125
|
-
}
|
|
126
|
-
interface CreateAgentBody {
|
|
132
|
+
interface CreateOrgAgentInBody {
|
|
127
133
|
/** A URL to the JSON Schema for this object. */
|
|
128
134
|
readonly $schema?: string;
|
|
129
|
-
|
|
130
|
-
config?: Config;
|
|
131
|
-
/** Orchestration source */
|
|
135
|
+
config?: AgentConfig;
|
|
132
136
|
ork_source?: string;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/** Encrypted secrets */
|
|
136
|
-
secrets?: Secret[];
|
|
137
|
-
/** Optional source template */
|
|
137
|
+
safeguards?: AgentSafeguards;
|
|
138
|
+
secrets?: AgentSecret[];
|
|
138
139
|
template_id?: string;
|
|
139
140
|
}
|
|
140
|
-
interface
|
|
141
|
+
interface CreateOrgInBody {
|
|
141
142
|
/** A URL to the JSON Schema for this object. */
|
|
142
143
|
readonly $schema?: string;
|
|
143
|
-
/**
|
|
144
|
-
* Organization description
|
|
145
|
-
* @maxLength 2048
|
|
146
|
-
*/
|
|
144
|
+
/** @maxLength 2048 */
|
|
147
145
|
description?: string;
|
|
148
|
-
/**
|
|
149
|
-
* Organization name
|
|
150
|
-
* @maxLength 256
|
|
151
|
-
*/
|
|
146
|
+
/** @maxLength 256 */
|
|
152
147
|
name: string;
|
|
153
|
-
/**
|
|
154
|
-
* URL-safe slug
|
|
155
|
-
* @pattern ^[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]$
|
|
156
|
-
*/
|
|
148
|
+
/** @pattern ^[a-z0-9][a-z0-9\-]{0,61}[a-z0-9]$ */
|
|
157
149
|
slug: string;
|
|
158
150
|
}
|
|
159
|
-
interface
|
|
151
|
+
interface CreateOrgTemplateInBody {
|
|
160
152
|
/** A URL to the JSON Schema for this object. */
|
|
161
153
|
readonly $schema?: string;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Template description
|
|
166
|
-
* @maxLength 2048
|
|
167
|
-
*/
|
|
154
|
+
config?: AgentConfig;
|
|
155
|
+
/** @maxLength 2048 */
|
|
168
156
|
description?: string;
|
|
169
|
-
/**
|
|
170
|
-
* Template name
|
|
171
|
-
* @maxLength 256
|
|
172
|
-
*/
|
|
157
|
+
/** @maxLength 256 */
|
|
173
158
|
name: string;
|
|
174
|
-
/** Orchestration source */
|
|
175
159
|
ork_source?: string;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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[];
|
|
180
183
|
}
|
|
181
184
|
interface CursorResponseConversation {
|
|
182
185
|
/** A URL to the JSON Schema for this object. */
|
|
@@ -186,19 +189,12 @@ interface CursorResponseConversation {
|
|
|
186
189
|
items: Conversation[] | null;
|
|
187
190
|
next_cursor: string;
|
|
188
191
|
}
|
|
189
|
-
interface
|
|
190
|
-
content: string;
|
|
191
|
-
conversation_id: string;
|
|
192
|
-
created_at: string;
|
|
193
|
-
id: string;
|
|
194
|
-
role: string;
|
|
195
|
-
}
|
|
196
|
-
interface CursorResponseMessage {
|
|
192
|
+
interface CursorResponseConversationMessage {
|
|
197
193
|
/** A URL to the JSON Schema for this object. */
|
|
198
194
|
readonly $schema?: string;
|
|
199
195
|
has_more: boolean;
|
|
200
196
|
/** @nullable */
|
|
201
|
-
items:
|
|
197
|
+
items: ConversationMessage[] | null;
|
|
202
198
|
next_cursor: string;
|
|
203
199
|
}
|
|
204
200
|
interface ErrorDetail {
|
|
@@ -228,38 +224,18 @@ interface ErrorModel {
|
|
|
228
224
|
/** A URI reference to human-readable documentation for the error. */
|
|
229
225
|
type?: string;
|
|
230
226
|
}
|
|
231
|
-
interface
|
|
227
|
+
interface LintAgentInBody {
|
|
232
228
|
/** A URL to the JSON Schema for this object. */
|
|
233
229
|
readonly $schema?: string;
|
|
234
|
-
/** Source to lint; defaults to the agent's stored source */
|
|
235
230
|
source?: string;
|
|
236
231
|
}
|
|
237
|
-
interface
|
|
232
|
+
interface LoginInBody {
|
|
238
233
|
/** A URL to the JSON Schema for this object. */
|
|
239
234
|
readonly $schema?: string;
|
|
240
|
-
/** @nullable */
|
|
241
|
-
errors: string[] | null;
|
|
242
|
-
}
|
|
243
|
-
interface LoginBody {
|
|
244
|
-
/** A URL to the JSON Schema for this object. */
|
|
245
|
-
readonly $schema?: string;
|
|
246
|
-
/** Account email */
|
|
247
235
|
email: string;
|
|
248
|
-
/**
|
|
249
|
-
* Account password
|
|
250
|
-
* @minLength 8
|
|
251
|
-
*/
|
|
236
|
+
/** @minLength 8 */
|
|
252
237
|
password: string;
|
|
253
238
|
}
|
|
254
|
-
interface Member {
|
|
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
|
-
}
|
|
263
239
|
interface Org {
|
|
264
240
|
/** A URL to the JSON Schema for this object. */
|
|
265
241
|
readonly $schema?: string;
|
|
@@ -275,6 +251,15 @@ interface Org {
|
|
|
275
251
|
tier: string;
|
|
276
252
|
updated_at: string;
|
|
277
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
|
+
}
|
|
278
263
|
interface PageResponseAgent {
|
|
279
264
|
/** A URL to the JSON Schema for this object. */
|
|
280
265
|
readonly $schema?: string;
|
|
@@ -287,7 +272,7 @@ interface PageResponseAgent {
|
|
|
287
272
|
interface Template {
|
|
288
273
|
/** A URL to the JSON Schema for this object. */
|
|
289
274
|
readonly $schema?: string;
|
|
290
|
-
config:
|
|
275
|
+
config: AgentConfig;
|
|
291
276
|
created_at: string;
|
|
292
277
|
description?: string;
|
|
293
278
|
id: string;
|
|
@@ -295,7 +280,7 @@ interface Template {
|
|
|
295
280
|
ork_source: string;
|
|
296
281
|
owner_org_id?: string;
|
|
297
282
|
owner_user_id?: string;
|
|
298
|
-
safeguards:
|
|
283
|
+
safeguards: AgentSafeguards;
|
|
299
284
|
updated_at: string;
|
|
300
285
|
}
|
|
301
286
|
interface PageResponseTemplate {
|
|
@@ -307,124 +292,78 @@ interface PageResponseTemplate {
|
|
|
307
292
|
page: number;
|
|
308
293
|
total: number;
|
|
309
294
|
}
|
|
310
|
-
interface
|
|
295
|
+
interface SignupInBody {
|
|
311
296
|
/** A URL to the JSON Schema for this object. */
|
|
312
297
|
readonly $schema?: string;
|
|
313
|
-
expires_at: string;
|
|
314
|
-
}
|
|
315
|
-
interface SignupBody {
|
|
316
|
-
/** A URL to the JSON Schema for this object. */
|
|
317
|
-
readonly $schema?: string;
|
|
318
|
-
/** Account email */
|
|
319
298
|
email: string;
|
|
320
|
-
/**
|
|
321
|
-
* Display name
|
|
322
|
-
* @maxLength 50
|
|
323
|
-
*/
|
|
299
|
+
/** @maxLength 50 */
|
|
324
300
|
name: string;
|
|
325
|
-
/**
|
|
326
|
-
* Account password
|
|
327
|
-
* @minLength 8
|
|
328
|
-
*/
|
|
301
|
+
/** @minLength 8 */
|
|
329
302
|
password: string;
|
|
330
303
|
}
|
|
331
|
-
interface
|
|
304
|
+
interface UpdateAgentInBody {
|
|
332
305
|
/** A URL to the JSON Schema for this object. */
|
|
333
306
|
readonly $schema?: string;
|
|
334
|
-
|
|
335
|
-
config?: Config;
|
|
336
|
-
/** Orchestration source */
|
|
307
|
+
config?: AgentConfig;
|
|
337
308
|
ork_source?: string;
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
/** Encrypted secrets */
|
|
341
|
-
secrets?: Secret[];
|
|
309
|
+
safeguards?: AgentSafeguards;
|
|
310
|
+
secrets?: AgentSecret[];
|
|
342
311
|
}
|
|
343
|
-
|
|
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 {
|
|
344
319
|
/** A URL to the JSON Schema for this object. */
|
|
345
320
|
readonly $schema?: string;
|
|
346
|
-
|
|
347
|
-
avatar_url?: string;
|
|
348
|
-
/**
|
|
349
|
-
* Display name
|
|
350
|
-
* @maxLength 256
|
|
351
|
-
*/
|
|
352
|
-
name?: string;
|
|
321
|
+
status: UpdateAgentStatusInBodyStatus;
|
|
353
322
|
}
|
|
354
|
-
interface
|
|
323
|
+
interface UpdateEmailInBody {
|
|
355
324
|
/** A URL to the JSON Schema for this object. */
|
|
356
325
|
readonly $schema?: string;
|
|
357
|
-
/** New email address */
|
|
358
326
|
email: string;
|
|
359
327
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
*/
|
|
363
|
-
type UpdateMemberBodyRole = typeof UpdateMemberBodyRole[keyof typeof UpdateMemberBodyRole];
|
|
364
|
-
declare const UpdateMemberBodyRole: {
|
|
328
|
+
type UpdateMemberInBodyRole = typeof UpdateMemberInBodyRole[keyof typeof UpdateMemberInBodyRole];
|
|
329
|
+
declare const UpdateMemberInBodyRole: {
|
|
365
330
|
readonly owner: "owner"
|
|
366
331
|
readonly admin: "admin"
|
|
367
332
|
readonly member: "member"
|
|
368
333
|
readonly viewer: "viewer"
|
|
369
334
|
};
|
|
370
|
-
interface
|
|
335
|
+
interface UpdateMemberInBody {
|
|
371
336
|
/** A URL to the JSON Schema for this object. */
|
|
372
337
|
readonly $schema?: string;
|
|
373
|
-
|
|
374
|
-
role: UpdateMemberBodyRole;
|
|
338
|
+
role: UpdateMemberInBodyRole;
|
|
375
339
|
}
|
|
376
|
-
interface
|
|
340
|
+
interface UpdateOrgInBody {
|
|
377
341
|
/** A URL to the JSON Schema for this object. */
|
|
378
342
|
readonly $schema?: string;
|
|
379
|
-
/** Avatar URL */
|
|
380
343
|
avatar_url?: string;
|
|
381
|
-
/**
|
|
382
|
-
* Organization description
|
|
383
|
-
* @maxLength 2048
|
|
384
|
-
*/
|
|
344
|
+
/** @maxLength 2048 */
|
|
385
345
|
description?: string;
|
|
386
|
-
/**
|
|
387
|
-
* Organization name
|
|
388
|
-
* @maxLength 256
|
|
389
|
-
*/
|
|
346
|
+
/** @maxLength 256 */
|
|
390
347
|
name?: string;
|
|
391
348
|
}
|
|
392
|
-
|
|
393
|
-
* Target lifecycle state
|
|
394
|
-
*/
|
|
395
|
-
type UpdateStatusBodyStatus = typeof UpdateStatusBodyStatus[keyof typeof UpdateStatusBodyStatus];
|
|
396
|
-
declare const UpdateStatusBodyStatus: {
|
|
397
|
-
readonly draft: "draft"
|
|
398
|
-
readonly live: "live"
|
|
399
|
-
readonly archived: "archived"
|
|
400
|
-
};
|
|
401
|
-
interface UpdateStatusBody {
|
|
349
|
+
interface UpdateTemplateInBody {
|
|
402
350
|
/** A URL to the JSON Schema for this object. */
|
|
403
351
|
readonly $schema?: string;
|
|
404
|
-
|
|
405
|
-
|
|
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[];
|
|
406
360
|
}
|
|
407
|
-
interface
|
|
361
|
+
interface UpdateUserInBody {
|
|
408
362
|
/** A URL to the JSON Schema for this object. */
|
|
409
363
|
readonly $schema?: string;
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Template description
|
|
414
|
-
* @maxLength 2048
|
|
415
|
-
*/
|
|
416
|
-
description?: string;
|
|
417
|
-
/**
|
|
418
|
-
* Template name
|
|
419
|
-
* @maxLength 256
|
|
420
|
-
*/
|
|
364
|
+
avatar_url?: string;
|
|
365
|
+
/** @maxLength 256 */
|
|
421
366
|
name?: string;
|
|
422
|
-
/** Orchestration source */
|
|
423
|
-
ork_source?: string;
|
|
424
|
-
/** Resource limits */
|
|
425
|
-
safeguards?: Safeguards;
|
|
426
|
-
/** Encrypted secrets */
|
|
427
|
-
secrets?: Secret[];
|
|
428
367
|
}
|
|
429
368
|
interface User {
|
|
430
369
|
/** A URL to the JSON Schema for this object. */
|
|
@@ -438,24 +377,16 @@ interface User {
|
|
|
438
377
|
updated_at: string;
|
|
439
378
|
}
|
|
440
379
|
type ListConversationsParams = {
|
|
441
|
-
/**
|
|
442
|
-
* Cursor from the previous page
|
|
443
|
-
*/
|
|
444
380
|
after?: string
|
|
445
381
|
/**
|
|
446
|
-
* Page size
|
|
447
382
|
* @minimum 1
|
|
448
383
|
* @maximum 100
|
|
449
384
|
*/
|
|
450
385
|
limit?: number
|
|
451
386
|
};
|
|
452
387
|
type ListMessagesParams = {
|
|
453
|
-
/**
|
|
454
|
-
* Cursor from the previous page
|
|
455
|
-
*/
|
|
456
388
|
after?: string
|
|
457
389
|
/**
|
|
458
|
-
* Page size
|
|
459
390
|
* @minimum 1
|
|
460
391
|
* @maximum 100
|
|
461
392
|
*/
|
|
@@ -463,60 +394,46 @@ type ListMessagesParams = {
|
|
|
463
394
|
};
|
|
464
395
|
type ListOrgAgentsParams = {
|
|
465
396
|
/**
|
|
466
|
-
* Page size
|
|
467
397
|
* @minimum 1
|
|
468
398
|
* @maximum 100
|
|
469
399
|
*/
|
|
470
400
|
limit?: number
|
|
471
401
|
/**
|
|
472
|
-
* Page number
|
|
473
402
|
* @minimum 1
|
|
474
403
|
*/
|
|
475
404
|
page?: number
|
|
476
|
-
/**
|
|
477
|
-
* Search query
|
|
478
|
-
*/
|
|
479
405
|
search?: string
|
|
480
406
|
};
|
|
481
407
|
type ListOrgTemplatesParams = {
|
|
482
408
|
/**
|
|
483
|
-
* Page size
|
|
484
409
|
* @minimum 1
|
|
485
410
|
* @maximum 100
|
|
486
411
|
*/
|
|
487
412
|
limit?: number
|
|
488
413
|
/**
|
|
489
|
-
* Page number
|
|
490
414
|
* @minimum 1
|
|
491
415
|
*/
|
|
492
416
|
page?: number
|
|
493
417
|
};
|
|
494
418
|
type ListUserAgentsParams = {
|
|
495
419
|
/**
|
|
496
|
-
* Page size
|
|
497
420
|
* @minimum 1
|
|
498
421
|
* @maximum 100
|
|
499
422
|
*/
|
|
500
423
|
limit?: number
|
|
501
424
|
/**
|
|
502
|
-
* Page number
|
|
503
425
|
* @minimum 1
|
|
504
426
|
*/
|
|
505
427
|
page?: number
|
|
506
|
-
/**
|
|
507
|
-
* Search query
|
|
508
|
-
*/
|
|
509
428
|
search?: string
|
|
510
429
|
};
|
|
511
430
|
type ListUserTemplatesParams = {
|
|
512
431
|
/**
|
|
513
|
-
* Page size
|
|
514
432
|
* @minimum 1
|
|
515
433
|
* @maximum 100
|
|
516
434
|
*/
|
|
517
435
|
limit?: number
|
|
518
436
|
/**
|
|
519
|
-
* Page number
|
|
520
437
|
* @minimum 1
|
|
521
438
|
*/
|
|
522
439
|
page?: number
|
|
@@ -532,40 +449,39 @@ declare const getAgent: (agentID: string, options?: AxiosRequestConfig) => Promi
|
|
|
532
449
|
/**
|
|
533
450
|
* @summary Update an agent
|
|
534
451
|
*/
|
|
535
|
-
declare const updateAgent: (agentID: string,
|
|
452
|
+
declare const updateAgent: (agentID: string, updateAgentInBody: NonReadonly<UpdateAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
536
453
|
/**
|
|
537
454
|
* @summary List conversations for an agent
|
|
538
455
|
*/
|
|
539
456
|
declare const listConversations: (agentID: string, params?: ListConversationsParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseConversation>>;
|
|
540
457
|
/**
|
|
541
|
-
* Returns HTTP 200 with diagnostics regardless of compile outcome. Validation errors are domain results, not HTTP errors.
|
|
542
458
|
* @summary Lint an agent's orchestration source
|
|
543
459
|
*/
|
|
544
|
-
declare const lintAgent: (agentID: string,
|
|
460
|
+
declare const lintAgent: (agentID: string, lintAgentInBody: NonReadonly<LintAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AgentLintDiagnostics>>;
|
|
545
461
|
/**
|
|
546
462
|
* @summary Transition an agent's lifecycle status
|
|
547
463
|
*/
|
|
548
|
-
declare const updateAgentStatus: (agentID: string,
|
|
464
|
+
declare const updateAgentStatus: (agentID: string, updateAgentStatusInBody: NonReadonly<UpdateAgentStatusInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
549
465
|
/**
|
|
550
|
-
* @summary List
|
|
466
|
+
* @summary List API keys
|
|
551
467
|
*/
|
|
552
|
-
declare const listApiKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
468
|
+
declare const listApiKeys: (options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthAPIKey[] | null>>;
|
|
553
469
|
/**
|
|
554
470
|
* @summary Create a new API key
|
|
555
471
|
*/
|
|
556
|
-
declare const createApiKey: (
|
|
472
|
+
declare const createApiKey: (createAPIKeyInBody: NonReadonly<CreateAPIKeyInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthAPIKeyResponse>>;
|
|
557
473
|
/**
|
|
558
474
|
* @summary Revoke an API key
|
|
559
475
|
*/
|
|
560
476
|
declare const revokeApiKey: (keyID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
561
477
|
/**
|
|
562
|
-
* @summary Revoke all sessions
|
|
478
|
+
* @summary Revoke all sessions
|
|
563
479
|
*/
|
|
564
480
|
declare const logoutAll: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
565
481
|
/**
|
|
566
482
|
* @summary Authenticate and create a session
|
|
567
483
|
*/
|
|
568
|
-
declare const login: (
|
|
484
|
+
declare const login: (loginInBody: NonReadonly<LoginInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthSessionResponse>>;
|
|
569
485
|
/**
|
|
570
486
|
* @summary Revoke the current session
|
|
571
487
|
*/
|
|
@@ -573,7 +489,7 @@ declare const logout: (options?: AxiosRequestConfig) => Promise<AxiosResponse<vo
|
|
|
573
489
|
/**
|
|
574
490
|
* @summary Create a new account and session
|
|
575
491
|
*/
|
|
576
|
-
declare const signup: (
|
|
492
|
+
declare const signup: (signupInBody: NonReadonly<SignupInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<AuthSessionResponse>>;
|
|
577
493
|
/**
|
|
578
494
|
* @summary Soft-delete a conversation
|
|
579
495
|
*/
|
|
@@ -585,15 +501,15 @@ declare const getConversation: (conversationID: string, options?: AxiosRequestCo
|
|
|
585
501
|
/**
|
|
586
502
|
* @summary List messages in a conversation
|
|
587
503
|
*/
|
|
588
|
-
declare const listMessages: (conversationID: string, params?: ListMessagesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
504
|
+
declare const listMessages: (conversationID: string, params?: ListMessagesParams, options?: AxiosRequestConfig) => Promise<AxiosResponse<CursorResponseConversationMessage>>;
|
|
589
505
|
/**
|
|
590
|
-
* @summary List organizations
|
|
506
|
+
* @summary List organizations
|
|
591
507
|
*/
|
|
592
508
|
declare const listOrgs: (options?: AxiosRequestConfig) => Promise<AxiosResponse<Org[] | null>>;
|
|
593
509
|
/**
|
|
594
510
|
* @summary Create a new organization
|
|
595
511
|
*/
|
|
596
|
-
declare const createOrg: (
|
|
512
|
+
declare const createOrg: (createOrgInBody: NonReadonly<CreateOrgInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
|
|
597
513
|
/**
|
|
598
514
|
* @summary Soft-delete an organization
|
|
599
515
|
*/
|
|
@@ -605,7 +521,7 @@ declare const getOrg: (orgSlug: string, options?: AxiosRequestConfig) => Promise
|
|
|
605
521
|
/**
|
|
606
522
|
* @summary Update an organization
|
|
607
523
|
*/
|
|
608
|
-
declare const updateOrg: (orgSlug: string,
|
|
524
|
+
declare const updateOrg: (orgSlug: string, updateOrgInBody: NonReadonly<UpdateOrgInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Org>>;
|
|
609
525
|
/**
|
|
610
526
|
* @summary List agents owned by an organization
|
|
611
527
|
*/
|
|
@@ -613,23 +529,23 @@ declare const listOrgAgents: (orgSlug: string, params?: ListOrgAgentsParams, opt
|
|
|
613
529
|
/**
|
|
614
530
|
* @summary Create an agent owned by an organization
|
|
615
531
|
*/
|
|
616
|
-
declare const createOrgAgent: (orgSlug: string,
|
|
532
|
+
declare const createOrgAgent: (orgSlug: string, createOrgAgentInBody: NonReadonly<CreateOrgAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
617
533
|
/**
|
|
618
534
|
* @summary List organization members
|
|
619
535
|
*/
|
|
620
|
-
declare const listOrgMembers: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<
|
|
536
|
+
declare const listOrgMembers: (orgSlug: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember[] | null>>;
|
|
621
537
|
/**
|
|
622
|
-
* @summary Add a member
|
|
538
|
+
* @summary Add a member
|
|
623
539
|
*/
|
|
624
|
-
declare const addOrgMember: (orgSlug: string,
|
|
540
|
+
declare const addOrgMember: (orgSlug: string, addMemberInBody: NonReadonly<AddMemberInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember>>;
|
|
625
541
|
/**
|
|
626
|
-
* @summary Remove a member
|
|
542
|
+
* @summary Remove a member
|
|
627
543
|
*/
|
|
628
544
|
declare const removeOrgMember: (orgSlug: string, userID: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
629
545
|
/**
|
|
630
546
|
* @summary Update a member's role
|
|
631
547
|
*/
|
|
632
|
-
declare const updateOrgMember: (orgSlug: string, userID: string,
|
|
548
|
+
declare const updateOrgMember: (orgSlug: string, userID: string, updateMemberInBody: NonReadonly<UpdateMemberInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<OrgMember>>;
|
|
633
549
|
/**
|
|
634
550
|
* @summary List templates owned by an organization
|
|
635
551
|
*/
|
|
@@ -637,7 +553,7 @@ declare const listOrgTemplates: (orgSlug: string, params?: ListOrgTemplatesParam
|
|
|
637
553
|
/**
|
|
638
554
|
* @summary Create a template owned by an organization
|
|
639
555
|
*/
|
|
640
|
-
declare const createOrgTemplate: (orgSlug: string,
|
|
556
|
+
declare const createOrgTemplate: (orgSlug: string, createOrgTemplateInBody: NonReadonly<CreateOrgTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
641
557
|
/**
|
|
642
558
|
* @summary Soft-delete a template
|
|
643
559
|
*/
|
|
@@ -649,9 +565,9 @@ declare const getTemplate: (templateID: string, options?: AxiosRequestConfig) =>
|
|
|
649
565
|
/**
|
|
650
566
|
* @summary Update a template
|
|
651
567
|
*/
|
|
652
|
-
declare const updateTemplate: (templateID: string,
|
|
568
|
+
declare const updateTemplate: (templateID: string, updateTemplateInBody: NonReadonly<UpdateTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
653
569
|
/**
|
|
654
|
-
* @summary Soft-delete the
|
|
570
|
+
* @summary Soft-delete the account
|
|
655
571
|
*/
|
|
656
572
|
declare const deleteCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosResponse<void>>;
|
|
657
573
|
/**
|
|
@@ -661,7 +577,7 @@ declare const getCurrentUser: (options?: AxiosRequestConfig) => Promise<AxiosRes
|
|
|
661
577
|
/**
|
|
662
578
|
* @summary Update the authenticated user's profile
|
|
663
579
|
*/
|
|
664
|
-
declare const updateCurrentUser: (
|
|
580
|
+
declare const updateCurrentUser: (updateUserInBody: NonReadonly<UpdateUserInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
|
|
665
581
|
/**
|
|
666
582
|
* @summary List agents owned by the authenticated user
|
|
667
583
|
*/
|
|
@@ -669,11 +585,11 @@ declare const listUserAgents: (params?: ListUserAgentsParams, options?: AxiosReq
|
|
|
669
585
|
/**
|
|
670
586
|
* @summary Create an agent owned by the authenticated user
|
|
671
587
|
*/
|
|
672
|
-
declare const createUserAgent: (
|
|
588
|
+
declare const createUserAgent: (createUserAgentInBody: NonReadonly<CreateUserAgentInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Agent>>;
|
|
673
589
|
/**
|
|
674
|
-
* @summary Update
|
|
590
|
+
* @summary Update email
|
|
675
591
|
*/
|
|
676
|
-
declare const updateCurrentUserEmail: (
|
|
592
|
+
declare const updateCurrentUserEmail: (updateEmailInBody: NonReadonly<UpdateEmailInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<User>>;
|
|
677
593
|
/**
|
|
678
594
|
* @summary List templates owned by the authenticated user
|
|
679
595
|
*/
|
|
@@ -681,7 +597,7 @@ declare const listUserTemplates: (params?: ListUserTemplatesParams, options?: Ax
|
|
|
681
597
|
/**
|
|
682
598
|
* @summary Create a template owned by the authenticated user
|
|
683
599
|
*/
|
|
684
|
-
declare const createUserTemplate: (
|
|
600
|
+
declare const createUserTemplate: (createUserTemplateInBody: NonReadonly<CreateUserTemplateInBody>, options?: AxiosRequestConfig) => Promise<AxiosResponse<Template>>;
|
|
685
601
|
/**
|
|
686
602
|
* @summary Get a user by ID
|
|
687
603
|
*/
|
|
@@ -690,18 +606,18 @@ type DeleteAgentResult = AxiosResponse<void>;
|
|
|
690
606
|
type GetAgentResult = AxiosResponse<Agent>;
|
|
691
607
|
type UpdateAgentResult = AxiosResponse<Agent>;
|
|
692
608
|
type ListConversationsResult = AxiosResponse<CursorResponseConversation>;
|
|
693
|
-
type LintAgentResult = AxiosResponse<
|
|
609
|
+
type LintAgentResult = AxiosResponse<AgentLintDiagnostics>;
|
|
694
610
|
type UpdateAgentStatusResult = AxiosResponse<Agent>;
|
|
695
|
-
type ListApiKeysResult = AxiosResponse<
|
|
696
|
-
type CreateApiKeyResult = AxiosResponse<
|
|
611
|
+
type ListApiKeysResult = AxiosResponse<AuthAPIKey[] | null>;
|
|
612
|
+
type CreateApiKeyResult = AxiosResponse<AuthAPIKeyResponse>;
|
|
697
613
|
type RevokeApiKeyResult = AxiosResponse<void>;
|
|
698
614
|
type LogoutAllResult = AxiosResponse<void>;
|
|
699
|
-
type LoginResult = AxiosResponse<
|
|
615
|
+
type LoginResult = AxiosResponse<AuthSessionResponse>;
|
|
700
616
|
type LogoutResult = AxiosResponse<void>;
|
|
701
|
-
type SignupResult = AxiosResponse<
|
|
617
|
+
type SignupResult = AxiosResponse<AuthSessionResponse>;
|
|
702
618
|
type DeleteConversationResult = AxiosResponse<void>;
|
|
703
619
|
type GetConversationResult = AxiosResponse<Conversation>;
|
|
704
|
-
type ListMessagesResult = AxiosResponse<
|
|
620
|
+
type ListMessagesResult = AxiosResponse<CursorResponseConversationMessage>;
|
|
705
621
|
type ListOrgsResult = AxiosResponse<Org[] | null>;
|
|
706
622
|
type CreateOrgResult = AxiosResponse<Org>;
|
|
707
623
|
type DeleteOrgResult = AxiosResponse<void>;
|
|
@@ -709,10 +625,10 @@ type GetOrgResult = AxiosResponse<Org>;
|
|
|
709
625
|
type UpdateOrgResult = AxiosResponse<Org>;
|
|
710
626
|
type ListOrgAgentsResult = AxiosResponse<PageResponseAgent>;
|
|
711
627
|
type CreateOrgAgentResult = AxiosResponse<Agent>;
|
|
712
|
-
type ListOrgMembersResult = AxiosResponse<
|
|
713
|
-
type AddOrgMemberResult = AxiosResponse<
|
|
628
|
+
type ListOrgMembersResult = AxiosResponse<OrgMember[] | null>;
|
|
629
|
+
type AddOrgMemberResult = AxiosResponse<OrgMember>;
|
|
714
630
|
type RemoveOrgMemberResult = AxiosResponse<void>;
|
|
715
|
-
type UpdateOrgMemberResult = AxiosResponse<
|
|
631
|
+
type UpdateOrgMemberResult = AxiosResponse<OrgMember>;
|
|
716
632
|
type ListOrgTemplatesResult = AxiosResponse<PageResponseTemplate>;
|
|
717
633
|
type CreateOrgTemplateResult = AxiosResponse<Template>;
|
|
718
634
|
type DeleteTemplateResult = AxiosResponse<void>;
|
|
@@ -1104,4 +1020,4 @@ declare function createSessionClient({ baseUrl }?: SessionClientOptions): KivoxC
|
|
|
1104
1020
|
* ```
|
|
1105
1021
|
*/
|
|
1106
1022
|
declare function createApiKeyClient({ apiKey, baseUrl }: ApiKeyClientOptions): KivoxClient;
|
|
1107
|
-
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};
|