@sinequa/assistant 3.8.0 → 3.9.0
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/chat/charts/chart/chart.component.d.ts +13 -13
- package/chat/chat-message/chat-message.component.d.ts +85 -81
- package/chat/chat-message/i18n/en.json +11 -0
- package/chat/chat-message/i18n/fr.json +11 -0
- package/chat/chat-reference/chat-reference.component.d.ts +14 -14
- package/chat/chat-reference/i18n/en.json +4 -0
- package/chat/chat-reference/i18n/fr.json +4 -0
- package/chat/chat-settings-v3/chat-settings-v3.component.d.ts +48 -50
- package/chat/chat-settings-v3/i18n/en.json +14 -0
- package/chat/chat-settings-v3/i18n/fr.json +14 -0
- package/chat/chat.component.d.ts +388 -1405
- package/chat/chat.service.d.ts +247 -228
- package/chat/debug-message/debug-message.component.d.ts +17 -17
- package/chat/debug-message/i18n/en.json +3 -0
- package/chat/debug-message/i18n/fr.json +3 -0
- package/chat/dialogs/delete-saved-chat.component.d.ts +22 -0
- package/chat/dialogs/i18n/en.json +19 -0
- package/chat/dialogs/i18n/fr.json +19 -0
- package/chat/dialogs/rename-saved-chat.component.d.ts +21 -0
- package/chat/dialogs/updates.component.d.ts +15 -0
- package/chat/documents-upload/document-list/document-list.component.d.ts +68 -77
- package/chat/documents-upload/document-overview/document-overview.component.d.ts +31 -41
- package/chat/documents-upload/document-upload/document-upload.component.d.ts +96 -98
- package/chat/documents-upload/documents-upload.model.d.ts +66 -66
- package/chat/documents-upload/documents-upload.service.d.ts +170 -174
- package/chat/documents-upload/i18n/en.json +24 -0
- package/chat/documents-upload/i18n/fr.json +24 -0
- package/chat/format-icon/format-icon.component.d.ts +10 -10
- package/chat/format-icon/icons.d.ts +5 -5
- package/chat/i18n/en.json +42 -0
- package/chat/i18n/fr.json +42 -0
- package/chat/index.d.ts +5 -5
- package/chat/initials-avatar/initials-avatar.component.d.ts +35 -35
- package/chat/instance-manager.service.d.ts +28 -28
- package/chat/pipes/message-content.pipe.d.ts +16 -0
- package/chat/prompt.component.d.ts +25 -21
- package/chat/public-api.d.ts +17 -17
- package/chat/references/i18n/en.json +6 -0
- package/chat/references/i18n/fr.json +6 -0
- package/chat/references/inline-image-reference.d.ts +21 -0
- package/chat/references/inline-page-reference.d.ts +21 -0
- package/chat/rest-chat.service.d.ts +31 -33
- package/chat/saved-chats/i18n/en.json +4 -0
- package/chat/saved-chats/i18n/fr.json +4 -0
- package/chat/saved-chats/saved-chats.component.d.ts +30 -36
- package/chat/services/app.service.d.ts +8 -0
- package/chat/services/dialog.service.d.ts +12 -0
- package/chat/services/notification.service.d.ts +10 -0
- package/chat/services/principal.service.d.ts +7 -0
- package/chat/services/search.service.d.ts +7 -0
- package/chat/services/signalR.web.service.d.ts +45 -0
- package/chat/services/ui.service.d.ts +13 -0
- package/chat/services/user-settings.service.d.ts +7 -0
- package/chat/token-progress-bar/i18n/en.json +4 -0
- package/chat/token-progress-bar/i18n/fr.json +4 -0
- package/chat/token-progress-bar/token-progress-bar.component.d.ts +24 -27
- package/chat/tooltip/tooltip.component.d.ts +12 -0
- package/chat/tooltip/tooltip.directive.d.ts +81 -0
- package/chat/types/message-content.types.d.ts +54 -0
- package/chat/types/message-reference.types.d.ts +11 -0
- package/chat/types.d.ts +913 -873
- package/chat/unified-plugins/embedded-image-reference.plugin.d.ts +3 -0
- package/chat/unified-plugins/embedded-page-reference.plugin.d.ts +3 -0
- package/chat/utils/assistant-json.d.ts +2 -0
- package/chat/websocket-chat.service.d.ts +102 -103
- package/esm2022/chat/charts/chart/chart.component.mjs +40 -0
- package/esm2022/chat/chat-message/chat-message.component.mjs +351 -0
- package/esm2022/chat/chat-reference/chat-reference.component.mjs +40 -0
- package/esm2022/chat/chat-settings-v3/chat-settings-v3.component.mjs +118 -0
- package/esm2022/chat/chat.component.mjs +1090 -0
- package/esm2022/chat/chat.service.mjs +417 -0
- package/esm2022/chat/debug-message/debug-message.component.mjs +43 -0
- package/esm2022/chat/dialogs/delete-saved-chat.component.mjs +81 -0
- package/esm2022/chat/dialogs/rename-saved-chat.component.mjs +84 -0
- package/esm2022/chat/dialogs/updates.component.mjs +61 -0
- package/esm2022/chat/documents-upload/document-list/document-list.component.mjs +140 -0
- package/esm2022/chat/documents-upload/document-overview/document-overview.component.mjs +65 -0
- package/esm2022/chat/documents-upload/document-upload/document-upload.component.mjs +256 -0
- package/{esm2020 → esm2022}/chat/documents-upload/documents-upload.model.mjs +1 -1
- package/esm2022/chat/documents-upload/documents-upload.service.mjs +291 -0
- package/{esm2020 → esm2022}/chat/format-icon/format-icon.component.mjs +23 -23
- package/{esm2020 → esm2022}/chat/format-icon/icons.mjs +137 -137
- package/{esm2020 → esm2022}/chat/initials-avatar/initials-avatar.component.mjs +60 -60
- package/esm2022/chat/instance-manager.service.mjs +46 -0
- package/esm2022/chat/pipes/message-content.pipe.mjs +34 -0
- package/esm2022/chat/prompt.component.mjs +88 -0
- package/{esm2020 → esm2022}/chat/public-api.mjs +18 -18
- package/esm2022/chat/references/inline-image-reference.mjs +110 -0
- package/esm2022/chat/references/inline-page-reference.mjs +110 -0
- package/esm2022/chat/rest-chat.service.mjs +296 -0
- package/esm2022/chat/saved-chats/saved-chats.component.mjs +82 -0
- package/esm2022/chat/services/app.service.mjs +19 -0
- package/esm2022/chat/services/dialog.service.mjs +40 -0
- package/esm2022/chat/services/notification.service.mjs +25 -0
- package/esm2022/chat/services/principal.service.mjs +16 -0
- package/esm2022/chat/services/search.service.mjs +13 -0
- package/esm2022/chat/services/signalR.web.service.mjs +79 -0
- package/esm2022/chat/services/ui.service.mjs +61 -0
- package/esm2022/chat/services/user-settings.service.mjs +22 -0
- package/{esm2020 → esm2022}/chat/sinequa-assistant-chat.mjs +4 -4
- package/esm2022/chat/token-progress-bar/token-progress-bar.component.mjs +52 -0
- package/esm2022/chat/tooltip/tooltip.component.mjs +44 -0
- package/esm2022/chat/tooltip/tooltip.directive.mjs +203 -0
- package/esm2022/chat/types/message-content.types.mjs +2 -0
- package/esm2022/chat/types/message-reference.types.mjs +2 -0
- package/esm2022/chat/types.mjs +130 -0
- package/esm2022/chat/unified-plugins/embedded-image-reference.plugin.mjs +57 -0
- package/esm2022/chat/unified-plugins/embedded-page-reference.plugin.mjs +57 -0
- package/esm2022/chat/utils/assistant-json.mjs +12 -0
- package/esm2022/chat/websocket-chat.service.mjs +654 -0
- package/{esm2020 → esm2022}/public-api.mjs +2 -2
- package/{esm2020 → esm2022}/sinequa-assistant.mjs +4 -4
- package/fesm2022/sinequa-assistant-chat.mjs +5340 -0
- package/fesm2022/sinequa-assistant-chat.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/sinequa-assistant.mjs +3 -3
- package/index.d.ts +5 -5
- package/package.json +52 -25
- package/public-api.d.ts +1 -1
- package/chat/messages/de.d.ts +0 -4
- package/chat/messages/en.d.ts +0 -4
- package/chat/messages/fr.d.ts +0 -4
- package/chat/messages/index.d.ts +0 -4
- package/esm2020/chat/charts/chart/chart.component.mjs +0 -40
- package/esm2020/chat/chat-message/chat-message.component.mjs +0 -263
- package/esm2020/chat/chat-reference/chat-reference.component.mjs +0 -40
- package/esm2020/chat/chat-settings-v3/chat-settings-v3.component.mjs +0 -117
- package/esm2020/chat/chat.component.mjs +0 -1069
- package/esm2020/chat/chat.service.mjs +0 -333
- package/esm2020/chat/debug-message/debug-message.component.mjs +0 -43
- package/esm2020/chat/documents-upload/document-list/document-list.component.mjs +0 -191
- package/esm2020/chat/documents-upload/document-overview/document-overview.component.mjs +0 -80
- package/esm2020/chat/documents-upload/document-upload/document-upload.component.mjs +0 -258
- package/esm2020/chat/documents-upload/documents-upload.service.mjs +0 -289
- package/esm2020/chat/instance-manager.service.mjs +0 -46
- package/esm2020/chat/messages/de.mjs +0 -4
- package/esm2020/chat/messages/en.mjs +0 -4
- package/esm2020/chat/messages/fr.mjs +0 -4
- package/esm2020/chat/messages/index.mjs +0 -9
- package/esm2020/chat/prompt.component.mjs +0 -88
- package/esm2020/chat/rest-chat.service.mjs +0 -241
- package/esm2020/chat/saved-chats/saved-chats.component.mjs +0 -175
- package/esm2020/chat/token-progress-bar/token-progress-bar.component.mjs +0 -54
- package/esm2020/chat/types.mjs +0 -112
- package/esm2020/chat/websocket-chat.service.mjs +0 -641
- package/fesm2015/sinequa-assistant-chat.mjs +0 -4200
- package/fesm2015/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant-chat.mjs +0 -4171
- package/fesm2020/sinequa-assistant-chat.mjs.map +0 -1
- package/fesm2020/sinequa-assistant.mjs +0 -9
- package/fesm2020/sinequa-assistant.mjs.map +0 -1
- /package/{fesm2015 → fesm2022}/sinequa-assistant.mjs.map +0 -0
|
@@ -1,174 +1,170 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* -
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* - * `
|
|
67
|
-
* - * `
|
|
68
|
-
*
|
|
69
|
-
* - `
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* - * `
|
|
105
|
-
* - * `
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* - * `
|
|
124
|
-
* - * `
|
|
125
|
-
* - * `
|
|
126
|
-
* - * `
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* @
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
*
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
*
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
convertBytesToMB(bytes: number): number;
|
|
172
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentsUploadService, never>;
|
|
173
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentsUploadService>;
|
|
174
|
-
}
|
|
1
|
+
import { ChatService } from '../chat.service';
|
|
2
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
+
import { deleteDocumentsResponse, IndexingInfos, UploadConfig, UploadedDocuments, UploadEvent } from './documents-upload.model';
|
|
4
|
+
import { HttpClient } from '@angular/common/http';
|
|
5
|
+
import { AppService } from '../services/app.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class DocumentsUploadService {
|
|
8
|
+
/** Name of the assistant plugin. */
|
|
9
|
+
REQUEST_URL: string;
|
|
10
|
+
/** Documents' upload configuration. */
|
|
11
|
+
uploadConfig$: BehaviorSubject<UploadConfig | undefined>;
|
|
12
|
+
chatService: ChatService;
|
|
13
|
+
appService: AppService;
|
|
14
|
+
http: HttpClient;
|
|
15
|
+
/**
|
|
16
|
+
* Initializes the file upload service with the provided chat service instance.
|
|
17
|
+
*
|
|
18
|
+
* @param chatService - An instance of ChatService. If not provided, an error is thrown.
|
|
19
|
+
* @throws {Error} If the chatService instance is not provided or if there is an error during initialization.
|
|
20
|
+
*/
|
|
21
|
+
init(chatService: ChatService | undefined): void;
|
|
22
|
+
/**
|
|
23
|
+
* Fetch the endpoint to use for the file upload related requests
|
|
24
|
+
* @throws {Error} If the property 'restEndpoint' is not provided in the assistant configuration
|
|
25
|
+
*/
|
|
26
|
+
getRequestsUrl(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the upload configuration for documents.
|
|
29
|
+
* The response, which contains the upload configuration, is emitted to the `uploadConfig$` observable.
|
|
30
|
+
*
|
|
31
|
+
* @throws {Error} If there is an error invoking the `documentsUploadConfigGet` action.
|
|
32
|
+
*/
|
|
33
|
+
getUploadConfig(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Uploads documents to the server.
|
|
36
|
+
*
|
|
37
|
+
* This method takes a FormData object which should contain all files to be uploaded.
|
|
38
|
+
* Each file should be appended to the FormData object with its original name.
|
|
39
|
+
*
|
|
40
|
+
* For example:
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const formData = new FormData();
|
|
43
|
+
* formData.append(file.name, file.file);
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @param formData - The FormData object containing the files to be uploaded.
|
|
47
|
+
* - Each file should be appended to the FormData object with its original name.
|
|
48
|
+
* For example:
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const formData = new FormData();
|
|
51
|
+
* formData.append(file.name, file.file);
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @param enableProgress - (Optional) A boolean parameter that controls whether progress reporting is enabled.
|
|
55
|
+
* - Defaults to `true`.
|
|
56
|
+
* - If `true`, the `reportProgress` option is set in the request options, enabling the track of upload progress based on the underlying browser's progress events.
|
|
57
|
+
* - If `false`, progress events are not reported.
|
|
58
|
+
*
|
|
59
|
+
* @returns An Observable that emits events of type `UploadEvent`:
|
|
60
|
+
* - `UploadProgressEvent`: Emitted during the upload process, containing:
|
|
61
|
+
* - * `type`: "uploadProgress" - The type of the event.
|
|
62
|
+
* - * `loaded`: number - The number of bytes uploaded so far.
|
|
63
|
+
* - * `total`: number - The total number of bytes to be uploaded (if available).
|
|
64
|
+
* - * `progress`: number - The percentage of upload progress (calculated as `(loaded / total) * 100`).
|
|
65
|
+
* - `UploadResponseEvent`: Emitted when the upload is complete, containing:
|
|
66
|
+
* - * `type`: "response" - The type of the event.
|
|
67
|
+
* - * `body`: `UploadResponse` - The server's response, including:
|
|
68
|
+
* - * - * `statusToken`: string - A token to track the status of the indexing process.
|
|
69
|
+
* - * - * `executionTime`: string - The time taken to execute the upload.
|
|
70
|
+
* - * - * `connectorResponse` (optional): Additional response data from the connector, containing:
|
|
71
|
+
* - * - * - * `collection`: string - The collection name.
|
|
72
|
+
* - * - * - * `action`: string - The action performed.
|
|
73
|
+
* - * - * - * `stats`: object - Statistics about the upload, including:
|
|
74
|
+
* - * - * - * - * `nbDocUpdated`: number - The number of documents updated.
|
|
75
|
+
*
|
|
76
|
+
* @throws {Error} If there is an error invoking the `documentsupload` action.
|
|
77
|
+
*
|
|
78
|
+
* Example usage:
|
|
79
|
+
* ```typescript
|
|
80
|
+
* const formData = new FormData();
|
|
81
|
+
* formData.append(file.name, file.file);
|
|
82
|
+
* this.documentsUploadService.uploadDocuments(formData).subscribe(event => {
|
|
83
|
+
* if (event.type === 'uploadProgress') {
|
|
84
|
+
* console.log(`Progress: ${event.progress}%`);
|
|
85
|
+
* } else if (event.type === 'response') {
|
|
86
|
+
* console.log('Upload complete:', event.body);
|
|
87
|
+
* }
|
|
88
|
+
* });
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
uploadDocuments(formData: FormData, enableProgress?: boolean): Observable<UploadEvent>;
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves the indexing status of a predefined uploaded document(s)
|
|
94
|
+
* based on the provided status token returned from the upload process.
|
|
95
|
+
*
|
|
96
|
+
* @param token - The status token used to track the indexing process.
|
|
97
|
+
* @returns An Observable that emits the server response of type `IndexingResponse`.
|
|
98
|
+
* The `IndexingResponse` object contains:
|
|
99
|
+
* - `docs`: array - An array of document status objects, each containing:
|
|
100
|
+
* - * `id`: string - The document ID.
|
|
101
|
+
* - * `fileName`: string - The name of the file.
|
|
102
|
+
* - * `operation`: "Add" | "Update" - The operation performed on the document.
|
|
103
|
+
* - * `status`: "Indexing" | "Indexed" | "Error" - The status of the document.
|
|
104
|
+
* - * `previousIndexationTime`: string | null - The previous indexation time.
|
|
105
|
+
* - * `currentIndexationTime`: string | null - The current indexation time.
|
|
106
|
+
* - `executionTime`: string - The time taken to retrieve the indexing status.
|
|
107
|
+
* @throws {Error} If there is an error invoking the `documentsUploadStatus` action.
|
|
108
|
+
*/
|
|
109
|
+
getIndexingStatus(token: string): Observable<IndexingInfos>;
|
|
110
|
+
/**
|
|
111
|
+
* Retrieves a list of uploaded documents.
|
|
112
|
+
*
|
|
113
|
+
* @param {string[]} [columns] - Optional array of additional index columns to include for each document.
|
|
114
|
+
* @param {number} [skip] - Optional number of documents to skip for pagination. If set, count also needs to be set. No skip if not set.
|
|
115
|
+
* @param {number} [count] - Optional number of documents to take for pagination (unlimited if not set).
|
|
116
|
+
* @returns {Observable<UploadedDocuments>} An observable that emits the list of uploaded documents.
|
|
117
|
+
* The `UploadedDocuments` object contains:
|
|
118
|
+
* - `docs`: array - An array of objects representing a single document with the following properties:
|
|
119
|
+
* - * `id`: string - A unique identifier for the document.
|
|
120
|
+
* - * `fileName`: string - The name of the file.
|
|
121
|
+
* - * `title`: string - The title of the document.
|
|
122
|
+
* - * `fileExt`: string - The file extension of the document.
|
|
123
|
+
* - * `indexationTime`: string - The time when the document was indexed.
|
|
124
|
+
* - * `size`: number - The size of the document.
|
|
125
|
+
* - * `sizeDisplay`: string - A human-readable representation of the document size.
|
|
126
|
+
* - * `[key: string]`: any - Additional columns asked in the request, value of the column for the document.
|
|
127
|
+
* - `count`: number - The count of documents in the current batch or subset.
|
|
128
|
+
* - `totalCount`: number - The total count of documents available.
|
|
129
|
+
* - `executionTime`: string - The time taken to process the documents.
|
|
130
|
+
* @throws {Error} Throws an error if the request fails.
|
|
131
|
+
*/
|
|
132
|
+
getDocumentsList(columns?: string[], skip?: number, count?: number): Observable<UploadedDocuments>;
|
|
133
|
+
/**
|
|
134
|
+
* Deletes the uploaded documents with the specified IDs.
|
|
135
|
+
*
|
|
136
|
+
* @param docIds - An array of document IDs to delete.
|
|
137
|
+
* @returns An observable that emits the server response of type `deleteDocumentsResponse`.
|
|
138
|
+
* The `deleteDocumentsResponse` object contains:
|
|
139
|
+
* - `deletedCount`: number - The number of deleted documents.
|
|
140
|
+
* - `executionTime`: string - The time taken to delete the documents.
|
|
141
|
+
* @throws {Error} If there is an error invoking the `documentsDelete` action.
|
|
142
|
+
*/
|
|
143
|
+
deleteDocuments(docIds: string[]): Observable<deleteDocumentsResponse>;
|
|
144
|
+
/**
|
|
145
|
+
* Deletes all uploaded documents.
|
|
146
|
+
*
|
|
147
|
+
* @returns An observable that emits the server response of type `deleteDocumentsResponse`.
|
|
148
|
+
* The `deleteDocumentsResponse` object contains:
|
|
149
|
+
* - `deletedCount`: number - The number of deleted documents.
|
|
150
|
+
* - `executionTime`: string - The time taken to delete the documents.
|
|
151
|
+
* @throws {Error} If there is an error invoking the `documentsDeleteAll` action.
|
|
152
|
+
*/
|
|
153
|
+
deleteAllDocuments(): Observable<deleteDocumentsResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Formats the given file size in bytes into a human-readable string.
|
|
156
|
+
*
|
|
157
|
+
* @param bytes - The size of the file in bytes.
|
|
158
|
+
* @returns A string representing the file size in a human-readable format (e.g., "10.24 KB", "1.00 MB").
|
|
159
|
+
*/
|
|
160
|
+
formatFileSize(bytes: number): string;
|
|
161
|
+
/**
|
|
162
|
+
* Converts the given file size in bytes into megabytes.
|
|
163
|
+
*
|
|
164
|
+
* @param bytes - The size of the file in bytes.
|
|
165
|
+
* @returns The size of the file in megabytes.
|
|
166
|
+
*/
|
|
167
|
+
convertBytesToMB(bytes: number): number;
|
|
168
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DocumentsUploadService, never>;
|
|
169
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DocumentsUploadService>;
|
|
170
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cancel": "Cancel",
|
|
3
|
+
"confirm": "Confirm",
|
|
4
|
+
"delete": "Delete",
|
|
5
|
+
"deleteDocumentText": "You are about to delete the document '{{title}}'. Do you want to continue ?",
|
|
6
|
+
"deleteDocumentSuccess": "The document '{{title}}' has been successfully deleted.",
|
|
7
|
+
"deleteDocumentError": "An error occurred while deleting the document '{{title}}'.",
|
|
8
|
+
"deleteAllDocumentsText": "You are about to delete all the documents. Do you want to continue ?",
|
|
9
|
+
"deleteAllDocumentsSuccess": "All documents have been successfully deleted.",
|
|
10
|
+
"deleteAllDocumentsError": "An error occurred while deleting all documents.",
|
|
11
|
+
"uploadedDocuments": "{count, plural,=0 {No documents uploaded} one {# uploaded document} other {# uploaded documents}}",
|
|
12
|
+
"uploadToSources": "Upload to sources",
|
|
13
|
+
"dragAndDrop": "Drag and drop files here or",
|
|
14
|
+
"clickToBrowse": "click to browse",
|
|
15
|
+
"dropFiles": "Drop files here",
|
|
16
|
+
"uploadingFiles": "{count, plural, one {Uploading # file} other {Uploading # files}}",
|
|
17
|
+
"indexingFiles": "{count, plural, one {Indexing # file} other {Indexing # files}}",
|
|
18
|
+
"upload": "Upload",
|
|
19
|
+
"filesNumberLimitExceeded": "The number of files exceeds the allowed limit. You can upload up to {{max}} files.",
|
|
20
|
+
"filesSizeLimitExceeded": "The total size of the files exceeds the allowed limit. You can upload files up to {{max}} MB.",
|
|
21
|
+
"fileExtensionUnsupported": "The file extension {{extension}} is not supported.",
|
|
22
|
+
"errorUploadingFiles": "An error occurred while uploading the files.",
|
|
23
|
+
"errorIndexingStatus": "Error retrieving indexing status."
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cancel": "Annuler",
|
|
3
|
+
"confirm": "Confirmer",
|
|
4
|
+
"delete": "Supprimer",
|
|
5
|
+
"deleteDocumentText": "Vous êtes sur le point de supprimer le document '{{title}}'. Voulez-vous continuer ?",
|
|
6
|
+
"deleteDocumentSuccess": "Le document '{{title}}' a été supprimé avec succès.",
|
|
7
|
+
"deleteDocumentError": "Une erreur s'est produite lors de la suppression du document '{{title}}'.",
|
|
8
|
+
"deleteAllDocumentsText": "Vous êtes sur le point de supprimer tous les documents. Voulez-vous continuer ?",
|
|
9
|
+
"deleteAllDocumentsSuccess": "Tous les documents ont été supprimés avec succès.",
|
|
10
|
+
"deleteAllDocumentsError": "Une erreur s'est produite lors de la suppression de tous les documents.",
|
|
11
|
+
"uploadedDocuments": "{count, plural, =0 {Aucun document téléversé} one {# document téléversé} other {# documents téléversés}}",
|
|
12
|
+
"uploadToSources": "Téléverser vers les sources",
|
|
13
|
+
"dragAndDrop": "Glisser-déposer des fichiers ici ou",
|
|
14
|
+
"clickToBrowse": "cliquer pour parcourir",
|
|
15
|
+
"dropFiles": "Déposer des fichiers ici",
|
|
16
|
+
"uploadingFiles": "{count, plural, one {Téléversement de # fichier} other {Téléversement de # fichiers}}",
|
|
17
|
+
"indexingFiles": "{count, plural, one {Indexation de # fichier} other {Indexation de # fichiers}}",
|
|
18
|
+
"upload": "Téléverser",
|
|
19
|
+
"filesNumberLimitExceeded": "Le nombre de fichiers dépasse la limite autorisée. Vous pouvez téléverser jusqu'à {{max}} fichiers.",
|
|
20
|
+
"filesSizeLimitExceeded": "La taille totale des fichiers dépasse la limite autorisée. Vous pouvez téléverser des fichiers jusqu'à {{max}} Mo.",
|
|
21
|
+
"fileExtensionUnsupported": "L'extension de fichier {{extension}} n'est pas prise en charge.",
|
|
22
|
+
"errorUploadingFiles": "Une erreur s'est produite lors du téléversement des fichiers.",
|
|
23
|
+
"errorIndexingStatus": "Erreur lors de la récupération de l'état d'indexation."
|
|
24
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { OnChanges } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class FormatIconComponent implements OnChanges {
|
|
4
|
-
extension: string;
|
|
5
|
-
private _formatIcons;
|
|
6
|
-
icon: string;
|
|
7
|
-
ngOnChanges(): void;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormatIconComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormatIconComponent, "sq-format-icon", never, { "extension": "extension"; }, {}, never, never, true>;
|
|
10
|
-
}
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class FormatIconComponent implements OnChanges {
|
|
4
|
+
extension: string;
|
|
5
|
+
private _formatIcons;
|
|
6
|
+
icon: string;
|
|
7
|
+
ngOnChanges(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormatIconComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormatIconComponent, "sq-format-icon", never, { "extension": { "alias": "extension"; "required": false; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface IconFormat {
|
|
2
|
-
icon: string;
|
|
3
|
-
color?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare const defaultFormatIcons: Record<string, IconFormat>;
|
|
1
|
+
export interface IconFormat {
|
|
2
|
+
icon: string;
|
|
3
|
+
color?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const defaultFormatIcons: Record<string, IconFormat>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tryAgain": "Try again",
|
|
3
|
+
"loading": "Loading…",
|
|
4
|
+
"askSomething": "Ask something",
|
|
5
|
+
"sendMessage": "Send message",
|
|
6
|
+
"cancelEdition": "Cancel edition",
|
|
7
|
+
"generating": "Generating",
|
|
8
|
+
"stopping": "Stopping",
|
|
9
|
+
"stopGeneration": "Stop generation",
|
|
10
|
+
"issueType": "Issue type",
|
|
11
|
+
"chooseIssueType": "Choose an issue type",
|
|
12
|
+
"askUnlikeReasons": "What was unsatisfying about this response? (optional)",
|
|
13
|
+
"askLikeReasons": "What did you like about this response? (optional)",
|
|
14
|
+
"writeComment": "Write your comment",
|
|
15
|
+
"send": "Send",
|
|
16
|
+
"doNotSend": "Do not send report",
|
|
17
|
+
"userInterfaceBug": "User interface bug",
|
|
18
|
+
"incorrectResponse": "Incorrect or misleading response",
|
|
19
|
+
"incompleteResponse": "Incomplete response",
|
|
20
|
+
"technicalIssue": "Technical issue",
|
|
21
|
+
"privacyDataSecurityIssue": "Privacy or data security issue",
|
|
22
|
+
"otherIssue": "Other issue",
|
|
23
|
+
"sendReportNotification": "Your report has been successfully sent",
|
|
24
|
+
"today": "Today",
|
|
25
|
+
"yesterday": "Yesterday",
|
|
26
|
+
"thisWeek": "This week",
|
|
27
|
+
"lastWeek": "Last week",
|
|
28
|
+
"thisMonth": "This month",
|
|
29
|
+
"lastMonth": "Last month",
|
|
30
|
+
"thisQuarter": "This quarter",
|
|
31
|
+
"lastQuarter": "Last quarter",
|
|
32
|
+
"thisYear": "This year",
|
|
33
|
+
"lastYear": "Last year",
|
|
34
|
+
"clipboard": {
|
|
35
|
+
"success": "\"{{value}}\" has been copied in the clipboard.",
|
|
36
|
+
"fail": "Failed to copy."
|
|
37
|
+
},
|
|
38
|
+
"saveChatConfig": {
|
|
39
|
+
"success": "Assistant {{value}} instance configuration has been successfully updated.",
|
|
40
|
+
"fail": "Assistant {{value}} instance configuration update failed."
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tryAgain": "Réessayer",
|
|
3
|
+
"loading": "Chargement…",
|
|
4
|
+
"askSomething": "Posez une question",
|
|
5
|
+
"sendMessage": "Envoyer le message",
|
|
6
|
+
"cancelEdition": "Annuler l'édition",
|
|
7
|
+
"generating": "Génération",
|
|
8
|
+
"stopping": "Arrêt",
|
|
9
|
+
"stopGeneration": "Arrêter la génération",
|
|
10
|
+
"issueType": "Type de problème",
|
|
11
|
+
"chooseIssueType": "Choisissez un type de problème",
|
|
12
|
+
"askUnlikeReasons": "Qu'est-ce qui n'était pas satisfaisant dans cette réponse? (optionnel)",
|
|
13
|
+
"askLikeReasons": "Qu'avez-vous aimé dans cette réponse? (optionnel)",
|
|
14
|
+
"writeComment": "Écrivez votre commentaire",
|
|
15
|
+
"send": "Envoyer",
|
|
16
|
+
"doNotSend": "Ne pas envoyer le rapport",
|
|
17
|
+
"userInterfaceBug": "Problème de l'interface utilisateur",
|
|
18
|
+
"incorrectResponse": "Réponse incorrecte ou trompeuse",
|
|
19
|
+
"incompleteResponse": "Réponse incomplète",
|
|
20
|
+
"technicalIssue": "Problème technique",
|
|
21
|
+
"privacyDataSecurityIssue": "Problème de confidentialité ou de sécurité des données",
|
|
22
|
+
"otherIssue": "Autre problème",
|
|
23
|
+
"sendReportNotification": "Votre rapport a été envoyé avec succès",
|
|
24
|
+
"today": "Aujourd'hui",
|
|
25
|
+
"yesterday": "Hier",
|
|
26
|
+
"thisWeek": "Cette semaine",
|
|
27
|
+
"lastWeek": "La semaine dernière",
|
|
28
|
+
"thisMonth": "Ce mois-ci",
|
|
29
|
+
"lastMonth": "Le mois dernier",
|
|
30
|
+
"thisQuarter": "Ce trimestre",
|
|
31
|
+
"lastQuarter": "Le trimestre dernier",
|
|
32
|
+
"thisYear": "Cette année",
|
|
33
|
+
"lastYear": "L'année dernière",
|
|
34
|
+
"clipboard": {
|
|
35
|
+
"success": "\"{{value}}\" copié dans le presse-papiers.",
|
|
36
|
+
"fail": "Échec de la copie."
|
|
37
|
+
},
|
|
38
|
+
"saveChatConfig": {
|
|
39
|
+
"success": "La configuration d'instance de l'assistant {{value}} a été mise à jour.",
|
|
40
|
+
"fail": "La mise à jour de l'instance de l'assistant {{value}} à échouée."
|
|
41
|
+
}
|
|
42
|
+
}
|
package/chat/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="@sinequa/assistant/chat" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@sinequa/assistant/chat" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class InitialsAvatarComponent {
|
|
3
|
-
fullName: string;
|
|
4
|
-
size: number;
|
|
5
|
-
/**
|
|
6
|
-
* Gives initials of a name and a safe color background to use,
|
|
7
|
-
* assuming text color will be white
|
|
8
|
-
* @param fullName full name to evaluate intials for
|
|
9
|
-
* @param split string to use has splitter for `fullName`
|
|
10
|
-
* @returns an `object` containing initials and color
|
|
11
|
-
*/
|
|
12
|
-
getInitialsAndColorFromFullName(fullName: string, split?: string): {
|
|
13
|
-
initials: string;
|
|
14
|
-
color: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Gives initials of a name, ie:
|
|
18
|
-
* ```
|
|
19
|
-
* getInitialForFullName('John Snow') => 'JS'
|
|
20
|
-
* getInitialForFullName('Geralt of Rivia', ' of ') => 'GR'
|
|
21
|
-
* ```
|
|
22
|
-
* @param fullName full name to evaluate intial for
|
|
23
|
-
* @param split string to use has splitter
|
|
24
|
-
* @returns string containg the first letter of splitted name
|
|
25
|
-
*/
|
|
26
|
-
getInitialsFromFullName(fullName: string, split?: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Gets a random color using text as seed
|
|
29
|
-
* @param text string to use for color generation
|
|
30
|
-
* @returns string formatted like `rgb(xxx, xxx, xxx)`
|
|
31
|
-
*/
|
|
32
|
-
getColorFromName(text: string): string;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<InitialsAvatarComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InitialsAvatarComponent, "sq-initials-avatar", never, { "fullName": "fullName"; "size": "size"; }, {}, never, never, true>;
|
|
35
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class InitialsAvatarComponent {
|
|
3
|
+
fullName: string;
|
|
4
|
+
size: number;
|
|
5
|
+
/**
|
|
6
|
+
* Gives initials of a name and a safe color background to use,
|
|
7
|
+
* assuming text color will be white
|
|
8
|
+
* @param fullName full name to evaluate intials for
|
|
9
|
+
* @param split string to use has splitter for `fullName`
|
|
10
|
+
* @returns an `object` containing initials and color
|
|
11
|
+
*/
|
|
12
|
+
getInitialsAndColorFromFullName(fullName: string, split?: string): {
|
|
13
|
+
initials: string;
|
|
14
|
+
color: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Gives initials of a name, ie:
|
|
18
|
+
* ```
|
|
19
|
+
* getInitialForFullName('John Snow') => 'JS'
|
|
20
|
+
* getInitialForFullName('Geralt of Rivia', ' of ') => 'GR'
|
|
21
|
+
* ```
|
|
22
|
+
* @param fullName full name to evaluate intial for
|
|
23
|
+
* @param split string to use has splitter
|
|
24
|
+
* @returns string containg the first letter of splitted name
|
|
25
|
+
*/
|
|
26
|
+
getInitialsFromFullName(fullName: string, split?: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Gets a random color using text as seed
|
|
29
|
+
* @param text string to use for color generation
|
|
30
|
+
* @returns string formatted like `rgb(xxx, xxx, xxx)`
|
|
31
|
+
*/
|
|
32
|
+
getColorFromName(text: string): string;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitialsAvatarComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InitialsAvatarComponent, "sq-initials-avatar", never, { "fullName": { "alias": "fullName"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|