1- from typing import Any , Dict , Optional , Union
1+ from typing import Any , Dict , List , Optional , Union
22from typing_extensions import Self
33import abc
44
5- from seam .routes .types import AbstractRoutes
5+ from seam .routes .types import AbstractRoutes , Workspace
66
77
88class SeamApiException (Exception ):
@@ -23,8 +23,15 @@ def __init__(
2323 )
2424
2525
26- class AbstractSeam (AbstractRoutes ):
26+ class AbstractRequestMixin (abc .ABC ):
27+ @abc .abstractmethod
28+ def make_request (self , method : str , path : str , ** kwargs ):
29+ raise NotImplementedError
30+
31+
32+ class AbstractSeam (AbstractRoutes , AbstractRequestMixin ):
2733 lts_version : str
34+ wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]]
2835
2936 @abc .abstractmethod
3037 def __init__ (
@@ -36,11 +43,6 @@ def __init__(
3643 endpoint : Optional [str ] = None ,
3744 wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]] = False ,
3845 ):
39- self .wait_for_action_attempt = wait_for_action_attempt
40- self .lts_version = AbstractSeam .lts_version
41-
42- @abc .abstractmethod
43- def make_request (self , method : str , path : str , ** kwargs ) -> Any :
4446 raise NotImplementedError
4547
4648 @classmethod
@@ -65,3 +67,49 @@ def from_personal_access_token(
6567 wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]] = False ,
6668 ) -> Self :
6769 raise NotImplementedError
70+
71+
72+ class AbstractSeamMultiWorkspaceWorkspaces (abc .ABC ):
73+ @abc .abstractmethod
74+ def create (
75+ self ,
76+ * ,
77+ connect_partner_name : str ,
78+ name : str ,
79+ is_sandbox : Optional [bool ] = None ,
80+ webview_logo_shape : Optional [str ] = None ,
81+ webview_primary_button_color : Optional [str ] = None ,
82+ ) -> Workspace :
83+ raise NotImplementedError ()
84+
85+ @abc .abstractmethod
86+ def list (
87+ self ,
88+ ) -> List [Workspace ]:
89+ raise NotImplementedError ()
90+
91+
92+ class AbstractSeamMultiWorkspace (AbstractRequestMixin ):
93+ lts_version : str
94+ wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]]
95+
96+ @abc .abstractmethod
97+ def __init__ (
98+ self ,
99+ personal_access_token : str ,
100+ * ,
101+ endpoint : Optional [str ] = None ,
102+ wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]] = False ,
103+ ):
104+ raise NotImplementedError
105+
106+ @classmethod
107+ @abc .abstractmethod
108+ def from_personal_access_token (
109+ cls ,
110+ personal_access_token : str ,
111+ * ,
112+ endpoint : Optional [str ] = None ,
113+ wait_for_action_attempt : Optional [Union [bool , Dict [str , float ]]] = False ,
114+ ) -> Self :
115+ raise NotImplementedError
0 commit comments