1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-04 18:53:20 +00:00

Move api model to file

This commit is contained in:
Leslie Tilton
2025-10-08 22:56:11 -05:00
parent 1f475b00e0
commit ea0270c29c
5 changed files with 20 additions and 21 deletions

View File

@@ -1,12 +1,12 @@
import { Utils } from "@bitwarden/common/platform/misc/utils";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { MemberCipherDetailsResponse } from "../models";
import {
MemberDetails,
OrganizationReportSummary,
RiskInsightsData,
} from "../models/report-models";
import { MemberCipherDetailsResponse } from "../response/member-cipher-details.response";
export function flattenMemberDetails(
memberCiphers: MemberCipherDetailsResponse[],

View File

@@ -113,3 +113,20 @@ export class GetRiskInsightsApplicationDataResponse extends BaseResponse {
this.contentEncryptionKey = this.getResponseProperty("contentEncryptionKey");
}
}
export class MemberCipherDetailsResponse extends BaseResponse {
userGuid: string;
userName: string;
email: string;
useKeyConnector: boolean;
cipherIds: string[] = [];
constructor(response: any) {
super(response);
this.userGuid = this.getResponseProperty("UserGuid");
this.userName = this.getResponseProperty("UserName");
this.email = this.getResponseProperty("Email");
this.useKeyConnector = this.getResponseProperty("UseKeyConnector");
this.cipherIds = this.getResponseProperty("CipherIds");
}
}

View File

@@ -3,7 +3,7 @@ import { mock } from "jest-mock-extended";
import { CipherType } from "@bitwarden/common/vault/enums";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { MemberCipherDetailsResponse } from "../../response/member-cipher-details.response";
import { MemberCipherDetailsResponse } from "..";
import { ApplicationHealthReportDetailEnriched } from "../report-data-service.types";
import {
ApplicationHealthReportDetail,

View File

@@ -1,18 +0,0 @@
import { BaseResponse } from "@bitwarden/common/models/response/base.response";
export class MemberCipherDetailsResponse extends BaseResponse {
userGuid: string;
userName: string;
email: string;
useKeyConnector: boolean;
cipherIds: string[] = [];
constructor(response: any) {
super(response);
this.userGuid = this.getResponseProperty("UserGuid");
this.userName = this.getResponseProperty("UserName");
this.email = this.getResponseProperty("Email");
this.useKeyConnector = this.getResponseProperty("UseKeyConnector");
this.cipherIds = this.getResponseProperty("CipherIds");
}
}

View File

@@ -2,7 +2,7 @@ import { Injectable } from "@angular/core";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { MemberCipherDetailsResponse } from "../../response/member-cipher-details.response";
import { MemberCipherDetailsResponse } from "../../models";
@Injectable()
export class MemberCipherDetailsApiService {