File tree Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Expand file tree Collapse file tree 3 files changed +11
-20
lines changed Original file line number Diff line number Diff line change 12
12
User ,
13
13
)
14
14
from specklepy .core .api .models .current import (
15
+ LimitedWorkspace ,
15
16
PermissionCheckResult ,
16
17
ProjectWithPermissions ,
17
18
Workspace ,
@@ -94,7 +95,7 @@ def get_workspaces(
94
95
metrics .track (metrics .SDK , self .account , {"name" : "Active User Get Workspaces" })
95
96
return super ().get_workspaces (limit , cursor , filter )
96
97
97
- def get_active_workspace (self ) -> Optional [Workspace ]:
98
+ def get_active_workspace (self ) -> Optional [LimitedWorkspace ]:
98
99
metrics .track (
99
100
metrics .SDK , self .account , {"name" : "Active User Get Active Workspace" }
100
101
)
Original file line number Diff line number Diff line change @@ -213,15 +213,18 @@ class WorkspaceCreationState(GraphQLBaseModel):
213
213
completed : bool
214
214
215
215
216
- class Workspace (GraphQLBaseModel ):
216
+ class LimitedWorkspace (GraphQLBaseModel ):
217
217
id : str
218
218
name : str
219
219
role : Optional [str ]
220
220
slug : str
221
221
logo : Optional [str ]
222
+ description : Optional [str ]
223
+
224
+
225
+ class Workspace (LimitedWorkspace ):
222
226
created_at : datetime
223
227
updated_at : datetime
224
228
read_only : bool
225
- description : Optional [str ]
226
229
creation_state : Optional [WorkspaceCreationState ]
227
230
permissions : WorkspacePermissionChecks
Original file line number Diff line number Diff line change 14
14
User ,
15
15
)
16
16
from specklepy .core .api .models .current import (
17
+ LimitedWorkspace ,
17
18
PermissionCheckResult ,
18
19
ProjectWithPermissions ,
19
20
Workspace ,
@@ -295,7 +296,7 @@ def get_workspaces(
295
296
296
297
return response .data .data
297
298
298
- def get_active_workspace (self ) -> Optional [Workspace ]:
299
+ def get_active_workspace (self ) -> Optional [LimitedWorkspace ]:
299
300
"""
300
301
This feature is only available on Workspace enabled servers (server versions
301
302
>=2.23.17) e.g. app.speckle.systems
@@ -310,29 +311,15 @@ def get_active_workspace(self) -> Optional[Workspace]:
310
311
role
311
312
slug
312
313
logo
313
- createdAt
314
- updatedAt
315
- readOnly
316
314
description
317
- creationState
318
- {
319
- completed
320
- }
321
- permissions {
322
- canCreateProject {
323
- authorized
324
- code
325
- message
326
- }
327
- }
328
315
}
329
316
}
330
317
}
331
- """ # noqa: E501
318
+ """
332
319
)
333
320
334
321
response = self .make_request_and_parse_response (
335
- DataResponse [Optional [DataResponse [Optional [Workspace ]]]],
322
+ DataResponse [Optional [DataResponse [Optional [LimitedWorkspace ]]]],
336
323
QUERY ,
337
324
)
338
325
You can’t perform that action at this time.
0 commit comments