@masterteam/delegations 0.0.23 → 0.0.24
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/package.json
CHANGED
|
@@ -253,12 +253,30 @@ interface CreateDelegationV2Request {
|
|
|
253
253
|
requiresApproval: boolean;
|
|
254
254
|
scope: DelegationScopeSelection;
|
|
255
255
|
}
|
|
256
|
+
interface AdminCreateDelegationV2Request {
|
|
257
|
+
delegatorUserId: string;
|
|
258
|
+
delegatedUserId: string;
|
|
259
|
+
description?: string;
|
|
260
|
+
delegateFromDateTime: string;
|
|
261
|
+
delegateToDateTime: string;
|
|
262
|
+
delegationDaysType: DelegationDayRuleMode;
|
|
263
|
+
specificDays?: number[];
|
|
264
|
+
requiresApproval: boolean;
|
|
265
|
+
scope: DelegationScopeSelection;
|
|
266
|
+
}
|
|
256
267
|
type UpdateDelegationLegacyRequest = CreateDelegationLegacyRequest & {
|
|
257
268
|
rowVersion: string;
|
|
258
269
|
};
|
|
259
270
|
type UpdateDelegationV2Request = CreateDelegationV2Request & {
|
|
260
271
|
rowVersion: string;
|
|
261
272
|
};
|
|
273
|
+
type AdminUpdateDelegationV2Request = AdminCreateDelegationV2Request & {
|
|
274
|
+
rowVersion: string;
|
|
275
|
+
};
|
|
276
|
+
interface DelegationScopePreviewRequest {
|
|
277
|
+
scope: DelegationScopeSelection;
|
|
278
|
+
delegatorUserId?: string | null;
|
|
279
|
+
}
|
|
262
280
|
interface ApproveDelegationRequest {
|
|
263
281
|
rowVersion: string;
|
|
264
282
|
reason?: string;
|
|
@@ -545,6 +563,7 @@ type DetailTab = 'overview' | 'scope';
|
|
|
545
563
|
*/
|
|
546
564
|
declare class DelegationDetailDrawer implements OnInit {
|
|
547
565
|
readonly delegationId: _angular_core.InputSignal<number>;
|
|
566
|
+
readonly adminMode: _angular_core.InputSignal<boolean>;
|
|
548
567
|
private readonly facade;
|
|
549
568
|
private readonly transloco;
|
|
550
569
|
protected readonly ref: ModalRef;
|
|
@@ -563,7 +582,7 @@ declare class DelegationDetailDrawer implements OnInit {
|
|
|
563
582
|
protected getScopeActionLabel(action: DelegationScopeAction): string;
|
|
564
583
|
protected formatScopeSummary(summary: DelegationDisplayValue | undefined): string;
|
|
565
584
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationDetailDrawer, never>;
|
|
566
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationDetailDrawer, "mt-delegation-detail-drawer", never, { "delegationId": { "alias": "delegationId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
585
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DelegationDetailDrawer, "mt-delegation-detail-drawer", never, { "delegationId": { "alias": "delegationId"; "required": true; "isSignal": true; }; "adminMode": { "alias": "adminMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
567
586
|
}
|
|
568
587
|
|
|
569
588
|
interface DelegationGrantableTargetGroup {
|
|
@@ -593,6 +612,7 @@ interface DelegationGrantableHierarchyGroup {
|
|
|
593
612
|
declare class ScopePicker {
|
|
594
613
|
readonly scope: _angular_core.ModelSignal<DelegationScopeSelection>;
|
|
595
614
|
readonly readonly: _angular_core.InputSignal<boolean>;
|
|
615
|
+
readonly adminMode: _angular_core.InputSignal<boolean>;
|
|
596
616
|
/**
|
|
597
617
|
* Delegator whose grantable scope is loaded. Undefined = current user
|
|
598
618
|
* (self-service). In admin mode the host rebinds this as the selected
|
|
@@ -625,7 +645,7 @@ declare class ScopePicker {
|
|
|
625
645
|
private getActionLabel;
|
|
626
646
|
private currentLanguage;
|
|
627
647
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScopePicker, never>;
|
|
628
|
-
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>;
|
|
648
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScopePicker, "mt-scope-picker", never, { "scope": { "alias": "scope"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "adminMode": { "alias": "adminMode"; "required": false; "isSignal": true; }; "delegatorUserId": { "alias": "delegatorUserId"; "required": false; "isSignal": true; }; }, { "scope": "scopeChange"; }, never, never, true, never>;
|
|
629
649
|
}
|
|
630
650
|
|
|
631
651
|
/**
|
|
@@ -657,21 +677,24 @@ declare class GetActiveAssignedDelegations {
|
|
|
657
677
|
}
|
|
658
678
|
declare class GetDelegationDetail {
|
|
659
679
|
id: number;
|
|
680
|
+
asAdmin: boolean;
|
|
660
681
|
static readonly type = "[Delegations] Get Delegation Detail";
|
|
661
|
-
constructor(id: number);
|
|
682
|
+
constructor(id: number, asAdmin?: boolean);
|
|
662
683
|
}
|
|
663
684
|
declare class ClearDelegationDetail {
|
|
664
685
|
static readonly type = "[Delegations] Clear Delegation Detail";
|
|
665
686
|
}
|
|
666
687
|
declare class GetScopeOptions {
|
|
667
688
|
delegatorUserId?: string | undefined;
|
|
689
|
+
asAdmin: boolean;
|
|
668
690
|
static readonly type = "[Delegations] Get Scope Options";
|
|
669
|
-
constructor(delegatorUserId?: string | undefined);
|
|
691
|
+
constructor(delegatorUserId?: string | undefined, asAdmin?: boolean);
|
|
670
692
|
}
|
|
671
693
|
declare class PreviewScope {
|
|
672
|
-
|
|
694
|
+
request: DelegationScopePreviewRequest;
|
|
695
|
+
asAdmin: boolean;
|
|
673
696
|
static readonly type = "[Delegations] Preview Scope";
|
|
674
|
-
constructor(
|
|
697
|
+
constructor(request: DelegationScopePreviewRequest, asAdmin?: boolean);
|
|
675
698
|
}
|
|
676
699
|
declare class ClearScopePreview {
|
|
677
700
|
static readonly type = "[Delegations] Clear Scope Preview";
|
|
@@ -682,9 +705,10 @@ declare class CreateDelegationLegacy {
|
|
|
682
705
|
constructor(request: CreateDelegationLegacyRequest);
|
|
683
706
|
}
|
|
684
707
|
declare class CreateDelegationV2 {
|
|
685
|
-
request: CreateDelegationV2Request;
|
|
708
|
+
request: CreateDelegationV2Request | AdminCreateDelegationV2Request;
|
|
709
|
+
asAdmin: boolean;
|
|
686
710
|
static readonly type = "[Delegations] Create Delegation (v2)";
|
|
687
|
-
constructor(request: CreateDelegationV2Request);
|
|
711
|
+
constructor(request: CreateDelegationV2Request | AdminCreateDelegationV2Request, asAdmin?: boolean);
|
|
688
712
|
}
|
|
689
713
|
declare class UpdateDelegationLegacy {
|
|
690
714
|
id: number;
|
|
@@ -694,9 +718,10 @@ declare class UpdateDelegationLegacy {
|
|
|
694
718
|
}
|
|
695
719
|
declare class UpdateDelegationV2 {
|
|
696
720
|
id: number;
|
|
697
|
-
request: UpdateDelegationV2Request;
|
|
721
|
+
request: UpdateDelegationV2Request | AdminUpdateDelegationV2Request;
|
|
722
|
+
asAdmin: boolean;
|
|
698
723
|
static readonly type = "[Delegations] Update Delegation (v2)";
|
|
699
|
-
constructor(id: number, request: UpdateDelegationV2Request);
|
|
724
|
+
constructor(id: number, request: UpdateDelegationV2Request | AdminUpdateDelegationV2Request, asAdmin?: boolean);
|
|
700
725
|
}
|
|
701
726
|
declare class ApproveDelegation {
|
|
702
727
|
id: number;
|
|
@@ -750,18 +775,20 @@ declare class DelegationsState {
|
|
|
750
775
|
getAssigned(ctx: StateContext<DelegationsStateModel>, { query }: GetAssignedDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
751
776
|
getAdmin(ctx: StateContext<DelegationsStateModel>, { query }: GetAdminDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
752
777
|
getActive(ctx: StateContext<DelegationsStateModel>, { query }: GetActiveAssignedDelegations): rxjs.Observable<Response<DelegationPage<DelegationRow>>>;
|
|
753
|
-
getDetail(ctx: StateContext<DelegationsStateModel>, { id }: GetDelegationDetail): rxjs.Observable<Response<DelegationDetail>>;
|
|
778
|
+
getDetail(ctx: StateContext<DelegationsStateModel>, { id, asAdmin }: GetDelegationDetail): rxjs.Observable<Response<DelegationDetail>>;
|
|
754
779
|
clearDetail(ctx: StateContext<DelegationsStateModel>): void;
|
|
755
|
-
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId }: GetScopeOptions): rxjs.Observable<Response<DelegationScopeOptions>>;
|
|
756
|
-
previewScope(ctx: StateContext<DelegationsStateModel>, {
|
|
780
|
+
getScopeOptions(ctx: StateContext<DelegationsStateModel>, { delegatorUserId, asAdmin }: GetScopeOptions): rxjs.Observable<Response<DelegationScopeOptions>>;
|
|
781
|
+
previewScope(ctx: StateContext<DelegationsStateModel>, { request, asAdmin }: PreviewScope): rxjs.Observable<Response<DelegationScopePreview>>;
|
|
757
782
|
clearScopePreview(ctx: StateContext<DelegationsStateModel>): void;
|
|
758
783
|
createLegacy(ctx: StateContext<DelegationsStateModel>, { request }: CreateDelegationLegacy): rxjs.Observable<Response<DelegationDto>>;
|
|
759
|
-
createV2(ctx: StateContext<DelegationsStateModel>, { request }: CreateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
784
|
+
createV2(ctx: StateContext<DelegationsStateModel>, { request, asAdmin }: CreateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
760
785
|
updateLegacy(ctx: StateContext<DelegationsStateModel>, { id, request }: UpdateDelegationLegacy): rxjs.Observable<Response<DelegationDto>>;
|
|
761
|
-
updateV2(ctx: StateContext<DelegationsStateModel>, { id, request }: UpdateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
786
|
+
updateV2(ctx: StateContext<DelegationsStateModel>, { id, request, asAdmin }: UpdateDelegationV2): rxjs.Observable<Response<DelegationDto>>;
|
|
762
787
|
approve(ctx: StateContext<DelegationsStateModel>, { id, request }: ApproveDelegation): rxjs.Observable<Response<DelegationDto>>;
|
|
763
788
|
reject(ctx: StateContext<DelegationsStateModel>, { id, request }: RejectDelegation): rxjs.Observable<Response<DelegationDto>>;
|
|
764
789
|
cancel(ctx: StateContext<DelegationsStateModel>, { id, rowVersion, asAdmin }: CancelDelegation): rxjs.Observable<Response<boolean>>;
|
|
790
|
+
private buildScopePreviewRequest;
|
|
791
|
+
private buildAdminSaveRequest;
|
|
765
792
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DelegationsState, never>;
|
|
766
793
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DelegationsState>;
|
|
767
794
|
}
|
|
@@ -802,15 +829,18 @@ declare class DelegationsFacade {
|
|
|
802
829
|
getAssigned(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
803
830
|
getAdmin(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
804
831
|
getActive(query?: DelegationListQuery): rxjs.Observable<void>;
|
|
805
|
-
getDetail(id: number): rxjs.Observable<void>;
|
|
832
|
+
getDetail(id: number, asAdmin?: boolean): rxjs.Observable<void>;
|
|
806
833
|
clearDetail(): rxjs.Observable<void>;
|
|
807
|
-
loadScopeOptions(delegatorUserId?: string): rxjs.Observable<void>;
|
|
808
|
-
previewScope(scope: DelegationScopeSelection
|
|
834
|
+
loadScopeOptions(delegatorUserId?: string, asAdmin?: boolean): rxjs.Observable<void>;
|
|
835
|
+
previewScope(scope: DelegationScopeSelection, options?: {
|
|
836
|
+
delegatorUserId?: string;
|
|
837
|
+
asAdmin?: boolean;
|
|
838
|
+
}): rxjs.Observable<void>;
|
|
809
839
|
clearScopePreview(): rxjs.Observable<void>;
|
|
810
840
|
createLegacy(request: CreateDelegationLegacyRequest): rxjs.Observable<void>;
|
|
811
|
-
createV2(request: CreateDelegationV2Request): rxjs.Observable<void>;
|
|
841
|
+
createV2(request: CreateDelegationV2Request | AdminCreateDelegationV2Request, asAdmin?: boolean): rxjs.Observable<void>;
|
|
812
842
|
updateLegacy(id: number, request: UpdateDelegationLegacyRequest): rxjs.Observable<void>;
|
|
813
|
-
updateV2(id: number, request: UpdateDelegationV2Request): rxjs.Observable<void>;
|
|
843
|
+
updateV2(id: number, request: UpdateDelegationV2Request | AdminUpdateDelegationV2Request, asAdmin?: boolean): rxjs.Observable<void>;
|
|
814
844
|
approve(id: number, request: ApproveDelegationRequest): rxjs.Observable<void>;
|
|
815
845
|
reject(id: number, request: RejectDelegationRequest): rxjs.Observable<void>;
|
|
816
846
|
cancel(id: number, rowVersion: string, asAdmin?: boolean): rxjs.Observable<void>;
|
|
@@ -905,4 +935,4 @@ declare class DelegationSessionFacade {
|
|
|
905
935
|
}
|
|
906
936
|
|
|
907
937
|
export { ApproveDelegation, CancelDelegation, ClearDelegationDetail, ClearScopePreview, CreateDelegationLegacy, CreateDelegationV2, DelegationDetailDrawer, DelegationForm, DelegationSessionActionKey, DelegationSessionFacade, DelegationSessionState, DelegationStatusChip, Delegations, DelegationsActionKey, DelegationsFacade, DelegationsList, DelegationsState, EndDelegationSession, GetActiveAssignedDelegations, GetAdminDelegations, GetAssignedDelegations, GetDelegationDetail, GetMyDelegations, GetScopeOptions, LoadDelegationCandidates, PreviewScope, RejectDelegation, RejectDelegationDialog, ScopePicker, StartDelegationSession, StartSessionDialog, SwitchDelegationSession, TopbarDelegationMenu, UpdateDelegationLegacy, UpdateDelegationV2, appDelegationInterceptor };
|
|
908
|
-
export type { ActiveDelegationSession, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDisplayValue, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeCombinationRule, DelegationScopeDeniedItem, DelegationScopeFact, DelegationScopeHierarchyGroup, DelegationScopeHierarchyTarget, DelegationScopeOptions, DelegationScopePreview, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|
|
938
|
+
export type { ActiveDelegationSession, AdminCreateDelegationV2Request, AdminUpdateDelegationV2Request, ApproveDelegationRequest, CreateDelegationLegacyRequest, CreateDelegationV2Request, DelegationAllowedAction, DelegationApprovalInfo, DelegationApprovalStatus, DelegationCancellationInfo, DelegationDayRuleMode, DelegationDetail, DelegationDisplayValue, DelegationDto, DelegationEffectiveStatus, DelegationGrant, DelegationListQuery, DelegationPage, DelegationParty, DelegationRow, DelegationScopeAction, DelegationScopeCombinationRule, DelegationScopeDeniedItem, DelegationScopeFact, DelegationScopeHierarchyGroup, DelegationScopeHierarchyTarget, DelegationScopeOptions, DelegationScopePreview, DelegationScopePreviewRequest, DelegationScopeSelection, DelegationScopeTarget, DelegationScopeWarning, DelegationSessionInvalidationReason, DelegationSessionStateModel, DelegationSortDirection, DelegationStatusInfo, DelegationsStateModel, RejectDelegationRequest, UpdateDelegationLegacyRequest, UpdateDelegationV2Request };
|