mirror of
https://github.com/bitwarden/cli
synced 2025-12-16 08:13:21 +00:00
get items attachment command
This commit is contained in:
@@ -1,17 +1,21 @@
|
||||
import { CipherView } from 'jslib/models/view/cipherView';
|
||||
|
||||
import { BaseResponse } from './baseResponse';
|
||||
|
||||
import { Cipher } from '../cipher';
|
||||
import { AttachmentResponse } from './attachmentResponse';
|
||||
import { BaseResponse } from './baseResponse';
|
||||
|
||||
export class CipherResponse extends Cipher implements BaseResponse {
|
||||
object: string;
|
||||
id: string;
|
||||
attachments: AttachmentResponse[];
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user