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.
@@ -36,6 +36,8 @@ class AgentVoiceVarName(str, Enum):
36
36
  ELEVENLABS_SARAH = "elevenlabs:Sarah"
37
37
  ELEVENLABS_WILL = "elevenlabs:Will"
38
38
  WAVENET_FEMALE_EN_US_CHIRP3_HD_ACHERNAR = "wavenet:female/en-US-Chirp3-HD-Achernar"
39
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_ACHERNAR = "wavenet:female/gu-IN-Chirp3-HD-Achernar"
40
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_ACHERNAR = "wavenet:female/hi-IN-Chirp3-HD-Achernar"
39
41
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_ACHERNAR = "wavenet:female/ko-KR-Chirp3-HD-Achernar"
40
42
  WAVENET_FEMALE_CMN_CN_CHIRP3_HD_ACHERNAR = (
41
43
  "wavenet:female/cmn-CN-Chirp3-HD-Achernar"
@@ -44,8 +46,11 @@ class AgentVoiceVarName(str, Enum):
44
46
  WAVENET_FEMALE_TH_TH_CHIRP3_HD_ACHERNAR = "wavenet:female/th-TH-Chirp3-HD-Achernar"
45
47
  WAVENET_FEMALE_VI_VN_CHIRP3_HD_ACHERNAR = "wavenet:female/vi-VN-Chirp3-HD-Achernar"
46
48
  WAVENET_FEMALE_EN_US_CHIRP3_HD_AOEDE = "wavenet:female/en-US-Chirp3-HD-Aoede"
49
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_AOEDE = "wavenet:female/gu-IN-Chirp3-HD-Aoede"
50
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_AOEDE = "wavenet:female/hi-IN-Chirp3-HD-Aoede"
47
51
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_AOEDE = "wavenet:female/ko-KR-Chirp3-HD-Aoede"
48
52
  WAVENET_FEMALE_CMN_CN_CHIRP3_HD_AOEDE = "wavenet:female/cmn-CN-Chirp3-HD-Aoede"
53
+ WAVENET_FEMALE_RU_RU_CHIRP3_HD_AOEDE = "wavenet:female/ru-RU-Chirp3-HD-Aoede"
49
54
  WAVENET_FEMALE_ES_US_CHIRP3_HD_AOEDE = "wavenet:female/es-US-Chirp3-HD-Aoede"
50
55
  WAVENET_FEMALE_TH_TH_CHIRP3_HD_AOEDE = "wavenet:female/th-TH-Chirp3-HD-Aoede"
51
56
  WAVENET_FEMALE_VI_VN_CHIRP3_HD_AOEDE = "wavenet:female/vi-VN-Chirp3-HD-Aoede"
@@ -53,6 +58,12 @@ class AgentVoiceVarName(str, Enum):
53
58
  WAVENET_FEMALE_EN_US_CHIRP3_HD_CALLIRRHOE = (
54
59
  "wavenet:female/en-US-Chirp3-HD-Callirrhoe"
55
60
  )
61
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_CALLIRRHOE = (
62
+ "wavenet:female/gu-IN-Chirp3-HD-Callirrhoe"
63
+ )
64
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_CALLIRRHOE = (
65
+ "wavenet:female/hi-IN-Chirp3-HD-Callirrhoe"
66
+ )
56
67
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_CALLIRRHOE = (
57
68
  "wavenet:female/ko-KR-Chirp3-HD-Callirrhoe"
58
69
  )
@@ -69,29 +80,41 @@ class AgentVoiceVarName(str, Enum):
69
80
  "wavenet:female/vi-VN-Chirp3-HD-Callirrhoe"
70
81
  )
71
82
  WAVENET_MALE_EN_US_CHIRP3_HD_CHARON = "wavenet:male/en-US-Chirp3-HD-Charon"
83
+ WAVENET_MALE_GU_IN_CHIRP3_HD_CHARON = "wavenet:male/gu-IN-Chirp3-HD-Charon"
84
+ WAVENET_MALE_HI_IN_CHIRP3_HD_CHARON = "wavenet:male/hi-IN-Chirp3-HD-Charon"
72
85
  WAVENET_MALE_KO_KR_CHIRP3_HD_CHARON = "wavenet:male/ko-KR-Chirp3-HD-Charon"
73
86
  WAVENET_MALE_CMN_CN_CHIRP3_HD_CHARON = "wavenet:male/cmn-CN-Chirp3-HD-Charon"
87
+ WAVENET_MALE_RU_RU_CHIRP3_HD_CHARON = "wavenet:male/ru-RU-Chirp3-HD-Charon"
74
88
  WAVENET_MALE_ES_US_CHIRP3_HD_CHARON = "wavenet:male/es-US-Chirp3-HD-Charon"
75
89
  WAVENET_MALE_TH_TH_CHIRP3_HD_CHARON = "wavenet:male/th-TH-Chirp3-HD-Charon"
76
90
  WAVENET_MALE_VI_VN_CHIRP3_HD_CHARON = "wavenet:male/vi-VN-Chirp3-HD-Charon"
77
91
  WAVENET_FEMALE_EN_US_NEURAL2_F = "wavenet:female/en-US-Neural2-F"
78
92
  WAVENET_MALE_EN_US_CHIRP3_HD_FENRIR = "wavenet:male/en-US-Chirp3-HD-Fenrir"
93
+ WAVENET_MALE_GU_IN_CHIRP3_HD_FENRIR = "wavenet:male/gu-IN-Chirp3-HD-Fenrir"
94
+ WAVENET_MALE_HI_IN_CHIRP3_HD_FENRIR = "wavenet:male/hi-IN-Chirp3-HD-Fenrir"
79
95
  WAVENET_MALE_KO_KR_CHIRP3_HD_FENRIR = "wavenet:male/ko-KR-Chirp3-HD-Fenrir"
80
96
  WAVENET_MALE_CMN_CN_CHIRP3_HD_FENRIR = "wavenet:male/cmn-CN-Chirp3-HD-Fenrir"
97
+ WAVENET_MALE_RU_RU_CHIRP3_HD_FENRIR = "wavenet:male/ru-RU-Chirp3-HD-Fenrir"
81
98
  WAVENET_MALE_ES_US_CHIRP3_HD_FENRIR = "wavenet:male/es-US-Chirp3-HD-Fenrir"
82
99
  WAVENET_MALE_TH_TH_CHIRP3_HD_FENRIR = "wavenet:male/th-TH-Chirp3-HD-Fenrir"
83
100
  WAVENET_MALE_VI_VN_CHIRP3_HD_FENRIR = "wavenet:male/vi-VN-Chirp3-HD-Fenrir"
84
101
  WAVENET_FEMALE_ES_US_NEURAL2_A = "wavenet:female/es-US-Neural2-A"
85
102
  WAVENET_MALE_EN_US_NEURAL2_D = "wavenet:male/en-US-Neural2-D"
86
103
  WAVENET_FEMALE_EN_US_CHIRP3_HD_KORE = "wavenet:female/en-US-Chirp3-HD-Kore"
104
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_KORE = "wavenet:female/gu-IN-Chirp3-HD-Kore"
105
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_KORE = "wavenet:female/hi-IN-Chirp3-HD-Kore"
87
106
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_KORE = "wavenet:female/ko-KR-Chirp3-HD-Kore"
88
107
  WAVENET_FEMALE_CMN_CN_CHIRP3_HD_KORE = "wavenet:female/cmn-CN-Chirp3-HD-Kore"
108
+ WAVENET_FEMALE_RU_RU_CHIRP3_HD_KORE = "wavenet:female/ru-RU-Chirp3-HD-Kore"
89
109
  WAVENET_FEMALE_ES_US_CHIRP3_HD_KORE = "wavenet:female/es-US-Chirp3-HD-Kore"
90
110
  WAVENET_FEMALE_TH_TH_CHIRP3_HD_KORE = "wavenet:female/th-TH-Chirp3-HD-Kore"
91
111
  WAVENET_FEMALE_VI_VN_CHIRP3_HD_KORE = "wavenet:female/vi-VN-Chirp3-HD-Kore"
92
112
  WAVENET_FEMALE_EN_US_CHIRP3_HD_LEDA = "wavenet:female/en-US-Chirp3-HD-Leda"
113
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_LEDA = "wavenet:female/gu-IN-Chirp3-HD-Leda"
114
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_LEDA = "wavenet:female/hi-IN-Chirp3-HD-Leda"
93
115
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_LEDA = "wavenet:female/ko-KR-Chirp3-HD-Leda"
94
116
  WAVENET_FEMALE_CMN_CN_CHIRP3_HD_LEDA = "wavenet:female/cmn-CN-Chirp3-HD-Leda"
117
+ WAVENET_FEMALE_RU_RU_CHIRP3_HD_LEDA = "wavenet:female/ru-RU-Chirp3-HD-Leda"
95
118
  WAVENET_FEMALE_ES_US_CHIRP3_HD_LEDA = "wavenet:female/es-US-Chirp3-HD-Leda"
96
119
  WAVENET_FEMALE_TH_TH_CHIRP3_HD_LEDA = "wavenet:female/th-TH-Chirp3-HD-Leda"
97
120
  WAVENET_FEMALE_VI_VN_CHIRP3_HD_LEDA = "wavenet:female/vi-VN-Chirp3-HD-Leda"
@@ -100,20 +123,28 @@ class AgentVoiceVarName(str, Enum):
100
123
  WAVENET_FEMALE_YUE_HK_STANDARD_C = "wavenet:female/yue-HK-Standard-C"
101
124
  WAVENET_FEMALE_EN_US_STUDIO_O = "wavenet:female/en-US-Studio-O"
102
125
  WAVENET_MALE_EN_US_CHIRP3_HD_ORUS = "wavenet:male/en-US-Chirp3-HD-Orus"
126
+ WAVENET_MALE_GU_IN_CHIRP3_HD_ORUS = "wavenet:male/gu-IN-Chirp3-HD-Orus"
127
+ WAVENET_MALE_HI_IN_CHIRP3_HD_ORUS = "wavenet:male/hi-IN-Chirp3-HD-Orus"
103
128
  WAVENET_MALE_KO_KR_CHIRP3_HD_ORUS = "wavenet:male/ko-KR-Chirp3-HD-Orus"
104
129
  WAVENET_MALE_CMN_CN_CHIRP3_HD_ORUS = "wavenet:male/cmn-CN-Chirp3-HD-Orus"
130
+ WAVENET_MALE_RU_RU_CHIRP3_HD_ORUS = "wavenet:male/ru-RU-Chirp3-HD-Orus"
105
131
  WAVENET_MALE_ES_US_CHIRP3_HD_ORUS = "wavenet:male/es-US-Chirp3-HD-Orus"
106
132
  WAVENET_MALE_TH_TH_CHIRP3_HD_ORUS = "wavenet:male/th-TH-Chirp3-HD-Orus"
107
133
  WAVENET_MALE_VI_VN_CHIRP3_HD_ORUS = "wavenet:male/vi-VN-Chirp3-HD-Orus"
108
134
  WAVENET_MALE_EN_US_CHIRP3_HD_PUCK = "wavenet:male/en-US-Chirp3-HD-Puck"
135
+ WAVENET_MALE_GU_IN_CHIRP3_HD_PUCK = "wavenet:male/gu-IN-Chirp3-HD-Puck"
136
+ WAVENET_MALE_HI_IN_CHIRP3_HD_PUCK = "wavenet:male/hi-IN-Chirp3-HD-Puck"
109
137
  WAVENET_MALE_KO_KR_CHIRP3_HD_PUCK = "wavenet:male/ko-KR-Chirp3-HD-Puck"
110
138
  WAVENET_MALE_CMN_CN_CHIRP3_HD_PUCK = "wavenet:male/cmn-CN-Chirp3-HD-Puck"
139
+ WAVENET_MALE_RU_RU_CHIRP3_HD_PUCK = "wavenet:male/ru-RU-Chirp3-HD-Puck"
111
140
  WAVENET_MALE_ES_US_CHIRP3_HD_PUCK = "wavenet:male/es-US-Chirp3-HD-Puck"
112
141
  WAVENET_MALE_TH_TH_CHIRP3_HD_PUCK = "wavenet:male/th-TH-Chirp3-HD-Puck"
113
142
  WAVENET_MALE_VI_VN_CHIRP3_HD_PUCK = "wavenet:male/vi-VN-Chirp3-HD-Puck"
114
143
  WAVENET_FEMALE_KO_KR_NEURAL2_A = "wavenet:female/ko-KR-Neural2-A"
115
144
  WAVENET_FEMALE_VI_VN_NEURAL2_A = "wavenet:female/vi-VN-Neural2-A"
116
145
  WAVENET_MALE_EN_US_CHIRP3_HD_UMBRIEL = "wavenet:male/en-US-Chirp3-HD-Umbriel"
146
+ WAVENET_MALE_GU_IN_CHIRP3_HD_UMBRIEL = "wavenet:male/gu-IN-Chirp3-HD-Umbriel"
147
+ WAVENET_MALE_HI_IN_CHIRP3_HD_UMBRIEL = "wavenet:male/hi-IN-Chirp3-HD-Umbriel"
117
148
  WAVENET_MALE_KO_KR_CHIRP3_HD_UMBRIEL = "wavenet:male/ko-KR-Chirp3-HD-Umbriel"
118
149
  WAVENET_MALE_CMN_CN_CHIRP3_HD_UMBRIEL = "wavenet:male/cmn-CN-Chirp3-HD-Umbriel"
119
150
  WAVENET_MALE_ES_US_CHIRP3_HD_UMBRIEL = "wavenet:male/es-US-Chirp3-HD-Umbriel"
@@ -122,6 +153,12 @@ class AgentVoiceVarName(str, Enum):
122
153
  WAVENET_FEMALE_EN_US_CHIRP3_HD_VINDEMIATRIX = (
123
154
  "wavenet:female/en-US-Chirp3-HD-Vindemiatrix"
124
155
  )
156
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_VINDEMIATRIX = (
157
+ "wavenet:female/gu-IN-Chirp3-HD-Vindemiatrix"
158
+ )
159
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_VINDEMIATRIX = (
160
+ "wavenet:female/hi-IN-Chirp3-HD-Vindemiatrix"
161
+ )
125
162
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_VINDEMIATRIX = (
126
163
  "wavenet:female/ko-KR-Chirp3-HD-Vindemiatrix"
127
164
  )
@@ -138,8 +175,11 @@ class AgentVoiceVarName(str, Enum):
138
175
  "wavenet:female/vi-VN-Chirp3-HD-Vindemiatrix"
139
176
  )
140
177
  WAVENET_FEMALE_EN_US_CHIRP3_HD_ZEPHYR = "wavenet:female/en-US-Chirp3-HD-Zephyr"
178
+ WAVENET_FEMALE_GU_IN_CHIRP3_HD_ZEPHYR = "wavenet:female/gu-IN-Chirp3-HD-Zephyr"
179
+ WAVENET_FEMALE_HI_IN_CHIRP3_HD_ZEPHYR = "wavenet:female/hi-IN-Chirp3-HD-Zephyr"
141
180
  WAVENET_FEMALE_KO_KR_CHIRP3_HD_ZEPHYR = "wavenet:female/ko-KR-Chirp3-HD-Zephyr"
142
181
  WAVENET_FEMALE_CMN_CN_CHIRP3_HD_ZEPHYR = "wavenet:female/cmn-CN-Chirp3-HD-Zephyr"
182
+ WAVENET_FEMALE_RU_RU_CHIRP3_HD_ZEPHYR = "wavenet:female/ru-RU-Chirp3-HD-Zephyr"
143
183
  WAVENET_FEMALE_ES_US_CHIRP3_HD_ZEPHYR = "wavenet:female/es-US-Chirp3-HD-Zephyr"
144
184
  WAVENET_FEMALE_TH_TH_CHIRP3_HD_ZEPHYR = "wavenet:female/th-TH-Chirp3-HD-Zephyr"
145
185
  WAVENET_FEMALE_VI_VN_CHIRP3_HD_ZEPHYR = "wavenet:female/vi-VN-Chirp3-HD-Zephyr"
@@ -11,3 +11,4 @@ class ChannelServices(str, Enum):
11
11
  TWILIO = "twilio"
12
12
  EMAIL = "email"
13
13
  WEBCHAT = "webchat"
14
+ AFRICASTALKING = "africastalking"
@@ -17,3 +17,6 @@ class LanguageCode(str, Enum):
17
17
  VI_VN = "vi-VN"
18
18
  BS_BA = "bs-BA"
19
19
  SW_KE = "sw-KE"
20
+ RU_RU = "ru-RU"
21
+ HI_IN = "hi-IN"
22
+ GU_IN = "gu-IN"
@@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict
15
15
 
16
16
 
17
17
  class LanguageGroupCreateRequestTypedDict(TypedDict):
18
- r"""Request model to create a language group."""
18
+ r"""Request model to create a voice group."""
19
19
 
20
20
  name: str
21
21
  r"""The name of the language group."""
@@ -28,7 +28,7 @@ class LanguageGroupCreateRequestTypedDict(TypedDict):
28
28
 
29
29
 
30
30
  class LanguageGroupCreateRequest(BaseModel):
31
- r"""Request model to create a language group."""
31
+ r"""Request model to create a voice group."""
32
32
 
33
33
  name: str
34
34
  r"""The name of the language group."""
@@ -5,7 +5,7 @@ from enum import Enum
5
5
 
6
6
 
7
7
  class LanguageGroupProperties(str, Enum):
8
- r"""Names of language group fields supported for filtering/sorting on list endpoint."""
8
+ r"""Deprecated enum mirroring `VoiceGroupProperties` values."""
9
9
 
10
10
  NAME = "name"
11
11
  DESCRIPTION = "description"
@@ -20,10 +20,10 @@ from typing_extensions import NotRequired, TypedDict
20
20
 
21
21
 
22
22
  class LanguageGroupResponseTypedDict(TypedDict):
23
- r"""Response model for language group operations.
24
- A language group is a collection of language, voice, and DTMF configuration that can be
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
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/LanguageGroups).
26
+ [Console docs](https://docs.syllable.ai/Resources/VoiceGroups).
27
27
  """
28
28
 
29
29
  name: str
@@ -47,10 +47,10 @@ class LanguageGroupResponseTypedDict(TypedDict):
47
47
 
48
48
 
49
49
  class LanguageGroupResponse(BaseModel):
50
- r"""Response model for language group operations.
51
- A language group is a collection of language, voice, and DTMF configuration that can be
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
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/LanguageGroups).
53
+ [Console docs](https://docs.syllable.ai/Resources/VoiceGroups).
54
54
  """
55
55
 
56
56
  name: str
@@ -15,7 +15,7 @@ from typing_extensions import NotRequired, TypedDict
15
15
 
16
16
 
17
17
  class LanguageGroupUpdateRequestTypedDict(TypedDict):
18
- r"""Request model to update an existing language group."""
18
+ r"""Request model to update an existing voice group."""
19
19
 
20
20
  name: str
21
21
  r"""The name of the language group."""
@@ -32,7 +32,7 @@ class LanguageGroupUpdateRequestTypedDict(TypedDict):
32
32
 
33
33
 
34
34
  class LanguageGroupUpdateRequest(BaseModel):
35
- r"""Request model to update an existing language group."""
35
+ r"""Request model to update an existing voice group."""
36
36
 
37
37
  name: str
38
38
  r"""The name of the language group."""
@@ -0,0 +1,95 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .agentvoicedisplayname import AgentVoiceDisplayName
5
+ from .languagecode import LanguageCode
6
+ from .ttsprovider import TtsProvider
7
+ from pydantic import model_serializer
8
+ from syllable_sdk.types import (
9
+ BaseModel,
10
+ Nullable,
11
+ OptionalNullable,
12
+ UNSET,
13
+ UNSET_SENTINEL,
14
+ )
15
+ from typing import Optional
16
+ from typing_extensions import NotRequired, TypedDict
17
+
18
+
19
+ class LanguageSampleCreateRequestTypedDict(TypedDict):
20
+ r"""Request model to generate a sample audio file for a given voice and language."""
21
+
22
+ language_code: LanguageCode
23
+ r"""BCP 47 codes of languages that Syllable supports."""
24
+ voice_provider: TtsProvider
25
+ r"""TTS provider for an agent voice."""
26
+ voice_display_name: AgentVoiceDisplayName
27
+ r"""Display names of voices that Syllable supports."""
28
+ voice_speed: NotRequired[Nullable[float]]
29
+ r"""Speed of the voice in the range of 0.25 to 4.0 (OpenAI and Google) or 0.7 to 1.2 (ElevenLabs). Standard speed is 1.0."""
30
+ voice_pitch: NotRequired[Nullable[float]]
31
+ r"""Pitch of the voice in the range of -20.0 to 20.0. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. 0 means use the original pitch. Only supported for Google configs."""
32
+ text: NotRequired[str]
33
+ r"""Text to generate for this voice."""
34
+ apply_pronunciation_overrides: NotRequired[bool]
35
+ r"""Apply TTS pronunciation fixes."""
36
+
37
+
38
+ class LanguageSampleCreateRequest(BaseModel):
39
+ r"""Request model to generate a sample audio file for a given voice and language."""
40
+
41
+ language_code: LanguageCode
42
+ r"""BCP 47 codes of languages that Syllable supports."""
43
+
44
+ voice_provider: TtsProvider
45
+ r"""TTS provider for an agent voice."""
46
+
47
+ voice_display_name: AgentVoiceDisplayName
48
+ r"""Display names of voices that Syllable supports."""
49
+
50
+ voice_speed: OptionalNullable[float] = UNSET
51
+ r"""Speed of the voice in the range of 0.25 to 4.0 (OpenAI and Google) or 0.7 to 1.2 (ElevenLabs). Standard speed is 1.0."""
52
+
53
+ voice_pitch: OptionalNullable[float] = UNSET
54
+ r"""Pitch of the voice in the range of -20.0 to 20.0. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch. 0 means use the original pitch. Only supported for Google configs."""
55
+
56
+ text: Optional[str] = ""
57
+ r"""Text to generate for this voice."""
58
+
59
+ apply_pronunciation_overrides: Optional[bool] = False
60
+ r"""Apply TTS pronunciation fixes."""
61
+
62
+ @model_serializer(mode="wrap")
63
+ def serialize_model(self, handler):
64
+ optional_fields = [
65
+ "voice_speed",
66
+ "voice_pitch",
67
+ "text",
68
+ "apply_pronunciation_overrides",
69
+ ]
70
+ nullable_fields = ["voice_speed", "voice_pitch"]
71
+ null_default_fields = []
72
+
73
+ serialized = handler(self)
74
+
75
+ m = {}
76
+
77
+ for n, f in type(self).model_fields.items():
78
+ k = f.alias or n
79
+ val = serialized.get(k)
80
+ serialized.pop(k, None)
81
+
82
+ optional_nullable = k in optional_fields and k in nullable_fields
83
+ is_set = (
84
+ self.__pydantic_fields_set__.intersection({n})
85
+ or k in null_default_fields
86
+ ) # pylint: disable=no-member
87
+
88
+ if val is not None and val != UNSET_SENTINEL:
89
+ m[k] = val
90
+ elif val != UNSET_SENTINEL and (
91
+ not k in optional_fields or (optional_nullable and is_set)
92
+ ):
93
+ m[k] = val
94
+
95
+ return m
@@ -0,0 +1,74 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .voicegroupresponse import VoiceGroupResponse, VoiceGroupResponseTypedDict
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 ListResponseVoiceGroupResponseTypedDict(TypedDict):
18
+ items: List[VoiceGroupResponseTypedDict]
19
+ r"""List of items returned from the query"""
20
+ page: int
21
+ r"""The page number of the results (0-based)"""
22
+ page_size: int
23
+ r"""The number of items returned per page"""
24
+ total_pages: NotRequired[Nullable[int]]
25
+ r"""The total number of pages of results given the indicated page size"""
26
+ total_count: NotRequired[Nullable[int]]
27
+ r"""The total number of items returned from the query"""
28
+
29
+
30
+ class ListResponseVoiceGroupResponse(BaseModel):
31
+ items: List[VoiceGroupResponse]
32
+ r"""List of items returned from the query"""
33
+
34
+ page: int
35
+ r"""The page number of the results (0-based)"""
36
+
37
+ page_size: int
38
+ r"""The number of items returned per page"""
39
+
40
+ total_pages: OptionalNullable[int] = UNSET
41
+ r"""The total number of pages of results given the indicated page size"""
42
+
43
+ total_count: OptionalNullable[int] = UNSET
44
+ r"""The total number of items returned from the query"""
45
+
46
+ @model_serializer(mode="wrap")
47
+ def serialize_model(self, handler):
48
+ optional_fields = ["total_pages", "total_count"]
49
+ nullable_fields = ["total_pages", "total_count"]
50
+ null_default_fields = []
51
+
52
+ serialized = handler(self)
53
+
54
+ m = {}
55
+
56
+ for n, f in type(self).model_fields.items():
57
+ k = f.alias or n
58
+ val = serialized.get(k)
59
+ serialized.pop(k, None)
60
+
61
+ optional_nullable = k in optional_fields and k in nullable_fields
62
+ is_set = (
63
+ self.__pydantic_fields_set__.intersection({n})
64
+ or k in null_default_fields
65
+ ) # pylint: disable=no-member
66
+
67
+ if val is not None and val != UNSET_SENTINEL:
68
+ m[k] = val
69
+ elif val != UNSET_SENTINEL and (
70
+ not k in optional_fields or (optional_nullable and is_set)
71
+ ):
72
+ m[k] = val
73
+
74
+ return m
@@ -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 = ["account_sid", "auth_token", "telephony"]
45
- nullable_fields = ["account_sid", "auth_token", "telephony"]
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