syllable-sdk 0.38.20__py3-none-any.whl → 0.38.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- syllable_sdk/_version.py +2 -2
- syllable_sdk/language_groups.py +59 -20
- syllable_sdk/models/__init__.py +64 -0
- syllable_sdk/models/channelservices.py +1 -0
- syllable_sdk/models/languagegroupcreaterequest.py +2 -2
- syllable_sdk/models/languagegroupproperties.py +1 -1
- syllable_sdk/models/languagegroupresponse.py +6 -6
- syllable_sdk/models/languagegroupupdaterequest.py +2 -2
- syllable_sdk/models/languagesamplecreaterequest.py +95 -0
- syllable_sdk/models/listresponse_voicegroupresponse_.py +74 -0
- syllable_sdk/models/organizationchannelconfig.py +18 -2
- syllable_sdk/models/voice_groups_deleteop.py +21 -0
- syllable_sdk/models/voice_groups_get_by_idop.py +16 -0
- syllable_sdk/models/voice_groups_listop.py +140 -0
- syllable_sdk/models/voicegroupcreaterequest.py +73 -0
- syllable_sdk/models/voicegroupproperties.py +14 -0
- syllable_sdk/models/voicegroupresponse.py +111 -0
- syllable_sdk/models/voicegroupupdaterequest.py +83 -0
- syllable_sdk/sdk.py +3 -0
- syllable_sdk/voice_groups.py +1174 -0
- {syllable_sdk-0.38.20.dist-info → syllable_sdk-0.38.22.dist-info}/METADATA +17 -8
- {syllable_sdk-0.38.20.dist-info → syllable_sdk-0.38.22.dist-info}/RECORD +23 -13
- {syllable_sdk-0.38.20.dist-info → syllable_sdk-0.38.22.dist-info}/WHEEL +0 -0
|
@@ -13,6 +13,7 @@ from syllable_sdk.types import (
|
|
|
13
13
|
UNSET,
|
|
14
14
|
UNSET_SENTINEL,
|
|
15
15
|
)
|
|
16
|
+
from typing import Dict
|
|
16
17
|
from typing_extensions import NotRequired, TypedDict
|
|
17
18
|
|
|
18
19
|
|
|
@@ -23,6 +24,8 @@ class OrganizationChannelConfigTypedDict(TypedDict):
|
|
|
23
24
|
r"""SID of the Twilio account"""
|
|
24
25
|
auth_token: NotRequired[Nullable[str]]
|
|
25
26
|
r"""The Twilio auth token"""
|
|
27
|
+
provider_credentials: NotRequired[Nullable[Dict[str, str]]]
|
|
28
|
+
r"""Provider-specific credentials. Initially to be used for AfricasTalking creds.In a future this would be used for Twilio creds too (removing the account_sid and auth_token fields)."""
|
|
26
29
|
telephony: NotRequired[Nullable[TelephonyConfigurationsTypedDict]]
|
|
27
30
|
r"""Telephony configurations to be applied to the targets under the channel"""
|
|
28
31
|
|
|
@@ -36,13 +39,26 @@ class OrganizationChannelConfig(BaseModel):
|
|
|
36
39
|
auth_token: OptionalNullable[str] = UNSET
|
|
37
40
|
r"""The Twilio auth token"""
|
|
38
41
|
|
|
42
|
+
provider_credentials: OptionalNullable[Dict[str, str]] = UNSET
|
|
43
|
+
r"""Provider-specific credentials. Initially to be used for AfricasTalking creds.In a future this would be used for Twilio creds too (removing the account_sid and auth_token fields)."""
|
|
44
|
+
|
|
39
45
|
telephony: OptionalNullable[TelephonyConfigurations] = UNSET
|
|
40
46
|
r"""Telephony configurations to be applied to the targets under the channel"""
|
|
41
47
|
|
|
42
48
|
@model_serializer(mode="wrap")
|
|
43
49
|
def serialize_model(self, handler):
|
|
44
|
-
optional_fields = [
|
|
45
|
-
|
|
50
|
+
optional_fields = [
|
|
51
|
+
"account_sid",
|
|
52
|
+
"auth_token",
|
|
53
|
+
"provider_credentials",
|
|
54
|
+
"telephony",
|
|
55
|
+
]
|
|
56
|
+
nullable_fields = [
|
|
57
|
+
"account_sid",
|
|
58
|
+
"auth_token",
|
|
59
|
+
"provider_credentials",
|
|
60
|
+
"telephony",
|
|
61
|
+
]
|
|
46
62
|
null_default_fields = []
|
|
47
63
|
|
|
48
64
|
serialized = handler(self)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from syllable_sdk.types import BaseModel
|
|
5
|
+
from syllable_sdk.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class VoiceGroupsDeleteRequestTypedDict(TypedDict):
|
|
10
|
+
voice_group_id: int
|
|
11
|
+
reason: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class VoiceGroupsDeleteRequest(BaseModel):
|
|
15
|
+
voice_group_id: Annotated[
|
|
16
|
+
int, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
reason: Annotated[
|
|
20
|
+
str, FieldMetadata(query=QueryParamMetadata(style="form", explode=True))
|
|
21
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from syllable_sdk.types import BaseModel
|
|
5
|
+
from syllable_sdk.utils import FieldMetadata, PathParamMetadata
|
|
6
|
+
from typing_extensions import Annotated, TypedDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class VoiceGroupsGetByIDRequestTypedDict(TypedDict):
|
|
10
|
+
voice_group_id: int
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class VoiceGroupsGetByIDRequest(BaseModel):
|
|
14
|
+
voice_group_id: Annotated[
|
|
15
|
+
int, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
|
|
16
|
+
]
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .orderbydirection import OrderByDirection
|
|
5
|
+
from .voicegroupproperties import VoiceGroupProperties
|
|
6
|
+
from pydantic import model_serializer
|
|
7
|
+
from syllable_sdk.types import (
|
|
8
|
+
BaseModel,
|
|
9
|
+
Nullable,
|
|
10
|
+
OptionalNullable,
|
|
11
|
+
UNSET,
|
|
12
|
+
UNSET_SENTINEL,
|
|
13
|
+
)
|
|
14
|
+
from syllable_sdk.utils import FieldMetadata, QueryParamMetadata
|
|
15
|
+
from typing import List, Optional
|
|
16
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class VoiceGroupsListRequestTypedDict(TypedDict):
|
|
20
|
+
page: NotRequired[Nullable[int]]
|
|
21
|
+
r"""The page number from which to start (0-based)"""
|
|
22
|
+
limit: NotRequired[int]
|
|
23
|
+
r"""The maximum number of items to return"""
|
|
24
|
+
search_fields: NotRequired[List[VoiceGroupProperties]]
|
|
25
|
+
r"""String names of fields to search. Correspond by index to search field values"""
|
|
26
|
+
search_field_values: NotRequired[List[str]]
|
|
27
|
+
r"""Values of fields to search. Correspond by index to search fields. Unless field name contains \"list\", an individual search field value cannot be a list"""
|
|
28
|
+
order_by: NotRequired[Nullable[VoiceGroupProperties]]
|
|
29
|
+
r"""The field whose value should be used to order the results"""
|
|
30
|
+
order_by_direction: NotRequired[Nullable[OrderByDirection]]
|
|
31
|
+
r"""The direction in which to order the results"""
|
|
32
|
+
fields: NotRequired[Nullable[List[VoiceGroupProperties]]]
|
|
33
|
+
r"""The fields to include in the response"""
|
|
34
|
+
start_datetime: NotRequired[Nullable[str]]
|
|
35
|
+
r"""The start datetime for filtering results"""
|
|
36
|
+
end_datetime: NotRequired[Nullable[str]]
|
|
37
|
+
r"""The end datetime for filtering results"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class VoiceGroupsListRequest(BaseModel):
|
|
41
|
+
page: Annotated[
|
|
42
|
+
OptionalNullable[int],
|
|
43
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
44
|
+
] = UNSET
|
|
45
|
+
r"""The page number from which to start (0-based)"""
|
|
46
|
+
|
|
47
|
+
limit: Annotated[
|
|
48
|
+
Optional[int],
|
|
49
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
50
|
+
] = 25
|
|
51
|
+
r"""The maximum number of items to return"""
|
|
52
|
+
|
|
53
|
+
search_fields: Annotated[
|
|
54
|
+
Optional[List[VoiceGroupProperties]],
|
|
55
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
56
|
+
] = None
|
|
57
|
+
r"""String names of fields to search. Correspond by index to search field values"""
|
|
58
|
+
|
|
59
|
+
search_field_values: Annotated[
|
|
60
|
+
Optional[List[str]],
|
|
61
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
62
|
+
] = None
|
|
63
|
+
r"""Values of fields to search. Correspond by index to search fields. Unless field name contains \"list\", an individual search field value cannot be a list"""
|
|
64
|
+
|
|
65
|
+
order_by: Annotated[
|
|
66
|
+
OptionalNullable[VoiceGroupProperties],
|
|
67
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
68
|
+
] = UNSET
|
|
69
|
+
r"""The field whose value should be used to order the results"""
|
|
70
|
+
|
|
71
|
+
order_by_direction: Annotated[
|
|
72
|
+
OptionalNullable[OrderByDirection],
|
|
73
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
74
|
+
] = UNSET
|
|
75
|
+
r"""The direction in which to order the results"""
|
|
76
|
+
|
|
77
|
+
fields: Annotated[
|
|
78
|
+
OptionalNullable[List[VoiceGroupProperties]],
|
|
79
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
80
|
+
] = UNSET
|
|
81
|
+
r"""The fields to include in the response"""
|
|
82
|
+
|
|
83
|
+
start_datetime: Annotated[
|
|
84
|
+
OptionalNullable[str],
|
|
85
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
86
|
+
] = UNSET
|
|
87
|
+
r"""The start datetime for filtering results"""
|
|
88
|
+
|
|
89
|
+
end_datetime: Annotated[
|
|
90
|
+
OptionalNullable[str],
|
|
91
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
|
92
|
+
] = UNSET
|
|
93
|
+
r"""The end datetime for filtering results"""
|
|
94
|
+
|
|
95
|
+
@model_serializer(mode="wrap")
|
|
96
|
+
def serialize_model(self, handler):
|
|
97
|
+
optional_fields = [
|
|
98
|
+
"page",
|
|
99
|
+
"limit",
|
|
100
|
+
"search_fields",
|
|
101
|
+
"search_field_values",
|
|
102
|
+
"order_by",
|
|
103
|
+
"order_by_direction",
|
|
104
|
+
"fields",
|
|
105
|
+
"start_datetime",
|
|
106
|
+
"end_datetime",
|
|
107
|
+
]
|
|
108
|
+
nullable_fields = [
|
|
109
|
+
"page",
|
|
110
|
+
"order_by",
|
|
111
|
+
"order_by_direction",
|
|
112
|
+
"fields",
|
|
113
|
+
"start_datetime",
|
|
114
|
+
"end_datetime",
|
|
115
|
+
]
|
|
116
|
+
null_default_fields = []
|
|
117
|
+
|
|
118
|
+
serialized = handler(self)
|
|
119
|
+
|
|
120
|
+
m = {}
|
|
121
|
+
|
|
122
|
+
for n, f in type(self).model_fields.items():
|
|
123
|
+
k = f.alias or n
|
|
124
|
+
val = serialized.get(k)
|
|
125
|
+
serialized.pop(k, None)
|
|
126
|
+
|
|
127
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
128
|
+
is_set = (
|
|
129
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
130
|
+
or k in null_default_fields
|
|
131
|
+
) # pylint: disable=no-member
|
|
132
|
+
|
|
133
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
134
|
+
m[k] = val
|
|
135
|
+
elif val != UNSET_SENTINEL and (
|
|
136
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
137
|
+
):
|
|
138
|
+
m[k] = val
|
|
139
|
+
|
|
140
|
+
return m
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .languageconfig import LanguageConfig, LanguageConfigTypedDict
|
|
5
|
+
from pydantic import model_serializer
|
|
6
|
+
from syllable_sdk.types import (
|
|
7
|
+
BaseModel,
|
|
8
|
+
Nullable,
|
|
9
|
+
OptionalNullable,
|
|
10
|
+
UNSET,
|
|
11
|
+
UNSET_SENTINEL,
|
|
12
|
+
)
|
|
13
|
+
from typing import List
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class VoiceGroupCreateRequestTypedDict(TypedDict):
|
|
18
|
+
r"""Request model to create a voice group."""
|
|
19
|
+
|
|
20
|
+
name: str
|
|
21
|
+
r"""The name of the language group."""
|
|
22
|
+
language_configs: List[LanguageConfigTypedDict]
|
|
23
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
24
|
+
skip_current_language_in_message: bool
|
|
25
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
26
|
+
description: NotRequired[Nullable[str]]
|
|
27
|
+
r"""Description of the language group."""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class VoiceGroupCreateRequest(BaseModel):
|
|
31
|
+
r"""Request model to create a voice group."""
|
|
32
|
+
|
|
33
|
+
name: str
|
|
34
|
+
r"""The name of the language group."""
|
|
35
|
+
|
|
36
|
+
language_configs: List[LanguageConfig]
|
|
37
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
38
|
+
|
|
39
|
+
skip_current_language_in_message: bool
|
|
40
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
41
|
+
|
|
42
|
+
description: OptionalNullable[str] = UNSET
|
|
43
|
+
r"""Description of the language group."""
|
|
44
|
+
|
|
45
|
+
@model_serializer(mode="wrap")
|
|
46
|
+
def serialize_model(self, handler):
|
|
47
|
+
optional_fields = ["description"]
|
|
48
|
+
nullable_fields = ["description"]
|
|
49
|
+
null_default_fields = []
|
|
50
|
+
|
|
51
|
+
serialized = handler(self)
|
|
52
|
+
|
|
53
|
+
m = {}
|
|
54
|
+
|
|
55
|
+
for n, f in type(self).model_fields.items():
|
|
56
|
+
k = f.alias or n
|
|
57
|
+
val = serialized.get(k)
|
|
58
|
+
serialized.pop(k, None)
|
|
59
|
+
|
|
60
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
61
|
+
is_set = (
|
|
62
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
63
|
+
or k in null_default_fields
|
|
64
|
+
) # pylint: disable=no-member
|
|
65
|
+
|
|
66
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
67
|
+
m[k] = val
|
|
68
|
+
elif val != UNSET_SENTINEL and (
|
|
69
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
70
|
+
):
|
|
71
|
+
m[k] = val
|
|
72
|
+
|
|
73
|
+
return m
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class VoiceGroupProperties(str, Enum):
|
|
8
|
+
r"""Names of voice group fields supported for filtering/sorting on list endpoint."""
|
|
9
|
+
|
|
10
|
+
NAME = "name"
|
|
11
|
+
DESCRIPTION = "description"
|
|
12
|
+
SKIP_CURRENT_LANGUAGE_IN_MESSAGE = "skip_current_language_in_message"
|
|
13
|
+
UPDATED_AT = "updated_at"
|
|
14
|
+
LAST_UPDATED_BY = "last_updated_by"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .languageconfig import LanguageConfig, LanguageConfigTypedDict
|
|
5
|
+
from .languagegroupagentinfo import (
|
|
6
|
+
LanguageGroupAgentInfo,
|
|
7
|
+
LanguageGroupAgentInfoTypedDict,
|
|
8
|
+
)
|
|
9
|
+
from datetime import datetime
|
|
10
|
+
from pydantic import model_serializer
|
|
11
|
+
from syllable_sdk.types import (
|
|
12
|
+
BaseModel,
|
|
13
|
+
Nullable,
|
|
14
|
+
OptionalNullable,
|
|
15
|
+
UNSET,
|
|
16
|
+
UNSET_SENTINEL,
|
|
17
|
+
)
|
|
18
|
+
from typing import List
|
|
19
|
+
from typing_extensions import NotRequired, TypedDict
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class VoiceGroupResponseTypedDict(TypedDict):
|
|
23
|
+
r"""Response model for voice group operations.
|
|
24
|
+
A voice group is a collection of language, voice, and DTMF configuration that can be
|
|
25
|
+
linked to an agent to define the languages and voices it supports. For more information, see
|
|
26
|
+
[Console docs](https://docs.syllable.ai/Resources/VoiceGroups).
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
name: str
|
|
30
|
+
r"""The name of the language group."""
|
|
31
|
+
language_configs: List[LanguageConfigTypedDict]
|
|
32
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
33
|
+
skip_current_language_in_message: bool
|
|
34
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
35
|
+
id: int
|
|
36
|
+
r"""The ID of the language group to update."""
|
|
37
|
+
updated_at: datetime
|
|
38
|
+
r"""Timestamp of the last update to the language group."""
|
|
39
|
+
last_updated_by: str
|
|
40
|
+
r"""Email of the user who last updated the language group."""
|
|
41
|
+
description: NotRequired[Nullable[str]]
|
|
42
|
+
r"""Description of the language group."""
|
|
43
|
+
edit_comments: NotRequired[Nullable[str]]
|
|
44
|
+
r"""Comments for the most recent edit to the language group."""
|
|
45
|
+
agents_info: NotRequired[Nullable[List[LanguageGroupAgentInfoTypedDict]]]
|
|
46
|
+
r"""IDs and names of the agents linked to the language group"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class VoiceGroupResponse(BaseModel):
|
|
50
|
+
r"""Response model for voice group operations.
|
|
51
|
+
A voice group is a collection of language, voice, and DTMF configuration that can be
|
|
52
|
+
linked to an agent to define the languages and voices it supports. For more information, see
|
|
53
|
+
[Console docs](https://docs.syllable.ai/Resources/VoiceGroups).
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
name: str
|
|
57
|
+
r"""The name of the language group."""
|
|
58
|
+
|
|
59
|
+
language_configs: List[LanguageConfig]
|
|
60
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
61
|
+
|
|
62
|
+
skip_current_language_in_message: bool
|
|
63
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
64
|
+
|
|
65
|
+
id: int
|
|
66
|
+
r"""The ID of the language group to update."""
|
|
67
|
+
|
|
68
|
+
updated_at: datetime
|
|
69
|
+
r"""Timestamp of the last update to the language group."""
|
|
70
|
+
|
|
71
|
+
last_updated_by: str
|
|
72
|
+
r"""Email of the user who last updated the language group."""
|
|
73
|
+
|
|
74
|
+
description: OptionalNullable[str] = UNSET
|
|
75
|
+
r"""Description of the language group."""
|
|
76
|
+
|
|
77
|
+
edit_comments: OptionalNullable[str] = UNSET
|
|
78
|
+
r"""Comments for the most recent edit to the language group."""
|
|
79
|
+
|
|
80
|
+
agents_info: OptionalNullable[List[LanguageGroupAgentInfo]] = UNSET
|
|
81
|
+
r"""IDs and names of the agents linked to the language group"""
|
|
82
|
+
|
|
83
|
+
@model_serializer(mode="wrap")
|
|
84
|
+
def serialize_model(self, handler):
|
|
85
|
+
optional_fields = ["description", "edit_comments", "agents_info"]
|
|
86
|
+
nullable_fields = ["description", "edit_comments", "agents_info"]
|
|
87
|
+
null_default_fields = []
|
|
88
|
+
|
|
89
|
+
serialized = handler(self)
|
|
90
|
+
|
|
91
|
+
m = {}
|
|
92
|
+
|
|
93
|
+
for n, f in type(self).model_fields.items():
|
|
94
|
+
k = f.alias or n
|
|
95
|
+
val = serialized.get(k)
|
|
96
|
+
serialized.pop(k, None)
|
|
97
|
+
|
|
98
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
99
|
+
is_set = (
|
|
100
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
101
|
+
or k in null_default_fields
|
|
102
|
+
) # pylint: disable=no-member
|
|
103
|
+
|
|
104
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
105
|
+
m[k] = val
|
|
106
|
+
elif val != UNSET_SENTINEL and (
|
|
107
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
108
|
+
):
|
|
109
|
+
m[k] = val
|
|
110
|
+
|
|
111
|
+
return m
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .languageconfig import LanguageConfig, LanguageConfigTypedDict
|
|
5
|
+
from pydantic import model_serializer
|
|
6
|
+
from syllable_sdk.types import (
|
|
7
|
+
BaseModel,
|
|
8
|
+
Nullable,
|
|
9
|
+
OptionalNullable,
|
|
10
|
+
UNSET,
|
|
11
|
+
UNSET_SENTINEL,
|
|
12
|
+
)
|
|
13
|
+
from typing import List
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class VoiceGroupUpdateRequestTypedDict(TypedDict):
|
|
18
|
+
r"""Request model to update an existing voice group."""
|
|
19
|
+
|
|
20
|
+
name: str
|
|
21
|
+
r"""The name of the language group."""
|
|
22
|
+
language_configs: List[LanguageConfigTypedDict]
|
|
23
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
24
|
+
skip_current_language_in_message: bool
|
|
25
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
26
|
+
id: int
|
|
27
|
+
r"""The ID of the language group to update."""
|
|
28
|
+
description: NotRequired[Nullable[str]]
|
|
29
|
+
r"""Description of the language group."""
|
|
30
|
+
edit_comments: NotRequired[Nullable[str]]
|
|
31
|
+
r"""Comments for the most recent edit to the language group."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class VoiceGroupUpdateRequest(BaseModel):
|
|
35
|
+
r"""Request model to update an existing voice group."""
|
|
36
|
+
|
|
37
|
+
name: str
|
|
38
|
+
r"""The name of the language group."""
|
|
39
|
+
|
|
40
|
+
language_configs: List[LanguageConfig]
|
|
41
|
+
r"""Voice and DTMF configurations for each language in the group."""
|
|
42
|
+
|
|
43
|
+
skip_current_language_in_message: bool
|
|
44
|
+
r"""Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu."""
|
|
45
|
+
|
|
46
|
+
id: int
|
|
47
|
+
r"""The ID of the language group to update."""
|
|
48
|
+
|
|
49
|
+
description: OptionalNullable[str] = UNSET
|
|
50
|
+
r"""Description of the language group."""
|
|
51
|
+
|
|
52
|
+
edit_comments: OptionalNullable[str] = UNSET
|
|
53
|
+
r"""Comments for the most recent edit to the language group."""
|
|
54
|
+
|
|
55
|
+
@model_serializer(mode="wrap")
|
|
56
|
+
def serialize_model(self, handler):
|
|
57
|
+
optional_fields = ["description", "edit_comments"]
|
|
58
|
+
nullable_fields = ["description", "edit_comments"]
|
|
59
|
+
null_default_fields = []
|
|
60
|
+
|
|
61
|
+
serialized = handler(self)
|
|
62
|
+
|
|
63
|
+
m = {}
|
|
64
|
+
|
|
65
|
+
for n, f in type(self).model_fields.items():
|
|
66
|
+
k = f.alias or n
|
|
67
|
+
val = serialized.get(k)
|
|
68
|
+
serialized.pop(k, None)
|
|
69
|
+
|
|
70
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
|
71
|
+
is_set = (
|
|
72
|
+
self.__pydantic_fields_set__.intersection({n})
|
|
73
|
+
or k in null_default_fields
|
|
74
|
+
) # pylint: disable=no-member
|
|
75
|
+
|
|
76
|
+
if val is not None and val != UNSET_SENTINEL:
|
|
77
|
+
m[k] = val
|
|
78
|
+
elif val != UNSET_SENTINEL and (
|
|
79
|
+
not k in optional_fields or (optional_nullable and is_set)
|
|
80
|
+
):
|
|
81
|
+
m[k] = val
|
|
82
|
+
|
|
83
|
+
return m
|
syllable_sdk/sdk.py
CHANGED
|
@@ -39,6 +39,7 @@ if TYPE_CHECKING:
|
|
|
39
39
|
from syllable_sdk.tools import Tools
|
|
40
40
|
from syllable_sdk.users import Users
|
|
41
41
|
from syllable_sdk.v1 import V1
|
|
42
|
+
from syllable_sdk.voice_groups import VoiceGroups
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
class SyllableSDK(BaseSDK):
|
|
@@ -118,6 +119,7 @@ class SyllableSDK(BaseSDK):
|
|
|
118
119
|
outbound: "Outbound"
|
|
119
120
|
language_groups: "LanguageGroups"
|
|
120
121
|
r"""Operations related to language groups. A language group is a collection of language, voice, and DTMF configuration that can be linked to an agent to define the languages and voices it supports. For more information, see [Console docs](https://docs.syllable.ai/Resources/LanguageGroups)."""
|
|
122
|
+
voice_groups: "VoiceGroups"
|
|
121
123
|
takeouts: "Takeouts"
|
|
122
124
|
users: "Users"
|
|
123
125
|
v1: "V1"
|
|
@@ -143,6 +145,7 @@ class SyllableSDK(BaseSDK):
|
|
|
143
145
|
"organizations": ("syllable_sdk.organizations", "Organizations"),
|
|
144
146
|
"outbound": ("syllable_sdk.outbound", "Outbound"),
|
|
145
147
|
"language_groups": ("syllable_sdk.language_groups", "LanguageGroups"),
|
|
148
|
+
"voice_groups": ("syllable_sdk.voice_groups", "VoiceGroups"),
|
|
146
149
|
"takeouts": ("syllable_sdk.takeouts", "Takeouts"),
|
|
147
150
|
"users": ("syllable_sdk.users", "Users"),
|
|
148
151
|
"v1": ("syllable_sdk.v1", "V1"),
|