@elqnt/admin 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -14
- package/SKILL.md +570 -0
- package/dist/admin-C1iVQe2d.d.cts +816 -0
- package/dist/admin-C1iVQe2d.d.ts +816 -0
- package/dist/api/index.cjs +85 -281
- package/dist/api/index.cjs.map +1 -1
- package/dist/api/index.d.cts +17 -53
- package/dist/api/index.d.ts +17 -53
- package/dist/api/index.js +83 -257
- package/dist/api/index.js.map +1 -1
- package/dist/hooks/index.cjs +131 -841
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +69 -188
- package/dist/hooks/index.d.ts +69 -188
- package/dist/hooks/index.js +131 -836
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +94 -473
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +89 -401
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +9 -192
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +3 -1263
- package/dist/models/index.d.ts +3 -1263
- package/dist/models/index.js +6 -144
- package/dist/models/index.js.map +1 -1
- package/dist/orgs-BSHeYVe-.d.ts +53 -0
- package/dist/orgs-Buu2Re0N.d.cts +53 -0
- package/package.json +6 -5
- package/dist/provisioning-Cfl6wbmV.d.cts +0 -168
- package/dist/provisioning-Il9t2jnH.d.ts +0 -168
package/dist/api/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// api/index.ts
|
|
2
|
-
import { browserApiRequest as
|
|
2
|
+
import { browserApiRequest as browserApiRequest4, clearGatewayTokenCache } from "@elqnt/api-client/browser";
|
|
3
3
|
|
|
4
4
|
// api/orgs.ts
|
|
5
5
|
import { browserApiRequest } from "@elqnt/api-client/browser";
|
|
6
6
|
async function listOrgsApi(filter, options) {
|
|
7
7
|
const params = new URLSearchParams();
|
|
8
|
-
if (filter?.product) params.set("product", filter.product);
|
|
9
8
|
if (filter?.status) params.set("status", filter.status);
|
|
10
9
|
if (filter?.type) params.set("type", filter.type);
|
|
10
|
+
if (filter?.product) params.set("product", filter.product);
|
|
11
11
|
const queryString = params.toString();
|
|
12
12
|
const url = queryString ? `/api/v1/admin/orgs?${queryString}` : "/api/v1/admin/orgs";
|
|
13
13
|
return browserApiRequest(url, {
|
|
@@ -47,13 +47,6 @@ async function getOrgInfoApi(orgId, options) {
|
|
|
47
47
|
...options
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
async function createOrgWithSchemasApi(org, schemas, options) {
|
|
51
|
-
return browserApiRequest("/api/v1/admin/orgs/with-schemas", {
|
|
52
|
-
method: "POST",
|
|
53
|
-
body: { org, schemas },
|
|
54
|
-
...options
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
50
|
|
|
58
51
|
// api/users.ts
|
|
59
52
|
import { browserApiRequest as browserApiRequest2 } from "@elqnt/api-client/browser";
|
|
@@ -162,202 +155,16 @@ async function acceptInviteApi(inviteId, options) {
|
|
|
162
155
|
});
|
|
163
156
|
}
|
|
164
157
|
|
|
165
|
-
// api/analytics.ts
|
|
166
|
-
import { browserApiRequest as browserApiRequest4 } from "@elqnt/api-client/browser";
|
|
167
|
-
function buildDateFilterParams(filter) {
|
|
168
|
-
if (!filter) return "";
|
|
169
|
-
const params = new URLSearchParams();
|
|
170
|
-
if (filter.from) params.set("from", filter.from);
|
|
171
|
-
if (filter.to) params.set("to", filter.to);
|
|
172
|
-
const queryString = params.toString();
|
|
173
|
-
return queryString ? `?${queryString}` : "";
|
|
174
|
-
}
|
|
175
|
-
async function getAnalyticsSummaryApi(filter, options) {
|
|
176
|
-
const queryString = buildDateFilterParams(filter);
|
|
177
|
-
return browserApiRequest4(`/api/v1/analytics/summary${queryString}`, {
|
|
178
|
-
method: "GET",
|
|
179
|
-
...options
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
async function getChatsAnalyticsApi(filter, agentId, options) {
|
|
183
|
-
const params = new URLSearchParams();
|
|
184
|
-
if (filter?.from) params.set("from", filter.from);
|
|
185
|
-
if (filter?.to) params.set("to", filter.to);
|
|
186
|
-
if (agentId) params.set("agent_id", agentId);
|
|
187
|
-
const queryString = params.toString();
|
|
188
|
-
return browserApiRequest4(`/api/v1/analytics/chats${queryString ? `?${queryString}` : ""}`, {
|
|
189
|
-
method: "GET",
|
|
190
|
-
...options
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
async function getAgentsAnalyticsApi(filter, options) {
|
|
194
|
-
const queryString = buildDateFilterParams(filter);
|
|
195
|
-
return browserApiRequest4(`/api/v1/analytics/agents${queryString}`, {
|
|
196
|
-
method: "GET",
|
|
197
|
-
...options
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
async function getUsageAnalyticsApi(filter, options) {
|
|
201
|
-
const queryString = buildDateFilterParams(filter);
|
|
202
|
-
return browserApiRequest4(`/api/v1/analytics/usage${queryString}`, {
|
|
203
|
-
method: "GET",
|
|
204
|
-
...options
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
async function getDailyAnalyticsApi(filter, options) {
|
|
208
|
-
const queryString = buildDateFilterParams(filter);
|
|
209
|
-
return browserApiRequest4(`/api/v1/analytics/daily${queryString}`, {
|
|
210
|
-
method: "GET",
|
|
211
|
-
...options
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
async function getAnalyticsEventsApi(filter, options) {
|
|
215
|
-
const queryString = buildDateFilterParams(filter);
|
|
216
|
-
return browserApiRequest4(`/api/v1/analytics/events${queryString}`, {
|
|
217
|
-
method: "GET",
|
|
218
|
-
...options
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
async function logAnalyticsEventApi(event, options) {
|
|
222
|
-
return browserApiRequest4("/api/v1/analytics/events", {
|
|
223
|
-
method: "POST",
|
|
224
|
-
body: event,
|
|
225
|
-
...options
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
async function getGlobalSummaryApi(filter, options) {
|
|
229
|
-
const queryString = buildDateFilterParams(filter);
|
|
230
|
-
return browserApiRequest4(`/api/v1/analytics/global/summary${queryString}`, {
|
|
231
|
-
method: "GET",
|
|
232
|
-
...options
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
async function getGlobalOrgsAnalyticsApi(filter, options) {
|
|
236
|
-
const queryString = buildDateFilterParams(filter);
|
|
237
|
-
return browserApiRequest4(`/api/v1/analytics/global/orgs${queryString}`, {
|
|
238
|
-
method: "GET",
|
|
239
|
-
...options
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// api/provisioning.ts
|
|
244
|
-
import { browserApiRequest as browserApiRequest5 } from "@elqnt/api-client/browser";
|
|
245
|
-
async function createOrgWithProvisioningApi(request, options) {
|
|
246
|
-
return browserApiRequest5("/api/v1/admin/provisioning/orgs", {
|
|
247
|
-
method: "POST",
|
|
248
|
-
body: request,
|
|
249
|
-
...options
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
async function getProvisioningStatusApi(orgId, options) {
|
|
253
|
-
return browserApiRequest5(`/api/v1/admin/orgs/${orgId}/provisioning`, {
|
|
254
|
-
method: "GET",
|
|
255
|
-
...options
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
async function retryProvisioningApi(orgId, request, options) {
|
|
259
|
-
return browserApiRequest5(`/api/v1/admin/orgs/${orgId}/provisioning/retry`, {
|
|
260
|
-
method: "POST",
|
|
261
|
-
body: request || {},
|
|
262
|
-
...options
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
async function validateProvisioningApi(orgId, options) {
|
|
266
|
-
return browserApiRequest5(
|
|
267
|
-
`/api/v1/admin/orgs/${orgId}/provisioning/validate`,
|
|
268
|
-
{
|
|
269
|
-
method: "POST",
|
|
270
|
-
...options
|
|
271
|
-
}
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
async function cancelProvisioningApi(orgId, options) {
|
|
275
|
-
return browserApiRequest5(
|
|
276
|
-
`/api/v1/admin/orgs/${orgId}/provisioning/cancel`,
|
|
277
|
-
{
|
|
278
|
-
method: "POST",
|
|
279
|
-
...options
|
|
280
|
-
}
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
async function cleanupProvisioningApi(orgId, options) {
|
|
284
|
-
return browserApiRequest5(`/api/v1/admin/orgs/${orgId}/provisioning`, {
|
|
285
|
-
method: "DELETE",
|
|
286
|
-
...options
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function streamProvisioningProgress(orgId, callbacks, options) {
|
|
290
|
-
const url = new URL(
|
|
291
|
-
`/api/v1/admin/orgs/${orgId}/provisioning/stream`,
|
|
292
|
-
options.baseUrl
|
|
293
|
-
);
|
|
294
|
-
if (options.token) {
|
|
295
|
-
url.searchParams.set("token", options.token);
|
|
296
|
-
}
|
|
297
|
-
const eventSource = new EventSource(url.toString());
|
|
298
|
-
eventSource.addEventListener("connected", (event) => {
|
|
299
|
-
try {
|
|
300
|
-
const data = JSON.parse(event.data);
|
|
301
|
-
callbacks.onConnected?.(data.orgId);
|
|
302
|
-
} catch (e) {
|
|
303
|
-
console.error("Failed to parse connected event", e);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
eventSource.addEventListener("progress", (event) => {
|
|
307
|
-
try {
|
|
308
|
-
const progress = JSON.parse(event.data);
|
|
309
|
-
callbacks.onProgress?.(progress);
|
|
310
|
-
} catch (e) {
|
|
311
|
-
console.error("Failed to parse progress event", e);
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
eventSource.addEventListener("done", () => {
|
|
315
|
-
callbacks.onDone?.();
|
|
316
|
-
eventSource.close();
|
|
317
|
-
});
|
|
318
|
-
eventSource.addEventListener("timeout", () => {
|
|
319
|
-
callbacks.onTimeout?.();
|
|
320
|
-
eventSource.close();
|
|
321
|
-
});
|
|
322
|
-
eventSource.onerror = (error) => {
|
|
323
|
-
callbacks.onError?.(new Error("SSE connection error"));
|
|
324
|
-
eventSource.close();
|
|
325
|
-
};
|
|
326
|
-
return () => {
|
|
327
|
-
eventSource.close();
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
function calculateProgressPercentage(progress) {
|
|
331
|
-
if (progress.totalArtifacts === 0) return 0;
|
|
332
|
-
return Math.round(
|
|
333
|
-
progress.completedArtifacts / progress.totalArtifacts * 100
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
function isProvisioningComplete(progress) {
|
|
337
|
-
return progress.status === "completed" || progress.status === "failed" || progress.status === "partial";
|
|
338
|
-
}
|
|
339
|
-
function isProvisioningSuccessful(progress) {
|
|
340
|
-
return progress.status === "completed";
|
|
341
|
-
}
|
|
342
|
-
function getFailedArtifacts(progress) {
|
|
343
|
-
return progress.artifacts.filter((a) => a.status === "failed");
|
|
344
|
-
}
|
|
345
|
-
function hasCriticalFailures(progress) {
|
|
346
|
-
return progress.artifacts.some(
|
|
347
|
-
(a) => a.status === "failed" && a.critical
|
|
348
|
-
);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
158
|
// api/index.ts
|
|
352
159
|
async function getOnboardingStatusApi(options) {
|
|
353
|
-
return
|
|
160
|
+
return browserApiRequest4("/api/v1/onboarding/status", {
|
|
354
161
|
method: "GET",
|
|
355
162
|
...options,
|
|
356
163
|
orgId: options.orgId || ""
|
|
357
164
|
});
|
|
358
165
|
}
|
|
359
166
|
async function startOnboardingApi(options) {
|
|
360
|
-
return
|
|
167
|
+
return browserApiRequest4("/api/v1/onboarding/start", {
|
|
361
168
|
method: "POST",
|
|
362
169
|
body: {},
|
|
363
170
|
...options,
|
|
@@ -365,7 +172,7 @@ async function startOnboardingApi(options) {
|
|
|
365
172
|
});
|
|
366
173
|
}
|
|
367
174
|
async function createPaymentSessionApi(params, options) {
|
|
368
|
-
return
|
|
175
|
+
return browserApiRequest4("/api/v1/onboarding/step/payment", {
|
|
369
176
|
method: "POST",
|
|
370
177
|
body: params,
|
|
371
178
|
...options,
|
|
@@ -373,7 +180,7 @@ async function createPaymentSessionApi(params, options) {
|
|
|
373
180
|
});
|
|
374
181
|
}
|
|
375
182
|
async function createOrganizationApi(org, options) {
|
|
376
|
-
return
|
|
183
|
+
return browserApiRequest4("/api/v1/onboarding/step/organization", {
|
|
377
184
|
method: "POST",
|
|
378
185
|
body: org,
|
|
379
186
|
...options,
|
|
@@ -381,7 +188,7 @@ async function createOrganizationApi(org, options) {
|
|
|
381
188
|
});
|
|
382
189
|
}
|
|
383
190
|
async function sendOnboardingInvitesApi(invites, options) {
|
|
384
|
-
return
|
|
191
|
+
return browserApiRequest4("/api/v1/onboarding/step/invites", {
|
|
385
192
|
method: "POST",
|
|
386
193
|
body: { invites },
|
|
387
194
|
...options,
|
|
@@ -389,7 +196,7 @@ async function sendOnboardingInvitesApi(invites, options) {
|
|
|
389
196
|
});
|
|
390
197
|
}
|
|
391
198
|
async function createOnboardingKnowledgeApi(knowledge, options) {
|
|
392
|
-
return
|
|
199
|
+
return browserApiRequest4("/api/v1/onboarding/step/knowledge", {
|
|
393
200
|
method: "POST",
|
|
394
201
|
body: knowledge,
|
|
395
202
|
...options,
|
|
@@ -397,7 +204,7 @@ async function createOnboardingKnowledgeApi(knowledge, options) {
|
|
|
397
204
|
});
|
|
398
205
|
}
|
|
399
206
|
async function createOnboardingAgentApi(agent, options) {
|
|
400
|
-
return
|
|
207
|
+
return browserApiRequest4("/api/v1/onboarding/step/agent", {
|
|
401
208
|
method: "POST",
|
|
402
209
|
body: agent,
|
|
403
210
|
...options,
|
|
@@ -405,7 +212,7 @@ async function createOnboardingAgentApi(agent, options) {
|
|
|
405
212
|
});
|
|
406
213
|
}
|
|
407
214
|
async function createAgentWithSkillsApi(payload, options) {
|
|
408
|
-
return
|
|
215
|
+
return browserApiRequest4("/api/v1/onboarding/agent-with-skills", {
|
|
409
216
|
method: "POST",
|
|
410
217
|
body: payload,
|
|
411
218
|
...options,
|
|
@@ -413,7 +220,7 @@ async function createAgentWithSkillsApi(payload, options) {
|
|
|
413
220
|
});
|
|
414
221
|
}
|
|
415
222
|
async function completeOnboardingApi(options) {
|
|
416
|
-
return
|
|
223
|
+
return browserApiRequest4("/api/v1/onboarding/complete", {
|
|
417
224
|
method: "POST",
|
|
418
225
|
body: {},
|
|
419
226
|
...options,
|
|
@@ -421,7 +228,7 @@ async function completeOnboardingApi(options) {
|
|
|
421
228
|
});
|
|
422
229
|
}
|
|
423
230
|
async function skipOnboardingStepApi(step, options) {
|
|
424
|
-
return
|
|
231
|
+
return browserApiRequest4("/api/v1/onboarding/skip-step", {
|
|
425
232
|
method: "POST",
|
|
426
233
|
body: { step },
|
|
427
234
|
...options,
|
|
@@ -429,7 +236,7 @@ async function skipOnboardingStepApi(step, options) {
|
|
|
429
236
|
});
|
|
430
237
|
}
|
|
431
238
|
async function startOnboardingProvisioningApi(options) {
|
|
432
|
-
return
|
|
239
|
+
return browserApiRequest4("/api/v1/onboarding/provisioning/start", {
|
|
433
240
|
method: "POST",
|
|
434
241
|
body: {},
|
|
435
242
|
...options,
|
|
@@ -437,116 +244,157 @@ async function startOnboardingProvisioningApi(options) {
|
|
|
437
244
|
});
|
|
438
245
|
}
|
|
439
246
|
async function provisionAllOnboardingApi(request, options) {
|
|
440
|
-
return
|
|
247
|
+
return browserApiRequest4("/api/v1/onboarding/provision-all", {
|
|
441
248
|
method: "POST",
|
|
442
249
|
body: request,
|
|
443
250
|
...options,
|
|
444
251
|
orgId: options.orgId || ""
|
|
445
252
|
});
|
|
446
253
|
}
|
|
254
|
+
function orgRowToSettings(orgId, row) {
|
|
255
|
+
return {
|
|
256
|
+
id: row?.id ?? "",
|
|
257
|
+
org_id: orgId,
|
|
258
|
+
title: row?.title ?? "",
|
|
259
|
+
description: row?.description ?? "",
|
|
260
|
+
logo_url: row?.logoUrl ?? "",
|
|
261
|
+
default_lang: row?.defaultLang ?? "en",
|
|
262
|
+
timezone: row?.timezone ?? "UTC",
|
|
263
|
+
additional_settings: row?.settings ?? {},
|
|
264
|
+
created_at: "",
|
|
265
|
+
updated_at: "",
|
|
266
|
+
created_by: "",
|
|
267
|
+
updated_by: ""
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function settingsToOrgRow(settings) {
|
|
271
|
+
return {
|
|
272
|
+
title: settings.title,
|
|
273
|
+
description: settings.description,
|
|
274
|
+
logoUrl: settings.logo_url,
|
|
275
|
+
defaultLang: settings.default_lang,
|
|
276
|
+
timezone: settings.timezone,
|
|
277
|
+
settings: settings.additional_settings
|
|
278
|
+
};
|
|
279
|
+
}
|
|
447
280
|
async function getOrgSettingsApi(options) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
281
|
+
const orgId = options.orgId ?? "";
|
|
282
|
+
const response = await browserApiRequest4(
|
|
283
|
+
`/api/v1/admin/orgs/${orgId}`,
|
|
284
|
+
{ method: "GET", ...options }
|
|
285
|
+
);
|
|
286
|
+
if (response.error) {
|
|
287
|
+
return { error: response.error, status: response.status };
|
|
288
|
+
}
|
|
289
|
+
return {
|
|
290
|
+
status: response.status,
|
|
291
|
+
data: {
|
|
292
|
+
success: true,
|
|
293
|
+
settings: orgRowToSettings(orgId, response.data?.organization)
|
|
294
|
+
}
|
|
295
|
+
};
|
|
452
296
|
}
|
|
453
297
|
async function createOrgSettingsApi(settings, options) {
|
|
454
|
-
return
|
|
455
|
-
method: "POST",
|
|
456
|
-
body: settings,
|
|
457
|
-
...options
|
|
458
|
-
});
|
|
298
|
+
return updateOrgSettingsApi(settings, options);
|
|
459
299
|
}
|
|
460
300
|
async function updateOrgSettingsApi(settings, options) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
301
|
+
const orgId = options.orgId ?? "";
|
|
302
|
+
const response = await browserApiRequest4(
|
|
303
|
+
`/api/v1/admin/orgs/${orgId}`,
|
|
304
|
+
{
|
|
305
|
+
method: "PUT",
|
|
306
|
+
body: settingsToOrgRow(settings),
|
|
307
|
+
...options
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
if (response.error) {
|
|
311
|
+
return { error: response.error, status: response.status };
|
|
312
|
+
}
|
|
313
|
+
return getOrgSettingsApi(options);
|
|
466
314
|
}
|
|
467
315
|
async function updateOrgAgentsApi(agentIds, options) {
|
|
468
|
-
return
|
|
316
|
+
return browserApiRequest4("/api/v1/org/agents", {
|
|
469
317
|
method: "PUT",
|
|
470
318
|
body: { agentIds },
|
|
471
319
|
...options
|
|
472
320
|
});
|
|
473
321
|
}
|
|
474
322
|
async function updateEntityDefinitionsApi(entityNames, options) {
|
|
475
|
-
return
|
|
323
|
+
return browserApiRequest4("/api/v1/org/entities", {
|
|
476
324
|
method: "PUT",
|
|
477
325
|
body: { entityNames },
|
|
478
326
|
...options
|
|
479
327
|
});
|
|
480
328
|
}
|
|
481
329
|
async function updateWorkflowDefinitionsApi(workflowIds, options) {
|
|
482
|
-
return
|
|
330
|
+
return browserApiRequest4("/api/v1/org/workflows", {
|
|
483
331
|
method: "PUT",
|
|
484
332
|
body: { workflowIds },
|
|
485
333
|
...options
|
|
486
334
|
});
|
|
487
335
|
}
|
|
488
336
|
async function getBillingPlansApi(options) {
|
|
489
|
-
return
|
|
337
|
+
return browserApiRequest4("/api/v1/billing/plans", {
|
|
490
338
|
method: "GET",
|
|
491
339
|
...options
|
|
492
340
|
});
|
|
493
341
|
}
|
|
494
342
|
async function getSubscriptionApi(options) {
|
|
495
|
-
return
|
|
343
|
+
return browserApiRequest4("/api/v1/billing/subscription", {
|
|
496
344
|
method: "GET",
|
|
497
345
|
...options
|
|
498
346
|
});
|
|
499
347
|
}
|
|
500
348
|
async function getCreditsApi(options) {
|
|
501
|
-
return
|
|
349
|
+
return browserApiRequest4("/api/v1/billing/credits", {
|
|
502
350
|
method: "GET",
|
|
503
351
|
...options
|
|
504
352
|
});
|
|
505
353
|
}
|
|
506
354
|
async function createCheckoutSessionApi(params, options) {
|
|
507
|
-
return
|
|
355
|
+
return browserApiRequest4("/api/v1/billing/checkout", {
|
|
508
356
|
method: "POST",
|
|
509
357
|
body: params,
|
|
510
358
|
...options
|
|
511
359
|
});
|
|
512
360
|
}
|
|
513
361
|
async function createPortalSessionApi(params, options) {
|
|
514
|
-
return
|
|
362
|
+
return browserApiRequest4("/api/v1/billing/portal", {
|
|
515
363
|
method: "POST",
|
|
516
364
|
body: params,
|
|
517
365
|
...options
|
|
518
366
|
});
|
|
519
367
|
}
|
|
520
368
|
async function cancelSubscriptionApi(options) {
|
|
521
|
-
return
|
|
369
|
+
return browserApiRequest4("/api/v1/billing/subscription/cancel", {
|
|
522
370
|
method: "POST",
|
|
523
371
|
body: {},
|
|
524
372
|
...options
|
|
525
373
|
});
|
|
526
374
|
}
|
|
527
375
|
async function purchaseCreditsApi(params, options) {
|
|
528
|
-
return
|
|
376
|
+
return browserApiRequest4("/api/v1/billing/credits/purchase", {
|
|
529
377
|
method: "POST",
|
|
530
378
|
body: params,
|
|
531
379
|
...options
|
|
532
380
|
});
|
|
533
381
|
}
|
|
534
382
|
async function provisionDefaultAgentsApi(definitions, options) {
|
|
535
|
-
return
|
|
383
|
+
return browserApiRequest4("/api/v1/admin/provision/agents", {
|
|
536
384
|
method: "POST",
|
|
537
385
|
body: { definitions },
|
|
538
386
|
...options
|
|
539
387
|
});
|
|
540
388
|
}
|
|
541
389
|
async function provisionEntitiesApi(definitions, options) {
|
|
542
|
-
return
|
|
390
|
+
return browserApiRequest4("/api/v1/admin/entities/update", {
|
|
543
391
|
method: "POST",
|
|
544
392
|
body: { definitions },
|
|
545
393
|
...options
|
|
546
394
|
});
|
|
547
395
|
}
|
|
548
396
|
async function provisionWorkflowsApi(definitions, options) {
|
|
549
|
-
return
|
|
397
|
+
return browserApiRequest4("/api/v1/admin/provision/workflows", {
|
|
550
398
|
method: "POST",
|
|
551
399
|
body: { definitions },
|
|
552
400
|
...options
|
|
@@ -554,10 +402,7 @@ async function provisionWorkflowsApi(definitions, options) {
|
|
|
554
402
|
}
|
|
555
403
|
export {
|
|
556
404
|
acceptInviteApi,
|
|
557
|
-
calculateProgressPercentage,
|
|
558
|
-
cancelProvisioningApi,
|
|
559
405
|
cancelSubscriptionApi,
|
|
560
|
-
cleanupProvisioningApi,
|
|
561
406
|
clearGatewayTokenCache,
|
|
562
407
|
completeOnboardingApi,
|
|
563
408
|
createAgentWithSkillsApi,
|
|
@@ -566,50 +411,33 @@ export {
|
|
|
566
411
|
createOnboardingKnowledgeApi,
|
|
567
412
|
createOrgApi,
|
|
568
413
|
createOrgSettingsApi,
|
|
569
|
-
createOrgWithProvisioningApi,
|
|
570
|
-
createOrgWithSchemasApi,
|
|
571
414
|
createOrganizationApi,
|
|
572
415
|
createPaymentSessionApi,
|
|
573
416
|
createPortalSessionApi,
|
|
574
417
|
createUserApi,
|
|
575
418
|
deleteOrgApi,
|
|
576
419
|
deleteUserApi,
|
|
577
|
-
getAgentsAnalyticsApi,
|
|
578
|
-
getAnalyticsEventsApi,
|
|
579
|
-
getAnalyticsSummaryApi,
|
|
580
420
|
getBillingPlansApi,
|
|
581
|
-
getChatsAnalyticsApi,
|
|
582
421
|
getCreditsApi,
|
|
583
|
-
getDailyAnalyticsApi,
|
|
584
|
-
getFailedArtifacts,
|
|
585
|
-
getGlobalOrgsAnalyticsApi,
|
|
586
|
-
getGlobalSummaryApi,
|
|
587
422
|
getInviteApi,
|
|
588
423
|
getOnboardingStatusApi,
|
|
589
424
|
getOrgApi,
|
|
590
425
|
getOrgInfoApi,
|
|
591
426
|
getOrgSettingsApi,
|
|
592
|
-
getProvisioningStatusApi,
|
|
593
427
|
getSubscriptionApi,
|
|
594
|
-
getUsageAnalyticsApi,
|
|
595
428
|
getUserApi,
|
|
596
429
|
getUserByEmailApi,
|
|
597
430
|
getUserByPhoneApi,
|
|
598
431
|
getUserSettingsApi,
|
|
599
|
-
hasCriticalFailures,
|
|
600
|
-
isProvisioningComplete,
|
|
601
|
-
isProvisioningSuccessful,
|
|
602
432
|
listInvitesApi,
|
|
603
433
|
listOrgsApi,
|
|
604
434
|
listUsersApi,
|
|
605
|
-
logAnalyticsEventApi,
|
|
606
435
|
provisionAllOnboardingApi,
|
|
607
436
|
provisionDefaultAgentsApi,
|
|
608
437
|
provisionEntitiesApi,
|
|
609
438
|
provisionWorkflowsApi,
|
|
610
439
|
purchaseCreditsApi,
|
|
611
440
|
resendInviteApi,
|
|
612
|
-
retryProvisioningApi,
|
|
613
441
|
revokeInviteApi,
|
|
614
442
|
sendInviteApi,
|
|
615
443
|
sendInvitesApi,
|
|
@@ -617,14 +445,12 @@ export {
|
|
|
617
445
|
skipOnboardingStepApi,
|
|
618
446
|
startOnboardingApi,
|
|
619
447
|
startOnboardingProvisioningApi,
|
|
620
|
-
streamProvisioningProgress,
|
|
621
448
|
updateEntityDefinitionsApi,
|
|
622
449
|
updateOrgAgentsApi,
|
|
623
450
|
updateOrgApi,
|
|
624
451
|
updateOrgSettingsApi,
|
|
625
452
|
updateUserApi,
|
|
626
453
|
updateUserSettingsApi,
|
|
627
|
-
updateWorkflowDefinitionsApi
|
|
628
|
-
validateProvisioningApi
|
|
454
|
+
updateWorkflowDefinitionsApi
|
|
629
455
|
};
|
|
630
456
|
//# sourceMappingURL=index.js.map
|