mirror of
https://github.com/bitwarden/cli
synced 2025-12-17 00:33:20 +00:00
move export models to jslib
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { CipherWithIds } from 'jslib/models/export/cipherWithIds';
|
||||
import { CipherView } from 'jslib/models/view/cipherView';
|
||||
|
||||
import { Cipher } from '../cipher';
|
||||
import { AttachmentResponse } from './attachmentResponse';
|
||||
import { BaseResponse } from './baseResponse';
|
||||
import { LoginResponse } from './loginResponse';
|
||||
@@ -8,23 +8,19 @@ import { PasswordHistoryResponse } from './passwordHistoryResponse';
|
||||
|
||||
import { CipherType } from 'jslib/enums';
|
||||
|
||||
export class CipherResponse extends Cipher implements BaseResponse {
|
||||
export class CipherResponse extends CipherWithIds implements BaseResponse {
|
||||
object: string;
|
||||
id: string;
|
||||
attachments: AttachmentResponse[];
|
||||
revisionDate: Date;
|
||||
passwordHistory: PasswordHistoryResponse[];
|
||||
collectionIds: string[];
|
||||
|
||||
constructor(o: CipherView) {
|
||||
super();
|
||||
this.object = 'item';
|
||||
this.id = o.id;
|
||||
this.build(o);
|
||||
if (o.attachments != null) {
|
||||
this.attachments = o.attachments.map((a) => new AttachmentResponse(a));
|
||||
}
|
||||
this.collectionIds = o.collectionIds;
|
||||
this.revisionDate = o.revisionDate;
|
||||
if (o.passwordHistory != null) {
|
||||
this.passwordHistory = o.passwordHistory.map((h) => new PasswordHistoryResponse(h));
|
||||
|
||||
Reference in New Issue
Block a user