-
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #1553 from jovotech/v4/dev
🔖 Prepare latest release
- Loading branch information
Showing
10 changed files
with
290 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
platforms/platform-alexa/src/output/templates/AplRenderDocumentOutput.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Output, BaseOutput, OutputTemplate, OutputOptions } from '@jovotech/framework'; | ||
import { AplRenderDocumentDirective } from '../models'; | ||
|
||
interface AplRenderDocumentOutputOptions extends OutputOptions { | ||
document: AplRenderDocumentDirective['document']; | ||
sources?: AplRenderDocumentDirective['sources']; | ||
datasources?: AplRenderDocumentDirective['datasources']; | ||
token?: AplRenderDocumentDirective['token']; | ||
} | ||
|
||
@Output() | ||
export class AplRenderDocumentOutput extends BaseOutput<AplRenderDocumentOutputOptions> { | ||
async build(): Promise<OutputTemplate> { | ||
const aplRenderDocDirective: AplRenderDocumentDirective = { | ||
type: 'Alexa.Presentation.APL.RenderDocument', | ||
document: this.options.document, | ||
datasources: this.options.datasources, | ||
sources: this.options.sources, | ||
token: this.options.token || 'token', | ||
}; | ||
|
||
return { | ||
platforms: { | ||
alexa: { | ||
nativeResponse: { | ||
response: { | ||
directives: [aplRenderDocDirective], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
platforms/platform-alexa/src/output/templates/VideoAppLaunchOutput.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Output, BaseOutput, OutputTemplate, OutputOptions } from '@jovotech/framework'; | ||
import { VideoAppLaunchDirective } from '../models'; | ||
|
||
interface VideoAppLaunchOutputOptions extends OutputOptions { | ||
videoItem: VideoAppLaunchDirective['videoItem']; | ||
} | ||
|
||
@Output() | ||
export class VideoAppLaunchOutput extends BaseOutput<VideoAppLaunchOutputOptions> { | ||
async build(): Promise<OutputTemplate> { | ||
const videoAppLaunchDirective: VideoAppLaunchDirective = { | ||
type: 'VideoApp.Launch', | ||
videoItem: this.options.videoItem, | ||
}; | ||
|
||
return { | ||
platforms: { | ||
alexa: { | ||
nativeResponse: { | ||
response: { | ||
directives: [videoAppLaunchDirective], | ||
// Responses containing a VideoApp.Launch Directive must not have a shouldEndSession parameter | ||
shouldEndSession: undefined, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters