dub 0.31.0__py3-none-any.whl → 0.33.0__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 (68) hide show
  1. dub/_version.py +3 -3
  2. dub/analytics.py +6 -6
  3. dub/commissions.py +12 -12
  4. dub/customers.py +24 -321
  5. dub/domains.py +34 -38
  6. dub/embed_tokens.py +6 -6
  7. dub/events.py +6 -6
  8. dub/folders.py +24 -28
  9. dub/links.py +58 -74
  10. dub/models/components/__init__.py +38 -6
  11. dub/models/components/analyticstopurls.py +2 -2
  12. dub/models/components/clickevent.py +10 -9
  13. dub/models/components/commissioncreatedevent.py +5 -2
  14. dub/models/components/folderschema.py +6 -1
  15. dub/models/components/leadcreatedevent.py +15 -11
  16. dub/models/components/leadevent.py +10 -9
  17. dub/models/components/linkclickedevent.py +10 -9
  18. dub/models/components/linkschema.py +9 -3
  19. dub/models/components/{tagschema.py → linktagschema.py} +2 -2
  20. dub/models/components/linkwebhookevent.py +10 -9
  21. dub/models/components/partnerapplicationsubmittedevent.py +269 -0
  22. dub/models/components/partnerenrolledevent.py +93 -29
  23. dub/models/components/salecreatedevent.py +15 -11
  24. dub/models/components/saleevent.py +10 -9
  25. dub/models/components/webhookevent.py +6 -0
  26. dub/models/components/workspaceschema.py +11 -0
  27. dub/models/errors/badrequest.py +1 -1
  28. dub/models/errors/conflict.py +1 -1
  29. dub/models/errors/duberror.py +1 -1
  30. dub/models/errors/forbidden.py +1 -1
  31. dub/models/errors/internalservererror.py +1 -1
  32. dub/models/errors/inviteexpired.py +1 -1
  33. dub/models/errors/no_response_error.py +1 -1
  34. dub/models/errors/notfound.py +1 -1
  35. dub/models/errors/ratelimitexceeded.py +1 -1
  36. dub/models/errors/responsevalidationerror.py +1 -1
  37. dub/models/errors/sdkerror.py +1 -1
  38. dub/models/errors/unauthorized.py +1 -1
  39. dub/models/errors/unprocessableentity.py +1 -1
  40. dub/models/operations/__init__.py +17 -35
  41. dub/models/operations/banpartner.py +83 -0
  42. dub/models/operations/bulkcreatelinks.py +2 -2
  43. dub/models/operations/createfolder.py +8 -3
  44. dub/models/operations/createlink.py +2 -2
  45. dub/models/operations/createpartner.py +93 -29
  46. dub/models/operations/listcommissions.py +13 -2
  47. dub/models/operations/listevents.py +10 -0
  48. dub/models/operations/listpartners.py +107 -47
  49. dub/models/operations/retrieveanalytics.py +16 -1
  50. dub/models/operations/retrievelinks.py +42 -7
  51. dub/models/operations/retrievepartneranalytics.py +51 -11
  52. dub/models/operations/tracklead.py +2 -2
  53. dub/models/operations/updatecommission.py +7 -2
  54. dub/models/operations/updatefolder.py +8 -3
  55. dub/models/operations/updatelink.py +2 -2
  56. dub/models/operations/upsertlink.py +2 -2
  57. dub/partners.py +310 -36
  58. dub/qr_codes.py +4 -4
  59. dub/tags.py +24 -32
  60. dub/track.py +12 -20
  61. dub/utils/retries.py +69 -5
  62. dub/utils/unmarshal_json_response.py +15 -1
  63. dub/workspaces.py +12 -20
  64. {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/METADATA +2 -21
  65. {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/RECORD +67 -66
  66. dub/models/operations/createcustomer.py +0 -382
  67. {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/WHEEL +0 -0
  68. {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/licenses/LICENSE +0 -0
dub/domains.py CHANGED
@@ -24,7 +24,7 @@ class Domains(BaseSDK):
24
24
  server_url: Optional[str] = None,
25
25
  timeout_ms: Optional[int] = None,
26
26
  http_headers: Optional[Mapping[str, str]] = None,
27
- ) -> Optional[components.DomainSchema]:
27
+ ) -> components.DomainSchema:
28
28
  r"""Create a domain
29
29
 
30
30
  Create a domain for the authenticated workspace.
@@ -87,7 +87,7 @@ class Domains(BaseSDK):
87
87
  config=self.sdk_configuration,
88
88
  base_url=base_url or "",
89
89
  operation_id="createDomain",
90
- oauth2_scopes=[],
90
+ oauth2_scopes=None,
91
91
  security_source=self.sdk_configuration.security,
92
92
  ),
93
93
  request=req,
@@ -109,7 +109,7 @@ class Domains(BaseSDK):
109
109
 
110
110
  response_data: Any = None
111
111
  if utils.match_response(http_res, "201", "application/json"):
112
- return unmarshal_json_response(Optional[components.DomainSchema], http_res)
112
+ return unmarshal_json_response(components.DomainSchema, http_res)
113
113
  if utils.match_response(http_res, "400", "application/json"):
114
114
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
115
115
  raise errors.BadRequest(response_data, http_res)
@@ -165,7 +165,7 @@ class Domains(BaseSDK):
165
165
  server_url: Optional[str] = None,
166
166
  timeout_ms: Optional[int] = None,
167
167
  http_headers: Optional[Mapping[str, str]] = None,
168
- ) -> Optional[components.DomainSchema]:
168
+ ) -> components.DomainSchema:
169
169
  r"""Create a domain
170
170
 
171
171
  Create a domain for the authenticated workspace.
@@ -228,7 +228,7 @@ class Domains(BaseSDK):
228
228
  config=self.sdk_configuration,
229
229
  base_url=base_url or "",
230
230
  operation_id="createDomain",
231
- oauth2_scopes=[],
231
+ oauth2_scopes=None,
232
232
  security_source=self.sdk_configuration.security,
233
233
  ),
234
234
  request=req,
@@ -250,7 +250,7 @@ class Domains(BaseSDK):
250
250
 
251
251
  response_data: Any = None
252
252
  if utils.match_response(http_res, "201", "application/json"):
253
- return unmarshal_json_response(Optional[components.DomainSchema], http_res)
253
+ return unmarshal_json_response(components.DomainSchema, http_res)
254
254
  if utils.match_response(http_res, "400", "application/json"):
255
255
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
256
256
  raise errors.BadRequest(response_data, http_res)
@@ -357,7 +357,7 @@ class Domains(BaseSDK):
357
357
  config=self.sdk_configuration,
358
358
  base_url=base_url or "",
359
359
  operation_id="listDomains",
360
- oauth2_scopes=[],
360
+ oauth2_scopes=None,
361
361
  security_source=self.sdk_configuration.security,
362
362
  ),
363
363
  request=req,
@@ -404,9 +404,7 @@ class Domains(BaseSDK):
404
404
  response_data: Any = None
405
405
  if utils.match_response(http_res, "200", "application/json"):
406
406
  return operations.ListDomainsResponse(
407
- result=unmarshal_json_response(
408
- Optional[List[components.DomainSchema]], http_res
409
- ),
407
+ result=unmarshal_json_response(List[components.DomainSchema], http_res),
410
408
  next=next_func,
411
409
  )
412
410
  if utils.match_response(http_res, "400", "application/json"):
@@ -515,7 +513,7 @@ class Domains(BaseSDK):
515
513
  config=self.sdk_configuration,
516
514
  base_url=base_url or "",
517
515
  operation_id="listDomains",
518
- oauth2_scopes=[],
516
+ oauth2_scopes=None,
519
517
  security_source=self.sdk_configuration.security,
520
518
  ),
521
519
  request=req,
@@ -562,9 +560,7 @@ class Domains(BaseSDK):
562
560
  response_data: Any = None
563
561
  if utils.match_response(http_res, "200", "application/json"):
564
562
  return operations.ListDomainsResponse(
565
- result=unmarshal_json_response(
566
- Optional[List[components.DomainSchema]], http_res
567
- ),
563
+ result=unmarshal_json_response(List[components.DomainSchema], http_res),
568
564
  next=next_func,
569
565
  )
570
566
  if utils.match_response(http_res, "400", "application/json"):
@@ -623,7 +619,7 @@ class Domains(BaseSDK):
623
619
  server_url: Optional[str] = None,
624
620
  timeout_ms: Optional[int] = None,
625
621
  http_headers: Optional[Mapping[str, str]] = None,
626
- ) -> Optional[components.DomainSchema]:
622
+ ) -> components.DomainSchema:
627
623
  r"""Update a domain
628
624
 
629
625
  Update a domain for the authenticated workspace.
@@ -688,7 +684,7 @@ class Domains(BaseSDK):
688
684
  config=self.sdk_configuration,
689
685
  base_url=base_url or "",
690
686
  operation_id="updateDomain",
691
- oauth2_scopes=[],
687
+ oauth2_scopes=None,
692
688
  security_source=self.sdk_configuration.security,
693
689
  ),
694
690
  request=req,
@@ -710,7 +706,7 @@ class Domains(BaseSDK):
710
706
 
711
707
  response_data: Any = None
712
708
  if utils.match_response(http_res, "200", "application/json"):
713
- return unmarshal_json_response(Optional[components.DomainSchema], http_res)
709
+ return unmarshal_json_response(components.DomainSchema, http_res)
714
710
  if utils.match_response(http_res, "400", "application/json"):
715
711
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
716
712
  raise errors.BadRequest(response_data, http_res)
@@ -767,7 +763,7 @@ class Domains(BaseSDK):
767
763
  server_url: Optional[str] = None,
768
764
  timeout_ms: Optional[int] = None,
769
765
  http_headers: Optional[Mapping[str, str]] = None,
770
- ) -> Optional[components.DomainSchema]:
766
+ ) -> components.DomainSchema:
771
767
  r"""Update a domain
772
768
 
773
769
  Update a domain for the authenticated workspace.
@@ -832,7 +828,7 @@ class Domains(BaseSDK):
832
828
  config=self.sdk_configuration,
833
829
  base_url=base_url or "",
834
830
  operation_id="updateDomain",
835
- oauth2_scopes=[],
831
+ oauth2_scopes=None,
836
832
  security_source=self.sdk_configuration.security,
837
833
  ),
838
834
  request=req,
@@ -854,7 +850,7 @@ class Domains(BaseSDK):
854
850
 
855
851
  response_data: Any = None
856
852
  if utils.match_response(http_res, "200", "application/json"):
857
- return unmarshal_json_response(Optional[components.DomainSchema], http_res)
853
+ return unmarshal_json_response(components.DomainSchema, http_res)
858
854
  if utils.match_response(http_res, "400", "application/json"):
859
855
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
860
856
  raise errors.BadRequest(response_data, http_res)
@@ -905,7 +901,7 @@ class Domains(BaseSDK):
905
901
  server_url: Optional[str] = None,
906
902
  timeout_ms: Optional[int] = None,
907
903
  http_headers: Optional[Mapping[str, str]] = None,
908
- ) -> Optional[operations.DeleteDomainResponseBody]:
904
+ ) -> operations.DeleteDomainResponseBody:
909
905
  r"""Delete a domain
910
906
 
911
907
  Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
@@ -959,7 +955,7 @@ class Domains(BaseSDK):
959
955
  config=self.sdk_configuration,
960
956
  base_url=base_url or "",
961
957
  operation_id="deleteDomain",
962
- oauth2_scopes=[],
958
+ oauth2_scopes=None,
963
959
  security_source=self.sdk_configuration.security,
964
960
  ),
965
961
  request=req,
@@ -982,7 +978,7 @@ class Domains(BaseSDK):
982
978
  response_data: Any = None
983
979
  if utils.match_response(http_res, "200", "application/json"):
984
980
  return unmarshal_json_response(
985
- Optional[operations.DeleteDomainResponseBody], http_res
981
+ operations.DeleteDomainResponseBody, http_res
986
982
  )
987
983
  if utils.match_response(http_res, "400", "application/json"):
988
984
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -1034,7 +1030,7 @@ class Domains(BaseSDK):
1034
1030
  server_url: Optional[str] = None,
1035
1031
  timeout_ms: Optional[int] = None,
1036
1032
  http_headers: Optional[Mapping[str, str]] = None,
1037
- ) -> Optional[operations.DeleteDomainResponseBody]:
1033
+ ) -> operations.DeleteDomainResponseBody:
1038
1034
  r"""Delete a domain
1039
1035
 
1040
1036
  Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.
@@ -1088,7 +1084,7 @@ class Domains(BaseSDK):
1088
1084
  config=self.sdk_configuration,
1089
1085
  base_url=base_url or "",
1090
1086
  operation_id="deleteDomain",
1091
- oauth2_scopes=[],
1087
+ oauth2_scopes=None,
1092
1088
  security_source=self.sdk_configuration.security,
1093
1089
  ),
1094
1090
  request=req,
@@ -1111,7 +1107,7 @@ class Domains(BaseSDK):
1111
1107
  response_data: Any = None
1112
1108
  if utils.match_response(http_res, "200", "application/json"):
1113
1109
  return unmarshal_json_response(
1114
- Optional[operations.DeleteDomainResponseBody], http_res
1110
+ operations.DeleteDomainResponseBody, http_res
1115
1111
  )
1116
1112
  if utils.match_response(http_res, "400", "application/json"):
1117
1113
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -1168,7 +1164,7 @@ class Domains(BaseSDK):
1168
1164
  server_url: Optional[str] = None,
1169
1165
  timeout_ms: Optional[int] = None,
1170
1166
  http_headers: Optional[Mapping[str, str]] = None,
1171
- ) -> Optional[operations.RegisterDomainResponseBody]:
1167
+ ) -> operations.RegisterDomainResponseBody:
1172
1168
  r"""Register a domain
1173
1169
 
1174
1170
  Register a domain for the authenticated workspace. Only available for Enterprise Plans.
@@ -1231,7 +1227,7 @@ class Domains(BaseSDK):
1231
1227
  config=self.sdk_configuration,
1232
1228
  base_url=base_url or "",
1233
1229
  operation_id="registerDomain",
1234
- oauth2_scopes=[],
1230
+ oauth2_scopes=None,
1235
1231
  security_source=self.sdk_configuration.security,
1236
1232
  ),
1237
1233
  request=req,
@@ -1254,7 +1250,7 @@ class Domains(BaseSDK):
1254
1250
  response_data: Any = None
1255
1251
  if utils.match_response(http_res, "201", "application/json"):
1256
1252
  return unmarshal_json_response(
1257
- Optional[operations.RegisterDomainResponseBody], http_res
1253
+ operations.RegisterDomainResponseBody, http_res
1258
1254
  )
1259
1255
  if utils.match_response(http_res, "400", "application/json"):
1260
1256
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -1311,7 +1307,7 @@ class Domains(BaseSDK):
1311
1307
  server_url: Optional[str] = None,
1312
1308
  timeout_ms: Optional[int] = None,
1313
1309
  http_headers: Optional[Mapping[str, str]] = None,
1314
- ) -> Optional[operations.RegisterDomainResponseBody]:
1310
+ ) -> operations.RegisterDomainResponseBody:
1315
1311
  r"""Register a domain
1316
1312
 
1317
1313
  Register a domain for the authenticated workspace. Only available for Enterprise Plans.
@@ -1374,7 +1370,7 @@ class Domains(BaseSDK):
1374
1370
  config=self.sdk_configuration,
1375
1371
  base_url=base_url or "",
1376
1372
  operation_id="registerDomain",
1377
- oauth2_scopes=[],
1373
+ oauth2_scopes=None,
1378
1374
  security_source=self.sdk_configuration.security,
1379
1375
  ),
1380
1376
  request=req,
@@ -1397,7 +1393,7 @@ class Domains(BaseSDK):
1397
1393
  response_data: Any = None
1398
1394
  if utils.match_response(http_res, "201", "application/json"):
1399
1395
  return unmarshal_json_response(
1400
- Optional[operations.RegisterDomainResponseBody], http_res
1396
+ operations.RegisterDomainResponseBody, http_res
1401
1397
  )
1402
1398
  if utils.match_response(http_res, "400", "application/json"):
1403
1399
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -1452,7 +1448,7 @@ class Domains(BaseSDK):
1452
1448
  server_url: Optional[str] = None,
1453
1449
  timeout_ms: Optional[int] = None,
1454
1450
  http_headers: Optional[Mapping[str, str]] = None,
1455
- ) -> Optional[List[operations.CheckDomainStatusResponseBody]]:
1451
+ ) -> List[operations.CheckDomainStatusResponseBody]:
1456
1452
  r"""Check the availability of one or more domains
1457
1453
 
1458
1454
  Check if a domain name is available for purchase. You can check multiple domains at once.
@@ -1506,7 +1502,7 @@ class Domains(BaseSDK):
1506
1502
  config=self.sdk_configuration,
1507
1503
  base_url=base_url or "",
1508
1504
  operation_id="checkDomainStatus",
1509
- oauth2_scopes=[],
1505
+ oauth2_scopes=None,
1510
1506
  security_source=self.sdk_configuration.security,
1511
1507
  ),
1512
1508
  request=req,
@@ -1529,7 +1525,7 @@ class Domains(BaseSDK):
1529
1525
  response_data: Any = None
1530
1526
  if utils.match_response(http_res, "200", "application/json"):
1531
1527
  return unmarshal_json_response(
1532
- Optional[List[operations.CheckDomainStatusResponseBody]], http_res
1528
+ List[operations.CheckDomainStatusResponseBody], http_res
1533
1529
  )
1534
1530
  if utils.match_response(http_res, "400", "application/json"):
1535
1531
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -1584,7 +1580,7 @@ class Domains(BaseSDK):
1584
1580
  server_url: Optional[str] = None,
1585
1581
  timeout_ms: Optional[int] = None,
1586
1582
  http_headers: Optional[Mapping[str, str]] = None,
1587
- ) -> Optional[List[operations.CheckDomainStatusResponseBody]]:
1583
+ ) -> List[operations.CheckDomainStatusResponseBody]:
1588
1584
  r"""Check the availability of one or more domains
1589
1585
 
1590
1586
  Check if a domain name is available for purchase. You can check multiple domains at once.
@@ -1638,7 +1634,7 @@ class Domains(BaseSDK):
1638
1634
  config=self.sdk_configuration,
1639
1635
  base_url=base_url or "",
1640
1636
  operation_id="checkDomainStatus",
1641
- oauth2_scopes=[],
1637
+ oauth2_scopes=None,
1642
1638
  security_source=self.sdk_configuration.security,
1643
1639
  ),
1644
1640
  request=req,
@@ -1661,7 +1657,7 @@ class Domains(BaseSDK):
1661
1657
  response_data: Any = None
1662
1658
  if utils.match_response(http_res, "200", "application/json"):
1663
1659
  return unmarshal_json_response(
1664
- Optional[List[operations.CheckDomainStatusResponseBody]], http_res
1660
+ List[operations.CheckDomainStatusResponseBody], http_res
1665
1661
  )
1666
1662
  if utils.match_response(http_res, "400", "application/json"):
1667
1663
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
dub/embed_tokens.py CHANGED
@@ -23,7 +23,7 @@ class EmbedTokens(BaseSDK):
23
23
  server_url: Optional[str] = None,
24
24
  timeout_ms: Optional[int] = None,
25
25
  http_headers: Optional[Mapping[str, str]] = None,
26
- ) -> Optional[operations.CreateReferralsEmbedTokenResponseBody]:
26
+ ) -> operations.CreateReferralsEmbedTokenResponseBody:
27
27
  r"""Create a referrals embed token
28
28
 
29
29
  Create a referrals embed token for the given partner/tenant.
@@ -88,7 +88,7 @@ class EmbedTokens(BaseSDK):
88
88
  config=self.sdk_configuration,
89
89
  base_url=base_url or "",
90
90
  operation_id="createReferralsEmbedToken",
91
- oauth2_scopes=[],
91
+ oauth2_scopes=None,
92
92
  security_source=self.sdk_configuration.security,
93
93
  ),
94
94
  request=req,
@@ -111,7 +111,7 @@ class EmbedTokens(BaseSDK):
111
111
  response_data: Any = None
112
112
  if utils.match_response(http_res, "201", "application/json"):
113
113
  return unmarshal_json_response(
114
- Optional[operations.CreateReferralsEmbedTokenResponseBody], http_res
114
+ operations.CreateReferralsEmbedTokenResponseBody, http_res
115
115
  )
116
116
  if utils.match_response(http_res, "400", "application/json"):
117
117
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -168,7 +168,7 @@ class EmbedTokens(BaseSDK):
168
168
  server_url: Optional[str] = None,
169
169
  timeout_ms: Optional[int] = None,
170
170
  http_headers: Optional[Mapping[str, str]] = None,
171
- ) -> Optional[operations.CreateReferralsEmbedTokenResponseBody]:
171
+ ) -> operations.CreateReferralsEmbedTokenResponseBody:
172
172
  r"""Create a referrals embed token
173
173
 
174
174
  Create a referrals embed token for the given partner/tenant.
@@ -233,7 +233,7 @@ class EmbedTokens(BaseSDK):
233
233
  config=self.sdk_configuration,
234
234
  base_url=base_url or "",
235
235
  operation_id="createReferralsEmbedToken",
236
- oauth2_scopes=[],
236
+ oauth2_scopes=None,
237
237
  security_source=self.sdk_configuration.security,
238
238
  ),
239
239
  request=req,
@@ -256,7 +256,7 @@ class EmbedTokens(BaseSDK):
256
256
  response_data: Any = None
257
257
  if utils.match_response(http_res, "201", "application/json"):
258
258
  return unmarshal_json_response(
259
- Optional[operations.CreateReferralsEmbedTokenResponseBody], http_res
259
+ operations.CreateReferralsEmbedTokenResponseBody, http_res
260
260
  )
261
261
  if utils.match_response(http_res, "400", "application/json"):
262
262
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
dub/events.py CHANGED
@@ -20,7 +20,7 @@ class Events(BaseSDK):
20
20
  server_url: Optional[str] = None,
21
21
  timeout_ms: Optional[int] = None,
22
22
  http_headers: Optional[Mapping[str, str]] = None,
23
- ) -> Optional[List[operations.ListEventsResponseBody]]:
23
+ ) -> List[operations.ListEventsResponseBody]:
24
24
  r"""Retrieve a list of events
25
25
 
26
26
  Retrieve a paginated list of events for the authenticated workspace.
@@ -74,7 +74,7 @@ class Events(BaseSDK):
74
74
  config=self.sdk_configuration,
75
75
  base_url=base_url or "",
76
76
  operation_id="listEvents",
77
- oauth2_scopes=[],
77
+ oauth2_scopes=None,
78
78
  security_source=self.sdk_configuration.security,
79
79
  ),
80
80
  request=req,
@@ -97,7 +97,7 @@ class Events(BaseSDK):
97
97
  response_data: Any = None
98
98
  if utils.match_response(http_res, "200", "application/json"):
99
99
  return unmarshal_json_response(
100
- Optional[List[operations.ListEventsResponseBody]], http_res
100
+ List[operations.ListEventsResponseBody], http_res
101
101
  )
102
102
  if utils.match_response(http_res, "400", "application/json"):
103
103
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -151,7 +151,7 @@ class Events(BaseSDK):
151
151
  server_url: Optional[str] = None,
152
152
  timeout_ms: Optional[int] = None,
153
153
  http_headers: Optional[Mapping[str, str]] = None,
154
- ) -> Optional[List[operations.ListEventsResponseBody]]:
154
+ ) -> List[operations.ListEventsResponseBody]:
155
155
  r"""Retrieve a list of events
156
156
 
157
157
  Retrieve a paginated list of events for the authenticated workspace.
@@ -205,7 +205,7 @@ class Events(BaseSDK):
205
205
  config=self.sdk_configuration,
206
206
  base_url=base_url or "",
207
207
  operation_id="listEvents",
208
- oauth2_scopes=[],
208
+ oauth2_scopes=None,
209
209
  security_source=self.sdk_configuration.security,
210
210
  ),
211
211
  request=req,
@@ -228,7 +228,7 @@ class Events(BaseSDK):
228
228
  response_data: Any = None
229
229
  if utils.match_response(http_res, "200", "application/json"):
230
230
  return unmarshal_json_response(
231
- Optional[List[operations.ListEventsResponseBody]], http_res
231
+ List[operations.ListEventsResponseBody], http_res
232
232
  )
233
233
  if utils.match_response(http_res, "400", "application/json"):
234
234
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
dub/folders.py CHANGED
@@ -23,7 +23,7 @@ class Folders(BaseSDK):
23
23
  server_url: Optional[str] = None,
24
24
  timeout_ms: Optional[int] = None,
25
25
  http_headers: Optional[Mapping[str, str]] = None,
26
- ) -> Optional[components.FolderSchema]:
26
+ ) -> components.FolderSchema:
27
27
  r"""Create a folder
28
28
 
29
29
  Create a folder for the authenticated workspace.
@@ -86,7 +86,7 @@ class Folders(BaseSDK):
86
86
  config=self.sdk_configuration,
87
87
  base_url=base_url or "",
88
88
  operation_id="createFolder",
89
- oauth2_scopes=[],
89
+ oauth2_scopes=None,
90
90
  security_source=self.sdk_configuration.security,
91
91
  ),
92
92
  request=req,
@@ -108,7 +108,7 @@ class Folders(BaseSDK):
108
108
 
109
109
  response_data: Any = None
110
110
  if utils.match_response(http_res, "201", "application/json"):
111
- return unmarshal_json_response(Optional[components.FolderSchema], http_res)
111
+ return unmarshal_json_response(components.FolderSchema, http_res)
112
112
  if utils.match_response(http_res, "400", "application/json"):
113
113
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
114
114
  raise errors.BadRequest(response_data, http_res)
@@ -164,7 +164,7 @@ class Folders(BaseSDK):
164
164
  server_url: Optional[str] = None,
165
165
  timeout_ms: Optional[int] = None,
166
166
  http_headers: Optional[Mapping[str, str]] = None,
167
- ) -> Optional[components.FolderSchema]:
167
+ ) -> components.FolderSchema:
168
168
  r"""Create a folder
169
169
 
170
170
  Create a folder for the authenticated workspace.
@@ -227,7 +227,7 @@ class Folders(BaseSDK):
227
227
  config=self.sdk_configuration,
228
228
  base_url=base_url or "",
229
229
  operation_id="createFolder",
230
- oauth2_scopes=[],
230
+ oauth2_scopes=None,
231
231
  security_source=self.sdk_configuration.security,
232
232
  ),
233
233
  request=req,
@@ -249,7 +249,7 @@ class Folders(BaseSDK):
249
249
 
250
250
  response_data: Any = None
251
251
  if utils.match_response(http_res, "201", "application/json"):
252
- return unmarshal_json_response(Optional[components.FolderSchema], http_res)
252
+ return unmarshal_json_response(components.FolderSchema, http_res)
253
253
  if utils.match_response(http_res, "400", "application/json"):
254
254
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
255
255
  raise errors.BadRequest(response_data, http_res)
@@ -302,7 +302,7 @@ class Folders(BaseSDK):
302
302
  server_url: Optional[str] = None,
303
303
  timeout_ms: Optional[int] = None,
304
304
  http_headers: Optional[Mapping[str, str]] = None,
305
- ) -> Optional[List[components.FolderSchema]]:
305
+ ) -> List[components.FolderSchema]:
306
306
  r"""Retrieve a list of folders
307
307
 
308
308
  Retrieve a list of folders for the authenticated workspace.
@@ -356,7 +356,7 @@ class Folders(BaseSDK):
356
356
  config=self.sdk_configuration,
357
357
  base_url=base_url or "",
358
358
  operation_id="listFolders",
359
- oauth2_scopes=[],
359
+ oauth2_scopes=None,
360
360
  security_source=self.sdk_configuration.security,
361
361
  ),
362
362
  request=req,
@@ -378,9 +378,7 @@ class Folders(BaseSDK):
378
378
 
379
379
  response_data: Any = None
380
380
  if utils.match_response(http_res, "200", "application/json"):
381
- return unmarshal_json_response(
382
- Optional[List[components.FolderSchema]], http_res
383
- )
381
+ return unmarshal_json_response(List[components.FolderSchema], http_res)
384
382
  if utils.match_response(http_res, "400", "application/json"):
385
383
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
386
384
  raise errors.BadRequest(response_data, http_res)
@@ -433,7 +431,7 @@ class Folders(BaseSDK):
433
431
  server_url: Optional[str] = None,
434
432
  timeout_ms: Optional[int] = None,
435
433
  http_headers: Optional[Mapping[str, str]] = None,
436
- ) -> Optional[List[components.FolderSchema]]:
434
+ ) -> List[components.FolderSchema]:
437
435
  r"""Retrieve a list of folders
438
436
 
439
437
  Retrieve a list of folders for the authenticated workspace.
@@ -487,7 +485,7 @@ class Folders(BaseSDK):
487
485
  config=self.sdk_configuration,
488
486
  base_url=base_url or "",
489
487
  operation_id="listFolders",
490
- oauth2_scopes=[],
488
+ oauth2_scopes=None,
491
489
  security_source=self.sdk_configuration.security,
492
490
  ),
493
491
  request=req,
@@ -509,9 +507,7 @@ class Folders(BaseSDK):
509
507
 
510
508
  response_data: Any = None
511
509
  if utils.match_response(http_res, "200", "application/json"):
512
- return unmarshal_json_response(
513
- Optional[List[components.FolderSchema]], http_res
514
- )
510
+ return unmarshal_json_response(List[components.FolderSchema], http_res)
515
511
  if utils.match_response(http_res, "400", "application/json"):
516
512
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
517
513
  raise errors.BadRequest(response_data, http_res)
@@ -568,7 +564,7 @@ class Folders(BaseSDK):
568
564
  server_url: Optional[str] = None,
569
565
  timeout_ms: Optional[int] = None,
570
566
  http_headers: Optional[Mapping[str, str]] = None,
571
- ) -> Optional[components.FolderSchema]:
567
+ ) -> components.FolderSchema:
572
568
  r"""Update a folder
573
569
 
574
570
  Update a folder in the workspace.
@@ -633,7 +629,7 @@ class Folders(BaseSDK):
633
629
  config=self.sdk_configuration,
634
630
  base_url=base_url or "",
635
631
  operation_id="updateFolder",
636
- oauth2_scopes=[],
632
+ oauth2_scopes=None,
637
633
  security_source=self.sdk_configuration.security,
638
634
  ),
639
635
  request=req,
@@ -655,7 +651,7 @@ class Folders(BaseSDK):
655
651
 
656
652
  response_data: Any = None
657
653
  if utils.match_response(http_res, "200", "application/json"):
658
- return unmarshal_json_response(Optional[components.FolderSchema], http_res)
654
+ return unmarshal_json_response(components.FolderSchema, http_res)
659
655
  if utils.match_response(http_res, "400", "application/json"):
660
656
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
661
657
  raise errors.BadRequest(response_data, http_res)
@@ -712,7 +708,7 @@ class Folders(BaseSDK):
712
708
  server_url: Optional[str] = None,
713
709
  timeout_ms: Optional[int] = None,
714
710
  http_headers: Optional[Mapping[str, str]] = None,
715
- ) -> Optional[components.FolderSchema]:
711
+ ) -> components.FolderSchema:
716
712
  r"""Update a folder
717
713
 
718
714
  Update a folder in the workspace.
@@ -777,7 +773,7 @@ class Folders(BaseSDK):
777
773
  config=self.sdk_configuration,
778
774
  base_url=base_url or "",
779
775
  operation_id="updateFolder",
780
- oauth2_scopes=[],
776
+ oauth2_scopes=None,
781
777
  security_source=self.sdk_configuration.security,
782
778
  ),
783
779
  request=req,
@@ -799,7 +795,7 @@ class Folders(BaseSDK):
799
795
 
800
796
  response_data: Any = None
801
797
  if utils.match_response(http_res, "200", "application/json"):
802
- return unmarshal_json_response(Optional[components.FolderSchema], http_res)
798
+ return unmarshal_json_response(components.FolderSchema, http_res)
803
799
  if utils.match_response(http_res, "400", "application/json"):
804
800
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
805
801
  raise errors.BadRequest(response_data, http_res)
@@ -850,7 +846,7 @@ class Folders(BaseSDK):
850
846
  server_url: Optional[str] = None,
851
847
  timeout_ms: Optional[int] = None,
852
848
  http_headers: Optional[Mapping[str, str]] = None,
853
- ) -> Optional[operations.DeleteFolderResponseBody]:
849
+ ) -> operations.DeleteFolderResponseBody:
854
850
  r"""Delete a folder
855
851
 
856
852
  Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.
@@ -904,7 +900,7 @@ class Folders(BaseSDK):
904
900
  config=self.sdk_configuration,
905
901
  base_url=base_url or "",
906
902
  operation_id="deleteFolder",
907
- oauth2_scopes=[],
903
+ oauth2_scopes=None,
908
904
  security_source=self.sdk_configuration.security,
909
905
  ),
910
906
  request=req,
@@ -927,7 +923,7 @@ class Folders(BaseSDK):
927
923
  response_data: Any = None
928
924
  if utils.match_response(http_res, "200", "application/json"):
929
925
  return unmarshal_json_response(
930
- Optional[operations.DeleteFolderResponseBody], http_res
926
+ operations.DeleteFolderResponseBody, http_res
931
927
  )
932
928
  if utils.match_response(http_res, "400", "application/json"):
933
929
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)
@@ -979,7 +975,7 @@ class Folders(BaseSDK):
979
975
  server_url: Optional[str] = None,
980
976
  timeout_ms: Optional[int] = None,
981
977
  http_headers: Optional[Mapping[str, str]] = None,
982
- ) -> Optional[operations.DeleteFolderResponseBody]:
978
+ ) -> operations.DeleteFolderResponseBody:
983
979
  r"""Delete a folder
984
980
 
985
981
  Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.
@@ -1033,7 +1029,7 @@ class Folders(BaseSDK):
1033
1029
  config=self.sdk_configuration,
1034
1030
  base_url=base_url or "",
1035
1031
  operation_id="deleteFolder",
1036
- oauth2_scopes=[],
1032
+ oauth2_scopes=None,
1037
1033
  security_source=self.sdk_configuration.security,
1038
1034
  ),
1039
1035
  request=req,
@@ -1056,7 +1052,7 @@ class Folders(BaseSDK):
1056
1052
  response_data: Any = None
1057
1053
  if utils.match_response(http_res, "200", "application/json"):
1058
1054
  return unmarshal_json_response(
1059
- Optional[operations.DeleteFolderResponseBody], http_res
1055
+ operations.DeleteFolderResponseBody, http_res
1060
1056
  )
1061
1057
  if utils.match_response(http_res, "400", "application/json"):
1062
1058
  response_data = unmarshal_json_response(errors.BadRequestData, http_res)