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:
@@ -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[],
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user