mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[BEEEP: PM-10190] Use strict TS checks in CLI service container (#10298)
* move cli service-container to new folder * fix imports * add tsconfig and fix type issues in other services * fix more imports in service-container * make ts server happy in service-container * fix actual bugs in cli service-container * fix package json reference path * fix service-container import * update type on cipher service
This commit is contained in:
@@ -16,6 +16,8 @@ export class PolicyApiServiceAbstraction {
|
||||
organizationUserId: string,
|
||||
) => Promise<Policy[] | undefined>;
|
||||
|
||||
getMasterPasswordPolicyOptsForOrgUser: (orgId: string) => Promise<MasterPasswordPolicyOptions>;
|
||||
getMasterPasswordPolicyOptsForOrgUser: (
|
||||
orgId: string,
|
||||
) => Promise<MasterPasswordPolicyOptions | null>;
|
||||
putPolicy: (organizationId: string, type: PolicyType, request: PolicyRequest) => Promise<any>;
|
||||
}
|
||||
|
||||
@@ -64,8 +64,10 @@ function mapToSingleOrganization(organizationId: string) {
|
||||
}
|
||||
|
||||
export class OrganizationService implements InternalOrganizationServiceAbstraction {
|
||||
organizations$ = this.getOrganizationsFromState$();
|
||||
memberOrganizations$ = this.organizations$.pipe(mapToExcludeProviderOrganizations());
|
||||
organizations$: Observable<Organization[]> = this.getOrganizationsFromState$();
|
||||
memberOrganizations$: Observable<Organization[]> = this.organizations$.pipe(
|
||||
mapToExcludeProviderOrganizations(),
|
||||
);
|
||||
|
||||
constructor(private stateProvider: StateProvider) {}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class PolicyService implements InternalPolicyServiceAbstraction {
|
||||
private organizationService: OrganizationService,
|
||||
) {}
|
||||
|
||||
get$(policyType: PolicyType) {
|
||||
get$(policyType: PolicyType): Observable<Policy> {
|
||||
const filteredPolicies$ = this.activeUserPolicies$.pipe(
|
||||
map((policies) => policies.filter((p) => p.type === policyType)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user