mirror of
https://github.com/bitwarden/browser
synced 2026-02-17 09:59:41 +00:00
* [PM-21774] Adjust icon and tooltip for protected Sends on the Sends list page * [PM-21774] Update Sent table UI stories * [PM-21774] Fix Send table UI story
59 lines
2.0 KiB
TypeScript
59 lines
2.0 KiB
TypeScript
// FIXME: Update this file to be type safe and remove this and next line
|
|
// @ts-strict-ignore
|
|
import { BaseResponse } from "../../../../models/response/base.response";
|
|
import { AuthType } from "../../types/auth-type";
|
|
import { SendType } from "../../types/send-type";
|
|
import { SendFileApi } from "../api/send-file.api";
|
|
import { SendTextApi } from "../api/send-text.api";
|
|
|
|
export class SendResponse extends BaseResponse {
|
|
id: string;
|
|
accessId: string;
|
|
type: SendType;
|
|
authType: AuthType;
|
|
name: string;
|
|
notes: string;
|
|
file: SendFileApi;
|
|
text: SendTextApi;
|
|
key: string;
|
|
maxAccessCount?: number;
|
|
accessCount: number;
|
|
revisionDate: string;
|
|
expirationDate: string;
|
|
deletionDate: string;
|
|
password: string;
|
|
emails: string;
|
|
disable: boolean;
|
|
hideEmail: boolean;
|
|
|
|
constructor(response: any) {
|
|
super(response);
|
|
this.id = this.getResponseProperty("Id");
|
|
this.accessId = this.getResponseProperty("AccessId");
|
|
this.type = this.getResponseProperty("Type");
|
|
this.authType = this.getResponseProperty("AuthType");
|
|
this.name = this.getResponseProperty("Name");
|
|
this.notes = this.getResponseProperty("Notes");
|
|
this.key = this.getResponseProperty("Key");
|
|
this.maxAccessCount = this.getResponseProperty("MaxAccessCount");
|
|
this.accessCount = this.getResponseProperty("AccessCount");
|
|
this.revisionDate = this.getResponseProperty("RevisionDate");
|
|
this.expirationDate = this.getResponseProperty("ExpirationDate");
|
|
this.deletionDate = this.getResponseProperty("DeletionDate");
|
|
this.password = this.getResponseProperty("Password");
|
|
this.emails = this.getResponseProperty("Emails");
|
|
this.disable = this.getResponseProperty("Disabled") || false;
|
|
this.hideEmail = this.getResponseProperty("HideEmail") || false;
|
|
|
|
const text = this.getResponseProperty("Text");
|
|
if (text != null) {
|
|
this.text = new SendTextApi(text);
|
|
}
|
|
|
|
const file = this.getResponseProperty("File");
|
|
if (file != null) {
|
|
this.file = new SendFileApi(file);
|
|
}
|
|
}
|
|
}
|