kscale 0.0.13__cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Sign up to get free protection for your applications and to get access to all the features.
- kscale/__init__.py +9 -0
- kscale/api.py +14 -0
- kscale/artifacts/__init__.py +8 -0
- kscale/artifacts/plane.obj +18 -0
- kscale/artifacts/plane.urdf +28 -0
- kscale/cli.py +25 -0
- kscale/conf.py +45 -0
- kscale/py.typed +0 -0
- kscale/requirements-dev.txt +11 -0
- kscale/requirements.txt +17 -0
- kscale/rust.cpython-311-i386-linux-gnu.so +0 -0
- kscale/utils/__init__.py +0 -0
- kscale/utils/api_base.py +6 -0
- kscale/utils/checksum.py +41 -0
- kscale/utils/cli.py +28 -0
- kscale/web/__init__.py +0 -0
- kscale/web/api.py +98 -0
- kscale/web/gen/__init__.py +0 -0
- kscale/web/gen/api.py +612 -0
- kscale/web/kernels.py +207 -0
- kscale/web/krec.py +175 -0
- kscale/web/pybullet.py +188 -0
- kscale/web/urdf.py +185 -0
- kscale/web/utils.py +48 -0
- kscale/web/www_client.py +134 -0
- kscale-0.0.13.dist-info/LICENSE +21 -0
- kscale-0.0.13.dist-info/METADATA +55 -0
- kscale-0.0.13.dist-info/RECORD +31 -0
- kscale-0.0.13.dist-info/WHEEL +8 -0
- kscale-0.0.13.dist-info/entry_points.txt +2 -0
- kscale-0.0.13.dist-info/top_level.txt +1 -0
kscale/web/gen/api.py
ADDED
@@ -0,0 +1,612 @@
|
|
1
|
+
"""Auto-generated by generate.sh script."""
|
2
|
+
|
3
|
+
# generated by datamodel-codegen:
|
4
|
+
# filename: openapi.json
|
5
|
+
# timestamp: 2024-11-22T23:25:21+00:00
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
from enum import Enum
|
10
|
+
from typing import Any, Dict, List, Optional, Union
|
11
|
+
|
12
|
+
from pydantic import BaseModel, EmailStr, Field
|
13
|
+
|
14
|
+
|
15
|
+
class ArtifactUrls(BaseModel):
|
16
|
+
small: Optional[str] = Field(None, title="Small")
|
17
|
+
large: str = Field(..., title="Large")
|
18
|
+
expires_at: int = Field(..., title="Expires At")
|
19
|
+
|
20
|
+
|
21
|
+
class AuthResponse(BaseModel):
|
22
|
+
api_key: str = Field(..., title="Api Key")
|
23
|
+
|
24
|
+
|
25
|
+
class InventoryType(Enum):
|
26
|
+
finite = "finite"
|
27
|
+
preorder = "preorder"
|
28
|
+
|
29
|
+
|
30
|
+
class BodyAddListingListingsAddPost(BaseModel):
|
31
|
+
name: str = Field(..., title="Name")
|
32
|
+
description: Optional[str] = Field(None, title="Description")
|
33
|
+
child_ids: Optional[str] = Field("", title="Child Ids")
|
34
|
+
slug: str = Field(..., title="Slug")
|
35
|
+
price_amount: Optional[str] = Field(None, title="Price Amount")
|
36
|
+
currency: Optional[str] = Field("usd", title="Currency")
|
37
|
+
inventory_type: Optional[InventoryType] = Field("finite", title="Inventory Type")
|
38
|
+
inventory_quantity: Optional[str] = Field(None, title="Inventory Quantity")
|
39
|
+
preorder_deposit_amount: Optional[str] = Field(None, title="Preorder Deposit Amount")
|
40
|
+
preorder_release_date: Optional[str] = Field(None, title="Preorder Release Date")
|
41
|
+
photos: Optional[List[bytes]] = Field(None, title="Photos")
|
42
|
+
|
43
|
+
|
44
|
+
class BodyCreateConnectAccountSessionStripeConnectAccountSessionPost(BaseModel):
|
45
|
+
account_id: str = Field(..., title="Account Id")
|
46
|
+
|
47
|
+
|
48
|
+
class BodyPullOnshapeDocumentOnshapePullListingIdGet(BaseModel):
|
49
|
+
suffix_to_joint_effort: Optional[Dict[str, float]] = Field(None, title="Suffix To Joint Effort")
|
50
|
+
suffix_to_joint_velocity: Optional[Dict[str, float]] = Field(None, title="Suffix To Joint Velocity")
|
51
|
+
|
52
|
+
|
53
|
+
class BodyUploadArtifactsUploadListingIdPost(BaseModel):
|
54
|
+
files: List[bytes] = Field(..., title="Files")
|
55
|
+
|
56
|
+
|
57
|
+
class CancelReason(BaseModel):
|
58
|
+
reason: str = Field(..., title="Reason")
|
59
|
+
details: str = Field(..., title="Details")
|
60
|
+
|
61
|
+
|
62
|
+
class ClientIdResponse(BaseModel):
|
63
|
+
client_id: str = Field(..., title="Client Id")
|
64
|
+
|
65
|
+
|
66
|
+
class CreateCheckoutSessionRequest(BaseModel):
|
67
|
+
listing_id: str = Field(..., title="Listing Id")
|
68
|
+
stripe_product_id: str = Field(..., title="Stripe Product Id")
|
69
|
+
cancel_url: str = Field(..., title="Cancel Url")
|
70
|
+
|
71
|
+
|
72
|
+
class CreateCheckoutSessionResponse(BaseModel):
|
73
|
+
session_id: str = Field(..., title="Session Id")
|
74
|
+
stripe_connect_account_id: str = Field(..., title="Stripe Connect Account Id")
|
75
|
+
|
76
|
+
|
77
|
+
class CreateConnectAccountResponse(BaseModel):
|
78
|
+
account_id: str = Field(..., title="Account Id")
|
79
|
+
|
80
|
+
|
81
|
+
class CreateRefundsRequest(BaseModel):
|
82
|
+
payment_intent_id: str = Field(..., title="Payment Intent Id")
|
83
|
+
cancel_reason: CancelReason
|
84
|
+
amount: int = Field(..., title="Amount")
|
85
|
+
|
86
|
+
|
87
|
+
class CreateRobotRequest(BaseModel):
|
88
|
+
listing_id: str = Field(..., title="Listing Id")
|
89
|
+
name: str = Field(..., title="Name")
|
90
|
+
description: Optional[str] = Field(None, title="Description")
|
91
|
+
order_id: Optional[str] = Field(None, title="Order Id")
|
92
|
+
|
93
|
+
|
94
|
+
class DeleteTestAccountsResponse(BaseModel):
|
95
|
+
success: bool = Field(..., title="Success")
|
96
|
+
deleted_accounts: List[str] = Field(..., title="Deleted Accounts")
|
97
|
+
count: int = Field(..., title="Count")
|
98
|
+
|
99
|
+
|
100
|
+
class DeleteTokenResponse(BaseModel):
|
101
|
+
message: str = Field(..., title="Message")
|
102
|
+
|
103
|
+
|
104
|
+
class EmailSignUpRequest(BaseModel):
|
105
|
+
email: EmailStr = Field(..., title="Email")
|
106
|
+
|
107
|
+
|
108
|
+
class EmailSignUpResponse(BaseModel):
|
109
|
+
message: str = Field(..., title="Message")
|
110
|
+
|
111
|
+
|
112
|
+
class FeaturedListingsResponse(BaseModel):
|
113
|
+
listing_ids: List[str] = Field(..., title="Listing Ids")
|
114
|
+
|
115
|
+
|
116
|
+
class GetTokenResponse(BaseModel):
|
117
|
+
id: str = Field(..., title="Id")
|
118
|
+
email: str = Field(..., title="Email")
|
119
|
+
|
120
|
+
|
121
|
+
class GithubAuthRequest(BaseModel):
|
122
|
+
code: str = Field(..., title="Code")
|
123
|
+
|
124
|
+
|
125
|
+
class GithubAuthResponse(BaseModel):
|
126
|
+
api_key: str = Field(..., title="Api Key")
|
127
|
+
|
128
|
+
|
129
|
+
class GoogleLogin(BaseModel):
|
130
|
+
token: str = Field(..., title="Token")
|
131
|
+
|
132
|
+
|
133
|
+
class KRec(BaseModel):
|
134
|
+
id: str = Field(..., title="Id")
|
135
|
+
user_id: str = Field(..., title="User Id")
|
136
|
+
robot_id: str = Field(..., title="Robot Id")
|
137
|
+
created_at: int = Field(..., title="Created At")
|
138
|
+
name: str = Field(..., title="Name")
|
139
|
+
description: Optional[str] = Field(None, title="Description")
|
140
|
+
|
141
|
+
|
142
|
+
class KRecUrls(BaseModel):
|
143
|
+
url: str = Field(..., title="Url")
|
144
|
+
filename: str = Field(..., title="Filename")
|
145
|
+
expires_at: int = Field(..., title="Expires At")
|
146
|
+
checksum: Optional[str] = Field(None, title="Checksum")
|
147
|
+
|
148
|
+
|
149
|
+
class Permission(Enum):
|
150
|
+
read = "read"
|
151
|
+
write = "write"
|
152
|
+
admin = "admin"
|
153
|
+
|
154
|
+
|
155
|
+
class KeysResponseItem(BaseModel):
|
156
|
+
token: str = Field(..., title="Token")
|
157
|
+
permissions: Optional[List[Permission]] = Field(..., title="Permissions")
|
158
|
+
|
159
|
+
|
160
|
+
class ListKeysResponse(BaseModel):
|
161
|
+
keys: List[KeysResponseItem] = Field(..., title="Keys")
|
162
|
+
|
163
|
+
|
164
|
+
class Listing(BaseModel):
|
165
|
+
id: str = Field(..., title="Id")
|
166
|
+
user_id: str = Field(..., title="User Id")
|
167
|
+
created_at: int = Field(..., title="Created At")
|
168
|
+
updated_at: int = Field(..., title="Updated At")
|
169
|
+
name: str = Field(..., title="Name")
|
170
|
+
slug: str = Field(..., title="Slug")
|
171
|
+
child_ids: List[str] = Field(..., title="Child Ids")
|
172
|
+
description: Optional[str] = Field(None, title="Description")
|
173
|
+
onshape_url: Optional[str] = Field(None, title="Onshape Url")
|
174
|
+
views: Optional[int] = Field(0, title="Views")
|
175
|
+
score: Optional[int] = Field(0, title="Score")
|
176
|
+
price_amount: Optional[int] = Field(None, title="Price Amount")
|
177
|
+
currency: Optional[str] = Field("usd", title="Currency")
|
178
|
+
stripe_product_id: Optional[str] = Field(None, title="Stripe Product Id")
|
179
|
+
stripe_price_id: Optional[str] = Field(None, title="Stripe Price Id")
|
180
|
+
preorder_deposit_amount: Optional[int] = Field(None, title="Preorder Deposit Amount")
|
181
|
+
stripe_preorder_deposit_id: Optional[str] = Field(None, title="Stripe Preorder Deposit Id")
|
182
|
+
inventory_type: Optional[InventoryType] = Field("finite", title="Inventory Type")
|
183
|
+
inventory_quantity: Optional[int] = Field(None, title="Inventory Quantity")
|
184
|
+
preorder_release_date: Optional[int] = Field(None, title="Preorder Release Date")
|
185
|
+
|
186
|
+
|
187
|
+
class ListingInfo(BaseModel):
|
188
|
+
id: str = Field(..., title="Id")
|
189
|
+
username: str = Field(..., title="Username")
|
190
|
+
slug: Optional[str] = Field(..., title="Slug")
|
191
|
+
|
192
|
+
|
193
|
+
class LoginRequest(BaseModel):
|
194
|
+
email: EmailStr = Field(..., title="Email")
|
195
|
+
password: str = Field(..., title="Password")
|
196
|
+
|
197
|
+
|
198
|
+
class LoginResponse(BaseModel):
|
199
|
+
user_id: str = Field(..., title="User Id")
|
200
|
+
token: str = Field(..., title="Token")
|
201
|
+
|
202
|
+
|
203
|
+
class Permission1(Enum):
|
204
|
+
is_admin = "is_admin"
|
205
|
+
is_mod = "is_mod"
|
206
|
+
is_content_manager = "is_content_manager"
|
207
|
+
|
208
|
+
|
209
|
+
class NewKeyRequest(BaseModel):
|
210
|
+
readonly: Optional[bool] = Field(True, title="Readonly")
|
211
|
+
|
212
|
+
|
213
|
+
class NewKeyResponse(BaseModel):
|
214
|
+
user_id: str = Field(..., title="User Id")
|
215
|
+
key: KeysResponseItem
|
216
|
+
|
217
|
+
|
218
|
+
class NewListingResponse(BaseModel):
|
219
|
+
listing_id: str = Field(..., title="Listing Id")
|
220
|
+
username: str = Field(..., title="Username")
|
221
|
+
slug: str = Field(..., title="Slug")
|
222
|
+
|
223
|
+
|
224
|
+
class Status(Enum):
|
225
|
+
processing = "processing"
|
226
|
+
in_development = "in_development"
|
227
|
+
being_assembled = "being_assembled"
|
228
|
+
shipped = "shipped"
|
229
|
+
delivered = "delivered"
|
230
|
+
preorder_placed = "preorder_placed"
|
231
|
+
awaiting_final_payment = "awaiting_final_payment"
|
232
|
+
cancelled = "cancelled"
|
233
|
+
refunded = "refunded"
|
234
|
+
|
235
|
+
|
236
|
+
class Order(BaseModel):
|
237
|
+
id: str = Field(..., title="Id")
|
238
|
+
user_id: str = Field(..., title="User Id")
|
239
|
+
listing_id: str = Field(..., title="Listing Id")
|
240
|
+
user_email: str = Field(..., title="User Email")
|
241
|
+
created_at: int = Field(..., title="Created At")
|
242
|
+
updated_at: int = Field(..., title="Updated At")
|
243
|
+
status: Status = Field(..., title="Status")
|
244
|
+
price_amount: int = Field(..., title="Price Amount")
|
245
|
+
currency: str = Field(..., title="Currency")
|
246
|
+
quantity: int = Field(..., title="Quantity")
|
247
|
+
stripe_checkout_session_id: str = Field(..., title="Stripe Checkout Session Id")
|
248
|
+
stripe_connect_account_id: str = Field(..., title="Stripe Connect Account Id")
|
249
|
+
stripe_product_id: str = Field(..., title="Stripe Product Id")
|
250
|
+
stripe_price_id: str = Field(..., title="Stripe Price Id")
|
251
|
+
stripe_payment_intent_id: str = Field(..., title="Stripe Payment Intent Id")
|
252
|
+
preorder_release_date: Optional[int] = Field(None, title="Preorder Release Date")
|
253
|
+
preorder_deposit_amount: Optional[int] = Field(None, title="Preorder Deposit Amount")
|
254
|
+
stripe_preorder_deposit_id: Optional[str] = Field(None, title="Stripe Preorder Deposit Id")
|
255
|
+
inventory_type: InventoryType = Field(..., title="Inventory Type")
|
256
|
+
final_payment_checkout_session_id: Optional[str] = Field(None, title="Final Payment Checkout Session Id")
|
257
|
+
final_payment_intent_id: Optional[str] = Field(None, title="Final Payment Intent Id")
|
258
|
+
final_payment_date: Optional[int] = Field(None, title="Final Payment Date")
|
259
|
+
shipping_name: Optional[str] = Field(None, title="Shipping Name")
|
260
|
+
shipping_address_line1: Optional[str] = Field(None, title="Shipping Address Line1")
|
261
|
+
shipping_address_line2: Optional[str] = Field(None, title="Shipping Address Line2")
|
262
|
+
shipping_city: Optional[str] = Field(None, title="Shipping City")
|
263
|
+
shipping_state: Optional[str] = Field(None, title="Shipping State")
|
264
|
+
shipping_postal_code: Optional[str] = Field(None, title="Shipping Postal Code")
|
265
|
+
shipping_country: Optional[str] = Field(None, title="Shipping Country")
|
266
|
+
shipped_date: Optional[int] = Field(None, title="Shipped Date")
|
267
|
+
stripe_refund_id: Optional[str] = Field(None, title="Stripe Refund Id")
|
268
|
+
delivered_date: Optional[int] = Field(None, title="Delivered Date")
|
269
|
+
cancelled_date: Optional[int] = Field(None, title="Cancelled Date")
|
270
|
+
refunded_date: Optional[int] = Field(None, title="Refunded Date")
|
271
|
+
|
272
|
+
|
273
|
+
class PresignedUrlResponse(BaseModel):
|
274
|
+
upload_url: str = Field(..., title="Upload Url")
|
275
|
+
artifact_id: str = Field(..., title="Artifact Id")
|
276
|
+
|
277
|
+
|
278
|
+
class ProcessPreorderResponse(BaseModel):
|
279
|
+
status: str = Field(..., title="Status")
|
280
|
+
checkout_session: Dict[str, Any] = Field(..., title="Checkout Session")
|
281
|
+
|
282
|
+
|
283
|
+
class ProductInfo(BaseModel):
|
284
|
+
id: str = Field(..., title="Id")
|
285
|
+
name: str = Field(..., title="Name")
|
286
|
+
description: Optional[str] = Field(..., title="Description")
|
287
|
+
images: List[str] = Field(..., title="Images")
|
288
|
+
metadata: Dict[str, str] = Field(..., title="Metadata")
|
289
|
+
active: bool = Field(..., title="Active")
|
290
|
+
|
291
|
+
|
292
|
+
class ProductResponse(BaseModel):
|
293
|
+
id: str = Field(..., title="Id")
|
294
|
+
name: str = Field(..., title="Name")
|
295
|
+
description: Optional[str] = Field(..., title="Description")
|
296
|
+
images: List[str] = Field(..., title="Images")
|
297
|
+
metadata: Dict[str, str] = Field(..., title="Metadata")
|
298
|
+
active: bool = Field(..., title="Active")
|
299
|
+
|
300
|
+
|
301
|
+
class PublicUserInfoResponseItem(BaseModel):
|
302
|
+
id: str = Field(..., title="Id")
|
303
|
+
email: str = Field(..., title="Email")
|
304
|
+
username: str = Field(..., title="Username")
|
305
|
+
permissions: Optional[List[Permission1]] = Field(None, title="Permissions")
|
306
|
+
created_at: Optional[int] = Field(None, title="Created At")
|
307
|
+
updated_at: Optional[int] = Field(None, title="Updated At")
|
308
|
+
first_name: Optional[str] = Field(None, title="First Name")
|
309
|
+
last_name: Optional[str] = Field(None, title="Last Name")
|
310
|
+
name: Optional[str] = Field(None, title="Name")
|
311
|
+
bio: Optional[str] = Field(None, title="Bio")
|
312
|
+
|
313
|
+
|
314
|
+
class PublicUsersInfoResponse(BaseModel):
|
315
|
+
users: List[PublicUserInfoResponseItem] = Field(..., title="Users")
|
316
|
+
|
317
|
+
|
318
|
+
class Robot(BaseModel):
|
319
|
+
id: str = Field(..., title="Id")
|
320
|
+
user_id: str = Field(..., title="User Id")
|
321
|
+
listing_id: str = Field(..., title="Listing Id")
|
322
|
+
name: str = Field(..., title="Name")
|
323
|
+
description: Optional[str] = Field(None, title="Description")
|
324
|
+
created_at: int = Field(..., title="Created At")
|
325
|
+
updated_at: int = Field(..., title="Updated At")
|
326
|
+
order_id: Optional[str] = Field(None, title="Order Id")
|
327
|
+
|
328
|
+
|
329
|
+
class RobotURDFResponse(BaseModel):
|
330
|
+
urdf_url: Optional[str] = Field(..., title="Urdf Url")
|
331
|
+
|
332
|
+
|
333
|
+
class SetContentManagerRequest(BaseModel):
|
334
|
+
user_id: str = Field(..., title="User Id")
|
335
|
+
is_content_manager: bool = Field(..., title="Is Content Manager")
|
336
|
+
|
337
|
+
|
338
|
+
class SetModeratorRequest(BaseModel):
|
339
|
+
user_id: str = Field(..., title="User Id")
|
340
|
+
is_mod: bool = Field(..., title="Is Mod")
|
341
|
+
|
342
|
+
|
343
|
+
class SetRequest(BaseModel):
|
344
|
+
onshape_url: Optional[str] = Field(..., title="Onshape Url")
|
345
|
+
|
346
|
+
|
347
|
+
class ArtifactType(Enum):
|
348
|
+
image = "image"
|
349
|
+
|
350
|
+
|
351
|
+
class ArtifactType1(Enum):
|
352
|
+
kernel = "kernel"
|
353
|
+
|
354
|
+
|
355
|
+
class ArtifactType2(Enum):
|
356
|
+
urdf = "urdf"
|
357
|
+
mjcf = "mjcf"
|
358
|
+
|
359
|
+
|
360
|
+
class ArtifactType3(Enum):
|
361
|
+
stl = "stl"
|
362
|
+
obj = "obj"
|
363
|
+
dae = "dae"
|
364
|
+
ply = "ply"
|
365
|
+
|
366
|
+
|
367
|
+
class ArtifactType4(Enum):
|
368
|
+
tgz = "tgz"
|
369
|
+
zip = "zip"
|
370
|
+
|
371
|
+
|
372
|
+
class SingleArtifactResponse(BaseModel):
|
373
|
+
artifact_id: str = Field(..., title="Artifact Id")
|
374
|
+
listing_id: str = Field(..., title="Listing Id")
|
375
|
+
username: str = Field(..., title="Username")
|
376
|
+
slug: str = Field(..., title="Slug")
|
377
|
+
name: str = Field(..., title="Name")
|
378
|
+
artifact_type: Union[ArtifactType, ArtifactType1, ArtifactType2, ArtifactType3, ArtifactType4] = Field(
|
379
|
+
..., title="Artifact Type"
|
380
|
+
)
|
381
|
+
description: Optional[str] = Field(..., title="Description")
|
382
|
+
timestamp: int = Field(..., title="Timestamp")
|
383
|
+
urls: ArtifactUrls
|
384
|
+
is_main: Optional[bool] = Field(False, title="Is Main")
|
385
|
+
can_edit: Optional[bool] = Field(False, title="Can Edit")
|
386
|
+
size: Optional[int] = Field(None, title="Size")
|
387
|
+
|
388
|
+
|
389
|
+
class SingleKRecResponse(BaseModel):
|
390
|
+
id: str = Field(..., title="Id")
|
391
|
+
name: str = Field(..., title="Name")
|
392
|
+
created_at: int = Field(..., title="Created At")
|
393
|
+
user_id: str = Field(..., title="User Id")
|
394
|
+
robot_id: str = Field(..., title="Robot Id")
|
395
|
+
type: Optional[str] = Field("KRec", title="Type")
|
396
|
+
urls: Optional[KRecUrls] = None
|
397
|
+
size: Optional[int] = Field(None, title="Size")
|
398
|
+
|
399
|
+
|
400
|
+
class SingleRobotResponse(BaseModel):
|
401
|
+
robot_id: str = Field(..., title="Robot Id")
|
402
|
+
user_id: str = Field(..., title="User Id")
|
403
|
+
listing_id: str = Field(..., title="Listing Id")
|
404
|
+
name: str = Field(..., title="Name")
|
405
|
+
username: str = Field(..., title="Username")
|
406
|
+
slug: str = Field(..., title="Slug")
|
407
|
+
description: Optional[str] = Field(None, title="Description")
|
408
|
+
order_id: Optional[str] = Field(None, title="Order Id")
|
409
|
+
created_at: int = Field(..., title="Created At")
|
410
|
+
|
411
|
+
|
412
|
+
class SortOption(Enum):
|
413
|
+
newest = "newest"
|
414
|
+
most_viewed = "most_viewed"
|
415
|
+
most_upvoted = "most_upvoted"
|
416
|
+
|
417
|
+
|
418
|
+
class UpdateArtifactRequest(BaseModel):
|
419
|
+
name: Optional[str] = Field(None, title="Name")
|
420
|
+
description: Optional[str] = Field(None, title="Description")
|
421
|
+
|
422
|
+
|
423
|
+
class UpdateListingRequest(BaseModel):
|
424
|
+
name: Optional[str] = Field(None, title="Name")
|
425
|
+
child_ids: Optional[List[str]] = Field(None, title="Child Ids")
|
426
|
+
description: Optional[str] = Field(None, title="Description")
|
427
|
+
tags: Optional[List[str]] = Field(None, title="Tags")
|
428
|
+
onshape_url: Optional[str] = Field(None, title="Onshape Url")
|
429
|
+
slug: Optional[str] = Field(None, title="Slug")
|
430
|
+
stripe_product_id: Optional[str] = Field(None, title="Stripe Product Id")
|
431
|
+
stripe_price_id: Optional[str] = Field(None, title="Stripe Price Id")
|
432
|
+
stripe_deposit_price_id: Optional[str] = Field(None, title="Stripe Deposit Price Id")
|
433
|
+
price_amount: Optional[int] = Field(None, title="Price Amount")
|
434
|
+
preorder_release_date: Optional[int] = Field(None, title="Preorder Release Date")
|
435
|
+
preorder_deposit_amount: Optional[int] = Field(None, title="Preorder Deposit Amount")
|
436
|
+
stripe_preorder_deposit_id: Optional[str] = Field(None, title="Stripe Preorder Deposit Id")
|
437
|
+
inventory_type: Optional[InventoryType] = Field(None, title="Inventory Type")
|
438
|
+
inventory_quantity: Optional[int] = Field(None, title="Inventory Quantity")
|
439
|
+
|
440
|
+
|
441
|
+
class UpdateOrderAddressRequest(BaseModel):
|
442
|
+
shipping_name: str = Field(..., title="Shipping Name")
|
443
|
+
shipping_address_line1: str = Field(..., title="Shipping Address Line1")
|
444
|
+
shipping_address_line2: Optional[str] = Field(..., title="Shipping Address Line2")
|
445
|
+
shipping_city: str = Field(..., title="Shipping City")
|
446
|
+
shipping_state: str = Field(..., title="Shipping State")
|
447
|
+
shipping_postal_code: str = Field(..., title="Shipping Postal Code")
|
448
|
+
shipping_country: str = Field(..., title="Shipping Country")
|
449
|
+
|
450
|
+
|
451
|
+
class UpdateOrderStatusRequest(BaseModel):
|
452
|
+
status: Status = Field(..., title="Status")
|
453
|
+
|
454
|
+
|
455
|
+
class UpdateRobotRequest(BaseModel):
|
456
|
+
name: Optional[str] = Field(None, title="Name")
|
457
|
+
description: Optional[str] = Field(None, title="Description")
|
458
|
+
order_id: Optional[str] = Field(None, title="Order Id")
|
459
|
+
|
460
|
+
|
461
|
+
class UpdateUserRequest(BaseModel):
|
462
|
+
email: Optional[str] = Field(None, title="Email")
|
463
|
+
password: Optional[str] = Field(None, title="Password")
|
464
|
+
github_id: Optional[str] = Field(None, title="Github Id")
|
465
|
+
google_id: Optional[str] = Field(None, title="Google Id")
|
466
|
+
first_name: Optional[str] = Field(None, title="First Name")
|
467
|
+
last_name: Optional[str] = Field(None, title="Last Name")
|
468
|
+
name: Optional[str] = Field(None, title="Name")
|
469
|
+
bio: Optional[str] = Field(None, title="Bio")
|
470
|
+
|
471
|
+
|
472
|
+
class UpdateUsernameRequest(BaseModel):
|
473
|
+
new_username: str = Field(..., title="New Username")
|
474
|
+
|
475
|
+
|
476
|
+
class UploadArtifactResponse(BaseModel):
|
477
|
+
artifacts: List[SingleArtifactResponse] = Field(..., title="Artifacts")
|
478
|
+
|
479
|
+
|
480
|
+
class UploadKRecRequest(BaseModel):
|
481
|
+
name: str = Field(..., title="Name")
|
482
|
+
robot_id: str = Field(..., title="Robot Id")
|
483
|
+
description: Optional[str] = Field(None, title="Description")
|
484
|
+
|
485
|
+
|
486
|
+
class UserInfoResponseItem(BaseModel):
|
487
|
+
id: str = Field(..., title="Id")
|
488
|
+
email: str = Field(..., title="Email")
|
489
|
+
|
490
|
+
|
491
|
+
class UserSignup(BaseModel):
|
492
|
+
signup_token_id: str = Field(..., title="Signup Token Id")
|
493
|
+
email: str = Field(..., title="Email")
|
494
|
+
password: str = Field(..., title="Password")
|
495
|
+
|
496
|
+
|
497
|
+
class UserStripeConnect(BaseModel):
|
498
|
+
account_id: str = Field(..., title="Account Id")
|
499
|
+
onboarding_completed: bool = Field(..., title="Onboarding Completed")
|
500
|
+
|
501
|
+
|
502
|
+
class ValidationError(BaseModel):
|
503
|
+
loc: List[Union[str, int]] = Field(..., title="Location")
|
504
|
+
msg: str = Field(..., title="Message")
|
505
|
+
type: str = Field(..., title="Error Type")
|
506
|
+
|
507
|
+
|
508
|
+
class DumpListingsResponse(BaseModel):
|
509
|
+
listings: List[Listing] = Field(..., title="Listings")
|
510
|
+
|
511
|
+
|
512
|
+
class GetListingResponse(BaseModel):
|
513
|
+
id: str = Field(..., title="Id")
|
514
|
+
name: str = Field(..., title="Name")
|
515
|
+
description: Optional[str] = Field(..., title="Description")
|
516
|
+
creator_id: Optional[str] = Field(..., title="Creator Id")
|
517
|
+
creator_name: Optional[str] = Field(..., title="Creator Name")
|
518
|
+
username: Optional[str] = Field(..., title="Username")
|
519
|
+
slug: Optional[str] = Field(..., title="Slug")
|
520
|
+
score: int = Field(..., title="Score")
|
521
|
+
views: int = Field(..., title="Views")
|
522
|
+
created_at: int = Field(..., title="Created At")
|
523
|
+
artifacts: List[SingleArtifactResponse] = Field(..., title="Artifacts")
|
524
|
+
can_edit: bool = Field(..., title="Can Edit")
|
525
|
+
user_vote: Optional[bool] = Field(..., title="User Vote")
|
526
|
+
onshape_url: Optional[str] = Field(..., title="Onshape Url")
|
527
|
+
is_featured: bool = Field(..., title="Is Featured")
|
528
|
+
currency: Optional[str] = Field(None, title="Currency")
|
529
|
+
price_amount: Optional[int] = Field(None, title="Price Amount")
|
530
|
+
stripe_product_id: Optional[str] = Field(None, title="Stripe Product Id")
|
531
|
+
stripe_price_id: Optional[str] = Field(None, title="Stripe Price Id")
|
532
|
+
preorder_deposit_amount: Optional[int] = Field(None, title="Preorder Deposit Amount")
|
533
|
+
stripe_preorder_deposit_id: Optional[str] = Field(None, title="Stripe Preorder Deposit Id")
|
534
|
+
preorder_release_date: Optional[int] = Field(None, title="Preorder Release Date")
|
535
|
+
inventory_type: Optional[str] = Field(None, title="Inventory Type")
|
536
|
+
inventory_quantity: Optional[int] = Field(None, title="Inventory Quantity")
|
537
|
+
|
538
|
+
|
539
|
+
class HTTPValidationError(BaseModel):
|
540
|
+
detail: Optional[List[ValidationError]] = Field(None, title="Detail")
|
541
|
+
|
542
|
+
|
543
|
+
class ListArtifactsResponse(BaseModel):
|
544
|
+
artifacts: List[SingleArtifactResponse] = Field(..., title="Artifacts")
|
545
|
+
|
546
|
+
|
547
|
+
class ListListingsResponse(BaseModel):
|
548
|
+
listings: List[ListingInfo] = Field(..., title="Listings")
|
549
|
+
has_next: Optional[bool] = Field(False, title="Has Next")
|
550
|
+
|
551
|
+
|
552
|
+
class ListingInfoResponse(BaseModel):
|
553
|
+
id: str = Field(..., title="Id")
|
554
|
+
name: str = Field(..., title="Name")
|
555
|
+
slug: Optional[str] = Field(..., title="Slug")
|
556
|
+
username: Optional[str] = Field(..., title="Username")
|
557
|
+
description: Optional[str] = Field(..., title="Description")
|
558
|
+
child_ids: List[str] = Field(..., title="Child Ids")
|
559
|
+
artifacts: List[SingleArtifactResponse] = Field(..., title="Artifacts")
|
560
|
+
onshape_url: Optional[str] = Field(..., title="Onshape Url")
|
561
|
+
created_at: int = Field(..., title="Created At")
|
562
|
+
views: int = Field(..., title="Views")
|
563
|
+
score: int = Field(..., title="Score")
|
564
|
+
user_vote: Optional[bool] = Field(..., title="User Vote")
|
565
|
+
price_amount: Optional[int] = Field(..., title="Price Amount")
|
566
|
+
currency: Optional[str] = Field(..., title="Currency")
|
567
|
+
inventory_type: Optional[InventoryType] = Field(..., title="Inventory Type")
|
568
|
+
inventory_quantity: Optional[int] = Field(..., title="Inventory Quantity")
|
569
|
+
|
570
|
+
|
571
|
+
class MyUserInfoResponse(BaseModel):
|
572
|
+
user_id: str = Field(..., title="User Id")
|
573
|
+
email: str = Field(..., title="Email")
|
574
|
+
github_id: Optional[str] = Field(..., title="Github Id")
|
575
|
+
google_id: Optional[str] = Field(..., title="Google Id")
|
576
|
+
permissions: Optional[List[Permission1]] = Field(..., title="Permissions")
|
577
|
+
first_name: Optional[str] = Field(..., title="First Name")
|
578
|
+
last_name: Optional[str] = Field(..., title="Last Name")
|
579
|
+
name: Optional[str] = Field(..., title="Name")
|
580
|
+
bio: Optional[str] = Field(..., title="Bio")
|
581
|
+
stripe_connect: Optional[UserStripeConnect]
|
582
|
+
|
583
|
+
|
584
|
+
class OrderWithProduct(BaseModel):
|
585
|
+
order: Order
|
586
|
+
product: Optional[ProductInfo]
|
587
|
+
|
588
|
+
|
589
|
+
class RobotListResponse(BaseModel):
|
590
|
+
robots: List[SingleRobotResponse] = Field(..., title="Robots")
|
591
|
+
|
592
|
+
|
593
|
+
class UserPublic(BaseModel):
|
594
|
+
id: str = Field(..., title="Id")
|
595
|
+
email: str = Field(..., title="Email")
|
596
|
+
username: str = Field(..., title="Username")
|
597
|
+
permissions: Optional[List[Permission1]] = Field(None, title="Permissions")
|
598
|
+
created_at: int = Field(..., title="Created At")
|
599
|
+
updated_at: Optional[int] = Field(None, title="Updated At")
|
600
|
+
first_name: Optional[str] = Field(None, title="First Name")
|
601
|
+
last_name: Optional[str] = Field(None, title="Last Name")
|
602
|
+
name: Optional[str] = Field(None, title="Name")
|
603
|
+
bio: Optional[str] = Field(None, title="Bio")
|
604
|
+
stripe_connect: Optional[UserStripeConnect] = None
|
605
|
+
|
606
|
+
|
607
|
+
class AdminOrdersResponse(BaseModel):
|
608
|
+
orders: List[OrderWithProduct] = Field(..., title="Orders")
|
609
|
+
|
610
|
+
|
611
|
+
class GetBatchListingsResponse(BaseModel):
|
612
|
+
listings: List[ListingInfoResponse] = Field(..., title="Listings")
|