{"version":3,"sources":["src/app/services/zoom/index.ts","src/app/services/device/index.ts","src/app/services/content/index.ts","src/app/services/onedrive/index.ts"],"sourcesContent":["import { HttpClient, HttpErrorResponse } from '@angular/common/http'\nimport { Injectable } from '@angular/core'\nimport { BehaviorSubject, Observable, throwError, Subscription } from 'rxjs'\nimport { IProfile, ZoomUserProfile } from 'src/app/models/profile'\nimport { environment } from 'src/environments/environment'\nimport { CreateZoomMeeting, ScheduledMeeting } from 'src/app/models/zoom.model'\nimport { catchError, tap } from 'rxjs/operators'\nimport { AppStateService } from '../app-state'\nimport { AppUserState } from '../app-state/models/user.state'\nimport { IntegrationStatus } from 'src/app/pages/settings/app-integrations/app-integrations.component'\n\nexport type ScheduledMeetingListed = Pick<\n ScheduledMeeting,\n 'agenda' | 'created_at' | 'duration' | 'host_id' | 'id' | 'join_url' | 'start_time' | 'timezone' | 'topic' | 'type' | 'uuid'\n>\n\nexport interface MeetingStatus {\n code: number\n}\n\nexport interface ZakTokenResponse {\n token: string\n}\n\nexport interface MeetingList {\n page_size: number\n total_records: number\n next_page_token: string\n meetings: ScheduledMeetingListed[]\n}\n\nexport interface ZoomApiResponse {\n code: number\n message: string\n}\n\n@Injectable()\nexport class ZoomService {\n private authCode: string = null\n integrationStatus: IntegrationStatus = 'Empty'\n user: IProfile\n $errorMessage = new BehaviorSubject('No message available')\n currentUser: AppUserState\n currentUser$: Subscription\n\n constructor(private http: HttpClient, private appStateService: AppStateService) {\n this.currentUser$ = this.appStateService\n .getUserState()\n .pipe(\n tap(user => {\n if (user) {\n this.currentUser = user\n if (this.currentUser.profile.integrations?.zoom?.hasOwnProperty('access_token')) {\n this.integrationStatus = 'Ready'\n } else if (!this.currentUser.profile.integrations?.zoom) {\n this.integrationStatus = 'Empty'\n }\n }\n }),\n )\n .subscribe()\n }\n\n async openOAuthLInk(): Promise {\n const link = `\n ${environment.ZOOM_OAUTH_AUTHORIZE_LINK}?response_type=code&client_id=${environment.ZOOM_APP_CLIEND_ID}&redirect_uri=${environment.ZOOM_REDIRECT_URI}`\n window.location.href = link\n }\n\n getAccessToken(): Observable {\n if (!this.currentUser.profile._id) {\n this.appStateService.refreshAppState()\n }\n const body = {\n authCode: this.authCode,\n userId: this.currentUser.profile._id || '',\n }\n return this.http.post(`${environment.apiBaseUrl}/zoom/gettoken`, body).pipe(catchError(this.handleError.bind(this)))\n }\n\n getZoomUserProfile(): Observable {\n return this.http.get(`${environment.apiBaseUrl}/zoom/user/${this.currentUser.profile._id}`).pipe(catchError(this.handleError.bind(this)))\n }\n\n getIntegrationStatus(): IntegrationStatus {\n return this.integrationStatus\n }\n\n setIntegrationStatus(status: IntegrationStatus): void {\n this.integrationStatus = status\n }\n\n getAuthCode(): string {\n return this.authCode\n }\n\n setAuthCode(code: string): void {\n this.authCode = code\n }\n\n resetAuthCode(): void {\n this.authCode = null\n }\n\n scheduleMeeting(meetingData: CreateZoomMeeting): Observable {\n const body = {\n userId: this.currentUser.profile._id,\n ...meetingData,\n }\n return this.http.post(`${environment.apiBaseUrl}/zoom/schedulemeeting`, body).pipe(catchError(this.handleError.bind(this)))\n }\n\n updateMeeting(meetingData: CreateZoomMeeting & Pick): Observable {\n const body = {\n id: meetingData.id,\n userId: this.currentUser.profile._id,\n ...meetingData,\n }\n return this.http.put(`${environment.apiBaseUrl}/zoom/updatemeeting`, body).pipe(catchError(this.handleError.bind(this)))\n }\n\n getMeetingById(meetingId: Pick): Observable {\n return this.http\n .get(`${environment.apiBaseUrl}/zoom/getmeeting?meetingId=${meetingId}&userId=${this.currentUser.profile._id}`)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getUserScheduledMeetings(): Observable {\n return this.http\n .get(`${environment.apiBaseUrl}/zoom/getusermeetings?&userId=${this.currentUser.profile._id}`)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n deleteMeetingById(meetingId: Pick): Observable {\n return this.http\n .delete(`${environment.apiBaseUrl}/zoom/deletemeeting?meetingId=${meetingId}&userId=${this.currentUser.profile._id}`)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getZakToken(): Observable {\n return this.http\n .get(`${environment.apiBaseUrl}/zoom/user/zak/${this.currentUser.profile._id}`)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getErrorNotification(): Observable {\n return this.$errorMessage.asObservable()\n }\n\n setErrorText(errorText: string): void {\n this.$errorMessage.next(errorText)\n }\n\n handleError(error: HttpErrorResponse) {\n const x = error.error.description ?? 'No message available'\n this.setErrorText(x)\n if (error.status === 500) {\n console.error('Server error: ', error.error)\n } else {\n console.error(`Error code: ${error.status}, message: `, error.error)\n }\n return throwError(() => new Error(`${error}`))\n }\n}\n","import { Injectable } from '@angular/core'\nimport { HttpClient } from '@angular/common/http'\nimport { BehaviorSubject, Observable } from 'rxjs'\nimport { environment } from 'src/environments/environment'\nimport { catchError, mergeMap, switchMap, take, tap } from 'rxjs/operators'\n\nexport interface ClaimDevice {\n code: string\n description: string\n}\n\nexport interface IDevice {\n _id: string\n name: string\n resolution: string\n description: string\n secret: string\n __v: number\n owner?: string\n assignedWall?: string\n suspended?: boolean\n}\n\n@Injectable()\nexport class DeviceService {\n private userDevices = new BehaviorSubject([])\n\n constructor(private http: HttpClient) {\n this.loadUserDevices()\n .pipe(take(1))\n .subscribe()\n }\n\n getUserDevices(): Observable {\n return this.userDevices.asObservable()\n }\n\n claimDevice(code: string, description: string): Observable {\n const body = {\n code,\n description,\n }\n return this.http\n .post(`${environment.apiBaseUrl}/devices/claim`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n getDeviceById(id: string): Observable {\n return this.http.get(`${environment.apiBaseUrl}/devices/${id}`)\n }\n\n // getDeviceListByUserId(): Observable {\n // return this.http.get(`${environment.apiBaseUrl}/devices`).pipe(\n // tap(devices => {\n // this.loadUserDevices()\n // }),\n // )\n // }\n\n removeDeviceFromUser(deviceId: string): Observable {\n const body = {\n id: deviceId,\n }\n return this.http\n .patch(`${environment.apiBaseUrl}/devices/reject/${deviceId}`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n suspendDevice(deviceId: string): Observable {\n const body = {\n id: deviceId,\n }\n return this.http\n .patch(`${environment.apiBaseUrl}/devices/suspend/${deviceId}`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n restoreDevice(deviceId: string): Observable {\n const body = {\n id: deviceId,\n }\n return this.http\n .patch(`${environment.apiBaseUrl}/devices/restore/${deviceId}`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n attachWallToDevice(deviceId: string, wallId: string): Observable {\n const body = {\n wall: wallId,\n }\n return this.http\n .patch(`${environment.apiBaseUrl}/devices/attachwall/${deviceId}`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n detachWallFromDevice(deviceId: string, wallId: string): Observable {\n const body = {\n wall: wallId,\n }\n return this.http\n .patch(`${environment.apiBaseUrl}/devices/detachwall/${deviceId}`, body)\n .pipe(switchMap(x => this.loadUserDevices()))\n }\n\n loadUserDevices(): Observable {\n return this.http.get(`${environment.apiBaseUrl}/devices`).pipe(\n tap(devices => {\n this.userDevices.next(devices)\n }),\n catchError(err => {\n throw 'Error loading user devices: ' + err\n }),\n )\n }\n}\n","import { Injectable } from '@angular/core'\nimport { HttpClient } from '@angular/common/http'\nimport { Observable } from 'rxjs'\nimport { environment } from 'src/environments/environment'\n\nexport interface Content {\n key: string\n publicUri: string\n filename: string\n publicThumbUri: string\n compressedLogoKey: string\n publicUriCompressed: string\n}\n\nexport type UploadFileContent = Pick\n\ninterface ContentToCache {\n files: { fileId: string; filename: string }[]\n}\n\nexport interface CacheContent {\n files: { fileId: string; filename: string; cdnKey: string; cdnUrl: string }[]\n}\n\nexport interface YouTubeItems {\n items: ItemVideoData[]\n nextPageToken: string\n etag: string\n regionCode: string\n pageInfo: PageInfo\n}\n\nexport interface PageInfo {\n resultsPerPage: number\n totalResults: number\n}\n\nexport interface YouTubeSearchItems {\n kind: string\n etag: string\n nextPageToken: string\n regionCode: string\n pageInfo: YoutubePageInfo\n items: YoutubeSearchItem[]\n}\n\nexport interface YoutubePageInfo {\n totalResults: number\n resultsPerPage: number\n}\n\nexport interface YoutubeSearchItem {\n kind: string\n etag: string\n id: YoutubeSearchItemId\n}\n\nexport interface YoutubeSearchItemId {\n kind: string\n videoId: string\n}\n\nexport interface ItemVideoData {\n id: ItemVideoDataId\n snippet: SnippetDetails\n contentDetails: ContentDetails\n}\nexport interface ItemVideoDataId {\n kind: string\n videoId: string\n}\n\nexport interface ContentDetails {\n duration: string\n}\n\nexport interface SnippetDetails {\n title: string\n description: string\n thumbnails: Thumbnails\n}\nexport interface Thumbnails {\n default: ThumbnailDetails\n medium: ThumbnailDetails\n standard: ThumbnailDetails\n maxres: ThumbnailDetails\n}\nexport interface ThumbnailDetails {\n url: string\n width: number\n height: number\n}\n\n@Injectable()\nexport class ContentService {\n constructor(private http: HttpClient) {}\n\n uploadFile(eventId: string, content: FormData): Observable {\n return this.http.post(`${environment.apiBaseUrl}/content/${eventId}/upload`, content)\n }\n\n uploadInworldModelFile(eventId: string, content: FormData): Observable {\n return this.http.post(\n `${environment.apiBaseUrl}/content/${eventId}/upload`,\n content,\n )\n }\n\n upload(eventId: string, filename: string, content: Buffer): Observable {\n return this.http.post(\n `${environment.apiBaseUrl}/content/${eventId}/?filename=${encodeURIComponent(filename)}`,\n content,\n )\n }\n\n importFromDrive(\n file: {\n filename: string\n fileId: string\n auth: string\n ar?: number\n width?: number\n height?: number\n rotation?: number\n thumbnailLink?: string\n },\n eventId: string,\n ): Observable {\n return this.http.post(`${environment.apiBaseUrl}/content/${eventId}/import`, {\n source: 'gdrive',\n ...file,\n })\n }\n\n importFromOneDrive(\n file: {\n fileName: string\n fileUrl: string\n thumbUrl: string\n width: number\n height: number\n userId: string\n },\n eventId: string,\n ): Observable {\n return this.http.post(`${environment.apiBaseUrl}/content/onedrive/${eventId}/import`, {\n ...file,\n })\n }\n\n uploadToCache(contentToCache: ContentToCache, eventId: string): Observable {\n return this.http.post(`${environment.apiBaseUrl}/content/${eventId}/cache`, {\n //source: 'gdrive', //todo: pass source\n ...contentToCache,\n })\n }\n\n getYouTubeVideoData(videoId: string): Observable {\n const options = {\n params: {\n id: videoId,\n part: 'contentDetails, snippet',\n key: environment.YOUTUBE_API_KEY,\n fields: 'items(id, contentDetails(duration), snippet(title, description, thumbnails))',\n },\n }\n return this.http.get(environment.YOUTUBE_API_URL, { ...options })\n }\n\n searchYouTubeVideo(keyword: string, nextPageToken?: string): Observable {\n let params\n if (nextPageToken) {\n params = {\n q: keyword,\n part: 'snippet',\n key: environment.YOUTUBE_API_KEY,\n type: 'video',\n maxResults: '50',\n pageToken: nextPageToken,\n }\n } else {\n params = {\n q: keyword,\n part: 'snippet',\n key: environment.YOUTUBE_API_KEY,\n type: 'video',\n maxResults: '50',\n }\n }\n return this.http.get(environment.YOUTUBE_API_SEARCH_URL, {\n params: { ...params },\n })\n }\n}\n","import { HttpClient, HttpErrorResponse } from '@angular/common/http'\nimport { Injectable } from '@angular/core'\nimport { BehaviorSubject, catchError, Observable, Subscription, throwError } from 'rxjs'\nimport { IProfile, OneDriveUserProfile } from 'src/app/models/profile'\nimport { environment } from 'src/environments/environment'\nimport { AppStateService } from '../app-state'\nimport { AppUserState } from '../app-state/models/user.state'\nimport { IntegrationStatus } from 'src/app/pages/settings/app-integrations/app-integrations.component'\nimport {\n IOneDriveCreateFolderResponse,\n IOneDriveFileItemDetail,\n IOneDriveItemsListResponse,\n IOneDriveSharedItemResponse,\n OneDriveCreateFolderInput,\n OneDriveItemUploadResponse,\n} from 'src/app/models/one-drive.models'\n\nexport interface HttpApiResponse {\n code: number\n message: string\n}\n\n@Injectable()\nexport class OneDriveService {\n private authCode: string = null\n integrationStatus: IntegrationStatus = 'Empty'\n user: IProfile\n $errorMessage = new BehaviorSubject('No message available')\n currentUser: AppUserState\n currentUser$: Subscription\n\n constructor(private http: HttpClient, private appStateService: AppStateService) {\n this.currentUser$ = this.appStateService.getUserState().subscribe(user => {\n if (user) {\n this.currentUser = user\n if (this.currentUser.profile.integrations?.onedrive?.hasOwnProperty('access_token')) {\n this.integrationStatus = 'Ready'\n }\n }\n })\n }\n\n async openOAuthLink(): Promise {\n const scope = 'user.read files.readwrite.all offline_access'\n // const scope = 'wl.basic onedrive.readwrite'\n const link = `${environment.ONEDRIVE_OAUTH_AUTHORIZE_LINK}?\n client_id=${environment.ONEDRIVE_APPLICATION_ID}&\n scope=${scope}&\n response_type=code&\n redirect_uri=${environment.ONEDRIVE_REDIRECT_URI}`\n window.location.href = link\n }\n\n async openLogoutLink(): Promise {\n const link = `${environment.ONEDRIVE_LOGOUT_LINK}?post_logout_redirect_uri=${environment.ONEDRIVE_REDIRECT_URI}`\n window.location.href = link\n }\n\n getRootFolders(userId: string): Observable {\n return this.http\n .get(`${environment.apiBaseUrl}/onedrive/items/user/${userId}`)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n listFolderItems(\n userId: string,\n driveId: string,\n itemId: string,\n ): Observable {\n return this.http\n .get(\n `${environment.apiBaseUrl}/onedrive/drive/${driveId}/item/${itemId}/children/user/${userId}`,\n )\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n // downloadItem(itemId: string): Observable {\n // return this.http\n // .get(`${environment.apiBaseUrl}/onedrive/drive/${driveId}/item/${itemId}/children/user/${userId}`)\n // .pipe(catchError(this.handleError.bind(this)))\n // }\n\n getAccessToken(): Observable {\n if (!this.currentUser.profile._id) {\n this.appStateService.refreshAppState()\n }\n const body = {\n authCode: this.authCode,\n userId: this.currentUser.profile._id || '',\n }\n return this.http\n .post(`${environment.apiBaseUrl}/onedrive/gettoken`, body)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getOneDriveUserProfile(): Observable {\n return this.http\n .get(\n `${environment.apiBaseUrl}/onedrive/user/${this.currentUser.profile._id}`,\n )\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getSharedItems(): Observable {\n return this.http\n .get(\n `${environment.apiBaseUrl}/onedrive/shared/user/${this.currentUser.profile._id}`,\n )\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n searchItems(driveId: string, query: string): Observable {\n return this.http\n .get(\n `${environment.apiBaseUrl}/onedrive/drive/${driveId}/user/${this.currentUser.profile._id}/search?param=${query}`,\n )\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n createFolder(input: OneDriveCreateFolderInput): Observable {\n const body = {\n userId: this.currentUser.profile._id,\n folderName: input.folderName,\n parentFolderId: input.parentFolderId,\n isRoot: input.isRoot,\n }\n return this.http\n .post(`${environment.apiBaseUrl}/onedrive/folder`, body)\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n uploadFileToOneDrive(\n parentId: string,\n content: FormData,\n ): Observable {\n return this.http\n .post(\n `${environment.apiBaseUrl}/onedrive/parent/${parentId}/user/${this.currentUser.profile._id}/upload`,\n content,\n )\n .pipe(catchError(this.handleError.bind(this)))\n }\n\n getIntegrationStatus(): IntegrationStatus {\n return this.integrationStatus\n }\n\n setIntegrationStatus(status: IntegrationStatus): void {\n this.integrationStatus = status\n }\n\n setErrorText(errorText: string): void {\n this.$errorMessage.next(errorText)\n }\n\n getAuthCode(): string {\n return this.authCode\n }\n\n setAuthCode(code: string): void {\n this.authCode = code\n }\n\n handleError(error: HttpErrorResponse) {\n const x = error.error.description ?? 'No message available'\n this.setErrorText(x)\n if (error.status === 500) {\n console.error('Server error: ', error.error)\n } else {\n console.error(`Error code: ${error.status}, message: `, error.error)\n }\n return throwError(() => new Error(`${error}`))\n }\n}\n"],"names":["ZoomService","constructor","http","appStateService","authCode","integrationStatus","$errorMessage","BehaviorSubject","currentUser$","getUserState","pipe","tap","user","currentUser","profile","integrations","zoom","hasOwnProperty","subscribe","openOAuthLInk","__async","link","environment","ZOOM_OAUTH_AUTHORIZE_LINK","ZOOM_APP_CLIEND_ID","ZOOM_REDIRECT_URI","window","location","href","getAccessToken","_id","refreshAppState","body","userId","post","apiBaseUrl","catchError","handleError","bind","getZoomUserProfile","get","getIntegrationStatus","setIntegrationStatus","status","getAuthCode","setAuthCode","code","resetAuthCode","scheduleMeeting","meetingData","__spreadValues","updateMeeting","id","put","getMeetingById","meetingId","getUserScheduledMeetings","deleteMeetingById","delete","getZakToken","getErrorNotification","asObservable","setErrorText","errorText","next","error","x","description","console","throwError","Error","ɵɵinject","HttpClient","AppStateService","factory","ɵfac","DeviceService","constructor","http","userDevices","BehaviorSubject","loadUserDevices","pipe","take","subscribe","getUserDevices","asObservable","claimDevice","code","description","body","post","environment","apiBaseUrl","switchMap","x","getDeviceById","id","get","removeDeviceFromUser","deviceId","patch","suspendDevice","restoreDevice","attachWallToDevice","wallId","wall","detachWallFromDevice","tap","devices","next","catchError","err","ɵɵinject","HttpClient","factory","ɵfac","ContentService","constructor","http","uploadFile","eventId","content","post","environment","apiBaseUrl","uploadInworldModelFile","upload","filename","encodeURIComponent","importFromDrive","file","__spreadValues","source","importFromOneDrive","uploadToCache","contentToCache","getYouTubeVideoData","videoId","options","params","id","part","key","YOUTUBE_API_KEY","fields","get","YOUTUBE_API_URL","searchYouTubeVideo","keyword","nextPageToken","q","type","maxResults","pageToken","YOUTUBE_API_SEARCH_URL","ɵɵinject","HttpClient","factory","ɵfac","OneDriveService","constructor","http","appStateService","authCode","integrationStatus","$errorMessage","BehaviorSubject","currentUser$","getUserState","subscribe","user","currentUser","profile","integrations","onedrive","hasOwnProperty","openOAuthLink","__async","link","environment","ONEDRIVE_OAUTH_AUTHORIZE_LINK","ONEDRIVE_APPLICATION_ID","ONEDRIVE_REDIRECT_URI","window","location","href","openLogoutLink","ONEDRIVE_LOGOUT_LINK","getRootFolders","userId","get","apiBaseUrl","pipe","catchError","handleError","bind","listFolderItems","driveId","itemId","getAccessToken","_id","refreshAppState","body","post","getOneDriveUserProfile","getSharedItems","searchItems","query","createFolder","input","folderName","parentFolderId","isRoot","uploadFileToOneDrive","parentId","content","getIntegrationStatus","setIntegrationStatus","status","setErrorText","errorText","next","getAuthCode","setAuthCode","code","error","x","description","console","throwError","Error","ɵɵinject","HttpClient","AppStateService","factory","ɵfac"],"m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