nominal-api 0.648.0__py3-none-any.whl → 0.649.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.

Potentially problematic release.


This version of nominal-api might be problematic. Click here for more details.

nominal_api/__init__.py CHANGED
@@ -76,5 +76,5 @@ __all__ = [
76
76
 
77
77
  __conjure_generator_version__ = "4.9.0"
78
78
 
79
- __version__ = "0.648.0"
79
+ __version__ = "0.649.0"
80
80
 
nominal_api/_impl.py CHANGED
@@ -445,16 +445,18 @@ results to clients as part of a response object when directly throwing an except
445
445
  'name': ConjureFieldDefinition('name', str),
446
446
  'message': ConjureFieldDefinition('message', OptionalTypeWrapper[str]),
447
447
  'error_instance_id': ConjureFieldDefinition('errorInstanceId', str),
448
- 'status_code': ConjureFieldDefinition('statusCode', int)
448
+ 'status_code': ConjureFieldDefinition('statusCode', int),
449
+ 'params': ConjureFieldDefinition('params', Dict[str, str])
449
450
  }
450
451
 
451
- __slots__: List[str] = ['_name', '_message', '_error_instance_id', '_status_code']
452
+ __slots__: List[str] = ['_name', '_message', '_error_instance_id', '_status_code', '_params']
452
453
 
453
- def __init__(self, error_instance_id: str, name: str, status_code: int, message: Optional[str] = None) -> None:
454
+ def __init__(self, error_instance_id: str, name: str, params: Dict[str, str], status_code: int, message: Optional[str] = None) -> None:
454
455
  self._name = name
455
456
  self._message = message
456
457
  self._error_instance_id = error_instance_id
457
458
  self._status_code = status_code
459
+ self._params = params
458
460
 
459
461
  @builtins.property
460
462
  def name(self) -> str:
@@ -472,6 +474,10 @@ results to clients as part of a response object when directly throwing an except
472
474
  def status_code(self) -> int:
473
475
  return self._status_code
474
476
 
477
+ @builtins.property
478
+ def params(self) -> Dict[str, str]:
479
+ return self._params
480
+
475
481
 
476
482
  api_SerializableError.__name__ = "SerializableError"
477
483
  api_SerializableError.__qualname__ = "SerializableError"
@@ -13672,6 +13678,71 @@ a RunNotFound error will be thrown.
13672
13678
  _decoder = ConjureDecoder()
13673
13679
  return _decoder.decode(_response.json(), scout_notebook_api_NotebookMetadata, self._return_none_for_unknown_union_types)
13674
13680
 
13681
+ def get_used_ref_names(self, auth_header: str, rid: str) -> List[str]:
13682
+ """
13683
+ Returns the set of all ref names used by the workbook.
13684
+ """
13685
+
13686
+ _headers: Dict[str, Any] = {
13687
+ 'Accept': 'application/json',
13688
+ 'Authorization': auth_header,
13689
+ }
13690
+
13691
+ _params: Dict[str, Any] = {
13692
+ }
13693
+
13694
+ _path_params: Dict[str, Any] = {
13695
+ 'rid': rid,
13696
+ }
13697
+
13698
+ _json: Any = None
13699
+
13700
+ _path = '/scout/v2/notebook/{rid}/ref-names'
13701
+ _path = _path.format(**_path_params)
13702
+
13703
+ _response: Response = self._request(
13704
+ 'GET',
13705
+ self._uri + _path,
13706
+ params=_params,
13707
+ headers=_headers,
13708
+ json=_json)
13709
+
13710
+ _decoder = ConjureDecoder()
13711
+ return _decoder.decode(_response.json(), List[scout_api_DataSourceRefName], self._return_none_for_unknown_union_types)
13712
+
13713
+ def update_ref_names(self, auth_header: str, request: "scout_notebook_api_UpdateRefNameRequest", rid: str) -> "scout_notebook_api_Notebook":
13714
+ """
13715
+ Updates the data source ref names for all variables used in the workbook.
13716
+ """
13717
+
13718
+ _headers: Dict[str, Any] = {
13719
+ 'Accept': 'application/json',
13720
+ 'Content-Type': 'application/json',
13721
+ 'Authorization': auth_header,
13722
+ }
13723
+
13724
+ _params: Dict[str, Any] = {
13725
+ }
13726
+
13727
+ _path_params: Dict[str, Any] = {
13728
+ 'rid': rid,
13729
+ }
13730
+
13731
+ _json: Any = ConjureEncoder().default(request)
13732
+
13733
+ _path = '/scout/v2/notebook/{rid}/update-ref-names'
13734
+ _path = _path.format(**_path_params)
13735
+
13736
+ _response: Response = self._request(
13737
+ 'POST',
13738
+ self._uri + _path,
13739
+ params=_params,
13740
+ headers=_headers,
13741
+ json=_json)
13742
+
13743
+ _decoder = ConjureDecoder()
13744
+ return _decoder.decode(_response.json(), scout_notebook_api_Notebook, self._return_none_for_unknown_union_types)
13745
+
13675
13746
  def get_all_labels_and_properties(self, auth_header: str, workspaces: List[str] = None) -> "scout_notebook_api_GetAllLabelsAndPropertiesResponse":
13676
13747
  """
13677
13748
  Returns all properties (key value pairs) and labels that have been previously used on workbook. These can
@@ -14665,6 +14736,74 @@ Throws if you save to an archived template.
14665
14736
  _decoder = ConjureDecoder()
14666
14737
  return _decoder.decode(_response.json(), scout_template_api_Template, self._return_none_for_unknown_union_types)
14667
14738
 
14739
+ def get_used_ref_names(self, auth_header: str, template_rid: str, branch: Optional[str] = None, commit: Optional[str] = None) -> List[str]:
14740
+ """
14741
+ Returns the set of all ref names used by the template.
14742
+ """
14743
+
14744
+ _headers: Dict[str, Any] = {
14745
+ 'Accept': 'application/json',
14746
+ 'Authorization': auth_header,
14747
+ }
14748
+
14749
+ _params: Dict[str, Any] = {
14750
+ 'branch': branch,
14751
+ 'commit': commit,
14752
+ }
14753
+
14754
+ _path_params: Dict[str, Any] = {
14755
+ 'templateRid': template_rid,
14756
+ }
14757
+
14758
+ _json: Any = None
14759
+
14760
+ _path = '/scout/v1/template/{templateRid}/ref-names'
14761
+ _path = _path.format(**_path_params)
14762
+
14763
+ _response: Response = self._request(
14764
+ 'GET',
14765
+ self._uri + _path,
14766
+ params=_params,
14767
+ headers=_headers,
14768
+ json=_json)
14769
+
14770
+ _decoder = ConjureDecoder()
14771
+ return _decoder.decode(_response.json(), List[scout_api_DataSourceRefName], self._return_none_for_unknown_union_types)
14772
+
14773
+ def update_ref_names(self, auth_header: str, request: "scout_template_api_UpdateRefNameRequest", template_rid: str, branch: Optional[str] = None) -> "scout_template_api_Template":
14774
+ """
14775
+ Updates the data source ref names for all variables used in the template.
14776
+ """
14777
+
14778
+ _headers: Dict[str, Any] = {
14779
+ 'Accept': 'application/json',
14780
+ 'Content-Type': 'application/json',
14781
+ 'Authorization': auth_header,
14782
+ }
14783
+
14784
+ _params: Dict[str, Any] = {
14785
+ 'branch': branch,
14786
+ }
14787
+
14788
+ _path_params: Dict[str, Any] = {
14789
+ 'templateRid': template_rid,
14790
+ }
14791
+
14792
+ _json: Any = ConjureEncoder().default(request)
14793
+
14794
+ _path = '/scout/v1/template/{templateRid}/update-ref-names'
14795
+ _path = _path.format(**_path_params)
14796
+
14797
+ _response: Response = self._request(
14798
+ 'POST',
14799
+ self._uri + _path,
14800
+ params=_params,
14801
+ headers=_headers,
14802
+ json=_json)
14803
+
14804
+ _decoder = ConjureDecoder()
14805
+ return _decoder.decode(_response.json(), scout_template_api_Template, self._return_none_for_unknown_union_types)
14806
+
14668
14807
  def commit(self, auth_header: str, request: "scout_template_api_CommitTemplateRequest", template_rid: str, branch: Optional[str] = None) -> "scout_template_api_Template":
14669
14808
  """
14670
14809
  Creates a commit with a commit message.
@@ -37035,20 +37174,10 @@ class scout_compute_api_ExponentialCurve(ConjureBeanType):
37035
37174
  @builtins.classmethod
37036
37175
  def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
37037
37176
  return {
37038
- 'intercept': ConjureFieldDefinition('intercept', OptionalTypeWrapper[scout_compute_api_DoubleConstant])
37039
37177
  }
37040
37178
 
37041
- __slots__: List[str] = ['_intercept']
37042
-
37043
- def __init__(self, intercept: Optional["scout_compute_api_DoubleConstant"] = None) -> None:
37044
- self._intercept = intercept
37179
+ __slots__: List[str] = []
37045
37180
 
37046
- @builtins.property
37047
- def intercept(self) -> Optional["scout_compute_api_DoubleConstant"]:
37048
- """
37049
- The y-value at the point x (or t) = 0. If omitted, the y-intercept will also be fit to the data.
37050
- """
37051
- return self._intercept
37052
37181
 
37053
37182
 
37054
37183
  scout_compute_api_ExponentialCurve.__name__ = "ExponentialCurve"
@@ -49220,17 +49349,10 @@ class scout_compute_resolved_api_ExponentialCurve(ConjureBeanType):
49220
49349
  @builtins.classmethod
49221
49350
  def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
49222
49351
  return {
49223
- 'intercept': ConjureFieldDefinition('intercept', OptionalTypeWrapper[float])
49224
49352
  }
49225
49353
 
49226
- __slots__: List[str] = ['_intercept']
49354
+ __slots__: List[str] = []
49227
49355
 
49228
- def __init__(self, intercept: Optional[float] = None) -> None:
49229
- self._intercept = intercept
49230
-
49231
- @builtins.property
49232
- def intercept(self) -> Optional[float]:
49233
- return self._intercept
49234
49356
 
49235
49357
 
49236
49358
  scout_compute_resolved_api_ExponentialCurve.__name__ = "ExponentialCurve"
@@ -65484,6 +65606,29 @@ scout_notebook_api_UpdateNotebookRequest.__qualname__ = "UpdateNotebookRequest"
65484
65606
  scout_notebook_api_UpdateNotebookRequest.__module__ = "nominal_api.scout_notebook_api"
65485
65607
 
65486
65608
 
65609
+ class scout_notebook_api_UpdateRefNameRequest(ConjureBeanType):
65610
+
65611
+ @builtins.classmethod
65612
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
65613
+ return {
65614
+ 'ref_name_updates': ConjureFieldDefinition('refNameUpdates', Dict[scout_api_DataSourceRefName, scout_api_DataSourceRefName])
65615
+ }
65616
+
65617
+ __slots__: List[str] = ['_ref_name_updates']
65618
+
65619
+ def __init__(self, ref_name_updates: Dict[str, str]) -> None:
65620
+ self._ref_name_updates = ref_name_updates
65621
+
65622
+ @builtins.property
65623
+ def ref_name_updates(self) -> Dict[str, str]:
65624
+ return self._ref_name_updates
65625
+
65626
+
65627
+ scout_notebook_api_UpdateRefNameRequest.__name__ = "UpdateRefNameRequest"
65628
+ scout_notebook_api_UpdateRefNameRequest.__qualname__ = "UpdateRefNameRequest"
65629
+ scout_notebook_api_UpdateRefNameRequest.__module__ = "nominal_api.scout_notebook_api"
65630
+
65631
+
65487
65632
  class scout_plotting_TimestampType(ConjureEnumType):
65488
65633
 
65489
65634
  ABSOLUTE = 'ABSOLUTE'
@@ -68519,6 +68664,39 @@ scout_template_api_UpdateMetadataRequest.__qualname__ = "UpdateMetadataRequest"
68519
68664
  scout_template_api_UpdateMetadataRequest.__module__ = "nominal_api.scout_template_api"
68520
68665
 
68521
68666
 
68667
+ class scout_template_api_UpdateRefNameRequest(ConjureBeanType):
68668
+
68669
+ @builtins.classmethod
68670
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
68671
+ return {
68672
+ 'ref_name_updates': ConjureFieldDefinition('refNameUpdates', Dict[scout_api_DataSourceRefName, scout_api_DataSourceRefName]),
68673
+ 'latest_commit': ConjureFieldDefinition('latestCommit', OptionalTypeWrapper[scout_versioning_api_CommitId])
68674
+ }
68675
+
68676
+ __slots__: List[str] = ['_ref_name_updates', '_latest_commit']
68677
+
68678
+ def __init__(self, ref_name_updates: Dict[str, str], latest_commit: Optional[str] = None) -> None:
68679
+ self._ref_name_updates = ref_name_updates
68680
+ self._latest_commit = latest_commit
68681
+
68682
+ @builtins.property
68683
+ def ref_name_updates(self) -> Dict[str, str]:
68684
+ return self._ref_name_updates
68685
+
68686
+ @builtins.property
68687
+ def latest_commit(self) -> Optional[str]:
68688
+ """
68689
+ If present, will validate that the latest commit matches this id,
68690
+ and otherwise throw CommitConflict.
68691
+ """
68692
+ return self._latest_commit
68693
+
68694
+
68695
+ scout_template_api_UpdateRefNameRequest.__name__ = "UpdateRefNameRequest"
68696
+ scout_template_api_UpdateRefNameRequest.__qualname__ = "UpdateRefNameRequest"
68697
+ scout_template_api_UpdateRefNameRequest.__module__ = "nominal_api.scout_template_api"
68698
+
68699
+
68522
68700
  class scout_units_api_GetUnitsResponse(ConjureBeanType):
68523
68701
 
68524
68702
  @builtins.classmethod
@@ -73700,8 +73878,9 @@ Nominal live within a workspace.
73700
73878
 
73701
73879
  def get_default_workspace(self, auth_header: str) -> Optional["security_api_workspace_Workspace"]:
73702
73880
  """
73703
- Gets the default workspace for the requesting user. It may not be present if the user does not have
73704
- access to any workspaces or no default workspace is configured for the user's organization.
73881
+ Gets the default workspace for the requesting user. If the user belongs to a single workspace,
73882
+ that workspace is returned. Otherwise, if the user's organization has a default workspace and
73883
+ the user belongs to it, that will be returned.
73705
73884
  """
73706
73885
 
73707
73886
  _headers: Dict[str, Any] = {
@@ -18,5 +18,6 @@ from .._impl import (
18
18
  scout_notebook_api_SortByField as SortByField,
19
19
  scout_notebook_api_UpdateNotebookMetadataRequest as UpdateNotebookMetadataRequest,
20
20
  scout_notebook_api_UpdateNotebookRequest as UpdateNotebookRequest,
21
+ scout_notebook_api_UpdateRefNameRequest as UpdateRefNameRequest,
21
22
  )
22
23
 
@@ -15,5 +15,6 @@ from .._impl import (
15
15
  scout_template_api_TemplateMetadata as TemplateMetadata,
16
16
  scout_template_api_TemplateSummary as TemplateSummary,
17
17
  scout_template_api_UpdateMetadataRequest as UpdateMetadataRequest,
18
+ scout_template_api_UpdateRefNameRequest as UpdateRefNameRequest,
18
19
  )
19
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal-api
3
- Version: 0.648.0
3
+ Version: 0.649.0
4
4
  Requires-Python: >=3.8
5
5
  Requires-Dist: requests
6
6
  Requires-Dist: conjure-python-client<3,>=2.8.0
@@ -1,5 +1,5 @@
1
- nominal_api/__init__.py,sha256=UyIsaXjtJzowGOZDSBrr5mvJIwOAyFaVsnJf-zEPv2M,1995
2
- nominal_api/_impl.py,sha256=fEbMKHOIzTdVyoP9HfEERDmfiwa8ZnGZskAoCyIrXHQ,3093123
1
+ nominal_api/__init__.py,sha256=AWDyeJUw_rsShD4lxNqPRxzhiq5uBq3jdCr1aWTjZDs,1995
2
+ nominal_api/_impl.py,sha256=R6iq_51KzT5jQuDGtL_j00Ph6HEe_oWUOxp16MMw888,3098833
3
3
  nominal_api/py.typed,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
4
4
  nominal_api/api/__init__.py,sha256=1oJPOuAMfV2uClPUW8Ie1nj2Y6j81TDpedcc3yUFTe0,1294
5
5
  nominal_api/api_ids/__init__.py,sha256=CAtt44XgNZEEUDv-BbEbYtuxQ8y1wqSZU-STjBYdZv8,80
@@ -47,11 +47,11 @@ nominal_api/scout_internal_search_api/__init__.py,sha256=CF2YYZXkl95YkEgCbhqXSdA
47
47
  nominal_api/scout_jobs_api/__init__.py,sha256=_2ETRUShk1pestGAKzHwc69S-ililQRD4Y9JLD5qqZ4,146
48
48
  nominal_api/scout_layout_api/__init__.py,sha256=mKszV44ni9VODK9jFyY3O9YOV9DYltKJ20s91922EKc,1363
49
49
  nominal_api/scout_metadata/__init__.py,sha256=GIhWKJL2XSMB0iGaKfcGgmPHuvGWWmkK4lXSa1YsB44,332
50
- nominal_api/scout_notebook_api/__init__.py,sha256=QW0vg8ZrAmuctjnNLxTnqtwyQoX-H9MOkHlLWioe5AA,1230
50
+ nominal_api/scout_notebook_api/__init__.py,sha256=TW4_Y2DbakA13v3q_vmRSN8gaS8g0UYRREVKruujJc0,1299
51
51
  nominal_api/scout_plotting/__init__.py,sha256=m6u3y7R70mo3ugaCp_-fwlS8_tDwrsq1l5ElOTY0TBc,91
52
52
  nominal_api/scout_rids_api/__init__.py,sha256=zAioy5BpuLLgZQpF-11wWUEhntcHNj6sK5YzNC5z-3w,1188
53
53
  nominal_api/scout_run_api/__init__.py,sha256=lTAFwaHSqRs7dx316MzdQcgdBy7Y_fe_BbfbaktaZGs,2596
54
- nominal_api/scout_template_api/__init__.py,sha256=bsu8qPiZ4gf67G5iFvwsfkqEKJRZ7L5Wyg6qcFyogO0,1037
54
+ nominal_api/scout_template_api/__init__.py,sha256=twrd03oixkoGnRn_xpXywTcdq2tvMD1PLxSrMPdwz9c,1106
55
55
  nominal_api/scout_units_api/__init__.py,sha256=KxRDScfumX__0ncWJftGvgApn_LBTfnIBAvnaBrcA5A,368
56
56
  nominal_api/scout_versioning_api/__init__.py,sha256=Sf4T4t0rZXNRIZgkqLBN3yh0sAnrxiuzaTfDQVVkyO4,1323
57
57
  nominal_api/scout_video/__init__.py,sha256=zB7mM23yGAgC529rF4gjDmqcLRbsp0kJA3xef8meZko,200
@@ -73,7 +73,7 @@ nominal_api/timeseries_logicalseries_api/__init__.py,sha256=Q9iZHurmyDsJIFbUg-Eb
73
73
  nominal_api/timeseries_seriescache/__init__.py,sha256=tFCkNuyrVMgtj-HIl1pOYPJHaL2VikI4C_x97bX_Lcs,109
74
74
  nominal_api/timeseries_seriescache_api/__init__.py,sha256=U9EhlqdF9qzD1O9al0vcvcdgS_C5lq-lN3Kmr0K3g84,1191
75
75
  nominal_api/upload_api/__init__.py,sha256=ZMudWMSqCrNozohbHaJKuxJnT9Edepe7nxxXMz_pT9k,87
76
- nominal_api-0.648.0.dist-info/METADATA,sha256=3zganmhOd34ybiAGMBgc7VBym6A4kLuqTlLuioYbWgA,199
77
- nominal_api-0.648.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
78
- nominal_api-0.648.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
79
- nominal_api-0.648.0.dist-info/RECORD,,
76
+ nominal_api-0.649.0.dist-info/METADATA,sha256=fVreTxzmDeS4abZzedg5tbLGGav54aoZXE9r4JDT3t0,199
77
+ nominal_api-0.649.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
78
+ nominal_api-0.649.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
79
+ nominal_api-0.649.0.dist-info/RECORD,,