UNPKG

kod-temp

Version:

Workano Communications SDK

47 lines (46 loc) 1.39 kB
export const PENDING = 'pending'; export const ACCEPTED = 'accepted'; export const REJECTED = 'rejected'; export const POST_PROCESSING = 'post_processing'; export const POST_PROCESSED_SUCCESS = 'post_processed_success'; export const POST_PROCESSED_ERROR = 'post_processed_error'; export default class MeetingAuthorization { static PENDING = PENDING; static ACCEPTED = ACCEPTED; static REJECTED = REJECTED; static POST_PROCESSING = POST_PROCESSING; static POST_PROCESSED_SUCCESS = POST_PROCESSED_SUCCESS; static POST_PROCESSED_ERROR = POST_PROCESSED_ERROR; meetingUuid; uuid; userUuid; userName; status; constructor({ meetingUuid, uuid, userUuid, userName, } = {}) { this.meetingUuid = meetingUuid; this.uuid = uuid; this.userUuid = userUuid; this.userName = userName; } setStatus(status) { this.status = status; } getStatus() { return this.status; } static parse(plain) { const { meeting_uuid: meetingUuid, uuid, guest_uuid: userUuid, guest_name: userName, } = plain; return new MeetingAuthorization({ meetingUuid, uuid, userUuid, userName, }); } static parseMany(items) { if (!items) { return []; } return items.map(MeetingAuthorization.parse); } }