syllable-sdk 0.35.33__py3-none-any.whl → 0.35.38__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.
Files changed (46) hide show
  1. syllable_sdk/_version.py +3 -3
  2. syllable_sdk/agents.py +23 -26
  3. syllable_sdk/batches.py +37 -36
  4. syllable_sdk/campaigns.py +21 -20
  5. syllable_sdk/channels.py +9 -8
  6. syllable_sdk/conversations.py +5 -8
  7. syllable_sdk/custom_messages.py +21 -20
  8. syllable_sdk/dashboards.py +17 -20
  9. syllable_sdk/data_sources.py +21 -32
  10. syllable_sdk/events.py +5 -4
  11. syllable_sdk/folders.py +33 -40
  12. syllable_sdk/full_summary.py +5 -8
  13. syllable_sdk/incidents.py +23 -22
  14. syllable_sdk/insights_sdk.py +5 -8
  15. syllable_sdk/insights_tools.py +27 -30
  16. syllable_sdk/language_groups.py +23 -22
  17. syllable_sdk/latency.py +5 -8
  18. syllable_sdk/models/agentsttprovider.py +1 -1
  19. syllable_sdk/models/insightworkflowcondition.py +8 -1
  20. syllable_sdk/models/insightworkflowinput.py +10 -10
  21. syllable_sdk/models/insightworkflowoutput.py +10 -10
  22. syllable_sdk/numbers.py +13 -24
  23. syllable_sdk/organizations.py +15 -14
  24. syllable_sdk/permissions.py +3 -2
  25. syllable_sdk/prompts.py +27 -30
  26. syllable_sdk/roles.py +21 -24
  27. syllable_sdk/sdk.py +23 -8
  28. syllable_sdk/services.py +21 -24
  29. syllable_sdk/session_debug.py +13 -12
  30. syllable_sdk/session_labels.py +13 -16
  31. syllable_sdk/sessions.py +15 -18
  32. syllable_sdk/takeouts.py +9 -8
  33. syllable_sdk/targets.py +21 -24
  34. syllable_sdk/test.py +5 -4
  35. syllable_sdk/tools.py +21 -24
  36. syllable_sdk/transcript.py +5 -4
  37. syllable_sdk/twilio.py +13 -12
  38. syllable_sdk/users.py +27 -30
  39. syllable_sdk/utils/__init__.py +0 -3
  40. syllable_sdk/utils/serializers.py +1 -18
  41. syllable_sdk/utils/unmarshal_json_response.py +24 -0
  42. syllable_sdk/v1.py +27 -30
  43. syllable_sdk/workflows.py +33 -32
  44. {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.38.dist-info}/METADATA +24 -8
  45. {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.38.dist-info}/RECORD +46 -45
  46. {syllable_sdk-0.35.33.dist-info → syllable_sdk-0.35.38.dist-info}/WHEEL +0 -0
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
5
5
  from syllable_sdk._hooks import HookContext
6
6
  from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
7
7
  from syllable_sdk.utils import get_security_from_env
8
+ from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
8
9
  from typing import Any, List, Mapping, Optional, Union, cast
9
10
 
10
11
 
@@ -109,11 +110,11 @@ class CustomMessages(BaseSDK):
109
110
 
110
111
  response_data: Any = None
111
112
  if utils.match_response(http_res, "200", "application/json"):
112
- return utils.unmarshal_json_response(
113
+ return unmarshal_json_response(
113
114
  models.ListResponseCustomMessageResponse, http_res
114
115
  )
115
116
  if utils.match_response(http_res, "422", "application/json"):
116
- response_data = utils.unmarshal_json_response(
117
+ response_data = unmarshal_json_response(
117
118
  errors.HTTPValidationErrorData, http_res
118
119
  )
119
120
  raise errors.HTTPValidationError(response_data, http_res)
@@ -224,11 +225,11 @@ class CustomMessages(BaseSDK):
224
225
 
225
226
  response_data: Any = None
226
227
  if utils.match_response(http_res, "200", "application/json"):
227
- return utils.unmarshal_json_response(
228
+ return unmarshal_json_response(
228
229
  models.ListResponseCustomMessageResponse, http_res
229
230
  )
230
231
  if utils.match_response(http_res, "422", "application/json"):
231
- response_data = utils.unmarshal_json_response(
232
+ response_data = unmarshal_json_response(
232
233
  errors.HTTPValidationErrorData, http_res
233
234
  )
234
235
  raise errors.HTTPValidationError(response_data, http_res)
@@ -321,9 +322,9 @@ class CustomMessages(BaseSDK):
321
322
 
322
323
  response_data: Any = None
323
324
  if utils.match_response(http_res, "200", "application/json"):
324
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
325
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
325
326
  if utils.match_response(http_res, "422", "application/json"):
326
- response_data = utils.unmarshal_json_response(
327
+ response_data = unmarshal_json_response(
327
328
  errors.HTTPValidationErrorData, http_res
328
329
  )
329
330
  raise errors.HTTPValidationError(response_data, http_res)
@@ -416,9 +417,9 @@ class CustomMessages(BaseSDK):
416
417
 
417
418
  response_data: Any = None
418
419
  if utils.match_response(http_res, "200", "application/json"):
419
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
420
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
420
421
  if utils.match_response(http_res, "422", "application/json"):
421
- response_data = utils.unmarshal_json_response(
422
+ response_data = unmarshal_json_response(
422
423
  errors.HTTPValidationErrorData, http_res
423
424
  )
424
425
  raise errors.HTTPValidationError(response_data, http_res)
@@ -511,9 +512,9 @@ class CustomMessages(BaseSDK):
511
512
 
512
513
  response_data: Any = None
513
514
  if utils.match_response(http_res, "200", "application/json"):
514
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
515
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
515
516
  if utils.match_response(http_res, "422", "application/json"):
516
- response_data = utils.unmarshal_json_response(
517
+ response_data = unmarshal_json_response(
517
518
  errors.HTTPValidationErrorData, http_res
518
519
  )
519
520
  raise errors.HTTPValidationError(response_data, http_res)
@@ -606,9 +607,9 @@ class CustomMessages(BaseSDK):
606
607
 
607
608
  response_data: Any = None
608
609
  if utils.match_response(http_res, "200", "application/json"):
609
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
610
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
610
611
  if utils.match_response(http_res, "422", "application/json"):
611
- response_data = utils.unmarshal_json_response(
612
+ response_data = unmarshal_json_response(
612
613
  errors.HTTPValidationErrorData, http_res
613
614
  )
614
615
  raise errors.HTTPValidationError(response_data, http_res)
@@ -695,9 +696,9 @@ class CustomMessages(BaseSDK):
695
696
 
696
697
  response_data: Any = None
697
698
  if utils.match_response(http_res, "200", "application/json"):
698
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
699
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
699
700
  if utils.match_response(http_res, "422", "application/json"):
700
- response_data = utils.unmarshal_json_response(
701
+ response_data = unmarshal_json_response(
701
702
  errors.HTTPValidationErrorData, http_res
702
703
  )
703
704
  raise errors.HTTPValidationError(response_data, http_res)
@@ -784,9 +785,9 @@ class CustomMessages(BaseSDK):
784
785
 
785
786
  response_data: Any = None
786
787
  if utils.match_response(http_res, "200", "application/json"):
787
- return utils.unmarshal_json_response(models.CustomMessageResponse, http_res)
788
+ return unmarshal_json_response(models.CustomMessageResponse, http_res)
788
789
  if utils.match_response(http_res, "422", "application/json"):
789
- response_data = utils.unmarshal_json_response(
790
+ response_data = unmarshal_json_response(
790
791
  errors.HTTPValidationErrorData, http_res
791
792
  )
792
793
  raise errors.HTTPValidationError(response_data, http_res)
@@ -876,9 +877,9 @@ class CustomMessages(BaseSDK):
876
877
 
877
878
  response_data: Any = None
878
879
  if utils.match_response(http_res, "200", "application/json"):
879
- return utils.unmarshal_json_response(Any, http_res)
880
+ return unmarshal_json_response(Any, http_res)
880
881
  if utils.match_response(http_res, "422", "application/json"):
881
- response_data = utils.unmarshal_json_response(
882
+ response_data = unmarshal_json_response(
882
883
  errors.HTTPValidationErrorData, http_res
883
884
  )
884
885
  raise errors.HTTPValidationError(response_data, http_res)
@@ -968,9 +969,9 @@ class CustomMessages(BaseSDK):
968
969
 
969
970
  response_data: Any = None
970
971
  if utils.match_response(http_res, "200", "application/json"):
971
- return utils.unmarshal_json_response(Any, http_res)
972
+ return unmarshal_json_response(Any, http_res)
972
973
  if utils.match_response(http_res, "422", "application/json"):
973
- response_data = utils.unmarshal_json_response(
974
+ response_data = unmarshal_json_response(
974
975
  errors.HTTPValidationErrorData, http_res
975
976
  )
976
977
  raise errors.HTTPValidationError(response_data, http_res)
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
5
5
  from syllable_sdk._hooks import HookContext
6
6
  from syllable_sdk.types import OptionalNullable, UNSET
7
7
  from syllable_sdk.utils import get_security_from_env
8
+ from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
8
9
  from typing import Any, List, Mapping, Optional
9
10
  from typing_extensions import deprecated
10
11
 
@@ -113,11 +114,11 @@ class Dashboards(BaseSDK):
113
114
 
114
115
  response_data: Any = None
115
116
  if utils.match_response(http_res, "200", "application/json"):
116
- return utils.unmarshal_json_response(
117
+ return unmarshal_json_response(
117
118
  models.ListResponseDashboardResponse, http_res
118
119
  )
119
120
  if utils.match_response(http_res, "422", "application/json"):
120
- response_data = utils.unmarshal_json_response(
121
+ response_data = unmarshal_json_response(
121
122
  errors.HTTPValidationErrorData, http_res
122
123
  )
123
124
  raise errors.HTTPValidationError(response_data, http_res)
@@ -231,11 +232,11 @@ class Dashboards(BaseSDK):
231
232
 
232
233
  response_data: Any = None
233
234
  if utils.match_response(http_res, "200", "application/json"):
234
- return utils.unmarshal_json_response(
235
+ return unmarshal_json_response(
235
236
  models.ListResponseDashboardResponse, http_res
236
237
  )
237
238
  if utils.match_response(http_res, "422", "application/json"):
238
- response_data = utils.unmarshal_json_response(
239
+ response_data = unmarshal_json_response(
239
240
  errors.HTTPValidationErrorData, http_res
240
241
  )
241
242
  raise errors.HTTPValidationError(response_data, http_res)
@@ -325,11 +326,9 @@ class Dashboards(BaseSDK):
325
326
 
326
327
  response_data: Any = None
327
328
  if utils.match_response(http_res, "200", "application/json"):
328
- return utils.unmarshal_json_response(
329
- models.DashboardTokenResponse, http_res
330
- )
329
+ return unmarshal_json_response(models.DashboardTokenResponse, http_res)
331
330
  if utils.match_response(http_res, "422", "application/json"):
332
- response_data = utils.unmarshal_json_response(
331
+ response_data = unmarshal_json_response(
333
332
  errors.HTTPValidationErrorData, http_res
334
333
  )
335
334
  raise errors.HTTPValidationError(response_data, http_res)
@@ -419,11 +418,9 @@ class Dashboards(BaseSDK):
419
418
 
420
419
  response_data: Any = None
421
420
  if utils.match_response(http_res, "200", "application/json"):
422
- return utils.unmarshal_json_response(
423
- models.DashboardTokenResponse, http_res
424
- )
421
+ return unmarshal_json_response(models.DashboardTokenResponse, http_res)
425
422
  if utils.match_response(http_res, "422", "application/json"):
426
- response_data = utils.unmarshal_json_response(
423
+ response_data = unmarshal_json_response(
427
424
  errors.HTTPValidationErrorData, http_res
428
425
  )
429
426
  raise errors.HTTPValidationError(response_data, http_res)
@@ -509,7 +506,7 @@ class Dashboards(BaseSDK):
509
506
  )
510
507
 
511
508
  if utils.match_response(http_res, "200", "application/json"):
512
- return utils.unmarshal_json_response(models.Dashboard, http_res)
509
+ return unmarshal_json_response(models.Dashboard, http_res)
513
510
  if utils.match_response(http_res, "4XX", "*"):
514
511
  http_res_text = utils.stream_to_text(http_res)
515
512
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -592,7 +589,7 @@ class Dashboards(BaseSDK):
592
589
  )
593
590
 
594
591
  if utils.match_response(http_res, "200", "application/json"):
595
- return utils.unmarshal_json_response(models.Dashboard, http_res)
592
+ return unmarshal_json_response(models.Dashboard, http_res)
596
593
  if utils.match_response(http_res, "4XX", "*"):
597
594
  http_res_text = await utils.stream_to_text_async(http_res)
598
595
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -675,7 +672,7 @@ class Dashboards(BaseSDK):
675
672
  )
676
673
 
677
674
  if utils.match_response(http_res, "200", "application/json"):
678
- return utils.unmarshal_json_response(models.Dashboard, http_res)
675
+ return unmarshal_json_response(models.Dashboard, http_res)
679
676
  if utils.match_response(http_res, "4XX", "*"):
680
677
  http_res_text = utils.stream_to_text(http_res)
681
678
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -758,7 +755,7 @@ class Dashboards(BaseSDK):
758
755
  )
759
756
 
760
757
  if utils.match_response(http_res, "200", "application/json"):
761
- return utils.unmarshal_json_response(models.Dashboard, http_res)
758
+ return unmarshal_json_response(models.Dashboard, http_res)
762
759
  if utils.match_response(http_res, "4XX", "*"):
763
760
  http_res_text = await utils.stream_to_text_async(http_res)
764
761
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -841,7 +838,7 @@ class Dashboards(BaseSDK):
841
838
  )
842
839
 
843
840
  if utils.match_response(http_res, "200", "application/json"):
844
- return utils.unmarshal_json_response(models.Dashboard, http_res)
841
+ return unmarshal_json_response(models.Dashboard, http_res)
845
842
  if utils.match_response(http_res, "4XX", "*"):
846
843
  http_res_text = utils.stream_to_text(http_res)
847
844
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -924,7 +921,7 @@ class Dashboards(BaseSDK):
924
921
  )
925
922
 
926
923
  if utils.match_response(http_res, "200", "application/json"):
927
- return utils.unmarshal_json_response(models.Dashboard, http_res)
924
+ return unmarshal_json_response(models.Dashboard, http_res)
928
925
  if utils.match_response(http_res, "4XX", "*"):
929
926
  http_res_text = await utils.stream_to_text_async(http_res)
930
927
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -1007,7 +1004,7 @@ class Dashboards(BaseSDK):
1007
1004
  )
1008
1005
 
1009
1006
  if utils.match_response(http_res, "200", "application/json"):
1010
- return utils.unmarshal_json_response(models.Dashboard, http_res)
1007
+ return unmarshal_json_response(models.Dashboard, http_res)
1011
1008
  if utils.match_response(http_res, "4XX", "*"):
1012
1009
  http_res_text = utils.stream_to_text(http_res)
1013
1010
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -1090,7 +1087,7 @@ class Dashboards(BaseSDK):
1090
1087
  )
1091
1088
 
1092
1089
  if utils.match_response(http_res, "200", "application/json"):
1093
- return utils.unmarshal_json_response(models.Dashboard, http_res)
1090
+ return unmarshal_json_response(models.Dashboard, http_res)
1094
1091
  if utils.match_response(http_res, "4XX", "*"):
1095
1092
  http_res_text = await utils.stream_to_text_async(http_res)
1096
1093
  raise errors.APIError("API error occurred", http_res, http_res_text)
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
5
5
  from syllable_sdk._hooks import HookContext
6
6
  from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
7
7
  from syllable_sdk.utils import get_security_from_env
8
+ from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
8
9
  from typing import Any, List, Mapping, Optional, Union, cast
9
10
 
10
11
 
@@ -109,11 +110,11 @@ class DataSources(BaseSDK):
109
110
 
110
111
  response_data: Any = None
111
112
  if utils.match_response(http_res, "200", "application/json"):
112
- return utils.unmarshal_json_response(
113
+ return unmarshal_json_response(
113
114
  models.ListResponseDataSourceMetadataResponse, http_res
114
115
  )
115
116
  if utils.match_response(http_res, "422", "application/json"):
116
- response_data = utils.unmarshal_json_response(
117
+ response_data = unmarshal_json_response(
117
118
  errors.HTTPValidationErrorData, http_res
118
119
  )
119
120
  raise errors.HTTPValidationError(response_data, http_res)
@@ -224,11 +225,11 @@ class DataSources(BaseSDK):
224
225
 
225
226
  response_data: Any = None
226
227
  if utils.match_response(http_res, "200", "application/json"):
227
- return utils.unmarshal_json_response(
228
+ return unmarshal_json_response(
228
229
  models.ListResponseDataSourceMetadataResponse, http_res
229
230
  )
230
231
  if utils.match_response(http_res, "422", "application/json"):
231
- response_data = utils.unmarshal_json_response(
232
+ response_data = unmarshal_json_response(
232
233
  errors.HTTPValidationErrorData, http_res
233
234
  )
234
235
  raise errors.HTTPValidationError(response_data, http_res)
@@ -320,11 +321,9 @@ class DataSources(BaseSDK):
320
321
 
321
322
  response_data: Any = None
322
323
  if utils.match_response(http_res, "200", "application/json"):
323
- return utils.unmarshal_json_response(
324
- models.DataSourceDetailResponse, http_res
325
- )
324
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
326
325
  if utils.match_response(http_res, "422", "application/json"):
327
- response_data = utils.unmarshal_json_response(
326
+ response_data = unmarshal_json_response(
328
327
  errors.HTTPValidationErrorData, http_res
329
328
  )
330
329
  raise errors.HTTPValidationError(response_data, http_res)
@@ -416,11 +415,9 @@ class DataSources(BaseSDK):
416
415
 
417
416
  response_data: Any = None
418
417
  if utils.match_response(http_res, "200", "application/json"):
419
- return utils.unmarshal_json_response(
420
- models.DataSourceDetailResponse, http_res
421
- )
418
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
422
419
  if utils.match_response(http_res, "422", "application/json"):
423
- response_data = utils.unmarshal_json_response(
420
+ response_data = unmarshal_json_response(
424
421
  errors.HTTPValidationErrorData, http_res
425
422
  )
426
423
  raise errors.HTTPValidationError(response_data, http_res)
@@ -512,11 +509,9 @@ class DataSources(BaseSDK):
512
509
 
513
510
  response_data: Any = None
514
511
  if utils.match_response(http_res, "200", "application/json"):
515
- return utils.unmarshal_json_response(
516
- models.DataSourceDetailResponse, http_res
517
- )
512
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
518
513
  if utils.match_response(http_res, "422", "application/json"):
519
- response_data = utils.unmarshal_json_response(
514
+ response_data = unmarshal_json_response(
520
515
  errors.HTTPValidationErrorData, http_res
521
516
  )
522
517
  raise errors.HTTPValidationError(response_data, http_res)
@@ -608,11 +603,9 @@ class DataSources(BaseSDK):
608
603
 
609
604
  response_data: Any = None
610
605
  if utils.match_response(http_res, "200", "application/json"):
611
- return utils.unmarshal_json_response(
612
- models.DataSourceDetailResponse, http_res
613
- )
606
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
614
607
  if utils.match_response(http_res, "422", "application/json"):
615
- response_data = utils.unmarshal_json_response(
608
+ response_data = unmarshal_json_response(
616
609
  errors.HTTPValidationErrorData, http_res
617
610
  )
618
611
  raise errors.HTTPValidationError(response_data, http_res)
@@ -699,11 +692,9 @@ class DataSources(BaseSDK):
699
692
 
700
693
  response_data: Any = None
701
694
  if utils.match_response(http_res, "200", "application/json"):
702
- return utils.unmarshal_json_response(
703
- models.DataSourceDetailResponse, http_res
704
- )
695
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
705
696
  if utils.match_response(http_res, "422", "application/json"):
706
- response_data = utils.unmarshal_json_response(
697
+ response_data = unmarshal_json_response(
707
698
  errors.HTTPValidationErrorData, http_res
708
699
  )
709
700
  raise errors.HTTPValidationError(response_data, http_res)
@@ -790,11 +781,9 @@ class DataSources(BaseSDK):
790
781
 
791
782
  response_data: Any = None
792
783
  if utils.match_response(http_res, "200", "application/json"):
793
- return utils.unmarshal_json_response(
794
- models.DataSourceDetailResponse, http_res
795
- )
784
+ return unmarshal_json_response(models.DataSourceDetailResponse, http_res)
796
785
  if utils.match_response(http_res, "422", "application/json"):
797
- response_data = utils.unmarshal_json_response(
786
+ response_data = unmarshal_json_response(
798
787
  errors.HTTPValidationErrorData, http_res
799
788
  )
800
789
  raise errors.HTTPValidationError(response_data, http_res)
@@ -884,9 +873,9 @@ class DataSources(BaseSDK):
884
873
 
885
874
  response_data: Any = None
886
875
  if utils.match_response(http_res, "200", "application/json"):
887
- return utils.unmarshal_json_response(Any, http_res)
876
+ return unmarshal_json_response(Any, http_res)
888
877
  if utils.match_response(http_res, "422", "application/json"):
889
- response_data = utils.unmarshal_json_response(
878
+ response_data = unmarshal_json_response(
890
879
  errors.HTTPValidationErrorData, http_res
891
880
  )
892
881
  raise errors.HTTPValidationError(response_data, http_res)
@@ -976,9 +965,9 @@ class DataSources(BaseSDK):
976
965
 
977
966
  response_data: Any = None
978
967
  if utils.match_response(http_res, "200", "application/json"):
979
- return utils.unmarshal_json_response(Any, http_res)
968
+ return unmarshal_json_response(Any, http_res)
980
969
  if utils.match_response(http_res, "422", "application/json"):
981
- response_data = utils.unmarshal_json_response(
970
+ response_data = unmarshal_json_response(
982
971
  errors.HTTPValidationErrorData, http_res
983
972
  )
984
973
  raise errors.HTTPValidationError(response_data, http_res)
syllable_sdk/events.py CHANGED
@@ -5,6 +5,7 @@ from syllable_sdk import errors, models, utils
5
5
  from syllable_sdk._hooks import HookContext
6
6
  from syllable_sdk.types import OptionalNullable, UNSET
7
7
  from syllable_sdk.utils import get_security_from_env
8
+ from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
8
9
  from typing import Any, List, Mapping, Optional
9
10
 
10
11
 
@@ -107,9 +108,9 @@ class Events(BaseSDK):
107
108
 
108
109
  response_data: Any = None
109
110
  if utils.match_response(http_res, "200", "application/json"):
110
- return utils.unmarshal_json_response(models.ListResponseEvent, http_res)
111
+ return unmarshal_json_response(models.ListResponseEvent, http_res)
111
112
  if utils.match_response(http_res, "422", "application/json"):
112
- response_data = utils.unmarshal_json_response(
113
+ response_data = unmarshal_json_response(
113
114
  errors.HTTPValidationErrorData, http_res
114
115
  )
115
116
  raise errors.HTTPValidationError(response_data, http_res)
@@ -218,9 +219,9 @@ class Events(BaseSDK):
218
219
 
219
220
  response_data: Any = None
220
221
  if utils.match_response(http_res, "200", "application/json"):
221
- return utils.unmarshal_json_response(models.ListResponseEvent, http_res)
222
+ return unmarshal_json_response(models.ListResponseEvent, http_res)
222
223
  if utils.match_response(http_res, "422", "application/json"):
223
- response_data = utils.unmarshal_json_response(
224
+ response_data = unmarshal_json_response(
224
225
  errors.HTTPValidationErrorData, http_res
225
226
  )
226
227
  raise errors.HTTPValidationError(response_data, http_res)
syllable_sdk/folders.py CHANGED
@@ -6,6 +6,7 @@ from syllable_sdk import errors, models, utils
6
6
  from syllable_sdk._hooks import HookContext
7
7
  from syllable_sdk.types import BaseModel, OptionalNullable, UNSET
8
8
  from syllable_sdk.utils import get_security_from_env
9
+ from syllable_sdk.utils.unmarshal_json_response import unmarshal_json_response
9
10
  from typing import Any, List, Mapping, Optional, Union, cast
10
11
 
11
12
 
@@ -108,11 +109,9 @@ class Folders(BaseSDK):
108
109
 
109
110
  response_data: Any = None
110
111
  if utils.match_response(http_res, "200", "application/json"):
111
- return utils.unmarshal_json_response(
112
- models.ListResponseInsightsFolder, http_res
113
- )
112
+ return unmarshal_json_response(models.ListResponseInsightsFolder, http_res)
114
113
  if utils.match_response(http_res, "422", "application/json"):
115
- response_data = utils.unmarshal_json_response(
114
+ response_data = unmarshal_json_response(
116
115
  errors.HTTPValidationErrorData, http_res
117
116
  )
118
117
  raise errors.HTTPValidationError(response_data, http_res)
@@ -221,11 +220,9 @@ class Folders(BaseSDK):
221
220
 
222
221
  response_data: Any = None
223
222
  if utils.match_response(http_res, "200", "application/json"):
224
- return utils.unmarshal_json_response(
225
- models.ListResponseInsightsFolder, http_res
226
- )
223
+ return unmarshal_json_response(models.ListResponseInsightsFolder, http_res)
227
224
  if utils.match_response(http_res, "422", "application/json"):
228
- response_data = utils.unmarshal_json_response(
225
+ response_data = unmarshal_json_response(
229
226
  errors.HTTPValidationErrorData, http_res
230
227
  )
231
228
  raise errors.HTTPValidationError(response_data, http_res)
@@ -313,9 +310,9 @@ class Folders(BaseSDK):
313
310
 
314
311
  response_data: Any = None
315
312
  if utils.match_response(http_res, "200", "application/json"):
316
- return utils.unmarshal_json_response(models.InsightsFolder, http_res)
313
+ return unmarshal_json_response(models.InsightsFolder, http_res)
317
314
  if utils.match_response(http_res, "422", "application/json"):
318
- response_data = utils.unmarshal_json_response(
315
+ response_data = unmarshal_json_response(
319
316
  errors.HTTPValidationErrorData, http_res
320
317
  )
321
318
  raise errors.HTTPValidationError(response_data, http_res)
@@ -403,9 +400,9 @@ class Folders(BaseSDK):
403
400
 
404
401
  response_data: Any = None
405
402
  if utils.match_response(http_res, "200", "application/json"):
406
- return utils.unmarshal_json_response(models.InsightsFolder, http_res)
403
+ return unmarshal_json_response(models.InsightsFolder, http_res)
407
404
  if utils.match_response(http_res, "422", "application/json"):
408
- response_data = utils.unmarshal_json_response(
405
+ response_data = unmarshal_json_response(
409
406
  errors.HTTPValidationErrorData, http_res
410
407
  )
411
408
  raise errors.HTTPValidationError(response_data, http_res)
@@ -490,9 +487,9 @@ class Folders(BaseSDK):
490
487
 
491
488
  response_data: Any = None
492
489
  if utils.match_response(http_res, "200", "application/json"):
493
- return utils.unmarshal_json_response(models.FolderDetails, http_res)
490
+ return unmarshal_json_response(models.FolderDetails, http_res)
494
491
  if utils.match_response(http_res, "422", "application/json"):
495
- response_data = utils.unmarshal_json_response(
492
+ response_data = unmarshal_json_response(
496
493
  errors.HTTPValidationErrorData, http_res
497
494
  )
498
495
  raise errors.HTTPValidationError(response_data, http_res)
@@ -577,9 +574,9 @@ class Folders(BaseSDK):
577
574
 
578
575
  response_data: Any = None
579
576
  if utils.match_response(http_res, "200", "application/json"):
580
- return utils.unmarshal_json_response(models.FolderDetails, http_res)
577
+ return unmarshal_json_response(models.FolderDetails, http_res)
581
578
  if utils.match_response(http_res, "422", "application/json"):
582
- response_data = utils.unmarshal_json_response(
579
+ response_data = unmarshal_json_response(
583
580
  errors.HTTPValidationErrorData, http_res
584
581
  )
585
582
  raise errors.HTTPValidationError(response_data, http_res)
@@ -664,9 +661,9 @@ class Folders(BaseSDK):
664
661
 
665
662
  response_data: Any = None
666
663
  if utils.match_response(http_res, "200", "application/json"):
667
- return utils.unmarshal_json_response(bool, http_res)
664
+ return unmarshal_json_response(bool, http_res)
668
665
  if utils.match_response(http_res, "422", "application/json"):
669
- response_data = utils.unmarshal_json_response(
666
+ response_data = unmarshal_json_response(
670
667
  errors.HTTPValidationErrorData, http_res
671
668
  )
672
669
  raise errors.HTTPValidationError(response_data, http_res)
@@ -751,9 +748,9 @@ class Folders(BaseSDK):
751
748
 
752
749
  response_data: Any = None
753
750
  if utils.match_response(http_res, "200", "application/json"):
754
- return utils.unmarshal_json_response(bool, http_res)
751
+ return unmarshal_json_response(bool, http_res)
755
752
  if utils.match_response(http_res, "422", "application/json"):
756
- response_data = utils.unmarshal_json_response(
753
+ response_data = unmarshal_json_response(
757
754
  errors.HTTPValidationErrorData, http_res
758
755
  )
759
756
  raise errors.HTTPValidationError(response_data, http_res)
@@ -852,9 +849,9 @@ class Folders(BaseSDK):
852
849
 
853
850
  response_data: Any = None
854
851
  if utils.match_response(http_res, "200", "application/json"):
855
- return utils.unmarshal_json_response(models.InsightsFolder, http_res)
852
+ return unmarshal_json_response(models.InsightsFolder, http_res)
856
853
  if utils.match_response(http_res, "422", "application/json"):
857
- response_data = utils.unmarshal_json_response(
854
+ response_data = unmarshal_json_response(
858
855
  errors.HTTPValidationErrorData, http_res
859
856
  )
860
857
  raise errors.HTTPValidationError(response_data, http_res)
@@ -953,9 +950,9 @@ class Folders(BaseSDK):
953
950
 
954
951
  response_data: Any = None
955
952
  if utils.match_response(http_res, "200", "application/json"):
956
- return utils.unmarshal_json_response(models.InsightsFolder, http_res)
953
+ return unmarshal_json_response(models.InsightsFolder, http_res)
957
954
  if utils.match_response(http_res, "422", "application/json"):
958
- response_data = utils.unmarshal_json_response(
955
+ response_data = unmarshal_json_response(
959
956
  errors.HTTPValidationErrorData, http_res
960
957
  )
961
958
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1079,9 +1076,9 @@ class Folders(BaseSDK):
1079
1076
 
1080
1077
  response_data: Any = None
1081
1078
  if utils.match_response(http_res, "200", "application/json"):
1082
- return utils.unmarshal_json_response(models.InsightsUploadFile, http_res)
1079
+ return unmarshal_json_response(models.InsightsUploadFile, http_res)
1083
1080
  if utils.match_response(http_res, "422", "application/json"):
1084
- response_data = utils.unmarshal_json_response(
1081
+ response_data = unmarshal_json_response(
1085
1082
  errors.HTTPValidationErrorData, http_res
1086
1083
  )
1087
1084
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1205,9 +1202,9 @@ class Folders(BaseSDK):
1205
1202
 
1206
1203
  response_data: Any = None
1207
1204
  if utils.match_response(http_res, "200", "application/json"):
1208
- return utils.unmarshal_json_response(models.InsightsUploadFile, http_res)
1205
+ return unmarshal_json_response(models.InsightsUploadFile, http_res)
1209
1206
  if utils.match_response(http_res, "422", "application/json"):
1210
- response_data = utils.unmarshal_json_response(
1207
+ response_data = unmarshal_json_response(
1211
1208
  errors.HTTPValidationErrorData, http_res
1212
1209
  )
1213
1210
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1319,11 +1316,11 @@ class Folders(BaseSDK):
1319
1316
 
1320
1317
  response_data: Any = None
1321
1318
  if utils.match_response(http_res, "200", "application/json"):
1322
- return utils.unmarshal_json_response(
1319
+ return unmarshal_json_response(
1323
1320
  models.ListResponseInsightsUploadFile, http_res
1324
1321
  )
1325
1322
  if utils.match_response(http_res, "422", "application/json"):
1326
- response_data = utils.unmarshal_json_response(
1323
+ response_data = unmarshal_json_response(
1327
1324
  errors.HTTPValidationErrorData, http_res
1328
1325
  )
1329
1326
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1435,11 +1432,11 @@ class Folders(BaseSDK):
1435
1432
 
1436
1433
  response_data: Any = None
1437
1434
  if utils.match_response(http_res, "200", "application/json"):
1438
- return utils.unmarshal_json_response(
1435
+ return unmarshal_json_response(
1439
1436
  models.ListResponseInsightsUploadFile, http_res
1440
1437
  )
1441
1438
  if utils.match_response(http_res, "422", "application/json"):
1442
- response_data = utils.unmarshal_json_response(
1439
+ response_data = unmarshal_json_response(
1443
1440
  errors.HTTPValidationErrorData, http_res
1444
1441
  )
1445
1442
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1538,11 +1535,9 @@ class Folders(BaseSDK):
1538
1535
 
1539
1536
  response_data: Any = None
1540
1537
  if utils.match_response(http_res, "200", "application/json"):
1541
- return utils.unmarshal_json_response(
1542
- List[models.InsightsUploadFile], http_res
1543
- )
1538
+ return unmarshal_json_response(List[models.InsightsUploadFile], http_res)
1544
1539
  if utils.match_response(http_res, "422", "application/json"):
1545
- response_data = utils.unmarshal_json_response(
1540
+ response_data = unmarshal_json_response(
1546
1541
  errors.HTTPValidationErrorData, http_res
1547
1542
  )
1548
1543
  raise errors.HTTPValidationError(response_data, http_res)
@@ -1641,11 +1636,9 @@ class Folders(BaseSDK):
1641
1636
 
1642
1637
  response_data: Any = None
1643
1638
  if utils.match_response(http_res, "200", "application/json"):
1644
- return utils.unmarshal_json_response(
1645
- List[models.InsightsUploadFile], http_res
1646
- )
1639
+ return unmarshal_json_response(List[models.InsightsUploadFile], http_res)
1647
1640
  if utils.match_response(http_res, "422", "application/json"):
1648
- response_data = utils.unmarshal_json_response(
1641
+ response_data = unmarshal_json_response(
1649
1642
  errors.HTTPValidationErrorData, http_res
1650
1643
  )
1651
1644
  raise errors.HTTPValidationError(response_data, http_res)