Skip to content

Commit 5a7b1ba

Browse files
authored
Release 1.14.0. For changelog, check CHANGELOG.rst
1 parent 9a29b6b commit 5a7b1ba

12 files changed

+669
-11
lines changed

ask-smapi-model/CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,10 @@ This release contains the following changes :
215215
This release contains the following changes :
216216

217217
- Updating model definitions for maxResults and simulationType.
218+
219+
1.14.0
220+
^^^^^^
221+
222+
This release contains the following changes :
223+
224+
- Updating model definitions for `App link interfaces <https://developer.amazon.com/en-US/docs/alexa/alexa-for-apps/skill-manifest-reference.html>`__.

ask-smapi-model/ask_smapi_model/__version__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
__pip_package_name__ = 'ask-smapi-model'
1515
__description__ = 'The SMAPI SDK Model package provides model definitions for making Skill Management API calls.'
1616
__url__ = 'https://github.com/alexa/alexa-apis-for-python'
17-
__version__ = '1.13.1'
17+
__version__ = '1.14.0'
1818
__author__ = 'Alexa Skills Kit'
1919
__author_email__ = '[email protected]'
2020
__license__ = 'Apache 2.0'
21-
__keywords__ = ['SMAPI SDK', 'ASK SDK', 'Alexa Skills Kit', 'Alexa', 'Models', 'Smapi']
22-
21+
__keywords__ = ['SMAPI SDK', 'ASK SDK', 'Alexa Skills Kit', 'Alexa', 'Models', 'Smapi']

ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,17 @@
6666
from .app_link_interface import AppLinkInterface
6767
from .catalog_type import CatalogType
6868
from .video_fire_tv_catalog_ingestion import VideoFireTvCatalogIngestion
69+
from .linked_common_schemes import LinkedCommonSchemes
6970
from .amazon_conversations_dialog_manager import AMAZONConversationsDialogManager
7071
from .flash_briefing_genre import FlashBriefingGenre
7172
from .app_link_v2_interface import AppLinkV2Interface
73+
from .linked_android_common_intent import LinkedAndroidCommonIntent
7274
from .alexa_presentation_html_interface import AlexaPresentationHtmlInterface
7375
from .subscription_payment_frequency import SubscriptionPaymentFrequency
7476
from .video_apis_locale import VideoApisLocale
7577
from .alexa_for_business_interface_request_name import AlexaForBusinessInterfaceRequestName
7678
from .paid_skill_information import PaidSkillInformation
79+
from .android_custom_intent import AndroidCustomIntent
7780
from .ssl_certificate_type import SSLCertificateType
7881
from .music_request import MusicRequest
7982
from .video_catalog_info import VideoCatalogInfo
@@ -91,6 +94,7 @@
9194
from .offer_type import OfferType
9295
from .alexa_for_business_interface_request import AlexaForBusinessInterfaceRequest
9396
from .friendly_name import FriendlyName
97+
from .ios_app_store_common_scheme_name import IOSAppStoreCommonSchemeName
9498
from .health_interface import HealthInterface
9599
from .authorized_client import AuthorizedClient
96100
from .permission_items import PermissionItems
@@ -103,10 +107,12 @@
103107
from .locales_by_automatic_cloned_locale import LocalesByAutomaticClonedLocale
104108
from .custom_localized_information_dialog_management import CustomLocalizedInformationDialogManagement
105109
from .authorized_client_lwa import AuthorizedClientLwa
110+
from .play_store_common_scheme_name import PlayStoreCommonSchemeName
106111
from .event_name_type import EventNameType
107112
from .video_prompt_name_type import VideoPromptNameType
108113
from .voice_profile_feature import VoiceProfileFeature
109114
from .tax_information_category import TaxInformationCategory
115+
from .catalog_name import CatalogName
110116
from .smart_home_apis import SmartHomeApis
111117
from .currency import Currency
112118
from .flash_briefing_apis import FlashBriefingApis
@@ -130,3 +136,4 @@
130136
from .video_app_interface import VideoAppInterface
131137
from .video_apis import VideoApis
132138
from .display_interface_template_version import DisplayInterfaceTemplateVersion
139+
from .android_common_intent_name import AndroidCommonIntentName
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional, Union, Any
25+
from datetime import datetime
26+
27+
28+
class AndroidCommonIntentName(Enum):
29+
"""
30+
Supported android common intent. Each of the value maps to a common intent defined in https://developer.android.com/guide/components/intents-common.
31+
32+
33+
34+
Allowed enum values: [SHOW_IN_MAP, ADD_CALENDAR_EVENT, PLAY_MEDIA, START_PHONE_CALL, OPEN_SETTINGS]
35+
"""
36+
SHOW_IN_MAP = "SHOW_IN_MAP"
37+
ADD_CALENDAR_EVENT = "ADD_CALENDAR_EVENT"
38+
PLAY_MEDIA = "PLAY_MEDIA"
39+
START_PHONE_CALL = "START_PHONE_CALL"
40+
OPEN_SETTINGS = "OPEN_SETTINGS"
41+
42+
def to_dict(self):
43+
# type: () -> Dict[str, Any]
44+
"""Returns the model properties as a dict"""
45+
result = {self.name: self.value}
46+
return result
47+
48+
def to_str(self):
49+
# type: () -> str
50+
"""Returns the string representation of the model"""
51+
return pprint.pformat(self.value)
52+
53+
def __repr__(self):
54+
# type: () -> str
55+
"""For `print` and `pprint`"""
56+
return self.to_str()
57+
58+
def __eq__(self, other):
59+
# type: (Any) -> bool
60+
"""Returns true if both objects are equal"""
61+
if not isinstance(other, AndroidCommonIntentName):
62+
return False
63+
64+
return self.__dict__ == other.__dict__
65+
66+
def __ne__(self, other):
67+
# type: (Any) -> bool
68+
"""Returns true if both objects are not equal"""
69+
return not self == other
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional, Union, Any
25+
from datetime import datetime
26+
27+
28+
class AndroidCustomIntent(object):
29+
"""
30+
Android custom intent
31+
32+
33+
:param component: android component name
34+
:type component: (optional) str
35+
:param action: android intent action
36+
:type action: (optional) str
37+
38+
"""
39+
deserialized_types = {
40+
'component': 'str',
41+
'action': 'str'
42+
} # type: Dict
43+
44+
attribute_map = {
45+
'component': 'component',
46+
'action': 'action'
47+
} # type: Dict
48+
supports_multiple_types = False
49+
50+
def __init__(self, component=None, action=None):
51+
# type: (Optional[str], Optional[str]) -> None
52+
"""Android custom intent
53+
54+
:param component: android component name
55+
:type component: (optional) str
56+
:param action: android intent action
57+
:type action: (optional) str
58+
"""
59+
self.__discriminator_value = None # type: str
60+
61+
self.component = component
62+
self.action = action
63+
64+
def to_dict(self):
65+
# type: () -> Dict[str, object]
66+
"""Returns the model properties as a dict"""
67+
result = {} # type: Dict
68+
69+
for attr, _ in six.iteritems(self.deserialized_types):
70+
value = getattr(self, attr)
71+
if isinstance(value, list):
72+
result[attr] = list(map(
73+
lambda x: x.to_dict() if hasattr(x, "to_dict") else
74+
x.value if isinstance(x, Enum) else x,
75+
value
76+
))
77+
elif isinstance(value, Enum):
78+
result[attr] = value.value
79+
elif hasattr(value, "to_dict"):
80+
result[attr] = value.to_dict()
81+
elif isinstance(value, dict):
82+
result[attr] = dict(map(
83+
lambda item: (item[0], item[1].to_dict())
84+
if hasattr(item[1], "to_dict") else
85+
(item[0], item[1].value)
86+
if isinstance(item[1], Enum) else item,
87+
value.items()
88+
))
89+
else:
90+
result[attr] = value
91+
92+
return result
93+
94+
def to_str(self):
95+
# type: () -> str
96+
"""Returns the string representation of the model"""
97+
return pprint.pformat(self.to_dict())
98+
99+
def __repr__(self):
100+
# type: () -> str
101+
"""For `print` and `pprint`"""
102+
return self.to_str()
103+
104+
def __eq__(self, other):
105+
# type: (object) -> bool
106+
"""Returns true if both objects are equal"""
107+
if not isinstance(other, AndroidCustomIntent):
108+
return False
109+
110+
return self.__dict__ == other.__dict__
111+
112+
def __ne__(self, other):
113+
# type: (object) -> bool
114+
"""Returns true if both objects are not equal"""
115+
return not self == other

ask-smapi-model/ask_smapi_model/v1/skill/manifest/app_link.py

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
if typing.TYPE_CHECKING:
2424
from typing import Dict, List, Optional, Union, Any
2525
from datetime import datetime
26+
from ask_smapi_model.v1.skill.manifest.linked_android_common_intent import LinkedAndroidCommonIntent as LinkedAndroidCommonIntent_f1721a22
27+
from ask_smapi_model.v1.skill.manifest.linked_common_schemes import LinkedCommonSchemes as LinkedCommonSchemes_14e98c23
2628
from ask_smapi_model.v1.skill.manifest.linked_application import LinkedApplication as LinkedApplication_85efe66c
2729

2830

@@ -33,27 +35,48 @@ class AppLink(object):
3335
3436
:param linked_applications: Allows developers to declare their Skill will use Alexa App Links, and list relevant apps. This field is required when using the APP_LINK interface.
3537
:type linked_applications: (optional) list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication]
38+
:param linked_web_domains: Allow developer to decalre their skill to link to the declared web domains.
39+
:type linked_web_domains: (optional) list[str]
40+
:param linked_android_common_intents: Allow developer to declare their skill to link to the speicified android common intents.
41+
:type linked_android_common_intents: (optional) list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent]
42+
:param linked_common_schemes:
43+
:type linked_common_schemes: (optional) ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes
3644
3745
"""
3846
deserialized_types = {
39-
'linked_applications': 'list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication]'
47+
'linked_applications': 'list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication]',
48+
'linked_web_domains': 'list[str]',
49+
'linked_android_common_intents': 'list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent]',
50+
'linked_common_schemes': 'ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes'
4051
} # type: Dict
4152

4253
attribute_map = {
43-
'linked_applications': 'linkedApplications'
54+
'linked_applications': 'linkedApplications',
55+
'linked_web_domains': 'linkedWebDomains',
56+
'linked_android_common_intents': 'linkedAndroidCommonIntents',
57+
'linked_common_schemes': 'linkedCommonSchemes'
4458
} # type: Dict
4559
supports_multiple_types = False
4660

47-
def __init__(self, linked_applications=None):
48-
# type: (Optional[List[LinkedApplication_85efe66c]]) -> None
61+
def __init__(self, linked_applications=None, linked_web_domains=None, linked_android_common_intents=None, linked_common_schemes=None):
62+
# type: (Optional[List[LinkedApplication_85efe66c]], Optional[List[object]], Optional[List[LinkedAndroidCommonIntent_f1721a22]], Optional[LinkedCommonSchemes_14e98c23]) -> None
4963
"""Details required for app linking use cases.
5064
5165
:param linked_applications: Allows developers to declare their Skill will use Alexa App Links, and list relevant apps. This field is required when using the APP_LINK interface.
5266
:type linked_applications: (optional) list[ask_smapi_model.v1.skill.manifest.linked_application.LinkedApplication]
67+
:param linked_web_domains: Allow developer to decalre their skill to link to the declared web domains.
68+
:type linked_web_domains: (optional) list[str]
69+
:param linked_android_common_intents: Allow developer to declare their skill to link to the speicified android common intents.
70+
:type linked_android_common_intents: (optional) list[ask_smapi_model.v1.skill.manifest.linked_android_common_intent.LinkedAndroidCommonIntent]
71+
:param linked_common_schemes:
72+
:type linked_common_schemes: (optional) ask_smapi_model.v1.skill.manifest.linked_common_schemes.LinkedCommonSchemes
5373
"""
5474
self.__discriminator_value = None # type: str
5575

5676
self.linked_applications = linked_applications
77+
self.linked_web_domains = linked_web_domains
78+
self.linked_android_common_intents = linked_android_common_intents
79+
self.linked_common_schemes = linked_common_schemes
5780

5881
def to_dict(self):
5982
# type: () -> Dict[str, object]
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# coding: utf-8
2+
3+
#
4+
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
7+
# except in compliance with the License. A copy of the License is located at
8+
#
9+
# http://aws.amazon.com/apache2.0/
10+
#
11+
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
13+
# the specific language governing permissions and limitations under the License.
14+
#
15+
16+
import pprint
17+
import re # noqa: F401
18+
import six
19+
import typing
20+
from enum import Enum
21+
22+
23+
if typing.TYPE_CHECKING:
24+
from typing import Dict, List, Optional, Union, Any
25+
from datetime import datetime
26+
27+
28+
class CatalogName(Enum):
29+
"""
30+
31+
32+
Allowed enum values: [IOS_APP_STORE, GOOGLE_PLAY_STORE]
33+
"""
34+
IOS_APP_STORE = "IOS_APP_STORE"
35+
GOOGLE_PLAY_STORE = "GOOGLE_PLAY_STORE"
36+
37+
def to_dict(self):
38+
# type: () -> Dict[str, Any]
39+
"""Returns the model properties as a dict"""
40+
result = {self.name: self.value}
41+
return result
42+
43+
def to_str(self):
44+
# type: () -> str
45+
"""Returns the string representation of the model"""
46+
return pprint.pformat(self.value)
47+
48+
def __repr__(self):
49+
# type: () -> str
50+
"""For `print` and `pprint`"""
51+
return self.to_str()
52+
53+
def __eq__(self, other):
54+
# type: (Any) -> bool
55+
"""Returns true if both objects are equal"""
56+
if not isinstance(other, CatalogName):
57+
return False
58+
59+
return self.__dict__ == other.__dict__
60+
61+
def __ne__(self, other):
62+
# type: (Any) -> bool
63+
"""Returns true if both objects are not equal"""
64+
return not self == other

0 commit comments

Comments
 (0)