1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-14 22:43:26 +00:00
Files
jslib/common/src/models/response/attachmentUploadDataResponse.ts
Oscar Hinton 1016bbfb9e Split jslib into multiple modules (#363)
* Split jslib into multiple modules
2021-06-03 18:58:57 +02:00

23 lines
1016 B
TypeScript

import { FileUploadType } from '../../enums/fileUploadType';
import { BaseResponse } from './baseResponse';
import { CipherResponse } from './cipherResponse';
export class AttachmentUploadDataResponse extends BaseResponse {
attachmentId: string;
fileUploadType: FileUploadType;
cipherResponse: CipherResponse;
cipherMiniResponse: CipherResponse;
url: string = null;
constructor(response: any) {
super(response);
this.attachmentId = this.getResponseProperty('AttachmentId');
this.fileUploadType = this.getResponseProperty('FileUploadType');
const cipherResponse = this.getResponseProperty('CipherResponse');
const cipherMiniResponse = this.getResponseProperty('CipherMiniResponse');
this.cipherResponse = cipherResponse == null ? null : new CipherResponse(cipherResponse);
this.cipherMiniResponse = cipherMiniResponse == null ? null : new CipherResponse(cipherMiniResponse);
this.url = this.getResponseProperty('Url');
}
}