@8wave/ai-elements 0.117.0 → 0.118.0-beta.16
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-DDAyL-4q.js → Agent-D8YrsP52.js} +15 -11
- package/dist/_chunks/Agent-D8YrsP52.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js → PkStreamingMarkdown--CcBvs19.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-D58uGMVJ.js.map → PkStreamingMarkdown--CcBvs19.js.map} +1 -1
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js → PkToolEditSpreadsheet-5vHzEy4P.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-y3S5O_ld.js.map → PkToolEditSpreadsheet-5vHzEy4P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js → PkToolRequestGeolocation-Cj8hTfNF.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-DUD4RaA_.js.map → PkToolRequestGeolocation-Cj8hTfNF.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js → PkToolRequestOAuthConnection-BWxR1hV4.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-ryjE17UY.js.map → PkToolRequestOAuthConnection-BWxR1hV4.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js → PkToolShowArtifact-BVGN7hV2.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-CefFRN9d.js.map → PkToolShowArtifact-BVGN7hV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js → PkToolShowContactForm-Blrwqpl0.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-Q58lENmc.js.map → PkToolShowContactForm-Blrwqpl0.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js → PkToolShowForm-BpGHaN6x.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-DCluttiO.js.map → PkToolShowForm-BpGHaN6x.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js → PkToolShowImageGallery-CIhIrIcY.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-DzU2_qQW.js.map → PkToolShowImageGallery-CIhIrIcY.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js → PkToolShowProductList-BjWKnbyD.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-0P7S5Ywo.js.map → PkToolShowProductList-BjWKnbyD.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js → PkToolShowSources-8c9RvGV1.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-D0IpU1NU.js.map → PkToolShowSources-8c9RvGV1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js → PkToolShowSuggestedReply-0KahUIlw.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-0RVUEzK_.js.map → PkToolShowSuggestedReply-0KahUIlw.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js → PkToolShowVideo-_V_d-PDr.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-C5RfIsFU.js.map → PkToolShowVideo-_V_d-PDr.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js → PkToolShowWebPages-D55VEPjK.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-D-sv52_o.js.map → PkToolShowWebPages-D55VEPjK.js.map} +1 -1
- package/dist/_chunks/{browser-BJcsjj9S.js → browser-CuMi3Hhg.js} +796 -701
- package/dist/_chunks/browser-CuMi3Hhg.js.map +1 -0
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js → chatImagePolicy-DXkhb-N_.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-CiUR4uD1.js.map → chatImagePolicy-DXkhb-N_.js.map} +1 -1
- package/dist/_chunks/{markdown-lpamC2tL.js → markdown-c59ir6tw.js} +4 -3
- package/dist/_chunks/markdown-c59ir6tw.js.map +1 -0
- package/dist/ai-elements.es.js +245 -145
- 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/PkChatbotFeedbackForm.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-dGF8mkG9.js +758 -0
- package/dist-vue/_chunks/{Agent-Bd_4UVe4.js.map → Agent-dGF8mkG9.js.map} +1 -1
- package/dist-vue/_chunks/{Document-BrMThi12.js → Document-B-oyVh7v.js} +219 -218
- package/dist-vue/_chunks/Document-B-oyVh7v.js.map +1 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js +139 -0
- package/dist-vue/_chunks/Media-C6RS-s98.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js → PkChatbot-Cm45hwYw.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-EnNiOHfT.js.map → PkChatbot-Cm45hwYw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js → PkChatbotAuth-BMLLTSwK.js} +78 -78
- package/dist-vue/_chunks/{PkChatbotAuth-DaMi8miP.js.map → PkChatbotAuth-BMLLTSwK.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js → PkChatbotEmptyState-D2dhInfG.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-CeLapjG_.js.map → PkChatbotEmptyState-D2dhInfG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js → PkChatbotFeedbackForm-CMFXjoKR.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotFeedbackForm-BBjQEC_J.js.map → PkChatbotFeedbackForm-CMFXjoKR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js → PkChatbotInput-CQdxFbBR.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-Chu3tBbe.js.map → PkChatbotInput-CQdxFbBR.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js → PkChatbotMessages-coscJcpy.js} +29 -29
- package/dist-vue/_chunks/{PkChatbotMessages-B2_Tpjk6.js.map → PkChatbotMessages-coscJcpy.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js → PkChatbotStepPayload-DnqFluQZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-BMRSMjrw.js.map → PkChatbotStepPayload-DnqFluQZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js → PkChatbotStepToolDetail-BMslY_BG.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-DbAFKTSl.js.map → PkChatbotStepToolDetail-BMslY_BG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js → PkChatbotSteps-7FT6Ju6_.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-CcXw6JiJ.js.map → PkChatbotSteps-7FT6Ju6_.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-eXFjwNkz.js → PkChatbotViewChat-Cko-Cw6c.js} +205 -198
- package/dist-vue/_chunks/PkChatbotViewChat-Cko-Cw6c.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js → PkChatbotViewConversations-DHeFtAfN.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-uaKc5XAv.js.map → PkChatbotViewConversations-DHeFtAfN.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js → PkChatbotViewFiles-gqCumfod.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-53zY5v4R.js.map → PkChatbotViewFiles-gqCumfod.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js → PkChatbotViewProfile-B57VRVaO.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-tUMdwSR1.js.map → PkChatbotViewProfile-B57VRVaO.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js → PkStreamingMarkdown-BtyWXY2k.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-BEya63gY.js.map → PkStreamingMarkdown-BtyWXY2k.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js → PkToolEditSpreadsheet-HAskd6d3.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-Bl6jujR0.js.map → PkToolEditSpreadsheet-HAskd6d3.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js → PkToolRequestGeolocation-BE22qwxB.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-Dh2GZF9r.js.map → PkToolRequestGeolocation-BE22qwxB.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js → PkToolRequestOAuthConnection-GfSalEJG.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-CsVjz0dA.js.map → PkToolRequestOAuthConnection-GfSalEJG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js → PkToolShowArtifact-Ritx54_X.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-DC1baqls.js.map → PkToolShowArtifact-Ritx54_X.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js → PkToolShowContactForm-D30IsZGy.js} +8 -8
- package/dist-vue/_chunks/{PkToolShowContactForm-BXwBUTG-.js.map → PkToolShowContactForm-D30IsZGy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js → PkToolShowDiagram-PEozSAqU.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-CHPPJjrY.js.map → PkToolShowDiagram-PEozSAqU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js → PkToolShowForm-ZmdM9J9x.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-BiAd1nVG.js.map → PkToolShowForm-ZmdM9J9x.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js → PkToolShowImageGallery-Dkjf7Tw_.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-BkvHwtdK.js.map → PkToolShowImageGallery-Dkjf7Tw_.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js → PkToolShowProductList-CsHYM8vl.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-C8ynmJl_.js.map → PkToolShowProductList-CsHYM8vl.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js → PkToolShowSources-CKZkcPLA.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-DgjeP2WK.js.map → PkToolShowSources-CKZkcPLA.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js → PkToolShowSuggestedReply-DjutyiEi.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-Cvfzecie.js.map → PkToolShowSuggestedReply-DjutyiEi.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js → PkToolShowVideo-CKm1fVQs.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-BMBG6A9a.js.map → PkToolShowVideo-CKm1fVQs.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js → PkToolShowWebPages-DLEC9cuh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B64pZeYb.js.map → PkToolShowWebPages-DLEC9cuh.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js → createChatbotApiClient-DSLxswr4.js} +58 -55
- package/dist-vue/_chunks/{createChatbotApiClient-Dv-9sFRF.js.map → createChatbotApiClient-DSLxswr4.js.map} +1 -1
- package/dist-vue/_chunks/{index.es-DWf6im7k.js → index.es-C1u3kP7i.js} +14 -14
- package/dist-vue/_chunks/{index.es-DWf6im7k.js.map → index.es-C1u3kP7i.js.map} +1 -1
- package/dist-vue/_chunks/{schemas-Bt5eFdV0.js → schemas-Bu1lick6.js} +213 -204
- package/dist-vue/_chunks/schemas-Bu1lick6.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-Dmxnn4xV.js → useChatbotStore-rtl-oKqU.js} +22 -22
- package/dist-vue/_chunks/useChatbotStore-rtl-oKqU.js.map +1 -0
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js → utils-fxHiCnzf.js} +2 -2
- package/dist-vue/_chunks/{utils-CGb6Qc_9.js.map → utils-fxHiCnzf.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +97 -7
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +5237 -5073
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/components/src/chat/useWakeupWatch.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +16 -8
- package/dist-vue/packages/models/src/schema/Integration.d.ts +6 -0
- package/dist-vue/packages/models/src/schema/Media.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/Notification.d.ts +94 -0
- package/dist-vue/packages/models/src/schema/Organization.d.ts +35 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-DDAyL-4q.js.map +0 -1
- package/dist/_chunks/browser-BJcsjj9S.js.map +0 -1
- package/dist/_chunks/markdown-lpamC2tL.js.map +0 -1
- package/dist-vue/_chunks/Agent-Bd_4UVe4.js +0 -758
- package/dist-vue/_chunks/Document-BrMThi12.js.map +0 -1
- package/dist-vue/_chunks/Media-Bzv3zEWR.js +0 -135
- package/dist-vue/_chunks/Media-Bzv3zEWR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-eXFjwNkz.js.map +0 -1
- package/dist-vue/_chunks/schemas-Bt5eFdV0.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-Dmxnn4xV.js.map +0 -1
|
@@ -6,6 +6,11 @@ import { ChatbotApiClient } from '../../../composable/src';
|
|
|
6
6
|
* time and then reloads the conversation until the wakeup's turn is in it,
|
|
7
7
|
* which the seed carrying its id proves (the seed and the answer are written
|
|
8
8
|
* together). Then it reads the next one, if the turn scheduled it.
|
|
9
|
+
*
|
|
10
|
+
* While a wakeup waits, the page also tells the server it is in front of the
|
|
11
|
+
* user (Fase 1.2): every 30 seconds while the tab is visible, and at once
|
|
12
|
+
* when it comes back in front, so a round with news mails only a user who
|
|
13
|
+
* is away. A page with no wakeup waiting sends nothing.
|
|
9
14
|
*/
|
|
10
15
|
export declare function useWakeupWatch(options: {
|
|
11
16
|
agentId: () => string;
|
|
@@ -38,6 +38,8 @@ export interface ChatbotApiClient {
|
|
|
38
38
|
getChatWakeup(agentId: string, chatId: string): Promise<ChatWakeupState>;
|
|
39
39
|
/** The user's "Stop" of the chat's pending wakeup. */
|
|
40
40
|
stopChatWakeup(agentId: string, chatId: string): Promise<ChatWakeupState>;
|
|
41
|
+
/** The chat is open in a visible tab: its wakeups mail nothing meanwhile. */
|
|
42
|
+
markChatWakeupPresence(agentId: string, chatId: string): Promise<void>;
|
|
41
43
|
updateChatTitle(agentId: string, chatId: string, title: string): Promise<Chat>;
|
|
42
44
|
deleteChat(agentId: string, chatId: string): Promise<void>;
|
|
43
45
|
getMessageFeedbacks(chatId: string): Promise<MessageFeedback[]>;
|
|
@@ -131,15 +131,23 @@ export declare const REFRESH_INTERVAL_SQL: Record<DocumentRefreshInterval, strin
|
|
|
131
131
|
/**
|
|
132
132
|
* Hours after which a document left `processing` is treated as abandoned.
|
|
133
133
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
134
|
+
* Only a claim writes `processing`, and a worker killed mid-run (heap
|
|
135
|
+
* exhausted, host recycled, revision deactivated) leaves it behind with nothing
|
|
136
|
+
* else to move it. Two timers act on this window: `dlqSweep` marks the document
|
|
137
|
+
* `failed` and tells its owner (`failStaleProcessingDocuments`), and the
|
|
138
|
+
* refresh timer, which otherwise claims only `success` and `failed`, takes a
|
|
139
|
+
* due page anyway.
|
|
138
140
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
+
* Derived from the bound a run cannot outlive: `host.json` leaves
|
|
142
|
+
* `functionTimeout` at its Container Apps default of 30 minutes, past which the
|
|
143
|
+
* host stops the run, and every claim, a redelivery's included, moves
|
|
144
|
+
* `updated_at`. A row whose last claim is an hour old has outlived the longest
|
|
145
|
+
* possible run twice over. The backend claims too, and stays inside the bound:
|
|
146
|
+
* a text edited by hand only rewrites its chunks there (seconds, embeddings go
|
|
147
|
+
* to the queue), and a whole conversion runs inline only with no Service Bus,
|
|
148
|
+
* which is local development, where no function app consumes its documents.
|
|
141
149
|
*/
|
|
142
|
-
export declare const STALE_PROCESSING_HOURS =
|
|
150
|
+
export declare const STALE_PROCESSING_HOURS = 1;
|
|
143
151
|
export declare const DocumentLastRefreshSchema: z.ZodObject<{
|
|
144
152
|
at: z.ZodString;
|
|
145
153
|
result: z.ZodEnum<typeof DocumentRefreshResult>;
|
|
@@ -498,7 +506,7 @@ export type DocumentRefusalReason = (typeof DOCUMENT_REFUSAL_REASONS)[number];
|
|
|
498
506
|
* Why a file is refused for what it is, as `UnprocessableFileError` in the
|
|
499
507
|
* document processor says.
|
|
500
508
|
*/
|
|
501
|
-
export declare const UNPROCESSABLE_FILE_REASONS: readonly ["file-unreadable", "file-protected", "file-type-unsupported", "spreadsheet-protected", "spreadsheet-unreadable", "spreadsheet-macros", "spreadsheet-too-large", "spreadsheet-no-table", "audio-no-speech", "audio-too-large"];
|
|
509
|
+
export declare const UNPROCESSABLE_FILE_REASONS: readonly ["file-unreadable", "file-protected", "file-type-unsupported", "spreadsheet-protected", "spreadsheet-unreadable", "spreadsheet-macros", "spreadsheet-too-large", "spreadsheet-no-table", "audio-no-speech", "audio-too-large", "page-too-large"];
|
|
502
510
|
export type UnprocessableFileReason = (typeof UNPROCESSABLE_FILE_REASONS)[number];
|
|
503
511
|
/** Every `reason` a failed document can carry in `metadata.lastIndexError`. */
|
|
504
512
|
export declare const DOCUMENT_INDEX_ERROR_REASONS: readonly (DocumentRefusalReason | UnprocessableFileReason)[];
|
|
@@ -14,6 +14,12 @@ export declare enum IntegrationProvider {
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const OAUTH_INTEGRATION_PROVIDERS: IntegrationProvider[];
|
|
16
16
|
export declare function isOAuthIntegrationProvider(provider: IntegrationProvider): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Providers that receive the leads the agents collect. A document source is
|
|
19
|
+
* an integration too, enabled like the others, and has nothing to do with a
|
|
20
|
+
* lead: whoever reads the integrations for leads reads these alone.
|
|
21
|
+
*/
|
|
22
|
+
export declare const CRM_INTEGRATION_PROVIDERS: IntegrationProvider[];
|
|
17
23
|
export declare enum IntegrationSyncStatus {
|
|
18
24
|
Pending = "pending",
|
|
19
25
|
Success = "success",
|
|
@@ -26,6 +26,16 @@ export declare const SUPPORTED_VIDEO_TYPES: readonly ["video/mp4", "video/webm",
|
|
|
26
26
|
* `audio/webm`, what a browser records, waits for a test.
|
|
27
27
|
*/
|
|
28
28
|
export declare const SUPPORTED_AUDIO_TYPES: readonly ["audio/mpeg", "audio/mp4", "audio/x-m4a", "audio/aac", "audio/wav", "audio/x-wav", "audio/wave", "audio/ogg", "audio/flac", "audio/x-flac"];
|
|
29
|
+
/**
|
|
30
|
+
* The extension a stored audio of this bare type takes (`.m4a` for
|
|
31
|
+
* `audio/x-m4a`), or undefined for a type the transcription does not read.
|
|
32
|
+
*/
|
|
33
|
+
export declare const audioExtensionFor: (mimeType: string) => string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The type of an audio named with this extension (`audio/ogg` for `.opus`),
|
|
36
|
+
* or undefined for an extension the transcription does not read.
|
|
37
|
+
*/
|
|
38
|
+
export declare const audioMimeTypeFor: (extension: string) => string | undefined;
|
|
29
39
|
/**
|
|
30
40
|
* Whether a file is audio of any kind, read or not: what a channel that does
|
|
31
41
|
* not transcribe has to keep away from the model, since most models refuse an
|
|
@@ -39,6 +49,14 @@ export declare const isAudioFile: (name?: string, mimeType?: string) => boolean;
|
|
|
39
49
|
* `audio/vnd.wave`, `audio/opus`): the model reads the bytes, not the type.
|
|
40
50
|
*/
|
|
41
51
|
export declare const isTranscribableAudio: (name?: string, mimeType?: string) => boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The type a file the transcription reads is handled as (spec
|
|
54
|
+
* `voice-notes-platform-channels.md`, D1): its own without parameters
|
|
55
|
+
* (`audio/ogg; codecs=opus` is `audio/ogg`), or the one its extension names
|
|
56
|
+
* when {@link isTranscribableAudio} took it by the extension. Undefined for a
|
|
57
|
+
* file the transcription does not read.
|
|
58
|
+
*/
|
|
59
|
+
export declare const transcribableAudioType: (name?: string, mimeType?: string) => string | undefined;
|
|
42
60
|
/**
|
|
43
61
|
* What a chat turn made of an audio the user attached (spec
|
|
44
62
|
* `audio-file-transcription.md`, D4), kept on its file part
|
|
@@ -27,6 +27,100 @@ export declare const agentWakeupNotificationGroupKey: (chatId: string) => string
|
|
|
27
27
|
/** One row per organization and admin: the next day's excess bumps it. */
|
|
28
28
|
export declare const headlessQuotaNotificationGroupKey: (organizationId: string) => string;
|
|
29
29
|
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
30
|
+
/**
|
|
31
|
+
* The groups of notifications a user turns on and off in the Notifications
|
|
32
|
+
* section of the profile (docs/specs/notification-preferences.md): the user
|
|
33
|
+
* never sees a `NotificationType`, only these names.
|
|
34
|
+
*/
|
|
35
|
+
export declare const NotificationCategory: {
|
|
36
|
+
readonly AgentReplies: "agent_replies";
|
|
37
|
+
readonly Documents: "documents";
|
|
38
|
+
readonly Integrations: "integrations";
|
|
39
|
+
readonly FlaggedConversations: "flagged_conversations";
|
|
40
|
+
readonly UsageLimits: "usage_limits";
|
|
41
|
+
};
|
|
42
|
+
export type NotificationCategory = (typeof NotificationCategory)[keyof typeof NotificationCategory];
|
|
43
|
+
/** Where a notification reaches the user: the bell of the app, or an email. */
|
|
44
|
+
export declare const NotificationChannel: {
|
|
45
|
+
readonly InApp: "inApp";
|
|
46
|
+
readonly Email: "email";
|
|
47
|
+
};
|
|
48
|
+
export type NotificationChannel = (typeof NotificationChannel)[keyof typeof NotificationChannel];
|
|
49
|
+
export interface NotificationCategoryDefinition {
|
|
50
|
+
types: readonly NotificationType[];
|
|
51
|
+
/**
|
|
52
|
+
* The channels the group has, each with its default. A group without
|
|
53
|
+
* `email` sends no mail, and the profile shows no switch for it.
|
|
54
|
+
*/
|
|
55
|
+
defaults: {
|
|
56
|
+
inApp: boolean;
|
|
57
|
+
email?: boolean;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Shown only to who is owner or admin in at least one organization. A
|
|
61
|
+
* hidden group still applies, with its defaults.
|
|
62
|
+
*/
|
|
63
|
+
adminsOnly: boolean;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Every group with its types, channels and defaults, in the order the profile
|
|
67
|
+
* lists them. A new `NotificationType` joins a group here, or
|
|
68
|
+
* {@link ALWAYS_ON_NOTIFICATION_TYPES}, in the PR that adds it: a test checks
|
|
69
|
+
* that every type is in one of the two.
|
|
70
|
+
*/
|
|
71
|
+
export declare const NOTIFICATION_CATEGORIES: Record<NotificationCategory, NotificationCategoryDefinition>;
|
|
72
|
+
/**
|
|
73
|
+
* Outside the preferences and always delivered: security, and the notices an
|
|
74
|
+
* administrator writes.
|
|
75
|
+
*/
|
|
76
|
+
export declare const ALWAYS_ON_NOTIFICATION_TYPES: readonly NotificationType[];
|
|
77
|
+
/** The group of a notification type, `undefined` for one always delivered. */
|
|
78
|
+
export declare function notificationCategoryOf(type: string): NotificationCategory | undefined;
|
|
79
|
+
export declare const NotificationChannelSettingsSchema: z.ZodObject<{
|
|
80
|
+
inApp: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
email: z.ZodOptional<z.ZodBoolean>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
/**
|
|
84
|
+
* A user's choices by group. Stored as the difference from the defaults, so a
|
|
85
|
+
* default that changes applies to whoever never touched it; the same shape is
|
|
86
|
+
* the body of `PUT /me/notification-settings`, which carries only what changed.
|
|
87
|
+
*/
|
|
88
|
+
export declare const NotificationSettingsOverridesSchema: z.ZodRecord<z.ZodEnum<{
|
|
89
|
+
readonly AgentReplies: "agent_replies";
|
|
90
|
+
readonly Documents: "documents";
|
|
91
|
+
readonly Integrations: "integrations";
|
|
92
|
+
readonly FlaggedConversations: "flagged_conversations";
|
|
93
|
+
readonly UsageLimits: "usage_limits";
|
|
94
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
95
|
+
inApp: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
email: z.ZodOptional<z.ZodBoolean>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
export type NotificationChannelSettings = z.infer<typeof NotificationChannelSettingsSchema>;
|
|
99
|
+
export type NotificationSettingsOverrides = z.infer<typeof NotificationSettingsOverridesSchema>;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a channel of a group is on for a user with these choices: their own
|
|
102
|
+
* choice, or the group's default. Always false on a channel the group lacks.
|
|
103
|
+
*/
|
|
104
|
+
export declare function isNotificationChannelOn(overrides: NotificationSettingsOverrides | null | undefined, category: NotificationCategory, channel: NotificationChannel): boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The stored choices after `changes`: only the ones that differ from the
|
|
107
|
+
* default survive, and a channel the group lacks, or a group that no longer
|
|
108
|
+
* exists, is dropped.
|
|
109
|
+
*/
|
|
110
|
+
export declare function mergeNotificationOverrides(current: NotificationSettingsOverrides | null | undefined, changes: NotificationSettingsOverrides): NotificationSettingsOverrides;
|
|
111
|
+
/** One group as the profile shows it: `email` only where the group has it. */
|
|
112
|
+
export declare const NotificationSettingSchema: z.ZodObject<{
|
|
113
|
+
category: z.ZodEnum<{
|
|
114
|
+
readonly AgentReplies: "agent_replies";
|
|
115
|
+
readonly Documents: "documents";
|
|
116
|
+
readonly Integrations: "integrations";
|
|
117
|
+
readonly FlaggedConversations: "flagged_conversations";
|
|
118
|
+
readonly UsageLimits: "usage_limits";
|
|
119
|
+
}>;
|
|
120
|
+
inApp: z.ZodBoolean;
|
|
121
|
+
email: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
export type NotificationSetting = z.infer<typeof NotificationSettingSchema>;
|
|
30
124
|
/**
|
|
31
125
|
* Group key of the admins' notification about a flagged conversation: one row
|
|
32
126
|
* per chat and admin, bumped by every later analysis of that chat.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AgentBuiltInTool } from './Agent';
|
|
2
|
+
import { IntegrationProvider } from './Integration';
|
|
1
3
|
import { PlatformType } from './Platform';
|
|
2
4
|
import { StoragePolicy } from './Media';
|
|
3
5
|
import * as z from 'zod';
|
|
@@ -258,7 +260,21 @@ export declare enum OrganizationFeature {
|
|
|
258
260
|
ApiTools = "apiTools",
|
|
259
261
|
SubAgents = "subAgents",
|
|
260
262
|
Endpoints = "endpoints",
|
|
261
|
-
|
|
263
|
+
/**
|
|
264
|
+
* One flag per integration provider and not one for all of them, for
|
|
265
|
+
* the same reason as the channels: a contract names the CRM or the
|
|
266
|
+
* document source it includes. See {@link INTEGRATION_PROVIDER_FEATURES}.
|
|
267
|
+
*/
|
|
268
|
+
HubSpot = "hubspot",
|
|
269
|
+
Salesforce = "salesforce",
|
|
270
|
+
SharePoint = "sharepoint",
|
|
271
|
+
/**
|
|
272
|
+
* The leads: the contact form agents show in the chat and the page that
|
|
273
|
+
* lists what it collected. Off, it reaches the runtime too: the form is
|
|
274
|
+
* on by default, and every agent would keep collecting leads nobody can
|
|
275
|
+
* open. See {@link FEATURE_BUILT_IN_TOOLS}.
|
|
276
|
+
*/
|
|
277
|
+
Leads = "leads",
|
|
262
278
|
/**
|
|
263
279
|
* Files attached to chat messages, on every surface of the agent. Like
|
|
264
280
|
* the voice it is switched on inside the agent settings, so the gate is
|
|
@@ -297,6 +313,23 @@ export declare const ORGANIZATION_FEATURE_DEFAULTS: Record<OrganizationFeature,
|
|
|
297
313
|
* connection service refuses it, and the channels page does not offer it.
|
|
298
314
|
*/
|
|
299
315
|
export declare const PLATFORM_CHANNEL_FEATURES: Partial<Record<PlatformType, OrganizationFeature>>;
|
|
316
|
+
/**
|
|
317
|
+
* The feature flag of each integration provider. A full record, so a
|
|
318
|
+
* provider added to the enum does not compile until it has its flag.
|
|
319
|
+
*/
|
|
320
|
+
export declare const INTEGRATION_PROVIDER_FEATURES: Record<IntegrationProvider, OrganizationFeature>;
|
|
321
|
+
/**
|
|
322
|
+
* Built-in tools a feature flag takes away from every agent of the
|
|
323
|
+
* organization, whatever the agent's own settings say. For a tool that is on
|
|
324
|
+
* by default: a gate on the switch that turns it on, like the voice has,
|
|
325
|
+
* would leave it on for every agent that never touched the switch.
|
|
326
|
+
*/
|
|
327
|
+
export declare const FEATURE_BUILT_IN_TOOLS: Partial<Record<OrganizationFeature, AgentBuiltInTool[]>>;
|
|
328
|
+
/**
|
|
329
|
+
* The built-in tools the flags take away. Only a flag explicitly `false`
|
|
330
|
+
* counts, so a caller holding no flags at all takes nothing away.
|
|
331
|
+
*/
|
|
332
|
+
export declare const toolsRemovedByFeatures: (features: Partial<OrganizationFeatures> | undefined) => AgentBuiltInTool[];
|
|
300
333
|
/**
|
|
301
334
|
* Free-form keys AND free-form values on purpose. `z.record(z.enum(...))`
|
|
302
335
|
* rejects unknown keys in zod 4, so a feature dropped from the catalog would
|
|
@@ -439,6 +472,7 @@ export type OrganizationPublic = z.infer<typeof OrganizationPublicSchema>;
|
|
|
439
472
|
*/
|
|
440
473
|
export declare const OrganizationCapabilitiesSchema: z.ZodObject<{
|
|
441
474
|
crm: z.ZodBoolean;
|
|
475
|
+
voice: z.ZodBoolean;
|
|
442
476
|
}, z.core.$strip>;
|
|
443
477
|
export type OrganizationCapabilities = z.infer<typeof OrganizationCapabilitiesSchema>;
|
|
444
478
|
export declare const OrganizationsQuerystringSchema: z.ZodObject<{
|