1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Fix cannot find module sendAccessResponse (#253)

This commit is contained in:
libertylocked
2021-03-12 10:57:29 -08:00
committed by GitHub
parent 976be0fe67
commit f181af4d76

View File

@@ -0,0 +1,42 @@
import { SendType } from 'jslib/enums/sendType';
import { SendAccessView } from 'jslib/models/view/sendAccessView';
import { BaseResponse } from 'jslib/cli/models/response/baseResponse';
import { SendFileResponse } from './sendFileResponse';
import { SendTextResponse } from './sendTextResponse';
export class SendAccessResponse implements BaseResponse {
static template(): SendAccessResponse {
const req = new SendAccessResponse();
req.name = 'Send name';
req.type = SendType.Text;
req.text = null;
req.file = null;
return req;
}
object = 'send-access';
id: string;
name: string;
type: SendType;
text: SendTextResponse;
file: SendFileResponse;
constructor(o?: SendAccessView) {
if (o == null) {
return;
}
this.id = o.id;
this.name = o.name;
this.type = o.type;
if (o.type === SendType.Text && o.text != null) {
this.text = new SendTextResponse(o.text);
}
if (o.type === SendType.File && o.file != null) {
this.file = new SendFileResponse(o.file);
}
}
}