forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
109 lines (74 loc) · 2.23 KB
/
Copy pathmodels.py
File metadata and controls
109 lines (74 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
"""
Pydantic models for the ShipBob Omi plugin.
"""
from datetime import datetime
from typing import List, Optional, Any, Dict
from pydantic import BaseModel
from omi_plugin_sdk.models import Conversation, EndpointResponse, Structured, TranscriptSegment
# Omi Chat Tool Models
class ChatToolRequest(BaseModel):
"""Base request model for Omi chat tools."""
uid: str
app_id: str
tool_name: str
class ChatToolResponse(BaseModel):
"""Response model for Omi chat tools."""
result: Optional[str] = None
error: Optional[str] = None
# ShipBob Data Models
class ShipBobUser(BaseModel):
"""ShipBob user information."""
id: Optional[int] = None
email: Optional[str] = None
name: Optional[str] = None
class ShipBobChannel(BaseModel):
"""ShipBob channel information."""
id: int
name: str
class FulfillmentCenter(BaseModel):
"""ShipBob fulfillment center."""
id: int
name: str
class InventoryItem(BaseModel):
"""ShipBob inventory item."""
id: int
name: str
sku: Optional[str] = None
total_fulfillable_quantity: int = 0
total_onhand_quantity: int = 0
total_committed_quantity: int = 0
total_sellable_quantity: int = 0
total_awaiting_quantity: int = 0
total_exception_quantity: int = 0
class Product(BaseModel):
"""ShipBob product."""
id: int
reference_id: Optional[str] = None
name: str
sku: Optional[str] = None
inventory_id: Optional[int] = None
class BoxItem(BaseModel):
"""Box item for WRO."""
inventory_id: int
quantity: int
lot_number: Optional[str] = None
lot_date: Optional[str] = None
class WROBox(BaseModel):
"""Box for WRO."""
tracking_number: Optional[str] = None
box_items: List[BoxItem]
class WarehouseReceivingOrder(BaseModel):
"""ShipBob Warehouse Receiving Order."""
id: int
status: str
purchase_order_number: Optional[str] = None
expected_arrival_date: Optional[str] = None
fulfillment_center_id: Optional[int] = None
insert_date: Optional[str] = None
class Order(BaseModel):
"""ShipBob order."""
id: int
order_number: Optional[str] = None
status: str
created_date: Optional[str] = None
shipping_method: Optional[str] = None