nominal-api 0.623.0__py3-none-any.whl → 0.624.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.623.0"
79
+ __version__ = "0.624.0"
80
80
 
nominal_api/_impl.py CHANGED
@@ -404,6 +404,35 @@ api_Property.__qualname__ = "Property"
404
404
  api_Property.__module__ = "nominal_api.api"
405
405
 
406
406
 
407
+ class api_Range(ConjureBeanType):
408
+
409
+ @builtins.classmethod
410
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
411
+ return {
412
+ 'start': ConjureFieldDefinition('start', api_Timestamp),
413
+ 'end': ConjureFieldDefinition('end', api_Timestamp)
414
+ }
415
+
416
+ __slots__: List[str] = ['_start', '_end']
417
+
418
+ def __init__(self, end: "api_Timestamp", start: "api_Timestamp") -> None:
419
+ self._start = start
420
+ self._end = end
421
+
422
+ @builtins.property
423
+ def start(self) -> "api_Timestamp":
424
+ return self._start
425
+
426
+ @builtins.property
427
+ def end(self) -> "api_Timestamp":
428
+ return self._end
429
+
430
+
431
+ api_Range.__name__ = "Range"
432
+ api_Range.__qualname__ = "Range"
433
+ api_Range.__module__ = "nominal_api.api"
434
+
435
+
407
436
  class api_SerializableError(ConjureBeanType):
408
437
  """
409
438
  A SerializableError is a representation of a ServiceException that exists to send error
@@ -4345,6 +4374,40 @@ datasource_api_GetDataScopeBoundsResponse.__qualname__ = "GetDataScopeBoundsResp
4345
4374
  datasource_api_GetDataScopeBoundsResponse.__module__ = "nominal_api.datasource_api"
4346
4375
 
4347
4376
 
4377
+ class datasource_api_GetTagValuesForDataSourceRequest(ConjureBeanType):
4378
+
4379
+ @builtins.classmethod
4380
+ def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
4381
+ return {
4382
+ 'tag_keys': ConjureFieldDefinition('tagKeys', List[api_TagName]),
4383
+ 'range': ConjureFieldDefinition('range', OptionalTypeWrapper[api_Range])
4384
+ }
4385
+
4386
+ __slots__: List[str] = ['_tag_keys', '_range']
4387
+
4388
+ def __init__(self, tag_keys: List[str], range: Optional["api_Range"] = None) -> None:
4389
+ self._tag_keys = tag_keys
4390
+ self._range = range
4391
+
4392
+ @builtins.property
4393
+ def tag_keys(self) -> List[str]:
4394
+ return self._tag_keys
4395
+
4396
+ @builtins.property
4397
+ def range(self) -> Optional["api_Range"]:
4398
+ """
4399
+ For Nominal data sources, a time range can be provided to filter tag values to those present within the
4400
+ months spanned by the range. If left empty, this defaults to the last month. For external data sources,
4401
+ the range must not be specified, as all tag values are returned.
4402
+ """
4403
+ return self._range
4404
+
4405
+
4406
+ datasource_api_GetTagValuesForDataSourceRequest.__name__ = "GetTagValuesForDataSourceRequest"
4407
+ datasource_api_GetTagValuesForDataSourceRequest.__qualname__ = "GetTagValuesForDataSourceRequest"
4408
+ datasource_api_GetTagValuesForDataSourceRequest.__module__ = "nominal_api.datasource_api"
4409
+
4410
+
4348
4411
  class datasource_api_IndexChannelPrefixTreeRequest(ConjureBeanType):
4349
4412
 
4350
4413
  @builtins.classmethod
@@ -56461,6 +56524,42 @@ in the same order as requests.
56461
56524
  _decoder = ConjureDecoder()
56462
56525
  return _decoder.decode(_response.json(), datasource_api_BatchGetDataScopeBoundsResponse, self._return_none_for_unknown_union_types)
56463
56526
 
56527
+ def get_tag_values_for_data_source(self, auth_header: str, data_source_rid: str, request: "datasource_api_GetTagValuesForDataSourceRequest") -> Dict[str, List[str]]:
56528
+ """
56529
+ Returns available tag values for a given data source for a set of tag keys. For Nominal data sources, a time
56530
+ range can be provided to filter tag values to those present within the months spanned by the range. If no
56531
+ time range is provided, this defaults to the last month. For external data sources, the range must not be
56532
+ specified, as all tag values are returned.
56533
+ """
56534
+
56535
+ _headers: Dict[str, Any] = {
56536
+ 'Accept': 'application/json',
56537
+ 'Content-Type': 'application/json',
56538
+ 'Authorization': auth_header,
56539
+ }
56540
+
56541
+ _params: Dict[str, Any] = {
56542
+ }
56543
+
56544
+ _path_params: Dict[str, Any] = {
56545
+ 'dataSourceRid': data_source_rid,
56546
+ }
56547
+
56548
+ _json: Any = ConjureEncoder().default(request)
56549
+
56550
+ _path = '/data-source/v1/data-sources/{dataSourceRid}/get-tags'
56551
+ _path = _path.format(**_path_params)
56552
+
56553
+ _response: Response = self._request(
56554
+ 'POST',
56555
+ self._uri + _path,
56556
+ params=_params,
56557
+ headers=_headers,
56558
+ json=_json)
56559
+
56560
+ _decoder = ConjureDecoder()
56561
+ return _decoder.decode(_response.json(), Dict[api_TagName, List[api_TagValue]], self._return_none_for_unknown_union_types)
56562
+
56464
56563
 
56465
56564
  scout_datasource_DataSourceService.__name__ = "DataSourceService"
56466
56565
  scout_datasource_DataSourceService.__qualname__ = "DataSourceService"
@@ -56989,7 +57088,7 @@ class scout_datasource_connection_api_Connection(ConjureBeanType):
56989
57088
  'description': ConjureFieldDefinition('description', OptionalTypeWrapper[str]),
56990
57089
  'connection_details': ConjureFieldDefinition('connectionDetails', scout_datasource_connection_api_ConnectionDetails),
56991
57090
  'required_tag_names': ConjureFieldDefinition('requiredTagNames', List[api_TagName]),
56992
- 'available_tag_values': ConjureFieldDefinition('availableTagValues', Dict[api_TagName, List[api_TagValue]]),
57091
+ 'available_tag_values': ConjureFieldDefinition('availableTagValues', OptionalTypeWrapper[Dict[api_TagName, List[api_TagValue]]]),
56993
57092
  'metadata': ConjureFieldDefinition('metadata', Dict[str, str]),
56994
57093
  'scraping': ConjureFieldDefinition('scraping', OptionalTypeWrapper[scout_datasource_connection_api_ScrapingConfig]),
56995
57094
  'should_scrape': ConjureFieldDefinition('shouldScrape', bool),
@@ -57000,7 +57099,7 @@ class scout_datasource_connection_api_Connection(ConjureBeanType):
57000
57099
 
57001
57100
  __slots__: List[str] = ['_rid', '_display_name', '_description', '_connection_details', '_required_tag_names', '_available_tag_values', '_metadata', '_scraping', '_should_scrape', '_limits', '_connection_status', '_is_archived']
57002
57101
 
57003
- def __init__(self, available_tag_values: Dict[str, List[str]], connection_details: "scout_datasource_connection_api_ConnectionDetails", connection_status: "scout_datasource_connection_api_ConnectionStatus", display_name: str, is_archived: bool, metadata: Dict[str, str], required_tag_names: List[str], rid: str, should_scrape: bool, description: Optional[str] = None, limits: Optional["scout_datasource_connection_api_LimitsConfig"] = None, scraping: Optional["scout_datasource_connection_api_ScrapingConfig"] = None) -> None:
57102
+ def __init__(self, connection_details: "scout_datasource_connection_api_ConnectionDetails", connection_status: "scout_datasource_connection_api_ConnectionStatus", display_name: str, is_archived: bool, metadata: Dict[str, str], required_tag_names: List[str], rid: str, should_scrape: bool, available_tag_values: Optional[Dict[str, List[str]]] = None, description: Optional[str] = None, limits: Optional["scout_datasource_connection_api_LimitsConfig"] = None, scraping: Optional["scout_datasource_connection_api_ScrapingConfig"] = None) -> None:
57004
57103
  self._rid = rid
57005
57104
  self._display_name = display_name
57006
57105
  self._description = description
@@ -57042,7 +57141,10 @@ rather than strictly required.
57042
57141
  return self._required_tag_names
57043
57142
 
57044
57143
  @builtins.property
57045
- def available_tag_values(self) -> Dict[str, List[str]]:
57144
+ def available_tag_values(self) -> Optional[Dict[str, List[str]]]:
57145
+ """
57146
+ Deprecated, use the getAvailableTagsForConnection endpoint instead
57147
+ """
57046
57148
  return self._available_tag_values
57047
57149
 
57048
57150
  @builtins.property
@@ -22,6 +22,7 @@ from .._impl import (
22
22
  api_Property as Property,
23
23
  api_PropertyName as PropertyName,
24
24
  api_PropertyValue as PropertyValue,
25
+ api_Range as Range,
25
26
  api_S3Path as S3Path,
26
27
  api_SerializableError as SerializableError,
27
28
  api_SeriesArchetypeRid as SeriesArchetypeRid,
@@ -17,6 +17,7 @@ from .._impl import (
17
17
  datasource_api_GetAvailableTagsForChannelResponse as GetAvailableTagsForChannelResponse,
18
18
  datasource_api_GetDataScopeBoundsRequest as GetDataScopeBoundsRequest,
19
19
  datasource_api_GetDataScopeBoundsResponse as GetDataScopeBoundsResponse,
20
+ datasource_api_GetTagValuesForDataSourceRequest as GetTagValuesForDataSourceRequest,
20
21
  datasource_api_IndexChannelPrefixTreeRequest as IndexChannelPrefixTreeRequest,
21
22
  datasource_api_SearchChannelsRequest as SearchChannelsRequest,
22
23
  datasource_api_SearchChannelsResponse as SearchChannelsResponse,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nominal-api
3
- Version: 0.623.0
3
+ Version: 0.624.0
4
4
  Requires-Python: >=3.8
5
5
  Requires-Dist: requests
6
6
  Requires-Dist: conjure-python-client<3,>=2.8.0
@@ -1,7 +1,7 @@
1
- nominal_api/__init__.py,sha256=0G-zmhqQ_3xFeqfbtuSRQnzBTz8w4Z9k3tithBihh9M,1995
2
- nominal_api/_impl.py,sha256=4SPkC1z2YVLR5yVTKHgJrp6fCY-ij0n01_RUhH6yv-w,2992953
1
+ nominal_api/__init__.py,sha256=z9TAYSaOADm5ISQy4xx5yD0VbDejQ8spOwhxfaYYrNo,1995
2
+ nominal_api/_impl.py,sha256=hNLXhm7Of7lwzrCBGMMRCwSvSvN05AhbLK9NeTrtmKQ,2996592
3
3
  nominal_api/py.typed,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
4
- nominal_api/api/__init__.py,sha256=f6fvZACzXUPSIN-H855AjAYLwmisy_VrHy4Ie2HXiNE,1270
4
+ nominal_api/api/__init__.py,sha256=1oJPOuAMfV2uClPUW8Ie1nj2Y6j81TDpedcc3yUFTe0,1294
5
5
  nominal_api/api_ids/__init__.py,sha256=CAtt44XgNZEEUDv-BbEbYtuxQ8y1wqSZU-STjBYdZv8,80
6
6
  nominal_api/api_rids/__init__.py,sha256=qerno2fgGWLfokoSdCarKSXg2jDjTJpz45Wv8PnqI6Q,500
7
7
  nominal_api/attachments_api/__init__.py,sha256=eQBE8xVTFDaTItCZv-WJSZqSStpgdai192n23pmVeeQ,634
@@ -10,7 +10,7 @@ nominal_api/authorization/__init__.py,sha256=F6JRzi_O0vr5jgwPbDlQMHLLKpCzyc9u5DY
10
10
  nominal_api/comments_api/__init__.py,sha256=bt24EdmTY513nKMrWMCsfYV0XmX7VKQgOFH4I4tKWy4,860
11
11
  nominal_api/connect_download/__init__.py,sha256=kYpjIjuFHA3uix70bJ5gV9-7BmDcJZAcm_e3MeMVSSQ,83
12
12
  nominal_api/datasource/__init__.py,sha256=C2lvxiWYnZRjaMKL2sY9_bfgZezBpK39A3VtgSASgRI,134
13
- nominal_api/datasource_api/__init__.py,sha256=5TddGrr5x6bZdVun00Zb_BwwcQtP35Yvn1DSxZ6QZmI,2074
13
+ nominal_api/datasource_api/__init__.py,sha256=-0v4FGK22kyCALrJ-LRcwJ-QHDUnFCBqj_LkpEt_rgs,2163
14
14
  nominal_api/datasource_logset/__init__.py,sha256=H3fNxqyYC490MwvdWbt5BwhgWQUev7uieaLz5hUbZDc,94
15
15
  nominal_api/datasource_logset_api/__init__.py,sha256=JyjO1tQmG-HZ7kYMi8lSfeaaYddBZdCMIyqc0IUJfWo,1006
16
16
  nominal_api/datasource_pagination_api/__init__.py,sha256=3GO8TAUavOe6dUEitOhje74aSZHjTKVI5N1MNuct1lI,212
@@ -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.623.0.dist-info/METADATA,sha256=YBLiL8d0hhZd6AX8fcM0Qkt6uZiPEqOgvCV8Yx7mtAs,199
77
- nominal_api-0.623.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
78
- nominal_api-0.623.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
79
- nominal_api-0.623.0.dist-info/RECORD,,
76
+ nominal_api-0.624.0.dist-info/METADATA,sha256=2YmbdPMkf1JoqFQQZn4F6YioJ0WUW17KIX2Rxfa18sA,199
77
+ nominal_api-0.624.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
78
+ nominal_api-0.624.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
79
+ nominal_api-0.624.0.dist-info/RECORD,,