@8wave/ai-elements 0.114.0-beta.30 → 0.114.0-beta.7
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/_chunks/Agent-DTLrWpzX.js +460 -0
- package/dist/_chunks/Agent-DTLrWpzX.js.map +1 -0
- package/dist/_chunks/Media-Cft7Pwrh.js +108 -0
- package/dist/_chunks/Media-Cft7Pwrh.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-ZD0SROu1.js → PkStreamingMarkdown-C1sANAr5.js} +672 -688
- package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +1 -0
- package/dist/_chunks/{PkToolRequestGeolocation-OF1PWhMw.js → PkToolRequestGeolocation-BbxYKt-9.js} +2 -2
- package/{dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map → dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js → PkToolRequestOAuthConnection-CTp2w60F.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ChGMAKV7.js.map → PkToolRequestOAuthConnection-CTp2w60F.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js → PkToolShowArtifact-BfTjxGOT.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-LEfO5zfg.js.map → PkToolShowArtifact-BfTjxGOT.js.map} +1 -1
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +60 -0
- package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +1 -0
- package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js → PkToolShowContactForm-PFpY9dIp.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BO3JQfts.js.map → PkToolShowContactForm-PFpY9dIp.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js → PkToolShowForm-CMtSN0oX.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-KW8MOL-j.js.map → PkToolShowForm-CMtSN0oX.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-Bfx-Th_j.js → PkToolShowSources-C6cu66Ts.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Bfx-Th_j.js.map → PkToolShowSources-C6cu66Ts.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js → PkToolShowSuggestedReply-CFO8wV1b.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-Dl4x_nEJ.js.map → PkToolShowSuggestedReply-CFO8wV1b.js.map} +1 -1
- package/dist/_chunks/{markdown-BL7WANiX.js → markdown-BRD-hDrH.js} +12 -19
- package/dist/_chunks/markdown-BRD-hDrH.js.map +1 -0
- package/dist/ai-elements.es.js +2767 -3035
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotAuth.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-tbKw8Mdt.js → Agent-BNlmK-uJ.js} +2 -2
- package/dist-vue/_chunks/{Agent-tbKw8Mdt.js.map → Agent-BNlmK-uJ.js.map} +1 -1
- package/dist-vue/_chunks/{Document-nCWwJC2h.js → Document-2X01-F4Z.js} +11 -18
- package/dist-vue/_chunks/Document-2X01-F4Z.js.map +1 -0
- package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
- package/dist-vue/_chunks/{PkChatbot-CXQzBuxy.js → PkChatbot-HRayDr2d.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-CXQzBuxy.js.map → PkChatbot-HRayDr2d.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +349 -0
- package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js → PkChatbotEmptyState-CPOcfoRC.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-9mWiPd4B.js.map → PkChatbotEmptyState-CPOcfoRC.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js → PkChatbotInput-pLJQIu7v.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-BzaCyeFp.js.map → PkChatbotInput-pLJQIu7v.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-KH5RE8Dk.js → PkChatbotMessages-GZStJbx_.js} +256 -258
- package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js → PkChatbotStepPayload-DU0W-eUp.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-C36nXLW7.js.map → PkChatbotStepPayload-DU0W-eUp.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js → PkChatbotStepToolDetail-etlBryOg.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CBX-AQXv.js.map → PkChatbotStepToolDetail-etlBryOg.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +190 -0
- package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-D5sfTMCW.js → PkChatbotViewChat-DIfBWFoG.js} +7 -7
- package/dist-vue/_chunks/{PkChatbotViewChat-D5sfTMCW.js.map → PkChatbotViewChat-DIfBWFoG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js → PkChatbotViewConversations-BCdolW0R.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-CHpN4vhm.js.map → PkChatbotViewConversations-BCdolW0R.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js → PkChatbotViewFiles-Cudao8ew.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-Bk9-K6Hw.js.map → PkChatbotViewFiles-Cudao8ew.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js → PkChatbotViewProfile-DDsKOkcC.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-CosaHA-g.js.map → PkChatbotViewProfile-DDsKOkcC.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js → PkStreamingMarkdown-BloMJaIW.js} +205 -214
- package/dist-vue/_chunks/{PkStreamingMarkdown-BN7waklD.js.map → PkStreamingMarkdown-BloMJaIW.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-BOVbaCzQ.js → PkToolRequestGeolocation-9vfYNaQo.js} +2 -2
- package/{dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map → dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js → PkToolRequestOAuthConnection-BorR5NmZ.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DMvCGPuX.js.map → PkToolRequestOAuthConnection-BorR5NmZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js → PkToolShowArtifact-BuMY7GNj.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DrE_mK1z.js.map → PkToolShowArtifact-BuMY7GNj.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +61 -0
- package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +1 -0
- package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js → PkToolShowContactForm-0OQRqT8m.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-BBTbrgt4.js.map → PkToolShowContactForm-0OQRqT8m.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CztnTdq2.js → PkToolShowDiagram-BGL27iHG.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CztnTdq2.js.map → PkToolShowDiagram-BGL27iHG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js → PkToolShowEmail-BJJpS69F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowEmail-C30K5kJA.js.map → PkToolShowEmail-BJJpS69F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js → PkToolShowForm-DDcPpOZ8.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-C9N_SSm8.js.map → PkToolShowForm-DDcPpOZ8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js → PkToolShowMessage-BFGynf3p.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowMessage-DvkCRERv.js.map → PkToolShowMessage-BFGynf3p.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js → PkToolShowProductList-6t1Ir5CW.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-cfjg3CmV.js.map → PkToolShowProductList-6t1Ir5CW.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-CyR2GTiE.js → PkToolShowSources-cOF0ZxOj.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowSources-CyR2GTiE.js.map → PkToolShowSources-cOF0ZxOj.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js → PkToolShowSuggestedReply-DA4NEjHB.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-qAWdCUhr.js.map → PkToolShowSuggestedReply-DA4NEjHB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js → PkToolShowWebPages-OgaT1vYJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-CkQ2NhRj.js.map → PkToolShowWebPages-OgaT1vYJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js → PkUrl-Cd69XP5z.js} +2 -2
- package/dist-vue/_chunks/{PkUrl-BsD4Vby6.js.map → PkUrl-Cd69XP5z.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BlWs282E.js → createChatbotApiClient-CaVLm5W9.js} +168 -137
- package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js → useChatbotStore-BwrBZJCq.js} +3 -3
- package/dist-vue/_chunks/{useChatbotStore-CMo47fnS.js.map → useChatbotStore-BwrBZJCq.js.map} +1 -1
- package/dist-vue/_chunks/utils-h4C7rRcu.js +177 -0
- package/dist-vue/_chunks/utils-h4C7rRcu.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +8 -54
- package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +0 -14
- package/dist-vue/composables.js +112 -436
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +3235 -3359
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +0 -42
- package/dist-vue/packages/ability/src/index.d.ts +14 -10
- package/dist-vue/packages/auth/src/social-redirect-plugin.d.ts +12 -18
- package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +0 -19
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -8
- package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +0 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +0 -9
- package/dist-vue/packages/components/src/index.d.ts +1 -2
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +0 -60
- package/dist-vue/packages/models/src/schema/Chat.d.ts +0 -42
- package/dist-vue/packages/models/src/schema/Document.d.ts +0 -17
- package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +0 -10
- package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +1 -71
- package/dist-vue/packages/models/src/schema/Media.d.ts +1 -0
- package/dist-vue/packages/models/src/schema/Member.d.ts +0 -3
- package/dist-vue/packages/models/src/schema/Notification.d.ts +0 -6
- package/dist-vue/packages/models/src/schema/Organization.d.ts +0 -1
- package/dist-vue/packages/models/src/schema/User.d.ts +0 -1
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DK76k05_.js +0 -566
- package/dist/_chunks/Agent-DK76k05_.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown-ZD0SROu1.js.map +0 -1
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +0 -72
- package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +0 -1
- package/dist/_chunks/markdown-BL7WANiX.js.map +0 -1
- package/dist-vue/_chunks/Document-nCWwJC2h.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +0 -421
- package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-KH5RE8Dk.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js +0 -191
- package/dist-vue/_chunks/PkChatbotSteps-356rnZG5.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +0 -72
- package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +0 -1
- package/dist-vue/_chunks/utils--8iNpBr_.js +0 -184
- package/dist-vue/_chunks/utils--8iNpBr_.js.map +0 -1
- package/dist-vue/packages/auth/src/additional-fields.d.ts +0 -48
- package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +0 -31
- package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +0 -22
- package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +0 -60
- package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +0 -65
- package/dist-vue/packages/components/src/PkQrCode.d.ts +0 -14
- package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +0 -8
package/dist-vue/locales.js
CHANGED
|
@@ -305,7 +305,6 @@ var e = {
|
|
|
305
305
|
toolApprovalBadge: "User confirm",
|
|
306
306
|
calendarEvent: "Event",
|
|
307
307
|
comparison: "Comparison",
|
|
308
|
-
recommended: "Recommended",
|
|
309
308
|
contactUs: "Contact us",
|
|
310
309
|
phone: "Phone number",
|
|
311
310
|
diagram: "Diagram",
|
|
@@ -471,18 +470,6 @@ var e = {
|
|
|
471
470
|
untitled: "Untitled file",
|
|
472
471
|
exclude: "Remove file"
|
|
473
472
|
},
|
|
474
|
-
twoFactor: {
|
|
475
|
-
challengeBackup: "Enter one of the backup codes you saved.",
|
|
476
|
-
challengeEmailSent: "We sent a 6-digit code to your email. It expires in 5 minutes.",
|
|
477
|
-
challengeApp: "Enter the 6-digit code from your authenticator app.",
|
|
478
|
-
challengeTitle: "Two-step verification",
|
|
479
|
-
backupCode: "Backup code",
|
|
480
|
-
code: "6-digit code",
|
|
481
|
-
verify: "Verify",
|
|
482
|
-
useBackupCode: "Use a backup code",
|
|
483
|
-
useApp: "Use the authenticator app",
|
|
484
|
-
sendAgain: "Send a new code"
|
|
485
|
-
},
|
|
486
473
|
auth: {
|
|
487
474
|
signInTitle: "Sign in to your account",
|
|
488
475
|
signUpTitle: "Create your account",
|
|
@@ -580,14 +567,6 @@ var e = {
|
|
|
580
567
|
feelsLike: "Feels like",
|
|
581
568
|
dailyForecast: "Daily forecast",
|
|
582
569
|
airQuality: "Air quality"
|
|
583
|
-
},
|
|
584
|
-
turnEvaluation: {
|
|
585
|
-
cost: "Cost, not charged to the organization: {cost}",
|
|
586
|
-
title: "Evaluation after the reply",
|
|
587
|
-
modeHint: "Recorded after the reply, with no effect: nothing reads these probabilities yet.",
|
|
588
|
-
version: "Questions version {version}",
|
|
589
|
-
leadFailed: "The evaluation failed or did not answer within {budget} ms: nothing was recorded.",
|
|
590
|
-
probability: "Probability the evaluation model gives to the question: from 0.5 it leans towards yes"
|
|
591
570
|
}
|
|
592
571
|
}, t = {
|
|
593
572
|
agentType: {
|
|
@@ -895,7 +874,6 @@ var e = {
|
|
|
895
874
|
toolApprovalBadge: "Conferma utente",
|
|
896
875
|
calendarEvent: "Evento",
|
|
897
876
|
comparison: "Confronto",
|
|
898
|
-
recommended: "Consigliato",
|
|
899
877
|
contactUs: "Contattaci",
|
|
900
878
|
phone: "Telefono",
|
|
901
879
|
diagram: "Diagramma",
|
|
@@ -1061,18 +1039,6 @@ var e = {
|
|
|
1061
1039
|
untitled: "File senza nome",
|
|
1062
1040
|
exclude: "Rimuovi file"
|
|
1063
1041
|
},
|
|
1064
|
-
twoFactor: {
|
|
1065
|
-
challengeBackup: "Scrivi uno dei codici di recupero che hai salvato.",
|
|
1066
|
-
challengeEmailSent: "Ti abbiamo inviato un codice a 6 cifre via email. Scade fra 5 minuti.",
|
|
1067
|
-
challengeApp: "Scrivi il codice a 6 cifre della tua app di autenticazione.",
|
|
1068
|
-
challengeTitle: "Verifica in due passaggi",
|
|
1069
|
-
backupCode: "Codice di recupero",
|
|
1070
|
-
code: "Codice a 6 cifre",
|
|
1071
|
-
verify: "Verifica",
|
|
1072
|
-
useBackupCode: "Usa un codice di recupero",
|
|
1073
|
-
useApp: "Usa l'app di autenticazione",
|
|
1074
|
-
sendAgain: "Invia un nuovo codice"
|
|
1075
|
-
},
|
|
1076
1042
|
auth: {
|
|
1077
1043
|
signInTitle: "Accedi al tuo account",
|
|
1078
1044
|
signUpTitle: "Crea il tuo account",
|
|
@@ -1170,14 +1136,6 @@ var e = {
|
|
|
1170
1136
|
feelsLike: "Percepita",
|
|
1171
1137
|
dailyForecast: "Previsioni giornaliere",
|
|
1172
1138
|
airQuality: "Qualità dell'aria"
|
|
1173
|
-
},
|
|
1174
|
-
turnEvaluation: {
|
|
1175
|
-
cost: "Costo, non addebitato all'organizzazione: {cost}",
|
|
1176
|
-
title: "Valutazione a fine turno",
|
|
1177
|
-
modeHint: "Registrata dopo la risposta, senza effetti: per ora nessuno legge queste probabilità.",
|
|
1178
|
-
version: "Versione delle domande: {version}",
|
|
1179
|
-
leadFailed: "La valutazione non è riuscita o non ha risposto entro {budget} ms: non è stato registrato niente.",
|
|
1180
|
-
probability: "Probabilità che il modello di valutazione dà alla domanda: da 0,5 in su propende per il sì"
|
|
1181
1139
|
}
|
|
1182
1140
|
};
|
|
1183
1141
|
//#endregion
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MongoAbility, InferSubjects, ForcedSubject } from '@casl/ability';
|
|
1
|
+
import { MongoAbility, InferSubjects, ForcedSubject, Ability as PureAbility } from '@casl/ability';
|
|
2
2
|
import { Action, Capability, Subject, Session } from './types';
|
|
3
|
+
import { MongoQueryTopLevelOperators } from '@ucast/mongo2js';
|
|
3
4
|
import { Statements, RoleInput, Role, ExactRoleStatements } from 'better-auth/plugins';
|
|
4
5
|
export declare const OrganizationRoles: {
|
|
5
6
|
readonly admin: "admin";
|
|
@@ -12,20 +13,23 @@ export declare const UserRoles: {
|
|
|
12
13
|
readonly user: "user";
|
|
13
14
|
};
|
|
14
15
|
export type AbilitySubject = InferSubjects<'all' | Subject, true> | ForcedSubject<InferSubjects<'all' | Subject, true>>;
|
|
15
|
-
|
|
16
|
+
type Ability = MongoAbility<[Action, AbilitySubject]>;
|
|
17
|
+
export declare const ability: PureAbility<[Action, AbilitySubject], {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
[x: number]: any;
|
|
20
|
+
[x: symbol]: any;
|
|
21
|
+
} & MongoQueryTopLevelOperators<Record<PropertyKey, any>>>;
|
|
16
22
|
export declare const isValidOrganizationRole: (role?: string | null) => role is keyof typeof OrganizationRoles;
|
|
17
23
|
export declare const isValidUserRole: (role?: string | null) => role is keyof typeof UserRoles;
|
|
18
24
|
export declare const getOrganizationRoleCapabilities: (currentSession?: Session | null) => Capability[];
|
|
19
25
|
export declare const getUserRoleCapabilities: (currentSession?: Session | null) => Capability[];
|
|
20
26
|
/**
|
|
21
|
-
* Builds
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* between them is judged by whoever wrote it last. The backend builds one per
|
|
25
|
-
* request (`request.ability`), the Platform MCP one per tool call, and the
|
|
26
|
-
* frontend keeps its own for the single user of the tab.
|
|
27
|
+
* Builds a standalone ability instance for a session, without touching the
|
|
28
|
+
* shared singleton. Use for per-call checks outside the HTTP request flow
|
|
29
|
+
* (e.g. MCP tool handlers).
|
|
27
30
|
*/
|
|
28
|
-
export declare const buildAbilityForSession: (currentSession?: Session | null) =>
|
|
31
|
+
export declare const buildAbilityForSession: (currentSession?: Session | null) => Ability;
|
|
32
|
+
export declare const updateAbilityFromSession: (currentSession?: Session | null) => void;
|
|
29
33
|
export type PermissionMap = Partial<Record<Action, Subject>>;
|
|
30
34
|
/**
|
|
31
35
|
* Evaluates a route-style permission map ({ action: Subject }) against an
|
|
@@ -35,7 +39,7 @@ export type PermissionMap = Partial<Record<Action, Subject>>;
|
|
|
35
39
|
* Single source of truth for both the HTTP preHandler and the Platform MCP
|
|
36
40
|
* tool handlers.
|
|
37
41
|
*/
|
|
38
|
-
export declare const findDeniedPermission: (abilityInstance: Pick<
|
|
42
|
+
export declare const findDeniedPermission: (abilityInstance: Pick<Ability, "can">, permissions: PermissionMap, payload?: unknown) => {
|
|
39
43
|
action: Action;
|
|
40
44
|
subject: Subject;
|
|
41
45
|
} | null;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import { BetterAuthPlugin } from 'better-auth';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* as it is. better-auth matches its trusted origins as patterns, so an agent
|
|
5
|
-
* whose trusted origins hold `*` would let any page through; the CORS plugin
|
|
6
|
-
* (apps/backend/src/plugins/fastifyCors.ts) compares them exactly, and a widget
|
|
7
|
-
* whose host it refuses cannot run anyway.
|
|
8
|
-
*/
|
|
9
|
-
export declare function isListedOrigin(value: string, trusted: string[]): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Backs the social sign-in that runs in a browser window on the backend origin.
|
|
3
|
+
* Backs the widget social-login OAuth popup flow end to end.
|
|
12
4
|
*
|
|
13
5
|
* `socialRedirect` initiates the flow through a top-level GET navigation instead
|
|
14
6
|
* of the default `POST /sign-in/social` XHR call. Better-auth's social sign-in
|
|
15
7
|
* sets a signed `state` cookie that the OAuth callback verifies (CSRF
|
|
16
|
-
* protection). When the flow is started from an XHR on a different origin
|
|
17
|
-
*
|
|
18
|
-
*
|
|
8
|
+
* protection). When the flow is started from an XHR on a different origin (e.g.
|
|
9
|
+
* the embeddable widget, or any cross-site context), that `Set-Cookie` is a
|
|
10
|
+
* third-party cookie and modern browsers drop it, so the callback fails with
|
|
11
|
+
* `state_mismatch`. By navigating the browser (popup or full page) directly to
|
|
19
12
|
* this endpoint on the backend origin, the `state` cookie is set first-party and
|
|
20
|
-
* survives
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* callback hands back the token of the session it just created, and only to the
|
|
24
|
-
* origin that started it.
|
|
13
|
+
* survives, both in development and in production on customer domains. It mirrors
|
|
14
|
+
* the redirect branch of core `signInSocial`, reusing `generateState` so the
|
|
15
|
+
* stored state stays compatible with the standard OAuth callback.
|
|
25
16
|
*
|
|
26
|
-
*
|
|
17
|
+
* `widgetOAuthCallback` is the landing page the popup ends on after the OAuth
|
|
18
|
+
* callback completes (it's the `callbackURL` passed to `socialRedirect`). It runs
|
|
19
|
+
* on the backend origin so it can read the first-party session cookie and post the
|
|
20
|
+
* Bearer token back to the widget opener.
|
|
27
21
|
*/
|
|
28
22
|
export declare function socialRedirect(): BetterAuthPlugin;
|
|
@@ -4,12 +4,6 @@ type __VLS_Props = {
|
|
|
4
4
|
branding?: AgentBranding;
|
|
5
5
|
authMethods?: AuthMethods;
|
|
6
6
|
loading?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Set while an email sign-in waits for its second factor: the
|
|
9
|
-
* methods the account has (`totp`, `otp`). The code step replaces
|
|
10
|
-
* the forms until it is answered or cancelled.
|
|
11
|
-
*/
|
|
12
|
-
twoFactorMethods?: string[];
|
|
13
7
|
};
|
|
14
8
|
type __VLS_ModelProps = {
|
|
15
9
|
'errorMessage'?: string | undefined;
|
|
@@ -49,12 +43,6 @@ declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, C
|
|
|
49
43
|
email: string;
|
|
50
44
|
}) => any;
|
|
51
45
|
social: (provider: "google" | "microsoft") => any;
|
|
52
|
-
"verify-two-factor": (payload: {
|
|
53
|
-
kind: "totp" | "otp" | "backup";
|
|
54
|
-
code: string;
|
|
55
|
-
}) => any;
|
|
56
|
-
"send-two-factor-code": () => any;
|
|
57
|
-
"cancel-two-factor": () => any;
|
|
58
46
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
59
47
|
"onUpdate:errorMessage"?: ((message?: string | undefined) => any) | undefined;
|
|
60
48
|
"onUpdate:success"?: ((value?: {
|
|
@@ -75,17 +63,10 @@ declare const __VLS_export: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, C
|
|
|
75
63
|
email: string;
|
|
76
64
|
}) => any) | undefined;
|
|
77
65
|
onSocial?: ((provider: "google" | "microsoft") => any) | undefined;
|
|
78
|
-
"onVerify-two-factor"?: ((payload: {
|
|
79
|
-
kind: "totp" | "otp" | "backup";
|
|
80
|
-
code: string;
|
|
81
|
-
}) => any) | undefined;
|
|
82
|
-
"onSend-two-factor-code"?: (() => any) | undefined;
|
|
83
|
-
"onCancel-two-factor"?: (() => any) | undefined;
|
|
84
66
|
}>, {
|
|
85
67
|
branding: AgentBranding;
|
|
86
68
|
authMethods: AuthMethods;
|
|
87
69
|
loading: boolean;
|
|
88
|
-
twoFactorMethods: string[];
|
|
89
70
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
90
71
|
declare const _default: typeof __VLS_export;
|
|
91
72
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatMessageActions, MessageFeedback, RevisedAnswer, UIChatMessage } from '../../../models/src';
|
|
2
|
-
import { TextUIPart,
|
|
2
|
+
import { TextUIPart, UIToolInvocation, UITool } from 'ai';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
type __VLS_Props = {
|
|
5
5
|
status?: 'submitted' | 'streaming' | 'ready' | 'error';
|
|
@@ -55,15 +55,11 @@ declare var __VLS_25: {
|
|
|
55
55
|
part: TextUIPart;
|
|
56
56
|
index: number;
|
|
57
57
|
isLoading: boolean;
|
|
58
|
-
}, __VLS_73:
|
|
58
|
+
}, __VLS_73: `tool-${string}`, __VLS_74: {
|
|
59
59
|
message: UIChatMessage;
|
|
60
|
-
part:
|
|
60
|
+
part: {
|
|
61
61
|
type: `tool-${string}`;
|
|
62
|
-
} & UIToolInvocation<UITool
|
|
63
|
-
type: `data-${string}`;
|
|
64
|
-
id?: string;
|
|
65
|
-
data: unknown;
|
|
66
|
-
};
|
|
62
|
+
} & UIToolInvocation<UITool>;
|
|
67
63
|
index: number;
|
|
68
64
|
isLoading: boolean;
|
|
69
65
|
};
|
|
@@ -3,7 +3,6 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
|
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
message: UIChatMessage;
|
|
5
5
|
isStreaming?: boolean;
|
|
6
|
-
hasContent?: boolean;
|
|
7
6
|
isDark?: boolean;
|
|
8
7
|
};
|
|
9
8
|
declare const __VLS_export: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
@@ -7,15 +7,6 @@ export { isTextPart, isFilePart, isToolPart, isReasoningPart, hasPartText, hasTe
|
|
|
7
7
|
* that should logically be a single block of text.
|
|
8
8
|
*/
|
|
9
9
|
export declare function mergeConsecutiveTextParts(parts: UIMessage['parts']): UIMessage['parts'];
|
|
10
|
-
/**
|
|
11
|
-
* Drops a widget call refused for its arguments when a later call of the same
|
|
12
|
-
* widget in the message was drawn: the turn corrected it (the backend's
|
|
13
|
-
* `correctableInputRefusals`), and the refusal would sit next to the working
|
|
14
|
-
* widget, `showForm` drawing its render error above the form. A refusal with
|
|
15
|
-
* nothing drawn after it stays. Only the feed reads this: the steps timeline
|
|
16
|
-
* keeps every call, the refused one included.
|
|
17
|
-
*/
|
|
18
|
-
export declare function dropCorrectedWidgetErrors(parts: UIMessage['parts']): UIMessage['parts'];
|
|
19
10
|
export declare function isStreamingPart(part: UIMessage['parts'][number] | null | undefined): part is Extract<UIMessage['parts'][number], {
|
|
20
11
|
streaming?: boolean;
|
|
21
12
|
}>;
|
|
@@ -22,7 +22,6 @@ import { default as PkLoader } from './PkLoader';
|
|
|
22
22
|
import { default as PkMedia } from './PkMedia';
|
|
23
23
|
import { default as PkOfflineScreen } from './PkOfflineScreen';
|
|
24
24
|
import { default as PkPwaNotices } from './PkPwaNotices';
|
|
25
|
-
import { default as PkQrCode } from './PkQrCode';
|
|
26
25
|
import { default as PkRelativeTime } from './PkRelativeTime';
|
|
27
26
|
import { default as PkSkeleton } from './PkSkeleton';
|
|
28
27
|
import { default as PkSvgViewer } from './PkSvgViewer';
|
|
@@ -33,4 +32,4 @@ export * from './chat';
|
|
|
33
32
|
export * from './input';
|
|
34
33
|
export * from './table';
|
|
35
34
|
export * from './types';
|
|
36
|
-
export { PkBadge, PkEditorAgentType, PkEditorDocumentType, PkEditorNotificationType, PkEditorCode, PkEditorJsonSchema, PkEditorMarkdown, PkEditorMedia, PkEditorPrompt, PkEditorRadioButtons, PkEditorCheckboxButtons, PkEditorRepeater, PkEditorWyswyg, PkCheckboxField, PkFieldset, PkInfobox, PkSchemaField, PkIntegrationProvider, PkLazyImg, PkLightbox, PkLoader, PkMedia, PkOfflineScreen, PkPwaNotices,
|
|
35
|
+
export { PkBadge, PkEditorAgentType, PkEditorDocumentType, PkEditorNotificationType, PkEditorCode, PkEditorJsonSchema, PkEditorMarkdown, PkEditorMedia, PkEditorPrompt, PkEditorRadioButtons, PkEditorCheckboxButtons, PkEditorRepeater, PkEditorWyswyg, PkCheckboxField, PkFieldset, PkInfobox, PkSchemaField, PkIntegrationProvider, PkLazyImg, PkLightbox, PkLoader, PkMedia, PkOfflineScreen, PkPwaNotices, PkRelativeTime, PkSkeleton, PkSvgViewer, PkUrl, };
|
|
@@ -633,16 +633,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
633
633
|
failed?: boolean | undefined;
|
|
634
634
|
} | undefined;
|
|
635
635
|
} | undefined;
|
|
636
|
-
turnEvaluation?: {
|
|
637
|
-
version: number;
|
|
638
|
-
mode: "shadow";
|
|
639
|
-
probabilities: Record<string, number>;
|
|
640
|
-
latencyMs: number;
|
|
641
|
-
budgetMs: number;
|
|
642
|
-
cost?: number | undefined;
|
|
643
|
-
inputTokens?: number | undefined;
|
|
644
|
-
failed?: true | undefined;
|
|
645
|
-
} | undefined;
|
|
646
636
|
} | undefined;
|
|
647
637
|
parts: ({
|
|
648
638
|
type: "text";
|
|
@@ -1149,16 +1139,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
1149
1139
|
failed?: boolean | undefined;
|
|
1150
1140
|
} | undefined;
|
|
1151
1141
|
} | undefined;
|
|
1152
|
-
turnEvaluation?: {
|
|
1153
|
-
version: number;
|
|
1154
|
-
mode: "shadow";
|
|
1155
|
-
probabilities: Record<string, number>;
|
|
1156
|
-
latencyMs: number;
|
|
1157
|
-
budgetMs: number;
|
|
1158
|
-
cost?: number | undefined;
|
|
1159
|
-
inputTokens?: number | undefined;
|
|
1160
|
-
failed?: true | undefined;
|
|
1161
|
-
} | undefined;
|
|
1162
1142
|
} | undefined;
|
|
1163
1143
|
parts: ({
|
|
1164
1144
|
type: "text";
|
|
@@ -2363,16 +2343,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2363
2343
|
failed?: boolean | undefined;
|
|
2364
2344
|
} | undefined;
|
|
2365
2345
|
} | undefined;
|
|
2366
|
-
turnEvaluation?: {
|
|
2367
|
-
version: number;
|
|
2368
|
-
mode: "shadow";
|
|
2369
|
-
probabilities: Record<string, number>;
|
|
2370
|
-
latencyMs: number;
|
|
2371
|
-
budgetMs: number;
|
|
2372
|
-
cost?: number | undefined;
|
|
2373
|
-
inputTokens?: number | undefined;
|
|
2374
|
-
failed?: true | undefined;
|
|
2375
|
-
} | undefined;
|
|
2376
2346
|
} | undefined;
|
|
2377
2347
|
parts: ({
|
|
2378
2348
|
type: "text";
|
|
@@ -2879,16 +2849,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
2879
2849
|
failed?: boolean | undefined;
|
|
2880
2850
|
} | undefined;
|
|
2881
2851
|
} | undefined;
|
|
2882
|
-
turnEvaluation?: {
|
|
2883
|
-
version: number;
|
|
2884
|
-
mode: "shadow";
|
|
2885
|
-
probabilities: Record<string, number>;
|
|
2886
|
-
latencyMs: number;
|
|
2887
|
-
budgetMs: number;
|
|
2888
|
-
cost?: number | undefined;
|
|
2889
|
-
inputTokens?: number | undefined;
|
|
2890
|
-
failed?: true | undefined;
|
|
2891
|
-
} | undefined;
|
|
2892
2852
|
} | undefined;
|
|
2893
2853
|
parts: ({
|
|
2894
2854
|
type: "text";
|
|
@@ -4093,16 +4053,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4093
4053
|
failed?: boolean | undefined;
|
|
4094
4054
|
} | undefined;
|
|
4095
4055
|
} | undefined;
|
|
4096
|
-
turnEvaluation?: {
|
|
4097
|
-
version: number;
|
|
4098
|
-
mode: "shadow";
|
|
4099
|
-
probabilities: Record<string, number>;
|
|
4100
|
-
latencyMs: number;
|
|
4101
|
-
budgetMs: number;
|
|
4102
|
-
cost?: number | undefined;
|
|
4103
|
-
inputTokens?: number | undefined;
|
|
4104
|
-
failed?: true | undefined;
|
|
4105
|
-
} | undefined;
|
|
4106
4056
|
} | undefined;
|
|
4107
4057
|
parts: ({
|
|
4108
4058
|
type: "text";
|
|
@@ -4609,16 +4559,6 @@ export declare function useChatbotStore(agentId: string): Store<`chatbot-${strin
|
|
|
4609
4559
|
failed?: boolean | undefined;
|
|
4610
4560
|
} | undefined;
|
|
4611
4561
|
} | undefined;
|
|
4612
|
-
turnEvaluation?: {
|
|
4613
|
-
version: number;
|
|
4614
|
-
mode: "shadow";
|
|
4615
|
-
probabilities: Record<string, number>;
|
|
4616
|
-
latencyMs: number;
|
|
4617
|
-
budgetMs: number;
|
|
4618
|
-
cost?: number | undefined;
|
|
4619
|
-
inputTokens?: number | undefined;
|
|
4620
|
-
failed?: true | undefined;
|
|
4621
|
-
} | undefined;
|
|
4622
4562
|
} | undefined;
|
|
4623
4563
|
parts: ({
|
|
4624
4564
|
type: "text";
|
|
@@ -492,52 +492,10 @@ export type UIChatMessageMetadata = {
|
|
|
492
492
|
* organization ({@link withoutToolCatalogue}).
|
|
493
493
|
*/
|
|
494
494
|
toolCatalogue?: ToolCatalogueRecord;
|
|
495
|
-
/**
|
|
496
|
-
* The evaluation of the turn after the reply (spec post-turn-evaluation):
|
|
497
|
-
* a probability per question. Written after the answer, and removed from
|
|
498
|
-
* a public read ({@link withoutTurnEvaluation}).
|
|
499
|
-
*/
|
|
500
|
-
turnEvaluation?: TurnEvaluationRecord;
|
|
501
|
-
};
|
|
502
|
-
/**
|
|
503
|
-
* The questions of the post-turn evaluation, in the order they are asked and
|
|
504
|
-
* listed. The backend's questions are typed against it, so the two cannot
|
|
505
|
-
* drift. A reader orders by this list and not by the record: jsonb keeps the
|
|
506
|
-
* keys of an object sorted by length, not in the order they were written.
|
|
507
|
-
*/
|
|
508
|
-
export declare const TURN_EVALUATION_QUESTION_IDS: readonly ["durableFact", "abusive", "manipulation", "asksHuman", "missingInfo", "informationGap"];
|
|
509
|
-
export type TurnEvaluationQuestionId = (typeof TURN_EVALUATION_QUESTION_IDS)[number];
|
|
510
|
-
/**
|
|
511
|
-
* The evaluation model's answers on a finished turn (spec
|
|
512
|
-
* post-turn-evaluation, F1). Recorded in shadow only: nothing reads it yet.
|
|
513
|
-
*/
|
|
514
|
-
export type TurnEvaluationRecord = {
|
|
515
|
-
/**
|
|
516
|
-
* The wording of the questions: a threshold holds only for the wording
|
|
517
|
-
* it was measured on, so a record says which one it answered.
|
|
518
|
-
*/
|
|
519
|
-
version: number;
|
|
520
|
-
mode: 'shadow';
|
|
521
|
-
/** Probability per question, two decimals. Empty when the request failed. */
|
|
522
|
-
probabilities: Record<string, number>;
|
|
523
|
-
latencyMs: number;
|
|
524
|
-
budgetMs: number;
|
|
525
|
-
/** Market cost of the request in USD. */
|
|
526
|
-
cost?: number;
|
|
527
|
-
inputTokens?: number;
|
|
528
|
-
/** The request failed or ran past its budget: no answer was recorded. */
|
|
529
|
-
failed?: true;
|
|
530
495
|
};
|
|
531
496
|
export type UIChatMessage = UIMessage & {
|
|
532
497
|
metadata?: UIChatMessageMetadata;
|
|
533
498
|
};
|
|
534
|
-
/**
|
|
535
|
-
* The history without the turn evaluations, for a public read: a probability
|
|
536
|
-
* of abuse on a user must not reach the widget. Kept apart from
|
|
537
|
-
* {@link withoutToolCatalogue}, which the data export uses too, because
|
|
538
|
-
* whether the export includes this judgment is still to be decided.
|
|
539
|
-
*/
|
|
540
|
-
export declare function withoutTurnEvaluation(messages: UIChatMessage[]): UIChatMessage[];
|
|
541
499
|
/**
|
|
542
500
|
* The history without the tool catalogue records, for a reader outside the
|
|
543
501
|
* organization (a public chat read, the data export): a record names every
|
|
@@ -118,8 +118,6 @@ declare const WebDocumentSourceSchema: z.ZodObject<{
|
|
|
118
118
|
extractionInputHash: z.ZodOptional<z.ZodString>;
|
|
119
119
|
finalUrl: z.ZodOptional<z.ZodString>;
|
|
120
120
|
sourceId: z.ZodOptional<z.ZodUUID>;
|
|
121
|
-
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
122
|
-
lastmod: z.ZodOptional<z.ZodString>;
|
|
123
121
|
}, z.core.$strip>;
|
|
124
122
|
/**
|
|
125
123
|
* `metadata.source`, discriminated on `provider`.
|
|
@@ -151,8 +149,6 @@ export declare const DocumentSourceSchema: z.ZodPreprocess<z.ZodDiscriminatedUni
|
|
|
151
149
|
extractionInputHash: z.ZodOptional<z.ZodString>;
|
|
152
150
|
finalUrl: z.ZodOptional<z.ZodString>;
|
|
153
151
|
sourceId: z.ZodOptional<z.ZodUUID>;
|
|
154
|
-
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
155
|
-
lastmod: z.ZodOptional<z.ZodString>;
|
|
156
152
|
}, z.core.$strip>, z.ZodObject<{
|
|
157
153
|
contentHash: z.ZodOptional<z.ZodString>;
|
|
158
154
|
lastRefresh: z.ZodOptional<z.ZodObject<{
|
|
@@ -428,14 +424,6 @@ export interface DocumentProcessingJob {
|
|
|
428
424
|
* that really did get shorter, so the guard would only stand in their way.
|
|
429
425
|
*/
|
|
430
426
|
guarded?: boolean;
|
|
431
|
-
/**
|
|
432
|
-
* The web source whose sitemap asked for this early refresh. Nobody is
|
|
433
|
-
* watching it either, so it enforces the shrink guard; and it is void if
|
|
434
|
-
* the page no longer belongs to that source, which is what editing its text
|
|
435
|
-
* by hand does. Not `guarded`, which also voids a page without a trigger:
|
|
436
|
-
* a source reads its pages whether they have one or not.
|
|
437
|
-
*/
|
|
438
|
-
sourceId?: string;
|
|
439
427
|
}
|
|
440
428
|
/**
|
|
441
429
|
* Metadata structure for document.metadata column
|
|
@@ -459,8 +447,6 @@ export declare const DocumentMetadataSchema: z.ZodObject<{
|
|
|
459
447
|
extractionInputHash: z.ZodOptional<z.ZodString>;
|
|
460
448
|
finalUrl: z.ZodOptional<z.ZodString>;
|
|
461
449
|
sourceId: z.ZodOptional<z.ZodUUID>;
|
|
462
|
-
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
463
|
-
lastmod: z.ZodOptional<z.ZodString>;
|
|
464
450
|
}, z.core.$strip>, z.ZodObject<{
|
|
465
451
|
contentHash: z.ZodOptional<z.ZodString>;
|
|
466
452
|
lastRefresh: z.ZodOptional<z.ZodObject<{
|
|
@@ -897,8 +883,6 @@ export declare const DocumentSchema: z.ZodObject<{
|
|
|
897
883
|
extractionInputHash: z.ZodOptional<z.ZodString>;
|
|
898
884
|
finalUrl: z.ZodOptional<z.ZodString>;
|
|
899
885
|
sourceId: z.ZodOptional<z.ZodUUID>;
|
|
900
|
-
lastSyncedAt: z.ZodOptional<z.ZodString>;
|
|
901
|
-
lastmod: z.ZodOptional<z.ZodString>;
|
|
902
886
|
}, z.core.$strip>, z.ZodObject<{
|
|
903
887
|
contentHash: z.ZodOptional<z.ZodString>;
|
|
904
888
|
lastRefresh: z.ZodOptional<z.ZodObject<{
|
|
@@ -1442,7 +1426,6 @@ export declare const DocumentCreateDtoSchema: z.ZodObject<{
|
|
|
1442
1426
|
pages: z.ZodOptional<z.ZodString>;
|
|
1443
1427
|
priority: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
1444
1428
|
refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof DocumentRefreshInterval>>>;
|
|
1445
|
-
syncSourceId: z.ZodOptional<z.ZodUUID>;
|
|
1446
1429
|
}, z.core.$strip>;
|
|
1447
1430
|
/**
|
|
1448
1431
|
* Document update schema for PUT /documents/:id endpoint
|
|
@@ -39,16 +39,6 @@ export type DocumentFolder = z.infer<typeof DocumentFolderSchema>;
|
|
|
39
39
|
* business, which is why it reads the first segment and stops.
|
|
40
40
|
*/
|
|
41
41
|
export declare function documentFolderProvider(folder: Pick<DocumentFolder, 'externalId'>): DocumentSourceProvider | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* Whether a folder is read-only because a source that owns its documents
|
|
44
|
-
* fills it.
|
|
45
|
-
*
|
|
46
|
-
* Not the same question as `documentFolderProvider`: a web source's folder has
|
|
47
|
-
* a provider, and an icon and a badge that say so, but its pages stay editable
|
|
48
|
-
* and anything can be added to it. The backend answers the same question with
|
|
49
|
-
* `owningSourceCondition`, from the same policy.
|
|
50
|
-
*/
|
|
51
|
-
export declare function documentFolderIsReadOnly(folder: Pick<DocumentFolder, 'externalId'>): boolean;
|
|
52
42
|
export type DocumentFolderCreateDto = z.infer<typeof DocumentFolderCreateDtoSchema>;
|
|
53
43
|
export type DocumentFolderUpdateDto = z.infer<typeof DocumentFolderUpdateDtoSchema>;
|
|
54
44
|
export type DocumentFolderQuerystring = z.infer<typeof DocumentFolderQuerystringSchema>;
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DocumentSourceProvider } from './Document';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
-
/**
|
|
4
|
-
* What a provider's sources do with the documents they bring in.
|
|
5
|
-
*
|
|
6
|
-
* - `materialize`: `download` stores the remote file in a blob and makes a
|
|
7
|
-
* `file` document of it; `url` makes a `url` document and leaves the reading
|
|
8
|
-
* to the processor, so there is nothing to download.
|
|
9
|
-
* - `ownsDocuments`: true makes the source's folder read-only and propagates
|
|
10
|
-
* remote deletions; false only discovers, and the documents stay as
|
|
11
|
-
* editable as anything a person imported.
|
|
12
|
-
*
|
|
13
|
-
* These two values are everything the backend, the sync function and the
|
|
14
|
-
* interface read to decide how a document is created and whether it can be
|
|
15
|
-
* touched by hand. A web source that removes the pages leaving its sitemap does
|
|
16
|
-
* so through an option of that source, not by owning its documents.
|
|
17
|
-
*/
|
|
18
|
-
export interface DocumentSourcePolicy {
|
|
19
|
-
materialize: 'download' | 'url';
|
|
20
|
-
ownsDocuments: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare const DOCUMENT_SOURCE_POLICIES: Record<DocumentSourceProvider, DocumentSourcePolicy>;
|
|
23
|
-
/**
|
|
24
|
-
* Whether a provider's sources govern their documents.
|
|
25
|
-
*
|
|
26
|
-
* An unknown provider counts as owning: the mistake in that direction makes a
|
|
27
|
-
* folder read-only, the other one lets people edit what a job will overwrite.
|
|
28
|
-
*/
|
|
29
|
-
export declare function sourceOwnsDocuments(provider: string): boolean;
|
|
30
3
|
/**
|
|
31
4
|
* How often a source is checked.
|
|
32
5
|
*
|
|
@@ -123,42 +96,8 @@ export declare const DocumentSyncRunStatsSchema: z.ZodObject<{
|
|
|
123
96
|
skippedUnsupported: z.ZodDefault<z.ZodNumber>;
|
|
124
97
|
skippedTooLarge: z.ZodDefault<z.ZodNumber>;
|
|
125
98
|
failed: z.ZodDefault<z.ZodNumber>;
|
|
126
|
-
capped: z.ZodDefault<z.ZodNumber>;
|
|
127
|
-
removalHeld: z.ZodDefault<z.ZodNumber>;
|
|
128
99
|
}, z.core.$strip>;
|
|
129
100
|
export type DocumentSyncRunStats = z.infer<typeof DocumentSyncRunStatsSchema>;
|
|
130
|
-
/**
|
|
131
|
-
* Where a web source reads its pages: a sitemap, or a walk from one page.
|
|
132
|
-
*
|
|
133
|
-
* The same fields as the crawler dialog's two modes, because the source is
|
|
134
|
-
* that dialog's parameters saved.
|
|
135
|
-
*/
|
|
136
|
-
export declare const WebSourceRemoteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
|
-
sitemapUrl: z.ZodURL;
|
|
138
|
-
kind: z.ZodLiteral<"sitemap">;
|
|
139
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
-
startUrl: z.ZodURL;
|
|
141
|
-
maxPages: z.ZodDefault<z.ZodNumber>;
|
|
142
|
-
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
143
|
-
followExternal: z.ZodDefault<z.ZodBoolean>;
|
|
144
|
-
kind: z.ZodLiteral<"depth">;
|
|
145
|
-
}, z.core.$strip>], "kind">;
|
|
146
|
-
export type WebSourceRemote = z.infer<typeof WebSourceRemoteSchema>;
|
|
147
|
-
/**
|
|
148
|
-
* The keys of a web source's `options` that are about the source rather than
|
|
149
|
-
* about converting a page. Everything else in `options` is conversion options,
|
|
150
|
-
* handed to the processor as they are.
|
|
151
|
-
*/
|
|
152
|
-
export declare const WebSourceOptionsSchema: z.ZodObject<{
|
|
153
|
-
refreshInterval: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof DocumentRefreshInterval>>>;
|
|
154
|
-
removeMissing: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
-
confirmedRemovals: z.ZodOptional<z.ZodNumber>;
|
|
156
|
-
}, z.core.$loose>;
|
|
157
|
-
export type WebSourceOptions = z.infer<typeof WebSourceOptionsSchema>;
|
|
158
|
-
/** The `options` keys that never reach the processor as conversion options. */
|
|
159
|
-
export declare const WEB_SOURCE_OWN_OPTION_KEYS: readonly ["refreshInterval", "removeMissing", "confirmedRemovals"];
|
|
160
|
-
/** The URL a web source reads, whichever mode it is in. */
|
|
161
|
-
export declare function webSourceUrl(remote: Record<string, unknown>): string;
|
|
162
101
|
export declare const DocumentSyncSourceSchema: z.ZodObject<{
|
|
163
102
|
id: z.ZodUUID;
|
|
164
103
|
organizationId: z.ZodUUID;
|
|
@@ -184,8 +123,6 @@ export declare const DocumentSyncSourceSchema: z.ZodObject<{
|
|
|
184
123
|
skippedUnsupported: z.ZodDefault<z.ZodNumber>;
|
|
185
124
|
skippedTooLarge: z.ZodDefault<z.ZodNumber>;
|
|
186
125
|
failed: z.ZodDefault<z.ZodNumber>;
|
|
187
|
-
capped: z.ZodDefault<z.ZodNumber>;
|
|
188
|
-
removalHeld: z.ZodDefault<z.ZodNumber>;
|
|
189
126
|
}, z.core.$strip>>;
|
|
190
127
|
lastSyncAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
191
128
|
lastError: z.ZodNullable<z.ZodString>;
|
|
@@ -212,20 +149,13 @@ export declare const DocumentSyncSourceCreateDtoSchema: z.ZodObject<{
|
|
|
212
149
|
remote: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
213
150
|
interval: z.ZodDefault<z.ZodEnum<typeof DocumentSyncInterval>>;
|
|
214
151
|
options: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
215
|
-
deferFirstRun: z.ZodOptional<z.ZodBoolean>;
|
|
216
152
|
}, z.core.$strip>;
|
|
217
153
|
export type DocumentSyncSourceCreateDto = z.infer<typeof DocumentSyncSourceCreateDtoSchema>;
|
|
218
154
|
export declare const DocumentSyncSourceUpdateDtoSchema: z.ZodObject<{
|
|
219
155
|
interval: z.ZodOptional<z.ZodEnum<typeof DocumentSyncInterval>>;
|
|
220
156
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
221
|
-
removeMissing: z.ZodOptional<z.ZodBoolean>;
|
|
222
157
|
}, z.core.$strip>;
|
|
223
158
|
export type DocumentSyncSourceUpdateDto = z.infer<typeof DocumentSyncSourceUpdateDtoSchema>;
|
|
224
|
-
/** "Sync now", optionally approving the removal the last run held back. */
|
|
225
|
-
export declare const DocumentSyncSourceSyncDtoSchema: z.ZodObject<{
|
|
226
|
-
confirmRemovals: z.ZodOptional<z.ZodNumber>;
|
|
227
|
-
}, z.core.$strip>;
|
|
228
|
-
export type DocumentSyncSourceSyncDto = z.infer<typeof DocumentSyncSourceSyncDtoSchema>;
|
|
229
159
|
export declare const DocumentSyncSourceQuerystringSchema: z.ZodObject<{
|
|
230
160
|
agentId: z.ZodUUID;
|
|
231
161
|
}, z.core.$strip>;
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const MAX_FILE_SIZE: number;
|
|
3
3
|
export declare const MIME_TYPE_REGEX: RegExp;
|
|
4
4
|
export declare const SUPPORTED_IMAGE_TYPES: readonly ["image/jpeg", "image/png", "image/gif", "image/webp", "image/svg+xml"];
|
|
5
|
+
export declare const SUPPORTED_DOCUMENT_TYPES: readonly ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "text/plain", "text/markdown"];
|
|
5
6
|
export declare const SUPPORTED_VIDEO_TYPES: readonly ["video/mp4", "video/webm", "video/ogg"];
|
|
6
7
|
export declare const SUPPORTED_AUDIO_TYPES: readonly ["audio/mpeg", "audio/wav", "audio/ogg"];
|
|
7
8
|
export declare enum StoragePolicy {
|
|
@@ -119,9 +119,6 @@ export declare const MemberSchema: z.ZodObject<{
|
|
|
119
119
|
user: "user";
|
|
120
120
|
admin: "admin";
|
|
121
121
|
}>;
|
|
122
|
-
twoFactorEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
-
hasPassword: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
-
hasPasskey: z.ZodOptional<z.ZodBoolean>;
|
|
125
122
|
}, z.core.$strip>;
|
|
126
123
|
}, z.core.$strip>;
|
|
127
124
|
export type Member = z.infer<typeof MemberSchema>;
|