77from numpy .typing import NDArray
88
99from viam .app .data_client import DataClient
10- from viam .gen .app .v1 .app_pb2 import FragmentHistoryEntry , GetFragmentHistoryRequest , GetFragmentHistoryResponse
10+ from viam .gen .app .data import FragmentHistoryEntry , GetFragmentHistoryRequest , GetFragmentHistoryResponse
11+ from viam .gen .app .packages import FragmentImportList , PackageType
1112from viam .media .video import ViamImage
1213from viam .proto .app import (
1314 AddRoleRequest ,
314315 TrainingJobMetadata ,
315316 UnimplementedMLTrainingServiceBase ,
316317)
317- from viam .proto .app .packages import PackageType
318- from viam .proto .app .robot import ComponentConfig
319318from viam .proto .common import (
320319 DoCommandRequest ,
321320 DoCommandResponse ,
@@ -1388,6 +1387,7 @@ def __init__(
13881387 api_keys_with_authorizations : List [APIKeyWithAuthorizations ],
13891388 items : List [RegistryItem ],
13901389 package_type : PackageType .ValueType ,
1390+ default_fragments_for_org : Optional [FragmentImportList ] = None ,
13911391 ):
13921392 self .organizations = organizations
13931393 self .location = location
@@ -1411,6 +1411,7 @@ def __init__(
14111411 self .api_keys_with_authorizations = api_keys_with_authorizations
14121412 self .items = items
14131413 self .package_type = package_type
1414+ self .default_fragments_for_org = default_fragments_for_org
14141415 self .send_email_invite = False
14151416 self .organization_metadata = {}
14161417 self .location_metadata = {}
@@ -1440,7 +1441,7 @@ async def ListOrganizationsByUser(self, stream: Stream[ListOrganizationsByUserRe
14401441 async def GetOrganization (self , stream : Stream [GetOrganizationRequest , GetOrganizationResponse ]) -> None :
14411442 request = await stream .recv_message ()
14421443 assert request is not None
1443- await stream .send_message (GetOrganizationResponse (organization = self .organizations [0 ]))
1444+ await stream .send_message (GetOrganizationResponse (organization = Organization ( id = self .id , name = self . name , created_on = self . organizations [0 ]. created_on , public_namespace = self . organizations [ 0 ]. public_namespace , default_region = self . organizations [ 0 ]. default_region , cid = self . organizations [ 0 ]. cid , default_fragments = self . default_fragments_for_org ) ))
14441445
14451446 async def GetOrganizationNamespaceAvailability (
14461447 self , stream : Stream [GetOrganizationNamespaceAvailabilityRequest , GetOrganizationNamespaceAvailabilityResponse ]
@@ -1457,7 +1458,8 @@ async def UpdateOrganization(self, stream: Stream[UpdateOrganizationRequest, Upd
14571458 self .update_cid = request .cid
14581459 self .update_name = request .name
14591460 self .update_namespace = request .public_namespace
1460- await stream .send_message (UpdateOrganizationResponse (organization = self .organizations [0 ]))
1461+ self .update_default_fragments = request .default_fragments
1462+ await stream .send_message (UpdateOrganizationResponse (organization = Organization (id = self .id , name = self .name , created_on = self .organizations [0 ].created_on , public_namespace = self .update_namespace , default_region = self .update_region , cid = self .update_cid , default_fragments = self .update_default_fragments )))
14611463
14621464 async def DeleteOrganization (self , stream : Stream [DeleteOrganizationRequest , DeleteOrganizationResponse ]) -> None :
14631465 request = await stream .recv_message ()
0 commit comments