@coolms/core-angular 2.0.0-alpha.5 → 2.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,166 +1,167 @@
1
- import * as rxjs from 'rxjs';
2
- import { Observable, Subject } from 'rxjs';
3
- import * as i0 from '@angular/core';
4
- import { InjectionToken, Type, Provider, EnvironmentProviders } from '@angular/core';
5
- import { StateContext } from '@ngxs/store';
6
- import { CanActivateFn, Routes, CanMatchFn } from '@angular/router';
7
- import { HttpContextToken, HttpInterceptorFn } from '@angular/common/http';
8
-
9
- interface AuthApiManifest {
10
- readonly login: string;
11
- readonly logout: string;
12
- readonly refresh: string;
13
- readonly register: string;
14
- readonly me: string;
15
- readonly usersApi?: string;
16
- readonly groupsApi?: string;
17
- readonly preferencesUrl?: string;
18
- readonly groupFormId?: string | null;
19
- readonly userFormId?: string | null;
20
- }
21
- interface SectionApiManifest {
22
- readonly list: string;
23
- readonly create: string;
24
- readonly item: string;
25
- readonly update: string;
26
- readonly delete: string;
27
- readonly formId?: string;
28
- readonly apply?: string;
29
- }
30
- interface NaviApiManifest {
31
- readonly treesList: string;
32
- readonly treesCreate: string;
33
- readonly treesItem: string;
34
- readonly nodesList: string;
35
- readonly nodesCreate: string;
36
- readonly nodesItem: string;
37
- readonly nodesReorder: string;
38
- readonly nodesMove: string;
39
- readonly nodesByTree: string;
40
- readonly treesFormId?: string;
41
- readonly nodesFormId?: string;
42
- readonly adminNavGraph?: string;
43
- readonly topbarNavGraph?: string;
44
- readonly toolbarVfsGraph?: string;
45
- readonly graphBySlug?: string;
46
- }
47
- interface ContentApiManifest {
48
- readonly variantPublishUrl: string;
49
- readonly pageSpacesUrl?: string;
50
- readonly pageTypesUrl?: string;
51
- }
52
- interface DataGridApiManifest {
53
- readonly configBase: string;
54
- }
55
- interface TerminalApiManifest {
56
- readonly executeUrl: string;
57
- readonly completeUrl: string;
58
- }
59
- interface MediaApiManifest {
60
- readonly listUrl: string;
61
- readonly itemUrl: string;
62
- readonly permissionsUrl: string;
63
- readonly regenerateUrl: string;
64
- readonly resizeUrl: string;
65
- readonly collectionsUrl: string;
66
- readonly collectionsCreateUrl: string;
67
- readonly collectionPermissionsUrl: string;
68
- readonly moveUrl?: string;
69
- readonly spacesUrl?: string;
70
- }
71
- interface VfsApiManifest {
72
- readonly fileContentUrl: string;
73
- readonly binaryWriteUrl: string;
1
+ import * as i0 from "@angular/core";
2
+ import { EnvironmentProviders, InjectionToken, Provider, Type } from "@angular/core";
3
+ import { Observable, Subject } from "rxjs";
4
+ import { StateContext } from "@ngxs/store";
5
+ import { CanActivateFn, CanMatchFn, Routes } from "@angular/router";
6
+ import { HttpContextToken, HttpErrorResponse, HttpInterceptorFn, HttpRequest } from "@angular/common/http";
7
+ export interface AuthApiManifest {
8
+ readonly login: string;
9
+ readonly logout: string;
10
+ readonly refresh: string;
11
+ readonly register: string;
12
+ readonly me: string;
13
+ readonly usersApi?: string;
14
+ readonly groupsApi?: string;
15
+ readonly preferencesUrl?: string;
16
+ readonly groupFormId?: string | null;
17
+ readonly userFormId?: string | null;
18
+ }
19
+ export interface SectionApiManifest {
20
+ readonly list: string;
21
+ readonly create: string;
22
+ readonly item: string;
23
+ readonly update: string;
24
+ readonly delete: string;
25
+ readonly formId?: string;
26
+ readonly apply?: string;
27
+ }
28
+ export interface NaviApiManifest {
29
+ readonly treesList: string;
30
+ readonly treesCreate: string;
31
+ readonly treesItem: string;
32
+ readonly nodesList: string;
33
+ readonly nodesCreate: string;
34
+ readonly nodesItem: string;
35
+ readonly nodesReorder: string;
36
+ readonly nodesMove: string;
37
+ readonly nodesByTree: string;
38
+ readonly treesFormId?: string;
39
+ readonly nodesFormId?: string;
40
+ readonly adminNavGraph?: string;
41
+ readonly topbarNavGraph?: string;
42
+ readonly toolbarVfsGraph?: string;
43
+ readonly graphBySlug?: string;
44
+ }
45
+ export interface ContentApiManifest {
46
+ readonly variantPublishUrl: string;
47
+ readonly pageSpacesUrl?: string;
48
+ readonly pageTypesUrl?: string;
49
+ }
50
+ export interface DataGridApiManifest {
51
+ readonly configBase: string;
52
+ }
53
+ export interface TerminalApiManifest {
54
+ readonly executeUrl: string;
55
+ readonly completeUrl: string;
56
+ }
57
+ export interface MediaApiManifest {
58
+ readonly listUrl: string;
59
+ readonly itemUrl: string;
60
+ readonly permissionsUrl: string;
61
+ readonly regenerateUrl: string;
62
+ readonly resizeUrl: string;
63
+ readonly collectionsUrl: string;
64
+ readonly collectionsCreateUrl: string;
65
+ readonly collectionPermissionsUrl: string;
66
+ readonly moveUrl?: string;
67
+ readonly spacesUrl?: string;
68
+ }
69
+ export interface VfsApiManifest {
70
+ readonly fileContentUrl: string;
71
+ readonly binaryWriteUrl: string;
74
72
  }
75
73
  /**
76
74
  * Document module URL section. Today the only entry is `spacesUrl`;
77
75
  * the struct is reserved so future Document-module URLs can land
78
76
  * here without a new manifest section.
79
77
  */
80
- interface DocumentApiManifest {
81
- readonly spacesUrl?: string;
82
- /**
83
- * !! Carried here rather than derived from `spacesUrl`. Concatenating
84
- * `/available` onto that would couple the client to a URL shape the router
85
- * owns, and it would keep working until the route moved -- then fail as a
86
- * 404 the UI reports as "no sites available", which is indistinguishable
87
- * from the true empty answer.
88
- *
89
- * !! ABSENT ARRIVES AS `''`, NOT `undefined`. The producer declares these
90
- * as non-nullable strings defaulting to empty, so an installation that has
91
- * not set them sends an empty string and the `?` here never fires.
92
- *
93
- * Guard on FALSINESS -- `!url`, `Boolean(url)`. The dangerous rewrite is
94
- * `url === undefined` (or `!== undefined`), which reads as more precise and
95
- * treats `''` as present, handing a caller a request to the empty string.
96
- *
97
- * !! A `?? fallback` is NOT the hazard, though it looks like the obvious
98
- * one: `'' ?? x` is `''`, so a fallback never fires on the value this
99
- * producer actually sends. Measured by mutation -- adding one changed
100
- * nothing, changing the guard broke three assertions.
101
- */
102
- readonly spacesAvailableUrl?: string;
103
- readonly spaceEnablementUrl?: string;
104
- /**
105
- * FQCN of the entity a filter-mode audience can be built from.
106
- *
107
- * !! The SERVER owns this and the client must not know it. The generation
108
- * wizard offers Filter mode only when a template's context schema
109
- * references this type, and it used to compare against a constant compiled
110
- * into this bundle -- which shipped the consuming application's class name
111
- * inside a published package, and tied that package to an installation
112
- * having that exact class.
113
- *
114
- * !! Absent arrives as `''`, like the urls above. Treat empty as **filter
115
- * mode unavailable**, never as a reason to fall back to a remembered
116
- * value: the server is the thing that rejects every other type, so a guess
117
- * here offers a mode the server will refuse.
118
- */
119
- readonly filterAudienceEntity?: string;
120
- }
121
- interface DynamicEntityApiManifest {
122
- readonly typesUrl: string;
123
- readonly fieldDefinitionsUrl: string;
124
- readonly fieldDefinitionUrl: string;
125
- readonly fieldDefinitionsReorderUrl: string;
126
- readonly toolbarNaviGraphUrl: string;
127
- readonly constraintsUrl: string;
128
- readonly recordsUrl: string;
129
- readonly recordUrl: string;
130
- readonly recordsByTypeUrl: string;
131
- readonly typeUrl: string;
132
- readonly typesCreateUrl: string;
133
- readonly formTypesUrl?: string;
134
- readonly typeByAliasUrl?: string;
135
- }
136
- interface DomainExplorerApiManifest {
137
- readonly entitiesUrl: string;
138
- readonly entityUrl: string;
139
- readonly toolbarNaviGraphUrl: string;
140
- readonly domainExplorerToolbarUrl: string;
141
- readonly entityFieldsDataGridUrl?: string;
142
- readonly typeFieldsDataGridUrl?: string;
143
- }
144
- interface IdentityApiManifest {
145
- readonly usersUrl: string;
146
- readonly userUrl: string;
147
- readonly groupsUrl: string;
148
- readonly groupUrl: string;
149
- readonly meUrl: string;
150
- readonly assignGroupsUrl: string;
151
- readonly avatarUploadUrl: string;
152
- readonly settingsUrl: string;
153
- readonly settingsSectionsUrl: string;
154
- readonly settingsSectionUrl: string;
155
- readonly colorUrl: string;
156
- readonly rolesUrl?: string;
157
- readonly elevationUrl?: string;
158
- readonly deletionsUrl?: string;
159
- readonly footprintsUrl?: string;
160
- readonly userDeletionUrl?: string;
161
- readonly userLegalHoldsUrl?: string;
162
- readonly holdsSettingsBlock?: string;
163
- readonly legalHoldFormId?: string | null;
78
+ export interface DocumentApiManifest {
79
+ readonly spacesUrl?: string;
80
+ /**
81
+ * !! Carried here rather than derived from `spacesUrl`. Concatenating
82
+ * `/available` onto that would couple the client to a URL shape the router
83
+ * owns, and it would keep working until the route moved -- then fail as a
84
+ * 404 the UI reports as "no sites available", which is indistinguishable
85
+ * from the true empty answer.
86
+ *
87
+ * !! ABSENT ARRIVES AS `''`, NOT `undefined`. The producer declares these
88
+ * as non-nullable strings defaulting to empty, so an installation that has
89
+ * not set them sends an empty string and the `?` here never fires.
90
+ *
91
+ * Guard on FALSINESS -- `!url`, `Boolean(url)`. The dangerous rewrite is
92
+ * `url === undefined` (or `!== undefined`), which reads as more precise and
93
+ * treats `''` as present, handing a caller a request to the empty string.
94
+ *
95
+ * !! A `?? fallback` is NOT the hazard, though it looks like the obvious
96
+ * one: `'' ?? x` is `''`, so a fallback never fires on the value this
97
+ * producer actually sends. Measured by mutation -- adding one changed
98
+ * nothing, changing the guard broke three assertions.
99
+ */
100
+ readonly spacesAvailableUrl?: string;
101
+ readonly spaceEnablementUrl?: string;
102
+ /**
103
+ * FQCN of the entity a filter-mode audience can be built from.
104
+ *
105
+ * !! The SERVER owns this and the client must not know it. The generation
106
+ * wizard offers Filter mode only when a template's context schema
107
+ * references this type, and it used to compare against a constant compiled
108
+ * into this bundle -- which shipped the consuming application's class name
109
+ * inside a published package, and tied that package to an installation
110
+ * having that exact class.
111
+ *
112
+ * !! Absent arrives as `''`, like the urls above. Treat empty as **filter
113
+ * mode unavailable**, never as a reason to fall back to a remembered
114
+ * value: the server is the thing that rejects every other type, so a guess
115
+ * here offers a mode the server will refuse.
116
+ */
117
+ readonly filterAudienceEntity?: string;
118
+ }
119
+ export interface DynamicEntityApiManifest {
120
+ readonly typesUrl: string;
121
+ readonly fieldDefinitionsUrl: string;
122
+ readonly fieldDefinitionUrl: string;
123
+ readonly fieldDefinitionsReorderUrl: string;
124
+ readonly toolbarNaviGraphUrl: string;
125
+ readonly constraintsUrl: string;
126
+ readonly recordsUrl: string;
127
+ readonly recordUrl: string;
128
+ readonly recordsByTypeUrl: string;
129
+ readonly typeUrl: string;
130
+ readonly typesCreateUrl: string;
131
+ readonly formTypesUrl?: string;
132
+ readonly typeByAliasUrl?: string;
133
+ }
134
+ export interface DomainExplorerApiManifest {
135
+ readonly entitiesUrl: string;
136
+ readonly entityUrl: string;
137
+ readonly toolbarNaviGraphUrl: string;
138
+ readonly domainExplorerToolbarUrl: string;
139
+ readonly entityFieldsDataGridUrl?: string;
140
+ readonly typeFieldsDataGridUrl?: string;
141
+ }
142
+ export interface IdentityApiManifest {
143
+ readonly usersUrl: string;
144
+ readonly userUrl: string;
145
+ readonly groupsUrl: string;
146
+ readonly groupUrl: string;
147
+ readonly meUrl: string;
148
+ readonly assignGroupsUrl: string;
149
+ readonly avatarUploadUrl: string;
150
+ readonly settingsUrl: string;
151
+ readonly settingsSectionsUrl: string;
152
+ readonly settingsSectionUrl: string;
153
+ readonly colorUrl: string;
154
+ readonly rolesUrl?: string;
155
+ readonly elevationUrl?: string;
156
+ readonly deletionsUrl?: string;
157
+ readonly footprintsUrl?: string;
158
+ readonly userDeletionUrl?: string;
159
+ readonly userLegalHoldsUrl?: string;
160
+ readonly holdsSettingsBlock?: string;
161
+ readonly legalHoldFormId?: string | null;
162
+ readonly sessionsUrl?: string;
163
+ readonly sessionUrl?: string;
164
+ readonly userSessionsUrl?: string;
164
165
  }
165
166
  /**
166
167
  * Editor sub-manifest emitted by the backend's Editor module. The
@@ -172,27 +173,27 @@ interface IdentityApiManifest {
172
173
  * pre-resolved contributor list AND the storage allow-list a sanitizer
173
174
  * enforces on save.
174
175
  */
175
- interface EditorApiManifestEntry {
176
- readonly id: string;
177
- readonly group: string;
178
- readonly priority: number;
179
- readonly icon: string;
180
- readonly label: string;
181
- readonly actionType: string;
182
- readonly actionParams: Readonly<Record<string, unknown>>;
183
- readonly extensions: ReadonlyArray<string>;
184
- readonly stateKeys: ReadonlyArray<string>;
185
- readonly shortcut?: string | null;
186
- readonly slashable?: boolean;
187
- readonly keywords?: ReadonlyArray<string>;
188
- }
189
- interface EditorApiManifestProfile {
190
- readonly contributors: ReadonlyArray<EditorApiManifestEntry>;
191
- readonly allowedWidgets: ReadonlyArray<string>;
192
- }
193
- interface EditorApiManifest {
194
- readonly schemaVersion: number;
195
- readonly profiles: Readonly<Record<string, EditorApiManifestProfile>>;
176
+ export interface EditorApiManifestEntry {
177
+ readonly id: string;
178
+ readonly group: string;
179
+ readonly priority: number;
180
+ readonly icon: string;
181
+ readonly label: string;
182
+ readonly actionType: string;
183
+ readonly actionParams: Readonly<Record<string, unknown>>;
184
+ readonly extensions: ReadonlyArray<string>;
185
+ readonly stateKeys: ReadonlyArray<string>;
186
+ readonly shortcut?: string | null;
187
+ readonly slashable?: boolean;
188
+ readonly keywords?: ReadonlyArray<string>;
189
+ }
190
+ export interface EditorApiManifestProfile {
191
+ readonly contributors: ReadonlyArray<EditorApiManifestEntry>;
192
+ readonly allowedWidgets: ReadonlyArray<string>;
193
+ }
194
+ export interface EditorApiManifest {
195
+ readonly schemaVersion: number;
196
+ readonly profiles: Readonly<Record<string, EditorApiManifestProfile>>;
196
197
  }
197
198
  /**
198
199
  * Viewer manifest emitted by the backend's Document module.
@@ -201,39 +202,39 @@ interface EditorApiManifest {
201
202
  * profile. Profile config is open-ended -- every viewer interprets the
202
203
  * keys it understands and ignores the rest.
203
204
  */
204
- interface ViewerProfileApiManifest {
205
- readonly key: string;
206
- readonly config: Readonly<Record<string, unknown>>;
205
+ export interface ViewerProfileApiManifest {
206
+ readonly key: string;
207
+ readonly config: Readonly<Record<string, unknown>>;
207
208
  }
208
- interface ViewerDefinitionApiManifest {
209
- readonly key: string;
210
- readonly mimeTypes: ReadonlyArray<string>;
211
- readonly extensions: ReadonlyArray<string>;
212
- readonly component: string;
213
- readonly profiles: Readonly<Record<string, ViewerProfileApiManifest>>;
209
+ export interface ViewerDefinitionApiManifest {
210
+ readonly key: string;
211
+ readonly mimeTypes: ReadonlyArray<string>;
212
+ readonly extensions: ReadonlyArray<string>;
213
+ readonly component: string;
214
+ readonly profiles: Readonly<Record<string, ViewerProfileApiManifest>>;
214
215
  }
215
- interface ViewerApiManifest {
216
- readonly schemaVersion: number;
217
- readonly viewers: Readonly<Record<string, ViewerDefinitionApiManifest>>;
216
+ export interface ViewerApiManifest {
217
+ readonly schemaVersion: number;
218
+ readonly viewers: Readonly<Record<string, ViewerDefinitionApiManifest>>;
218
219
  }
219
220
  /**
220
221
  * Platform-wide default user-facing settings. The
221
222
  * fallback floor for anonymous / pre-login rendering: timezone, date /
222
223
  * time format (CLDR tokens) and week start come from the deployment's
223
224
  * config, not an FE-hardcoded Western default. `locale` is the default
224
- * locale, previously absent from the manifest.
225
+ * locale.
225
226
  */
226
- interface PlatformDefaults {
227
- readonly locale: string;
228
- readonly timezone: string;
229
- readonly dateFormat: string;
230
- readonly timeFormat: '12h' | '24h';
231
- readonly weekStart: 'monday' | 'sunday';
232
- /**
233
- * Deployment brand accent as `#rrggbb`, or null/absent to keep the
234
- * stylesheet's own. Sits BELOW a user's personal accentColor.
235
- */
236
- readonly accentColor?: string | null;
227
+ export interface PlatformDefaults {
228
+ readonly locale: string;
229
+ readonly timezone: string;
230
+ readonly dateFormat: string;
231
+ readonly timeFormat: '12h' | '24h';
232
+ readonly weekStart: 'monday' | 'sunday';
233
+ /**
234
+ * Deployment brand accent as `#rrggbb`, or null/absent to keep the
235
+ * stylesheet's own. Sits BELOW a user's personal accentColor.
236
+ */
237
+ readonly accentColor?: string | null;
237
238
  }
238
239
  /**
239
240
  * The host contracts in force here (the platform rule: hosts implement
@@ -242,58 +243,65 @@ interface PlatformDefaults {
242
243
  * entries the installer matched against it. A host mounts a module only when
243
244
  * it is listed.
244
245
  */
245
- interface UiApiManifest {
246
- /** The contracts in force, name -> MAJOR.MINOR (`{ console: '1.0' }`): one installed theme implements each. */
247
- readonly contracts: Readonly<Record<string, string>>;
248
- /** Which installed theme implements each contract, name -> theme slug. */
249
- readonly hosts?: Readonly<Record<string, string>>;
250
- readonly modules: ReadonlyArray<UiModuleEntryManifest>;
251
- }
252
- interface UiModuleEntryManifest {
253
- readonly module: string;
254
- readonly contract: string;
255
- readonly range: string;
256
- readonly framework: string;
257
- }
258
- interface ApiManifest {
259
- readonly apiBase: string;
260
- readonly ui?: UiApiManifest;
261
- readonly configBase?: string;
262
- readonly auth?: AuthApiManifest;
263
- readonly identity?: IdentityApiManifest;
264
- readonly sections?: SectionApiManifest;
265
- readonly navi?: NaviApiManifest;
266
- readonly content?: ContentApiManifest;
267
- readonly dataGrid?: DataGridApiManifest;
268
- readonly terminal?: TerminalApiManifest;
269
- readonly media?: MediaApiManifest;
270
- readonly document?: DocumentApiManifest;
271
- readonly vfs?: VfsApiManifest;
272
- readonly dynamicEntity?: DynamicEntityApiManifest;
273
- readonly domainExplorer?: DomainExplorerApiManifest;
274
- readonly editor?: EditorApiManifest;
275
- readonly viewers?: ViewerApiManifest;
276
- readonly supportedLocales?: Array<{
277
- code: string;
278
- label: string;
279
- }>;
280
- readonly platformDefaults?: PlatformDefaults;
246
+ export interface UiApiManifest {
247
+ /** The contracts in force, name -> MAJOR.MINOR (`{ console: '1.0' }`): one installed theme implements each. */
248
+ readonly contracts: Readonly<Record<string, string>>;
249
+ /** Which installed theme implements each contract, name -> theme slug. */
250
+ readonly hosts?: Readonly<Record<string, string>>;
251
+ readonly modules: ReadonlyArray<UiModuleEntryManifest>;
252
+ }
253
+ export interface UiModuleEntryManifest {
254
+ readonly module: string;
255
+ readonly contract: string;
256
+ readonly range: string;
257
+ readonly framework: string;
258
+ }
259
+ /**
260
+ * The modules' own blocks of the manifest, by module name (`modules.section`):
261
+ * what a module names that the core entries above do not. Each block is the
262
+ * module's own shape; a client reads the keys it knows and treats a missing
263
+ * module or key as absent. Always an object, `{}` when no module has a block.
264
+ */
265
+ export type ModulesApiManifest = Readonly<Record<string, Readonly<Record<string, unknown>> | undefined>>;
266
+ export interface ApiManifest {
267
+ readonly apiBase: string;
268
+ readonly ui?: UiApiManifest;
269
+ readonly configBase?: string;
270
+ readonly auth?: AuthApiManifest;
271
+ readonly identity?: IdentityApiManifest;
272
+ readonly sections?: SectionApiManifest;
273
+ readonly navi?: NaviApiManifest;
274
+ readonly content?: ContentApiManifest;
275
+ readonly dataGrid?: DataGridApiManifest;
276
+ readonly terminal?: TerminalApiManifest;
277
+ readonly media?: MediaApiManifest;
278
+ readonly document?: DocumentApiManifest;
279
+ readonly vfs?: VfsApiManifest;
280
+ readonly dynamicEntity?: DynamicEntityApiManifest;
281
+ readonly domainExplorer?: DomainExplorerApiManifest;
282
+ readonly editor?: EditorApiManifest;
283
+ readonly viewers?: ViewerApiManifest;
284
+ readonly supportedLocales?: Array<{
285
+ code: string;
286
+ label: string;
287
+ }>;
288
+ readonly platformDefaults?: PlatformDefaults;
289
+ readonly modules?: ModulesApiManifest;
281
290
  }
282
291
  /**
283
292
  * GET /api/v1/admin/manifest -- the admin's endpoint map, answered to every signed-in account
284
- * since 2026-10-06 (no host groups: each call it names is decided by its own route). A server
285
- * from before that answers at /api/v1/console/manifest, to the console group only. Read once
286
- * signed in.
293
+ * (each call it names is decided by its own route). An older server answers at
294
+ * /api/v1/console/manifest, to the console group only. Read once signed in.
287
295
  */
288
- interface ConsoleManifestResponse {
289
- readonly manifest: ApiManifest;
296
+ export interface ConsoleManifestResponse {
297
+ readonly manifest: ApiManifest;
290
298
  }
291
- interface ThemeConfigResponse {
292
- readonly slug?: string | null;
293
- readonly feStack?: string | null;
294
- readonly spaFramework?: string | null;
295
- readonly assetsUrl?: string | null;
296
- readonly manifest: ApiManifest;
299
+ export interface ThemeConfigResponse {
300
+ readonly slug?: string | null;
301
+ readonly feStack?: string | null;
302
+ readonly spaFramework?: string | null;
303
+ readonly assetsUrl?: string | null;
304
+ readonly manifest: ApiManifest;
297
305
  }
298
306
  /**
299
307
  * Replaces {param} tokens in a URL pattern with encoded values.
@@ -302,8 +310,7 @@ interface ThemeConfigResponse {
302
310
  * resolvePattern(manifest.sections!.item, { id: '123' })
303
311
  * // -> '/api/v1/sections/123'
304
312
  */
305
- declare function resolvePattern(pattern: string, params: Record<string, string>): string;
306
-
313
+ export declare function resolvePattern(pattern: string, params: Record<string, string>): string;
307
314
  /**
308
315
  * Shapes the user-preference store persists.
309
316
  *
@@ -316,140 +323,136 @@ declare function resolvePattern(pattern: string, params: Record<string, string>)
316
323
  * keeps its own local path and nothing that reads a grid preference had to
317
324
  * change.
318
325
  */
319
- interface DataGridPreference {
320
- columns?: string[];
321
- columnWidths?: Record<string, number>;
326
+ export interface DataGridPreference {
327
+ columns?: string[];
328
+ columnWidths?: Record<string, number>;
322
329
  }
323
- type DataGridPreferences = Record<string, DataGridPreference>;
324
-
330
+ export type DataGridPreferences = Record<string, DataGridPreference>;
325
331
  /**
326
332
  * Session and current-user DTOs.
327
333
  *
328
334
  * They live in core because core runs the session: the NGXS auth state, the
329
335
  * refresh coordinator and the cross-tab sync are all here, and all three name
330
- * these shapes. They used to be declared inside the admin's `ApiService`, which
331
- * meant core imported a 2410-line client to read two interfaces.
336
+ * these shapes, so core needs no import of the admin's `ApiService` to read them.
332
337
  *
333
338
  * `ApiService` re-exports them from its own module, so the feature files that
334
339
  * import `UserDto` from there are untouched.
335
340
  */
336
- interface TokenResponse {
337
- accessToken: string;
338
- refreshToken: string;
339
- expiresAt: string;
340
- user?: UserDto;
341
- }
342
- interface UserDto {
343
- id: string;
344
- email: string;
345
- identifier?: string;
346
- roles: string[];
347
- uiPrefs?: DataGridPreferences;
348
- avatarUrl?: string | null;
349
- firstName?: string | null;
350
- lastName?: string | null;
351
- fullName?: string;
352
- }
353
-
354
- type FieldType = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'toggle' | 'date' | 'time' | 'hidden' | 'relation' | 'subform' | 'token-pattern' | 'richtext' | 'localizedText' | 'localizedTextarea' | 'optionsEditor' | 'intlPhone' | 'color';
355
- type DataSourceType = 'static' | 'enum' | 'api' | 'repo';
356
- type VisibilityOperator = 'eq' | 'ne' | 'in' | 'notIn' | 'empty' | 'notEmpty';
357
- interface VisibilityCondition {
358
- readonly field: string;
359
- readonly operator: VisibilityOperator;
360
- readonly value?: unknown;
361
- }
362
- type DataSourceWidget = 'select' | 'select-search' | 'select-tree' | 'token-input' | 'media-picker';
363
- type DataSourceLoading = 'eager' | 'lazy';
364
- interface DataSourceOption {
365
- readonly value: unknown;
366
- readonly label: string;
367
- readonly parentId?: string | null;
368
- }
369
- interface DataSourceDefinition {
370
- readonly type: DataSourceType;
371
- readonly bindValue: string;
372
- readonly bindLabel: string;
373
- readonly multiple: boolean;
374
- readonly maxItems?: number;
375
- readonly options?: ReadonlyArray<DataSourceOption>;
376
- readonly url?: string;
377
- readonly widget: DataSourceWidget;
378
- readonly loading: DataSourceLoading;
379
- /** Free-form widget-specific configuration block populated from YAML
380
- * `dataSource.widgetOptions`. Used by media-picker for bindTarget /
381
- * display / accept / recentlyUsed / hoverPreview, and reserved for
382
- * future custom widgets. Kept separate from `options` (which is the
383
- * static-option list) to avoid key collisions. */
384
- readonly widgetOptions?: Readonly<Record<string, unknown>>;
385
- }
386
- interface ValidatorDefinition {
387
- readonly type: string;
388
- readonly value?: unknown;
389
- readonly message?: string;
390
- }
391
- interface RelationDefinition {
392
- readonly cardinality: 'one' | 'many';
393
- readonly maxItems?: number;
394
- readonly targetFormId?: string;
395
- readonly dataSource?: DataSourceDefinition;
396
- }
397
- interface SubFormDefinition {
398
- readonly formId: string;
399
- readonly relation: 'one' | 'many';
400
- readonly maxItems?: number;
401
- }
402
- interface FieldSecurityPolicy {
403
- readonly read: ReadonlyArray<string>;
404
- readonly write: ReadonlyArray<string>;
405
- }
406
- interface FieldItem {
407
- readonly alias: string;
408
- readonly type: FieldType;
409
- readonly label: string;
410
- readonly placeholder?: string;
411
- readonly hint?: string;
412
- readonly required: boolean;
413
- readonly readonly: boolean;
414
- readonly locked: boolean;
415
- readonly private: boolean;
416
- readonly validators: ReadonlyArray<ValidatorDefinition>;
417
- readonly dataSource?: DataSourceDefinition;
418
- readonly relation?: RelationDefinition;
419
- readonly subForm?: SubFormDefinition;
420
- readonly separators?: ReadonlyArray<string>;
421
- readonly security?: FieldSecurityPolicy | null;
422
- readonly autocomplete?: string;
423
- }
424
- interface LayoutNode {
425
- readonly type: 'group' | 'grid' | 'column' | 'tabs' | 'tab' | (string & {});
426
- readonly name?: string;
427
- readonly description?: string;
428
- readonly compact?: boolean;
429
- readonly width?: number;
430
- readonly children?: ReadonlyArray<LayoutNode>;
431
- readonly showWhen?: VisibilityCondition;
432
- }
433
- type FormActionType = 'submit' | 'button' | 'reset';
434
- type FormActionVariant = 'primary' | 'secondary' | 'danger' | 'link';
341
+ export interface TokenResponse {
342
+ accessToken: string;
343
+ refreshToken: string;
344
+ expiresAt: string;
345
+ user?: UserDto;
346
+ }
347
+ export interface UserDto {
348
+ id: string;
349
+ email: string;
350
+ identifier?: string;
351
+ roles: string[];
352
+ uiPrefs?: DataGridPreferences;
353
+ avatarUrl?: string | null;
354
+ firstName?: string | null;
355
+ lastName?: string | null;
356
+ fullName?: string;
357
+ }
358
+ export type FieldType = 'text' | 'email' | 'password' | 'number' | 'textarea' | 'select' | 'toggle' | 'date' | 'time' | 'hidden' | 'relation' | 'subform' | 'token-pattern' | 'richtext' | 'localizedText' | 'localizedTextarea' | 'optionsEditor' | 'intlPhone' | 'color';
359
+ export type DataSourceType = 'static' | 'enum' | 'api' | 'repo';
360
+ export type VisibilityOperator = 'eq' | 'ne' | 'in' | 'notIn' | 'empty' | 'notEmpty';
361
+ export interface VisibilityCondition {
362
+ readonly field: string;
363
+ readonly operator: VisibilityOperator;
364
+ readonly value?: unknown;
365
+ }
366
+ export type DataSourceWidget = 'select' | 'select-search' | 'select-tree' | 'token-input' | 'media-picker';
367
+ export type DataSourceLoading = 'eager' | 'lazy';
368
+ export interface DataSourceOption {
369
+ readonly value: unknown;
370
+ readonly label: string;
371
+ readonly parentId?: string | null;
372
+ }
373
+ export interface DataSourceDefinition {
374
+ readonly type: DataSourceType;
375
+ readonly bindValue: string;
376
+ readonly bindLabel: string;
377
+ readonly multiple: boolean;
378
+ readonly maxItems?: number;
379
+ readonly options?: ReadonlyArray<DataSourceOption>;
380
+ readonly url?: string;
381
+ readonly widget: DataSourceWidget;
382
+ readonly loading: DataSourceLoading;
383
+ /** Free-form widget-specific configuration block populated from YAML
384
+ * `dataSource.widgetOptions`. Used by media-picker for bindTarget /
385
+ * display / accept / recentlyUsed / hoverPreview, and reserved for
386
+ * future custom widgets. Kept separate from `options` (which is the
387
+ * static-option list) to avoid key collisions. */
388
+ readonly widgetOptions?: Readonly<Record<string, unknown>>;
389
+ }
390
+ export interface ValidatorDefinition {
391
+ readonly type: string;
392
+ readonly value?: unknown;
393
+ readonly message?: string;
394
+ }
395
+ export interface RelationDefinition {
396
+ readonly cardinality: 'one' | 'many';
397
+ readonly maxItems?: number;
398
+ readonly targetFormId?: string;
399
+ readonly dataSource?: DataSourceDefinition;
400
+ }
401
+ export interface SubFormDefinition {
402
+ readonly formId: string;
403
+ readonly relation: 'one' | 'many';
404
+ readonly maxItems?: number;
405
+ }
406
+ export interface FieldSecurityPolicy {
407
+ readonly read: ReadonlyArray<string>;
408
+ readonly write: ReadonlyArray<string>;
409
+ }
410
+ export interface FieldItem {
411
+ readonly alias: string;
412
+ readonly type: FieldType;
413
+ readonly label: string;
414
+ readonly placeholder?: string;
415
+ readonly hint?: string;
416
+ readonly required: boolean;
417
+ readonly readonly: boolean;
418
+ readonly locked: boolean;
419
+ readonly private: boolean;
420
+ readonly validators: ReadonlyArray<ValidatorDefinition>;
421
+ readonly dataSource?: DataSourceDefinition;
422
+ readonly relation?: RelationDefinition;
423
+ readonly subForm?: SubFormDefinition;
424
+ readonly separators?: ReadonlyArray<string>;
425
+ readonly security?: FieldSecurityPolicy | null;
426
+ readonly autocomplete?: string;
427
+ }
428
+ export interface LayoutNode {
429
+ readonly type: 'group' | 'grid' | 'column' | 'tabs' | 'tab' | (string & {});
430
+ readonly name?: string;
431
+ readonly description?: string;
432
+ readonly compact?: boolean;
433
+ readonly width?: number;
434
+ readonly children?: ReadonlyArray<LayoutNode>;
435
+ readonly showWhen?: VisibilityCondition;
436
+ }
437
+ export type FormActionType = 'submit' | 'button' | 'reset';
438
+ export type FormActionVariant = 'primary' | 'secondary' | 'danger' | 'link';
435
439
  /** Terminal form button (Submit / Cancel / ...) -- mirrors PHP FormAction.
436
440
  * Resolved by the backend (declared `formOptions.actions`, else lifted from
437
441
  * legacy submit fields, else a default Submit). `label` is already translated. */
438
- interface FormAction {
439
- readonly type: FormActionType;
440
- readonly label: string;
441
- readonly name: string;
442
- readonly variant: FormActionVariant;
443
- }
444
- interface FormRenderDefinition {
445
- readonly id: string;
446
- readonly context: 'create' | 'edit';
447
- readonly layout: ReadonlyArray<LayoutNode>;
448
- readonly items: ReadonlyArray<FieldItem>;
449
- readonly actions: ReadonlyArray<FormAction>;
450
- readonly action?: string;
442
+ export interface FormAction {
443
+ readonly type: FormActionType;
444
+ readonly label: string;
445
+ readonly name: string;
446
+ readonly variant: FormActionVariant;
447
+ }
448
+ export interface FormRenderDefinition {
449
+ readonly id: string;
450
+ readonly context: 'create' | 'edit';
451
+ readonly layout: ReadonlyArray<LayoutNode>;
452
+ readonly items: ReadonlyArray<FieldItem>;
453
+ readonly actions: ReadonlyArray<FormAction>;
454
+ readonly action?: string;
451
455
  }
452
-
453
456
  /**
454
457
  * The collection envelope API Platform wraps every list response in.
455
458
  *
@@ -470,18 +473,27 @@ interface FormRenderDefinition {
470
473
  * crashes if it does. Settle it by calling the endpoint, not by merging the
471
474
  * types.
472
475
  */
473
- interface HydraView {
474
- '@id': string;
475
- 'next'?: string;
476
- 'previous'?: string;
477
- 'last'?: string;
478
- }
479
- interface HydraCollection<T> {
480
- 'member': T[];
481
- 'totalItems': number;
482
- 'view'?: HydraView;
483
- }
484
-
476
+ export interface HydraView {
477
+ '@id': string;
478
+ 'next'?: string;
479
+ 'previous'?: string;
480
+ 'last'?: string;
481
+ }
482
+ export interface HydraCollection<T> {
483
+ 'member': T[];
484
+ 'totalItems': number;
485
+ 'view'?: HydraView;
486
+ }
487
+ /** The audiences the server knows: any other is refused at sign-in, so it is refused here, when the code compiles. */
488
+ export type AuthAudience = 'admin' | 'workspace';
489
+ /**
490
+ * The application a sign-in is for -- `admin`, `workspace` -- named by the application that provides it. A sign-in
491
+ * sends it, and the tokens it gets back carry it; a refresh keeps it. The server can then let a token into the
492
+ * surfaces of its own application only.
493
+ *
494
+ * None by default: an application that provides none signs in as before, naming no audience.
495
+ */
496
+ export declare const AUTH_AUDIENCE: InjectionToken<AuthAudience | null>;
485
497
  /**
486
498
  * The identity endpoints core owns: the session lifecycle, plus the settings
487
499
  * read at boot.
@@ -498,47 +510,55 @@ interface HydraCollection<T> {
498
510
  * `ApiService` keeps its own identical signatures and delegates here, so none
499
511
  * of the 94 feature files calling it changed.
500
512
  */
501
- declare class IdentityApiClient {
502
- private readonly http;
503
- private readonly store;
504
- /** URLs come from the boot manifest, which core already owns. */
505
- private get manifest();
506
- login(identifier: string, password: string): Observable<TokenResponse>;
507
- refresh(refreshToken: string): Observable<TokenResponse>;
508
- logout(): Observable<void>;
509
- me(): Observable<UserDto>;
510
- getSettings(): Observable<Record<string, Record<string, unknown>>>;
511
- static ɵfac: i0.ɵɵFactoryDeclaration<IdentityApiClient, never>;
512
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
513
- }
514
-
513
+ export declare class IdentityApiClient {
514
+ private readonly http;
515
+ private readonly store;
516
+ private readonly audience;
517
+ /** The settings read while it is in flight, shared by every caller that asks meanwhile. */
518
+ private settingsRead$?;
519
+ /** URLs come from the boot manifest, which core already owns. */
520
+ private get manifest();
521
+ /** Signs in; names the application's audience ({@link AUTH_AUDIENCE}) when it provides one. */
522
+ login(identifier: string, password: string): Observable<TokenResponse>;
523
+ refresh(refreshToken: string): Observable<TokenResponse>;
524
+ logout(): Observable<void>;
525
+ me(): Observable<UserDto>;
526
+ /**
527
+ * The person's settings. Several services read them at start-up, each for its own section; callers that ask while
528
+ * a read is in flight share it, so the page makes one request. A call after it has answered reads again: nothing
529
+ * is kept past the answer, so a save is never hidden behind an old read.
530
+ */
531
+ getSettings(): Observable<Record<string, Record<string, unknown>>>;
532
+ static ɵfac: i0.ɵɵFactoryDeclaration<IdentityApiClient, never>;
533
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
534
+ }
515
535
  /**
516
536
  * Response of `POST /centrifugo/connection-token`: the JWT the realtime SDK
517
537
  * opens its socket with, and what it needs to refresh before expiry.
518
538
  */
519
- interface CentrifugoConnectionTokenDto {
520
- token: string;
521
- expiresAt: number;
522
- ttl: number;
523
- wsUrl: string;
524
- /**
525
- * The code the server closes this connection with when the caller's session
526
- * ended (a sign-out everywhere, a password change, a deactivation). On it the
527
- * client signs out and ends its calls at once, without reconnecting or waiting
528
- * for a 401 (2026-09-26). Absent from a server older than that.
529
- */
530
- sessionEndedCode?: number;
539
+ export interface CentrifugoConnectionTokenDto {
540
+ token: string;
541
+ expiresAt: number;
542
+ ttl: number;
543
+ wsUrl: string;
544
+ /**
545
+ * The code the server closes this connection with when the caller's session
546
+ * ended (a sign-out everywhere, a password change, a deactivation). On it the
547
+ * client signs out and ends its calls at once, without reconnecting or waiting
548
+ * for a 401. Absent from an older server.
549
+ */
550
+ sessionEndedCode?: number;
531
551
  }
532
552
  /**
533
553
  * Response of `POST /centrifugo/subscription-token`: a per-channel JWT. The
534
554
  * SDK asks for one before subscribing to a private namespace, so this is
535
555
  * fetched per subscription rather than once per connection.
536
556
  */
537
- interface CentrifugoSubscriptionTokenDto {
538
- channel: string;
539
- token: string;
540
- expiresAt: number;
541
- ttl: number;
557
+ export interface CentrifugoSubscriptionTokenDto {
558
+ channel: string;
559
+ token: string;
560
+ expiresAt: number;
561
+ ttl: number;
542
562
  }
543
563
  /**
544
564
  * The two realtime endpoints, carved out for the same reason the identity ones
@@ -554,88 +574,82 @@ interface CentrifugoSubscriptionTokenDto {
554
574
  * `ApiService` keeps its identical signatures and delegates here, so nothing
555
575
  * calling it had to change.
556
576
  *
557
- * !! Access first, then realtime (Dmitry, 2026-09-28): "The console opens a realtime
558
- * connection before the access check. Reverse the order ... A refused account opens no
559
- * socket." The socket cannot open without the connection token, and anything may ask for
560
- * one early -- the ring subscription is built at app init and asks as soon as a user is
577
+ * !! Access first, then realtime: a refused account opens no socket. The socket cannot
578
+ * open without the connection token, and anything may ask for one early -- the ring subscription is built at app init and asks as soon as a user is
561
579
  * set, before the guard's answer is in. So the token waits for the console's answer (the
562
580
  * guard's own request, not a second one) and a refused sign-in gets none: no request, no
563
581
  * socket. A failure to ask is not a refusal, as at the guard.
564
582
  *
565
- * Since 2026-10-06 the connection token is every signed-in account's (Dmitry: "The connection
566
- * token only opens a socket; each channel is authorized when it is subscribed to"), and a
567
- * current server answers the admin manifest to every signed-in account, so no
568
- * sign-in is refused and every one gets its token; each subscription is then decided by its
569
- * channel. The wait stays for a server from before that, where a refused sign-in still opens
570
- * no socket.
571
- */
572
- declare class RealtimeTokenClient {
573
- /** The error a refused sign-in's connection-token request ends with. */
574
- static readonly REFUSED = "no console access: no realtime connection";
575
- private readonly http;
576
- private readonly store;
577
- private readonly injector;
578
- private get manifest();
579
- connectionToken(): Observable<CentrifugoConnectionTokenDto>;
580
- subscriptionToken(channel: string): Observable<CentrifugoSubscriptionTokenDto>;
581
- static ɵfac: i0.ɵɵFactoryDeclaration<RealtimeTokenClient, never>;
582
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
583
- }
584
-
585
- declare class Login {
586
- identifier: string;
587
- password: string;
588
- static readonly type = "[Auth] Login";
589
- constructor(identifier: string, password: string);
590
- }
591
- declare class Logout {
592
- static readonly type = "[Auth] Logout";
593
- }
594
- declare class RestoreSession {
595
- static readonly type = "[Auth] Restore Session";
596
- }
597
- declare class SetTokens {
598
- readonly response: TokenResponse;
599
- static readonly type = "[Auth] Set Tokens";
600
- constructor(response: TokenResponse);
583
+ * The connection token is every signed-in account's (it only opens a socket; each channel is
584
+ * authorized when it is subscribed to), and a current server answers the admin manifest to
585
+ * every signed-in account, so no sign-in is refused and every one gets its token; each
586
+ * subscription is then decided by its channel. The wait stays for an older server, where a
587
+ * refused sign-in still opens no socket.
588
+ */
589
+ export declare class RealtimeTokenClient {
590
+ /** The error a refused sign-in's connection-token request ends with. */
591
+ static readonly REFUSED = "no console access: no realtime connection";
592
+ private readonly http;
593
+ private readonly store;
594
+ private readonly injector;
595
+ private get manifest();
596
+ connectionToken(): Observable<CentrifugoConnectionTokenDto>;
597
+ subscriptionToken(channel: string): Observable<CentrifugoSubscriptionTokenDto>;
598
+ static ɵfac: i0.ɵɵFactoryDeclaration<RealtimeTokenClient, never>;
599
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
600
+ }
601
+ export declare class Login {
602
+ identifier: string;
603
+ password: string;
604
+ static readonly type = "[Auth] Login";
605
+ constructor(identifier: string, password: string);
606
+ }
607
+ export declare class Logout {
608
+ static readonly type = "[Auth] Logout";
609
+ }
610
+ export declare class RestoreSession {
611
+ static readonly type = "[Auth] Restore Session";
612
+ }
613
+ export declare class SetTokens {
614
+ readonly response: TokenResponse;
615
+ static readonly type = "[Auth] Set Tokens";
616
+ constructor(response: TokenResponse);
601
617
  }
602
618
  /** Merge a partial update into the currently-stored user (e.g. after avatar change). */
603
- declare class PatchCurrentUser {
604
- readonly patch: Partial<UserDto>;
605
- static readonly type = "[Auth] Patch Current User";
606
- constructor(patch: Partial<UserDto>);
607
- }
608
-
609
- interface AuthStateModel {
610
- accessToken: string | null;
611
- refreshToken: string | null;
612
- expiresAt: string | null;
613
- user: UserDto | null;
614
- }
615
- declare class AuthState {
616
- private readonly api;
617
- private readonly prefs;
618
- login(ctx: StateContext<AuthStateModel>, { identifier, password }: Login): rxjs.Observable<UserDto | null>;
619
- logout(ctx: StateContext<AuthStateModel>): void;
620
- restore(ctx: StateContext<AuthStateModel>): void;
621
- setTokens(ctx: StateContext<AuthStateModel>, { response }: SetTokens): void;
622
- patchCurrentUser(ctx: StateContext<AuthStateModel>, { patch }: PatchCurrentUser): void;
623
- static isAuthenticated(state: AuthStateModel): boolean;
624
- static accessToken(state: AuthStateModel): string | null;
625
- static refreshToken(state: AuthStateModel): string | null;
626
- /**
627
- * Sub-phase Y -- expose the access-token expiry timestamp so
628
- * preemptive-refresh callers (e.g., Centrifuge getToken
629
- * callbacks) can decide whether to rotate before issuing the
630
- * next protected request, instead of relying on the
631
- * interceptor's reactive 401-retry path.
632
- */
633
- static expiresAt(state: AuthStateModel): string | null;
634
- static currentUser(state: AuthStateModel): UserDto | null;
635
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthState, never>;
636
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
637
- }
638
-
619
+ export declare class PatchCurrentUser {
620
+ readonly patch: Partial<UserDto>;
621
+ static readonly type = "[Auth] Patch Current User";
622
+ constructor(patch: Partial<UserDto>);
623
+ }
624
+ export interface AuthStateModel {
625
+ accessToken: string | null;
626
+ refreshToken: string | null;
627
+ expiresAt: string | null;
628
+ user: UserDto | null;
629
+ }
630
+ export declare class AuthState {
631
+ private readonly api;
632
+ private readonly prefs;
633
+ login(ctx: StateContext<AuthStateModel>, { identifier, password }: Login): import("rxjs").Observable<UserDto | null>;
634
+ logout(ctx: StateContext<AuthStateModel>): void;
635
+ restore(ctx: StateContext<AuthStateModel>): void;
636
+ setTokens(ctx: StateContext<AuthStateModel>, { response }: SetTokens): void;
637
+ patchCurrentUser(ctx: StateContext<AuthStateModel>, { patch }: PatchCurrentUser): void;
638
+ static isAuthenticated(state: AuthStateModel): boolean;
639
+ static accessToken(state: AuthStateModel): string | null;
640
+ static refreshToken(state: AuthStateModel): string | null;
641
+ /**
642
+ * The access token's expiry timestamp, so
643
+ * preemptive-refresh callers (e.g., Centrifuge getToken
644
+ * callbacks) can decide whether to rotate before issuing the
645
+ * next protected request, instead of relying on the
646
+ * interceptor's reactive 401-retry path.
647
+ */
648
+ static expiresAt(state: AuthStateModel): string | null;
649
+ static currentUser(state: AuthStateModel): UserDto | null;
650
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthState, never>;
651
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
652
+ }
639
653
  /**
640
654
  * Protects routes that require authentication.
641
655
  *
@@ -652,8 +666,30 @@ declare class AuthState {
652
666
  * sent to the login page, which says why. A failure to ask is not a refusal: the console opens, and every request it
653
667
  * makes is still decided by the server.
654
668
  */
655
- declare const authGuard: CanActivateFn;
656
-
669
+ export declare const authGuard: CanActivateFn;
670
+ /** The account may not enter this interface (not a member of its group). Not a fault: an answer. */
671
+ export declare const AUDIENCE_NOT_GRANTED = "/errors/identity/audience-not-granted";
672
+ /**
673
+ * The token was issued for the other interface (a workspace sign-in sent to the admin, or the reverse). Not a
674
+ * refusal of the account: it never ends the session here.
675
+ */
676
+ export declare const WRONG_INTERFACE = "/errors/identity/wrong-interface";
677
+ /** The sign-in names no interface (a token from before audiences): signing in again mends it. */
678
+ export declare const AUDIENCE_REQUIRED = "/errors/identity/audience-required";
679
+ export type AudienceRefusal = 'not-granted' | 'required';
680
+ /**
681
+ * Which refusal of entry by audience an error is, or null for any other error. Read from the problem's `type` alone
682
+ * (403, `application/problem+json`): its `detail` is for logs, and says another interface's name as readily as this
683
+ * one's. The server answers neither while entry by audience is not checked.
684
+ */
685
+ export declare function audienceRefusalOf(error: unknown): AudienceRefusal | null;
686
+ /**
687
+ * Whether a refused session probe may mean the session is over, so the session is refreshed and, refused again,
688
+ * ended. A 403 is a refusal of this request, not of the session -- unless it is a refusal of entry by audience. So a
689
+ * token for the other interface (`wrong-interface`) or any other 403 keeps the person signed in; anything else (a
690
+ * 401, a failure to ask) goes on as before.
691
+ */
692
+ export declare function sessionEndsOn(error: unknown): boolean;
657
693
  /**
658
694
  * Guards the `/login` route -- redirects already-authenticated
659
695
  * callers to admin home so a stale tab parked on `/login` cannot
@@ -669,11 +705,9 @@ declare const authGuard: CanActivateFn;
669
705
  * as anonymous, allow `/login`, and only then have the token
670
706
  * populated.
671
707
  */
672
- declare const loginPageGuard: CanActivateFn;
673
-
674
- declare const BYPASS_AUTH: HttpContextToken<boolean>;
675
- declare const authInterceptor: HttpInterceptorFn;
676
-
708
+ export declare const loginPageGuard: CanActivateFn;
709
+ export declare const BYPASS_AUTH: HttpContextToken<boolean>;
710
+ export declare const authInterceptor: HttpInterceptorFn;
677
711
  /**
678
712
  * Two-layer refresh coordinator: an intra-tab `shareReplay(1)`
679
713
  * mutex dedupes concurrent callers within one tab, and a
@@ -698,9 +732,9 @@ declare const authInterceptor: HttpInterceptorFn;
698
732
  * CORS, timeouts) propagate without clearing the session so a
699
733
  * momentary refresh failure does not kill a valid login.
700
734
  *
701
- * A token the server REFUSED (2026-09-26). A caller answering a 401
702
- * passes the access token that was refused. Until then the lock body
703
- * handed back the cached token whenever its expiry looked fresh --
735
+ * A token the server REFUSED. A caller answering a 401 passes the
736
+ * access token that was refused. Without it the lock body would hand
737
+ * back the cached token whenever its expiry looked fresh --
704
738
  * which a revoked token's does: a session ended on the server (a
705
739
  * sign-out everywhere from another device, a password change) was
706
740
  * retried with the same dead token and never refreshed, so the client
@@ -718,63 +752,62 @@ declare const authInterceptor: HttpInterceptorFn;
718
752
  * made is never replayed with the token it consumed. A 401 there
719
753
  * is the session's end: `Logout`.
720
754
  */
721
- declare class AuthRefreshCoordinator {
722
- private readonly api;
723
- private readonly store;
724
- private readonly router;
725
- private inFlight;
726
- /**
727
- * Return the in-flight refresh Observable, or spawn a new one
728
- * with the supplied refresh-token value.
729
- *
730
- * `refusedAccessToken`: the access token the server just answered
731
- * 401 to, when the caller is answering one. With it, the lock body
732
- * refreshes unless the shared copy already holds another token;
733
- * without it (a preemptive refresh), a fresh-looking cached token
734
- * is handed back as before.
735
- *
736
- * Callers subscribe via `switchMap` / `firstValueFrom` to retry
737
- * their original request with the resolved access token.
738
- */
739
- refresh(refreshToken: string, refusedAccessToken?: string | null): Observable<string>;
740
- /**
741
- * Run the refresh body inside `navigator.locks` when the API is
742
- * available; degrade to direct invocation otherwise. The lock
743
- * body checks for state already updated by a sibling tab before
744
- * issuing its own HTTP call.
745
- */
746
- private refreshWithCrossTabLock;
747
- /**
748
- * Lock body. Re-reads the shared copy first (see the class note).
749
- *
750
- * Answering a refusal: a shared access token other than the refused
751
- * one is a rotation already made -- taken, and mirrored into this
752
- * tab's state if its `storage` event has not arrived yet. Otherwise,
753
- * or for a preemptive caller whose cached token no longer looks
754
- * fresh, the HTTP refresh, with the newest refresh token: shared,
755
- * then state, then the caller's.
756
- */
757
- private executeRefresh;
758
- /**
759
- * The session as the tabs share it, or null when there is none to
760
- * read: no storage, nothing stored (signed out), or a value that is
761
- * not a complete token set.
762
- */
763
- private readShared;
764
- /**
765
- * For a preemptive caller only: return the current access token when
766
- * its expiry is more than `FRESH_TOKEN_GRACE_MS` milliseconds away --
767
- * signalling that some other tab refreshed for us. The shared copy
768
- * first, which a sibling's rotation reaches before this tab's state
769
- * does (mirrored here when it is newer); this tab's state when there
770
- * is none. Null otherwise. Never asked for a token the server
771
- * refused: a refused token's expiry looks just as fresh.
772
- */
773
- private tryConsumeFreshState;
774
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthRefreshCoordinator, never>;
775
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
776
- }
777
-
755
+ export declare class AuthRefreshCoordinator {
756
+ private readonly api;
757
+ private readonly store;
758
+ private readonly router;
759
+ private inFlight;
760
+ /**
761
+ * Return the in-flight refresh Observable, or spawn a new one
762
+ * with the supplied refresh-token value.
763
+ *
764
+ * `refusedAccessToken`: the access token the server just answered
765
+ * 401 to, when the caller is answering one. With it, the lock body
766
+ * refreshes unless the shared copy already holds another token;
767
+ * without it (a preemptive refresh), a fresh-looking cached token
768
+ * is handed back as before.
769
+ *
770
+ * Callers subscribe via `switchMap` / `firstValueFrom` to retry
771
+ * their original request with the resolved access token.
772
+ */
773
+ refresh(refreshToken: string, refusedAccessToken?: string | null): Observable<string>;
774
+ /**
775
+ * Run the refresh body inside `navigator.locks` when the API is
776
+ * available; degrade to direct invocation otherwise. The lock
777
+ * body checks for state already updated by a sibling tab before
778
+ * issuing its own HTTP call.
779
+ */
780
+ private refreshWithCrossTabLock;
781
+ /**
782
+ * Lock body. Re-reads the shared copy first (see the class note).
783
+ *
784
+ * Answering a refusal: a shared access token other than the refused
785
+ * one is a rotation already made -- taken, and mirrored into this
786
+ * tab's state if its `storage` event has not arrived yet. Otherwise,
787
+ * or for a preemptive caller whose cached token no longer looks
788
+ * fresh, the HTTP refresh, with the newest refresh token: shared,
789
+ * then state, then the caller's.
790
+ */
791
+ private executeRefresh;
792
+ /**
793
+ * The session as the tabs share it, or null when there is none to
794
+ * read: no storage, nothing stored (signed out), or a value that is
795
+ * not a complete token set.
796
+ */
797
+ private readShared;
798
+ /**
799
+ * For a preemptive caller only: return the current access token when
800
+ * its expiry is more than `FRESH_TOKEN_GRACE_MS` milliseconds away --
801
+ * signalling that some other tab refreshed for us. The shared copy
802
+ * first, which a sibling's rotation reaches before this tab's state
803
+ * does (mirrored here when it is newer); this tab's state when there
804
+ * is none. Null otherwise. Never asked for a token the server
805
+ * refused: a refused token's expiry looks just as fresh.
806
+ */
807
+ private tryConsumeFreshState;
808
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthRefreshCoordinator, never>;
809
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
810
+ }
778
811
  /**
779
812
  * Bridges shared `localStorage` mutations into the NGXS auth
780
813
  * state so a refresh executed in one tab silently propagates to
@@ -799,15 +832,14 @@ declare class AuthRefreshCoordinator {
799
832
  * Started from `AppInitService.load()` so the listener is in
800
833
  * place before any protected HTTP fires.
801
834
  */
802
- declare class CrossTabAuthSyncService {
803
- private readonly store;
804
- private listenerAttached;
805
- start(): void;
806
- private readonly handleStorageEvent;
807
- static ɵfac: i0.ɵɵFactoryDeclaration<CrossTabAuthSyncService, never>;
808
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
835
+ export declare class CrossTabAuthSyncService {
836
+ private readonly store;
837
+ private listenerAttached;
838
+ start(): void;
839
+ private readonly handleStorageEvent;
840
+ static ɵfac: i0.ɵɵFactoryDeclaration<CrossTabAuthSyncService, never>;
841
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
809
842
  }
810
-
811
843
  /**
812
844
  * The elevation state of the signed-in session: the wire shape of
813
845
  * `GET /auth/elevation`, returned again by `POST` on a grant.
@@ -818,36 +850,41 @@ declare class CrossTabAuthSyncService {
818
850
  * capability flags are the two readings of ONE server-side decision, and the
819
851
  * client keeps no third.
820
852
  */
821
- interface ElevationState {
822
- /** Whether this session is elevated right now. */
823
- elevated: boolean;
824
- /** When the current elevation ends (ISO 8601); absent or null when not elevated. */
825
- expiresAt?: string | null;
826
- /** When the current elevation was granted (ISO 8601); absent or null when not elevated. */
827
- grantedAt?: string | null;
828
- /** How the LAST elevation of this session ended. Rendered by the prompt before it asks. */
829
- ended: ElevationEnded;
830
- /** The lifetime a grant made now would get, in seconds (the setting, clamped to the ceiling). */
831
- lifetimeSeconds: number;
832
- /** The most any elevation can last, fixed in code. */
833
- lifetimeCeilingSeconds: number;
834
- /** Whether the CURRENT elevation was confirmed by a second factor; absent or null when not elevated. */
835
- factorConfirmed?: boolean | null;
836
- /** Whether a grant made now must carry a code from the person's own authenticator. */
837
- mfaRequired: boolean;
838
- /** What the prompt shows before asking; two of the codes mean this account cannot elevate yet. */
839
- warnings: ElevationWarning[];
853
+ export interface ElevationState {
854
+ /** Whether this session is elevated right now. */
855
+ elevated: boolean;
856
+ /** When the current elevation ends (ISO 8601); absent or null when not elevated. */
857
+ expiresAt?: string | null;
858
+ /** When the current elevation was granted (ISO 8601); absent or null when not elevated. */
859
+ grantedAt?: string | null;
860
+ /** How the LAST elevation of this session ended. Rendered by the prompt before it asks. */
861
+ ended: ElevationEnded;
862
+ /** The lifetime a grant made now would get, in seconds (the setting, clamped to the ceiling). */
863
+ lifetimeSeconds: number;
864
+ /** The most any elevation can last, fixed in code. */
865
+ lifetimeCeilingSeconds: number;
866
+ /** Whether the CURRENT elevation was confirmed by a second factor; absent or null when not elevated. */
867
+ factorConfirmed?: boolean | null;
868
+ /** Whether a grant made now must carry a code from the person's own authenticator. */
869
+ mfaRequired: boolean;
870
+ /** What the prompt shows before asking; two of the codes mean this account cannot elevate yet. */
871
+ warnings: ElevationWarning[];
872
+ /**
873
+ * Whether this account may elevate at all -- a member of the admin group, elevated or not. The one source a
874
+ * client offers "Elevate session" from; absent (an older server) reads as false.
875
+ */
876
+ mayElevate?: boolean;
840
877
  }
841
878
  /**
842
879
  * `closed` is the beacon (the panel was closed or reloaded), `dropped_by_user`
843
880
  * the explicit drop, `refresh_from_other_pair` the server's refresh tripwire,
844
881
  * `never` a session that has not elevated yet.
845
882
  */
846
- type ElevationEndedReason = 'expired' | 'closed' | 'dropped_by_user' | 'refresh_from_other_pair' | 'never';
847
- interface ElevationEnded {
848
- reason: ElevationEndedReason;
849
- /** ISO 8601, null for `never`. */
850
- at: string | null;
883
+ export type ElevationEndedReason = 'expired' | 'closed' | 'dropped_by_user' | 'refresh_from_other_pair' | 'never';
884
+ export interface ElevationEnded {
885
+ reason: ElevationEndedReason;
886
+ /** ISO 8601, null for `never`. */
887
+ at: string | null;
851
888
  }
852
889
  /**
853
890
  * `elevation.password_not_set` and `elevation.factor_missing` mean this
@@ -855,23 +892,22 @@ interface ElevationEnded {
855
892
  * own) and the message says which;
856
893
  * `elevation.mfa_off` is the recommendation carried while the switch is off.
857
894
  */
858
- interface ElevationWarning {
859
- /** The three the server documents today; the client renders any it does not know as text. */
860
- code: string;
861
- message: string;
862
- }
863
- declare const ELEVATION_WARNING_PASSWORD_NOT_SET = "elevation.password_not_set";
864
- declare const ELEVATION_WARNING_FACTOR_MISSING = "elevation.factor_missing";
865
- declare const ELEVATION_WARNING_MFA_OFF = "elevation.mfa_off";
895
+ export interface ElevationWarning {
896
+ /** The three the server documents today; the client renders any it does not know as text. */
897
+ code: string;
898
+ message: string;
899
+ }
900
+ export declare const ELEVATION_WARNING_PASSWORD_NOT_SET = "elevation.password_not_set";
901
+ export declare const ELEVATION_WARNING_FACTOR_MISSING = "elevation.factor_missing";
902
+ export declare const ELEVATION_WARNING_MFA_OFF = "elevation.mfa_off";
866
903
  /** Why the elevation of a session changed, for whoever refetches on it. */
867
- type ElevationChangeKind = 'granted' | 'dropped' | 'expired' | 'observed';
868
- interface ElevationChange {
869
- kind: ElevationChangeKind;
870
- state: ElevationState;
904
+ export type ElevationChangeKind = 'granted' | 'dropped' | 'expired' | 'observed';
905
+ export interface ElevationChange {
906
+ kind: ElevationChangeKind;
907
+ state: ElevationState;
871
908
  }
872
909
  /** The two reasons the client sends when it drops an elevation itself. */
873
- type ElevationDropReason = 'dropped_by_user' | 'closed';
874
-
910
+ export type ElevationDropReason = 'dropped_by_user' | 'closed';
875
911
  /**
876
912
  * What the elevation prompt is told when it opens.
877
913
  *
@@ -885,9 +921,11 @@ type ElevationDropReason = 'dropped_by_user' | 'closed';
885
921
  * ("Permission denied: cannot write '/docs/...'"), when a 403 opened the
886
922
  * prompt; absent when a disabled control offered elevation instead.
887
923
  */
888
- interface ElevationPromptRequest {
889
- state: ElevationState;
890
- refusal?: string;
924
+ export interface ElevationPromptRequest {
925
+ state: ElevationState;
926
+ refusal?: string;
927
+ /** The refused action in words ("Saving navi nodes"), when a refused request opened the prompt. */
928
+ action?: string;
891
929
  }
892
930
  /**
893
931
  * The prompt itself is a dialog, and dialogs are the kit's -- a layer above
@@ -900,15 +938,15 @@ interface ElevationPromptRequest {
900
938
  * false when the person declined or could not. The port does not retry the
901
939
  * refused action; the interceptor does, on true.
902
940
  */
903
- interface ElevationPromptPort {
904
- open(request: ElevationPromptRequest): Observable<boolean>;
941
+ export interface ElevationPromptPort {
942
+ open(request: ElevationPromptRequest): Observable<boolean>;
905
943
  }
906
944
  /**
907
945
  * Optional by design: with nothing bound, a 403 stays a 403 and the state
908
946
  * service still answers -- an application without an admin panel has no
909
947
  * prompt to show and loses nothing.
910
948
  */
911
- declare const ELEVATION_PROMPT: InjectionToken<ElevationPromptPort>;
949
+ export declare const ELEVATION_PROMPT: InjectionToken<ElevationPromptPort>;
912
950
  /**
913
951
  * Told when an action a person took was refused for want of elevation: a
914
952
  * write (not a read, not a background request) answered by a stamped 403.
@@ -922,18 +960,24 @@ declare const ELEVATION_PROMPT: InjectionToken<ElevationPromptPort>;
922
960
  * `refusal` is the server's sentence for the refused action, already made
923
961
  * readable by the error service.
924
962
  */
925
- interface ElevationNoticePort {
926
- refused(refusal: string): void;
963
+ export interface ElevationNoticePort {
964
+ /** `action` names what the person did ("Saving navi nodes"); absent from older callers. */
965
+ refused(refusal: string, action?: string): void;
927
966
  }
967
+ /**
968
+ * What a write IS, in the person's words, for the elevation prompt and notice when the server refuses it -- set by a
969
+ * caller that knows better than the URL ("Saving the menu entry"). Without it the interceptor names the method's verb
970
+ * and the resource the URL names.
971
+ */
972
+ export declare const ELEVATION_ACTION: HttpContextToken<string | null>;
928
973
  /** Optional, like {@link ELEVATION_PROMPT}: with nothing bound, a refusal is only a 403. */
929
- declare const ELEVATION_NOTICE: InjectionToken<ElevationNoticePort>;
930
-
974
+ export declare const ELEVATION_NOTICE: InjectionToken<ElevationNoticePort>;
931
975
  /**
932
976
  * Set on a request that must never open the elevation prompt: the elevation
933
977
  * endpoint's own calls (a wrong password is a 403 and is not a refused action),
934
978
  * and any caller that would rather receive its 403 and decide for itself.
935
979
  */
936
- declare const BYPASS_ELEVATION: HttpContextToken<boolean>;
980
+ export declare const BYPASS_ELEVATION: HttpContextToken<boolean>;
937
981
  /**
938
982
  * The elevation state of this session, read from ONE place: the server.
939
983
  *
@@ -969,258 +1013,291 @@ declare const BYPASS_ELEVATION: HttpContextToken<boolean>;
969
1013
  * whose refusal came from the VFS permission service under another module's
970
1014
  * path (media, document and word templates, content distribution).
971
1015
  */
972
- declare const ELEVATION_REQUIRED_HEADER = "X-Elevation-Required";
1016
+ export declare const ELEVATION_REQUIRED_HEADER = "X-Elevation-Required";
973
1017
  /**
974
1018
  * Set on a request no person asked for: a realtime token, a preferences sync, a
975
1019
  * poll. Its refusal is never announced -- not by a dialog and not by a notice --
976
1020
  * because nobody is waiting on it and nobody can act on it. The caller still
977
1021
  * receives the 403 and decides what its own state shows.
978
1022
  */
979
- declare const BACKGROUND_REQUEST: HttpContextToken<boolean>;
1023
+ export declare const BACKGROUND_REQUEST: HttpContextToken<boolean>;
1024
+ /**
1025
+ * The problem type of a 403 refused for want of elevation. The server writes it
1026
+ * where it writes {@link ELEVATION_REQUIRED_HEADER}, naming the check that refused in the
1027
+ * `elevationGate` member; a 403 for any other reason has another type.
1028
+ */
1029
+ export declare const ELEVATION_REQUIRED_PROBLEM_TYPE = "/errors/elevation-required";
1030
+ /** The elevation refusal that asks for the authenticator's code: the password was right. */
1031
+ export declare const ELEVATION_CODE_REQUIRED_TYPE = "/errors/elevation/code-required";
1032
+ /** The elevation refusals that let the person try once more: a wrong password, a wrong or already used code. */
1033
+ export declare const ELEVATION_RETRY_TYPES: readonly string[];
980
1034
  /**
981
1035
  * Whether a failed request was refused for want of elevation: a 403 carrying
982
- * the server's stamp. The one test every reader of a refusal uses -- the
983
- * interceptor, a page's inline state, the error text -- so they cannot disagree.
984
- */
985
- declare function isElevationRefusal(err: unknown): boolean;
986
- declare class ElevationService {
987
- private readonly http;
988
- private readonly store;
989
- private readonly prompt;
990
- private readonly destroyRef;
991
- /** The last answer the server gave, exactly as it gave it. */
992
- private readonly served;
993
- /**
994
- * The state as it stands NOW; null until the first read from the server.
995
- *
996
- * Deliberately NOT a `computed`. A cached derivation is only recomputed
997
- * when one of its dependencies changes, and nothing changes when an
998
- * elevation simply runs out -- so it would keep answering `elevated: true`
999
- * past the moment the server itself named, for as long as the machine
1000
- * happened to be asleep.
1001
- *
1002
- * Reading past `expiresAt` also demotes the STORED answer. The value
1003
- * returned here is already correct without that write; the write is only
1004
- * how cached readers (a `computed`, an OnPush template) find out.
1005
- */
1006
- readonly state: () => ElevationState | null;
1007
- /** Convenience over `state`: false until the server has said otherwise. */
1008
- readonly elevated: () => boolean;
1009
- /** `expiresAt` as a Date, null when not elevated. */
1010
- readonly expiresAt: () => Date | null;
1011
- /**
1012
- * Every change of elevation state: a grant, a drop (by this person, by the
1013
- * beacon, by the tripwire), an expiry, or an observed change of a live
1014
- * grant's `expiresAt`. A refresh that reports the same state emits nothing,
1015
- * so subscribers that refetch a listing on it never refetch for no reason.
1016
- */
1017
- readonly changes$: Subject<ElevationChange>;
1018
- private expiryTimer;
1019
- private pendingPrompt;
1020
- private expiryAnnouncePending;
1021
- private lastReconcileAt;
1022
- constructor();
1023
- /** The manifest carries the URL; without it the service is inert, not broken. */
1024
- get available(): boolean;
1025
- private get url();
1026
- /**
1027
- * Whether a URL belongs to THIS API: a relative one under the manifest's
1028
- * `apiBase`, or an absolute one on this origin under it. The interceptor
1029
- * acts on a stamped refusal from here and from nowhere else -- a third
1030
- * party answering 403 with a header of the same name is not an invitation
1031
- * to elevate this session.
1032
- */
1033
- isThisApi(url: string): boolean;
1034
- /** Ask the server. Applies the answer and announces it when it differs. */
1035
- refresh(): Observable<ElevationState>;
1036
- /**
1037
- * Elevate with the person's own password and, when the switch is on, a
1038
- * code from their own authenticator. Errors are the dialog's to branch on:
1039
- * 403 not a member of the admin group, wrong password, or wrong / replayed
1040
- * code, 428 a code is required, 409 this account cannot elevate yet, 429
1041
- * throttled. They pass through
1042
- * untouched, and never open the prompt (BYPASS_ELEVATION).
1043
- */
1044
- elevate(password: string, code?: string): Observable<ElevationState>;
1045
- /** Drop the elevation now. Idempotent on the server: nothing live is still a 204. */
1046
- drop(reason?: ElevationDropReason): Observable<ElevationState>;
1047
- /**
1048
- * What a person's explicit request for elevation calls -- an Elevate button,
1049
- * or a control that already knows its action needs elevation: ask the
1050
- * server whether this session is elevated, and only when it is not, open
1051
- * the prompt. Nothing calls it on a response by itself (the interceptor
1052
- * only tells {@link ELEVATION_NOTICE}). Elevated already is false, no
1053
- * prompt: elevation would change nothing.
1054
- */
1055
- offerFor(refusal?: string): Observable<boolean>;
1056
- /**
1057
- * Open the prompt, or join the one already open. Resolves to whether the
1058
- * session is elevated once the dialog closes.
1059
- */
1060
- requestElevation(request: ElevationPromptRequest): Observable<boolean>;
1061
- private options;
1062
- private inert;
1063
- /**
1064
- * Store the answer, schedule the expiry read, announce a change.
1065
- *
1066
- * `explicit` names the change when the caller knows it (a grant). For a
1067
- * plain refresh the kind is derived from the two states: elevated -> not
1068
- * is `expired` when the server says so and `dropped` otherwise (the person,
1069
- * another tab, the beacon, the tripwire); not -> elevated is a grant seen
1070
- * from another tab; a live grant whose `expiresAt` moved is `observed`.
1071
- *
1072
- * `prev` is read RAW rather than through `state()`: the demotion is not
1073
- * wanted here (this answer supersedes the stored one either way), and a
1074
- * read that demoted would queue an expiry announcement the server's own
1075
- * answer is about to make.
1076
- */
1077
- private apply;
1078
- private kindOf;
1079
- /**
1080
- * Tell the listings that this session's elevation ran out, once, and NOT
1081
- * from inside the read that noticed: a subscriber refetches on this, and a
1082
- * refetch started in the middle of a change detection pass is a write
1083
- * during a read. The microtask runs at the end of the current task, before
1084
- * anything can paint.
1085
- *
1086
- * A server answer arriving first clears the flag, so the announcement is
1087
- * made by whichever of the two got there first, never by both. Other tabs
1088
- * are NOT told: each one reaches the same conclusion from the same
1089
- * `expiresAt` on its own read, so the storage write would only buy a
1090
- * thundering herd of GETs.
1091
- */
1092
- private announceExpiryLater;
1093
- /**
1094
- * Ask the server again at `expiresAt` -- an OPTIMISATION, not the
1095
- * mechanism. `state()` already reports an elapsed grant as expired without
1096
- * being told, so a timer that a sleeping machine swallows, or that a
1097
- * background tab throttles to once a minute, now costs freshness rather
1098
- * than correctness. What it buys is the listing refetch happening at the
1099
- * moment of expiry instead of at the next read.
1100
- *
1101
- * Do not flip a local flag here: the lifetime counts from the grant on the
1102
- * server's clock, and if the server still says elevated at that moment
1103
- * (skew), the honest thing is to ask again shortly.
1104
- */
1105
- private schedule;
1106
- /**
1107
- * One more attempt, then stop. Giving up is affordable now and was not
1108
- * before: the state a failed read leaves behind is still read through the
1109
- * arithmetic above, so an unreachable server cannot leave this tab
1110
- * believing it is elevated. What is lost is only news from elsewhere -- a
1111
- * grant or a drop in another session -- and that is what the tab picks up
1112
- * when it next comes into view.
1113
- */
1114
- private scheduleRetry;
1115
- private clearTimer;
1116
- private announceToOtherTabs;
1117
- private readonly onStorage;
1118
- private readonly onFocus;
1119
- private readonly onVisibilityChange;
1120
- /**
1121
- * The tab is back. Read first -- that alone ends an elevation that ran out
1122
- * while it was away, with no request and no network to depend on -- then
1123
- * ask the server for what the read cannot know: a grant or a drop made
1124
- * elsewhere, or a lifetime the server moved.
1125
- */
1126
- private reconcile;
1127
- static ɵfac: i0.ɵɵFactoryDeclaration<ElevationService, never>;
1128
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1129
- }
1130
-
1036
+ * the server's stamp -- its problem type, or the header. The one test every
1037
+ * reader of a refusal uses -- the interceptor, a page's inline state, the error
1038
+ * text -- so they cannot disagree.
1039
+ */
1040
+ export declare function isElevationRefusal(err: unknown): boolean;
1041
+ export declare class ElevationService {
1042
+ private readonly http;
1043
+ private readonly store;
1044
+ private readonly prompt;
1045
+ private readonly destroyRef;
1046
+ /** The last answer the server gave, exactly as it gave it. */
1047
+ private readonly served;
1048
+ /**
1049
+ * The state as it stands NOW; null until the first read from the server.
1050
+ *
1051
+ * Deliberately NOT a `computed`. A cached derivation is only recomputed
1052
+ * when one of its dependencies changes, and nothing changes when an
1053
+ * elevation simply runs out -- so it would keep answering `elevated: true`
1054
+ * past the moment the server itself named, for as long as the machine
1055
+ * happened to be asleep.
1056
+ *
1057
+ * Reading past `expiresAt` also demotes the STORED answer. The value
1058
+ * returned here is already correct without that write; the write is only
1059
+ * how cached readers (a `computed`, an OnPush template) find out.
1060
+ */
1061
+ readonly state: () => ElevationState | null;
1062
+ /** Convenience over `state`: false until the server has said otherwise. */
1063
+ readonly elevated: () => boolean;
1064
+ /** Whether this account may elevate at all, as the server answered it: what "Elevate session" is offered from. */
1065
+ readonly mayElevate: () => boolean;
1066
+ /** `expiresAt` as a Date, null when not elevated. */
1067
+ readonly expiresAt: () => Date | null;
1068
+ /**
1069
+ * Every change of elevation state: a grant, a drop (by this person, by the
1070
+ * beacon, by the tripwire), an expiry, or an observed change of a live
1071
+ * grant's `expiresAt`. A refresh that reports the same state emits nothing,
1072
+ * so subscribers that refetch a listing on it never refetch for no reason.
1073
+ */
1074
+ readonly changes$: Subject<ElevationChange>;
1075
+ private expiryTimer;
1076
+ private pendingPrompt;
1077
+ private expiryAnnouncePending;
1078
+ private lastReconcileAt;
1079
+ constructor();
1080
+ /** Whether a prompt can be opened at all: this install offers elevation and a prompt is bound. */
1081
+ get canPrompt(): boolean;
1082
+ /** The manifest's API base, as {@link isThisApi} reads it. */
1083
+ get apiBase(): string;
1084
+ /** The manifest carries the URL; without it the service is inert, not broken. */
1085
+ get available(): boolean;
1086
+ private get url();
1087
+ /**
1088
+ * Whether a URL belongs to THIS API: a relative one under the manifest's
1089
+ * `apiBase`, or an absolute one on this origin under it. The interceptor
1090
+ * acts on a stamped refusal from here and from nowhere else -- a third
1091
+ * party answering 403 with a header of the same name is not an invitation
1092
+ * to elevate this session.
1093
+ */
1094
+ isThisApi(url: string): boolean;
1095
+ /** Ask the server. Applies the answer and announces it when it differs. */
1096
+ refresh(): Observable<ElevationState>;
1097
+ /**
1098
+ * Elevate with the person's own password and, when the switch is on, a
1099
+ * code from their own authenticator. Errors are the dialog's to branch on:
1100
+ * 403 not a member of the admin group, wrong password, or wrong / replayed
1101
+ * code, 428 a code is required, 409 this account cannot elevate yet, 429
1102
+ * throttled. They pass through
1103
+ * untouched, and never open the prompt (BYPASS_ELEVATION).
1104
+ */
1105
+ elevate(password: string, code?: string): Observable<ElevationState>;
1106
+ /** Drop the elevation now. Idempotent on the server: nothing live is still a 204. */
1107
+ drop(reason?: ElevationDropReason): Observable<ElevationState>;
1108
+ /**
1109
+ * What a person's explicit request for elevation calls -- an Elevate button,
1110
+ * or a control that already knows its action needs elevation: ask the
1111
+ * server whether this session is elevated, and only when it is not, open
1112
+ * the prompt. Nothing calls it on a response by itself (the interceptor
1113
+ * only tells {@link ELEVATION_NOTICE}). Elevated already is false, no
1114
+ * prompt: elevation would change nothing.
1115
+ */
1116
+ offerFor(refusal?: string): Observable<boolean>;
1117
+ /**
1118
+ * Open the prompt, or join the one already open. Resolves to whether the
1119
+ * session is elevated once the dialog closes.
1120
+ */
1121
+ requestElevation(request: ElevationPromptRequest): Observable<boolean>;
1122
+ private options;
1123
+ private inert;
1124
+ /**
1125
+ * Store the answer, schedule the expiry read, announce a change.
1126
+ *
1127
+ * `explicit` names the change when the caller knows it (a grant). For a
1128
+ * plain refresh the kind is derived from the two states: elevated -> not
1129
+ * is `expired` when the server says so and `dropped` otherwise (the person,
1130
+ * another tab, the beacon, the tripwire); not -> elevated is a grant seen
1131
+ * from another tab; a live grant whose `expiresAt` moved is `observed`.
1132
+ *
1133
+ * `prev` is read RAW rather than through `state()`: the demotion is not
1134
+ * wanted here (this answer supersedes the stored one either way), and a
1135
+ * read that demoted would queue an expiry announcement the server's own
1136
+ * answer is about to make.
1137
+ */
1138
+ private apply;
1139
+ private kindOf;
1140
+ /**
1141
+ * Tell the listings that this session's elevation ran out, once, and NOT
1142
+ * from inside the read that noticed: a subscriber refetches on this, and a
1143
+ * refetch started in the middle of a change detection pass is a write
1144
+ * during a read. The microtask runs at the end of the current task, before
1145
+ * anything can paint.
1146
+ *
1147
+ * A server answer arriving first clears the flag, so the announcement is
1148
+ * made by whichever of the two got there first, never by both. Other tabs
1149
+ * are NOT told: each one reaches the same conclusion from the same
1150
+ * `expiresAt` on its own read, so the storage write would only buy a
1151
+ * thundering herd of GETs.
1152
+ */
1153
+ private announceExpiryLater;
1154
+ /**
1155
+ * Ask the server again at `expiresAt` -- an OPTIMISATION, not the
1156
+ * mechanism. `state()` already reports an elapsed grant as expired without
1157
+ * being told, so a timer that a sleeping machine swallows, or that a
1158
+ * background tab throttles to once a minute, now costs freshness rather
1159
+ * than correctness. What it buys is the listing refetch happening at the
1160
+ * moment of expiry instead of at the next read.
1161
+ *
1162
+ * Do not flip a local flag here: the lifetime counts from the grant on the
1163
+ * server's clock, and if the server still says elevated at that moment
1164
+ * (skew), the honest thing is to ask again shortly.
1165
+ */
1166
+ private schedule;
1167
+ /**
1168
+ * One more attempt, then stop. Giving up is affordable now and was not
1169
+ * before: the state a failed read leaves behind is still read through the
1170
+ * arithmetic above, so an unreachable server cannot leave this tab
1171
+ * believing it is elevated. What is lost is only news from elsewhere -- a
1172
+ * grant or a drop in another session -- and that is what the tab picks up
1173
+ * when it next comes into view.
1174
+ */
1175
+ private scheduleRetry;
1176
+ private clearTimer;
1177
+ private announceToOtherTabs;
1178
+ private readonly onStorage;
1179
+ private readonly onFocus;
1180
+ private readonly onVisibilityChange;
1181
+ /**
1182
+ * The tab is back. Read first -- that alone ends an elevation that ran out
1183
+ * while it was away, with no request and no network to depend on -- then
1184
+ * ask the server for what the read cannot know: a grant or a drop made
1185
+ * elsewhere, or a lifetime the server moved.
1186
+ */
1187
+ private reconcile;
1188
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElevationService, never>;
1189
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1190
+ }
1131
1191
  /**
1132
1192
  * A refusal for want of elevation is a 403 the server stamps `X-Elevation-Required`
1133
1193
  * where its gate refused a member who has not elevated ({@link isElevationRefusal}).
1134
- * This interceptor never opens the elevation prompt. The prompt opens only when a
1135
- * person asks for it: an Elevate button, or an action whose control already knows it
1136
- * needs elevation and offers it ({@link ElevationService.offerFor}).
1137
1194
  *
1138
1195
  * What it does with a stamped 403:
1139
- * - On a write a person made (POST, PUT, PATCH, DELETE without
1140
- * {@link BACKGROUND_REQUEST}): tells {@link ELEVATION_NOTICE}, which shows the
1141
- * refusal with an Elevate button. The request is not held and not repeated; the
1142
- * caller receives the 403 at once, and after elevating the person repeats the action.
1196
+ * - On a write a person made (POST, PUT, PATCH, DELETE without {@link BACKGROUND_REQUEST}):
1197
+ * the prompt opens THERE, above whatever the person is in -- an edit dialog stays open
1198
+ * beneath it with its input -- and the request is HELD. If the person elevates, it is
1199
+ * sent once more and the caller receives that answer, as if the first had been accepted;
1200
+ * if the session turns out to be elevated already (another tab), it is sent once more
1201
+ * without asking. If the person declines, {@link ELEVATION_NOTICE} is told -- "Elevation
1202
+ * required", naming the action, with an Elevate button -- and the caller receives the 403.
1203
+ * The repeat is sent past this interceptor, so a second refusal is a 403, never a second
1204
+ * prompt.
1143
1205
  * - On a read: nothing. Reads are what a page makes as it loads and what polls make in
1144
1206
  * the background, and the page shows its own state for a refused one -- an inline
1145
1207
  * "needs an elevated session" with an Elevate button, or the feature hidden.
1146
1208
  * - On a background request: nothing. Nobody is waiting on it.
1147
1209
  *
1148
- * Until 2026-10-08 any stamped 403 opened the prompt, so the setup reads of almost every
1149
- * console page, and a realtime token at every load, opened it for an administrator who
1150
- * had not elevated: 13 of 15 pages on a menu click, 15 of 15 on a reload (measured).
1210
+ * !! Why reads and background requests open nothing. Were any stamped 403 to open the prompt,
1211
+ * the setup reads of almost every console page, and a realtime token at every load, would open
1212
+ * it for an administrator who has not elevated (13 of 15 pages on a menu click, 15 of 15 on a
1213
+ * reload, measured). Were a person's write to open nothing but a toast, the toast would render
1214
+ * under an open dialog, and the edit would have to be thrown away to elevate. A person's write
1215
+ * is the one refusal somebody is waiting on, which is why it is the one that asks.
1151
1216
  *
1152
1217
  * The elevation endpoint's own calls carry {@link BYPASS_ELEVATION}: a wrong password is a
1153
1218
  * 403 and is not a refused action. A stamped 403 from anywhere but this API is ignored:
1154
1219
  * the header is the server's word, and only this server's counts.
1155
1220
  */
1156
- declare const elevationInterceptor: HttpInterceptorFn;
1157
-
1158
- declare class LoginComponent {
1159
- identifier: string;
1160
- password: string;
1161
- readonly loading: i0.WritableSignal<boolean>;
1162
- readonly error: i0.WritableSignal<string | null>;
1163
- private readonly store;
1164
- private readonly router;
1165
- /** Shown when the guard signed an account out because the console is not granted to it. */
1166
- static readonly NO_CONSOLE_ACCESS = "This account has no access to the console.";
1167
- constructor();
1168
- submit(): void;
1169
- static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
1170
- static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "coolms-admin-login", never, {}, {}, never, never, true, never>;
1171
- }
1172
-
1173
- declare class AppInitService {
1174
- private readonly http;
1175
- private readonly store;
1176
- private readonly router;
1177
- private readonly location;
1178
- private readonly prefs;
1179
- private readonly crossTabSync;
1180
- private readonly refreshCoordinator;
1181
- /** The only hardcoded URL -- everything else comes from the manifest. */
1182
- private readonly configUrl;
1183
- /**
1184
- * Emits (once) when load() has fully completed -- tokens settled, manifest
1185
- * set (or swallowed on error). authGuard subscribes to this so it never
1186
- * evaluates isAuthenticated against a partially-restored stale token.
1187
- */
1188
- private readonly initComplete;
1189
- readonly ready$: rxjs.Observable<void>;
1190
- load(): Promise<void>;
1191
- /**
1192
- * Confirm the restored session is still alive, settling AuthState before the
1193
- * app unblocks. Runs OUTSIDE the auth interceptor (BYPASS_AUTH) because the
1194
- * interceptor queues behind ready$, which has not fired yet at this point.
1195
- *
1196
- * - access token accepted -> done, session alive;
1197
- * - access token rejected -> attempt ONE refresh (access tokens are short-lived,
1198
- * so an expired one with a valid refresh token must
1199
- * stay logged in). The coordinator dispatches Logout
1200
- * on a refresh 401 and SetTokens on success; a
1201
- * transient failure (5xx/network) is swallowed so a
1202
- * momentary blip never kills a valid session.
1203
- */
1204
- private validateSession;
1205
- /** GET an authed endpoint with an explicit Bearer header, bypassing the interceptor. */
1206
- private probe;
1207
- static ɵfac: i0.ɵɵFactoryDeclaration<AppInitService, never>;
1208
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1209
- }
1210
-
1221
+ export declare const elevationInterceptor: HttpInterceptorFn;
1222
+ /**
1223
+ * The action a refused write was, in words for the person: what its caller said it is
1224
+ * ({@link ELEVATION_ACTION}), or else the method's verb and the resource the URL names --
1225
+ * "Saving navi nodes" for `PATCH /api/v1/navi/nodes/{id}`. Identifiers and the API base
1226
+ * are left out; they say nothing to the person who pressed the button.
1227
+ */
1228
+ export declare function actionOf(req: HttpRequest<unknown>, apiBase?: string): string;
1229
+ export declare class LoginComponent {
1230
+ identifier: string;
1231
+ password: string;
1232
+ readonly loading: import("@angular/core").WritableSignal<boolean>;
1233
+ readonly error: import("@angular/core").WritableSignal<string | null>;
1234
+ private readonly store;
1235
+ private readonly router;
1236
+ /** Shown when the guard signed an account out because the console is not granted to it. */
1237
+ static readonly NO_CONSOLE_ACCESS = "This account may not enter the admin.";
1238
+ /** Shown when a sign-in from before audiences was ended: it names no interface, and a new one will. */
1239
+ static readonly SIGN_IN_AGAIN = "Please sign in again.";
1240
+ constructor();
1241
+ submit(): void;
1242
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
1243
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "coolms-admin-login", never, {}, {}, never, never, true, never>;
1244
+ }
1245
+ export declare class AppInitService {
1246
+ private readonly http;
1247
+ private readonly store;
1248
+ private readonly router;
1249
+ private readonly location;
1250
+ private readonly prefs;
1251
+ private readonly crossTabSync;
1252
+ private readonly refreshCoordinator;
1253
+ /** The only hardcoded URL -- everything else comes from the manifest. */
1254
+ private readonly configUrl;
1255
+ /**
1256
+ * Emits (once) when load() has fully completed -- tokens settled, manifest
1257
+ * set (or swallowed on error). authGuard subscribes to this so it never
1258
+ * evaluates isAuthenticated against a partially-restored stale token.
1259
+ */
1260
+ private readonly initComplete;
1261
+ readonly ready$: import("rxjs").Observable<void>;
1262
+ load(): Promise<void>;
1263
+ /**
1264
+ * Confirm the restored session is still alive, settling AuthState before the
1265
+ * app unblocks. Runs OUTSIDE the auth interceptor (BYPASS_AUTH) because the
1266
+ * interceptor queues behind ready$, which has not fired yet at this point.
1267
+ *
1268
+ * - access token accepted -> done, session alive;
1269
+ * - access token rejected -> attempt ONE refresh (access tokens are short-lived,
1270
+ * so an expired one with a valid refresh token must
1271
+ * stay logged in). The coordinator dispatches Logout
1272
+ * on a refresh 401 and SetTokens on success; a
1273
+ * transient failure (5xx/network) is swallowed so a
1274
+ * momentary blip never kills a valid session.
1275
+ */
1276
+ private validateSession;
1277
+ /**
1278
+ * GET /auth/me with an explicit Bearer header, bypassing the interceptor: true, or what refused it. The answer's
1279
+ * uiPrefs are the server's preferences as they are now, and win over the local ones for every entry they hold.
1280
+ */
1281
+ private probe;
1282
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppInitService, never>;
1283
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1284
+ }
1211
1285
  /** What the server said about this sign-in and the console. */
1212
- type ConsoleAccess = 'granted' | 'refused' | 'unknown';
1286
+ /**
1287
+ * `sign-in-again`: the sign-in names no interface (a token from before audiences); signing in again mends it.
1288
+ */
1289
+ export type ConsoleAccess = 'granted' | 'refused' | 'sign-in-again' | 'unknown';
1213
1290
  /**
1214
1291
  * Whether the signed-in account may use the console, and the console's endpoint
1215
1292
  * map when it may.
1216
1293
  *
1217
- * The server decides: `GET /api/v1/admin/manifest` answers the map. Since 2026-10-06
1218
- * (Dmitry: "no host groups"; access is decided by module groups alone) it answers every
1219
- * signed-in account: the map grants nothing, each call it names is decided by its own
1220
- * route, and an account in no group sees the admin with an empty menu. A server from
1221
- * before that answers only at `/api/v1/console/manifest`, to the `console` group, and
1222
- * 403 to anyone else -- there a refused sign-in is still signed out; this asks the new
1223
- * address first and the old one only on its 404. The public theme config
1294
+ * The server decides: `GET /api/v1/admin/manifest` answers the map to every signed-in
1295
+ * account (access is decided by module groups alone): the map grants nothing, each call it
1296
+ * names is decided by its own route, and an account in no group sees the admin with an
1297
+ * empty menu. An older server answers only at `/api/v1/console/manifest`, to the `console`
1298
+ * group, and 403 to anyone else -- there a refused sign-in is still signed out; this asks
1299
+ * the current address first and the older one only on its 404. Only a refusal by type (`audience-not-granted`) is a refusal: a
1300
+ * bare 403 from such a server, or a token for the other interface, is no answer. The public theme config
1224
1301
  * read before sign-in carries only what the sign-in page needs; the rest arrives
1225
1302
  * here, once per sign-in, and is merged into the app config key by key: a key the
1226
1303
  * console's map carries replaces the public one whole, so the console's copy of a
@@ -1239,32 +1316,33 @@ type ConsoleAccess = 'granted' | 'refused' | 'unknown';
1239
1316
  * interceptor dispatch Logout, which started another generation, which re-asked:
1240
1317
  * a loop for as long as the tab lived (found in review).
1241
1318
  */
1242
- declare class ConsoleAccessService {
1243
- /** The admin manifest's URL: fixed, like the theme config's, because nothing is known before it. */
1244
- static readonly URL = "/api/v1/admin/manifest";
1245
- /** The address before 2026-10-06, asked only when a server older than that answers 404 at {@link URL}. */
1246
- static readonly LEGACY_URL = "/api/v1/console/manifest";
1247
- /** The login page's query parameter value for "signed out: no console access". */
1248
- static readonly REFUSED_REASON = "no-console-access";
1249
- private readonly http;
1250
- private readonly store;
1251
- private answer;
1252
- private pending;
1253
- private generation;
1254
- constructor();
1255
- /** Ask once per sign-in; the manifest is merged into the app config when granted. */
1256
- ensure(): Promise<ConsoleAccess>;
1257
- /**
1258
- * Sign a refused account out: this sign-in ends on the server (its refresh token
1259
- * with it), as the account menu's sign-out does, and then in this browser --
1260
- * whatever the server answered, so a refused request cannot leave it signed in.
1261
- */
1262
- signOut(): Observable<void>;
1263
- private merge;
1264
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleAccessService, never>;
1265
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1266
- }
1267
-
1319
+ export declare class ConsoleAccessService {
1320
+ /** The admin manifest's URL: fixed, like the theme config's, because nothing is known before it. */
1321
+ static readonly URL = "/api/v1/admin/manifest";
1322
+ /** An older server's address, asked only when the server answers 404 at {@link URL}. */
1323
+ static readonly LEGACY_URL = "/api/v1/console/manifest";
1324
+ /** The login page's query parameter value for "signed out: no console access". */
1325
+ static readonly REFUSED_REASON = "no-console-access";
1326
+ /** The login page's query parameter value for "signed out: sign in again" (a sign-in that names no audience). */
1327
+ static readonly SIGN_IN_AGAIN_REASON = "sign-in-again";
1328
+ private readonly http;
1329
+ private readonly store;
1330
+ private answer;
1331
+ private pending;
1332
+ private generation;
1333
+ constructor();
1334
+ /** Ask once per sign-in; the manifest is merged into the app config when granted. */
1335
+ ensure(): Promise<ConsoleAccess>;
1336
+ /**
1337
+ * Sign a refused account out: this sign-in ends on the server (its refresh token
1338
+ * with it), as the account menu's sign-out does, and then in this browser --
1339
+ * whatever the server answered, so a refused request cannot leave it signed in.
1340
+ */
1341
+ signOut(): Observable<void>;
1342
+ private merge;
1343
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleAccessService, never>;
1344
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1345
+ }
1268
1346
  /**
1269
1347
  * Layout config DTO -- the shape served from
1270
1348
  * `GET /api/v1/config/layout/{id}`. Mirrors the YAML at
@@ -1290,93 +1368,93 @@ declare class ConsoleAccessService {
1290
1368
  * keys (e.g. `media:library`'s `naviGraph:` slot shorthand) keep working
1291
1369
  * without further interface changes.
1292
1370
  */
1293
- interface LayoutHeaderAction {
1294
- id: string;
1295
- label?: string;
1296
- icon?: string;
1297
- title?: string;
1298
- primary?: boolean;
1299
- danger?: boolean;
1300
- disabled?: boolean;
1301
- /**
1302
- * Optional capability gate evaluated FE-side against runtime state
1303
- * (e.g. `administer` / `delete`) -- the config declares WHICH actions
1304
- * exist + their gate; the FE decides if THIS user/row qualifies. Absent
1305
- * = always shown. Used by detail pages whose actions are config-driven
1306
- * (see `web:section-detail`).
1307
- *
1308
- * For a gate that depends on the RECORD rather than the user, prefer
1309
- * `showWhen` below: `requires` needs a page to interpret the token, so
1310
- * every new value costs a branch in TypeScript.
1311
- */
1312
- requires?: string;
1313
- /**
1314
- * Conditions on the page's published context, same grammar and same
1315
- * evaluator as a NaviGraph toolbar node, applied
1316
- * by {@link LayoutActionsService}:
1317
- *
1318
- * showWhen -- the action does not APPLY, so it is absent.
1319
- * disabledWhen -- temporarily UNAVAILABLE: stays put and greys out.
1320
- * busyWhen -- the action is RUNNING: greys out too, and may relabel.
1321
- * busyLabel -- label shown while `busyWhen` holds ("Saving...").
1322
- * activeWhen -- pressed/active styling.
1323
- *
1324
- * Two carriers (a layout config and a NaviGraph tree) but ONE vocabulary:
1325
- * a page that moves between them should not have to relearn how to say
1326
- * "not now".
1327
- */
1328
- showWhen?: Record<string, unknown>;
1329
- disabledWhen?: Record<string, unknown>;
1330
- busyWhen?: Record<string, unknown>;
1331
- busyLabel?: string;
1332
- activeWhen?: Record<string, unknown>;
1333
- }
1334
- interface LayoutSection {
1335
- title?: string;
1336
- /**
1337
- * When true, the layout shell pins the section to the top of the
1338
- * scroll container (CSS `position: sticky`). Used by inspector /
1339
- * filter pages where an input form should stay visible while the
1340
- * operator scrolls through results below. Currently honoured by
1341
- * cms-inspector-layout; cms-detail-layout will follow when it
1342
- * lands. Default false.
1343
- */
1344
- sticky?: boolean;
1345
- slots?: Record<string, {
1346
- component?: string;
1347
- [key: string]: unknown;
1348
- }>;
1349
- [key: string]: unknown;
1350
- }
1351
- interface LayoutConfig {
1352
- id?: string;
1353
- template?: string;
1354
- title?: string;
1355
- subtitle?: string;
1356
- icon?: string;
1357
- slots?: Record<string, unknown>;
1358
- sections?: Record<string, LayoutSection>;
1359
- headerActions?: LayoutHeaderAction[];
1360
- /**
1361
- * Actions rendered in the page's fixed bottom bar (`<cms-detail-footer>`)
1362
- * -- primary / destructive actions kept out of the cramped header.
1363
- * Same shape as `headerActions`; gated per-item via `requires`.
1364
- */
1365
- footerActions?: LayoutHeaderAction[];
1366
- permissions?: string[];
1367
- [key: string]: unknown;
1368
- }
1369
- interface DialogConfig {
1370
- [key: string]: unknown;
1371
- }
1372
- interface NavigraphConfig {
1373
- [key: string]: unknown;
1374
- }
1375
- interface FormConfig {
1376
- [key: string]: unknown;
1377
- }
1378
- interface DatagridConfig {
1371
+ export interface LayoutHeaderAction {
1372
+ id: string;
1373
+ label?: string;
1374
+ icon?: string;
1375
+ title?: string;
1376
+ primary?: boolean;
1377
+ danger?: boolean;
1378
+ disabled?: boolean;
1379
+ /**
1380
+ * Optional capability gate evaluated FE-side against runtime state
1381
+ * (e.g. `administer` / `delete`) -- the config declares WHICH actions
1382
+ * exist + their gate; the FE decides if THIS user/row qualifies. Absent
1383
+ * = always shown. Used by detail pages whose actions are config-driven
1384
+ * (see `web:section-detail`).
1385
+ *
1386
+ * For a gate that depends on the RECORD rather than the user, prefer
1387
+ * `showWhen` below: `requires` needs a page to interpret the token, so
1388
+ * every new value costs a branch in TypeScript.
1389
+ */
1390
+ requires?: string;
1391
+ /**
1392
+ * Conditions on the page's published context, same grammar and same
1393
+ * evaluator as a NaviGraph toolbar node, applied
1394
+ * by {@link LayoutActionsService}:
1395
+ *
1396
+ * showWhen -- the action does not APPLY, so it is absent.
1397
+ * disabledWhen -- temporarily UNAVAILABLE: stays put and greys out.
1398
+ * busyWhen -- the action is RUNNING: greys out too, and may relabel.
1399
+ * busyLabel -- label shown while `busyWhen` holds ("Saving...").
1400
+ * activeWhen -- pressed/active styling.
1401
+ *
1402
+ * Two carriers (a layout config and a NaviGraph tree) but ONE vocabulary:
1403
+ * a page that moves between them should not have to relearn how to say
1404
+ * "not now".
1405
+ */
1406
+ showWhen?: Record<string, unknown>;
1407
+ disabledWhen?: Record<string, unknown>;
1408
+ busyWhen?: Record<string, unknown>;
1409
+ busyLabel?: string;
1410
+ activeWhen?: Record<string, unknown>;
1411
+ }
1412
+ export interface LayoutSection {
1413
+ title?: string;
1414
+ /**
1415
+ * When true, the layout shell pins the section to the top of the
1416
+ * scroll container (CSS `position: sticky`). Used by inspector /
1417
+ * filter pages where an input form should stay visible while the
1418
+ * operator scrolls through results below. Currently honoured by
1419
+ * cms-inspector-layout; cms-detail-layout will follow when it
1420
+ * lands. Default false.
1421
+ */
1422
+ sticky?: boolean;
1423
+ slots?: Record<string, {
1424
+ component?: string;
1379
1425
  [key: string]: unknown;
1426
+ }>;
1427
+ [key: string]: unknown;
1428
+ }
1429
+ export interface LayoutConfig {
1430
+ id?: string;
1431
+ template?: string;
1432
+ title?: string;
1433
+ subtitle?: string;
1434
+ icon?: string;
1435
+ slots?: Record<string, unknown>;
1436
+ sections?: Record<string, LayoutSection>;
1437
+ headerActions?: LayoutHeaderAction[];
1438
+ /**
1439
+ * Actions rendered in the page's fixed bottom bar (`<cms-detail-footer>`)
1440
+ * -- primary / destructive actions kept out of the cramped header.
1441
+ * Same shape as `headerActions`; gated per-item via `requires`.
1442
+ */
1443
+ footerActions?: LayoutHeaderAction[];
1444
+ permissions?: string[];
1445
+ [key: string]: unknown;
1446
+ }
1447
+ export interface DialogConfig {
1448
+ [key: string]: unknown;
1449
+ }
1450
+ export interface NavigraphConfig {
1451
+ [key: string]: unknown;
1452
+ }
1453
+ export interface FormConfig {
1454
+ [key: string]: unknown;
1455
+ }
1456
+ export interface DatagridConfig {
1457
+ [key: string]: unknown;
1380
1458
  }
1381
1459
  /**
1382
1460
  * Fetches config YAMLs (served as JSON) from GET /api/v1/config/{type}/{id}.
@@ -1388,66 +1466,82 @@ interface DatagridConfig {
1388
1466
  * configBase is read from the API manifest (manifest.configBase) and falls
1389
1467
  * back to '/api/v1/config' when the manifest is not yet loaded.
1390
1468
  */
1391
- declare class ConfigService {
1392
- private readonly http;
1393
- private readonly store;
1394
- private readonly cache;
1395
- layout(id: string): Observable<LayoutConfig>;
1396
- dialog(id: string): Observable<DialogConfig>;
1397
- navigraph(slug: string): Observable<NavigraphConfig>;
1398
- form(id: string): Observable<FormConfig>;
1399
- datagrid(id: string): Observable<DatagridConfig>;
1400
- private fetch;
1401
- static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
1402
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1403
- }
1404
-
1405
- declare class SetAppConfig {
1406
- readonly config: ThemeConfigResponse;
1407
- static readonly type = "[AppConfig] Set";
1408
- constructor(config: ThemeConfigResponse);
1409
- }
1410
- interface AppConfigStateModel {
1411
- config: ThemeConfigResponse | null;
1412
- loaded: boolean;
1413
- }
1414
- declare class AppConfigState {
1415
- set(ctx: StateContext<AppConfigStateModel>, { config }: SetAppConfig): void;
1416
- /** The whole config as last set: the public theme config, with the console's manifest once granted. */
1417
- static config(state: AppConfigStateModel): ThemeConfigResponse | null;
1418
- static manifest(state: AppConfigStateModel): ApiManifest | null;
1419
- /**
1420
- * The viewer manifest. Null when the backend didn't ship a viewers
1421
- * section (no tagged providers); consumers should fall back to a
1422
- * "no preview" surface.
1423
- */
1424
- static viewers(state: AppConfigStateModel): ViewerApiManifest | null;
1425
- static loaded(state: AppConfigStateModel): boolean;
1426
- static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigState, never>;
1427
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1428
- }
1429
-
1430
- /**
1431
- * Converts any caught error into a human-readable message.
1432
- *
1433
- * Priority order for backend errors:
1434
- * 1. error.detail (RFC 7807 problem detail)
1435
- * 2. error['hydra:description'] (Hydra validation errors)
1436
- * 3. error.message (generic)
1437
- * 4. error.violations[] (constraint violations)
1438
- * 5. Status-based fallback
1439
- */
1440
- declare class ErrorHandlerService {
1441
- humanize(err: unknown): string;
1442
- private statusMessage;
1443
- static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerService, never>;
1444
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1445
- }
1446
-
1469
+ export declare class ConfigService {
1470
+ private readonly http;
1471
+ private readonly store;
1472
+ private readonly cache;
1473
+ layout(id: string): Observable<LayoutConfig>;
1474
+ dialog(id: string): Observable<DialogConfig>;
1475
+ navigraph(slug: string): Observable<NavigraphConfig>;
1476
+ form(id: string): Observable<FormConfig>;
1477
+ datagrid(id: string): Observable<DatagridConfig>;
1478
+ private fetch;
1479
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
1480
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1481
+ }
1482
+ export declare class SetAppConfig {
1483
+ readonly config: ThemeConfigResponse;
1484
+ static readonly type = "[AppConfig] Set";
1485
+ constructor(config: ThemeConfigResponse);
1486
+ }
1487
+ export interface AppConfigStateModel {
1488
+ config: ThemeConfigResponse | null;
1489
+ loaded: boolean;
1490
+ }
1491
+ export declare class AppConfigState {
1492
+ set(ctx: StateContext<AppConfigStateModel>, { config }: SetAppConfig): void;
1493
+ /** The whole config as last set: the public theme config, with the console's manifest once granted. */
1494
+ static config(state: AppConfigStateModel): ThemeConfigResponse | null;
1495
+ static manifest(state: AppConfigStateModel): ApiManifest | null;
1496
+ /**
1497
+ * The viewer manifest. Null when the backend didn't ship a viewers
1498
+ * section (no tagged providers); consumers should fall back to a
1499
+ * "no preview" surface.
1500
+ */
1501
+ static viewers(state: AppConfigStateModel): ViewerApiManifest | null;
1502
+ static loaded(state: AppConfigStateModel): boolean;
1503
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigState, never>;
1504
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1505
+ }
1506
+ /**
1507
+ * Converts any caught error into the sentence a person reads: a declared problem's detail as the server gives it, a
1508
+ * validation refusal's first field message, and the one generic sentence for anything else (see refusalWords).
1509
+ */
1510
+ export declare class ErrorHandlerService {
1511
+ humanize(err: unknown): string;
1512
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerService, never>;
1513
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1514
+ }
1515
+ /** What a declared problem says when the server gives no sentence for it (an older server). */
1516
+ export declare const NOT_AVAILABLE = "Not available right now";
1517
+ /** What an undeclared fault or a network failure says: never its own text, which may carry internals. */
1518
+ export declare const SOMETHING_WENT_WRONG = "Something went wrong. Try again.";
1519
+ /** The server's sentence, as given; null for none or a blank one. */
1520
+ export declare function sentenceOf(text: unknown): string | null;
1521
+ /** The problem body of an error answer, parsed when it came as text; null when it is not a plain JSON object. */
1522
+ export declare function problemOf(error: HttpErrorResponse): Record<string, unknown> | null;
1523
+ /**
1524
+ * The declared problem of a failure: its body when the type is set, not about:blank and not a framework's own type for
1525
+ * a server fault, else null.
1526
+ */
1527
+ export declare function declaredProblemOf(error: unknown): Record<string, unknown> | null;
1528
+ /** The declared type of a failure, for behaviour only; null when the problem is undeclared or there is none. */
1529
+ export declare function declaredTypeOf(error: unknown): string | null;
1530
+ /** Whether a failure is the server's refusal (4xx), as opposed to a fault (5xx), a network failure or anything else. */
1531
+ export declare function isRefusal(error: unknown): boolean;
1532
+ /**
1533
+ * What a failed call says, in whose words the components contract sets: a validation refusal (422 with violations) its
1534
+ * first field's message, declared or not, never the top-level detail (a form shows each message next to its field
1535
+ * instead); a declared problem (a type other than about:blank) its `detail` as the server gives it, whatever the
1536
+ * status, or NOT_AVAILABLE when it gives none; an undeclared problem, a network failure or anything else
1537
+ * SOMETHING_WENT_WRONG, never its own text. The type is for behaviour only and never turned into words here. The
1538
+ * result is plain text.
1539
+ */
1540
+ export declare function refusalWords(error: unknown): string;
1447
1541
  /** What the user PICKED. `system` defers to the OS. */
1448
- type ThemeChoice = 'light' | 'dark' | 'system';
1542
+ export type ThemeChoice = 'light' | 'dark' | 'system';
1449
1543
  /** What that resolves to right now -- the only two the stylesheet knows. */
1450
- type ResolvedTheme = 'light' | 'dark';
1544
+ export type ResolvedTheme = 'light' | 'dark';
1451
1545
  /**
1452
1546
  * Applies the user's theme by setting `data-theme` on the document element.
1453
1547
  *
@@ -1461,249 +1555,272 @@ type ResolvedTheme = 'light' | 'dark';
1461
1555
  * cached for the SPA lifetime, with `update()` called by the Profile page after
1462
1556
  * a save so the change lands without a refetch.
1463
1557
  */
1464
- declare class ThemeService {
1465
- private readonly api;
1466
- private readonly store;
1467
- private readonly _choice;
1468
- private readonly _systemDark;
1469
- private readonly _userAccent;
1470
- private readonly _platformAccent;
1471
- private loadOnce$?;
1472
- /** The user's stored choice, including `system`. */
1473
- readonly choice: i0.Signal<ThemeChoice>;
1474
- /** This user's personal override, independent of the deployment's. */
1475
- readonly userAccent: i0.Signal<string | null>;
1476
- /** The deployment's brand accent from the API manifest, if it set one. */
1477
- readonly platformAccent: i0.Signal<string | null>;
1478
- /**
1479
- * The colour actually painted: personal override, else the deployment's,
1480
- * else null -- which leaves the stylesheet's own accent in place.
1481
- *
1482
- * Three rungs and each is a real state. A user who has chosen nothing is
1483
- * NOT the same as one who chose the deployment's colour: clear the
1484
- * deployment's brand and the first user follows it, the second does not.
1485
- */
1486
- readonly accent: i0.Signal<string | null>;
1487
- /** The choice with `system` resolved against the OS setting. */
1488
- readonly resolved: i0.Signal<ResolvedTheme>;
1489
- constructor();
1490
- /**
1491
- * One-shot load of the stored preference. Safe to call more than once and
1492
- * safe for anonymous users -- a failure leaves the cached/system value in
1493
- * place rather than forcing light, so the login screen still matches the OS.
1494
- */
1495
- ensureLoaded(): Observable<ThemeChoice>;
1496
- /**
1497
- * Called by the Profile page after the Preferences tab saves, so the admin
1498
- * re-themes on the spot. Ignores anything that is not a known choice --
1499
- * the section PATCH returns the whole merged bag, not just this field.
1500
- */
1501
- update(value: unknown): void;
1502
- /**
1503
- * Companion to {@link update} for the accent field of the same save.
1504
- * An explicit null clears the override; anything malformed is ignored
1505
- * rather than applied, so a bad value can never blank the admin's accent.
1506
- */
1507
- updateAccent(value: unknown): void;
1508
- private set;
1509
- /**
1510
- * The manifest is loaded at bootstrap, well before the authenticated shell
1511
- * calls this, so a snapshot read is enough and no subscription is needed.
1512
- * A malformed value is ignored rather than applied -- the container refuses
1513
- * to build with one, but the manifest crosses the network all the same.
1514
- */
1515
- private readPlatformAccent;
1516
- private setAccent;
1517
- /**
1518
- * Writes the override onto the document element, where an inline style
1519
- * outranks every stylesheet rule -- including the dark block -- so one
1520
- * declaration re-points the accent in both themes.
1521
- *
1522
- * Only --cms-accent is set, not the -hover/-light/-text members of the
1523
- * family. Deriving those from an arbitrary user colour needs a colour model
1524
- * the palette does not have yet, and guessing them would produce hover
1525
- * states that clash with the very colour the user chose. Until then the
1526
- * override moves the brand fill and leaves its supporting tones alone.
1527
- */
1528
- private applyAccent;
1529
- private applyToDocument;
1530
- private static readCache;
1531
- private static readAccentCache;
1532
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
1533
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1534
- }
1535
-
1536
- /**
1537
- * The platform's loading indicator: the exclamation mark from Cool!MS,
1538
- * drawing itself.
1539
- *
1540
- * ## Why a mark and not a spinner
1541
- *
1542
- * A spinner says "something is happening" and nothing else; every product has
1543
- * one and none of them are yours. The bang is already the one glyph in the
1544
- * wordmark that carries the brand, so a loader built from it says whose
1545
- * software is thinking -- for free, in the place a user is already looking.
1558
+ export declare class ThemeService {
1559
+ private readonly api;
1560
+ private readonly store;
1561
+ private readonly _choice;
1562
+ private readonly _systemDark;
1563
+ private readonly _userAccent;
1564
+ private readonly _platformAccent;
1565
+ private loadOnce$?;
1566
+ /** The user's stored choice, including `system`. */
1567
+ readonly choice: import("@angular/core").Signal<ThemeChoice>;
1568
+ /** This user's personal override, independent of the deployment's. */
1569
+ readonly userAccent: import("@angular/core").Signal<string | null>;
1570
+ /** The deployment's brand accent from the API manifest, if it set one. */
1571
+ readonly platformAccent: import("@angular/core").Signal<string | null>;
1572
+ /**
1573
+ * The colour actually painted: personal override, else the deployment's,
1574
+ * else null -- which leaves the stylesheet's own accent in place.
1575
+ *
1576
+ * Three rungs and each is a real state. A user who has chosen nothing is
1577
+ * NOT the same as one who chose the deployment's colour: clear the
1578
+ * deployment's brand and the first user follows it, the second does not.
1579
+ */
1580
+ readonly accent: import("@angular/core").Signal<string | null>;
1581
+ /** The choice with `system` resolved against the OS setting. */
1582
+ readonly resolved: import("@angular/core").Signal<ResolvedTheme>;
1583
+ constructor();
1584
+ /**
1585
+ * One-shot load of the stored preference. Safe to call more than once and
1586
+ * safe for anonymous users -- a failure leaves the cached/system value in
1587
+ * place rather than forcing light, so the login screen still matches the OS.
1588
+ */
1589
+ ensureLoaded(): Observable<ThemeChoice>;
1590
+ /**
1591
+ * Called by the Profile page after the Preferences tab saves, so the admin
1592
+ * re-themes on the spot. Ignores anything that is not a known choice --
1593
+ * the section PATCH returns the whole merged bag, not just this field.
1594
+ */
1595
+ update(value: unknown): void;
1596
+ /**
1597
+ * Companion to {@link update} for the accent field of the same save.
1598
+ * An explicit null clears the override; anything malformed is ignored
1599
+ * rather than applied, so a bad value can never blank the admin's accent.
1600
+ */
1601
+ updateAccent(value: unknown): void;
1602
+ private set;
1603
+ /**
1604
+ * The manifest is loaded at bootstrap, well before the authenticated shell
1605
+ * calls this, so a snapshot read is enough and no subscription is needed.
1606
+ * A malformed value is ignored rather than applied -- the container refuses
1607
+ * to build with one, but the manifest crosses the network all the same.
1608
+ */
1609
+ private readPlatformAccent;
1610
+ private setAccent;
1611
+ /**
1612
+ * Writes the override onto the document element, where an inline style
1613
+ * outranks every stylesheet rule -- including the dark block -- so one
1614
+ * declaration re-points the accent in both themes.
1615
+ *
1616
+ * Only --cms-accent is set, not the -hover/-light/-text members of the
1617
+ * family. Deriving those from an arbitrary user colour needs a colour model
1618
+ * the palette does not have yet, and guessing them would produce hover
1619
+ * states that clash with the very colour the user chose. Until then the
1620
+ * override moves the brand fill and leaves its supporting tones alone.
1621
+ */
1622
+ private applyAccent;
1623
+ private applyToDocument;
1624
+ private static readCache;
1625
+ private static readAccentCache;
1626
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
1627
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1628
+ }
1629
+ /**
1630
+ * The platform's loading indicator: the spinner of the UI contract's state component (`state` in design-tokens'
1631
+ * components.json), drawn from the tokens -- an arc turning on its track.
1632
+ *
1633
+ * One spinner for every wait, the same one the state component turns, so a page does not show two kinds of
1634
+ * waiting. A whole read waiting in place of its content is the state component's
1635
+ * (`cms-state kind="loading"`, which also waits its delay before it shows); this is for the waits inside a row, a
1636
+ * status bar or a button, and for a cover over content not ready to be seen.
1546
1637
  *
1547
1638
  * ## Why one component rather than a snippet per surface
1548
1639
  *
1549
1640
  * It is meant for every wait long enough to notice: a dashboard assembling its
1550
1641
  * cards, an editor paginating a document, an explorer listing a folder. Those
1551
- * are different teams' files, and a copied SVG in each is how three loaders
1552
- * that no longer match each other happen.
1553
- *
1554
- * ## The animation
1642
+ * are different teams' files, and a copied indicator in each is how three
1643
+ * loaders that no longer match each other happen.
1555
1644
  *
1556
- * The stem wipes upward and the dot lands after it, on a loop -- the shape being
1557
- * WRITTEN rather than spun. It is deliberately calm: a loader is background
1558
- * furniture, and anything with a hard beat gets irritating on the third viewing.
1559
1645
  * Under `prefers-reduced-motion` it holds still and only breathes, because
1560
1646
  * motion sickness is not a stylistic preference.
1561
1647
  */
1562
- declare class CmsLoaderComponent {
1563
- /** Optional caption. Absent renders the mark alone, which suits a small inline wait. */
1564
- readonly label: i0.InputSignal<string>;
1565
- /** Cover the positioned ancestor rather than sitting in the flow. */
1566
- readonly overlay: i0.InputSignal<boolean>;
1567
- /**
1568
- * Row layout at text scale, for a wait inside a row, a status bar or a
1569
- * button. Override `--cms-loader-size` to tune the mark.
1570
- */
1571
- readonly inline: i0.InputSignal<boolean>;
1572
- /**
1573
- * A clip-path needs a document-unique id, and this component is used more
1574
- * than once per page -- two loaders sharing an id makes the second one clip
1575
- * against the first one's rectangle and stop animating.
1576
- */
1577
- protected readonly clipId: string;
1578
- static ɵfac: i0.ɵɵFactoryDeclaration<CmsLoaderComponent, never>;
1579
- static ɵcmp: i0.ɵɵComponentDeclaration<CmsLoaderComponent, "cms-loader", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "overlay": { "alias": "overlay"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1580
- }
1581
-
1582
- /**
1583
- * Unified user preferences service -- all preference types share one
1584
- * localStorage key (`coolms_ui_prefs`) and one debounced server-sync pipeline.
1585
- *
1586
- * Key naming convention (stored as nested objects, referenced via dot-notation):
1587
- *
1588
- * // Grids
1589
- * grids.{gridId}.columns
1590
- * grids.{gridId}.columnWidths
1591
- *
1592
- * // Panels (ExplorerLayout persistKey values from YAML)
1593
- * panel.{persistKey}.width
1594
- * panel.{persistKey}.collapsed
1595
- *
1596
- * // Page navigation state
1597
- * page.vfs.lastPath
1598
- * page.vfs.viewMode
1599
- * page.media.lastDir
1600
- * page.media.viewMode
1601
- *
1602
- * // Global
1603
- * nav.lastRoute
1604
- * terminal.height
1605
- * terminal.open
1606
- */
1607
- declare class UserPreferencesService {
1608
- private readonly http;
1609
- private readonly store;
1610
- private readonly destroyRef;
1611
- private readonly STORAGE_KEY;
1612
- private readonly SYNC_DELAY;
1613
- private syncSubject;
1614
- constructor();
1615
- /**
1616
- * Write all prefs to localStorage and schedule a debounced server sync.
1617
- */
1618
- private save;
1619
- /**
1620
- * Read the entire prefs object from localStorage, applying legacy key
1621
- * migration on the first read after an upgrade.
1622
- */
1623
- private load;
1624
- /**
1625
- * One-time migration of legacy flat keys to the new nested naming convention.
1626
- * Mutates `all` in place and re-persists only when something changed.
1627
- */
1628
- private migrate;
1629
- /**
1630
- * Seed localStorage from server preferences.
1631
- * Called after login and on every session restore (page reload).
1632
- *
1633
- * Strategy:
1634
- * - No local prefs yet (new device / clean install) -> use server prefs as-is.
1635
- * - Local prefs already exist -> merge with local taking priority at each
1636
- * top-level namespace. This ensures that locally-persisted state
1637
- * (panel widths, last path, etc.) is never overwritten by the stale copy
1638
- * that was saved in the auth token at login time.
1639
- */
1640
- loadFromServer(uiPrefs: Record<string, unknown>): void;
1641
- private syncToServer;
1642
- /**
1643
- * Get stored preferences for a specific grid.
1644
- */
1645
- getGridPref(gridId: string): DataGridPreference | null;
1646
- /**
1647
- * Set visible column order for a grid.
1648
- * Applies to localStorage instantly; server sync is debounced.
1649
- */
1650
- setColumns(gridId: string, columns: string[]): void;
1651
- /**
1652
- * Record a column width for a grid column.
1653
- * Applies to localStorage instantly; server sync is debounced.
1654
- */
1655
- setColumnWidth(gridId: string, field: string, width: number): void;
1656
- /**
1657
- * Remove all preferences for a specific grid and immediately sync to server.
1658
- */
1659
- resetGrid(gridId: string): void;
1660
- private updateGrid;
1661
- /**
1662
- * Get persisted terminal panel height.
1663
- */
1664
- getTerminalHeight(): number | null;
1665
- /**
1666
- * Persist terminal panel height.
1667
- */
1668
- setTerminalHeight(height: number): void;
1669
- /**
1670
- * Get persisted state for a resizable panel identified by key.
1671
- * Used by ExplorerLayoutComponent to persist panel widths across sessions.
1672
- */
1673
- getPanelState(key: string): {
1674
- width: number;
1675
- collapsed: boolean;
1676
- } | null;
1677
- /**
1678
- * Persist generic panel state by key.
1679
- * Applies to localStorage instantly; server sync is debounced.
1680
- */
1681
- setPanelState(key: string, width: number, collapsed: boolean): void;
1682
- /**
1683
- * Get all persisted state for a page namespace (e.g. 'vfs', 'media', 'nav').
1684
- */
1685
- getPageState<T>(pageKey: string): T | null;
1686
- /**
1687
- * Merge partial state into a page namespace.
1688
- * Existing keys in the namespace are preserved; only provided keys are updated.
1689
- * Applies to localStorage instantly; server sync is debounced.
1690
- */
1691
- setPageState(pageKey: string, state: Record<string, unknown>): void;
1692
- /** @deprecated Use getPageState('media') instead */
1693
- getMediaViewMode(): string | null;
1694
- /** @deprecated Use setPageState('media', ...) instead */
1695
- setMediaViewMode(mode: string): void;
1696
- /** @deprecated Use getPanelState('media_panel_left') instead */
1697
- getMediaCollectionsPanel(): {
1698
- width: number;
1699
- collapsed: boolean;
1700
- } | null;
1701
- /** @deprecated Use setPanelState('media_panel_left', ...) instead */
1702
- setMediaCollectionsPanel(width: number, collapsed: boolean): void;
1703
- static ɵfac: i0.ɵɵFactoryDeclaration<UserPreferencesService, never>;
1704
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1705
- }
1706
-
1648
+ export declare class CmsLoaderComponent {
1649
+ /** Optional caption. Absent renders the spinner alone, which suits a small inline wait. */
1650
+ readonly label: import("@angular/core").InputSignal<string>;
1651
+ /** Cover the positioned ancestor rather than sitting in the flow. */
1652
+ readonly overlay: import("@angular/core").InputSignal<boolean>;
1653
+ /**
1654
+ * Row layout at text scale, for a wait inside a row, a status bar or a
1655
+ * button. Override `--cms-loader-size` to tune the spinner.
1656
+ */
1657
+ readonly inline: import("@angular/core").InputSignal<boolean>;
1658
+ static ɵfac: i0.ɵɵFactoryDeclaration<CmsLoaderComponent, never>;
1659
+ static ɵcmp: i0.ɵɵComponentDeclaration<CmsLoaderComponent, "cms-loader", never, {
1660
+ "label": {
1661
+ "alias": "label";
1662
+ "required": false;
1663
+ "isSignal": true;
1664
+ };
1665
+ "overlay": {
1666
+ "alias": "overlay";
1667
+ "required": false;
1668
+ "isSignal": true;
1669
+ };
1670
+ "inline": {
1671
+ "alias": "inline";
1672
+ "required": false;
1673
+ "isSignal": true;
1674
+ };
1675
+ }, {}, never, never, true, never>;
1676
+ }
1677
+ /** The prefix of a grid's own entry: `datagrid:<gridId>`. */
1678
+ export declare const DATAGRID_ENTRY_PREFIX = "datagrid:";
1679
+ /** The entry a grid's preferences are kept in. */
1680
+ export declare function datagridEntry(gridId: string): string;
1681
+ /**
1682
+ * The person's interface preferences: one localStorage key (`coolms_ui_prefs`) holding the entries the server keeps
1683
+ * (PATCH /auth/me/preferences, read back from GET /auth/me's uiPrefs), each an object of fields, by id:
1684
+ *
1685
+ * datagrid:{gridId} { columns, columnWidths } one entry per grid
1686
+ * panel { {persistKey}: { width, collapsed } }
1687
+ * page { vfs: {...}, media: {...}, nav: { lastRoute } }
1688
+ * terminal { height }
1689
+ *
1690
+ * A change is written locally at once and sent, debounced, as the entries that changed only; the server merges each
1691
+ * entry field by field and leaves every other entry as it was. A refusal (422) is shown to the person through
1692
+ * {@link PREFERENCES_NOTICE}; any other failure is tried again after 5 s, 30 s, then every 2 min, and at once when
1693
+ * the browser comes back online or the tab is shown again. On load the server's value wins for every entry it has.
1694
+ */
1695
+ export declare class UserPreferencesService {
1696
+ private readonly http;
1697
+ private readonly store;
1698
+ private readonly destroyRef;
1699
+ private readonly errors;
1700
+ private readonly notice;
1701
+ private readonly document;
1702
+ private readonly STORAGE_KEY;
1703
+ private readonly SYNC_DELAY;
1704
+ /** The waits before each try again after a failed send, in ms; the last one repeats. */
1705
+ private readonly RETRY_DELAYS;
1706
+ /** The entries changed since the last send, by id, with the value to send. */
1707
+ private readonly pending;
1708
+ private readonly syncSubject;
1709
+ /** Failed sends since the last one that succeeded; picks the wait before the next try. */
1710
+ private failures;
1711
+ /** The one try again scheduled after a failed send, if any. */
1712
+ private retryTimer;
1713
+ constructor();
1714
+ /** Writes all entries locally, and schedules a debounced send of the entries named. */
1715
+ private save;
1716
+ private write;
1717
+ private readLocal;
1718
+ /**
1719
+ * Read the entire prefs object from localStorage, applying legacy key
1720
+ * migration on the first read after an upgrade.
1721
+ */
1722
+ private load;
1723
+ /**
1724
+ * Older shapes, moved to today's in place; true when something moved. Each grid gets its own `datagrid:<id>`
1725
+ * entry -- from the nested `grids` entry, or a flat grid key older still -- unless it already has one; a moved
1726
+ * grid's entry is queued to be sent, so the server keeps the same shape.
1727
+ */
1728
+ private migrate;
1729
+ /**
1730
+ * Takes the server's preferences (GET /auth/me's uiPrefs), after sign-in and on every load: for every entry the
1731
+ * server has, its value wins over the local one; an entry only this browser has is kept. An entry changed here
1732
+ * and not yet sent keeps its local value: it is newer, and on its way. The server's nested `grids` entry gives a
1733
+ * grid its own entry only where neither side has one.
1734
+ */
1735
+ loadFromServer(uiPrefs: Record<string, unknown>): void;
1736
+ /** Sends the entries changed since the last send, those only. */
1737
+ private flush;
1738
+ private syncToServer;
1739
+ /** Schedules the one try again of the pending entries, after the wait the failures so far call for. */
1740
+ private scheduleRetry;
1741
+ private cancelRetry;
1742
+ /**
1743
+ * A send that failed. A refusal (422) stored nothing and would be refused again: the person is told, in the
1744
+ * server's words. Any other failure keeps the entries (one changed since is newer) and schedules one try again; a
1745
+ * change made meanwhile goes with the next send.
1746
+ */
1747
+ private refused;
1748
+ /**
1749
+ * Get stored preferences for a specific grid: its `datagrid:<gridId>` entry, without the fields a reset left
1750
+ * empty; null when it has none.
1751
+ */
1752
+ getGridPref(gridId: string): DataGridPreference | null;
1753
+ /**
1754
+ * Set visible column order for a grid.
1755
+ * Applies to localStorage instantly; server sync is debounced.
1756
+ */
1757
+ setColumns(gridId: string, columns: string[]): void;
1758
+ /**
1759
+ * Record a column width for a grid column.
1760
+ * Applies to localStorage instantly; server sync is debounced.
1761
+ */
1762
+ setColumnWidth(gridId: string, field: string, width: number): void;
1763
+ /**
1764
+ * Remove all preferences for a specific grid, and send at once: the server keeps an entry it was once sent,
1765
+ * so the grid's fields are sent empty (null), which it stores as they come.
1766
+ */
1767
+ resetGrid(gridId: string): void;
1768
+ private updateGrid;
1769
+ /**
1770
+ * Get persisted terminal panel height.
1771
+ */
1772
+ getTerminalHeight(): number | null;
1773
+ /**
1774
+ * Persist terminal panel height.
1775
+ */
1776
+ setTerminalHeight(height: number): void;
1777
+ /**
1778
+ * Get persisted state for a resizable panel identified by key.
1779
+ * Used by ExplorerLayoutComponent to persist panel widths across sessions.
1780
+ */
1781
+ getPanelState(key: string): {
1782
+ width: number;
1783
+ collapsed: boolean;
1784
+ } | null;
1785
+ /**
1786
+ * Persist generic panel state by key.
1787
+ * Applies to localStorage instantly; server sync is debounced.
1788
+ */
1789
+ setPanelState(key: string, width: number, collapsed: boolean): void;
1790
+ /**
1791
+ * Get all persisted state for a page namespace (e.g. 'vfs', 'media', 'nav').
1792
+ */
1793
+ getPageState<T>(pageKey: string): T | null;
1794
+ /**
1795
+ * Merge partial state into a page namespace.
1796
+ * Existing keys in the namespace are preserved; only provided keys are updated.
1797
+ * Applies to localStorage instantly; server sync is debounced.
1798
+ */
1799
+ setPageState(pageKey: string, state: Record<string, unknown>): void;
1800
+ /** @deprecated Use getPageState('media') instead */
1801
+ getMediaViewMode(): string | null;
1802
+ /** @deprecated Use setPageState('media', ...) instead */
1803
+ setMediaViewMode(mode: string): void;
1804
+ /** @deprecated Use getPanelState('media_panel_left') instead */
1805
+ getMediaCollectionsPanel(): {
1806
+ width: number;
1807
+ collapsed: boolean;
1808
+ } | null;
1809
+ /** @deprecated Use setPanelState('media_panel_left', ...) instead */
1810
+ setMediaCollectionsPanel(width: number, collapsed: boolean): void;
1811
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserPreferencesService, never>;
1812
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1813
+ }
1814
+ /**
1815
+ * Told when the server refused to store the person's interface preferences (a 422): the application shows the
1816
+ * sentence to the person, in its own toast or notice. `sentence` is whole, ready to show:
1817
+ * "Your preferences could not be saved: <the server's reason>".
1818
+ */
1819
+ export interface PreferencesNoticePort {
1820
+ refused(sentence: string): void;
1821
+ }
1822
+ /** Optional: with nothing bound, a refusal is only written to the console. */
1823
+ export declare const PREFERENCES_NOTICE: InjectionToken<PreferencesNoticePort>;
1707
1824
  /**
1708
1825
  * Sidebar collapse state -- two independent dimensions:
1709
1826
  *
@@ -1723,35 +1840,34 @@ declare class UserPreferencesService {
1723
1840
  * to defaulting un-collapsed -- the toggles still work for the session,
1724
1841
  * just don't persist.
1725
1842
  */
1726
- declare class SidebarStateService {
1727
- private static readonly STORAGE_KEY;
1728
- private static readonly STORAGE_KEY_SECTIONS;
1729
- private static readonly STORAGE_KEY_ITEMS;
1730
- readonly collapsed: i0.WritableSignal<boolean>;
1731
- readonly collapsedSections: i0.WritableSignal<Set<string>>;
1732
- readonly collapsedItems: i0.WritableSignal<Set<string>>;
1733
- toggle(): void;
1734
- isSectionCollapsed(id: string): boolean;
1735
- toggleSection(id: string): void;
1736
- /**
1737
- * Force a section to be expanded. Used when navigation lands on
1738
- * a route inside a manually-collapsed section -- it would be
1739
- * confusing to leave the active item hidden. The user can
1740
- * collapse the section again afterwards.
1741
- */
1742
- ensureExpanded(id: string): void;
1743
- isItemCollapsed(id: string): boolean;
1744
- toggleItem(id: string): void;
1745
- private readPersisted;
1746
- private persist;
1747
- private readSectionsPersisted;
1748
- private persistSections;
1749
- private readItemsPersisted;
1750
- private persistItems;
1751
- static ɵfac: i0.ɵɵFactoryDeclaration<SidebarStateService, never>;
1752
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1753
- }
1754
-
1843
+ export declare class SidebarStateService {
1844
+ private static readonly STORAGE_KEY;
1845
+ private static readonly STORAGE_KEY_SECTIONS;
1846
+ private static readonly STORAGE_KEY_ITEMS;
1847
+ readonly collapsed: import("@angular/core").WritableSignal<boolean>;
1848
+ readonly collapsedSections: import("@angular/core").WritableSignal<Set<string>>;
1849
+ readonly collapsedItems: import("@angular/core").WritableSignal<Set<string>>;
1850
+ toggle(): void;
1851
+ isSectionCollapsed(id: string): boolean;
1852
+ toggleSection(id: string): void;
1853
+ /**
1854
+ * Force a section to be expanded. Used when navigation lands on
1855
+ * a route inside a manually-collapsed section -- it would be
1856
+ * confusing to leave the active item hidden. The user can
1857
+ * collapse the section again afterwards.
1858
+ */
1859
+ ensureExpanded(id: string): void;
1860
+ isItemCollapsed(id: string): boolean;
1861
+ toggleItem(id: string): void;
1862
+ private readPersisted;
1863
+ private persist;
1864
+ private readSectionsPersisted;
1865
+ private persistSections;
1866
+ private readItemsPersisted;
1867
+ private persistItems;
1868
+ static ɵfac: i0.ɵɵFactoryDeclaration<SidebarStateService, never>;
1869
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1870
+ }
1755
1871
  /**
1756
1872
  * One row returned by the `/api/entity-search` endpoint. `id` is
1757
1873
  * what the picker emits via its `valueChange` output (and what the
@@ -1761,10 +1877,10 @@ declare class SidebarStateService {
1761
1877
  * when there is nothing to show; receiving `null` from a custom
1762
1878
  * resolver is normalized to `undefined` here.
1763
1879
  */
1764
- interface EntitySearchResult {
1765
- readonly id: string | number;
1766
- readonly label: string;
1767
- readonly secondary?: string;
1880
+ export interface EntitySearchResult {
1881
+ readonly id: string | number;
1882
+ readonly label: string;
1883
+ readonly secondary?: string;
1768
1884
  }
1769
1885
  /**
1770
1886
  * HTTP client for the Phase 2a `/api/entity-search` endpoint.
@@ -1772,55 +1888,64 @@ interface EntitySearchResult {
1772
1888
  * Permission filtering happens at the backend resolver layer --
1773
1889
  * this service is a thin RPC.
1774
1890
  */
1775
- declare class EntitySearchService {
1776
- private readonly http;
1777
- /**
1778
- * @param entityType Fully-qualified PHP class name of the entity
1779
- * being searched (e.g. the backend's User entity).
1780
- * @param query Free-text search input. Empty string is
1781
- * valid -- the backend returns the default
1782
- * listing for that entity type.
1783
- * @param limit Max rows to return; clamped server-side to
1784
- * [1, 100].
1785
- */
1786
- search(entityType: string, query: string, limit?: number): Observable<EntitySearchResult[]>;
1787
- static ɵfac: i0.ɵɵFactoryDeclaration<EntitySearchService, never>;
1788
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1789
- }
1790
-
1891
+ export declare class EntitySearchService {
1892
+ private readonly http;
1893
+ /**
1894
+ * @param entityType Fully-qualified PHP class name of the entity
1895
+ * being searched (e.g. the backend's User entity).
1896
+ * @param query Free-text search input. Empty string is
1897
+ * valid -- the backend returns the default
1898
+ * listing for that entity type.
1899
+ * @param limit Max rows to return; clamped server-side to
1900
+ * [1, 100].
1901
+ */
1902
+ search(entityType: string, query: string, limit?: number): Observable<EntitySearchResult[]>;
1903
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntitySearchService, never>;
1904
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1905
+ }
1791
1906
  /**
1792
1907
  * Well-known click target values embedded in meta.target.
1793
1908
  * 'action.logout' -- dispatch Logout action
1794
1909
  * 'route' -- navigate via routerLink (default when target absent)
1795
1910
  * '_blank' -- open in a new tab (hrefOverride must be set)
1796
1911
  */
1797
- type NaviGraphTarget = 'action.logout' | 'route' | '_blank' | (string & {});
1798
- interface NaviGraphMeta {
1799
- readonly component?: string;
1800
- readonly icon?: string;
1801
- readonly routerLink?: string;
1802
- readonly target?: NaviGraphTarget;
1803
- readonly requiredRole?: string;
1804
- readonly voterAttribute?: string;
1805
- readonly contributor?: string;
1806
- readonly [key: string]: unknown;
1912
+ export type NaviGraphTarget = 'action.logout' | 'route' | '_blank' | (string & {});
1913
+ export interface NaviGraphMeta {
1914
+ readonly component?: string;
1915
+ readonly icon?: string;
1916
+ readonly routerLink?: string;
1917
+ readonly target?: NaviGraphTarget;
1918
+ readonly requiredRole?: string;
1919
+ readonly voterAttribute?: string;
1920
+ readonly contributor?: string;
1921
+ readonly [key: string]: unknown;
1807
1922
  }
1923
+ /**
1924
+ * What the server says this account may do with a node, as it answered the graph:
1925
+ * 'allowed' -- its own rights open it; shown as usual;
1926
+ * 'elevate' -- a member of admin, not elevated, whose own rights refuse it and whom elevation would let in;
1927
+ * shown with a lock, and opening it asks for elevation first.
1928
+ * A node anyone else may not open is not in the answer at all. Absent (an older server) reads as 'allowed'.
1929
+ */
1930
+ export type NaviAccess = 'allowed' | 'elevate';
1808
1931
  /** Flat node as returned from GET /navi/trees/{slug}/graph */
1809
- interface NaviGraphNodeFlat {
1810
- readonly id: string;
1811
- readonly path: string;
1812
- readonly title: string;
1813
- readonly parentId: string | null;
1814
- readonly sortOrder: number;
1815
- readonly isActive: boolean;
1816
- readonly isVisible: boolean;
1817
- readonly meta: NaviGraphMeta;
1818
- }
1932
+ export interface NaviGraphNodeFlat {
1933
+ readonly id: string;
1934
+ readonly path: string;
1935
+ readonly title: string;
1936
+ readonly parentId: string | null;
1937
+ readonly sortOrder: number;
1938
+ readonly isActive: boolean;
1939
+ readonly isVisible: boolean;
1940
+ readonly meta: NaviGraphMeta;
1941
+ readonly access?: NaviAccess;
1942
+ }
1943
+ /** The node's access as the server answered it; 'allowed' when the server said nothing (an older server). */
1944
+ export declare function naviAccessOf(node: Pick<NaviGraphNodeFlat, 'access'>): NaviAccess;
1819
1945
  /** Same node enriched with resolved children after client-side tree build */
1820
- interface NaviGraphNode extends NaviGraphNodeFlat {
1821
- readonly children: NaviGraphNode[];
1946
+ export interface NaviGraphNode extends NaviGraphNodeFlat {
1947
+ readonly children: NaviGraphNode[];
1822
1948
  }
1823
-
1824
1949
  /**
1825
1950
  * Loads, caches, and drives admin NaviGraph trees.
1826
1951
  *
@@ -1829,59 +1954,65 @@ interface NaviGraphNode extends NaviGraphNodeFlat {
1829
1954
  * const items = naviGraphService.adminNav(); // signal<NaviGraphNode[]>
1830
1955
  * naviGraphService.handleClick(node);
1831
1956
  */
1832
- declare class NaviGraphService {
1833
- private readonly http;
1834
- private readonly router;
1835
- private readonly store;
1836
- private readonly errors;
1837
- /** Resolved root nodes for navi.admin (sidebar). */
1838
- readonly adminNav: i0.WritableSignal<NaviGraphNode[]>;
1839
- /** Resolved root nodes for navi.admin.topbar. */
1840
- readonly topbarNav: i0.WritableSignal<NaviGraphNode[]>;
1841
- private readonly cache;
1842
- loadAdminNav(url: string): Observable<NaviGraphNode[]>;
1843
- loadTopbarNav(url: string): Observable<NaviGraphNode[]>;
1844
- /**
1845
- * Handle a nav-node click.
1846
- *
1847
- * Routing logic based on meta.target:
1848
- * 'action.logout' -- dispatch Logout
1849
- * '_blank' -- window.open (uses node.path as href)
1850
- * default -- router.navigate with meta.routerLink or node.path
1851
- */
1852
- handleClick(node: NaviGraphNode): void;
1853
- /**
1854
- * Evaluate `showWhen` meta condition against a record.
1855
- * Nodes with no `showWhen` are always visible.
1856
- * Supports nested AND/OR logic: { and: [...] } / { or: [...] }
1857
- */
1858
- isVisible(node: NaviGraphNode, record: Record<string, unknown>): boolean;
1859
- /**
1860
- * Standalone `showWhen` evaluator for callers that don't have a
1861
- * full `NaviGraphNode` (e.g. a grid's row context menu -- a
1862
- * `rowAction.showWhen` predicate is evaluated against the row's
1863
- * own projection). `null`/`undefined` predicates default to
1864
- * visible, mirroring `isVisible`'s "no rule = always shown"
1865
- * semantics.
1866
- */
1867
- matchesShowWhen(showWhen: Record<string, unknown> | undefined | null, record: Record<string, unknown>): boolean;
1868
- private evalCondition;
1869
- /**
1870
- * Fetch a graph endpoint and return a nested tree.
1871
- * Handles both compact JSON-LD IRIs (`member`) and
1872
- * the legacy Hydra key (`hydra:member`).
1873
- * Results are cached by URL for the lifetime of the service instance.
1874
- */
1875
- loadTree(url: string): Observable<NaviGraphNode[]>;
1876
- /**
1877
- * Build a nested tree from a flat array of nodes.
1878
- * Nodes are sorted by sortOrder at each level.
1879
- */
1880
- private buildTree;
1881
- static ɵfac: i0.ɵɵFactoryDeclaration<NaviGraphService, never>;
1882
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1883
- }
1884
-
1957
+ export declare class NaviGraphService {
1958
+ private readonly http;
1959
+ private readonly router;
1960
+ private readonly store;
1961
+ private readonly errors;
1962
+ /** Resolved root nodes for navi.admin (sidebar). */
1963
+ readonly adminNav: import("@angular/core").WritableSignal<NaviGraphNode[]>;
1964
+ /** Resolved root nodes for navi.admin.topbar. */
1965
+ readonly topbarNav: import("@angular/core").WritableSignal<NaviGraphNode[]>;
1966
+ private readonly cache;
1967
+ /**
1968
+ * `fresh` asks the server again instead of answering from this service's cache: the answer is per account AND
1969
+ * per elevation state (a node is 'elevate' before a grant and 'allowed' after it), so a change of elevation must
1970
+ * re-ask, or a lock would outlive the grant -- or come back only after a reload.
1971
+ */
1972
+ loadAdminNav(url: string, options?: {
1973
+ fresh?: boolean;
1974
+ }): Observable<NaviGraphNode[]>;
1975
+ loadTopbarNav(url: string): Observable<NaviGraphNode[]>;
1976
+ /**
1977
+ * Handle a nav-node click.
1978
+ *
1979
+ * Routing logic based on meta.target:
1980
+ * 'action.logout' -- dispatch Logout
1981
+ * '_blank' -- window.open (uses node.path as href)
1982
+ * default -- router.navigate with meta.routerLink or node.path
1983
+ */
1984
+ handleClick(node: NaviGraphNode): void;
1985
+ /**
1986
+ * Evaluate `showWhen` meta condition against a record.
1987
+ * Nodes with no `showWhen` are always visible.
1988
+ * Supports nested AND/OR logic: { and: [...] } / { or: [...] }
1989
+ */
1990
+ isVisible(node: NaviGraphNode, record: Record<string, unknown>): boolean;
1991
+ /**
1992
+ * Standalone `showWhen` evaluator for callers that don't have a
1993
+ * full `NaviGraphNode` (e.g. a grid's row context menu -- a
1994
+ * `rowAction.showWhen` predicate is evaluated against the row's
1995
+ * own projection). `null`/`undefined` predicates default to
1996
+ * visible, mirroring `isVisible`'s "no rule = always shown"
1997
+ * semantics.
1998
+ */
1999
+ matchesShowWhen(showWhen: Record<string, unknown> | undefined | null, record: Record<string, unknown>): boolean;
2000
+ private evalCondition;
2001
+ /**
2002
+ * Fetch a graph endpoint and return a nested tree.
2003
+ * Handles both compact JSON-LD IRIs (`member`) and
2004
+ * the legacy Hydra key (`hydra:member`).
2005
+ * Results are cached by URL for the lifetime of the service instance.
2006
+ */
2007
+ loadTree(url: string, fresh?: boolean): Observable<NaviGraphNode[]>;
2008
+ /**
2009
+ * Build a nested tree from a flat array of nodes.
2010
+ * Nodes are sorted by sortOrder at each level.
2011
+ */
2012
+ private buildTree;
2013
+ static ɵfac: i0.ɵɵFactoryDeclaration<NaviGraphService, never>;
2014
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2015
+ }
1885
2016
  /**
1886
2017
  * Registry mapping string keys to Angular component classes.
1887
2018
  *
@@ -1895,20 +2026,19 @@ declare class NaviGraphService {
1895
2026
  * private readonly registry = inject(ComponentRegistry);
1896
2027
  * const cls = this.registry.get('MediaLibraryPage');
1897
2028
  */
1898
- declare class ComponentRegistry {
1899
- private static readonly map;
1900
- static register(key: string, component: Type<unknown>): void;
1901
- static get(key: string): Type<unknown> | undefined;
1902
- static has(key: string): boolean;
1903
- static keys(): string[];
1904
- register(key: string, component: Type<unknown>): void;
1905
- get(key: string): Type<unknown> | null;
1906
- has(key: string): boolean;
1907
- keys(): string[];
1908
- static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRegistry, never>;
1909
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1910
- }
1911
-
2029
+ export declare class ComponentRegistry {
2030
+ private static readonly map;
2031
+ static register(key: string, component: Type<unknown>): void;
2032
+ static get(key: string): Type<unknown> | undefined;
2033
+ static has(key: string): boolean;
2034
+ static keys(): string[];
2035
+ register(key: string, component: Type<unknown>): void;
2036
+ get(key: string): Type<unknown> | null;
2037
+ has(key: string): boolean;
2038
+ keys(): string[];
2039
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComponentRegistry, never>;
2040
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2041
+ }
1912
2042
  /**
1913
2043
  * `console` -- the administration host contract (the platform rule: hosts implement contracts, modules offer entries).
1914
2044
  *
@@ -1924,35 +2054,35 @@ declare class ComponentRegistry {
1924
2054
  * (`^1.2` -- major 1, minor at least 2), checked at build against this
1925
2055
  * constant and at install against the theme's declaration.
1926
2056
  */
1927
- declare const CONSOLE_CONTRACT: {
1928
- readonly name: "console";
1929
- readonly version: "1.0";
2057
+ export declare const CONSOLE_CONTRACT: {
2058
+ readonly name: "console";
2059
+ readonly version: "1.0";
1930
2060
  };
1931
- interface ConsoleEntry {
1932
- /** The backend module id, as `config/modules/<id>`. Activation is by this id. */
1933
- readonly module: string;
1934
- readonly contract: 'console';
1935
- /** The console versions this entry was written for: a caret range over MAJOR.MINOR, e.g. '^1.0'. */
1936
- readonly range: string;
1937
- readonly routes?: readonly ConsoleRouteMount[];
1938
- readonly bindings?: readonly ConsoleBinding[];
1939
- readonly topbar?: readonly ConsoleTopbarItem[];
1940
- readonly overlays?: readonly ConsoleOverlay[];
1941
- readonly panels?: readonly ConsolePanel[];
1942
- readonly states?: readonly Type<unknown>[];
1943
- readonly providers?: readonly ConsoleProvision[];
2061
+ export interface ConsoleEntry {
2062
+ /** The backend module id, as `config/modules/<id>`. Activation is by this id. */
2063
+ readonly module: string;
2064
+ readonly contract: 'console';
2065
+ /** The console versions this entry was written for: a caret range over MAJOR.MINOR, e.g. '^1.0'. */
2066
+ readonly range: string;
2067
+ readonly routes?: readonly ConsoleRouteMount[];
2068
+ readonly bindings?: readonly ConsoleBinding[];
2069
+ readonly topbar?: readonly ConsoleTopbarItem[];
2070
+ readonly overlays?: readonly ConsoleOverlay[];
2071
+ readonly panels?: readonly ConsolePanel[];
2072
+ readonly states?: readonly Type<unknown>[];
2073
+ readonly providers?: readonly ConsoleProvision[];
1944
2074
  }
1945
2075
  /** What a route's `data` carries for the shell: the sidebar item to light, and whether the page owns its height. */
1946
- interface ConsoleNavHint {
1947
- readonly activeNav?: string;
1948
- readonly fullHeight?: boolean;
1949
- /** An intermediate crumb the top bar renders between Home and the page. */
1950
- readonly breadcrumb?: {
1951
- readonly label: string;
1952
- readonly routerLink: string;
1953
- };
1954
- /** Which server layout the page renders, for the generic layout pages. */
1955
- readonly layoutId?: string;
2076
+ export interface ConsoleNavHint {
2077
+ readonly activeNav?: string;
2078
+ readonly fullHeight?: boolean;
2079
+ /** An intermediate crumb the top bar renders between Home and the page. */
2080
+ readonly breadcrumb?: {
2081
+ readonly label: string;
2082
+ readonly routerLink: string;
2083
+ };
2084
+ /** Which server layout the page renders, for the generic layout pages. */
2085
+ readonly layoutId?: string;
1956
2086
  }
1957
2087
  /**
1958
2088
  * A route mounted under the console's authenticated layout. The host adds
@@ -1960,52 +2090,52 @@ interface ConsoleNavHint {
1960
2090
  * and a `canMatch` that answers whether the module is installed here. Routes
1961
2091
  * are lazy: a static component here would put every module's pages in `main`.
1962
2092
  */
1963
- type ConsoleRouteMount = {
1964
- readonly path: string;
1965
- readonly children: () => Promise<Routes>;
1966
- readonly nav?: ConsoleNavHint;
1967
- readonly providers?: readonly Provider[];
2093
+ export type ConsoleRouteMount = {
2094
+ readonly path: string;
2095
+ readonly children: () => Promise<Routes>;
2096
+ readonly nav?: ConsoleNavHint;
2097
+ readonly providers?: readonly Provider[];
1968
2098
  } | {
1969
- readonly path: string;
1970
- readonly component: () => Promise<Type<unknown>>;
1971
- readonly nav?: ConsoleNavHint;
1972
- readonly providers?: readonly Provider[];
2099
+ readonly path: string;
2100
+ readonly component: () => Promise<Type<unknown>>;
2101
+ readonly nav?: ConsoleNavHint;
2102
+ readonly providers?: readonly Provider[];
1973
2103
  } | {
1974
- readonly path: string;
1975
- readonly redirectTo: string;
2104
+ readonly path: string;
2105
+ readonly redirectTo: string;
1976
2106
  };
1977
2107
  /** A `ComponentRegistry` name -> class: names a module OWNS (its server layouts name them) and names it fills in another module's slot (`profile.tab:call`). */
1978
- interface ConsoleBinding {
1979
- readonly name: string;
1980
- readonly component: Type<unknown>;
2108
+ export interface ConsoleBinding {
2109
+ readonly name: string;
2110
+ readonly component: Type<unknown>;
1981
2111
  }
1982
2112
  /** A tile in the top bar's quick-access strip, rendered in ascending `order`. */
1983
- interface ConsoleTopbarItem {
1984
- readonly id: string;
1985
- readonly order: number;
1986
- readonly component: Type<unknown>;
2113
+ export interface ConsoleTopbarItem {
2114
+ readonly id: string;
2115
+ readonly order: number;
2116
+ readonly component: Type<unknown>;
1987
2117
  }
1988
2118
  /** Mounted once, inside the authenticated layout, outside the router outlet. */
1989
- interface ConsoleOverlay {
1990
- readonly id: string;
1991
- readonly component: Type<unknown>;
2119
+ export interface ConsoleOverlay {
2120
+ readonly id: string;
2121
+ readonly component: Type<unknown>;
1992
2122
  }
1993
2123
  /**
1994
2124
  * A dock panel the layout opens and closes: the host renders its toggle in
1995
2125
  * the top bar and the panel in the dock, and the panel talks back through
1996
2126
  * {@link ConsolePanelHost} -- not through outputs, which a slot cannot carry.
1997
2127
  */
1998
- interface ConsolePanel {
1999
- readonly id: string;
2000
- readonly dock: 'bottom';
2001
- /** The top-bar toggle: a label (the title), an icon name or a short text, and a key the host binds with Ctrl. */
2002
- readonly toggle: {
2003
- readonly label: string;
2004
- readonly icon?: string;
2005
- readonly text?: string;
2006
- readonly key?: string;
2007
- };
2008
- readonly component: Type<unknown>;
2128
+ export interface ConsolePanel {
2129
+ readonly id: string;
2130
+ readonly dock: 'bottom';
2131
+ /** The top-bar toggle: a label (the title), an icon name or a short text, and a key the host binds with Ctrl. */
2132
+ readonly toggle: {
2133
+ readonly label: string;
2134
+ readonly icon?: string;
2135
+ readonly text?: string;
2136
+ readonly key?: string;
2137
+ };
2138
+ readonly component: Type<unknown>;
2009
2139
  }
2010
2140
  /**
2011
2141
  * What a `provide*` line is: environment providers from a library's registry
@@ -2013,24 +2143,24 @@ interface ConsolePanel {
2013
2143
  * implementation of a single-implementation port, listed as such so the
2014
2144
  * assembly can refuse two modules implementing one port by name.
2015
2145
  */
2016
- type ConsoleProvision = EnvironmentProviders | Provider | ConsolePortProvision;
2017
- interface ConsolePortProvision {
2018
- readonly port: InjectionToken<unknown>;
2019
- readonly useExisting: Type<unknown>;
2146
+ export type ConsoleProvision = EnvironmentProviders | Provider | ConsolePortProvision;
2147
+ export interface ConsolePortProvision {
2148
+ readonly port: InjectionToken<unknown>;
2149
+ readonly useExisting: Type<unknown>;
2020
2150
  }
2021
- declare function isPortProvision(p: ConsoleProvision): p is ConsolePortProvision;
2151
+ export declare function isPortProvision(p: ConsoleProvision): p is ConsolePortProvision;
2022
2152
  /** The identity function with the type: an entry file exports data, nothing runs. */
2023
- declare function consoleEntry(entry: ConsoleEntry): ConsoleEntry;
2153
+ export declare function consoleEntry(entry: ConsoleEntry): ConsoleEntry;
2024
2154
  /**
2025
2155
  * Whether a caret range over MAJOR.MINOR admits a version: same major, minor
2026
2156
  * at least the range's. Malformed input admits nothing -- a range that cannot
2027
2157
  * be read must refuse, never pass.
2028
2158
  */
2029
- declare function satisfiesRange(range: string, version: string): boolean;
2159
+ export declare function satisfiesRange(range: string, version: string): boolean;
2030
2160
  /** The refusal an assembly raises: one message per collision, all of them, by name. */
2031
- declare class ConsoleAssemblyError extends Error {
2032
- readonly problems: readonly string[];
2033
- constructor(problems: readonly string[]);
2161
+ export declare class ConsoleAssemblyError extends Error {
2162
+ readonly problems: readonly string[];
2163
+ constructor(problems: readonly string[]);
2034
2164
  }
2035
2165
  /**
2036
2166
  * The checks every assembly runs, in one place so the build-time spec, the
@@ -2038,8 +2168,7 @@ declare class ConsoleAssemblyError extends Error {
2038
2168
  * this contract, and the collision rules of the six lists. Returns the
2039
2169
  * entries unchanged when nothing is wrong.
2040
2170
  */
2041
- declare function assembleConsole(entries: readonly ConsoleEntry[]): readonly ConsoleEntry[];
2042
-
2171
+ export declare function assembleConsole(entries: readonly ConsoleEntry[]): readonly ConsoleEntry[];
2043
2172
  /**
2044
2173
  * The host side of `console@1`: what a theme calls to turn the assembled
2045
2174
  * entries into routes, providers and the lists its shell renders.
@@ -2052,31 +2181,31 @@ declare function assembleConsole(entries: readonly ConsoleEntry[]): readonly Con
2052
2181
  * silently absent.
2053
2182
  */
2054
2183
  /** Every entry this build assembled, after {@link assembleConsole}'s checks. */
2055
- declare const CONSOLE_ENTRIES: InjectionToken<readonly ConsoleEntry[]>;
2184
+ export declare const CONSOLE_ENTRIES: InjectionToken<readonly ConsoleEntry[]>;
2056
2185
  /**
2057
2186
  * The port a dock panel talks back through: the layout provides one per
2058
2187
  * panel it mounts, so the panel never needs an output the slot cannot carry.
2059
2188
  */
2060
- declare abstract class ConsolePanelHost {
2061
- abstract close(): void;
2062
- abstract maximize(on: boolean): void;
2189
+ export declare abstract class ConsolePanelHost {
2190
+ abstract close(): void;
2191
+ abstract maximize(on: boolean): void;
2063
2192
  }
2064
2193
  /** The console modules the manifest says are installed here. */
2065
- declare function installedConsoleModules(manifest: ApiManifest | null): ReadonlySet<string>;
2066
- declare class ConsoleActivation {
2067
- private readonly entries;
2068
- private readonly manifest;
2069
- readonly installed: i0.Signal<ReadonlySet<string>>;
2070
- /** The entries of installed modules, in assembly order. */
2071
- readonly active: i0.Signal<ConsoleEntry[]>;
2072
- readonly topbar: i0.Signal<readonly ConsoleTopbarItem[]>;
2073
- readonly overlays: i0.Signal<readonly ConsoleOverlay[]>;
2074
- readonly panels: i0.Signal<readonly ConsolePanel[]>;
2075
- /** Modules the manifest names that this build has no entry for: what a diagnostics page shows by name. */
2076
- readonly missing: i0.Signal<string[]>;
2077
- isInstalled(module: string): boolean;
2078
- static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleActivation, never>;
2079
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2194
+ export declare function installedConsoleModules(manifest: ApiManifest | null): ReadonlySet<string>;
2195
+ export declare class ConsoleActivation {
2196
+ private readonly entries;
2197
+ private readonly manifest;
2198
+ readonly installed: import("@angular/core").Signal<ReadonlySet<string>>;
2199
+ /** The entries of installed modules, in assembly order. */
2200
+ readonly active: import("@angular/core").Signal<ConsoleEntry[]>;
2201
+ readonly topbar: import("@angular/core").Signal<readonly ConsoleTopbarItem[]>;
2202
+ readonly overlays: import("@angular/core").Signal<readonly ConsoleOverlay[]>;
2203
+ readonly panels: import("@angular/core").Signal<readonly ConsolePanel[]>;
2204
+ /** Modules the manifest names that this build has no entry for: what a diagnostics page shows by name. */
2205
+ readonly missing: import("@angular/core").Signal<string[]>;
2206
+ isInstalled(module: string): boolean;
2207
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleActivation, never>;
2208
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
2080
2209
  }
2081
2210
  /**
2082
2211
  * `canMatch` for a module's mount: the route exists only where the module is
@@ -2084,8 +2213,8 @@ declare class ConsoleActivation {
2084
2213
  * recognises the URL while the initializer is still fetching `/theme/config`
2085
2214
  * (the two run as parallel initializers), and a synchronous read then found
2086
2215
  * no module installed, so every pasted module URL fell to the wildcard and
2087
- * landed on the dashboard (measured 2026-09-22: no chunk requested for the
2088
- * mount, the dashboard's instead). `ready$` is what the auth guard waits on
2216
+ * landed on the dashboard (no chunk requested for the mount, the dashboard's
2217
+ * instead). `ready$` is what the auth guard waits on
2089
2218
  * too, and it fires whether or not the config fetch succeeded.
2090
2219
  *
2091
2220
  * !! Then the console's own manifest, when someone is signed in: `ui.modules` is
@@ -2096,7 +2225,7 @@ declare class ConsoleActivation {
2096
2225
  * nothing is asked, the answer is the public config's, and the layout's guard
2097
2226
  * sends the person to sign in. A refusal merges nothing, so the answer is no.
2098
2227
  */
2099
- declare function consoleModuleInstalled(module: string): CanMatchFn;
2228
+ export declare function consoleModuleInstalled(module: string): CanMatchFn;
2100
2229
  /**
2101
2230
  * The children a theme mounts under its authenticated layout for the
2102
2231
  * assembled entries: one `Route` per mount, lazy as written, `data` from the
@@ -2104,21 +2233,22 @@ declare function consoleModuleInstalled(module: string): CanMatchFn;
2104
2233
  * shape around them (login, the layout, `canActivate: [authGuard]`, the
2105
2234
  * wildcard).
2106
2235
  */
2107
- declare function consoleChildren(entries: readonly ConsoleEntry[]): Routes;
2236
+ export declare function consoleChildren(entries: readonly ConsoleEntry[]): Routes;
2108
2237
  /**
2109
2238
  * The providers a theme adds for the assembled entries: the store with the
2110
- * host's states and every module state, the registry bindings (an
2239
+ * host's states and every module state -- in its strict-CSP mode, which reads
2240
+ * a selector's path without `new Function`, so the admin needs no `'unsafe-eval'`
2241
+ * (every eval its CSP reported was that getter) -- the registry bindings (an
2111
2242
  * initializer, so they exist before the first render), every module
2112
2243
  * provision, and {@link CONSOLE_ENTRIES} for the shell. Place it AFTER the
2113
2244
  * library providers a module's provisions extend (the editor bridge, the
2114
2245
  * PDF viewer), as the hand-written lines were.
2115
2246
  */
2116
- declare function provideConsole(entries: readonly ConsoleEntry[], options: {
2117
- readonly hostStates: readonly Type<unknown>[];
2247
+ export declare function provideConsole(entries: readonly ConsoleEntry[], options: {
2248
+ readonly hostStates: readonly Type<unknown>[];
2118
2249
  }): EnvironmentProviders;
2119
-
2120
2250
  /**
2121
- * Phase H7 -- admin Site Selector.
2251
+ * The admin's Site Selector.
2122
2252
  *
2123
2253
  * Stamps `X-CoolMS-Section: <slug>` on outgoing `/api/v1/*` requests when
2124
2254
  * the admin has picked a section from the Site Selector dropdown. The backend
@@ -2146,8 +2276,7 @@ declare function provideConsole(entries: readonly ConsoleEntry[], options: {
2146
2276
  * be ignored by the backend anyway, but skipping keeps wire traffic clean)
2147
2277
  * - requests that already carry the header (programmatic overrides win)
2148
2278
  */
2149
- declare const sectionInterceptor: HttpInterceptorFn;
2150
-
2279
+ export declare const sectionInterceptor: HttpInterceptorFn;
2151
2280
  /**
2152
2281
  * The one fact the section interceptor needs: which site the operator is
2153
2282
  * currently working in.
@@ -2162,16 +2291,13 @@ declare const sectionInterceptor: HttpInterceptorFn;
2162
2291
  * Read SYNCHRONOUSLY on purpose. An interceptor decides whether to stamp a
2163
2292
  * header while building the request; it cannot wait on a stream.
2164
2293
  */
2165
- interface CurrentSectionPort {
2166
- /** Slug of the active section, or null when the operator picked none. */
2167
- currentSlug(): string | null;
2294
+ export interface CurrentSectionPort {
2295
+ /** Slug of the active section, or null when the operator picked none. */
2296
+ currentSlug(): string | null;
2168
2297
  }
2169
2298
  /**
2170
2299
  * Optional by design: an application assembled without a Sections module binds
2171
2300
  * nothing and simply sends no `X-CoolMS-Section` header, which is exactly what
2172
2301
  * a single-site install wants.
2173
2302
  */
2174
- declare const CURRENT_SECTION: InjectionToken<CurrentSectionPort>;
2175
-
2176
- export { AppConfigState, AppInitService, AuthRefreshCoordinator, AuthState, BACKGROUND_REQUEST, BYPASS_AUTH, BYPASS_ELEVATION, CONSOLE_CONTRACT, CONSOLE_ENTRIES, CURRENT_SECTION, CmsLoaderComponent, ComponentRegistry, ConfigService, ConsoleAccessService, ConsoleActivation, ConsoleAssemblyError, ConsolePanelHost, CrossTabAuthSyncService, ELEVATION_NOTICE, ELEVATION_PROMPT, ELEVATION_REQUIRED_HEADER, ELEVATION_WARNING_FACTOR_MISSING, ELEVATION_WARNING_MFA_OFF, ELEVATION_WARNING_PASSWORD_NOT_SET, ElevationService, EntitySearchService, ErrorHandlerService, IdentityApiClient, Login, LoginComponent, Logout, NaviGraphService, PatchCurrentUser, RealtimeTokenClient, RestoreSession, SetAppConfig, SetTokens, SidebarStateService, ThemeService, UserPreferencesService, assembleConsole, authGuard, authInterceptor, consoleChildren, consoleEntry, consoleModuleInstalled, elevationInterceptor, installedConsoleModules, isElevationRefusal, isPortProvision, loginPageGuard, provideConsole, resolvePattern, satisfiesRange, sectionInterceptor };
2177
- export type { ApiManifest, AppConfigStateModel, AuthApiManifest, AuthStateModel, CentrifugoConnectionTokenDto, CentrifugoSubscriptionTokenDto, ConsoleAccess, ConsoleBinding, ConsoleEntry, ConsoleManifestResponse, ConsoleNavHint, ConsoleOverlay, ConsolePanel, ConsolePortProvision, ConsoleProvision, ConsoleRouteMount, ConsoleTopbarItem, ContentApiManifest, CurrentSectionPort, DataGridApiManifest, DataGridPreference, DataGridPreferences, DataSourceDefinition, DataSourceLoading, DataSourceOption, DataSourceType, DataSourceWidget, DatagridConfig, DialogConfig, DocumentApiManifest, DomainExplorerApiManifest, DynamicEntityApiManifest, EditorApiManifest, EditorApiManifestEntry, EditorApiManifestProfile, ElevationChange, ElevationChangeKind, ElevationDropReason, ElevationEnded, ElevationEndedReason, ElevationNoticePort, ElevationPromptPort, ElevationPromptRequest, ElevationState, ElevationWarning, EntitySearchResult, FieldItem, FieldSecurityPolicy, FieldType, FormAction, FormActionType, FormActionVariant, FormConfig, FormRenderDefinition, HydraCollection, HydraView, IdentityApiManifest, LayoutConfig, LayoutHeaderAction, LayoutNode, LayoutSection, MediaApiManifest, NaviApiManifest, NaviGraphMeta, NaviGraphNode, NaviGraphNodeFlat, NaviGraphTarget, NavigraphConfig, PlatformDefaults, RelationDefinition, ResolvedTheme, SectionApiManifest, SubFormDefinition, TerminalApiManifest, ThemeChoice, ThemeConfigResponse, TokenResponse, UiApiManifest, UiModuleEntryManifest, UserDto, ValidatorDefinition, VfsApiManifest, ViewerApiManifest, ViewerDefinitionApiManifest, ViewerProfileApiManifest, VisibilityCondition, VisibilityOperator };
2303
+ export declare const CURRENT_SECTION: InjectionToken<CurrentSectionPort>;