cmdop 0.1.25__py3-none-any.whl → 0.1.27__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.
- cmdop/__init__.py +9 -4
- cmdop/_generated/rpc_messages/browser_pb2.py +138 -138
- cmdop/_generated/rpc_messages/browser_pb2.pyi +6 -2
- cmdop/api/generated/machines/__init__.py +1 -1
- cmdop/api/generated/machines/enums.py +0 -112
- cmdop/api/generated/machines/machines__api__machine_sharing/client.py +21 -6
- cmdop/api/generated/machines/machines__api__machine_sharing/models.py +46 -19
- cmdop/api/generated/machines/machines__api__machine_sharing/sync_client.py +20 -5
- cmdop/api/generated/machines/machines__api__machines/client.py +90 -25
- cmdop/api/generated/machines/machines__api__machines/models.py +143 -125
- cmdop/api/generated/machines/machines__api__machines/sync_client.py +84 -19
- cmdop/api/generated/machines/schema.json +72 -0
- cmdop/api/generated/system/__init__.py +1 -1
- cmdop/api/generated/system/enums.py +0 -52
- cmdop/api/generated/system/schema.json +54 -0
- cmdop/api/generated/system/system__api__oauth/client.py +42 -12
- cmdop/api/generated/system/system__api__oauth/models.py +111 -85
- cmdop/api/generated/system/system__api__oauth/sync_client.py +38 -8
- cmdop/api/generated/system/system__api__system/client.py +98 -23
- cmdop/api/generated/system/system__api__system/models.py +83 -83
- cmdop/api/generated/system/system__api__system/sync_client.py +94 -19
- cmdop/api/generated/workspaces/__init__.py +1 -1
- cmdop/api/generated/workspaces/enums.py +0 -137
- cmdop/api/generated/workspaces/schema.json +47 -0
- cmdop/api/generated/workspaces/workspaces__api__workspaces/client.py +156 -41
- cmdop/api/generated/workspaces/workspaces__api__workspaces/models.py +126 -85
- cmdop/api/generated/workspaces/workspaces__api__workspaces/sync_client.py +145 -29
- cmdop/helpers/__init__.py +0 -4
- cmdop/services/browser/service/sync.py +4 -0
- cmdop/services/files.py +159 -17
- {cmdop-0.1.25.dist-info → cmdop-0.1.27.dist-info}/METADATA +47 -19
- {cmdop-0.1.25.dist-info → cmdop-0.1.27.dist-info}/RECORD +34 -36
- cmdop/helpers/cleaner.py +0 -53
- cmdop/helpers/formatting.py +0 -15
- {cmdop-0.1.25.dist-info → cmdop-0.1.27.dist-info}/WHEEL +0 -0
- {cmdop-0.1.25.dist-info → cmdop-0.1.27.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,12 +6,13 @@ from typing import Any
|
|
|
6
6
|
|
|
7
7
|
from pydantic import BaseModel, ConfigDict, Field
|
|
8
8
|
|
|
9
|
-
from ..enums import PatchedWorkspaceMemberRequestRole, PatchedWorkspaceRequestPlan, PatchedWorkspaceRequestType,
|
|
9
|
+
from ..enums import PatchedWorkspaceMemberRequestRole, PatchedWorkspaceRequestPlan, PatchedWorkspaceRequestType, WorkspaceInvitationCreateRequestRole, WorkspaceInvitationRole, WorkspaceInvitationStatus
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class InvitedBy(BaseModel):
|
|
13
13
|
"""
|
|
14
|
-
|
|
14
|
+
Basic user info for invitation inviter.
|
|
15
|
+
|
|
15
16
|
Response model (includes read-only fields).
|
|
16
17
|
"""
|
|
17
18
|
|
|
@@ -21,15 +22,10 @@ class PaginatedWorkspaceInvitationList(BaseModel):
|
|
|
21
22
|
frozen=False,
|
|
22
23
|
)
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
has_next: bool = Field(description='Whether there is a next page')
|
|
29
|
-
has_previous: bool = Field(description='Whether there is a previous page')
|
|
30
|
-
next_page: int | None = Field(None, description='Next page number (null if no next page)')
|
|
31
|
-
previous_page: int | None = Field(None, description='Previous page number (null if no previous page)')
|
|
32
|
-
results: list[dict[str, Any]] = Field(description='Array of items for current page')
|
|
25
|
+
id: int = ...
|
|
26
|
+
email: Any = ...
|
|
27
|
+
first_name: Any = ...
|
|
28
|
+
last_name: Any = ...
|
|
33
29
|
|
|
34
30
|
|
|
35
31
|
|
|
@@ -50,21 +46,20 @@ class WorkspaceInvitation(BaseModel):
|
|
|
50
46
|
workspace: str = ...
|
|
51
47
|
workspace_name: Any = ...
|
|
52
48
|
email: str = Field(max_length=254)
|
|
53
|
-
role: WorkspaceInvitationRole = Field(None, description='* `admin` - Admin\n* `member` - Member')
|
|
49
|
+
role: WorkspaceInvitationRole | None = Field(None, description='* `admin` - Admin\n* `member` - Member')
|
|
54
50
|
status: WorkspaceInvitationStatus = Field(description='* `pending` - Pending\n* `accepted` - Accepted\n* `declined` - Declined\n* `expired` - Expired\n* `cancelled` - Cancelled')
|
|
55
|
-
invited_by:
|
|
51
|
+
invited_by: InvitedBy = ...
|
|
56
52
|
created_at: Any = ...
|
|
57
53
|
expires_at: Any = ...
|
|
58
|
-
accepted_at: Any | None =
|
|
54
|
+
accepted_at: Any | None = None
|
|
59
55
|
is_expired: bool = ...
|
|
60
56
|
is_valid: bool = ...
|
|
61
57
|
|
|
62
58
|
|
|
63
59
|
|
|
64
|
-
class
|
|
60
|
+
class PaginatedWorkspaceInvitationList(BaseModel):
|
|
65
61
|
"""
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
|
|
68
63
|
Response model (includes read-only fields).
|
|
69
64
|
"""
|
|
70
65
|
|
|
@@ -74,23 +69,23 @@ class WorkspaceInvitationPublic(BaseModel):
|
|
|
74
69
|
frozen=False,
|
|
75
70
|
)
|
|
76
71
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
is_valid: bool = ...
|
|
72
|
+
count: int = Field(description='Total number of items across all pages')
|
|
73
|
+
page: int = Field(description='Current page number (1-based)')
|
|
74
|
+
pages: int = Field(description='Total number of pages')
|
|
75
|
+
page_size: int = Field(description='Number of items per page')
|
|
76
|
+
has_next: bool = Field(description='Whether there is a next page')
|
|
77
|
+
has_previous: bool = Field(description='Whether there is a previous page')
|
|
78
|
+
next_page: int | None = Field(None, description='Next page number (null if no next page)')
|
|
79
|
+
previous_page: int | None = Field(None, description='Previous page number (null if no previous page)')
|
|
80
|
+
results: list[WorkspaceInvitation] = Field(description='Array of items for current page')
|
|
87
81
|
|
|
88
82
|
|
|
89
83
|
|
|
90
|
-
class
|
|
84
|
+
class WorkspaceInvitationCreateRequest(BaseModel):
|
|
91
85
|
"""
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
Serializer for creating workspace invitation.
|
|
87
|
+
|
|
88
|
+
Request model (no read-only fields).
|
|
94
89
|
"""
|
|
95
90
|
|
|
96
91
|
model_config = ConfigDict(
|
|
@@ -99,23 +94,16 @@ class PaginatedWorkspaceMemberList(BaseModel):
|
|
|
99
94
|
frozen=False,
|
|
100
95
|
)
|
|
101
96
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
pages: int = Field(description='Total number of pages')
|
|
105
|
-
page_size: int = Field(description='Number of items per page')
|
|
106
|
-
has_next: bool = Field(description='Whether there is a next page')
|
|
107
|
-
has_previous: bool = Field(description='Whether there is a previous page')
|
|
108
|
-
next_page: int | None = Field(None, description='Next page number (null if no next page)')
|
|
109
|
-
previous_page: int | None = Field(None, description='Previous page number (null if no previous page)')
|
|
110
|
-
results: list[dict[str, Any]] = Field(description='Array of items for current page')
|
|
97
|
+
email: str = Field(min_length=1)
|
|
98
|
+
role: WorkspaceInvitationCreateRequestRole | None = Field(None, description='* `admin` - admin\n* `member` - member')
|
|
111
99
|
|
|
112
100
|
|
|
113
101
|
|
|
114
|
-
class
|
|
102
|
+
class WorkspaceInvitationRequest(BaseModel):
|
|
115
103
|
"""
|
|
116
|
-
Serializer for
|
|
104
|
+
Serializer for WorkspaceInvitation model.
|
|
117
105
|
|
|
118
|
-
|
|
106
|
+
Request model (no read-only fields).
|
|
119
107
|
"""
|
|
120
108
|
|
|
121
109
|
model_config = ConfigDict(
|
|
@@ -124,19 +112,32 @@ class WorkspaceMember(BaseModel):
|
|
|
124
112
|
frozen=False,
|
|
125
113
|
)
|
|
126
114
|
|
|
127
|
-
id: Any = ...
|
|
128
115
|
workspace: str = ...
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
role: WorkspaceMemberRole = Field(None, description='* `owner` - Owner\n* `admin` - Admin\n* `member` - Member')
|
|
132
|
-
joined_at: Any = ...
|
|
116
|
+
email: str = Field(min_length=1, max_length=254)
|
|
117
|
+
role: WorkspaceInvitationRole | None = Field(None, description='* `admin` - Admin\n* `member` - Member')
|
|
133
118
|
|
|
134
119
|
|
|
135
120
|
|
|
136
|
-
class
|
|
121
|
+
class WorkspaceInvitationAcceptRequest(BaseModel):
|
|
137
122
|
"""
|
|
138
|
-
Serializer for
|
|
139
|
-
|
|
123
|
+
Serializer for accepting workspace invitation.
|
|
124
|
+
|
|
125
|
+
Request model (no read-only fields).
|
|
126
|
+
"""
|
|
127
|
+
|
|
128
|
+
model_config = ConfigDict(
|
|
129
|
+
validate_assignment=True,
|
|
130
|
+
extra="allow",
|
|
131
|
+
frozen=False,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
token: str = Field(min_length=1, max_length=64)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class WorkspaceInvitationPublic(BaseModel):
|
|
139
|
+
"""
|
|
140
|
+
Public serializer for invitation details (for accept page).
|
|
140
141
|
|
|
141
142
|
Response model (includes read-only fields).
|
|
142
143
|
"""
|
|
@@ -148,21 +149,23 @@ class Workspace(BaseModel):
|
|
|
148
149
|
)
|
|
149
150
|
|
|
150
151
|
id: Any = ...
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
workspace_name: Any = ...
|
|
153
|
+
email: str = Field(max_length=254)
|
|
154
|
+
role: WorkspaceInvitationRole | None = Field(None, description='* `admin` - Admin\n* `member` - Member')
|
|
155
|
+
status: WorkspaceInvitationStatus | None = Field(None, description='* `pending` - Pending\n* `accepted` - Accepted\n* `declined` - Declined\n* `expired` - Expired\n* `cancelled` - Cancelled')
|
|
156
|
+
invited_by_name: Any = ...
|
|
155
157
|
created_at: Any = ...
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
expires_at: str | None = None
|
|
159
|
+
is_expired: bool = ...
|
|
160
|
+
is_valid: bool = ...
|
|
158
161
|
|
|
159
162
|
|
|
160
163
|
|
|
161
|
-
class
|
|
164
|
+
class UserBasic(BaseModel):
|
|
162
165
|
"""
|
|
163
|
-
|
|
166
|
+
Basic user info for workspace members.
|
|
164
167
|
|
|
165
|
-
|
|
168
|
+
Response model (includes read-only fields).
|
|
166
169
|
"""
|
|
167
170
|
|
|
168
171
|
model_config = ConfigDict(
|
|
@@ -171,16 +174,19 @@ class WorkspaceInvitationCreateRequest(BaseModel):
|
|
|
171
174
|
frozen=False,
|
|
172
175
|
)
|
|
173
176
|
|
|
174
|
-
|
|
175
|
-
|
|
177
|
+
id: int = ...
|
|
178
|
+
email: Any = ...
|
|
179
|
+
first_name: Any = ...
|
|
180
|
+
last_name: Any = ...
|
|
181
|
+
username: Any = Field(description='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.')
|
|
176
182
|
|
|
177
183
|
|
|
178
184
|
|
|
179
|
-
class
|
|
185
|
+
class WorkspaceMember(BaseModel):
|
|
180
186
|
"""
|
|
181
|
-
Serializer for
|
|
187
|
+
Serializer for WorkspaceMember model.
|
|
182
188
|
|
|
183
|
-
|
|
189
|
+
Response model (includes read-only fields).
|
|
184
190
|
"""
|
|
185
191
|
|
|
186
192
|
model_config = ConfigDict(
|
|
@@ -189,17 +195,19 @@ class WorkspaceInvitationRequest(BaseModel):
|
|
|
189
195
|
frozen=False,
|
|
190
196
|
)
|
|
191
197
|
|
|
198
|
+
id: Any = ...
|
|
192
199
|
workspace: str = ...
|
|
193
|
-
|
|
194
|
-
|
|
200
|
+
workspace_name: Any = ...
|
|
201
|
+
user: UserBasic = ...
|
|
202
|
+
role: PatchedWorkspaceMemberRequestRole | None = Field(None, description='* `owner` - Owner\n* `admin` - Admin\n* `member` - Member')
|
|
203
|
+
joined_at: Any = ...
|
|
195
204
|
|
|
196
205
|
|
|
197
206
|
|
|
198
|
-
class
|
|
207
|
+
class PaginatedWorkspaceMemberList(BaseModel):
|
|
199
208
|
"""
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
Request model (no read-only fields).
|
|
209
|
+
|
|
210
|
+
Response model (includes read-only fields).
|
|
203
211
|
"""
|
|
204
212
|
|
|
205
213
|
model_config = ConfigDict(
|
|
@@ -208,7 +216,15 @@ class WorkspaceInvitationAcceptRequest(BaseModel):
|
|
|
208
216
|
frozen=False,
|
|
209
217
|
)
|
|
210
218
|
|
|
211
|
-
|
|
219
|
+
count: int = Field(description='Total number of items across all pages')
|
|
220
|
+
page: int = Field(description='Current page number (1-based)')
|
|
221
|
+
pages: int = Field(description='Total number of pages')
|
|
222
|
+
page_size: int = Field(description='Number of items per page')
|
|
223
|
+
has_next: bool = Field(description='Whether there is a next page')
|
|
224
|
+
has_previous: bool = Field(description='Whether there is a previous page')
|
|
225
|
+
next_page: int | None = Field(None, description='Next page number (null if no next page)')
|
|
226
|
+
previous_page: int | None = Field(None, description='Previous page number (null if no previous page)')
|
|
227
|
+
results: list[WorkspaceMember] = Field(description='Array of items for current page')
|
|
212
228
|
|
|
213
229
|
|
|
214
230
|
|
|
@@ -226,8 +242,8 @@ class WorkspaceMemberRequest(BaseModel):
|
|
|
226
242
|
)
|
|
227
243
|
|
|
228
244
|
workspace: str = ...
|
|
229
|
-
user_id: str = None
|
|
230
|
-
role:
|
|
245
|
+
user_id: str | None = None
|
|
246
|
+
role: PatchedWorkspaceMemberRequestRole | None = Field(None, description='* `owner` - Owner\n* `admin` - Admin\n* `member` - Member')
|
|
231
247
|
|
|
232
248
|
|
|
233
249
|
|
|
@@ -244,9 +260,34 @@ class PatchedWorkspaceMemberRequest(BaseModel):
|
|
|
244
260
|
frozen=False,
|
|
245
261
|
)
|
|
246
262
|
|
|
247
|
-
workspace: str = None
|
|
248
|
-
user_id: str = None
|
|
249
|
-
role: PatchedWorkspaceMemberRequestRole = Field(None, description='* `owner` - Owner\n* `admin` - Admin\n* `member` - Member')
|
|
263
|
+
workspace: str | None = None
|
|
264
|
+
user_id: str | None = None
|
|
265
|
+
role: PatchedWorkspaceMemberRequestRole | None = Field(None, description='* `owner` - Owner\n* `admin` - Admin\n* `member` - Member')
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class Workspace(BaseModel):
|
|
270
|
+
"""
|
|
271
|
+
Serializer for Workspace model. All fields are always present in responses
|
|
272
|
+
(even read_only ones).
|
|
273
|
+
|
|
274
|
+
Response model (includes read-only fields).
|
|
275
|
+
"""
|
|
276
|
+
|
|
277
|
+
model_config = ConfigDict(
|
|
278
|
+
validate_assignment=True,
|
|
279
|
+
extra="allow",
|
|
280
|
+
frozen=False,
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
id: Any = ...
|
|
284
|
+
name: str = Field(max_length=100)
|
|
285
|
+
slug: str = Field(max_length=100, pattern='^[-a-zA-Z0-9_]+$')
|
|
286
|
+
type: PatchedWorkspaceRequestType | None = Field(None, description='* `personal` - Personal\n* `team` - Team')
|
|
287
|
+
plan: PatchedWorkspaceRequestPlan | None = Field(None, description='* `free` - Free\n* `pro` - Pro\n* `enterprise` - Enterprise')
|
|
288
|
+
created_at: Any = ...
|
|
289
|
+
member_count: int = ...
|
|
290
|
+
machine_count: int = ...
|
|
250
291
|
|
|
251
292
|
|
|
252
293
|
|
|
@@ -264,8 +305,8 @@ class WorkspaceCreateRequest(BaseModel):
|
|
|
264
305
|
)
|
|
265
306
|
|
|
266
307
|
name: str = Field(min_length=1, max_length=100)
|
|
267
|
-
type:
|
|
268
|
-
plan:
|
|
308
|
+
type: PatchedWorkspaceRequestType | None = Field(None, description='* `personal` - Personal\n* `team` - Team')
|
|
309
|
+
plan: PatchedWorkspaceRequestPlan | None = Field(None, description='* `free` - Free\n* `pro` - Pro\n* `enterprise` - Enterprise')
|
|
269
310
|
|
|
270
311
|
|
|
271
312
|
|
|
@@ -285,8 +326,8 @@ class WorkspaceRequest(BaseModel):
|
|
|
285
326
|
|
|
286
327
|
name: str = Field(min_length=1, max_length=100)
|
|
287
328
|
slug: str = Field(min_length=1, max_length=100, pattern='^[-a-zA-Z0-9_]+$')
|
|
288
|
-
type:
|
|
289
|
-
plan:
|
|
329
|
+
type: PatchedWorkspaceRequestType | None = Field(None, description='* `personal` - Personal\n* `team` - Team')
|
|
330
|
+
plan: PatchedWorkspaceRequestPlan | None = Field(None, description='* `free` - Free\n* `pro` - Pro\n* `enterprise` - Enterprise')
|
|
290
331
|
|
|
291
332
|
|
|
292
333
|
|
|
@@ -304,10 +345,10 @@ class PatchedWorkspaceRequest(BaseModel):
|
|
|
304
345
|
frozen=False,
|
|
305
346
|
)
|
|
306
347
|
|
|
307
|
-
name: str = Field(None, min_length=1, max_length=100)
|
|
308
|
-
slug: str = Field(None, min_length=1, max_length=100, pattern='^[-a-zA-Z0-9_]+$')
|
|
309
|
-
type: PatchedWorkspaceRequestType = Field(None, description='* `personal` - Personal\n* `team` - Team')
|
|
310
|
-
plan: PatchedWorkspaceRequestPlan = Field(None, description='* `free` - Free\n* `pro` - Pro\n* `enterprise` - Enterprise')
|
|
348
|
+
name: str | None = Field(None, min_length=1, max_length=100)
|
|
349
|
+
slug: str | None = Field(None, min_length=1, max_length=100, pattern='^[-a-zA-Z0-9_]+$')
|
|
350
|
+
type: PatchedWorkspaceRequestType | None = Field(None, description='* `personal` - Personal\n* `team` - Team')
|
|
351
|
+
plan: PatchedWorkspaceRequestPlan | None = Field(None, description='* `free` - Free\n* `pro` - Pro\n* `enterprise` - Enterprise')
|
|
311
352
|
|
|
312
353
|
|
|
313
354
|
|