@arsedizioni/ars-utils 22.0.34 → 22.0.35

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.
@@ -1,6 +1,6 @@
1
- import * as _angular_core from '@angular/core';
2
- import { Signal } from '@angular/core';
3
- import { NameValueItem, Folder, QueryModel, LoginResult, QueryResultModel, ApiResult, UpdateResultModel, FolderTree } from '@arsedizioni/ars-utils/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Signal, WritableSignal } from '@angular/core';
3
+ import { NameValueItem, Folder, QueryModel, QueryResultModel, LoginResult, ApiResult, UpdateResultModel, FolderTree } from '@arsedizioni/ars-utils/core';
4
4
  import { SendToDialogResult } from '@arsedizioni/ars-utils/ui.application';
5
5
  import { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';
6
6
  import * as _angular_common_http from '@angular/common/http';
@@ -679,7 +679,7 @@ interface ClipperDashboardResult {
679
679
  channels?: ClipperChannelSettings[];
680
680
  }
681
681
  declare class ClipperDashboard {
682
- items: _angular_core.WritableSignal<ClipperDashboardItem[]>;
682
+ items: i0.WritableSignal<ClipperDashboardItem[]>;
683
683
  isTrial?: boolean;
684
684
  expiredDeadlines?: number;
685
685
  expiringDeadlines?: number;
@@ -1127,108 +1127,56 @@ declare class ClipperAuthInterceptor implements HttpInterceptor {
1127
1127
  /**
1128
1128
  * Processes an HTTP error, broadcasting a user-friendly message when appropriate.
1129
1129
  * Errors are debounced: only one message is sent per `ERROR_DEBOUNCE_MS` window.
1130
+ *
1131
+ * This handler only ever runs for requests already targeting the Clipper service
1132
+ * (see `intercept`). A transport-level failure produces an `HttpErrorResponse`
1133
+ * with status `0` and a `null` url, so the url is only validated when present —
1134
+ * that way genuine network failures still surface the "service unavailable" message.
1130
1135
  * @param error - The raw error value thrown by the HTTP layer.
1131
1136
  */
1132
1137
  private handleError;
1133
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperAuthInterceptor, never>;
1134
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClipperAuthInterceptor>;
1138
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperAuthInterceptor, never>;
1139
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperAuthInterceptor>;
1135
1140
  }
1136
1141
 
1137
- declare class ClipperService {
1142
+ /**
1143
+ * Account management: password reset/recovery, settings, channel activation, trial info
1144
+ * and user links. Channel state lives in `ClipperCoreService`; the channel-mutating
1145
+ * helpers (`setChannels`, `setChannelsState`, `updateChannels`) live here.
1146
+ */
1147
+ declare class ClipperAccountService {
1138
1148
  private readonly httpClient;
1139
- private readonly destroyRef;
1140
1149
  private readonly broadcastService;
1141
- private readonly splashService;
1142
- private broadcastInitialized;
1143
- private _appUri?;
1144
- get appUri(): string | undefined;
1145
- private _serviceUri;
1146
- get serviceUri(): string;
1147
- private _flags;
1148
- get flags(): ClipperServiceFlags;
1149
- private _loginInfo?;
1150
- get loginInfo(): ClipperLoginInfo | undefined;
1151
- private readonly _loggedIn;
1152
- readonly loggedIn: Signal<boolean>;
1153
- readonly loggingIn: _angular_core.WritableSignal<boolean>;
1154
- readonly snapshot: _angular_core.WritableSignal<ClipperSearchResult>;
1155
- readonly supportsRS: _angular_core.WritableSignal<boolean>;
1156
- readonly referencesSnapshot: _angular_core.WritableSignal<ClipperSearchResult>;
1157
- readonly dashboard: ClipperDashboard;
1158
- readonly bag: _angular_core.WritableSignal<ClipperDocumentInfo[]>;
1159
- readonly bagTotal: Signal<number>;
1160
- readonly visible: _angular_core.WritableSignal<boolean>;
1161
- private _teams;
1162
- get teams(): NameValueItem<string>[];
1163
- readonly availableChannels: _angular_core.WritableSignal<ClipperAvailableChannel[]>;
1164
- readonly activeChannels: Signal<ClipperAvailableChannel[]>;
1165
- readonly allowTags: _angular_core.WritableSignal<boolean>;
1166
- readonly pendingNotes: _angular_core.WritableSignal<number>;
1167
- /**
1168
- * Initialises the service with the API base URI, optional app URI, and feature flags.
1169
- * @param serviceUri - The base URI of the Clipper REST API.
1170
- * @param appUri - Optional URI of the Clipper web application (used to build document links).
1171
- * @param flags - Feature flags that control service behaviour. Defaults to `ClipperServiceFlags.None`.
1172
- */
1173
- initialize(serviceUri: string, appUri?: string, flags?: ClipperServiceFlags): void;
1174
- /**
1175
- * Ping
1176
- */
1177
- ping(): void;
1178
- /**
1179
- * Persists the current login context to `localStorage`.
1180
- */
1181
- storeContext(): void;
1182
- /**
1183
- * Updates the stored login context with the values from a fresh login result.
1184
- * @param result - The login result containing the new user context and channel settings.
1185
- */
1186
- updateContext(result: ClipperLoginResult): void;
1187
- /**
1188
- * Attempts an automatic login using the credentials currently stored in session storage.
1189
- * @param onSuccess - Optional callback invoked with the login result value on success.
1190
- */
1191
- autoLogin(onSuccess?: (value?: any) => void): void;
1192
- /**
1193
- * Performs an automatic logout and clears the stored session.
1194
- * @param onSuccess - Optional callback invoked after a successful logout.
1195
- */
1196
- autoLogout(onSuccess?: () => void): void;
1150
+ private readonly core;
1197
1151
  /**
1198
- * Authenticates the user against the Clipper API, supporting both credential-based and
1199
- * OAuth2 login flows.
1200
- * @param email - The user's email address (credential login only).
1201
- * @param password - The user's password (credential login only).
1202
- * @param remember - When `true`, the session is remembered across browser restarts.
1203
- * @param oauth - The OAuth2 provider type, when authenticating via SSO.
1204
- * @param oauthAccessToken - The OAuth2 bearer token. Defaults to the value stored in session storage.
1205
- */
1206
- login(email?: string, password?: string, remember?: boolean, oauth?: LoginOAuthType, oauthAccessToken?: string | undefined): rxjs.Observable<ApiResult<ClipperLoginResult>>;
1207
- /**
1208
- * Finalises the login flow by updating the stored context, setting the logged-in signal,
1209
- * initialising channels, and broadcasting `LOGIN_COMPLETED`.
1210
- * @param result - The login result returned by the API.
1152
+ * Resets the user's password using the provided parameters.
1153
+ * @param params - The new password and confirmation data.
1154
+ * @returns An observable emitting the API result wrapping the reset password payload.
1211
1155
  */
1212
- private completeLogin;
1156
+ resetPassword(params: ResetPasswordDialogResult): rxjs.Observable<ApiResult<ResetPasswordDialogResult>>;
1213
1157
  /**
1214
- * Submits the MFA confirmation code to complete a two-factor login flow.
1215
- * @param code - The one-time confirmation code provided to the user.
1158
+ * Initiates a password recovery flow by sending a reset link to the user's email.
1159
+ * @param params - The password recovery request data.
1160
+ * @returns An observable emitting the API result wrapping a boolean success flag.
1216
1161
  */
1217
- confirmIdentity(code: string): rxjs.Observable<ApiResult<ClipperLoginResult>>;
1162
+ recoverPassword(params: RecoverPasswordDialogResult): rxjs.Observable<ApiResult<boolean>>;
1218
1163
  /**
1219
- * Logs the user out and clears the current session.
1220
- * @param forget - When `true`, all stored user credentials are also removed.
1164
+ * Gets the current user account settings.
1165
+ * @returns An observable emitting the API result wrapping the account settings.
1221
1166
  */
1222
- logout(forget?: boolean): rxjs.Observable<any>;
1167
+ getSettings(): rxjs.Observable<ApiResult<ClipperSettingsInfo>>;
1223
1168
  /**
1224
- * Resets the login state, clears the stored login info, and broadcasts `LOGOUT_COMPLETED`.
1169
+ * Updates user account settings and applies any channel configuration changes.
1170
+ * @param params - A map of settings key-value pairs to update.
1171
+ * @returns An observable emitting the API result wrapping a boolean success flag.
1225
1172
  */
1226
- reset(): void;
1173
+ updateSettings(params: ClipperSettingsInfo): rxjs.Observable<ApiResult<boolean>>;
1227
1174
  /**
1228
- * Clears all session-storage authentication keys and resets the login state.
1229
- * @param clearOAuthToken - When `true`, the OAuth bearer token is also removed.
1175
+ * Saves updated channel activation states to the server and applies the new dashboard result.
1176
+ * @param params - The channel state update parameters.
1177
+ * @returns An observable emitting the API result wrapping the dashboard result.
1230
1178
  */
1231
- clear(clearOAuthToken?: boolean): void;
1179
+ updateChannelsState(params: ClipperUpdateChannelsStateParams): rxjs.Observable<ApiResult<ClipperDashboardResult>>;
1232
1180
  /**
1233
1181
  * Applies a new dashboard result: updates channel settings, dashboard counters, and
1234
1182
  * re-initialises the available-channels signal.
@@ -1240,362 +1188,583 @@ declare class ClipperService {
1240
1188
  * @param channels - The new channel settings to store and activate.
1241
1189
  */
1242
1190
  setChannels(channels: ClipperChannelSettings[]): void;
1243
- /**
1244
- * Rebuilds the `availableChannels` signal from the current login context.
1245
- */
1246
- private initializeChannels;
1247
1191
  /**
1248
1192
  * Toggles the active state of available channels based on the supplied selection list.
1249
1193
  * @param values - The selected channel items; channels absent from this list are deactivated.
1250
1194
  */
1251
1195
  updateChannels(values: NameValueItem<ClipperChannel>[]): void;
1252
1196
  /**
1253
- * Requests a new one-time password for the given repository.
1254
- * @param id - The repository ID for which the OTP should be generated.
1197
+ * Gets the trial info for the current account.
1198
+ * @returns An observable emitting the API result wrapping the trial info.
1255
1199
  */
1256
- newOTP(id: string): rxjs.Observable<ApiResult<ClipperOTPInfo>>;
1200
+ private getTrialInfo;
1257
1201
  /**
1258
- * Load Ars events calendar
1202
+ * Refreshes the trial status from the server and updates the stored login context.
1259
1203
  */
1260
- events(params: ClipperSearchArsEventsParams): rxjs.Observable<ApiResult<ClipperSearchArsEventsResult>>;
1204
+ updateTrialInfo(): void;
1261
1205
  /**
1262
- * Query documents
1206
+ * Creates or updates a user link record.
1207
+ * @param item - The user link data to save.
1208
+ * @returns An observable emitting the API result wrapping a boolean success flag.
1263
1209
  */
1264
- query(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1210
+ saveLink(item: ClipperUserLink): rxjs.Observable<ApiResult<boolean>>;
1265
1211
  /**
1266
- * Get facets for a query
1212
+ * Deletes a user link record.
1213
+ * @param item - The user link to remove.
1214
+ * @returns An observable emitting the API result wrapping a boolean success flag.
1267
1215
  */
1268
- queryFacets(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchFacetsResult>>;
1216
+ deleteLink(item: ClipperUserLink): rxjs.Observable<ApiResult<boolean>>;
1217
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperAccountService, never>;
1218
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperAccountService>;
1219
+ }
1220
+
1221
+ /**
1222
+ * Document archive: folders and files search, save, copy, delete, import/export and download.
1223
+ */
1224
+ declare class ClipperArchiveService {
1225
+ private readonly httpClient;
1226
+ private readonly core;
1269
1227
  /**
1270
- * Update document state
1271
- */
1272
- updateState(params: ClipperDocumentUpdateStateParams): rxjs.Observable<ApiResult<number>>;
1228
+ * Retrieves all archive folders matching the given search parameters and stores the
1229
+ * returned teams in the shared state.
1230
+ * @param params - The folder search parameters.
1231
+ * @returns An observable emitting the API result wrapping the folders search result.
1232
+ */
1233
+ getArchiveFolders(params: ClipperArchiveFoldersSearchParams): rxjs.Observable<ApiResult<ClipperArchiveFoldersSearchResult>>;
1273
1234
  /**
1274
- * Export a document in pdf format
1235
+ * Creates or updates an archive folder.
1236
+ * @param params - The folder data to save.
1237
+ * @returns An observable emitting the API result wrapping the saved folder.
1275
1238
  */
1276
- exportPdf(id: string): rxjs.Observable<Blob>;
1239
+ saveArchiveFolder(params: Folder): rxjs.Observable<ApiResult<Folder>>;
1277
1240
  /**
1278
- * Export document list (query or selected items) or export deadlines as ics
1279
- */
1280
- export(params: ClipperExportDocumentsParams): rxjs.Observable<Blob>;
1241
+ * Exports archive folders as a downloadable file.
1242
+ * @param id - The folder ID to export, or `undefined` to export all folders.
1243
+ * @param teamId - The optional team ID. Defaults to `undefined` (personal workspace).
1244
+ * @returns An observable emitting the exported folders content as a blob.
1245
+ */
1246
+ exportArchiveFolders(id?: string, teamId?: string): rxjs.Observable<Blob>;
1281
1247
  /**
1282
- * Send documents link by email
1248
+ * Uploads and imports archive folders from a file.
1249
+ * @param params - The import parameters including the source file and destination folder.
1250
+ * @returns An observable of HTTP events reporting upload progress and the final response.
1283
1251
  */
1284
- sendTo(params: ClipperSendDocumentsByEmailParams): rxjs.Observable<ApiResult<number>>;
1252
+ importArchiveFolders(params: ClipperArchiveFoldersImportParams): rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
1285
1253
  /**
1286
- * Sends an email notification about a document note update to the specified recipients.
1287
- * @param params - The notification parameters including recipients and note details.
1254
+ * Retrieves archive files and folders matching the given search parameters.
1255
+ * @param params - The archive files search parameters.
1256
+ * @returns An observable emitting the API result wrapping the files search result.
1288
1257
  */
1289
- notifyNoteTo(params: ClipperNotifyDocumentNoteParams): rxjs.Observable<ApiResult<UpdateResultModel<ClipperDocumentNoteTracking>>>;
1258
+ queryArchiveItems(params: ClipperArchiveFilesSearchParams): rxjs.Observable<ApiResult<ClipperArchiveFilesSearchResult>>;
1290
1259
  /**
1291
- * Display a page the full document report
1260
+ * Deletes one or more archive files or folders.
1261
+ * @param params - The delete operation parameters.
1262
+ * @returns An observable emitting the API result wrapping the number of deleted items.
1292
1263
  */
1293
- report(id: string): rxjs.Observable<Blob>;
1264
+ deleteArchiveItems(params: ClipperArchiveFilesDeleteParams): rxjs.Observable<ApiResult<number>>;
1294
1265
  /**
1295
- * Get document comment
1266
+ * Copies archive files or folders to a destination folder.
1267
+ * @param params - The copy operation parameters.
1268
+ * @returns An observable emitting the API result wrapping the number of copied items.
1296
1269
  */
1297
- comment(id: string): rxjs.Observable<ApiResult<string>>;
1270
+ copyArchiveItems(params: ClipperArchiveFilesCopyParams): rxjs.Observable<ApiResult<number>>;
1298
1271
  /**
1299
- * Get document info
1272
+ * Uploads and saves an archive file using multipart form data.
1273
+ * @param params - The file metadata and binary content to save.
1274
+ * @returns An observable of HTTP events reporting upload progress and the final response.
1300
1275
  */
1301
- info(id: string): rxjs.Observable<ApiResult<ClipperDocumentInfo>>;
1276
+ saveArchiveFile(params: ClipperArchiveFileInfo): rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
1302
1277
  /**
1303
- * Get document structure
1278
+ * Retrieves the metadata for a single archive file.
1279
+ * @param id - The ID of the archive file to retrieve.
1280
+ * @returns An observable emitting the API result wrapping the archive file info.
1304
1281
  */
1305
- index(id: string): rxjs.Observable<ApiResult<ClipperDocumentStructure>>;
1282
+ getArchiveFile(id: string): rxjs.Observable<ApiResult<ClipperArchiveFileInfo>>;
1306
1283
  /**
1307
- * Get document last update
1284
+ * Downloads the binary content of an archive file.
1285
+ * @param id - The binary ID of the file to download.
1286
+ * @param otp - An optional one-time password for authenticated downloads.
1287
+ * @returns An observable emitting the file binary content as a blob.
1308
1288
  */
1309
- metadata(id: string): rxjs.Observable<ApiResult<{
1310
- item1?: string;
1311
- item2?: ClipperDocumentNote[];
1312
- }>>;
1289
+ downloadArchiveFile(id: number, otp?: string): rxjs.Observable<Blob>;
1290
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperArchiveService, never>;
1291
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperArchiveService>;
1292
+ }
1293
+
1294
+ /**
1295
+ * Calendar deadlines: search, snapshot, save/copy/close/delete and iCalendar export.
1296
+ */
1297
+ declare class ClipperCalendarService {
1298
+ private readonly httpClient;
1299
+ private readonly core;
1313
1300
  /**
1314
- * Query document references
1301
+ * Queries the calendar and stores the returned teams in the shared state.
1302
+ * @param params - The calendar search parameters.
1303
+ * @returns An observable emitting the API result wrapping the calendar search result.
1315
1304
  */
1316
- references(params: ClipperReferencesSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1305
+ queryCalendar(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperCalendarSearchResult>>;
1317
1306
  /**
1318
- * Get facets for a document references
1307
+ * Gets the calendar snapshot.
1308
+ * @param params - The calendar search parameters.
1309
+ * @returns An observable emitting the API result wrapping the calendar snapshot result.
1319
1310
  */
1320
- referencesFacets(params: ClipperReferencesSearchParams): rxjs.Observable<ApiResult<ClipperSearchFacetsResult>>;
1311
+ calendarSnapshot(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperSearchCalendarSnapshotResult>>;
1321
1312
  /**
1322
- * Wrap document rendering to allow token refresh
1313
+ * Deletes one or more calendar deadlines by ID.
1314
+ * @param ids - The IDs of the deadlines to delete.
1315
+ * @returns An observable emitting the API result wrapping the number of deleted deadlines.
1323
1316
  */
1324
- preRender(): rxjs.Observable<ApiResult<boolean>>;
1317
+ deleteCalendarDeadlines(ids: string[]): rxjs.Observable<ApiResult<number>>;
1325
1318
  /**
1326
- * Get document juris articles
1319
+ * Copies one or more calendar deadlines using the given parameters.
1320
+ * @param params - The copy operation parameters.
1321
+ * @returns An observable emitting the API result wrapping the number of copied deadlines.
1327
1322
  */
1328
- jurisArticles(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1323
+ copyCalendarDeadlines(params: ClipperCalendarCopyDeadlinesParams): rxjs.Observable<ApiResult<number>>;
1329
1324
  /**
1330
- * Get deadlines snapshot based on the deadlines
1331
- */
1332
- deadlinesSnapshot(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperSearchCalendarSnapshotResult>>;
1325
+ * Marks the given calendar deadline as closed.
1326
+ * @param id - The ID of the deadline to close.
1327
+ * @returns An observable emitting the API result wrapping the updated deadline.
1328
+ */
1329
+ closeCalendarDeadline(id: string): rxjs.Observable<ApiResult<ClipperDeadlineInfo>>;
1333
1330
  /**
1334
- * Retrieve the taxonomy
1331
+ * Creates or updates a calendar deadline.
1332
+ * @param params - The deadline data to save.
1333
+ * @returns An observable emitting the API result wrapping the saved deadlines.
1335
1334
  */
1336
- getTaxonomy(params?: ClipperTaxonomyParams): rxjs.Observable<ApiResult<FolderTree>>;
1335
+ saveCalendarDeadline(params: ClipperCalendarSaveDeadlineParams): rxjs.Observable<ApiResult<ClipperDeadlineInfo[]>>;
1337
1336
  /**
1338
- * Retrieve topics
1337
+ * Retrieves a single calendar deadline by its ID.
1338
+ * @param id - The ID of the deadline to retrieve.
1339
+ * @returns An observable emitting the API result wrapping the deadline.
1339
1340
  */
1340
- getTopics(): rxjs.Observable<ApiResult<NameValueItem<string>[]>>;
1341
+ getCalendarDeadline(id: string): rxjs.Observable<ApiResult<ClipperDeadlineInfo>>;
1341
1342
  /**
1342
- * Retrieve topics as tree
1343
- */
1344
- getTopicsAsTree(): rxjs.Observable<ApiResult<FolderTree>>;
1343
+ * Exports the selected deadlines in iCalendar (.ics) format.
1344
+ * @param ids - The IDs of the deadlines to export.
1345
+ * @returns An observable emitting the iCalendar content as a blob.
1346
+ */
1347
+ exportCalendarDeadlines(ids: string[]): rxjs.Observable<Blob>;
1348
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperCalendarService, never>;
1349
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperCalendarService>;
1350
+ }
1351
+
1352
+ /**
1353
+ * Collaboration: teams and team members, contacts and shared document notes.
1354
+ */
1355
+ declare class ClipperCollaborationService {
1356
+ private readonly httpClient;
1357
+ private readonly core;
1345
1358
  /**
1346
- * Retrieve tags
1359
+ * Renames the current user's team.
1360
+ * @param newName - The new display name for the team.
1361
+ * @returns An observable emitting the API result wrapping the updated team info.
1347
1362
  */
1348
- getTags(): rxjs.Observable<ApiResult<NameValueItem<string>[]>>;
1363
+ renameTeam(newName: string): rxjs.Observable<ApiResult<ClipperTeamInfo>>;
1349
1364
  /**
1350
- * Retrieve current dashboard
1351
- */
1352
- loadDashboard(): rxjs.Subscription;
1365
+ * Retrieves the list of teams available to the current user. When not querying
1366
+ * admins only, the result is also stored in the shared teams state.
1367
+ * @param params - The teams search parameters.
1368
+ * @returns An observable emitting the API result wrapping the teams search result.
1369
+ */
1370
+ getTeams(params: ClipperTeamsSearchParams): rxjs.Observable<ApiResult<ClipperTeamsSearchResult>>;
1353
1371
  /**
1354
- * Retrieves documents updated in the last 15 days for the given search parameters.
1355
- * @param params - The search parameters to filter results.
1372
+ * Retrieves the members of a team matching the given search parameters.
1373
+ * @param params - The team members search parameters.
1374
+ * @returns An observable emitting the API result wrapping the team members search result.
1356
1375
  */
1357
- last15Days(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperLastDaysResult>>;
1376
+ getTeamMembers(params: ClipperTeamsSearchParams): rxjs.Observable<ApiResult<ClipperTeamMembersSearchResult>>;
1358
1377
  /**
1359
- * Adjusts the unread-item counter for the given module and broadcasts a dashboard update.
1360
- * @param module - The Clipper module whose counter should be adjusted.
1361
- * @param model - Optional document model to further scope the counter update.
1362
- * @param increment - The signed increment to apply (use negative values to decrement).
1378
+ * Removes the specified members from the team.
1379
+ * @param teamId - The ID of the team.
1380
+ * @param ids - The numeric IDs of the team members to remove.
1381
+ * @returns An observable emitting the API result wrapping the number of removed members.
1363
1382
  */
1364
- updateUnreadItems(module: ClipperModule, model?: ClipperModel, increment?: number): void;
1383
+ deleteTeamMembers(teamId: string, ids: number[]): rxjs.Observable<ApiResult<number>>;
1365
1384
  /**
1366
- * Load working documents
1385
+ * Creates or updates a team member record.
1386
+ * @param item - The team member data to save.
1387
+ * @returns An observable emitting the API result wrapping the saved team member.
1367
1388
  */
1368
- loadBag(): rxjs.Subscription;
1389
+ saveTeamMember(item: ClipperTeamMemberInfo): rxjs.Observable<ApiResult<ClipperTeamMemberInfo>>;
1369
1390
  /**
1370
- * Adds one or more documents to the working documents bag.
1371
- * @param documentIds - The IDs of the documents to add.
1391
+ * Retrieves contacts matching the given search parameters.
1392
+ * @param params - The contacts search parameters.
1393
+ * @returns An observable emitting the API result wrapping the contacts query result.
1372
1394
  */
1373
- addToBag(documentIds: string[]): rxjs.Subscription;
1395
+ queryContacts(params: ClipperContactsSearchParams): rxjs.Observable<ApiResult<QueryResultModel<ClipperContactInfo>>>;
1374
1396
  /**
1375
- * Removes a document from the working documents bag.
1376
- * @param documentId - The ID of the document to remove.
1397
+ * Deletes the specified contacts.
1398
+ * @param ids - The numeric IDs of the contacts to remove.
1399
+ * @returns An observable emitting the API result wrapping the number of deleted contacts.
1377
1400
  */
1378
- removeFromBag(documentId: string): rxjs.Subscription;
1401
+ deleteContacts(ids: number[]): rxjs.Observable<ApiResult<number>>;
1379
1402
  /**
1380
- * Clear all working documents
1403
+ * Creates or updates a contact record.
1404
+ * @param item - The contact data to save.
1405
+ * @returns An observable emitting the API result wrapping the saved contact.
1381
1406
  */
1382
- clearBag(): rxjs.Subscription;
1407
+ saveContact(item: ClipperContactInfo): rxjs.Observable<ApiResult<ClipperContactInfo>>;
1383
1408
  /**
1384
- * Retrieves the saved searches for the given module.
1385
- * @param module - The Clipper module whose saved searches to load.
1409
+ * Retrieves document notes matching the given search parameters and stores the
1410
+ * returned teams in the shared state.
1411
+ * @param params - The notes search parameters.
1412
+ * @returns An observable emitting the API result wrapping the notes search result.
1386
1413
  */
1387
- loadSearches(module: ClipperModule): rxjs.Observable<ApiResult<ClipperUserSearch[]>>;
1414
+ queryNotes(params: ClipperNotesSearchParams): rxjs.Observable<ApiResult<ClipperNotesSearchResult>>;
1388
1415
  /**
1389
- * Persists a user search configuration on the server.
1390
- * @param params - The search configuration to save.
1416
+ * Deletes the specified document notes.
1417
+ * @param ids - The numeric IDs of the notes to remove.
1418
+ * @returns An observable emitting the API result wrapping the number of deleted notes.
1391
1419
  */
1392
- saveSearch(params: ClipperUserSearch): rxjs.Observable<ApiResult<ClipperUserSearch>>;
1420
+ deleteNotes(ids: number[]): rxjs.Observable<ApiResult<number>>;
1393
1421
  /**
1394
- * Deletes a saved search by its ID.
1395
- * @param id - The ID of the saved search to remove.
1422
+ * Creates or updates a document note.
1423
+ * @param item - The note data to save.
1424
+ * @returns An observable emitting the API result wrapping the saved note.
1396
1425
  */
1397
- deleteSearch(id: number): rxjs.Observable<ApiResult<number>>;
1426
+ saveNote(item: ClipperDocumentNote): rxjs.Observable<ApiResult<ClipperDocumentNote>>;
1398
1427
  /**
1399
- * Query calendar
1428
+ * Retrieves the tracking history for the given document note.
1429
+ * @param id - The numeric ID of the note whose tracking records to retrieve.
1430
+ * @returns An observable emitting the API result wrapping the note tracking records.
1400
1431
  */
1401
- queryCalendar(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperCalendarSearchResult>>;
1432
+ getNoteTrackings(id: number): rxjs.Observable<ApiResult<ClipperDocumentNoteTracking[]>>;
1402
1433
  /**
1403
- * Get the calendar snapshot
1434
+ * Gets the count of troubled tracking notifications for document notes,
1435
+ * which can be used to display an unread counter in the UI.
1436
+ * @returns An observable emitting the API result wrapping the troubled tracking count.
1404
1437
  */
1405
- calendarSnapshot(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperSearchCalendarSnapshotResult>>;
1438
+ countNotesTrackingsTroubled(): rxjs.Observable<ApiResult<number>>;
1439
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperCollaborationService, never>;
1440
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperCollaborationService>;
1441
+ }
1442
+
1443
+ /**
1444
+ * Document search, references, export and metadata, plus the dashboard counters,
1445
+ * taxonomy/topics/tags lookups, the working-documents "bag" and saved searches.
1446
+ */
1447
+ declare class ClipperDocumentsService {
1448
+ private readonly httpClient;
1449
+ private readonly broadcastService;
1450
+ private readonly core;
1406
1451
  /**
1407
- * Deletes one or more calendar deadlines by ID.
1408
- * @param ids - The IDs of the deadlines to delete.
1452
+ * Queries documents matching the given search parameters.
1453
+ * @param params - The document search parameters.
1454
+ * @returns An observable emitting the API result wrapping the search result.
1409
1455
  */
1410
- deleteCalendarDeadlines(ids: string[]): rxjs.Observable<ApiResult<number>>;
1456
+ query(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1411
1457
  /**
1412
- * Copies one or more calendar deadlines using the given parameters.
1413
- * @param params - The copy operation parameters.
1458
+ * Retrieves the facets for a document query.
1459
+ * @param params - The document search parameters.
1460
+ * @returns An observable emitting the API result wrapping the search facets.
1414
1461
  */
1415
- copyCalendarDeadlines(params: ClipperCalendarCopyDeadlinesParams): rxjs.Observable<ApiResult<number>>;
1462
+ queryFacets(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchFacetsResult>>;
1416
1463
  /**
1417
- * Marks the given calendar deadline as closed.
1418
- * @param id - The ID of the deadline to close.
1464
+ * Updates the state of one or more documents.
1465
+ * @param params - The document state update parameters.
1466
+ * @returns An observable emitting the API result wrapping the number of updated documents.
1419
1467
  */
1420
- closeCalendarDeadline(id: string): rxjs.Observable<ApiResult<ClipperDeadlineInfo>>;
1468
+ updateState(params: ClipperDocumentUpdateStateParams): rxjs.Observable<ApiResult<number>>;
1421
1469
  /**
1422
- * Creates or updates a calendar deadline.
1423
- * @param params - The deadline data to save.
1470
+ * Exports a single document in PDF format.
1471
+ * @param id - The ID of the document to export.
1472
+ * @returns An observable emitting the PDF binary content as a blob.
1424
1473
  */
1425
- saveCalendarDeadline(params: ClipperCalendarSaveDeadlineParams): rxjs.Observable<ApiResult<ClipperDeadlineInfo[]>>;
1474
+ exportPdf(id: string): rxjs.Observable<Blob>;
1426
1475
  /**
1427
- * Retrieves a single calendar deadline by its ID.
1428
- * @param id - The ID of the deadline to retrieve.
1476
+ * Exports a document list (query or selected items), or exports deadlines as ICS.
1477
+ * @param params - The export parameters.
1478
+ * @returns An observable emitting the exported content as a blob.
1429
1479
  */
1430
- getCalendarDeadline(id: string): rxjs.Observable<ApiResult<ClipperDeadlineInfo>>;
1480
+ export(params: ClipperExportDocumentsParams): rxjs.Observable<Blob>;
1431
1481
  /**
1432
- * Exports the selected deadlines in iCalendar (.ics) format.
1433
- * @param ids - The IDs of the deadlines to export.
1482
+ * Sends document links by email.
1483
+ * @param params - The send-by-email parameters including recipients and documents.
1484
+ * @returns An observable emitting the API result wrapping the number of sent items.
1434
1485
  */
1435
- exportCalendarDeadlines(ids: string[]): rxjs.Observable<Blob>;
1486
+ sendTo(params: ClipperSendDocumentsByEmailParams): rxjs.Observable<ApiResult<number>>;
1436
1487
  /**
1437
- * Retrieves all archive folders matching the given search parameters.
1438
- * @param params - The folder search parameters.
1488
+ * Sends an email notification about a document note update to the specified recipients.
1489
+ * @param params - The notification parameters including recipients and note details.
1490
+ * @returns An observable emitting the API result wrapping the note tracking update.
1439
1491
  */
1440
- getArchiveFolders(params: ClipperArchiveFoldersSearchParams): rxjs.Observable<ApiResult<ClipperArchiveFoldersSearchResult>>;
1492
+ notifyNoteTo(params: ClipperNotifyDocumentNoteParams): rxjs.Observable<ApiResult<UpdateResultModel<ClipperDocumentNoteTracking>>>;
1441
1493
  /**
1442
- * Creates or updates an archive folder.
1443
- * @param params - The folder data to save.
1494
+ * Retrieves the full document report page.
1495
+ * @param id - The ID of the document.
1496
+ * @returns An observable emitting the report content as a blob.
1444
1497
  */
1445
- saveArchiveFolder(params: Folder): rxjs.Observable<ApiResult<Folder>>;
1498
+ report(id: string): rxjs.Observable<Blob>;
1446
1499
  /**
1447
- * Exports archive folders as a downloadable file.
1448
- * @param id - The folder ID to export, or `undefined` to export all folders.
1449
- * @param teamId - The optional team ID. Defaults to `undefined` (personal workspace).
1500
+ * Gets the comment associated with a document.
1501
+ * @param id - The ID of the document.
1502
+ * @returns An observable emitting the API result wrapping the comment text.
1450
1503
  */
1451
- exportArchiveFolders(id?: string, teamId?: string): rxjs.Observable<Blob>;
1504
+ comment(id: string): rxjs.Observable<ApiResult<string>>;
1452
1505
  /**
1453
- * Uploads and imports archive folders from a file.
1454
- * @param params - The import parameters including the source file and destination folder.
1506
+ * Gets the info for a document.
1507
+ * @param id - The ID of the document.
1508
+ * @returns An observable emitting the API result wrapping the document info.
1455
1509
  */
1456
- importArchiveFolders(params: ClipperArchiveFoldersImportParams): rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
1510
+ info(id: string): rxjs.Observable<ApiResult<ClipperDocumentInfo>>;
1457
1511
  /**
1458
- * Retrieves archive files and folders matching the given search parameters.
1459
- * @param params - The archive files search parameters.
1512
+ * Gets the structure (index) of a document.
1513
+ * @param id - The ID of the document.
1514
+ * @returns An observable emitting the API result wrapping the document structure.
1460
1515
  */
1461
- queryArchiveItems(params: ClipperArchiveFilesSearchParams): rxjs.Observable<ApiResult<ClipperArchiveFilesSearchResult>>;
1516
+ index(id: string): rxjs.Observable<ApiResult<ClipperDocumentStructure>>;
1462
1517
  /**
1463
- * Deletes one or more archive files or folders.
1464
- * @param params - The delete operation parameters.
1518
+ * Gets the last-update metadata for a document.
1519
+ * @param id - The ID of the document.
1520
+ * @returns An observable emitting the API result wrapping the last update string and its notes.
1465
1521
  */
1466
- deleteArchiveItems(params: ClipperArchiveFilesDeleteParams): rxjs.Observable<ApiResult<number>>;
1522
+ metadata(id: string): rxjs.Observable<ApiResult<{
1523
+ item1?: string;
1524
+ item2?: ClipperDocumentNote[];
1525
+ }>>;
1467
1526
  /**
1468
- * Copies archive files or folders to a destination folder.
1469
- * @param params - The copy operation parameters.
1527
+ * Queries document references, changes or jurisprudence depending on the requested mode.
1528
+ * @param params - The references search parameters; `mode` defaults to `ReferencesIn`.
1529
+ * @returns An observable emitting the API result wrapping the search result, or `null` for an unsupported mode.
1470
1530
  */
1471
- copyArchiveItems(params: ClipperArchiveFilesCopyParams): rxjs.Observable<ApiResult<number>>;
1531
+ references(params: ClipperReferencesSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1472
1532
  /**
1473
- * Uploads and saves an archive file using multipart form data.
1474
- * @param params - The file metadata and binary content to save.
1533
+ * Retrieves the facets for a document references query.
1534
+ * @param params - The references search parameters; `mode` defaults to `ReferencesIn`.
1535
+ * @returns An observable emitting the API result wrapping the search facets, or `null` for an unsupported mode.
1475
1536
  */
1476
- saveArchiveFile(params: ClipperArchiveFileInfo): rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
1537
+ referencesFacets(params: ClipperReferencesSearchParams): rxjs.Observable<ApiResult<ClipperSearchFacetsResult>>;
1477
1538
  /**
1478
- * Retrieves the metadata for a single archive file.
1479
- * @param id - The ID of the archive file to retrieve.
1539
+ * Wraps document rendering to allow token refresh.
1540
+ * @returns An observable emitting the API result wrapping a boolean readiness flag.
1480
1541
  */
1481
- getArchiveFile(id: string): rxjs.Observable<ApiResult<ClipperArchiveFileInfo>>;
1542
+ preRender(): rxjs.Observable<ApiResult<boolean>>;
1482
1543
  /**
1483
- * Downloads the binary content of an archive file.
1484
- * @param id - The binary ID of the file to download.
1485
- * @param otp - An optional one-time password for authenticated downloads.
1544
+ * Gets the jurisprudence articles for a document query.
1545
+ * @param params - The document search parameters.
1546
+ * @returns An observable emitting the API result wrapping the search result.
1486
1547
  */
1487
- downloadArchiveFile(id: number, otp?: string): rxjs.Observable<Blob>;
1548
+ jurisArticles(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperSearchResult>>;
1488
1549
  /**
1489
- * Resets the user's password using the provided parameters.
1490
- * @param params - The new password and confirmation data.
1550
+ * Gets a deadlines snapshot based on the supplied deadlines.
1551
+ * @param params - The calendar search parameters.
1552
+ * @returns An observable emitting the API result wrapping the calendar snapshot result.
1491
1553
  */
1492
- resetPassword(params: ResetPasswordDialogResult): rxjs.Observable<ApiResult<ResetPasswordDialogResult>>;
1554
+ deadlinesSnapshot(params: ClipperCalendarSearchParams): rxjs.Observable<ApiResult<ClipperSearchCalendarSnapshotResult>>;
1493
1555
  /**
1494
- * Initiates a password recovery flow by sending a reset link to the user's email.
1495
- * @param params - The password recovery request data.
1556
+ * Retrieves the taxonomy.
1557
+ * @param params - Optional taxonomy parameters. Defaults to `{ model: 0, countItems: false }`.
1558
+ * @returns An observable emitting the API result wrapping the taxonomy folder tree.
1496
1559
  */
1497
- recoverPassword(params: RecoverPasswordDialogResult): rxjs.Observable<ApiResult<boolean>>;
1560
+ getTaxonomy(params?: ClipperTaxonomyParams): rxjs.Observable<ApiResult<FolderTree>>;
1498
1561
  /**
1499
- * Gets the current user account settings
1562
+ * Retrieves the topics as a flat list.
1563
+ * @returns An observable emitting the API result wrapping the list of topics.
1500
1564
  */
1501
- getSettings(): rxjs.Observable<ApiResult<ClipperSettingsInfo>>;
1565
+ getTopics(): rxjs.Observable<ApiResult<NameValueItem<string>[]>>;
1502
1566
  /**
1503
- * Updates user account settings and applies any channel configuration changes.
1504
- * @param params - A map of settings key-value pairs to update.
1567
+ * Retrieves the topics as a tree.
1568
+ * @returns An observable emitting the API result wrapping the topics folder tree.
1505
1569
  */
1506
- updateSettings(params: ClipperSettingsInfo): rxjs.Observable<ApiResult<boolean>>;
1570
+ getTopicsAsTree(): rxjs.Observable<ApiResult<FolderTree>>;
1507
1571
  /**
1508
- * Saves updated channel activation states to the server and applies the new dashboard result.
1509
- * @param params - The channel state update parameters.
1572
+ * Retrieves the tags.
1573
+ * @returns An observable emitting the API result wrapping the list of tags.
1510
1574
  */
1511
- updateChannelsState(params: ClipperUpdateChannelsStateParams): rxjs.Observable<ApiResult<ClipperDashboardResult>>;
1575
+ getTags(): rxjs.Observable<ApiResult<NameValueItem<string>[]>>;
1512
1576
  /**
1513
- * Get trial info
1577
+ * Retrieves the current dashboard and applies its counters to the shared dashboard state.
1578
+ * @returns The subscription to the dashboard request.
1514
1579
  */
1515
- private getTrialInfo;
1580
+ loadDashboard(): rxjs.Subscription;
1516
1581
  /**
1517
- * Refreshes the trial status from the server and updates the stored login context.
1582
+ * Retrieves documents updated in the last 15 days for the given search parameters.
1583
+ * @param params - The search parameters to filter results.
1584
+ * @returns An observable emitting the API result wrapping the last-days result.
1518
1585
  */
1519
- updateTrialInfo(): void;
1586
+ last15Days(params: ClipperSearchParams): rxjs.Observable<ApiResult<ClipperLastDaysResult>>;
1520
1587
  /**
1521
- * Creates or updates a user link record.
1522
- * @param item - The user link data to save.
1588
+ * Adjusts the unread-item counter for the given module and broadcasts a dashboard update.
1589
+ * @param module - The Clipper module whose counter should be adjusted.
1590
+ * @param model - Optional document model to further scope the counter update.
1591
+ * @param increment - The signed increment to apply (use negative values to decrement).
1523
1592
  */
1524
- saveLink(item: ClipperUserLink): rxjs.Observable<ApiResult<boolean>>;
1593
+ updateUnreadItems(module: ClipperModule, model?: ClipperModel, increment?: number): void;
1525
1594
  /**
1526
- * Deletes a user link record.
1527
- * @param item - The user link to remove.
1595
+ * Loads the working documents and populates the shared bag.
1596
+ * @returns The subscription to the working-documents request.
1528
1597
  */
1529
- deleteLink(item: ClipperUserLink): rxjs.Observable<ApiResult<boolean>>;
1598
+ loadBag(): rxjs.Subscription;
1530
1599
  /**
1531
- * Renames the current user's team.
1532
- * @param newName - The new display name for the team.
1600
+ * Adds one or more documents to the working documents bag.
1601
+ * @param documentIds - The IDs of the documents to add.
1602
+ * @returns The subscription to the add-to-bag request.
1533
1603
  */
1534
- renameTeam(newName: string): rxjs.Observable<ApiResult<ClipperTeamInfo>>;
1604
+ addToBag(documentIds: string[]): rxjs.Subscription;
1535
1605
  /**
1536
- * Retrieves the list of teams available to the current user.
1537
- * @param params - The teams search parameters.
1606
+ * Removes a document from the working documents bag.
1607
+ * @param documentId - The ID of the document to remove.
1608
+ * @returns The subscription to the remove-from-bag request.
1538
1609
  */
1539
- getTeams(params: ClipperTeamsSearchParams): rxjs.Observable<ApiResult<ClipperTeamsSearchResult>>;
1610
+ removeFromBag(documentId: string): rxjs.Subscription;
1540
1611
  /**
1541
- * Retrieves the members of a team matching the given search parameters.
1542
- * @param params - The team members search parameters.
1612
+ * Clears all working documents from the bag.
1613
+ * @returns The subscription to the clear-bag request.
1543
1614
  */
1544
- getTeamMembers(params: ClipperTeamsSearchParams): rxjs.Observable<ApiResult<ClipperTeamMembersSearchResult>>;
1615
+ clearBag(): rxjs.Subscription;
1545
1616
  /**
1546
- * Removes the specified members from the team.
1547
- * @param teamId - The ID of the team.
1548
- * @param ids - The numeric IDs of the team members to remove.
1617
+ * Retrieves the saved searches for the given module.
1618
+ * @param module - The Clipper module whose saved searches to load.
1619
+ * @returns An observable emitting the API result wrapping the list of saved searches.
1549
1620
  */
1550
- deleteTeamMembers(teamId: string, ids: number[]): rxjs.Observable<ApiResult<number>>;
1621
+ loadSearches(module: ClipperModule): rxjs.Observable<ApiResult<ClipperUserSearch[]>>;
1551
1622
  /**
1552
- * Creates or updates a team member record.
1553
- * @param item - The team member data to save.
1623
+ * Persists a user search configuration on the server.
1624
+ * @param params - The search configuration to save.
1625
+ * @returns An observable emitting the API result wrapping the saved search.
1554
1626
  */
1555
- saveTeamMember(item: ClipperTeamMemberInfo): rxjs.Observable<ApiResult<ClipperTeamMemberInfo>>;
1627
+ saveSearch(params: ClipperUserSearch): rxjs.Observable<ApiResult<ClipperUserSearch>>;
1556
1628
  /**
1557
- * Retrieves contacts matching the given search parameters.
1558
- * @param params - The contacts search parameters.
1629
+ * Deletes a saved search by its ID.
1630
+ * @param id - The ID of the saved search to remove.
1631
+ * @returns An observable emitting the API result wrapping the number of deleted searches.
1559
1632
  */
1560
- queryContacts(params: ClipperContactsSearchParams): rxjs.Observable<ApiResult<QueryResultModel<ClipperContactInfo>>>;
1633
+ deleteSearch(id: number): rxjs.Observable<ApiResult<number>>;
1634
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperDocumentsService, never>;
1635
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperDocumentsService>;
1636
+ }
1637
+
1638
+ /**
1639
+ * Authentication: credential / OAuth2 login, MFA confirmation, logout and OTP.
1640
+ * Shared login context, channels and the logged-in flag live in `ClipperCoreService`.
1641
+ */
1642
+ declare class ClipperLoginService {
1643
+ private readonly httpClient;
1644
+ private readonly broadcastService;
1645
+ private readonly splashService;
1646
+ private readonly core;
1561
1647
  /**
1562
- * Deletes the specified contacts.
1563
- * @param ids - The numeric IDs of the contacts to remove.
1648
+ * Attempts an automatic login using the credentials currently stored in session storage.
1649
+ * @param onSuccess - Optional callback invoked with the login result value on success.
1564
1650
  */
1565
- deleteContacts(ids: number[]): rxjs.Observable<ApiResult<number>>;
1651
+ autoLogin(onSuccess?: (value?: any) => void): void;
1566
1652
  /**
1567
- * Creates or updates a contact record.
1568
- * @param item - The contact data to save.
1653
+ * Performs an automatic logout and clears the stored session.
1654
+ * @param onSuccess - Optional callback invoked after a successful logout.
1569
1655
  */
1570
- saveContact(item: ClipperContactInfo): rxjs.Observable<ApiResult<ClipperContactInfo>>;
1656
+ autoLogout(onSuccess?: () => void): void;
1571
1657
  /**
1572
- * Retrieves document notes matching the given search parameters.
1573
- * @param params - The notes search parameters.
1658
+ * Authenticates the user against the Clipper API, supporting both credential-based and
1659
+ * OAuth2 login flows.
1660
+ * @param email - The user's email address (credential login only).
1661
+ * @param password - The user's password (credential login only).
1662
+ * @param remember - When `true`, the session is remembered across browser restarts.
1663
+ * @param oauth - The OAuth2 provider type, when authenticating via SSO.
1664
+ * @param oauthAccessToken - The OAuth2 bearer token. Defaults to the value stored in session storage.
1665
+ * @returns An observable emitting the API result wrapping the login result.
1574
1666
  */
1575
- queryNotes(params: ClipperNotesSearchParams): rxjs.Observable<ApiResult<ClipperNotesSearchResult>>;
1667
+ login(email?: string, password?: string, remember?: boolean, oauth?: LoginOAuthType, oauthAccessToken?: string | undefined): rxjs.Observable<ApiResult<ClipperLoginResult>>;
1576
1668
  /**
1577
- * Deletes the specified document notes.
1578
- * @param ids - The numeric IDs of the notes to remove.
1669
+ * Finalises the login flow by updating the stored context, setting the logged-in signal,
1670
+ * initialising channels, and broadcasting `LOGIN_COMPLETED`.
1671
+ * @param result - The login result returned by the API.
1579
1672
  */
1580
- deleteNotes(ids: number[]): rxjs.Observable<ApiResult<number>>;
1673
+ private completeLogin;
1581
1674
  /**
1582
- * Creates or updates a document note.
1583
- * @param item - The note data to save.
1675
+ * Submits the MFA confirmation code to complete a two-factor login flow.
1676
+ * @param code - The one-time confirmation code provided to the user.
1677
+ * @returns An observable emitting the API result wrapping the login result.
1584
1678
  */
1585
- saveNote(item: ClipperDocumentNote): rxjs.Observable<ApiResult<ClipperDocumentNote>>;
1679
+ confirmIdentity(code: string): rxjs.Observable<ApiResult<ClipperLoginResult>>;
1586
1680
  /**
1587
- * Retrieves the tracking history for the given document note.
1588
- * @param id - The numeric ID of the note whose tracking records to retrieve.
1681
+ * Logs the user out and clears the current session.
1682
+ * @param forget - When `true`, all stored user credentials are also removed.
1683
+ * @returns An observable that completes once the logout request has been processed.
1589
1684
  */
1590
- getNoteTrackings(id: number): rxjs.Observable<ApiResult<ClipperDocumentNoteTracking[]>>;
1685
+ logout(forget?: boolean): rxjs.Observable<any>;
1591
1686
  /**
1592
- * Gets the count of troubled tracking notifications for document notes,
1593
- * which can be used to display an unread counter in the UI.
1687
+ * Requests a new one-time password for the given repository.
1688
+ * @param id - The repository ID for which the OTP should be generated.
1689
+ * @returns An observable emitting the API result wrapping the generated OTP info.
1594
1690
  */
1595
- countNotesTrackingsTroubled(): rxjs.Observable<ApiResult<number>>;
1596
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipperService, never>;
1597
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClipperService>;
1691
+ newOTP(id: string): rxjs.Observable<ApiResult<ClipperOTPInfo>>;
1692
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperLoginService, never>;
1693
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperLoginService>;
1694
+ }
1695
+
1696
+ /**
1697
+ * Barrel / facade for the Clipper application.
1698
+ *
1699
+ * Exposes the feature services as named properties and re-exports the shared state
1700
+ * declared in `ClipperCoreService`. Inject `ClipperService` and reach a feature via
1701
+ * its property, e.g. `clipper.login.login(...)`, `clipper.documents.query(...)`,
1702
+ * `clipper.calendar.queryCalendar(...)`.
1703
+ */
1704
+ declare class ClipperService {
1705
+ private readonly core;
1706
+ /** Authentication: login/logout, MFA, OTP. */
1707
+ readonly session: ClipperLoginService;
1708
+ /** Document search, references, export, dashboard, working-documents bag and saved searches. */
1709
+ readonly documents: ClipperDocumentsService;
1710
+ /** Account settings, password, channels, trial info and user links. */
1711
+ readonly account: ClipperAccountService;
1712
+ /** Archive folders and files. */
1713
+ readonly archive: ClipperArchiveService;
1714
+ /** Calendar deadlines. */
1715
+ readonly calendar: ClipperCalendarService;
1716
+ /** Teams, contacts and shared notes. */
1717
+ readonly collaboration: ClipperCollaborationService;
1718
+ /** @returns The URI of the Clipper web application, or `undefined` if not set. */
1719
+ get appUri(): string | undefined;
1720
+ /** @returns The base URI of the Clipper REST API. */
1721
+ get serviceUri(): string;
1722
+ /** @returns The active feature flags. */
1723
+ get flags(): ClipperServiceFlags;
1724
+ /** @returns The current login context, or `undefined` if not authenticated. */
1725
+ get loginInfo(): ClipperLoginInfo | undefined;
1726
+ /** @returns A read-only signal indicating whether the user is logged in. */
1727
+ get loggedIn(): Signal<boolean>;
1728
+ /** @returns A signal indicating whether a login is in progress. */
1729
+ get loggingIn(): WritableSignal<boolean>;
1730
+ /** @returns A signal holding the current documents search snapshot. */
1731
+ get snapshot(): WritableSignal<ClipperSearchResult | undefined>;
1732
+ /** @returns A signal indicating whether reference search is supported. */
1733
+ get supportsRS(): WritableSignal<boolean>;
1734
+ /** @returns A signal holding the current references search snapshot. */
1735
+ get referencesSnapshot(): WritableSignal<ClipperSearchResult | undefined>;
1736
+ /** @returns The shared dashboard state object. */
1737
+ get dashboard(): ClipperDashboard;
1738
+ /** @returns A signal holding the working-documents bag. */
1739
+ get bag(): WritableSignal<ClipperDocumentInfo[]>;
1740
+ /** @returns A computed signal with the number of items in the bag. */
1741
+ get bagTotal(): Signal<number>;
1742
+ /** @returns A signal controlling the Clipper UI visibility. */
1743
+ get visible(): WritableSignal<boolean>;
1744
+ /** @returns The shared teams collection. */
1745
+ get teams(): NameValueItem<string>[];
1746
+ /** @returns A signal holding the available channels. */
1747
+ get availableChannels(): WritableSignal<ClipperAvailableChannel[]>;
1748
+ /** @returns A computed signal with the currently active channels. */
1749
+ get activeChannels(): Signal<ClipperAvailableChannel[]>;
1750
+ /** @returns A signal indicating whether tagging is allowed. */
1751
+ get allowTags(): WritableSignal<boolean>;
1752
+ /** @returns A signal with the number of pending notes, or `undefined` if unknown. */
1753
+ get pendingNotes(): WritableSignal<number | undefined>;
1754
+ /**
1755
+ * Initialises the application with the API base URI, optional app URI, and feature flags.
1756
+ * @param serviceUri - The base URI of the Clipper REST API.
1757
+ * @param appUri - Optional URI of the Clipper web application (used to build document links).
1758
+ * @param flags - Feature flags that control service behaviour. Defaults to `ClipperServiceFlags.None`.
1759
+ */
1760
+ initialize(serviceUri: string, appUri?: string, flags?: ClipperServiceFlags): void;
1761
+ /**
1762
+ * Pings the Clipper REST API to keep the session/token alive.
1763
+ */
1764
+ ping(): void;
1765
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClipperService, never>;
1766
+ static ɵprov: i0.ɵɵInjectableDeclaration<ClipperService>;
1598
1767
  }
1599
1768
 
1600
- export { ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryDocumentFlags, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils, NotesColors };
1769
+ export { ClipperAccountService, ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperArchiveService, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarService, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperCollaborationService, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperDocumentsService, ClipperExportDocumentsFormat, ClipperFacet, ClipperLoginService, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryDocumentFlags, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils, NotesColors };
1601
1770
  export type { ClipperArchiveFileInfo, ClipperArchiveFilesCopyParams, ClipperArchiveFilesDeleteParams, ClipperArchiveFilesSearchResult, ClipperArchiveFolderTree, ClipperArchiveFoldersImportParams, ClipperArchiveFoldersSearchResult, ClipperArsEventInfo, ClipperAvailableChannel, ClipperCalendarCopyDeadlinesParams, ClipperCalendarSaveDeadlineParams, ClipperCalendarSearchResult, ClipperChannelSettingsItem, ClipperContactInfo, ClipperContactsSearchParams, ClipperDashboardItem, ClipperDashboardModelItem, ClipperDashboardResult, ClipperDayGroup, ClipperDayItem, ClipperDeadlineInfo, ClipperDeleteWorkingDocumentsParams, ClipperDocumentAnchorInfo, ClipperDocumentInfo, ClipperDocumentNote, ClipperDocumentNoteTracking, ClipperDocumentRelevantChunkHit, ClipperDocumentRelevants, ClipperDocumentStructure, ClipperDocumentUpdateStateParams, ClipperExportDocumentsParams, ClipperLastDaysResult, ClipperLoginInfo, ClipperLoginResult, ClipperNotesSearchParams, ClipperNotesSearchResult, ClipperNotifyDocumentNoteParams, ClipperOTPInfo, ClipperReferencesSearchParams, ClipperSearchArsEventsParams, ClipperSearchArsEventsResult, ClipperSearchCalendarSnapshotMonth, ClipperSearchFacet, ClipperSearchFacetGroup, ClipperSearchFacetsResult, ClipperSearchFilter, ClipperSendDocumentsByEmailParams, ClipperSettingsInfo, ClipperTaxonomyParams, ClipperTeamMemberInfo, ClipperTeamMembersSearchResult, ClipperTeamProductInfo, ClipperTeamsSearchParams, ClipperTeamsSearchResult, ClipperTopicInfo, ClipperUserChannelInfo, ClipperUserInfo, ClipperUserLink, ClipperUserSearch, ClipperUserTrialInfo, ClipperUserWorkingDocument, EditDialogCompleted, EditDialogData, EditedEventArgs, SectorInfo };