import { plainToClass } from '@marcj/marshal' ; import { AuthTokenEntity } from '@pimp-my-pr/server/auth/core/domain' ; import { BitbucketAuthResponse } from '../interfaces/bitbucket-auth-response.interface' ; export function mapBitbucketToken ( bitbucketAuthResponse ) { return plainToClass ( AuthTokenEntity , { scope : bitbucketAuthResponse . scopes , token : bitbucketAuthResponse . access_token , type : bitbucketAuthResponse . token_type } ) ; }