mirror of
https://github.com/bitwarden/cli
synced 2025-12-17 00:33:20 +00:00
refactor req/res models
This commit is contained in:
@@ -2,21 +2,15 @@ import { CipherView } from 'jslib/models/view/cipherView';
|
||||
|
||||
import { BaseResponse } from './baseResponse';
|
||||
|
||||
import { CipherType } from 'jslib/enums';
|
||||
import { Cipher } from '../cipher';
|
||||
|
||||
export class CipherResponse extends BaseResponse {
|
||||
export class CipherResponse extends Cipher implements BaseResponse {
|
||||
object: string;
|
||||
id: string;
|
||||
organizationId: string;
|
||||
type: CipherType;
|
||||
name: string;
|
||||
notes: string;
|
||||
|
||||
constructor(o: CipherView) {
|
||||
super('item');
|
||||
super(o);
|
||||
this.object = 'item';
|
||||
this.id = o.id;
|
||||
this.organizationId = o.organizationId;
|
||||
this.type = o.type;
|
||||
this.name = o.name;
|
||||
this.notes = o.notes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user