@masterteam/delegations 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/delegations.css +1 -1
- package/assets/i18n/ar.json +142 -125
- package/assets/i18n/en.json +142 -125
- package/fesm2022/masterteam-delegations.mjs +610 -921
- package/fesm2022/masterteam-delegations.mjs.map +1 -1
- package/package.json +2 -2
- package/types/masterteam-delegations.d.ts +355 -496
|
@@ -16,335 +16,233 @@ interface LoadingStateShape<L extends string = string> {
|
|
|
16
16
|
errors: Partial<Record<L, string>>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
type
|
|
19
|
+
type DelegationEffectiveStatus = 'PendingApproval' | 'Scheduled' | 'Active' | 'InactiveToday' | 'Expired' | 'Rejected' | 'Cancelled';
|
|
20
20
|
type DelegationApprovalStatus = 'NotRequired' | 'Pending' | 'Approved' | 'Rejected';
|
|
21
|
-
type
|
|
22
|
-
type
|
|
23
|
-
interface
|
|
24
|
-
|
|
21
|
+
type DelegationAllowedAction = 'View' | 'Edit' | 'Approve' | 'Reject' | 'Cancel' | 'StartSession' | 'EndSession';
|
|
22
|
+
type DelegationDayRuleMode = 'FullRange' | 'SpecificDays';
|
|
23
|
+
interface DelegationParty {
|
|
24
|
+
userId: string;
|
|
25
25
|
displayName: string;
|
|
26
|
-
email?: string;
|
|
27
|
-
photo?: string;
|
|
26
|
+
email?: string | null;
|
|
28
27
|
}
|
|
29
|
-
interface
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
status: DelegationApprovalStatus;
|
|
36
|
-
approvedBy?: DelegationUser | null;
|
|
37
|
-
approvedAtUtc?: string | null;
|
|
38
|
-
rejectedBy?: DelegationUser | null;
|
|
39
|
-
rejectedAtUtc?: string | null;
|
|
40
|
-
rejectionReason?: string | null;
|
|
41
|
-
}
|
|
42
|
-
interface DelegationCancellationMeta {
|
|
43
|
-
cancelledBy?: DelegationUser | null;
|
|
28
|
+
interface DelegationApprovalInfo {
|
|
29
|
+
requiresApproval: boolean;
|
|
30
|
+
approvalStatus: DelegationApprovalStatus;
|
|
31
|
+
}
|
|
32
|
+
interface DelegationCancellationInfo {
|
|
33
|
+
cancelledBy?: DelegationParty | null;
|
|
44
34
|
cancelledAtUtc?: string | null;
|
|
45
35
|
cancellationReason?: string | null;
|
|
46
36
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
moduleName?: string;
|
|
66
|
-
permissionModuleType?: DelegationPermissionModuleType;
|
|
67
|
-
permissionTargetId?: number;
|
|
68
|
-
operations: DelegationScopeOperation[];
|
|
69
|
-
dataFilter?: unknown;
|
|
70
|
-
constraints?: unknown;
|
|
71
|
-
}
|
|
72
|
-
interface DelegationScopeAccessibility {
|
|
73
|
-
appAccessibilityId: number;
|
|
74
|
-
accessibilityGroupId: number;
|
|
75
|
-
moduleKey: string;
|
|
76
|
-
moduleName: string;
|
|
77
|
-
groupName: string;
|
|
78
|
-
}
|
|
79
|
-
interface DelegationScopeWarning {
|
|
80
|
-
code: string;
|
|
81
|
-
message: string;
|
|
37
|
+
interface DelegationRow {
|
|
38
|
+
delegationId: number;
|
|
39
|
+
delegator: DelegationParty;
|
|
40
|
+
delegatedUser: DelegationParty;
|
|
41
|
+
startsAtUtc: string;
|
|
42
|
+
endsAtUtc: string;
|
|
43
|
+
timeZoneId: string;
|
|
44
|
+
dayRuleMode: DelegationDayRuleMode;
|
|
45
|
+
specificDays: number[];
|
|
46
|
+
effectiveStatus: DelegationEffectiveStatus;
|
|
47
|
+
statusReasonCode: string;
|
|
48
|
+
createdBy: DelegationParty;
|
|
49
|
+
createdAtUtc: string;
|
|
50
|
+
approval: DelegationApprovalInfo;
|
|
51
|
+
cancellation: DelegationCancellationInfo;
|
|
52
|
+
allowedActions: DelegationAllowedAction[];
|
|
53
|
+
scopeSummary: string;
|
|
54
|
+
rowVersion: string;
|
|
82
55
|
}
|
|
83
|
-
interface
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
targets: DelegationScopeTarget[];
|
|
89
|
-
warnings: DelegationScopeWarning[];
|
|
56
|
+
interface DelegationPage<T> {
|
|
57
|
+
items: T[];
|
|
58
|
+
page: number;
|
|
59
|
+
pageSize: number;
|
|
60
|
+
totalCount: number;
|
|
90
61
|
}
|
|
91
|
-
interface
|
|
62
|
+
interface DelegationScopeTarget {
|
|
63
|
+
applicationKey: string;
|
|
64
|
+
targetType: string;
|
|
65
|
+
targetKey: string;
|
|
66
|
+
legacyModuleId?: number | null;
|
|
67
|
+
targetId?: number | null;
|
|
68
|
+
levelId?: number | null;
|
|
69
|
+
levelModuleId?: number | null;
|
|
70
|
+
domainModuleId?: number | null;
|
|
71
|
+
moduleKey?: string | null;
|
|
72
|
+
permissionModuleType?: string | null;
|
|
73
|
+
permissionTargetId?: number | null;
|
|
74
|
+
displayName?: string | null;
|
|
75
|
+
}
|
|
76
|
+
interface DelegationScopeAction {
|
|
77
|
+
applicationKey: string;
|
|
92
78
|
operationKey: string;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
79
|
+
operationKind: string;
|
|
80
|
+
permissionCommand?: string | null;
|
|
81
|
+
businessActionCode?: string | null;
|
|
96
82
|
isHighRisk?: boolean;
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
interface
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
interface
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
moduleName: string;
|
|
117
|
-
groups: {
|
|
118
|
-
accessibilityGroupId: number;
|
|
119
|
-
name: string;
|
|
120
|
-
}[];
|
|
121
|
-
}
|
|
122
|
-
interface DelegationScopeReadPolicyOption {
|
|
123
|
-
key: DelegationReadPolicy;
|
|
124
|
-
isDefault: boolean;
|
|
125
|
-
}
|
|
126
|
-
interface DelegationScopePreset {
|
|
127
|
-
key: string;
|
|
128
|
-
displayName: string;
|
|
129
|
-
description: string;
|
|
130
|
-
}
|
|
131
|
-
interface DelegationScopeOptions {
|
|
132
|
-
delegator: DelegationUser;
|
|
133
|
-
scopeModes: 'Explicit'[];
|
|
134
|
-
readPolicies: DelegationScopeReadPolicyOption[];
|
|
135
|
-
accessibilities: DelegationScopeAccessibilityOption[];
|
|
136
|
-
targets: DelegationScopeTargetOption[];
|
|
137
|
-
recommendedPresets: DelegationScopePreset[];
|
|
83
|
+
isDelegableSnapshot?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface DelegationGrant {
|
|
86
|
+
applicationKey: string;
|
|
87
|
+
target: DelegationScopeTarget;
|
|
88
|
+
action: DelegationScopeAction;
|
|
89
|
+
accessibilities: unknown[];
|
|
90
|
+
dataFilters: unknown[];
|
|
91
|
+
constraints: unknown[];
|
|
92
|
+
}
|
|
93
|
+
interface DelegationScopeSelection {
|
|
94
|
+
grants: DelegationGrant[];
|
|
95
|
+
metadata: Record<string, unknown>;
|
|
96
|
+
}
|
|
97
|
+
/** `scope/options` returns the grantable set in the same grants shape. */
|
|
98
|
+
type DelegationScopeOptions = DelegationScopeSelection;
|
|
99
|
+
interface DelegationScopeWarning {
|
|
100
|
+
code?: string;
|
|
101
|
+
message: string;
|
|
138
102
|
}
|
|
139
|
-
interface
|
|
103
|
+
interface DelegationScopeDeniedItem {
|
|
104
|
+
applicationKey: string;
|
|
105
|
+
targetType: string;
|
|
106
|
+
targetKey: string;
|
|
140
107
|
operationKey: string;
|
|
141
|
-
permissionCommand
|
|
142
|
-
}
|
|
143
|
-
interface DelegationScopeRequestTarget {
|
|
144
|
-
targetType: DelegationTargetType;
|
|
145
|
-
targetId?: number;
|
|
146
|
-
levelId?: number;
|
|
147
|
-
levelModuleId?: number;
|
|
148
|
-
domainModuleId?: number;
|
|
149
|
-
moduleKey: string;
|
|
150
|
-
permissionModuleType?: DelegationPermissionModuleType;
|
|
151
|
-
permissionTargetId?: number;
|
|
152
|
-
operations: DelegationScopeRequestTargetOperation[];
|
|
153
|
-
dataFilter?: unknown;
|
|
154
|
-
constraints?: unknown;
|
|
155
|
-
}
|
|
156
|
-
interface DelegationScopeRequest {
|
|
157
|
-
mode: 'Explicit';
|
|
158
|
-
readPolicy: DelegationReadPolicy;
|
|
159
|
-
accessibilityGroupIds: number[];
|
|
160
|
-
targets: DelegationScopeRequestTarget[];
|
|
161
|
-
}
|
|
162
|
-
interface DelegationScopePreviewDeniedItem {
|
|
163
|
-
targetType: DelegationTargetType;
|
|
164
|
-
targetId?: number;
|
|
165
|
-
operationKey: string;
|
|
166
|
-
permissionCommand: string;
|
|
108
|
+
permissionCommand?: string;
|
|
167
109
|
reasonCode: string;
|
|
168
|
-
message: string;
|
|
169
110
|
}
|
|
170
111
|
interface DelegationScopePreview {
|
|
171
112
|
isValid: boolean;
|
|
172
|
-
normalizedScope
|
|
173
|
-
|
|
113
|
+
normalizedScope: DelegationScopeSelection;
|
|
114
|
+
scopeHash: string;
|
|
115
|
+
summary: string;
|
|
174
116
|
warnings: DelegationScopeWarning[];
|
|
175
|
-
deniedItems:
|
|
117
|
+
deniedItems: DelegationScopeDeniedItem[];
|
|
176
118
|
}
|
|
177
|
-
interface
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
delegatedUser: DelegationUser;
|
|
181
|
-
description?: string;
|
|
182
|
-
startDateUtc: string;
|
|
183
|
-
endDateUtc: string;
|
|
184
|
-
timeZoneId: string;
|
|
185
|
-
dayRules: DelegationDayRules;
|
|
186
|
-
status: DelegationStatus;
|
|
187
|
-
statusReason: string;
|
|
188
|
-
activationState: DelegationActivationState;
|
|
189
|
-
isUsableNow: boolean;
|
|
190
|
-
requiresApproval: boolean;
|
|
191
|
-
approval: DelegationApprovalMeta;
|
|
192
|
-
cancellation: DelegationCancellationMeta;
|
|
193
|
-
createdBy: DelegationUser;
|
|
194
|
-
createdAtUtc: string;
|
|
195
|
-
updatedBy?: DelegationUser | null;
|
|
196
|
-
updatedAtUtc?: string | null;
|
|
197
|
-
allowedActions: DelegationAllowedAction[];
|
|
198
|
-
scope: DelegationScope;
|
|
199
|
-
token: {
|
|
200
|
-
canGenerate: boolean;
|
|
201
|
-
reason?: string;
|
|
202
|
-
};
|
|
203
|
-
rowVersion: string;
|
|
119
|
+
interface DelegationStatusInfo {
|
|
120
|
+
effectiveStatus: DelegationEffectiveStatus;
|
|
121
|
+
reasonCode: string;
|
|
204
122
|
calculatedAtUtc: string;
|
|
205
123
|
}
|
|
206
|
-
interface
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
fromApprovalStatus?: DelegationApprovalStatus | null;
|
|
211
|
-
toApprovalStatus?: DelegationApprovalStatus | null;
|
|
212
|
-
actor: DelegationUser;
|
|
213
|
-
action: string;
|
|
214
|
-
reason?: string | null;
|
|
215
|
-
createdAtUtc: string;
|
|
216
|
-
}
|
|
217
|
-
interface DelegationDetail extends Delegation {
|
|
218
|
-
statusHistory?: DelegationStatusHistoryEntry[];
|
|
124
|
+
interface DelegationDetail {
|
|
125
|
+
row: DelegationRow;
|
|
126
|
+
scope: DelegationScopeSelection;
|
|
127
|
+
status: DelegationStatusInfo;
|
|
219
128
|
}
|
|
220
|
-
|
|
221
|
-
interface DelegationSummary {
|
|
129
|
+
interface DelegationDto {
|
|
222
130
|
id: number;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
131
|
+
fromUserId: string;
|
|
132
|
+
toUserId: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
isActive?: boolean;
|
|
135
|
+
delegationDaysType: DelegationDayRuleMode;
|
|
136
|
+
specificDays: number[];
|
|
137
|
+
applicationId?: number;
|
|
138
|
+
requiresApproval?: boolean;
|
|
139
|
+
effectiveStatus: DelegationEffectiveStatus;
|
|
140
|
+
statusReasonCode: string;
|
|
226
141
|
allowedActions: DelegationAllowedAction[];
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
scopeSummary?: string;
|
|
142
|
+
rowVersion: string;
|
|
143
|
+
[extra: string]: unknown;
|
|
230
144
|
}
|
|
145
|
+
type DelegationSortDirection = 'asc' | 'ascending' | 'desc' | 'descending';
|
|
231
146
|
interface DelegationListQuery {
|
|
147
|
+
activeOnly?: boolean;
|
|
148
|
+
status?: DelegationEffectiveStatus;
|
|
149
|
+
search?: string;
|
|
150
|
+
fromUtc?: string;
|
|
151
|
+
toUtc?: string;
|
|
152
|
+
sortBy?: string;
|
|
153
|
+
sortDirection?: DelegationSortDirection;
|
|
232
154
|
page?: number;
|
|
233
155
|
pageSize?: number;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
startFrom?: string;
|
|
237
|
-
startTo?: string;
|
|
238
|
-
endFrom?: string;
|
|
239
|
-
endTo?: string;
|
|
240
|
-
activeOn?: string;
|
|
241
|
-
approvalStatus?: DelegationApprovalStatus;
|
|
242
|
-
moduleId?: number;
|
|
243
|
-
accessibilityGroupId?: number;
|
|
244
|
-
sortBy?: 'createdAt' | 'startDate' | 'endDate' | 'status' | 'delegatorName' | 'delegatedUserName';
|
|
245
|
-
sortDir?: 'asc' | 'desc';
|
|
246
|
-
}
|
|
247
|
-
interface PagedResult<T> {
|
|
248
|
-
items: T[];
|
|
249
|
-
page: number;
|
|
250
|
-
pageSize: number;
|
|
251
|
-
totalCount: number;
|
|
252
|
-
totalPages: number;
|
|
253
|
-
hasNextPage: boolean;
|
|
254
|
-
hasPreviousPage: boolean;
|
|
255
|
-
serverTimeUtc: string;
|
|
156
|
+
delegatorUserId?: string;
|
|
157
|
+
delegatedUserId?: string;
|
|
256
158
|
}
|
|
257
|
-
interface
|
|
258
|
-
|
|
159
|
+
interface CreateDelegationLegacyRequest {
|
|
160
|
+
delegateFrom?: string | null;
|
|
161
|
+
delegateTo: string;
|
|
259
162
|
description?: string;
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
163
|
+
delegateFromDateTime: string;
|
|
164
|
+
delegateToDateTime: string;
|
|
165
|
+
accessibilityIds?: number[];
|
|
166
|
+
moduleIds?: number[];
|
|
167
|
+
delegationDaysType: DelegationDayRuleMode;
|
|
168
|
+
specificDays?: number[];
|
|
169
|
+
isActive?: boolean;
|
|
170
|
+
requiresApproval?: boolean;
|
|
266
171
|
}
|
|
267
|
-
interface
|
|
268
|
-
|
|
172
|
+
interface CreateDelegationV2Request {
|
|
173
|
+
delegateFrom?: string | null;
|
|
174
|
+
delegateTo: string;
|
|
269
175
|
description?: string;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
requiresApproval
|
|
275
|
-
scope:
|
|
176
|
+
delegateFromDateTime: string;
|
|
177
|
+
delegateToDateTime: string;
|
|
178
|
+
delegationDaysType: DelegationDayRuleMode;
|
|
179
|
+
specificDays?: number[];
|
|
180
|
+
requiresApproval: boolean;
|
|
181
|
+
scope: DelegationScopeSelection;
|
|
276
182
|
}
|
|
183
|
+
type UpdateDelegationLegacyRequest = CreateDelegationLegacyRequest & {
|
|
184
|
+
rowVersion: string;
|
|
185
|
+
};
|
|
186
|
+
type UpdateDelegationV2Request = CreateDelegationV2Request & {
|
|
187
|
+
rowVersion: string;
|
|
188
|
+
};
|
|
277
189
|
interface ApproveDelegationRequest {
|
|
278
190
|
rowVersion: string;
|
|
279
|
-
|
|
191
|
+
reason?: string;
|
|
280
192
|
}
|
|
281
193
|
interface RejectDelegationRequest {
|
|
282
194
|
rowVersion: string;
|
|
283
195
|
reason: string;
|
|
284
196
|
}
|
|
285
|
-
interface CancelDelegationRequest {
|
|
286
|
-
rowVersion: string;
|
|
287
|
-
reason: string;
|
|
288
|
-
}
|
|
289
|
-
interface DelegationTokenPair {
|
|
290
|
-
accessToken: string;
|
|
291
|
-
accessTokenExpiresAtUtc: string;
|
|
292
|
-
refreshToken: string;
|
|
293
|
-
refreshTokenExpiresAtUtc: string;
|
|
294
|
-
delegation: DelegationSummary;
|
|
295
|
-
}
|
|
296
197
|
declare enum DelegationsActionKey {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
UpdateDelegation = "updateDelegation",
|
|
302
|
-
ApproveDelegation = "approveDelegation",
|
|
303
|
-
RejectDelegation = "rejectDelegation",
|
|
304
|
-
CancelDelegation = "cancelDelegation",
|
|
198
|
+
GetMy = "getMy",
|
|
199
|
+
GetAssigned = "getAssigned",
|
|
200
|
+
GetActive = "getActive",
|
|
201
|
+
GetDetail = "getDetail",
|
|
305
202
|
GetScopeOptions = "getScopeOptions",
|
|
306
|
-
PreviewScope = "previewScope"
|
|
203
|
+
PreviewScope = "previewScope",
|
|
204
|
+
Create = "create",
|
|
205
|
+
Update = "update",
|
|
206
|
+
Approve = "approve",
|
|
207
|
+
Reject = "reject",
|
|
208
|
+
Cancel = "cancel"
|
|
307
209
|
}
|
|
308
210
|
interface DelegationsStateModel extends LoadingStateShape<DelegationsActionKey> {
|
|
309
|
-
my:
|
|
310
|
-
assigned:
|
|
311
|
-
|
|
211
|
+
my: DelegationPage<DelegationRow> | null;
|
|
212
|
+
assigned: DelegationPage<DelegationRow> | null;
|
|
213
|
+
active: DelegationPage<DelegationRow> | null;
|
|
214
|
+
detail: DelegationDetail | null;
|
|
312
215
|
scopeOptions: DelegationScopeOptions | null;
|
|
313
216
|
scopePreview: DelegationScopePreview | null;
|
|
314
217
|
}
|
|
315
218
|
|
|
316
219
|
/**
|
|
317
|
-
* Topbar surface for the delegation runtime.
|
|
220
|
+
* Topbar surface for the delegation runtime (doc 05, 09).
|
|
318
221
|
*
|
|
319
222
|
* State A — no candidates, no active session: renders nothing.
|
|
320
|
-
* State B — candidates exist, no active session:
|
|
321
|
-
* State C — active
|
|
322
|
-
*
|
|
323
|
-
* Designed to be projected into a host topbar's `[actions]` slot (alongside the
|
|
324
|
-
* existing user popover) — it does NOT replace the user dropdown.
|
|
223
|
+
* State B — candidates exist, no active session: lets the user start a session.
|
|
224
|
+
* State C — active delegated session: shows "Acting on behalf of {delegator}" +
|
|
225
|
+
* "Executed by {actual user}", plus Back / Switch.
|
|
325
226
|
*/
|
|
326
227
|
declare class TopbarDelegationMenu {
|
|
327
228
|
/** Path to the management page, e.g. `/control-panel/delegations` or `/delegations`. */
|
|
328
229
|
readonly managePath: _angular_core.InputSignal<string>;
|
|
329
|
-
/** Compact mode hides the inline delegator name next to the button. */
|
|
330
230
|
readonly compact: _angular_core.InputSignal<boolean>;
|
|
331
231
|
private readonly facade;
|
|
332
232
|
private readonly modal;
|
|
333
233
|
private readonly transloco;
|
|
334
234
|
protected readonly popover: _angular_core.Signal<Popover>;
|
|
335
235
|
protected readonly active: _angular_core.Signal<_masterteam_delegations.ActiveDelegationSession | null>;
|
|
336
|
-
protected readonly candidates: _angular_core.Signal<
|
|
236
|
+
protected readonly candidates: _angular_core.Signal<DelegationRow[]>;
|
|
337
237
|
protected readonly hasCandidates: _angular_core.Signal<boolean>;
|
|
338
|
-
protected readonly
|
|
339
|
-
protected readonly
|
|
340
|
-
protected readonly delegatorName: _angular_core.Signal<string>;
|
|
341
|
-
/** State machine: which UI to render. */
|
|
238
|
+
protected readonly onBehalfOf: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
239
|
+
protected readonly executedBy: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
342
240
|
protected readonly mode: _angular_core.Signal<"active" | "candidates" | "hidden">;
|
|
343
241
|
togglePopover(event: Event): void;
|
|
344
|
-
|
|
345
|
-
switchTo(
|
|
242
|
+
start(row: DelegationRow, event: MouseEvent): void;
|
|
243
|
+
switchTo(row: DelegationRow, event: MouseEvent): void;
|
|
346
244
|
endSession(event: MouseEvent): void;
|
|
347
|
-
private
|
|
245
|
+
private openConfirm;
|
|
348
246
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TopbarDelegationMenu, never>;
|
|
349
247
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopbarDelegationMenu, "mt-topbar-delegation-menu", never, { "managePath": { "alias": "managePath"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
350
248
|
}
|
|
@@ -354,28 +252,28 @@ interface StatusVisual {
|
|
|
354
252
|
styleClass: string;
|
|
355
253
|
}
|
|
356
254
|
declare class DelegationStatusChip {
|
|
357
|
-
readonly status: _angular_core.InputSignal<
|
|
255
|
+
readonly status: _angular_core.InputSignal<DelegationEffectiveStatus>;
|
|
358
256
|
protected readonly visual: _angular_core.Signal<StatusVisual>;
|
|
359
257
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationStatusChip, never>;
|
|
360
258
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationStatusChip, "mt-delegation-status-chip", never, { "status": { "alias": "status"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
361
259
|
}
|
|
362
260
|
|
|
363
261
|
/**
|
|
364
|
-
* Confirmation dialog
|
|
365
|
-
*
|
|
262
|
+
* Confirmation dialog before starting (or switching to) a delegated session.
|
|
263
|
+
* Calls the facade, which POSTs to `delegationToken/{id}` and stores the raw
|
|
264
|
+
* token in memory only.
|
|
366
265
|
*/
|
|
367
266
|
declare class StartSessionDialog {
|
|
368
|
-
readonly
|
|
267
|
+
readonly delegation: _angular_core.InputSignal<DelegationRow>;
|
|
369
268
|
readonly intent: _angular_core.InputSignal<"start" | "switch">;
|
|
370
269
|
private readonly ref;
|
|
371
270
|
private readonly facade;
|
|
372
271
|
protected readonly isBusy: _angular_core.Signal<boolean>;
|
|
373
|
-
protected readonly
|
|
374
|
-
protected readonly body: _angular_core.Signal<"delegations.switch-session-confirm-body" | "delegations.start-session-confirm-body">;
|
|
272
|
+
protected readonly bodyKey: _angular_core.Signal<"delegations.session.switchConfirmBody" | "delegations.session.startConfirmBody">;
|
|
375
273
|
confirm(): void;
|
|
376
274
|
cancel(): void;
|
|
377
275
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<StartSessionDialog, never>;
|
|
378
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StartSessionDialog, "mt-start-session-dialog", never, { "
|
|
276
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<StartSessionDialog, "mt-start-session-dialog", never, { "delegation": { "alias": "delegation"; "required": true; "isSignal": true; }; "intent": { "alias": "intent"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
379
277
|
}
|
|
380
278
|
|
|
381
279
|
declare class Delegations {
|
|
@@ -387,18 +285,12 @@ declare class Delegations {
|
|
|
387
285
|
|
|
388
286
|
type DelegationTab = 'my' | 'assigned';
|
|
389
287
|
/**
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
393
|
-
* - Rows render the BE-returned `allowedActions` only (never inferred).
|
|
394
|
-
* - Lifecycle actions (Approve/Reject/Cancel/Edit/StartSession) dispatch through
|
|
395
|
-
* the facade and the row is replaced in place from the response.
|
|
396
|
-
* - Scope/detail drawer and full scope-picker form are still incremental work;
|
|
397
|
-
* the form drawer here covers Edit/Create with the core fields.
|
|
288
|
+
* Delegations portal page (doc 02, 09): two lists — My Delegations (current user
|
|
289
|
+
* is delegator) and Delegated To Me (current user is delegate). Rows render only
|
|
290
|
+
* the BE-returned `allowedActions`; status comes from `effectiveStatus`.
|
|
398
291
|
*/
|
|
399
292
|
declare class DelegationsList implements OnInit {
|
|
400
293
|
private readonly facade;
|
|
401
|
-
private readonly session;
|
|
402
294
|
private readonly modal;
|
|
403
295
|
private readonly transloco;
|
|
404
296
|
protected readonly breadcrumbItems: _angular_core.WritableSignal<({
|
|
@@ -420,7 +312,7 @@ declare class DelegationsList implements OnInit {
|
|
|
420
312
|
label: string;
|
|
421
313
|
}[]>;
|
|
422
314
|
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
423
|
-
protected readonly rows: _angular_core.Signal<
|
|
315
|
+
protected readonly rows: _angular_core.Signal<DelegationRow[]>;
|
|
424
316
|
statusCol: _angular_core.Signal<TemplateRef<unknown>>;
|
|
425
317
|
userCol: _angular_core.Signal<TemplateRef<unknown>>;
|
|
426
318
|
scopeCol: _angular_core.Signal<TemplateRef<unknown>>;
|
|
@@ -433,8 +325,9 @@ declare class DelegationsList implements OnInit {
|
|
|
433
325
|
ngOnInit(): void;
|
|
434
326
|
protected switchTab(tab: DelegationTab): void;
|
|
435
327
|
private loadCurrentTab;
|
|
436
|
-
|
|
437
|
-
protected
|
|
328
|
+
private reloadCurrentTab;
|
|
329
|
+
protected has(row: DelegationRow, action: DelegationAllowedAction): boolean;
|
|
330
|
+
protected formatDays(row: DelegationRow): string;
|
|
438
331
|
private viewDetails;
|
|
439
332
|
private openForm;
|
|
440
333
|
private approve;
|
|
@@ -447,17 +340,15 @@ declare class DelegationsList implements OnInit {
|
|
|
447
340
|
}
|
|
448
341
|
|
|
449
342
|
/**
|
|
450
|
-
* Delegation create/edit form
|
|
343
|
+
* Delegation create/edit form (doc 04). Uses the v2 explicit-scope endpoints so
|
|
344
|
+
* the persisted `DelegationScopeSelection` matches what scope/preview validated.
|
|
451
345
|
*
|
|
452
|
-
* - Delegator is server-derived
|
|
453
|
-
*
|
|
454
|
-
* -
|
|
455
|
-
* - Scope is collected by `<mt-scope-picker>` (loaded from `/scope/options`)
|
|
456
|
-
* and validated via `/scope/preview` on every change. Edit mode rehydrates
|
|
457
|
-
* the scope from the loaded delegation.
|
|
346
|
+
* - Delegator is server-derived; only the delegated user is collected.
|
|
347
|
+
* - On edit, scope grants + rowVersion come from the loaded detail.
|
|
348
|
+
* - Times are sent in UTC ISO; wrappers set timeZoneId = UTC.
|
|
458
349
|
*/
|
|
459
350
|
declare class DelegationForm implements OnInit {
|
|
460
|
-
readonly delegationForEdit: _angular_core.InputSignal<
|
|
351
|
+
readonly delegationForEdit: _angular_core.InputSignal<DelegationRow | null>;
|
|
461
352
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
462
353
|
private readonly halfWidth;
|
|
463
354
|
private readonly fullWidth;
|
|
@@ -467,31 +358,29 @@ declare class DelegationForm implements OnInit {
|
|
|
467
358
|
private readonly facade;
|
|
468
359
|
delegationFormControl: FormControl<any>;
|
|
469
360
|
formValue: _angular_core.Signal<any>;
|
|
470
|
-
|
|
361
|
+
detail: _angular_core.Signal<_masterteam_delegations.DelegationDetail | null>;
|
|
471
362
|
isDetailLoading: _angular_core.Signal<boolean>;
|
|
472
363
|
isSaving: _angular_core.Signal<boolean>;
|
|
473
364
|
context: HttpContext;
|
|
474
|
-
protected readonly
|
|
475
|
-
protected readonly scope: _angular_core.WritableSignal<DelegationScopeRequest>;
|
|
365
|
+
protected readonly scope: _angular_core.WritableSignal<DelegationScopeSelection>;
|
|
476
366
|
protected readonly specificDaysOptions: _angular_core.WritableSignal<{
|
|
477
367
|
label: string;
|
|
478
368
|
value: number;
|
|
479
369
|
}[]>;
|
|
480
|
-
protected readonly
|
|
370
|
+
protected readonly formConfig: _angular_core.Signal<DynamicFormConfig>;
|
|
481
371
|
constructor();
|
|
482
372
|
ngOnInit(): void;
|
|
373
|
+
protected readonly canSubmit: _angular_core.Signal<boolean>;
|
|
483
374
|
onSubmit(): void;
|
|
484
375
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationForm, never>;
|
|
485
376
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationForm, "mt-delegation-form", never, { "delegationForEdit": { "alias": "delegationForEdit"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
486
377
|
}
|
|
487
378
|
|
|
488
|
-
type DetailTab = 'overview' | 'scope'
|
|
379
|
+
type DetailTab = 'overview' | 'scope';
|
|
489
380
|
/**
|
|
490
|
-
* Read-only drawer that shows the full
|
|
491
|
-
* its status history. Triggered from the row's "View details" action.
|
|
381
|
+
* Read-only drawer that shows the full `DelegationDetail` ({ row, scope, status }).
|
|
492
382
|
*/
|
|
493
383
|
declare class DelegationDetailDrawer implements OnInit {
|
|
494
|
-
/** Delegation id passed in via the modal's inputValues. */
|
|
495
384
|
readonly delegationId: _angular_core.InputSignal<number>;
|
|
496
385
|
private readonly facade;
|
|
497
386
|
private readonly transloco;
|
|
@@ -502,8 +391,8 @@ declare class DelegationDetailDrawer implements OnInit {
|
|
|
502
391
|
}[];
|
|
503
392
|
protected readonly activeTab: _angular_core.WritableSignal<DetailTab>;
|
|
504
393
|
protected readonly isLoading: _angular_core.Signal<boolean>;
|
|
505
|
-
protected readonly detail: _angular_core.Signal<DelegationDetail | null>;
|
|
506
|
-
protected readonly
|
|
394
|
+
protected readonly detail: _angular_core.Signal<_masterteam_delegations.DelegationDetail | null>;
|
|
395
|
+
protected readonly row: _angular_core.Signal<_masterteam_delegations.DelegationRow | null>;
|
|
507
396
|
ngOnInit(): void;
|
|
508
397
|
protected setTab(tab: DetailTab): void;
|
|
509
398
|
protected approvalLabel(): string;
|
|
@@ -511,68 +400,49 @@ declare class DelegationDetailDrawer implements OnInit {
|
|
|
511
400
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationDetailDrawer, "mt-delegation-detail-drawer", never, { "delegationId": { "alias": "delegationId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
512
401
|
}
|
|
513
402
|
|
|
514
|
-
interface
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
groupName: string;
|
|
403
|
+
interface TargetGroup {
|
|
404
|
+
key: string;
|
|
405
|
+
target: DelegationScopeTarget;
|
|
406
|
+
grants: DelegationGrant[];
|
|
519
407
|
}
|
|
520
408
|
/**
|
|
521
|
-
*
|
|
409
|
+
* Grants-based scope picker (doc 03). Driven entirely by `scope/options`:
|
|
410
|
+
* - lists grantable target/action pairs returned by the backend,
|
|
411
|
+
* - lets the user toggle each grant,
|
|
412
|
+
* - calls `scope/preview` (debounced) and surfaces summary / warnings / denied.
|
|
522
413
|
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
* - Calls `/scope/preview` (debounced) so the user sees the server-built summary
|
|
526
|
-
* and denied items before they save.
|
|
527
|
-
* - Non-delegable operations render disabled with the BE-supplied `reason`.
|
|
414
|
+
* `[(scope)]` two-way binds a `DelegationScopeSelection`. The component never
|
|
415
|
+
* invents permission metadata — it only echoes grants returned by options.
|
|
528
416
|
*/
|
|
529
417
|
declare class ScopePicker implements OnInit {
|
|
530
|
-
|
|
531
|
-
readonly scope: _angular_core.ModelSignal<DelegationScopeRequest>;
|
|
418
|
+
readonly scope: _angular_core.ModelSignal<DelegationScopeSelection>;
|
|
532
419
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
533
|
-
/** Admin scope-as-another-user — passed through to the options endpoint. */
|
|
534
420
|
readonly delegatorUserId: _angular_core.InputSignal<string | undefined>;
|
|
535
421
|
private readonly facade;
|
|
536
|
-
|
|
537
|
-
protected readonly options: _angular_core.Signal<_masterteam_delegations.DelegationScopeOptions | null>;
|
|
422
|
+
protected readonly options: _angular_core.Signal<DelegationScopeSelection | null>;
|
|
538
423
|
protected readonly preview: _angular_core.Signal<_masterteam_delegations.DelegationScopePreview | null>;
|
|
539
424
|
protected readonly isLoadingOptions: _angular_core.Signal<boolean>;
|
|
540
425
|
protected readonly isPreviewing: _angular_core.Signal<boolean>;
|
|
541
|
-
/**
|
|
426
|
+
/** Grantable options grouped by target. */
|
|
427
|
+
protected readonly groups: _angular_core.Signal<TargetGroup[]>;
|
|
428
|
+
/** Selected grant keys for O(1) checkbox state. */
|
|
429
|
+
protected readonly selectedKeys: _angular_core.Signal<Set<string>>;
|
|
542
430
|
private readonly expanded;
|
|
543
|
-
protected readonly readPolicies: _angular_core.Signal<_masterteam_delegations.DelegationScopeReadPolicyOption[]>;
|
|
544
|
-
/** Flat list of accessibility group options (across modules). */
|
|
545
|
-
protected readonly accessibilityGroups: _angular_core.Signal<AccessibilityGroupOption[]>;
|
|
546
|
-
/** Targets grouped by `targetType` for the accordion UI. */
|
|
547
|
-
protected readonly groupedTargets: _angular_core.Signal<{
|
|
548
|
-
type: string;
|
|
549
|
-
items: DelegationScopeTargetOption[];
|
|
550
|
-
}[]>;
|
|
551
|
-
/** O(1) lookup: is this accessibility group selected? */
|
|
552
|
-
protected readonly selectedAccessibilityIds: _angular_core.Signal<Set<number>>;
|
|
553
|
-
/** O(1) lookup: which targets are picked, and which ops per target? */
|
|
554
|
-
protected readonly selectedTargetMap: _angular_core.Signal<Map<string, Set<string>>>;
|
|
555
431
|
ngOnInit(): void;
|
|
556
432
|
constructor();
|
|
557
|
-
protected
|
|
558
|
-
protected
|
|
559
|
-
protected
|
|
560
|
-
protected
|
|
561
|
-
protected
|
|
562
|
-
protected toggleOperation(target: DelegationScopeTargetOption, op: DelegationScopeOperationOption): void;
|
|
563
|
-
protected isOperationSelected(target: DelegationScopeTargetOption, op: DelegationScopeOperationOption): boolean;
|
|
564
|
-
protected selectedOpsCount(target: DelegationScopeTargetOption): number;
|
|
565
|
-
protected reasonLabel(op: DelegationScopeOperationOption): string;
|
|
433
|
+
protected isExpanded(group: TargetGroup): boolean;
|
|
434
|
+
protected toggleAccordion(group: TargetGroup): void;
|
|
435
|
+
protected isSelected(grant: DelegationGrant): boolean;
|
|
436
|
+
protected toggleGrant(grant: DelegationGrant): void;
|
|
437
|
+
protected selectedCount(group: TargetGroup): number;
|
|
566
438
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopePicker, never>;
|
|
567
439
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopePicker, "mt-scope-picker", never, { "scope": { "alias": "scope"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "delegatorUserId": { "alias": "delegatorUserId"; "required": false; "isSignal": true; }; }, { "scope": "scopeChange"; }, never, never, true, never>;
|
|
568
440
|
}
|
|
569
441
|
|
|
570
442
|
/**
|
|
571
|
-
* Adds `app-delegation: Bearer <token>` to outgoing requests
|
|
572
|
-
* session is active.
|
|
573
|
-
*
|
|
574
|
-
* Register AFTER the gateway-auth interceptor (so `Authorization` is set first)
|
|
575
|
-
* and BEFORE the message interceptor (so 403s still flow through toast handling).
|
|
443
|
+
* Adds `app-delegation: Bearer <token>` to outgoing requests while a delegated
|
|
444
|
+
* session is active. Register AFTER the gateway-auth interceptor (so the normal
|
|
445
|
+
* `Authorization` header is set first) and BEFORE the message interceptor.
|
|
576
446
|
*/
|
|
577
447
|
declare const appDelegationInterceptor: HttpInterceptorFn;
|
|
578
448
|
|
|
@@ -586,25 +456,53 @@ declare class GetAssignedDelegations {
|
|
|
586
456
|
static readonly type = "[Delegations] Get Assigned Delegations";
|
|
587
457
|
constructor(query?: DelegationListQuery);
|
|
588
458
|
}
|
|
589
|
-
declare class
|
|
459
|
+
declare class GetActiveAssignedDelegations {
|
|
460
|
+
query: DelegationListQuery;
|
|
461
|
+
static readonly type = "[Delegations] Get Active Assigned Delegations";
|
|
462
|
+
constructor(query?: DelegationListQuery);
|
|
463
|
+
}
|
|
464
|
+
declare class GetDelegationDetail {
|
|
590
465
|
id: number;
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
constructor(id: number, includeStatusHistory?: boolean);
|
|
466
|
+
static readonly type = "[Delegations] Get Delegation Detail";
|
|
467
|
+
constructor(id: number);
|
|
594
468
|
}
|
|
595
|
-
declare class
|
|
596
|
-
static readonly type = "[Delegations] Clear
|
|
469
|
+
declare class ClearDelegationDetail {
|
|
470
|
+
static readonly type = "[Delegations] Clear Delegation Detail";
|
|
597
471
|
}
|
|
598
|
-
declare class
|
|
599
|
-
|
|
600
|
-
static readonly type = "[Delegations]
|
|
601
|
-
constructor(
|
|
472
|
+
declare class GetScopeOptions {
|
|
473
|
+
delegatorUserId?: string | undefined;
|
|
474
|
+
static readonly type = "[Delegations] Get Scope Options";
|
|
475
|
+
constructor(delegatorUserId?: string | undefined);
|
|
476
|
+
}
|
|
477
|
+
declare class PreviewScope {
|
|
478
|
+
scope: DelegationScopeSelection;
|
|
479
|
+
static readonly type = "[Delegations] Preview Scope";
|
|
480
|
+
constructor(scope: DelegationScopeSelection);
|
|
481
|
+
}
|
|
482
|
+
declare class ClearScopePreview {
|
|
483
|
+
static readonly type = "[Delegations] Clear Scope Preview";
|
|
484
|
+
}
|
|
485
|
+
declare class CreateDelegationLegacy {
|
|
486
|
+
request: CreateDelegationLegacyRequest;
|
|
487
|
+
static readonly type = "[Delegations] Create Delegation (legacy)";
|
|
488
|
+
constructor(request: CreateDelegationLegacyRequest);
|
|
489
|
+
}
|
|
490
|
+
declare class CreateDelegationV2 {
|
|
491
|
+
request: CreateDelegationV2Request;
|
|
492
|
+
static readonly type = "[Delegations] Create Delegation (v2)";
|
|
493
|
+
constructor(request: CreateDelegationV2Request);
|
|
602
494
|
}
|
|
603
|
-
declare class
|
|
495
|
+
declare class UpdateDelegationLegacy {
|
|
604
496
|
id: number;
|
|
605
|
-
request:
|
|
606
|
-
static readonly type = "[Delegations] Update Delegation";
|
|
607
|
-
constructor(id: number, request:
|
|
497
|
+
request: UpdateDelegationLegacyRequest;
|
|
498
|
+
static readonly type = "[Delegations] Update Delegation (legacy)";
|
|
499
|
+
constructor(id: number, request: UpdateDelegationLegacyRequest);
|
|
500
|
+
}
|
|
501
|
+
declare class UpdateDelegationV2 {
|
|
502
|
+
id: number;
|
|
503
|
+
request: UpdateDelegationV2Request;
|
|
504
|
+
static readonly type = "[Delegations] Update Delegation (v2)";
|
|
505
|
+
constructor(id: number, request: UpdateDelegationV2Request);
|
|
608
506
|
}
|
|
609
507
|
declare class ApproveDelegation {
|
|
610
508
|
id: number;
|
|
@@ -620,198 +518,163 @@ declare class RejectDelegation {
|
|
|
620
518
|
}
|
|
621
519
|
declare class CancelDelegation {
|
|
622
520
|
id: number;
|
|
623
|
-
|
|
521
|
+
rowVersion: string;
|
|
522
|
+
asAdmin: boolean;
|
|
624
523
|
static readonly type = "[Delegations] Cancel Delegation";
|
|
625
|
-
constructor(id: number,
|
|
626
|
-
}
|
|
627
|
-
declare class GetScopeOptions {
|
|
628
|
-
delegatorUserId?: string | undefined;
|
|
629
|
-
static readonly type = "[Delegations] Get Scope Options";
|
|
630
|
-
/** Admin-only override; ignored for normal users. */
|
|
631
|
-
constructor(delegatorUserId?: string | undefined);
|
|
632
|
-
}
|
|
633
|
-
declare class PreviewScope {
|
|
634
|
-
scope: DelegationScopeRequest;
|
|
635
|
-
static readonly type = "[Delegations] Preview Scope";
|
|
636
|
-
constructor(scope: DelegationScopeRequest);
|
|
637
|
-
}
|
|
638
|
-
declare class ClearScopePreview {
|
|
639
|
-
static readonly type = "[Delegations] Clear Scope Preview";
|
|
524
|
+
constructor(id: number, rowVersion: string, asAdmin?: boolean);
|
|
640
525
|
}
|
|
641
526
|
|
|
527
|
+
interface ApiErrorBody {
|
|
528
|
+
code: string;
|
|
529
|
+
message: string;
|
|
530
|
+
details?: Record<string, unknown> | null;
|
|
531
|
+
}
|
|
642
532
|
interface Response<T> {
|
|
643
533
|
endpoint: string;
|
|
644
534
|
status: number;
|
|
645
535
|
code: number;
|
|
646
536
|
locale: string;
|
|
647
537
|
message?: string | null;
|
|
648
|
-
errors?:
|
|
538
|
+
errors?: ApiErrorBody | null;
|
|
649
539
|
data: T;
|
|
650
|
-
cacheSession?: string;
|
|
540
|
+
cacheSession?: string | null;
|
|
541
|
+
correlationId?: string | null;
|
|
651
542
|
}
|
|
652
543
|
|
|
653
544
|
declare class DelegationsState {
|
|
654
545
|
private http;
|
|
655
|
-
static
|
|
656
|
-
static
|
|
657
|
-
static
|
|
546
|
+
static getMy(state: DelegationsStateModel): DelegationPage<DelegationRow> | null;
|
|
547
|
+
static getAssigned(state: DelegationsStateModel): DelegationPage<DelegationRow> | null;
|
|
548
|
+
static getActive(state: DelegationsStateModel): DelegationPage<DelegationRow> | null;
|
|
549
|
+
static getDetail(state: DelegationsStateModel): DelegationDetail | null;
|
|
658
550
|
static getScopeOptions(state: DelegationsStateModel): DelegationScopeOptions | null;
|
|
659
551
|
static getScopePreview(state: DelegationsStateModel): DelegationScopePreview | null;
|
|
660
552
|
static getLoadingActive(state: DelegationsStateModel): string[];
|
|
661
553
|
static getErrors(state: DelegationsStateModel): Record<string, string | null | undefined>;
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
approveDelegation(ctx: StateContext<DelegationsStateModel>, { id, request }: ApproveDelegation): rxjs.Observable<Response<Delegation>>;
|
|
669
|
-
rejectDelegation(ctx: StateContext<DelegationsStateModel>, { id, request }: RejectDelegation): rxjs.Observable<Response<Delegation>>;
|
|
670
|
-
cancelDelegation(ctx: StateContext<DelegationsStateModel>, { id, request }: CancelDelegation): rxjs.Observable<Response<Delegation>>;
|
|
671
|
-
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId }: GetScopeOptions): rxjs.Observable<Response<DelegationScopeOptions>>;
|
|
554
|
+
getMy(ctx: StateContext<DelegationsStateModel>, { query }: GetMyDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
555
|
+
getAssigned(ctx: StateContext<DelegationsStateModel>, { query }: GetAssignedDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
556
|
+
getActive(ctx: StateContext<DelegationsStateModel>, { query }: GetActiveAssignedDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
557
|
+
getDetail(ctx: StateContext<DelegationsStateModel>, { id }: GetDelegationDetail): rxjs.Observable<Response<DelegationDetail>>;
|
|
558
|
+
clearDetail(ctx: StateContext<DelegationsStateModel>): void;
|
|
559
|
+
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId }: GetScopeOptions): rxjs.Observable<Response<_masterteam_delegations.DelegationScopeSelection>>;
|
|
672
560
|
previewScope(ctx: StateContext<DelegationsStateModel>, { scope }: PreviewScope): rxjs.Observable<Response<DelegationScopePreview>>;
|
|
673
561
|
clearScopePreview(ctx: StateContext<DelegationsStateModel>): void;
|
|
674
|
-
|
|
562
|
+
createLegacy(ctx: StateContext<DelegationsStateModel>, { request }: CreateDelegationLegacy): rxjs.Observable<Response<DelegationDto>>;
|
|
563
|
+
createV2(ctx: StateContext<DelegationsStateModel>, { request }: CreateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
564
|
+
updateLegacy(ctx: StateContext<DelegationsStateModel>, { id, request }: UpdateDelegationLegacy): rxjs.Observable<Response<DelegationDto>>;
|
|
565
|
+
updateV2(ctx: StateContext<DelegationsStateModel>, { id, request }: UpdateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
566
|
+
approve(ctx: StateContext<DelegationsStateModel>, { id, request }: ApproveDelegation): rxjs.Observable<Response<DelegationDto>>;
|
|
567
|
+
reject(ctx: StateContext<DelegationsStateModel>, { id, request }: RejectDelegation): rxjs.Observable<Response<DelegationDto>>;
|
|
568
|
+
cancel(ctx: StateContext<DelegationsStateModel>, { id, rowVersion, asAdmin }: CancelDelegation): rxjs.Observable<Response<boolean>>;
|
|
675
569
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationsState, never>;
|
|
676
570
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationsState>;
|
|
677
571
|
}
|
|
678
572
|
|
|
679
573
|
declare class DelegationsFacade {
|
|
680
574
|
private readonly store;
|
|
681
|
-
readonly myPage: _angular_core.Signal<_masterteam_delegations.
|
|
682
|
-
readonly assignedPage: _angular_core.Signal<_masterteam_delegations.
|
|
683
|
-
readonly
|
|
684
|
-
readonly
|
|
575
|
+
readonly myPage: _angular_core.Signal<_masterteam_delegations.DelegationPage<_masterteam_delegations.DelegationRow> | null>;
|
|
576
|
+
readonly assignedPage: _angular_core.Signal<_masterteam_delegations.DelegationPage<_masterteam_delegations.DelegationRow> | null>;
|
|
577
|
+
readonly activePage: _angular_core.Signal<_masterteam_delegations.DelegationPage<_masterteam_delegations.DelegationRow> | null>;
|
|
578
|
+
readonly detail: _angular_core.Signal<_masterteam_delegations.DelegationDetail | null>;
|
|
579
|
+
readonly scopeOptions: _angular_core.Signal<DelegationScopeSelection | null>;
|
|
685
580
|
readonly scopePreview: _angular_core.Signal<_masterteam_delegations.DelegationScopePreview | null>;
|
|
686
581
|
private readonly loadingActive;
|
|
687
582
|
private readonly errors;
|
|
688
|
-
readonly myItems: _angular_core.Signal<_masterteam_delegations.
|
|
689
|
-
readonly assignedItems: _angular_core.Signal<_masterteam_delegations.
|
|
583
|
+
readonly myItems: _angular_core.Signal<_masterteam_delegations.DelegationRow[]>;
|
|
584
|
+
readonly assignedItems: _angular_core.Signal<_masterteam_delegations.DelegationRow[]>;
|
|
585
|
+
readonly activeItems: _angular_core.Signal<_masterteam_delegations.DelegationRow[]>;
|
|
690
586
|
readonly isLoadingMy: _angular_core.Signal<boolean>;
|
|
691
587
|
readonly isLoadingAssigned: _angular_core.Signal<boolean>;
|
|
588
|
+
readonly isLoadingActive: _angular_core.Signal<boolean>;
|
|
692
589
|
readonly isLoadingDetail: _angular_core.Signal<boolean>;
|
|
693
|
-
readonly
|
|
694
|
-
readonly
|
|
590
|
+
readonly isLoadingScopeOptions: _angular_core.Signal<boolean>;
|
|
591
|
+
readonly isPreviewingScope: _angular_core.Signal<boolean>;
|
|
592
|
+
readonly isSaving: _angular_core.Signal<boolean>;
|
|
695
593
|
readonly isApproving: _angular_core.Signal<boolean>;
|
|
696
594
|
readonly isRejecting: _angular_core.Signal<boolean>;
|
|
697
595
|
readonly isCancelling: _angular_core.Signal<boolean>;
|
|
698
|
-
readonly isLoadingScopeOptions: _angular_core.Signal<boolean>;
|
|
699
|
-
readonly isPreviewingScope: _angular_core.Signal<boolean>;
|
|
700
596
|
readonly errorMy: _angular_core.Signal<string | null>;
|
|
701
597
|
readonly errorAssigned: _angular_core.Signal<string | null>;
|
|
702
598
|
readonly errorDetail: _angular_core.Signal<string | null>;
|
|
703
|
-
readonly
|
|
704
|
-
readonly errorUpdate: _angular_core.Signal<string | null>;
|
|
705
|
-
readonly errorApprove: _angular_core.Signal<string | null>;
|
|
706
|
-
readonly errorReject: _angular_core.Signal<string | null>;
|
|
707
|
-
readonly errorCancel: _angular_core.Signal<string | null>;
|
|
599
|
+
readonly errorSave: _angular_core.Signal<string | null>;
|
|
708
600
|
getMy(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
709
601
|
getAssigned(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
update(id: number, request: UpdateDelegationRequest): rxjs.Observable<void>;
|
|
714
|
-
approve(id: number, request: ApproveDelegationRequest): rxjs.Observable<void>;
|
|
715
|
-
reject(id: number, request: RejectDelegationRequest): rxjs.Observable<void>;
|
|
716
|
-
cancel(id: number, request: CancelDelegationRequest): rxjs.Observable<void>;
|
|
602
|
+
getActive(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
603
|
+
getDetail(id: number): rxjs.Observable<void>;
|
|
604
|
+
clearDetail(): rxjs.Observable<void>;
|
|
717
605
|
loadScopeOptions(delegatorUserId?: string): rxjs.Observable<void>;
|
|
718
|
-
previewScope(scope:
|
|
606
|
+
previewScope(scope: DelegationScopeSelection): rxjs.Observable<void>;
|
|
719
607
|
clearScopePreview(): rxjs.Observable<void>;
|
|
608
|
+
createLegacy(request: CreateDelegationLegacyRequest): rxjs.Observable<void>;
|
|
609
|
+
createV2(request: CreateDelegationV2Request): rxjs.Observable<void>;
|
|
610
|
+
updateLegacy(id: number, request: UpdateDelegationLegacyRequest): rxjs.Observable<void>;
|
|
611
|
+
updateV2(id: number, request: UpdateDelegationV2Request): rxjs.Observable<void>;
|
|
612
|
+
approve(id: number, request: ApproveDelegationRequest): rxjs.Observable<void>;
|
|
613
|
+
reject(id: number, request: RejectDelegationRequest): rxjs.Observable<void>;
|
|
614
|
+
cancel(id: number, rowVersion: string, asAdmin?: boolean): rxjs.Observable<void>;
|
|
720
615
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationsFacade, never>;
|
|
721
616
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationsFacade>;
|
|
722
617
|
}
|
|
723
618
|
|
|
724
|
-
|
|
619
|
+
/**
|
|
620
|
+
* Active delegated session. Memory-only by design (doc 05):
|
|
621
|
+
* the delegation token is never persisted to long-lived storage.
|
|
622
|
+
*
|
|
623
|
+
* `delegation.delegatedUser` is the executed-by (actual logged-in) user and
|
|
624
|
+
* `delegation.delegator` is the on-behalf-of user — both already present on the
|
|
625
|
+
* row from the active-delegations endpoint.
|
|
626
|
+
*/
|
|
725
627
|
interface ActiveDelegationSession {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
refreshToken: string;
|
|
729
|
-
refreshTokenExpiresAtUtc: string;
|
|
730
|
-
delegation: DelegationSummary;
|
|
628
|
+
token: string;
|
|
629
|
+
delegation: DelegationRow;
|
|
731
630
|
}
|
|
732
|
-
|
|
631
|
+
type DelegationSessionInvalidationReason = 'TokenInvalid' | 'SessionMismatch' | 'ScopeChanged' | 'Forbidden' | 'Logout' | 'UserSwitch' | 'Manual';
|
|
733
632
|
declare enum DelegationSessionActionKey {
|
|
734
|
-
|
|
735
|
-
StartSession = "startSession"
|
|
736
|
-
EndSession = "endSession",
|
|
737
|
-
RefreshSession = "refreshSession",
|
|
738
|
-
GetSession = "getSession"
|
|
633
|
+
LoadCandidates = "loadCandidates",
|
|
634
|
+
StartSession = "startSession"
|
|
739
635
|
}
|
|
740
636
|
interface DelegationSessionStateModel extends LoadingStateShape<DelegationSessionActionKey> {
|
|
741
637
|
active: ActiveDelegationSession | null;
|
|
742
|
-
candidates:
|
|
638
|
+
candidates: DelegationRow[];
|
|
743
639
|
}
|
|
744
640
|
|
|
745
|
-
/**
|
|
746
|
-
declare class
|
|
747
|
-
static readonly type = "[DelegationSession]
|
|
641
|
+
/** Fetch the active delegations the current user may start (user/activedelegations). */
|
|
642
|
+
declare class LoadDelegationCandidates {
|
|
643
|
+
static readonly type = "[DelegationSession] Load Candidates";
|
|
748
644
|
}
|
|
749
|
-
/**
|
|
750
|
-
declare class SetDelegationCandidates {
|
|
751
|
-
candidates: DelegationSummary[];
|
|
752
|
-
static readonly type = "[DelegationSession] Set Candidates";
|
|
753
|
-
constructor(candidates: DelegationSummary[]);
|
|
754
|
-
}
|
|
755
|
-
/** Start a delegated session for the given assignment. */
|
|
645
|
+
/** Start a delegated session for the given assignment row. */
|
|
756
646
|
declare class StartDelegationSession {
|
|
757
|
-
|
|
647
|
+
delegation: DelegationRow;
|
|
758
648
|
static readonly type = "[DelegationSession] Start";
|
|
759
|
-
constructor(
|
|
649
|
+
constructor(delegation: DelegationRow);
|
|
760
650
|
}
|
|
761
|
-
/** End the current delegated session (
|
|
651
|
+
/** End the current delegated session. Client-local only (doc 05). */
|
|
762
652
|
declare class EndDelegationSession {
|
|
763
|
-
|
|
764
|
-
silent?: boolean;
|
|
765
|
-
};
|
|
653
|
+
reason: DelegationSessionInvalidationReason;
|
|
766
654
|
static readonly type = "[DelegationSession] End";
|
|
767
|
-
constructor(
|
|
768
|
-
silent?: boolean;
|
|
769
|
-
});
|
|
655
|
+
constructor(reason?: DelegationSessionInvalidationReason);
|
|
770
656
|
}
|
|
771
|
-
/**
|
|
657
|
+
/** Switch directly from the current session to another delegation. */
|
|
772
658
|
declare class SwitchDelegationSession {
|
|
773
|
-
|
|
659
|
+
delegation: DelegationRow;
|
|
774
660
|
static readonly type = "[DelegationSession] Switch";
|
|
775
|
-
constructor(
|
|
776
|
-
}
|
|
777
|
-
/** Refresh the delegation access token via refresh-token rotation. */
|
|
778
|
-
declare class RefreshDelegationSession {
|
|
779
|
-
static readonly type = "[DelegationSession] Refresh";
|
|
780
|
-
}
|
|
781
|
-
/** Verify the current session against the server (used after bootstrap). */
|
|
782
|
-
declare class VerifyDelegationSession {
|
|
783
|
-
static readonly type = "[DelegationSession] Verify";
|
|
784
|
-
}
|
|
785
|
-
/** Surface a recoverable session error from any pipeline (e.g. 403 codes). */
|
|
786
|
-
declare class DelegationSessionInvalidated {
|
|
787
|
-
reason: 'TokenPrincipalMismatch' | 'NotActive' | 'ScopeDenied' | 'Expired' | 'Unknown';
|
|
788
|
-
static readonly type = "[DelegationSession] Invalidated";
|
|
789
|
-
constructor(reason: 'TokenPrincipalMismatch' | 'NotActive' | 'ScopeDenied' | 'Expired' | 'Unknown');
|
|
661
|
+
constructor(delegation: DelegationRow);
|
|
790
662
|
}
|
|
791
663
|
|
|
792
|
-
/**
|
|
793
|
-
* Filters a delegation list to "candidates the user could activate".
|
|
794
|
-
* Active + StartSession in allowedActions is the runtime gate.
|
|
795
|
-
*/
|
|
796
|
-
declare function pickCandidates(delegations: DelegationSummary[] | undefined | null): DelegationSummary[];
|
|
797
664
|
declare class DelegationSessionState {
|
|
798
665
|
private http;
|
|
799
666
|
private actions$;
|
|
800
667
|
private store;
|
|
801
668
|
constructor();
|
|
802
669
|
static getActive(state: DelegationSessionStateModel): ActiveDelegationSession | null;
|
|
803
|
-
static getCandidates(state: DelegationSessionStateModel):
|
|
670
|
+
static getCandidates(state: DelegationSessionStateModel): DelegationRow[];
|
|
804
671
|
static isDelegated(state: DelegationSessionStateModel): boolean;
|
|
805
672
|
static getLoadingActive(state: DelegationSessionStateModel): string[];
|
|
806
673
|
static getErrors(state: DelegationSessionStateModel): Record<string, string | null | undefined>;
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
end(ctx: StateContext<DelegationSessionStateModel>, { options }: EndDelegationSession): rxjs.Observable<Response<void>>;
|
|
812
|
-
switch(ctx: StateContext<DelegationSessionStateModel>, { delegationId }: SwitchDelegationSession): rxjs.Observable<void>;
|
|
813
|
-
refresh(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<Response<DelegationTokenPair>>;
|
|
814
|
-
invalidated(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<never>;
|
|
674
|
+
loadCandidates(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
675
|
+
start(ctx: StateContext<DelegationSessionStateModel>, { delegation }: StartDelegationSession): rxjs.Observable<Response<string>>;
|
|
676
|
+
end(ctx: StateContext<DelegationSessionStateModel>): rxjs.Observable<never>;
|
|
677
|
+
switch(ctx: StateContext<DelegationSessionStateModel>, { delegation }: SwitchDelegationSession): rxjs.Observable<void>;
|
|
815
678
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationSessionState, never>;
|
|
816
679
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationSessionState>;
|
|
817
680
|
}
|
|
@@ -819,29 +682,25 @@ declare class DelegationSessionState {
|
|
|
819
682
|
declare class DelegationSessionFacade {
|
|
820
683
|
private readonly store;
|
|
821
684
|
readonly active: _angular_core.Signal<_masterteam_delegations.ActiveDelegationSession | null>;
|
|
822
|
-
readonly candidates: _angular_core.Signal<
|
|
685
|
+
readonly candidates: _angular_core.Signal<DelegationRow[]>;
|
|
823
686
|
readonly isDelegated: _angular_core.Signal<boolean>;
|
|
824
687
|
private readonly loadingActive;
|
|
825
|
-
|
|
826
|
-
readonly
|
|
827
|
-
|
|
688
|
+
/** Raw delegation token for the `app-delegation` header. */
|
|
689
|
+
readonly token: _angular_core.Signal<string | null>;
|
|
690
|
+
/** On-behalf-of (delegator). */
|
|
691
|
+
readonly onBehalfOf: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
692
|
+
/** Executed-by (actual logged-in / delegated user). */
|
|
693
|
+
readonly executedBy: _angular_core.Signal<_masterteam_delegations.DelegationParty | null>;
|
|
828
694
|
readonly hasCandidates: _angular_core.Signal<boolean>;
|
|
829
|
-
readonly
|
|
830
|
-
readonly
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
endSession(opts?: {
|
|
836
|
-
silent?: boolean;
|
|
837
|
-
}): rxjs.Observable<void>;
|
|
838
|
-
switchSession(delegationId: number): rxjs.Observable<void>;
|
|
839
|
-
refreshSession(): rxjs.Observable<void>;
|
|
840
|
-
verifySession(): rxjs.Observable<void>;
|
|
841
|
-
invalidate(reason?: 'TokenPrincipalMismatch' | 'NotActive' | 'ScopeDenied' | 'Expired' | 'Unknown'): rxjs.Observable<void>;
|
|
695
|
+
readonly isStarting: _angular_core.Signal<boolean>;
|
|
696
|
+
readonly isLoadingCandidates: _angular_core.Signal<boolean>;
|
|
697
|
+
loadCandidates(): rxjs.Observable<void>;
|
|
698
|
+
startSession(delegation: DelegationRow): rxjs.Observable<void>;
|
|
699
|
+
switchSession(delegation: DelegationRow): rxjs.Observable<void>;
|
|
700
|
+
endSession(reason?: DelegationSessionInvalidationReason): rxjs.Observable<void>;
|
|
842
701
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationSessionFacade, never>;
|
|
843
702
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationSessionFacade>;
|
|
844
703
|
}
|
|
845
704
|
|
|
846
|
-
export { ApproveDelegation,
|
|
847
|
-
export type { ActiveDelegationSession, ApproveDelegationRequest,
|
|
705
|
+
export { ApproveDelegation, CancelDelegation, ClearDelegationDetail, ClearScopePreview, CreateDelegationLegacy, CreateDelegationV2, DelegationDetailDrawer, DelegationForm, DelegationSessionActionKey, DelegationSessionFacade, DelegationSessionState, DelegationStatusChip, Delegations, DelegationsActionKey, DelegationsFacade, DelegationsList, DelegationsState, EndDelegationSession, GetActiveAssignedDelegations, GetAssignedDelegations, GetDelegationDetail, GetMyDelegations, GetScopeOptions, LoadDelegationCandidates, PreviewScope, RejectDelegation, ScopePicker, StartDelegationSession, StartSessionDialog, SwitchDelegationSession, TopbarDelegationMenu, UpdateDelegationLegacy, UpdateDelegationV2, appDelegationInterceptor };
|
|
706
|
+
export type { ActiveDelegationSession, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeDeniedItem, DelegationScopeOptions, DelegationScopePreview, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|