python-casahome 0.2.0__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.
- casahome/__init__.py +30 -0
- casahome/_base_http.py +21 -0
- casahome/api.py +1135 -0
- casahome/auth.py +199 -0
- casahome/client.py +168 -0
- casahome/const.py +34 -0
- casahome/exceptions.py +52 -0
- casahome/models/__init__.py +477 -0
- casahome/models/_base.py +25 -0
- casahome/models/ai.py +58 -0
- casahome/models/assets.py +123 -0
- casahome/models/availability.py +39 -0
- casahome/models/bootstrap.py +134 -0
- casahome/models/calendar.py +33 -0
- casahome/models/catalogs.py +73 -0
- casahome/models/credits.py +29 -0
- casahome/models/documents.py +127 -0
- casahome/models/enums.py +183 -0
- casahome/models/feed.py +30 -0
- casahome/models/help_center.py +45 -0
- casahome/models/home.py +175 -0
- casahome/models/images.py +48 -0
- casahome/models/mailbox.py +160 -0
- casahome/models/maintenance.py +200 -0
- casahome/models/membership.py +65 -0
- casahome/models/paint.py +56 -0
- casahome/models/preferences.py +104 -0
- casahome/models/purchases.py +106 -0
- casahome/models/read_todos.py +22 -0
- casahome/models/referral.py +21 -0
- casahome/models/requests.py +149 -0
- casahome/models/tasks.py +77 -0
- casahome/models/taxes.py +47 -0
- casahome/models/todos.py +52 -0
- casahome/models/visits.py +158 -0
- casahome/models/write_contracts.py +147 -0
- casahome/py.typed +0 -0
- casahome/streaming.py +278 -0
- python_casahome-0.2.0.dist-info/METADATA +272 -0
- python_casahome-0.2.0.dist-info/RECORD +42 -0
- python_casahome-0.2.0.dist-info/WHEEL +4 -0
- python_casahome-0.2.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
"""Pydantic models for Casa API payloads."""
|
|
2
|
+
|
|
3
|
+
from ._base import CasaModel
|
|
4
|
+
from .ai import (
|
|
5
|
+
CasaAIActiveResponse,
|
|
6
|
+
CasaAIBootstrapResponse,
|
|
7
|
+
CasaAIConversation,
|
|
8
|
+
CasaAIMessage,
|
|
9
|
+
CasaAIMessageFeedback,
|
|
10
|
+
CasaAIMessagePart,
|
|
11
|
+
CasaAIMessagesResponse,
|
|
12
|
+
CasaAIStarterSuggestion,
|
|
13
|
+
)
|
|
14
|
+
from .assets import (
|
|
15
|
+
HomeMember,
|
|
16
|
+
HomeMembersResponse,
|
|
17
|
+
HomeVehicle,
|
|
18
|
+
ReleaseNote,
|
|
19
|
+
ReleaseNoteSection,
|
|
20
|
+
ReleaseNotesResponse,
|
|
21
|
+
UtilitiesInsightsResponse,
|
|
22
|
+
UtilityInsightsAccount,
|
|
23
|
+
UtilityInsightsService,
|
|
24
|
+
UtilityInsightsStatement,
|
|
25
|
+
UtilityUsageGraph,
|
|
26
|
+
UtilityUsageGraphWindow,
|
|
27
|
+
VehiclePowertrain,
|
|
28
|
+
VehiclesResponse,
|
|
29
|
+
)
|
|
30
|
+
from .availability import (
|
|
31
|
+
MemberAvailabilityConstraints,
|
|
32
|
+
MemberAvailabilityDetail,
|
|
33
|
+
MemberAvailabilitySlot,
|
|
34
|
+
MemberAvailabilitySummary,
|
|
35
|
+
)
|
|
36
|
+
from .bootstrap import (
|
|
37
|
+
AppUpdate,
|
|
38
|
+
Bootstrap,
|
|
39
|
+
HomeBadgeCounts,
|
|
40
|
+
MemberSimpleHome,
|
|
41
|
+
MemberWaitlistEntry,
|
|
42
|
+
PendingAgreement,
|
|
43
|
+
UserDeviceRequest,
|
|
44
|
+
)
|
|
45
|
+
from .calendar import CalendarEvent, VisitsCalendarResponse
|
|
46
|
+
from .catalogs import (
|
|
47
|
+
InventoryEnumOption,
|
|
48
|
+
InventoryEnumsResponse,
|
|
49
|
+
InventoryMakesResponse,
|
|
50
|
+
RecurringVendor,
|
|
51
|
+
RecurringVendorCategoriesResponse,
|
|
52
|
+
RecurringVendorCategory,
|
|
53
|
+
RecurringVendorsResponse,
|
|
54
|
+
RoomType,
|
|
55
|
+
RoomTypesResponse,
|
|
56
|
+
)
|
|
57
|
+
from .credits import ConsumptionHistory, CreditHistory, MemberCredits
|
|
58
|
+
from .documents import (
|
|
59
|
+
DocumentCitation,
|
|
60
|
+
DocumentDetailsResponse,
|
|
61
|
+
DocumentExtraction,
|
|
62
|
+
DocumentOrganization,
|
|
63
|
+
DocumentsResponse,
|
|
64
|
+
DocumentStructureSuggestion,
|
|
65
|
+
DocumentStructureSuggestionsResponse,
|
|
66
|
+
DocumentSuggestion,
|
|
67
|
+
DocumentSuggestionsResponse,
|
|
68
|
+
DocumentType,
|
|
69
|
+
DocumentTypesResponse,
|
|
70
|
+
HomeDocument,
|
|
71
|
+
WorkDocumentSource,
|
|
72
|
+
WorkDocumentSourceResponse,
|
|
73
|
+
)
|
|
74
|
+
from .enums import (
|
|
75
|
+
MemberSimpleHomeStatus,
|
|
76
|
+
PackageDirection,
|
|
77
|
+
PackagePickupStatus,
|
|
78
|
+
PaymentMethodType,
|
|
79
|
+
RequestStatus,
|
|
80
|
+
RequestType,
|
|
81
|
+
SenderRole,
|
|
82
|
+
TodoCreatorRole,
|
|
83
|
+
TodoLaneCardKind,
|
|
84
|
+
TodoLaneCardState,
|
|
85
|
+
TodoStatus,
|
|
86
|
+
VendorVisitStatus,
|
|
87
|
+
VisitType,
|
|
88
|
+
WeatherCondition,
|
|
89
|
+
)
|
|
90
|
+
from .feed import HomeFeedCard, HomeFeedResponse
|
|
91
|
+
from .help_center import (
|
|
92
|
+
HelpCenterArticle,
|
|
93
|
+
HelpCenterBundle,
|
|
94
|
+
HelpCenterBundleResponse,
|
|
95
|
+
HelpCenterTopic,
|
|
96
|
+
)
|
|
97
|
+
from .home import (
|
|
98
|
+
EntityIdentity,
|
|
99
|
+
EntityImage,
|
|
100
|
+
EntityMake,
|
|
101
|
+
EntityModel,
|
|
102
|
+
EntityProperty,
|
|
103
|
+
HomeDetails,
|
|
104
|
+
HomeDetailsResponse,
|
|
105
|
+
HomeRoom,
|
|
106
|
+
HomeStory,
|
|
107
|
+
ModelProperty,
|
|
108
|
+
PropertyValue,
|
|
109
|
+
SimpleEntity,
|
|
110
|
+
WeatherResponse,
|
|
111
|
+
)
|
|
112
|
+
from .images import (
|
|
113
|
+
MatterportImage,
|
|
114
|
+
MatterportImagesResponse,
|
|
115
|
+
MediaAttachment,
|
|
116
|
+
RoomImageCandidate,
|
|
117
|
+
RoomImageOptionsResponse,
|
|
118
|
+
RoomMemberImage,
|
|
119
|
+
)
|
|
120
|
+
from .mailbox import (
|
|
121
|
+
MailboxMailItem,
|
|
122
|
+
MailboxMailItemsResponse,
|
|
123
|
+
MailboxOverviewResponse,
|
|
124
|
+
MemberMailbox,
|
|
125
|
+
PackageItem,
|
|
126
|
+
PackagesResponse,
|
|
127
|
+
)
|
|
128
|
+
from .maintenance import (
|
|
129
|
+
AutopilotCategoriesResponse,
|
|
130
|
+
AutopilotCategory,
|
|
131
|
+
AutopilotEntityAssociation,
|
|
132
|
+
AutopilotHomeAssociation,
|
|
133
|
+
AutopilotIllustration,
|
|
134
|
+
AutopilotIneligiblePlan,
|
|
135
|
+
AutopilotPlan,
|
|
136
|
+
AutopilotPlanRequirement,
|
|
137
|
+
AutopilotPricingPolicy,
|
|
138
|
+
AutopilotRequirementOption,
|
|
139
|
+
AutopilotRequirementProperty,
|
|
140
|
+
AutopilotRequirementRoomCandidate,
|
|
141
|
+
AutopilotRequirementRoomProperty,
|
|
142
|
+
AutopilotRoomAssociation,
|
|
143
|
+
CalendarBusyBlock,
|
|
144
|
+
CalendarBusyResponse,
|
|
145
|
+
CompletedRequestsResponse,
|
|
146
|
+
InventoryServiceHistoryResponse,
|
|
147
|
+
ServiceHistoryItem,
|
|
148
|
+
ServiceHistoryPlan,
|
|
149
|
+
)
|
|
150
|
+
from .membership import (
|
|
151
|
+
MembershipBenefit,
|
|
152
|
+
MembershipDetails,
|
|
153
|
+
MembershipSavings,
|
|
154
|
+
MembershipSavingsBreakdown,
|
|
155
|
+
MembershipSavingsCategory,
|
|
156
|
+
MembershipSavingsMetadata,
|
|
157
|
+
MembershipSavingsSummary,
|
|
158
|
+
)
|
|
159
|
+
from .paint import (
|
|
160
|
+
InventoryPaintMatch,
|
|
161
|
+
InventoryPaintMatchesResponse,
|
|
162
|
+
PaintBrand,
|
|
163
|
+
PaintBrandsResponse,
|
|
164
|
+
PaintCollection,
|
|
165
|
+
PaintCollectionsResponse,
|
|
166
|
+
PaintColor,
|
|
167
|
+
PaintColorsResponse,
|
|
168
|
+
PaintSearchResponse,
|
|
169
|
+
)
|
|
170
|
+
from .preferences import (
|
|
171
|
+
AccessPreferencesResponse,
|
|
172
|
+
CalendarOption,
|
|
173
|
+
CalendarSyncResponse,
|
|
174
|
+
NotificationChannel,
|
|
175
|
+
NotificationGroup,
|
|
176
|
+
NotificationSettingsResponse,
|
|
177
|
+
NotificationType,
|
|
178
|
+
OnboardingAvailabilityResponse,
|
|
179
|
+
OnboardingDetailsResponse,
|
|
180
|
+
OnboardingEvent,
|
|
181
|
+
OnboardingSlot,
|
|
182
|
+
SchedulePreferencesResponse,
|
|
183
|
+
SchedulingDay,
|
|
184
|
+
SchedulingTimeOfDay,
|
|
185
|
+
)
|
|
186
|
+
from .purchases import (
|
|
187
|
+
ApprovedPurchase,
|
|
188
|
+
PurchaseApproval,
|
|
189
|
+
PurchasedItem,
|
|
190
|
+
PurchaseInvoice,
|
|
191
|
+
PurchasesResponse,
|
|
192
|
+
PurchaseVendor,
|
|
193
|
+
RequestPurchase,
|
|
194
|
+
ScopedPurchasesResponse,
|
|
195
|
+
)
|
|
196
|
+
from .read_todos import SuggestedTodosResponse, TodoDetailsResponse, TodoReadDetail
|
|
197
|
+
from .referral import ReferralCode, ReferralCodeResponse
|
|
198
|
+
from .requests import (
|
|
199
|
+
Pagination,
|
|
200
|
+
RequestCard,
|
|
201
|
+
RequestDetails,
|
|
202
|
+
RequestMessage,
|
|
203
|
+
RequestsLane,
|
|
204
|
+
RequestsResponse,
|
|
205
|
+
TasksLane,
|
|
206
|
+
TodosLane,
|
|
207
|
+
VendorVisit,
|
|
208
|
+
)
|
|
209
|
+
from .tasks import (
|
|
210
|
+
BookableHandymanTasksResponse,
|
|
211
|
+
GroupedTaskDetails,
|
|
212
|
+
GroupedTaskItem,
|
|
213
|
+
TaskDetails,
|
|
214
|
+
TaskDetailsVisit,
|
|
215
|
+
TaskUpdate,
|
|
216
|
+
VendorVisitAutopilotPlan,
|
|
217
|
+
VendorVisitAutopilotTaskTarget,
|
|
218
|
+
)
|
|
219
|
+
from .taxes import (
|
|
220
|
+
PropertyTaxesResponse,
|
|
221
|
+
PropertyTaxInstallment,
|
|
222
|
+
PropertyTaxRefresh,
|
|
223
|
+
PropertyTaxReport,
|
|
224
|
+
PropertyTaxSpecialAssessment,
|
|
225
|
+
)
|
|
226
|
+
from .todos import TodoDetail, TodoLaneCard
|
|
227
|
+
from .visits import (
|
|
228
|
+
MemberInvoicePreview,
|
|
229
|
+
VendorVisitDetails,
|
|
230
|
+
VendorVisitMessagePreview,
|
|
231
|
+
VendorVisitRequestSummary,
|
|
232
|
+
VisitCall,
|
|
233
|
+
VisitCallParticipant,
|
|
234
|
+
VisitCallsResponse,
|
|
235
|
+
VisitConversation,
|
|
236
|
+
VisitConversationCounterparty,
|
|
237
|
+
VisitConversationLatestMessage,
|
|
238
|
+
VisitConversationLiveCall,
|
|
239
|
+
VisitConversationMessage,
|
|
240
|
+
VisitConversationParticipant,
|
|
241
|
+
VisitConversationSummary,
|
|
242
|
+
VisitConversationWindow,
|
|
243
|
+
VisitDetailVendor,
|
|
244
|
+
)
|
|
245
|
+
from .write_contracts import (
|
|
246
|
+
AttachMediaPayload,
|
|
247
|
+
BasicMessageResponse,
|
|
248
|
+
CreateTodoBody,
|
|
249
|
+
CreateTodoResponse,
|
|
250
|
+
SendRequestMessageRequest,
|
|
251
|
+
SendRequestMessageResponse,
|
|
252
|
+
UpdateEntityPropertiesRequest,
|
|
253
|
+
UpdateEntityProperty,
|
|
254
|
+
UpdateMultiEnumProperty,
|
|
255
|
+
)
|
|
256
|
+
|
|
257
|
+
__all__ = [
|
|
258
|
+
"AccessPreferencesResponse",
|
|
259
|
+
"AppUpdate",
|
|
260
|
+
"ApprovedPurchase",
|
|
261
|
+
"AttachMediaPayload",
|
|
262
|
+
"AutopilotCategoriesResponse",
|
|
263
|
+
"AutopilotCategory",
|
|
264
|
+
"AutopilotEntityAssociation",
|
|
265
|
+
"AutopilotHomeAssociation",
|
|
266
|
+
"AutopilotIllustration",
|
|
267
|
+
"AutopilotIneligiblePlan",
|
|
268
|
+
"AutopilotPlan",
|
|
269
|
+
"AutopilotPlanRequirement",
|
|
270
|
+
"AutopilotPricingPolicy",
|
|
271
|
+
"AutopilotRequirementOption",
|
|
272
|
+
"AutopilotRequirementProperty",
|
|
273
|
+
"AutopilotRequirementRoomCandidate",
|
|
274
|
+
"AutopilotRequirementRoomProperty",
|
|
275
|
+
"AutopilotRoomAssociation",
|
|
276
|
+
"BasicMessageResponse",
|
|
277
|
+
"BookableHandymanTasksResponse",
|
|
278
|
+
"Bootstrap",
|
|
279
|
+
"CalendarBusyBlock",
|
|
280
|
+
"CalendarBusyResponse",
|
|
281
|
+
"CalendarEvent",
|
|
282
|
+
"CalendarOption",
|
|
283
|
+
"CalendarSyncResponse",
|
|
284
|
+
"CasaAIActiveResponse",
|
|
285
|
+
"CasaAIBootstrapResponse",
|
|
286
|
+
"CasaAIConversation",
|
|
287
|
+
"CasaAIMessage",
|
|
288
|
+
"CasaAIMessageFeedback",
|
|
289
|
+
"CasaAIMessagePart",
|
|
290
|
+
"CasaAIMessagesResponse",
|
|
291
|
+
"CasaAIStarterSuggestion",
|
|
292
|
+
"CasaModel",
|
|
293
|
+
"CompletedRequestsResponse",
|
|
294
|
+
"ConsumptionHistory",
|
|
295
|
+
"CreateTodoBody",
|
|
296
|
+
"CreateTodoResponse",
|
|
297
|
+
"CreditHistory",
|
|
298
|
+
"DocumentCitation",
|
|
299
|
+
"DocumentDetailsResponse",
|
|
300
|
+
"DocumentExtraction",
|
|
301
|
+
"DocumentOrganization",
|
|
302
|
+
"DocumentStructureSuggestion",
|
|
303
|
+
"DocumentStructureSuggestionsResponse",
|
|
304
|
+
"DocumentSuggestion",
|
|
305
|
+
"DocumentSuggestionsResponse",
|
|
306
|
+
"DocumentType",
|
|
307
|
+
"DocumentTypesResponse",
|
|
308
|
+
"DocumentsResponse",
|
|
309
|
+
"EntityIdentity",
|
|
310
|
+
"EntityImage",
|
|
311
|
+
"EntityMake",
|
|
312
|
+
"EntityModel",
|
|
313
|
+
"EntityProperty",
|
|
314
|
+
"GroupedTaskDetails",
|
|
315
|
+
"GroupedTaskItem",
|
|
316
|
+
"HelpCenterArticle",
|
|
317
|
+
"HelpCenterBundle",
|
|
318
|
+
"HelpCenterBundleResponse",
|
|
319
|
+
"HelpCenterTopic",
|
|
320
|
+
"HomeBadgeCounts",
|
|
321
|
+
"HomeDetails",
|
|
322
|
+
"HomeDetailsResponse",
|
|
323
|
+
"HomeDocument",
|
|
324
|
+
"HomeFeedCard",
|
|
325
|
+
"HomeFeedResponse",
|
|
326
|
+
"HomeMember",
|
|
327
|
+
"HomeMembersResponse",
|
|
328
|
+
"HomeRoom",
|
|
329
|
+
"HomeStory",
|
|
330
|
+
"HomeVehicle",
|
|
331
|
+
"InventoryEnumOption",
|
|
332
|
+
"InventoryEnumsResponse",
|
|
333
|
+
"InventoryMakesResponse",
|
|
334
|
+
"InventoryPaintMatch",
|
|
335
|
+
"InventoryPaintMatchesResponse",
|
|
336
|
+
"InventoryServiceHistoryResponse",
|
|
337
|
+
"MailboxMailItem",
|
|
338
|
+
"MailboxMailItemsResponse",
|
|
339
|
+
"MailboxOverviewResponse",
|
|
340
|
+
"MatterportImage",
|
|
341
|
+
"MatterportImagesResponse",
|
|
342
|
+
"MediaAttachment",
|
|
343
|
+
"MemberAvailabilityConstraints",
|
|
344
|
+
"MemberAvailabilityDetail",
|
|
345
|
+
"MemberAvailabilitySlot",
|
|
346
|
+
"MemberAvailabilitySummary",
|
|
347
|
+
"MemberCredits",
|
|
348
|
+
"MemberInvoicePreview",
|
|
349
|
+
"MemberMailbox",
|
|
350
|
+
"MemberSimpleHome",
|
|
351
|
+
"MemberSimpleHomeStatus",
|
|
352
|
+
"MemberWaitlistEntry",
|
|
353
|
+
"MembershipBenefit",
|
|
354
|
+
"MembershipDetails",
|
|
355
|
+
"MembershipSavings",
|
|
356
|
+
"MembershipSavingsBreakdown",
|
|
357
|
+
"MembershipSavingsCategory",
|
|
358
|
+
"MembershipSavingsMetadata",
|
|
359
|
+
"MembershipSavingsSummary",
|
|
360
|
+
"ModelProperty",
|
|
361
|
+
"NotificationChannel",
|
|
362
|
+
"NotificationGroup",
|
|
363
|
+
"NotificationSettingsResponse",
|
|
364
|
+
"NotificationType",
|
|
365
|
+
"OnboardingAvailabilityResponse",
|
|
366
|
+
"OnboardingDetailsResponse",
|
|
367
|
+
"OnboardingEvent",
|
|
368
|
+
"OnboardingSlot",
|
|
369
|
+
"PackageDirection",
|
|
370
|
+
"PackageItem",
|
|
371
|
+
"PackagePickupStatus",
|
|
372
|
+
"PackagesResponse",
|
|
373
|
+
"Pagination",
|
|
374
|
+
"PaintBrand",
|
|
375
|
+
"PaintBrandsResponse",
|
|
376
|
+
"PaintCollection",
|
|
377
|
+
"PaintCollectionsResponse",
|
|
378
|
+
"PaintColor",
|
|
379
|
+
"PaintColorsResponse",
|
|
380
|
+
"PaintSearchResponse",
|
|
381
|
+
"PaymentMethodType",
|
|
382
|
+
"PendingAgreement",
|
|
383
|
+
"PropertyTaxInstallment",
|
|
384
|
+
"PropertyTaxRefresh",
|
|
385
|
+
"PropertyTaxReport",
|
|
386
|
+
"PropertyTaxSpecialAssessment",
|
|
387
|
+
"PropertyTaxesResponse",
|
|
388
|
+
"PropertyValue",
|
|
389
|
+
"PurchaseApproval",
|
|
390
|
+
"PurchaseInvoice",
|
|
391
|
+
"PurchaseVendor",
|
|
392
|
+
"PurchasedItem",
|
|
393
|
+
"PurchasesResponse",
|
|
394
|
+
"RecurringVendor",
|
|
395
|
+
"RecurringVendorCategoriesResponse",
|
|
396
|
+
"RecurringVendorCategory",
|
|
397
|
+
"RecurringVendorsResponse",
|
|
398
|
+
"ReferralCode",
|
|
399
|
+
"ReferralCodeResponse",
|
|
400
|
+
"ReleaseNote",
|
|
401
|
+
"ReleaseNoteSection",
|
|
402
|
+
"ReleaseNotesResponse",
|
|
403
|
+
"RequestCard",
|
|
404
|
+
"RequestDetails",
|
|
405
|
+
"RequestMessage",
|
|
406
|
+
"RequestPurchase",
|
|
407
|
+
"RequestStatus",
|
|
408
|
+
"RequestType",
|
|
409
|
+
"RequestsLane",
|
|
410
|
+
"RequestsResponse",
|
|
411
|
+
"RoomImageCandidate",
|
|
412
|
+
"RoomImageOptionsResponse",
|
|
413
|
+
"RoomMemberImage",
|
|
414
|
+
"RoomType",
|
|
415
|
+
"RoomTypesResponse",
|
|
416
|
+
"SchedulePreferencesResponse",
|
|
417
|
+
"SchedulingDay",
|
|
418
|
+
"SchedulingTimeOfDay",
|
|
419
|
+
"ScopedPurchasesResponse",
|
|
420
|
+
"SendRequestMessageRequest",
|
|
421
|
+
"SendRequestMessageResponse",
|
|
422
|
+
"SenderRole",
|
|
423
|
+
"ServiceHistoryItem",
|
|
424
|
+
"ServiceHistoryPlan",
|
|
425
|
+
"SimpleEntity",
|
|
426
|
+
"SuggestedTodosResponse",
|
|
427
|
+
"TaskDetails",
|
|
428
|
+
"TaskDetailsVisit",
|
|
429
|
+
"TaskUpdate",
|
|
430
|
+
"TasksLane",
|
|
431
|
+
"TodoCreatorRole",
|
|
432
|
+
"TodoDetail",
|
|
433
|
+
"TodoDetailsResponse",
|
|
434
|
+
"TodoLaneCard",
|
|
435
|
+
"TodoLaneCardKind",
|
|
436
|
+
"TodoLaneCardState",
|
|
437
|
+
"TodoReadDetail",
|
|
438
|
+
"TodoStatus",
|
|
439
|
+
"TodosLane",
|
|
440
|
+
"UpdateEntityPropertiesRequest",
|
|
441
|
+
"UpdateEntityProperty",
|
|
442
|
+
"UpdateMultiEnumProperty",
|
|
443
|
+
"UserDeviceRequest",
|
|
444
|
+
"UtilitiesInsightsResponse",
|
|
445
|
+
"UtilityInsightsAccount",
|
|
446
|
+
"UtilityInsightsService",
|
|
447
|
+
"UtilityInsightsStatement",
|
|
448
|
+
"UtilityUsageGraph",
|
|
449
|
+
"UtilityUsageGraphWindow",
|
|
450
|
+
"VehiclePowertrain",
|
|
451
|
+
"VehiclesResponse",
|
|
452
|
+
"VendorVisit",
|
|
453
|
+
"VendorVisitAutopilotPlan",
|
|
454
|
+
"VendorVisitAutopilotTaskTarget",
|
|
455
|
+
"VendorVisitDetails",
|
|
456
|
+
"VendorVisitMessagePreview",
|
|
457
|
+
"VendorVisitRequestSummary",
|
|
458
|
+
"VendorVisitStatus",
|
|
459
|
+
"VisitCall",
|
|
460
|
+
"VisitCallParticipant",
|
|
461
|
+
"VisitCallsResponse",
|
|
462
|
+
"VisitConversation",
|
|
463
|
+
"VisitConversationCounterparty",
|
|
464
|
+
"VisitConversationLatestMessage",
|
|
465
|
+
"VisitConversationLiveCall",
|
|
466
|
+
"VisitConversationMessage",
|
|
467
|
+
"VisitConversationParticipant",
|
|
468
|
+
"VisitConversationSummary",
|
|
469
|
+
"VisitConversationWindow",
|
|
470
|
+
"VisitDetailVendor",
|
|
471
|
+
"VisitType",
|
|
472
|
+
"VisitsCalendarResponse",
|
|
473
|
+
"WeatherCondition",
|
|
474
|
+
"WeatherResponse",
|
|
475
|
+
"WorkDocumentSource",
|
|
476
|
+
"WorkDocumentSourceResponse",
|
|
477
|
+
]
|
casahome/models/_base.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Shared model base and helpers."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from datetime import UTC, datetime
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel, ConfigDict
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CasaModel(BaseModel):
|
|
11
|
+
"""Base for all Casa wire models.
|
|
12
|
+
|
|
13
|
+
``extra="allow"`` is deliberate. Casa ships new fields constantly, and the
|
|
14
|
+
library must not break when it does. Unknown fields ride along in
|
|
15
|
+
``model_extra``.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True, frozen=False)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def epoch_to_dt(value: int | None) -> datetime | None:
|
|
22
|
+
"""Convert Casa's epoch-second integers to aware UTC datetimes."""
|
|
23
|
+
if value is None:
|
|
24
|
+
return None
|
|
25
|
+
return datetime.fromtimestamp(value, tz=UTC)
|
casahome/models/ai.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""Casa AI reads only. Message and active-response schemas are UNVERIFIED.
|
|
2
|
+
|
|
3
|
+
Static message-part payloads are tagged unions with unresolved wire encoding.
|
|
4
|
+
They remain JSON values rather than guessed discriminated models.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pydantic import Field, JsonValue
|
|
8
|
+
|
|
9
|
+
from casahome.models._base import CasaModel
|
|
10
|
+
from casahome.models.images import MediaAttachment
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CasaAIConversation(CasaModel):
|
|
14
|
+
id: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CasaAIStarterSuggestion(CasaModel):
|
|
18
|
+
prompt: str
|
|
19
|
+
system_image: str | None = None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CasaAIMessagePart(CasaModel):
|
|
23
|
+
id: str | None = None
|
|
24
|
+
payload: JsonValue = None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class CasaAIMessageFeedback(CasaModel):
|
|
28
|
+
rating: str | None = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CasaAIMessage(CasaModel):
|
|
32
|
+
id: str | None = None
|
|
33
|
+
content: str | None = None
|
|
34
|
+
sender_role: str | None = None
|
|
35
|
+
created_at: int | None = None
|
|
36
|
+
parts: list[CasaAIMessagePart] = Field(default_factory=list)
|
|
37
|
+
attachments: list[MediaAttachment] = Field(default_factory=list)
|
|
38
|
+
feedback: CasaAIMessageFeedback | None = None
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class CasaAIMessagesResponse(CasaModel):
|
|
42
|
+
items: list[CasaAIMessage]
|
|
43
|
+
next_cursor: str | None = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class CasaAIActiveResponse(CasaModel):
|
|
47
|
+
message_id: str | None = None
|
|
48
|
+
status_message: str | None = None
|
|
49
|
+
parts: list[CasaAIMessagePart] = Field(default_factory=list)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class CasaAIBootstrapResponse(CasaModel):
|
|
53
|
+
conversation: CasaAIConversation | None
|
|
54
|
+
messages: CasaAIMessagesResponse
|
|
55
|
+
active_response: CasaAIActiveResponse | None
|
|
56
|
+
starter_suggestions: list[CasaAIStarterSuggestion]
|
|
57
|
+
event_cursor: str | None = None
|
|
58
|
+
send_to_human_target_message_id: str | None = None
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Members, vehicles, utilities, and release notes.
|
|
2
|
+
|
|
3
|
+
Vehicles and utility services were empty. Their optional item fields are known
|
|
4
|
+
from static Codable metadata. Vehicle readings remain opaque JSON until observed.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from pydantic import Field, JsonValue
|
|
8
|
+
|
|
9
|
+
from casahome.models._base import CasaModel
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HomeMember(CasaModel):
|
|
13
|
+
id: str
|
|
14
|
+
first_name: str
|
|
15
|
+
last_name: str
|
|
16
|
+
user_id: str | None = None
|
|
17
|
+
phone: str | None = None
|
|
18
|
+
email: str | None = None
|
|
19
|
+
gender: str | None = None
|
|
20
|
+
date_of_birth: str | None = None
|
|
21
|
+
relationship_to_primary: str | None = None
|
|
22
|
+
avatar_url: str | None = None
|
|
23
|
+
avatar_url_cache_key: str | None = None
|
|
24
|
+
expires_at: int | None = None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class HomeMembersResponse(CasaModel):
|
|
28
|
+
members: list[HomeMember]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class VehiclePowertrain(CasaModel):
|
|
32
|
+
type: str | None = None
|
|
33
|
+
display_name: str | None = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class HomeVehicle(CasaModel):
|
|
37
|
+
id: str | None = None
|
|
38
|
+
home_id: str | None = None
|
|
39
|
+
status: str | None = None
|
|
40
|
+
make: str | None = None
|
|
41
|
+
model: str | None = None
|
|
42
|
+
year: int | None = None
|
|
43
|
+
display_name: str | None = None
|
|
44
|
+
vin: str | None = None
|
|
45
|
+
powertrain: VehiclePowertrain | None = None
|
|
46
|
+
permissions: list[str] = Field(default_factory=list)
|
|
47
|
+
last_synced_at: str | None = None
|
|
48
|
+
last_successful_sync_at: str | None = None
|
|
49
|
+
readings: JsonValue = None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class VehiclesResponse(CasaModel):
|
|
53
|
+
vehicles: list[HomeVehicle]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class UtilityInsightsStatement(CasaModel):
|
|
57
|
+
id: str | None = None
|
|
58
|
+
ends_at: int | None = None
|
|
59
|
+
total_amount_usd_due: float | None = None
|
|
60
|
+
service_usage_amount: float | None = None
|
|
61
|
+
service_amount_usd: float | None = None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class UtilityUsageGraphWindow(CasaModel):
|
|
65
|
+
id: str | None = None
|
|
66
|
+
starts_at: int | None = None
|
|
67
|
+
ends_at: int | None = None
|
|
68
|
+
usage_values: list[float] = Field(default_factory=list)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class UtilityUsageGraph(CasaModel):
|
|
72
|
+
id: str | None = None
|
|
73
|
+
period: str | None = None
|
|
74
|
+
windows: list[UtilityUsageGraphWindow] = Field(default_factory=list)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class UtilityInsightsAccount(CasaModel):
|
|
78
|
+
id: str | None = None
|
|
79
|
+
account_number: str | None = None
|
|
80
|
+
address_line: str | None = None
|
|
81
|
+
address_location: str | None = None
|
|
82
|
+
provider_name: str | None = None
|
|
83
|
+
image_url: str | None = None
|
|
84
|
+
image_url_cache_key: str | None = None
|
|
85
|
+
is_selected: bool | None = None
|
|
86
|
+
service_types: list[str] = Field(default_factory=list)
|
|
87
|
+
credential_status: str | None = None
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class UtilityInsightsService(CasaModel):
|
|
91
|
+
id: str | None = None
|
|
92
|
+
service_type: str | None = None
|
|
93
|
+
usage_unit: str | None = None
|
|
94
|
+
statements: list[UtilityInsightsStatement] = Field(default_factory=list)
|
|
95
|
+
interval_graphs: list[UtilityUsageGraph] = Field(default_factory=list)
|
|
96
|
+
accounts: list[UtilityInsightsAccount] = Field(default_factory=list)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class UtilitiesInsightsResponse(CasaModel):
|
|
100
|
+
services: list[UtilityInsightsService]
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class ReleaseNoteSection(CasaModel):
|
|
104
|
+
id: str
|
|
105
|
+
content: str
|
|
106
|
+
title: str | None = None
|
|
107
|
+
hero_image_url: str | None = None
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class ReleaseNote(CasaModel):
|
|
111
|
+
id: str
|
|
112
|
+
title: str
|
|
113
|
+
version: str
|
|
114
|
+
date: int
|
|
115
|
+
min_build_number: int
|
|
116
|
+
sections: list[ReleaseNoteSection]
|
|
117
|
+
max_build_number: int | None = None
|
|
118
|
+
prelude: str | None = None
|
|
119
|
+
hero_image_url: str | None = None
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class ReleaseNotesResponse(CasaModel):
|
|
123
|
+
data: list[ReleaseNote]
|