syllable-sdk 0.38.20__py3-none-any.whl → 0.39.4__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 +3 -3
- syllable_sdk/language_groups.py +59 -20
- syllable_sdk/models/__init__.py +64 -0
- syllable_sdk/models/agentvoicedisplayname.py +32 -0
- syllable_sdk/models/agentvoicevarname.py +40 -0
- syllable_sdk/models/channelservices.py +1 -0
- syllable_sdk/models/languagecode.py +3 -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.39.4.dist-info}/METADATA +17 -8
- {syllable_sdk-0.38.20.dist-info → syllable_sdk-0.39.4.dist-info}/RECORD +26 -16
- {syllable_sdk-0.38.20.dist-info → syllable_sdk-0.39.4.dist-info}/WHEEL +0 -0
|
@@ -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"),
|