@8wave/ai-elements 0.114.0 → 0.115.0-beta.13

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.
Files changed (44) hide show
  1. package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CgQePKKb.js} +3 -3
  2. package/dist/_chunks/PkToolRequestOAuthConnection-CgQePKKb.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js → PkToolShowSources-kGQlIKaN.js} +2 -2
  4. package/dist/_chunks/{PkToolShowSources-VFoI0YS8.js.map → PkToolShowSources-kGQlIKaN.js.map} +1 -1
  5. package/dist/_chunks/{markdown-BL7WANiX.js → markdown-B4cYQGBo.js} +19 -10
  6. package/dist/_chunks/{markdown-BL7WANiX.js.map → markdown-B4cYQGBo.js.map} +1 -1
  7. package/dist/ai-elements.es.js +66 -8
  8. package/dist/ai-elements.es.js.map +1 -1
  9. package/dist-vue/PkChatbot.js +1 -1
  10. package/dist-vue/PkChatbotMessages.js +1 -1
  11. package/dist-vue/PkChatbotViewChat.js +1 -1
  12. package/dist-vue/PkChatbotViewFiles.js +1 -1
  13. package/dist-vue/_chunks/{Document-nCWwJC2h.js → Document-BWz2HySu.js} +20 -11
  14. package/dist-vue/_chunks/{Document-nCWwJC2h.js.map → Document-BWz2HySu.js.map} +1 -1
  15. package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js → PkChatbot-DtyZYAzj.js} +3 -3
  16. package/dist-vue/_chunks/{PkChatbot-BMIs94QB.js.map → PkChatbot-DtyZYAzj.js.map} +1 -1
  17. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -1
  18. package/dist-vue/_chunks/{PkChatbotMessages-Bj7mjhqN.js → PkChatbotMessages-CrhRrcBs.js} +4 -4
  19. package/dist-vue/_chunks/{PkChatbotMessages-Bj7mjhqN.js.map → PkChatbotMessages-CrhRrcBs.js.map} +1 -1
  20. package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js → PkChatbotViewChat-B13nCznB.js} +3 -3
  21. package/dist-vue/_chunks/{PkChatbotViewChat-CQ5WcZs8.js.map → PkChatbotViewChat-B13nCznB.js.map} +1 -1
  22. package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js → PkChatbotViewFiles-cRyG5X3P.js} +2 -2
  23. package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js.map → PkChatbotViewFiles-cRyG5X3P.js.map} +1 -1
  24. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-a2LegFoE.js} +3 -3
  25. package/dist-vue/_chunks/PkToolRequestOAuthConnection-a2LegFoE.js.map +1 -0
  26. package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js → PkToolShowDiagram-BnbkymPD.js} +2 -2
  27. package/dist-vue/_chunks/{PkToolShowDiagram-BziggKVa.js.map → PkToolShowDiagram-BnbkymPD.js.map} +1 -1
  28. package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js → PkToolShowSources-C8r1vKJk.js} +2 -2
  29. package/dist-vue/_chunks/{PkToolShowSources-TzkNgwnr.js.map → PkToolShowSources-C8r1vKJk.js.map} +1 -1
  30. package/dist-vue/composables.js +62 -4
  31. package/dist-vue/composables.js.map +1 -1
  32. package/dist-vue/index.js +10 -8
  33. package/dist-vue/index.js.map +1 -1
  34. package/dist-vue/locales.js +2 -0
  35. package/dist-vue/packages/auth/src/active-membership.d.ts +36 -0
  36. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +5 -1
  37. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +1 -1
  38. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +3 -3
  39. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +1 -1
  40. package/dist-vue/packages/models/src/schema/Document.d.ts +477 -0
  41. package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/dist/_chunks/PkToolRequestOAuthConnection-ChGMAKV7.js.map +0 -1
  44. package/dist-vue/_chunks/PkToolRequestOAuthConnection-DMvCGPuX.js.map +0 -1
@@ -367,6 +367,7 @@ var e = {
367
367
  voiceId: "Cloned voices are not listed: the provider forbids them here.",
368
368
  freshnessScaleExplanationMonths: "A document updated today gets a +{weight} bonus. This bonus halves to +{halfWeight} after {half} days and practically drops to zero (+{zeroWeight}) after {zero} days (approx. {months} months).",
369
369
  freshnessScaleExplanationDays: "A document updated today gets a +{weight} bonus. This bonus halves to +{halfWeight} after {half} days and practically drops to zero (+{zeroWeight}) after {zero} days.",
370
+ reasoningVisibility: "A reasoning agent is always visible to the members of its organization only.",
370
371
  agentOnOwnEndpoint: "This agent runs on your organization's endpoint.",
371
372
  providerTimeoutMs: "Timeout in milliseconds before falling back to the next provider (min 1000, max 789000). BYOK credentials only.",
372
373
  showExtendedSteps: "Shows reasoning and tool calls as an expandable timeline in the chat.",
@@ -958,6 +959,7 @@ var e = {
958
959
  voiceId: "Le voci clonate non sono in elenco: il fornitore non le ammette qui.",
959
960
  freshnessScaleExplanationMonths: "Un documento modificato oggi ottiene un bonus di +{weight}. Il bonus si dimezza a +{halfWeight} dopo {half} giorni e si azzera praticamente (+{zeroWeight}) dopo {zero} giorni (circa {months} mesi).",
960
961
  freshnessScaleExplanationDays: "Un documento modificato oggi ottiene un bonus di +{weight}. Il bonus si dimezza a +{halfWeight} dopo {half} giorni e si azzera praticamente (+{zeroWeight}) dopo {zero} giorni.",
962
+ reasoningVisibility: "Un agente reasoning è sempre visibile solo ai membri dell'organizzazione.",
961
963
  agentOnOwnEndpoint: "Questo agente gira sull’endpoint della tua organizzazione.",
962
964
  providerTimeoutMs: "Timeout in millisecondi prima di passare al provider successivo (min 1000, max 789000). Solo credenziali BYOK.",
963
965
  showExtendedSteps: "Visualizza la timeline con il ragionamento e gli strumenti nella chat.",
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The role `userId` holds in `organizationId` now, or `null` when they are
3
+ * not a member. A role is cached, an absence is not: a membership created
4
+ * after a refusal is seen on the next request, so the paths that add members
5
+ * have nothing to invalidate.
6
+ */
7
+ export declare function currentMemberRole(userId: string, organizationId: string): Promise<string | null>;
8
+ type OrganizationSession = {
9
+ userId: string;
10
+ activeOrganizationId?: string | null;
11
+ organizationRole?: string | null;
12
+ };
13
+ /**
14
+ * The session as a request may trust it: its active organization only while
15
+ * the user is still a member of it, and the role they hold there now.
16
+ *
17
+ * The two fields are written when the organization is activated and nothing
18
+ * rewrites them when the membership changes. Every service reads the tenant
19
+ * from the first and every permission from the second, so a member removed
20
+ * from an organization kept reading and writing it for the life of their
21
+ * session (90 days, renewed daily), and a demoted admin kept the admin rules.
22
+ * A session whose organization was unset kept the role it had there, which
23
+ * still opened the audience gates.
24
+ */
25
+ export declare function withCurrentMembership<T extends OrganizationSession>(session: T): Promise<T>;
26
+ /**
27
+ * Brings the stored sessions of `userId` in line with their membership of
28
+ * `organizationId`, after a write to it: a new role replaces the old one, a
29
+ * membership that is gone takes the active organization with it. Call it
30
+ * after every role change and every removal. The request check does not
31
+ * depend on it, it reads the membership itself, but the client does: it
32
+ * reads its organization and role from the session. The role is read from
33
+ * the database, not the cache, which a request may still be refilling.
34
+ */
35
+ export declare function syncSessionsWithMembership(userId: string, organizationId: string): Promise<void>;
36
+ export {};
@@ -5,7 +5,11 @@
5
5
  * because the organization is full. An automatic join does not take a seat
6
6
  * an open invitation holds either, and a skipped one is not retried at the
7
7
  * next sign-in: the person joins through an invitation once a seat is free.
8
+ *
9
+ * The role has no default: it used to be `member`, and the external login,
10
+ * which did not pass one, made every visitor of the widget a member with the
11
+ * frontoffice of the organization, whatever its configuration said.
8
12
  */
9
- export declare function addMemberToOrganizationIfNotExists(userId: string, organizationId: string, role?: string, { respectMemberLimit }?: {
13
+ export declare function addMemberToOrganizationIfNotExists(userId: string, organizationId: string, role: string, { respectMemberLimit }?: {
10
14
  respectMemberLimit?: boolean;
11
15
  }): Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { BetterFetch } from 'better-auth/client';
2
2
  /**
3
3
  * Client counterpart of the server `passkeyPolicy()` plugin, see
4
- * docs/specs/two-factor-authentication.md, D10.
4
+ * docs/specs/released/two-factor-authentication.md, D10.
5
5
  */
6
6
  export declare function passkeyPolicyClient(): {
7
7
  id: "passkey-policy";
@@ -2,7 +2,7 @@ import { SignInSecurityState } from '../../models/src';
2
2
  import { BetterFetch } from 'better-auth/client';
3
3
  /**
4
4
  * What `GET /two-factor-policy/user-security` answers to a system
5
- * administrator, see docs/specs/two-factor-system-assistance.md (D3). Dates
5
+ * administrator, see docs/specs/released/two-factor-system-assistance.md (D3). Dates
6
6
  * arrive as ISO strings.
7
7
  */
8
8
  export interface UserSignInSecurity {
@@ -60,8 +60,8 @@ export interface TwoFactorStatus {
60
60
  }
61
61
  /**
62
62
  * Client counterpart of the server `twoFactorPolicy()` and `twoFactorAdmin()`
63
- * plugins, see docs/specs/two-factor-authentication.md and
64
- * docs/specs/two-factor-system-assistance.md.
63
+ * plugins, see docs/specs/released/two-factor-authentication.md and
64
+ * docs/specs/released/two-factor-system-assistance.md.
65
65
  */
66
66
  export declare function twoFactorPolicyClient(): {
67
67
  id: "two-factor-policy";
@@ -95,7 +95,7 @@ export declare function isTwoFactorSetupRequiredForSession(input: {
95
95
  }): Promise<boolean>;
96
96
  /**
97
97
  * The status endpoint, the widget bridge and the announcements of
98
- * docs/specs/two-factor-authentication.md. The administrator's endpoints are
98
+ * docs/specs/released/two-factor-authentication.md. The administrator's endpoints are
99
99
  * in two-factor-admin-plugin.ts.
100
100
  *
101
101
  * The endpoints live under `/two-factor-policy/` and not `/two-factor/` on
@@ -1288,6 +1288,473 @@ export declare const DocumentSchema: z.ZodObject<{
1288
1288
  agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1289
1289
  folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1290
1290
  folderPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1291
+ deletedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1292
+ }, z.core.$strip>;
1293
+ /**
1294
+ * The document types the trash holds: the ones a person adds to a knowledge
1295
+ * base by hand. A revised answer lives and dies with its own page, so it is
1296
+ * never listed, restored or emptied from here.
1297
+ */
1298
+ export declare const DOCUMENT_TRASH_TYPES: readonly [DocumentType.File, DocumentType.Url, DocumentType.PlainText];
1299
+ /**
1300
+ * Why a restore was refused (docs/specs/document-trash.md, Decision 3), sent
1301
+ * as `additionalData.reason` of a `conflict` problem. The third case of the
1302
+ * decision, a folder that no longer exists, is not a refusal: the document
1303
+ * goes back to the root and the answer says so.
1304
+ */
1305
+ export declare enum DocumentRestoreRefusal {
1306
+ /** Every agent the document belonged to has been deleted. */
1307
+ AgentGone = "agent-gone",
1308
+ /**
1309
+ * A live document of the same source holds its remote identity; its id
1310
+ * travels as `additionalData.documentId`.
1311
+ */
1312
+ IdentityTaken = "identity-taken"
1313
+ }
1314
+ export declare const DocumentRestoreResultSchema: z.ZodObject<{
1315
+ document: z.ZodObject<{
1316
+ id: z.ZodString;
1317
+ externalId: z.ZodNullable<z.ZodString>;
1318
+ name: z.ZodString;
1319
+ content: z.ZodString;
1320
+ language: z.ZodString;
1321
+ processedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1322
+ createdAt: z.ZodCoercedDate<unknown>;
1323
+ createdBy: z.ZodString;
1324
+ updatedAt: z.ZodCoercedDate<unknown>;
1325
+ updatedBy: z.ZodString;
1326
+ deleted: z.ZodBoolean;
1327
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1328
+ deletedBy: z.ZodNullable<z.ZodString>;
1329
+ organizationId: z.ZodString;
1330
+ priority: z.ZodDefault<z.ZodNumber>;
1331
+ refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof DocumentRefreshInterval>>>;
1332
+ nextRefreshAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
1333
+ sourceProvider: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof DocumentSourceProvider>>>;
1334
+ type: z.ZodEnum<typeof DocumentType>;
1335
+ indexStatus: z.ZodEnum<typeof IndexStatus>;
1336
+ metadata: z.ZodObject<{
1337
+ source: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
1338
+ contentHash: z.ZodOptional<z.ZodString>;
1339
+ lastRefresh: z.ZodOptional<z.ZodObject<{
1340
+ at: z.ZodString;
1341
+ result: z.ZodEnum<typeof DocumentRefreshResult>;
1342
+ httpStatus: z.ZodOptional<z.ZodNumber>;
1343
+ error: z.ZodOptional<z.ZodString>;
1344
+ consecutiveFailures: z.ZodOptional<z.ZodNumber>;
1345
+ previousWordCount: z.ZodOptional<z.ZodNumber>;
1346
+ newWordCount: z.ZodOptional<z.ZodNumber>;
1347
+ }, z.core.$strip>>;
1348
+ provider: z.ZodLiteral<DocumentSourceProvider.Web>;
1349
+ url: z.ZodString;
1350
+ lastScrapedAt: z.ZodOptional<z.ZodString>;
1351
+ extractionInputHash: z.ZodOptional<z.ZodString>;
1352
+ finalUrl: z.ZodOptional<z.ZodString>;
1353
+ sourceId: z.ZodOptional<z.ZodUUID>;
1354
+ lastSyncedAt: z.ZodOptional<z.ZodString>;
1355
+ lastmod: z.ZodOptional<z.ZodString>;
1356
+ }, z.core.$strip>, z.ZodObject<{
1357
+ contentHash: z.ZodOptional<z.ZodString>;
1358
+ lastRefresh: z.ZodOptional<z.ZodObject<{
1359
+ at: z.ZodString;
1360
+ result: z.ZodEnum<typeof DocumentRefreshResult>;
1361
+ httpStatus: z.ZodOptional<z.ZodNumber>;
1362
+ error: z.ZodOptional<z.ZodString>;
1363
+ consecutiveFailures: z.ZodOptional<z.ZodNumber>;
1364
+ previousWordCount: z.ZodOptional<z.ZodNumber>;
1365
+ newWordCount: z.ZodOptional<z.ZodNumber>;
1366
+ }, z.core.$strip>>;
1367
+ sourceId: z.ZodUUID;
1368
+ remoteId: z.ZodString;
1369
+ webUrl: z.ZodString;
1370
+ path: z.ZodString;
1371
+ fingerprint: z.ZodString;
1372
+ lastSyncedAt: z.ZodString;
1373
+ lastModified: z.ZodOptional<z.ZodString>;
1374
+ candidate: z.ZodOptional<z.ZodObject<{
1375
+ media: z.ZodObject<{
1376
+ name: z.ZodString;
1377
+ src: z.ZodObject<{
1378
+ type: z.ZodString;
1379
+ name: z.ZodString;
1380
+ mimeType: z.ZodString;
1381
+ bytesCount: z.ZodNumber;
1382
+ extension: z.ZodString;
1383
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1384
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1385
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1386
+ type: z.ZodLiteral<"azure-blob">;
1387
+ blobUri: z.ZodURL;
1388
+ containerName: z.ZodString;
1389
+ pathRelativeToContainer: z.ZodString;
1390
+ }, z.core.$strip>, z.ZodObject<{
1391
+ type: z.ZodLiteral<"s3">;
1392
+ bucket: z.ZodString;
1393
+ key: z.ZodString;
1394
+ region: z.ZodString;
1395
+ }, z.core.$strip>], "type">;
1396
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1397
+ signData: z.ZodOptional<z.ZodString>;
1398
+ storedFileName: z.ZodString;
1399
+ }, z.core.$strip>;
1400
+ srcSet: z.ZodDefault<z.ZodArray<z.ZodObject<{
1401
+ type: z.ZodString;
1402
+ name: z.ZodString;
1403
+ mimeType: z.ZodString;
1404
+ bytesCount: z.ZodNumber;
1405
+ extension: z.ZodString;
1406
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1407
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1408
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1409
+ type: z.ZodLiteral<"azure-blob">;
1410
+ blobUri: z.ZodURL;
1411
+ containerName: z.ZodString;
1412
+ pathRelativeToContainer: z.ZodString;
1413
+ }, z.core.$strip>, z.ZodObject<{
1414
+ type: z.ZodLiteral<"s3">;
1415
+ bucket: z.ZodString;
1416
+ key: z.ZodString;
1417
+ region: z.ZodString;
1418
+ }, z.core.$strip>], "type">;
1419
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1420
+ signData: z.ZodOptional<z.ZodString>;
1421
+ storedFileName: z.ZodString;
1422
+ }, z.core.$strip>>>;
1423
+ rawOptions: z.ZodOptional<z.ZodCustom<{
1424
+ type: import('./Media').MediaType.picture;
1425
+ width: number;
1426
+ height: number;
1427
+ blurhash?: string | undefined;
1428
+ } | {
1429
+ type: import('./Media').MediaType.video;
1430
+ width: number;
1431
+ height: number;
1432
+ duration: number;
1433
+ } | {
1434
+ type: import('./Media').MediaType.audio;
1435
+ duration: number;
1436
+ } | {
1437
+ type: import('./Media').MediaType.office;
1438
+ } | {
1439
+ type: import('./Media').MediaType.archive;
1440
+ } | {
1441
+ type: import('./Media').MediaType.binary;
1442
+ } | {
1443
+ type: import('./Media').MediaType.executable;
1444
+ }, {
1445
+ type: import('./Media').MediaType.picture;
1446
+ width: number;
1447
+ height: number;
1448
+ blurhash?: string | undefined;
1449
+ } | {
1450
+ type: import('./Media').MediaType.video;
1451
+ width: number;
1452
+ height: number;
1453
+ duration: number;
1454
+ } | {
1455
+ type: import('./Media').MediaType.audio;
1456
+ duration: number;
1457
+ } | {
1458
+ type: import('./Media').MediaType.office;
1459
+ } | {
1460
+ type: import('./Media').MediaType.archive;
1461
+ } | {
1462
+ type: import('./Media').MediaType.binary;
1463
+ } | {
1464
+ type: import('./Media').MediaType.executable;
1465
+ }>>;
1466
+ }, z.core.$strip>;
1467
+ fingerprint: z.ZodString;
1468
+ name: z.ZodString;
1469
+ webUrl: z.ZodString;
1470
+ path: z.ZodString;
1471
+ lastModified: z.ZodOptional<z.ZodString>;
1472
+ }, z.core.$strip>>;
1473
+ provider: z.ZodLiteral<DocumentSourceProvider.SharePoint>;
1474
+ }, z.core.$strip>, z.ZodObject<{
1475
+ contentHash: z.ZodOptional<z.ZodString>;
1476
+ lastRefresh: z.ZodOptional<z.ZodObject<{
1477
+ at: z.ZodString;
1478
+ result: z.ZodEnum<typeof DocumentRefreshResult>;
1479
+ httpStatus: z.ZodOptional<z.ZodNumber>;
1480
+ error: z.ZodOptional<z.ZodString>;
1481
+ consecutiveFailures: z.ZodOptional<z.ZodNumber>;
1482
+ previousWordCount: z.ZodOptional<z.ZodNumber>;
1483
+ newWordCount: z.ZodOptional<z.ZodNumber>;
1484
+ }, z.core.$strip>>;
1485
+ sourceId: z.ZodUUID;
1486
+ remoteId: z.ZodString;
1487
+ webUrl: z.ZodString;
1488
+ path: z.ZodString;
1489
+ fingerprint: z.ZodString;
1490
+ lastSyncedAt: z.ZodString;
1491
+ lastModified: z.ZodOptional<z.ZodString>;
1492
+ candidate: z.ZodOptional<z.ZodObject<{
1493
+ media: z.ZodObject<{
1494
+ name: z.ZodString;
1495
+ src: z.ZodObject<{
1496
+ type: z.ZodString;
1497
+ name: z.ZodString;
1498
+ mimeType: z.ZodString;
1499
+ bytesCount: z.ZodNumber;
1500
+ extension: z.ZodString;
1501
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1502
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1503
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1504
+ type: z.ZodLiteral<"azure-blob">;
1505
+ blobUri: z.ZodURL;
1506
+ containerName: z.ZodString;
1507
+ pathRelativeToContainer: z.ZodString;
1508
+ }, z.core.$strip>, z.ZodObject<{
1509
+ type: z.ZodLiteral<"s3">;
1510
+ bucket: z.ZodString;
1511
+ key: z.ZodString;
1512
+ region: z.ZodString;
1513
+ }, z.core.$strip>], "type">;
1514
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1515
+ signData: z.ZodOptional<z.ZodString>;
1516
+ storedFileName: z.ZodString;
1517
+ }, z.core.$strip>;
1518
+ srcSet: z.ZodDefault<z.ZodArray<z.ZodObject<{
1519
+ type: z.ZodString;
1520
+ name: z.ZodString;
1521
+ mimeType: z.ZodString;
1522
+ bytesCount: z.ZodNumber;
1523
+ extension: z.ZodString;
1524
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1525
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1526
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1527
+ type: z.ZodLiteral<"azure-blob">;
1528
+ blobUri: z.ZodURL;
1529
+ containerName: z.ZodString;
1530
+ pathRelativeToContainer: z.ZodString;
1531
+ }, z.core.$strip>, z.ZodObject<{
1532
+ type: z.ZodLiteral<"s3">;
1533
+ bucket: z.ZodString;
1534
+ key: z.ZodString;
1535
+ region: z.ZodString;
1536
+ }, z.core.$strip>], "type">;
1537
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1538
+ signData: z.ZodOptional<z.ZodString>;
1539
+ storedFileName: z.ZodString;
1540
+ }, z.core.$strip>>>;
1541
+ rawOptions: z.ZodOptional<z.ZodCustom<{
1542
+ type: import('./Media').MediaType.picture;
1543
+ width: number;
1544
+ height: number;
1545
+ blurhash?: string | undefined;
1546
+ } | {
1547
+ type: import('./Media').MediaType.video;
1548
+ width: number;
1549
+ height: number;
1550
+ duration: number;
1551
+ } | {
1552
+ type: import('./Media').MediaType.audio;
1553
+ duration: number;
1554
+ } | {
1555
+ type: import('./Media').MediaType.office;
1556
+ } | {
1557
+ type: import('./Media').MediaType.archive;
1558
+ } | {
1559
+ type: import('./Media').MediaType.binary;
1560
+ } | {
1561
+ type: import('./Media').MediaType.executable;
1562
+ }, {
1563
+ type: import('./Media').MediaType.picture;
1564
+ width: number;
1565
+ height: number;
1566
+ blurhash?: string | undefined;
1567
+ } | {
1568
+ type: import('./Media').MediaType.video;
1569
+ width: number;
1570
+ height: number;
1571
+ duration: number;
1572
+ } | {
1573
+ type: import('./Media').MediaType.audio;
1574
+ duration: number;
1575
+ } | {
1576
+ type: import('./Media').MediaType.office;
1577
+ } | {
1578
+ type: import('./Media').MediaType.archive;
1579
+ } | {
1580
+ type: import('./Media').MediaType.binary;
1581
+ } | {
1582
+ type: import('./Media').MediaType.executable;
1583
+ }>>;
1584
+ }, z.core.$strip>;
1585
+ fingerprint: z.ZodString;
1586
+ name: z.ZodString;
1587
+ webUrl: z.ZodString;
1588
+ path: z.ZodString;
1589
+ lastModified: z.ZodOptional<z.ZodString>;
1590
+ }, z.core.$strip>>;
1591
+ provider: z.ZodLiteral<DocumentSourceProvider.GoogleDrive>;
1592
+ }, z.core.$strip>], "provider">, unknown>>;
1593
+ media: z.ZodOptional<z.ZodObject<{
1594
+ name: z.ZodString;
1595
+ src: z.ZodObject<{
1596
+ type: z.ZodString;
1597
+ name: z.ZodString;
1598
+ mimeType: z.ZodString;
1599
+ bytesCount: z.ZodNumber;
1600
+ extension: z.ZodString;
1601
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1602
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1603
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1604
+ type: z.ZodLiteral<"azure-blob">;
1605
+ blobUri: z.ZodURL;
1606
+ containerName: z.ZodString;
1607
+ pathRelativeToContainer: z.ZodString;
1608
+ }, z.core.$strip>, z.ZodObject<{
1609
+ type: z.ZodLiteral<"s3">;
1610
+ bucket: z.ZodString;
1611
+ key: z.ZodString;
1612
+ region: z.ZodString;
1613
+ }, z.core.$strip>], "type">;
1614
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1615
+ signData: z.ZodOptional<z.ZodString>;
1616
+ storedFileName: z.ZodString;
1617
+ }, z.core.$strip>;
1618
+ srcSet: z.ZodDefault<z.ZodArray<z.ZodObject<{
1619
+ type: z.ZodString;
1620
+ name: z.ZodString;
1621
+ mimeType: z.ZodString;
1622
+ bytesCount: z.ZodNumber;
1623
+ extension: z.ZodString;
1624
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1625
+ tags: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1626
+ storageHandle: z.ZodDiscriminatedUnion<[z.ZodObject<{
1627
+ type: z.ZodLiteral<"azure-blob">;
1628
+ blobUri: z.ZodURL;
1629
+ containerName: z.ZodString;
1630
+ pathRelativeToContainer: z.ZodString;
1631
+ }, z.core.$strip>, z.ZodObject<{
1632
+ type: z.ZodLiteral<"s3">;
1633
+ bucket: z.ZodString;
1634
+ key: z.ZodString;
1635
+ region: z.ZodString;
1636
+ }, z.core.$strip>], "type">;
1637
+ storagePolicy: z.ZodEnum<typeof StoragePolicy>;
1638
+ signData: z.ZodOptional<z.ZodString>;
1639
+ storedFileName: z.ZodString;
1640
+ }, z.core.$strip>>>;
1641
+ rawOptions: z.ZodOptional<z.ZodCustom<{
1642
+ type: import('./Media').MediaType.picture;
1643
+ width: number;
1644
+ height: number;
1645
+ blurhash?: string | undefined;
1646
+ } | {
1647
+ type: import('./Media').MediaType.video;
1648
+ width: number;
1649
+ height: number;
1650
+ duration: number;
1651
+ } | {
1652
+ type: import('./Media').MediaType.audio;
1653
+ duration: number;
1654
+ } | {
1655
+ type: import('./Media').MediaType.office;
1656
+ } | {
1657
+ type: import('./Media').MediaType.archive;
1658
+ } | {
1659
+ type: import('./Media').MediaType.binary;
1660
+ } | {
1661
+ type: import('./Media').MediaType.executable;
1662
+ }, {
1663
+ type: import('./Media').MediaType.picture;
1664
+ width: number;
1665
+ height: number;
1666
+ blurhash?: string | undefined;
1667
+ } | {
1668
+ type: import('./Media').MediaType.video;
1669
+ width: number;
1670
+ height: number;
1671
+ duration: number;
1672
+ } | {
1673
+ type: import('./Media').MediaType.audio;
1674
+ duration: number;
1675
+ } | {
1676
+ type: import('./Media').MediaType.office;
1677
+ } | {
1678
+ type: import('./Media').MediaType.archive;
1679
+ } | {
1680
+ type: import('./Media').MediaType.binary;
1681
+ } | {
1682
+ type: import('./Media').MediaType.executable;
1683
+ }>>;
1684
+ }, z.core.$strip>>;
1685
+ title: z.ZodOptional<z.ZodString>;
1686
+ author: z.ZodOptional<z.ZodString>;
1687
+ description: z.ZodOptional<z.ZodString>;
1688
+ summary: z.ZodOptional<z.ZodString>;
1689
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1690
+ subject: z.ZodOptional<z.ZodString>;
1691
+ creator: z.ZodOptional<z.ZodString>;
1692
+ producer: z.ZodOptional<z.ZodString>;
1693
+ creationDate: z.ZodOptional<z.ZodString>;
1694
+ modificationDate: z.ZodOptional<z.ZodString>;
1695
+ pageCount: z.ZodOptional<z.ZodCodec<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodUnknown>]>, z.ZodNumber>>;
1696
+ encrypted: z.ZodOptional<z.ZodBoolean>;
1697
+ characterCount: z.ZodOptional<z.ZodNumber>;
1698
+ lineCount: z.ZodOptional<z.ZodNumber>;
1699
+ siteName: z.ZodOptional<z.ZodString>;
1700
+ canonicalUrl: z.ZodOptional<z.ZodURL>;
1701
+ imageUrl: z.ZodOptional<z.ZodURL>;
1702
+ favicon: z.ZodOptional<z.ZodURL>;
1703
+ type: z.ZodOptional<z.ZodString>;
1704
+ locale: z.ZodOptional<z.ZodString>;
1705
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1706
+ publishedTime: z.ZodOptional<z.ZodString>;
1707
+ modifiedTime: z.ZodOptional<z.ZodString>;
1708
+ wordCount: z.ZodOptional<z.ZodNumber>;
1709
+ paragraphCount: z.ZodOptional<z.ZodNumber>;
1710
+ readingTime: z.ZodOptional<z.ZodNumber>;
1711
+ ocrUsed: z.ZodOptional<z.ZodBoolean>;
1712
+ ocrProvider: z.ZodOptional<z.ZodString>;
1713
+ ocrModel: z.ZodOptional<z.ZodString>;
1714
+ ocrPages: z.ZodOptional<z.ZodString>;
1715
+ ocrCost: z.ZodOptional<z.ZodNumber>;
1716
+ ocrError: z.ZodOptional<z.ZodString>;
1717
+ chunksCount: z.ZodOptional<z.ZodNumber>;
1718
+ redundantChunksCount: z.ZodOptional<z.ZodNumber>;
1719
+ hasRedundantChunks: z.ZodOptional<z.ZodBoolean>;
1720
+ qdrantSynced: z.ZodOptional<z.ZodBoolean>;
1721
+ conversionOptions: z.ZodOptional<z.ZodObject<{
1722
+ extractionStrategy: z.ZodOptional<z.ZodEnum<typeof ExtractionStrategy>>;
1723
+ browserEngine: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof BrowserEngine>>>;
1724
+ headers: z.ZodOptional<z.ZodNullable<z.ZodCodec<z.ZodArray<z.ZodObject<{
1725
+ key: z.ZodOptional<z.ZodString>;
1726
+ value: z.ZodOptional<z.ZodString>;
1727
+ }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
1728
+ key: z.ZodString;
1729
+ value: z.ZodString;
1730
+ }, z.core.$strip>>>>>;
1731
+ aiDescriptionModel: z.ZodOptional<z.ZodString>;
1732
+ aiDescriptionPrompt: z.ZodOptional<z.ZodString>;
1733
+ language: z.ZodOptional<z.ZodString>;
1734
+ forceOcr: z.ZodDefault<z.ZodBoolean>;
1735
+ pages: z.ZodOptional<z.ZodString>;
1736
+ }, z.core.$strip>>;
1737
+ }, z.core.$loose>;
1738
+ chunksCount: z.ZodOptional<z.ZodNumber>;
1739
+ redundantChunksCount: z.ZodOptional<z.ZodNumber>;
1740
+ hasRedundantChunks: z.ZodOptional<z.ZodBoolean>;
1741
+ qdrantSynced: z.ZodOptional<z.ZodBoolean>;
1742
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1743
+ folderId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1744
+ folderPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1745
+ deletedByName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1746
+ }, z.core.$strip>;
1747
+ returnedToRoot: z.ZodBoolean;
1748
+ }, z.core.$strip>;
1749
+ export declare const DocumentTrashSummarySchema: z.ZodObject<{
1750
+ count: z.ZodNumber;
1751
+ }, z.core.$strip>;
1752
+ export declare const DocumentEmptyTrashDtoSchema: z.ZodObject<{
1753
+ agentId: z.ZodUUID;
1754
+ }, z.core.$strip>;
1755
+ export declare const DocumentEmptyTrashResultSchema: z.ZodObject<{
1756
+ purged: z.ZodNumber;
1757
+ remaining: z.ZodNumber;
1291
1758
  }, z.core.$strip>;
1292
1759
  /**
1293
1760
  * Query parameters for listing documents with pagination, sorting, and filters
@@ -1300,6 +1767,10 @@ export declare const DocumentQuerystringSchema: z.ZodObject<{
1300
1767
  'filter[sourceProvider]': z.ZodOptional<z.ZodString>;
1301
1768
  ids: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
1302
1769
  "filter[fullText]": z.ZodOptional<z.ZodString>;
1770
+ 'filter[deleted]': z.ZodOptional<z.ZodEnum<{
1771
+ true: "true";
1772
+ false: "false";
1773
+ }>>;
1303
1774
  "filter[type]": z.ZodOptional<z.ZodString | z.ZodArray<z.ZodString>>;
1304
1775
  "filter[agentId]": z.ZodOptional<z.ZodString | z.ZodArray<z.ZodString>>;
1305
1776
  "filter[language]": z.ZodOptional<z.ZodString | z.ZodArray<z.ZodString>>;
@@ -1309,10 +1780,12 @@ export declare const DocumentQuerystringSchema: z.ZodObject<{
1309
1780
  id: "id";
1310
1781
  createdAt: "createdAt";
1311
1782
  updatedAt: "updatedAt";
1783
+ deletedAt: "deletedAt";
1312
1784
  "-name": "-name";
1313
1785
  "-id": "-id";
1314
1786
  "-createdAt": "-createdAt";
1315
1787
  "-updatedAt": "-updatedAt";
1788
+ "-deletedAt": "-deletedAt";
1316
1789
  }>>>;
1317
1790
  'page[number]': z.ZodDefault<z.ZodPipe<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>>;
1318
1791
  'page[size]': z.ZodDefault<z.ZodPipe<z.ZodUnion<[z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>>;
@@ -1480,6 +1953,10 @@ export type DocumentUpdateDto = z.infer<typeof DocumentUpdateDtoSchema>;
1480
1953
  export type DocumentRefreshIntervalDto = z.infer<typeof DocumentRefreshIntervalDtoSchema>;
1481
1954
  export type DocumentBulkRefreshIntervalDto = z.infer<typeof DocumentBulkRefreshIntervalDtoSchema>;
1482
1955
  export type DocumentBulkRefreshDto = z.infer<typeof DocumentBulkRefreshDtoSchema>;
1956
+ export type DocumentRestoreResult = z.infer<typeof DocumentRestoreResultSchema>;
1957
+ export type DocumentTrashSummary = z.infer<typeof DocumentTrashSummarySchema>;
1958
+ export type DocumentEmptyTrashDto = z.infer<typeof DocumentEmptyTrashDtoSchema>;
1959
+ export type DocumentEmptyTrashResult = z.infer<typeof DocumentEmptyTrashResultSchema>;
1483
1960
  export declare const getStatusColor: (status: IndexStatus) => "success" | "danger" | "warning" | "info";
1484
1961
  export declare const getStatusIcon: (status: IndexStatus) => "ri:check-line" | "ri:error-warning-line" | "ri:hourglass-line" | "ri:time-line";
1485
1962
  export declare const getTypeIcon: (type: DocumentType) => "ri:file-line" | "ri:link" | "ri:feedback-line" | "ri:input-method-line";
@@ -2,7 +2,7 @@ import { StoragePolicy } from './Media';
2
2
  import * as z from 'zod';
3
3
  /**
4
4
  * Where a user stands on two-step verification and passkeys, as the system
5
- * panel shows it (docs/specs/two-factor-system-assistance.md, D2). One state
5
+ * panel shows it (docs/specs/released/two-factor-system-assistance.md, D2). One state
6
6
  * per user, decided in this order: the authenticator app, the email code, a
7
7
  * passkey alone, then `required` for a member of an organization that asks
8
8
  * for a second factor who signs in with a password and has none.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8wave/ai-elements",
3
3
  "private": false,
4
- "version": "0.114.0",
4
+ "version": "0.115.0-beta.13",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite --port 8082 --open --host",