Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 5fad374

Browse files
authored
Merge pull request #8251 from systeminit/feat/si/upload-spec
feat(luminork): add install_from_file to luminork
2 parents fe0796e + bac4e1e commit 5fad374

14 files changed

Lines changed: 854 additions & 159 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generated-sdks/python/system_initiative_api_client/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"GetSchemaVariantV1Response",
128128
"HashMapValue",
129129
"InitialApiToken",
130+
"InstallFromFileV1Response",
130131
"InviteMemberRequest",
131132
"ListChangeSetV1Response",
132133
"ListComponentsV1Response",
@@ -308,6 +309,7 @@
308309
from system_initiative_api_client.models.get_schema_variant_v1_response import GetSchemaVariantV1Response as GetSchemaVariantV1Response
309310
from system_initiative_api_client.models.hash_map_value import HashMapValue as HashMapValue
310311
from system_initiative_api_client.models.initial_api_token import InitialApiToken as InitialApiToken
312+
from system_initiative_api_client.models.install_from_file_v1_response import InstallFromFileV1Response as InstallFromFileV1Response
311313
from system_initiative_api_client.models.invite_member_request import InviteMemberRequest as InviteMemberRequest
312314
from system_initiative_api_client.models.list_change_set_v1_response import ListChangeSetV1Response as ListChangeSetV1Response
313315
from system_initiative_api_client.models.list_components_v1_response import ListComponentsV1Response as ListComponentsV1Response

generated-sdks/python/system_initiative_api_client/api/schemas_api.py

Lines changed: 288 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from system_initiative_api_client.models.find_schema_v1_response import FindSchemaV1Response
3737
from system_initiative_api_client.models.get_schema_v1_response import GetSchemaV1Response
3838
from system_initiative_api_client.models.get_schema_variant_v1_response import GetSchemaVariantV1Response
39+
from system_initiative_api_client.models.install_from_file_v1_response import InstallFromFileV1Response
3940
from system_initiative_api_client.models.list_schema_v1_response import ListSchemaV1Response
4041
from system_initiative_api_client.models.search_schemas_v1_request import SearchSchemasV1Request
4142
from system_initiative_api_client.models.search_schemas_v1_response import SearchSchemasV1Response
@@ -5924,6 +5925,293 @@ def _get_variant_serialize(
59245925

59255926

59265927

5928+
@validate_call
5929+
def install_from_file(
5930+
self,
5931+
workspace_id: Annotated[StrictStr, Field(description="Workspace identifier")],
5932+
change_set_id: Annotated[StrictStr, Field(description="Change Set identifier")],
5933+
_request_timeout: Union[
5934+
None,
5935+
Annotated[StrictFloat, Field(gt=0)],
5936+
Tuple[
5937+
Annotated[StrictFloat, Field(gt=0)],
5938+
Annotated[StrictFloat, Field(gt=0)]
5939+
]
5940+
] = None,
5941+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
5942+
_content_type: Optional[StrictStr] = None,
5943+
_headers: Optional[Dict[StrictStr, Any]] = None,
5944+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
5945+
) -> InstallFromFileV1Response:
5946+
"""Install a schema from a PkgSpec file
5947+
5948+
Accepts a multipart form with a `pkg_spec` field containing the JSON PkgSpec. If the schema already exists, it will be upgraded with the new variant.
5949+
5950+
:param workspace_id: Workspace identifier (required)
5951+
:type workspace_id: str
5952+
:param change_set_id: Change Set identifier (required)
5953+
:type change_set_id: str
5954+
:param _request_timeout: timeout setting for this request. If one
5955+
number provided, it will be total request
5956+
timeout. It can also be a pair (tuple) of
5957+
(connection, read) timeouts.
5958+
:type _request_timeout: int, tuple(int, int), optional
5959+
:param _request_auth: set to override the auth_settings for an a single
5960+
request; this effectively ignores the
5961+
authentication in the spec for a single request.
5962+
:type _request_auth: dict, optional
5963+
:param _content_type: force content-type for the request.
5964+
:type _content_type: str, Optional
5965+
:param _headers: set to override the headers for a single
5966+
request; this effectively ignores the headers
5967+
in the spec for a single request.
5968+
:type _headers: dict, optional
5969+
:param _host_index: set to override the host_index for a single
5970+
request; this effectively ignores the host_index
5971+
in the spec for a single request.
5972+
:type _host_index: int, optional
5973+
:return: Returns the result object.
5974+
""" # noqa: E501
5975+
5976+
_param = self._install_from_file_serialize(
5977+
workspace_id=workspace_id,
5978+
change_set_id=change_set_id,
5979+
_request_auth=_request_auth,
5980+
_content_type=_content_type,
5981+
_headers=_headers,
5982+
_host_index=_host_index
5983+
)
5984+
5985+
_response_types_map: Dict[str, Optional[str]] = {
5986+
'200': "InstallFromFileV1Response",
5987+
'400': "ApiError",
5988+
'401': None,
5989+
'422': "ApiError",
5990+
'500': "ApiError",
5991+
}
5992+
response_data = self.api_client.call_api(
5993+
*_param,
5994+
_request_timeout=_request_timeout
5995+
)
5996+
response_data.read()
5997+
return self.api_client.response_deserialize(
5998+
response_data=response_data,
5999+
response_types_map=_response_types_map,
6000+
).data
6001+
6002+
6003+
@validate_call
6004+
def install_from_file_with_http_info(
6005+
self,
6006+
workspace_id: Annotated[StrictStr, Field(description="Workspace identifier")],
6007+
change_set_id: Annotated[StrictStr, Field(description="Change Set identifier")],
6008+
_request_timeout: Union[
6009+
None,
6010+
Annotated[StrictFloat, Field(gt=0)],
6011+
Tuple[
6012+
Annotated[StrictFloat, Field(gt=0)],
6013+
Annotated[StrictFloat, Field(gt=0)]
6014+
]
6015+
] = None,
6016+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
6017+
_content_type: Optional[StrictStr] = None,
6018+
_headers: Optional[Dict[StrictStr, Any]] = None,
6019+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6020+
) -> ApiResponse[InstallFromFileV1Response]:
6021+
"""Install a schema from a PkgSpec file
6022+
6023+
Accepts a multipart form with a `pkg_spec` field containing the JSON PkgSpec. If the schema already exists, it will be upgraded with the new variant.
6024+
6025+
:param workspace_id: Workspace identifier (required)
6026+
:type workspace_id: str
6027+
:param change_set_id: Change Set identifier (required)
6028+
:type change_set_id: str
6029+
:param _request_timeout: timeout setting for this request. If one
6030+
number provided, it will be total request
6031+
timeout. It can also be a pair (tuple) of
6032+
(connection, read) timeouts.
6033+
:type _request_timeout: int, tuple(int, int), optional
6034+
:param _request_auth: set to override the auth_settings for an a single
6035+
request; this effectively ignores the
6036+
authentication in the spec for a single request.
6037+
:type _request_auth: dict, optional
6038+
:param _content_type: force content-type for the request.
6039+
:type _content_type: str, Optional
6040+
:param _headers: set to override the headers for a single
6041+
request; this effectively ignores the headers
6042+
in the spec for a single request.
6043+
:type _headers: dict, optional
6044+
:param _host_index: set to override the host_index for a single
6045+
request; this effectively ignores the host_index
6046+
in the spec for a single request.
6047+
:type _host_index: int, optional
6048+
:return: Returns the result object.
6049+
""" # noqa: E501
6050+
6051+
_param = self._install_from_file_serialize(
6052+
workspace_id=workspace_id,
6053+
change_set_id=change_set_id,
6054+
_request_auth=_request_auth,
6055+
_content_type=_content_type,
6056+
_headers=_headers,
6057+
_host_index=_host_index
6058+
)
6059+
6060+
_response_types_map: Dict[str, Optional[str]] = {
6061+
'200': "InstallFromFileV1Response",
6062+
'400': "ApiError",
6063+
'401': None,
6064+
'422': "ApiError",
6065+
'500': "ApiError",
6066+
}
6067+
response_data = self.api_client.call_api(
6068+
*_param,
6069+
_request_timeout=_request_timeout
6070+
)
6071+
response_data.read()
6072+
return self.api_client.response_deserialize(
6073+
response_data=response_data,
6074+
response_types_map=_response_types_map,
6075+
)
6076+
6077+
6078+
@validate_call
6079+
def install_from_file_without_preload_content(
6080+
self,
6081+
workspace_id: Annotated[StrictStr, Field(description="Workspace identifier")],
6082+
change_set_id: Annotated[StrictStr, Field(description="Change Set identifier")],
6083+
_request_timeout: Union[
6084+
None,
6085+
Annotated[StrictFloat, Field(gt=0)],
6086+
Tuple[
6087+
Annotated[StrictFloat, Field(gt=0)],
6088+
Annotated[StrictFloat, Field(gt=0)]
6089+
]
6090+
] = None,
6091+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
6092+
_content_type: Optional[StrictStr] = None,
6093+
_headers: Optional[Dict[StrictStr, Any]] = None,
6094+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
6095+
) -> RESTResponseType:
6096+
"""Install a schema from a PkgSpec file
6097+
6098+
Accepts a multipart form with a `pkg_spec` field containing the JSON PkgSpec. If the schema already exists, it will be upgraded with the new variant.
6099+
6100+
:param workspace_id: Workspace identifier (required)
6101+
:type workspace_id: str
6102+
:param change_set_id: Change Set identifier (required)
6103+
:type change_set_id: str
6104+
:param _request_timeout: timeout setting for this request. If one
6105+
number provided, it will be total request
6106+
timeout. It can also be a pair (tuple) of
6107+
(connection, read) timeouts.
6108+
:type _request_timeout: int, tuple(int, int), optional
6109+
:param _request_auth: set to override the auth_settings for an a single
6110+
request; this effectively ignores the
6111+
authentication in the spec for a single request.
6112+
:type _request_auth: dict, optional
6113+
:param _content_type: force content-type for the request.
6114+
:type _content_type: str, Optional
6115+
:param _headers: set to override the headers for a single
6116+
request; this effectively ignores the headers
6117+
in the spec for a single request.
6118+
:type _headers: dict, optional
6119+
:param _host_index: set to override the host_index for a single
6120+
request; this effectively ignores the host_index
6121+
in the spec for a single request.
6122+
:type _host_index: int, optional
6123+
:return: Returns the result object.
6124+
""" # noqa: E501
6125+
6126+
_param = self._install_from_file_serialize(
6127+
workspace_id=workspace_id,
6128+
change_set_id=change_set_id,
6129+
_request_auth=_request_auth,
6130+
_content_type=_content_type,
6131+
_headers=_headers,
6132+
_host_index=_host_index
6133+
)
6134+
6135+
_response_types_map: Dict[str, Optional[str]] = {
6136+
'200': "InstallFromFileV1Response",
6137+
'400': "ApiError",
6138+
'401': None,
6139+
'422': "ApiError",
6140+
'500': "ApiError",
6141+
}
6142+
response_data = self.api_client.call_api(
6143+
*_param,
6144+
_request_timeout=_request_timeout
6145+
)
6146+
return response_data.response
6147+
6148+
6149+
def _install_from_file_serialize(
6150+
self,
6151+
workspace_id,
6152+
change_set_id,
6153+
_request_auth,
6154+
_content_type,
6155+
_headers,
6156+
_host_index,
6157+
) -> RequestSerialized:
6158+
6159+
_host = None
6160+
6161+
_collection_formats: Dict[str, str] = {
6162+
}
6163+
6164+
_path_params: Dict[str, str] = {}
6165+
_query_params: List[Tuple[str, str]] = []
6166+
_header_params: Dict[str, Optional[str]] = _headers or {}
6167+
_form_params: List[Tuple[str, str]] = []
6168+
_files: Dict[
6169+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
6170+
] = {}
6171+
_body_params: Optional[bytes] = None
6172+
6173+
# process the path parameters
6174+
if workspace_id is not None:
6175+
_path_params['workspace_id'] = workspace_id
6176+
if change_set_id is not None:
6177+
_path_params['change_set_id'] = change_set_id
6178+
# process the query parameters
6179+
# process the header parameters
6180+
# process the form parameters
6181+
# process the body parameter
6182+
6183+
6184+
# set the HTTP header `Accept`
6185+
if 'Accept' not in _header_params:
6186+
_header_params['Accept'] = self.api_client.select_header_accept(
6187+
[
6188+
'application/json'
6189+
]
6190+
)
6191+
6192+
6193+
# authentication setting
6194+
_auth_settings: List[str] = [
6195+
]
6196+
6197+
return self.api_client.param_serialize(
6198+
method='POST',
6199+
resource_path='/v1/w/{workspace_id}/change-sets/{change_set_id}/schemas/install_from_file',
6200+
path_params=_path_params,
6201+
query_params=_query_params,
6202+
header_params=_header_params,
6203+
body=_body_params,
6204+
post_params=_form_params,
6205+
files=_files,
6206+
auth_settings=_auth_settings,
6207+
collection_formats=_collection_formats,
6208+
_host=_host,
6209+
_request_auth=_request_auth
6210+
)
6211+
6212+
6213+
6214+
59276215
@validate_call
59286216
def install_schema(
59296217
self,

generated-sdks/python/system_initiative_api_client/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
from system_initiative_api_client.models.get_schema_variant_v1_response import GetSchemaVariantV1Response
102102
from system_initiative_api_client.models.hash_map_value import HashMapValue
103103
from system_initiative_api_client.models.initial_api_token import InitialApiToken
104+
from system_initiative_api_client.models.install_from_file_v1_response import InstallFromFileV1Response
104105
from system_initiative_api_client.models.invite_member_request import InviteMemberRequest
105106
from system_initiative_api_client.models.list_change_set_v1_response import ListChangeSetV1Response
106107
from system_initiative_api_client.models.list_components_v1_response import ListComponentsV1Response

0 commit comments

Comments
 (0)