Skip to content

Commit

Permalink
Release 1.30.0. For changelog, check CHANGELOG.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
ask-pyth committed Apr 1, 2021
1 parent c1910c1 commit 492d7e2
Show file tree
Hide file tree
Showing 26 changed files with 896 additions and 59 deletions.
10 changes: 10 additions & 0 deletions ask-sdk-model/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,3 +371,13 @@ This release contains the following changes :

This release contains the following changes :
- APL for Audio now sends RuntimeError requests that notify developer of any errors that happened during APLA processing.


1.30.0
~~~~~~

This release contains the following changes :

- Add support for APL 1.6 version. More information about the newest version can be found `here <https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-latest-version.html>`__.


2 changes: 1 addition & 1 deletion ask-sdk-model/ask_sdk_model/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__pip_package_name__ = 'ask-sdk-model'
__description__ = 'The ASK SDK Model package provides model definitions, for building Alexa Skills.'
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
__version__ = '1.29.0'
__version__ = '1.30.0'
__author__ = 'Alexa Skills Kit'
__author_email__ = 'ask-sdk-dynamic@amazon.com'
__license__ = 'Apache 2.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@
from .component_visible_on_screen_media_tag import ComponentVisibleOnScreenMediaTag
from .transform_property import TransformProperty
from .send_index_list_data_directive import SendIndexListDataDirective
from .select_command import SelectCommand
from .align import Align
from .highlight_mode import HighlightMode
from .sequential_command import SequentialCommand
from .runtime import Runtime
from .execute_commands_directive import ExecuteCommandsDirective
from .component_visible_on_screen_scrollable_tag import ComponentVisibleOnScreenScrollableTag
from .move_transform_property import MoveTransformProperty
from .finish_command import FinishCommand
from .clear_focus_command import ClearFocusCommand
from .component_entity import ComponentEntity
from .command import Command
Expand All @@ -64,10 +66,12 @@
from .send_event_command import SendEventCommand
from .component_visible_on_screen_tags import ComponentVisibleOnScreenTags
from .alexa_presentation_apl_interface import AlexaPresentationAplInterface
from .reinflate_command import ReinflateCommand
from .component_visible_on_screen_viewport_tag import ComponentVisibleOnScreenViewportTag
from .set_state_command import SetStateCommand
from .rotate_transform_property import RotateTransformProperty
from .scroll_to_index_command import ScrollToIndexCommand
from .scroll_to_component_command import ScrollToComponentCommand
from .speak_list_command import SpeakListCommand
from .media_command_type import MediaCommandType
from .rendered_document_state import RenderedDocumentState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class AnimateItemCommand(Command):
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
:param component_id: The ID of the animated component.
Expand All @@ -57,6 +61,8 @@ class AnimateItemCommand(Command):
'object_type': 'str',
'delay': 'int',
'description': 'str',
'screen_lock': 'bool',
'sequencer': 'str',
'when': 'bool',
'component_id': 'str',
'duration': 'int',
Expand All @@ -70,6 +76,8 @@ class AnimateItemCommand(Command):
'object_type': 'type',
'delay': 'delay',
'description': 'description',
'screen_lock': 'screenLock',
'sequencer': 'sequencer',
'when': 'when',
'component_id': 'componentId',
'duration': 'duration',
Expand All @@ -80,14 +88,18 @@ class AnimateItemCommand(Command):
} # type: Dict
supports_multiple_types = False

def __init__(self, delay=None, description=None, when=None, component_id=None, duration=None, easing='linear', repeat_count=None, repeat_mode=None, value=None):
# type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Optional[str], Union[int, str, None], Optional[AnimateItemRepeatMode_22d93893], Optional[List[AnimatedProperty_b438632b]]) -> None
def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, duration=None, easing='linear', repeat_count=None, repeat_mode=None, value=None):
# type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Optional[str], Union[int, str, None], Optional[AnimateItemRepeatMode_22d93893], Optional[List[AnimatedProperty_b438632b]]) -> None
"""Runs a fixed-duration animation sequence on one or more properties of a single component.
:param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0.
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
:param component_id: The ID of the animated component.
Expand All @@ -106,7 +118,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, d
self.__discriminator_value = "AnimateItem" # type: str

self.object_type = self.__discriminator_value
super(AnimateItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when)
super(AnimateItemCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when)
self.component_id = component_id
self.duration = duration
self.easing = easing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class AutoPageCommand(Command):
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
:param component_id: The id of the Pager component.
Expand All @@ -49,6 +53,8 @@ class AutoPageCommand(Command):
'object_type': 'str',
'delay': 'int',
'description': 'str',
'screen_lock': 'bool',
'sequencer': 'str',
'when': 'bool',
'component_id': 'str',
'count': 'int',
Expand All @@ -59,21 +65,27 @@ class AutoPageCommand(Command):
'object_type': 'type',
'delay': 'delay',
'description': 'description',
'screen_lock': 'screenLock',
'sequencer': 'sequencer',
'when': 'when',
'component_id': 'componentId',
'count': 'count',
'duration': 'duration'
} # type: Dict
supports_multiple_types = False

def __init__(self, delay=None, description=None, when=None, component_id=None, count=None, duration=None):
# type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Union[int, str, None]) -> None
def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None, component_id=None, count=None, duration=None):
# type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool], Optional[str], Union[int, str, None], Union[int, str, None]) -> None
"""Automatically progress through a series of pages displayed in a Pager component. The AutoPage command finishes after the last page has been displayed for the requested time period.
:param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0.
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
:param component_id: The id of the Pager component.
Expand All @@ -86,7 +98,7 @@ def __init__(self, delay=None, description=None, when=None, component_id=None, c
self.__discriminator_value = "AutoPage" # type: str

self.object_type = self.__discriminator_value
super(AutoPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when)
super(AutoPageCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when)
self.component_id = component_id
self.count = count
self.duration = duration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class ClearFocusCommand(Command):
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
Expand All @@ -43,32 +47,40 @@ class ClearFocusCommand(Command):
'object_type': 'str',
'delay': 'int',
'description': 'str',
'screen_lock': 'bool',
'sequencer': 'str',
'when': 'bool'
} # type: Dict

attribute_map = {
'object_type': 'type',
'delay': 'delay',
'description': 'description',
'screen_lock': 'screenLock',
'sequencer': 'sequencer',
'when': 'when'
} # type: Dict
supports_multiple_types = False

def __init__(self, delay=None, description=None, when=None):
# type: (Union[int, str, None], Optional[str], Optional[bool]) -> None
def __init__(self, delay=None, description=None, screen_lock=None, sequencer=None, when=None):
# type: (Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None
"""Removes focus from the component that is currently in focus.
:param delay: The delay in milliseconds before this command starts executing; must be non-negative. Defaults to 0.
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
"""
self.__discriminator_value = "ClearFocus" # type: str

self.object_type = self.__discriminator_value
super(ClearFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, when=when)
super(ClearFocusCommand, self).__init__(object_type=self.__discriminator_value, delay=delay, description=description, screen_lock=screen_lock, sequencer=sequencer, when=when)

def to_dict(self):
# type: () -> Dict[str, object]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class Command(object):
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
Expand All @@ -49,6 +53,8 @@ class Command(object):
|
| ControlMedia: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.control_media_command.ControlMediaCommand`,
|
| Finish: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.finish_command.FinishCommand`,
|
| AutoPage: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.auto_page_command.AutoPageCommand`,
|
| PlayMedia: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.play_media_command.PlayMediaCommand`,
Expand All @@ -63,6 +69,8 @@ class Command(object):
|
| SpeakList: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.speak_list_command.SpeakListCommand`,
|
| Select: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.select_command.SelectCommand`,
|
| Sequential: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.sequential_command.SequentialCommand`,
|
| SetState: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_state_command.SetStateCommand`,
Expand All @@ -73,58 +81,70 @@ class Command(object):
|
| OpenURL: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.open_url_command.OpenUrlCommand`,
|
| Reinflate: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.reinflate_command.ReinflateCommand`,
|
| ClearFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.clear_focus_command.ClearFocusCommand`,
|
| ScrollToIndex: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_index_command.ScrollToIndexCommand`,
|
| SetValue: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_value_command.SetValueCommand`,
|
| SetFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand`
| SetFocus: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand`,
|
| ScrollToComponent: :py:class:`ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_component_command.ScrollToComponentCommand`
"""
deserialized_types = {
'object_type': 'str',
'delay': 'int',
'description': 'str',
'screen_lock': 'bool',
'sequencer': 'str',
'when': 'bool'
} # type: Dict

attribute_map = {
'object_type': 'type',
'delay': 'delay',
'description': 'description',
'screen_lock': 'screenLock',
'sequencer': 'sequencer',
'when': 'when'
} # type: Dict
supports_multiple_types = False

discriminator_value_class_map = {
'SetPage': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_page_command.SetPageCommand',
'ControlMedia': 'ask_sdk_model.interfaces.alexa.presentation.apl.control_media_command.ControlMediaCommand',
'Finish': 'ask_sdk_model.interfaces.alexa.presentation.apl.finish_command.FinishCommand',
'AutoPage': 'ask_sdk_model.interfaces.alexa.presentation.apl.auto_page_command.AutoPageCommand',
'PlayMedia': 'ask_sdk_model.interfaces.alexa.presentation.apl.play_media_command.PlayMediaCommand',
'Scroll': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_command.ScrollCommand',
'Idle': 'ask_sdk_model.interfaces.alexa.presentation.apl.idle_command.IdleCommand',
'AnimateItem': 'ask_sdk_model.interfaces.alexa.presentation.apl.animate_item_command.AnimateItemCommand',
'SendEvent': 'ask_sdk_model.interfaces.alexa.presentation.apl.send_event_command.SendEventCommand',
'SpeakList': 'ask_sdk_model.interfaces.alexa.presentation.apl.speak_list_command.SpeakListCommand',
'Select': 'ask_sdk_model.interfaces.alexa.presentation.apl.select_command.SelectCommand',
'Sequential': 'ask_sdk_model.interfaces.alexa.presentation.apl.sequential_command.SequentialCommand',
'SetState': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_state_command.SetStateCommand',
'SpeakItem': 'ask_sdk_model.interfaces.alexa.presentation.apl.speak_item_command.SpeakItemCommand',
'Parallel': 'ask_sdk_model.interfaces.alexa.presentation.apl.parallel_command.ParallelCommand',
'OpenURL': 'ask_sdk_model.interfaces.alexa.presentation.apl.open_url_command.OpenUrlCommand',
'Reinflate': 'ask_sdk_model.interfaces.alexa.presentation.apl.reinflate_command.ReinflateCommand',
'ClearFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.clear_focus_command.ClearFocusCommand',
'ScrollToIndex': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_index_command.ScrollToIndexCommand',
'SetValue': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_value_command.SetValueCommand',
'SetFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand'
'SetFocus': 'ask_sdk_model.interfaces.alexa.presentation.apl.set_focus_command.SetFocusCommand',
'ScrollToComponent': 'ask_sdk_model.interfaces.alexa.presentation.apl.scroll_to_component_command.ScrollToComponentCommand'
}

json_discriminator_key = "type"

__metaclass__ = ABCMeta

@abstractmethod
def __init__(self, object_type=None, delay=None, description=None, when=None):
# type: (Optional[str], Union[int, str, None], Optional[str], Optional[bool]) -> None
def __init__(self, object_type=None, delay=None, description=None, screen_lock=None, sequencer=None, when=None):
# type: (Optional[str], Union[int, str, None], Optional[str], Optional[bool], Optional[str], Optional[bool]) -> None
"""A message that can change the visual or audio presentation of the content on the screen.
:param object_type: Defines the command type and dictates which properties must/can be included.
Expand All @@ -133,6 +153,10 @@ def __init__(self, object_type=None, delay=None, description=None, when=None):
:type delay: (optional) int
:param description: A user-provided description of this command.
:type description: (optional) str
:param screen_lock: If true, disable the Interaction Timer.
:type screen_lock: (optional) bool
:param sequencer: Specify the sequencer that should execute this command.
:type sequencer: (optional) str
:param when: If false, the execution of the command is skipped. Defaults to true.
:type when: (optional) bool
"""
Expand All @@ -141,6 +165,8 @@ def __init__(self, object_type=None, delay=None, description=None, when=None):
self.object_type = object_type
self.delay = delay
self.description = description
self.screen_lock = screen_lock
self.sequencer = sequencer
self.when = when

@classmethod
Expand Down
Loading

0 comments on commit 492d7e2

Please sign in to comment.