Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from rewe-digital-incubator/feature/get_more_us…
Browse files Browse the repository at this point in the history
…er_data

Add userVerifiedStatus
  • Loading branch information
rekire authored Sep 13, 2019
2 parents 0973a07 + 2da4819 commit 8907827
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 27 deletions.
4 changes: 2 additions & 2 deletions alexa-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ version rootProject.ext.versions.alexa
description 'The Alexa plugin for Dialog to write voice applications for Dialogflow and Alexa.'

dependencies {
implementation project(":core")
implementation project(path: ":core", configuration: 'default')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "com.amazon.alexa:ask-sdk-core:2.19.0"
implementation "com.amazon.alexa:ask-sdk-core:2.21.0"
}

dokka {
Expand Down
10 changes: 5 additions & 5 deletions alexa-spring-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ buildscript {
}

dependencies {
implementation project(':core')
implementation project(':alexa-plugin')
implementation project(':spring-plugin')
implementation project(path: ':core', configuration: 'default')
implementation project(path: ':alexa-plugin', configuration: 'default')
implementation project(path: ':spring-plugin', configuration: 'default')

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.springframework:spring-context:5.1.8.RELEASE'
implementation 'com.amazon.alexa:ask-sdk-core:2.19.0'
implementation 'org.springframework:spring-context:5.1.9.RELEASE'
implementation 'com.amazon.alexa:ask-sdk-core:2.21.0'
}

task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.github.ben-manes.versions'

buildscript {
ext.versions = [:]
ext.versions.kotlin = '1.3.41'
ext.versions.kotlin = '1.3.50'
ext.versions.dokka = '0.9.18'
ext.versions.core = '1.0.3'
ext.versions.alexa = '1.0.1'
Expand All @@ -19,7 +19,7 @@ buildscript {
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.21.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.25.0'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}"
classpath 'com.novoda:bintray-release:SNAPSHOT-13'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DialogflowHandler(private val webhookRequest: WebhookRequest) {

/**
* The stored user data aka user storage.
* @see https://developers.google.com/actions/assistant/save-data#json
* @see <a href="https://developers.google.com/actions/assistant/save-data#json">Assistant documentation</a>
*/
val userData: MutableMap<String, Any?> = run {
val userData = webhookRequest.originalDetectIntentRequest?.payload?.user?.userStorage
Expand Down Expand Up @@ -97,6 +97,14 @@ class DialogflowHandler(private val webhookRequest: WebhookRequest) {
val accessToken: String?
get() = webhookRequest.originalDetectIntentRequest?.payload?.user?.accessToken

/**
* True if the userVerificationStatus is VERIFIED
* False if the userVerificationStatus is GUEST or null
* @see <a href="https://developers.google.com/actions/assistant/save-data#determining_and_handling_user_verification_status">Assistant documentation</a>
*/
val isUserVerified: Boolean
get() = webhookRequest.originalDetectIntentRequest?.payload?.user?.userVerificationStatus == "VERIFIED"

/**
* Returns an [DialogflowResponseBuilder] which can be used to construct a complete webhook response
* containing speech and visual components.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ data class User(
val permissions: List<Permissions>?,
val locale: String?,
val lastSeen: String?,
var userStorage: String?
var userStorage: String?,
val userVerificationStatus: String?
) {
data class Profile(
val displayName: String?,
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
4 changes: 2 additions & 2 deletions konversation-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ version rootProject.ext.versions.konversation_plugin
description 'This is the Konversation plugin for Dialog to write voice applications fast.'

dependencies {
implementation project(":core")
implementation project(path: ":core", configuration: 'default')

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile 'org.rewedigital.voice:konversation:1.0-rc1'
compile 'org.rewedigital.voice:konversation:1.0.1'
}

task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
Expand Down
4 changes: 2 additions & 2 deletions spring-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ version rootProject.ext.versions.spring_plugin
description 'This is the Spring plugin from Dialog to write voice applications fast.'

dependencies {
implementation project(':core')
implementation project(path: ':core', configuration: 'default')

implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.springframework:spring-context:5.1.8.RELEASE'
implementation 'org.springframework:spring-context:5.1.9.RELEASE'
}

dokka {
Expand Down
18 changes: 9 additions & 9 deletions spring-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version '1.0.0-SNAPSHOT'

buildscript {
ext {
springBootVersion = '2.1.6.RELEASE'
springBootVersion = '2.1.8.RELEASE'
}
repositories {
jcenter()
Expand Down Expand Up @@ -35,15 +35,15 @@ compileTestKotlin {
}

dependencies {
def askSdkVersion = '2.19.0'
def askSdkVersion = '2.21.0'

implementation project(':core')
implementation project(':ssml-builder')
implementation project(':ssml-plugin')
implementation project(':spring-plugin')
implementation project(':konversation-plugin')
implementation project(':alexa-plugin')
implementation project(':alexa-spring-plugin')
implementation project(path: ':core', configuration: 'default')
implementation project(path: ':ssml-builder', configuration: 'default')
implementation project(path: ':ssml-plugin', configuration: 'default')
implementation project(path: ':spring-plugin', configuration: 'default')
implementation project(path: ':konversation-plugin', configuration: 'default')
implementation project(path: ':alexa-plugin', configuration: 'default')
implementation project(path: ':alexa-spring-plugin', configuration: 'default')

implementation('org.springframework.boot:spring-boot-starter-web')
implementation('com.fasterxml.jackson.module:jackson-module-kotlin')
Expand Down
4 changes: 2 additions & 2 deletions ssml-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ apply from: '../docu.gradle'

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation project(':core')
implementation project(':ssml-builder')
implementation project(path: ':core', configuration: 'default')
implementation project(path: ':ssml-builder', configuration: 'default')
}

dokka {
Expand Down

0 comments on commit 8907827

Please sign in to comment.