mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 00:33:44 +00:00
added props to send access models (#284)
This commit is contained in:
@@ -16,6 +16,8 @@ export class SendAccess extends Domain {
|
|||||||
name: CipherString;
|
name: CipherString;
|
||||||
file: SendFile;
|
file: SendFile;
|
||||||
text: SendText;
|
text: SendText;
|
||||||
|
expirationDate: Date;
|
||||||
|
creatorIdentifier: string;
|
||||||
|
|
||||||
constructor(obj?: SendAccessResponse, alreadyEncrypted: boolean = false) {
|
constructor(obj?: SendAccessResponse, alreadyEncrypted: boolean = false) {
|
||||||
super();
|
super();
|
||||||
@@ -26,7 +28,9 @@ export class SendAccess extends Domain {
|
|||||||
this.buildDomainModel(this, obj, {
|
this.buildDomainModel(this, obj, {
|
||||||
id: null,
|
id: null,
|
||||||
name: null,
|
name: null,
|
||||||
}, alreadyEncrypted, ['id']);
|
expirationDate: null,
|
||||||
|
creatorIdentifier: null,
|
||||||
|
}, alreadyEncrypted, ['id', 'expirationDate', 'creatorIdentifier']);
|
||||||
|
|
||||||
this.type = obj.type;
|
this.type = obj.type;
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ export class SendAccessResponse extends BaseResponse {
|
|||||||
name: string;
|
name: string;
|
||||||
file: SendFileApi;
|
file: SendFileApi;
|
||||||
text: SendTextApi;
|
text: SendTextApi;
|
||||||
|
expirationDate: Date;
|
||||||
|
creatorIdentifier: string;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
super(response);
|
super(response);
|
||||||
@@ -27,5 +29,8 @@ export class SendAccessResponse extends BaseResponse {
|
|||||||
if (file != null) {
|
if (file != null) {
|
||||||
this.file = new SendFileApi(file);
|
this.file = new SendFileApi(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.expirationDate = this.getResponseProperty('ExpirationDate');
|
||||||
|
this.creatorIdentifier = this.getResponseProperty('CreatorIdentifier');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export class SendAccessView implements View {
|
|||||||
type: SendType = null;
|
type: SendType = null;
|
||||||
text = new SendTextView();
|
text = new SendTextView();
|
||||||
file = new SendFileView();
|
file = new SendFileView();
|
||||||
|
expirationDate: Date = null;
|
||||||
|
creatorIdentifier: string = null;
|
||||||
|
|
||||||
constructor(s?: SendAccess) {
|
constructor(s?: SendAccess) {
|
||||||
if (!s) {
|
if (!s) {
|
||||||
@@ -20,5 +22,7 @@ export class SendAccessView implements View {
|
|||||||
|
|
||||||
this.id = s.id;
|
this.id = s.id;
|
||||||
this.type = s.type;
|
this.type = s.type;
|
||||||
|
this.expirationDate = s.expirationDate;
|
||||||
|
this.creatorIdentifier = s.creatorIdentifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user