Skip to content

Commit

Permalink
Merge pull request #13 from blues/feat-openapi-update
Browse files Browse the repository at this point in the history
feat: new device API params
  • Loading branch information
paigen11 authored Sep 12, 2024
2 parents 2926b0e + d29c3ce commit a56363a
Show file tree
Hide file tree
Showing 12 changed files with 462 additions and 23 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"packageName": "notehub_py",
"packageUrl": "https://github.com/blues/notehub-py",
"projectName": "notehub-py",
"packageVersion": "1.0.1"
"packageVersion": "1.0.2"
}
103 changes: 101 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,15 @@ paths:
- $ref: "#/components/parameters/projectUIDParam"
- $ref: "#/components/parameters/pageSizeParam"
- $ref: "#/components/parameters/pageNumParam"
- $ref: "#/components/parameters/deviceUIDParamQuery"
- $ref: "#/components/parameters/tagParam"
- $ref: "#/components/parameters/serialNumberParam"
- $ref: "#/components/parameters/fleetUIDQueryParam"
- $ref: "#/components/parameters/notecardFirmwareParam"
- $ref: "#/components/parameters/locationParam"
- $ref: "#/components/parameters/hostFirmwareParam"
- $ref: "#/components/parameters/productUIDQueryParam"
- $ref: "#/components/parameters/skuParam"
responses:
"200":
description: Successful operation
Expand Down Expand Up @@ -799,6 +808,14 @@ paths:
- $ref: "#/components/parameters/fleetUIDParam"
- $ref: "#/components/parameters/pageSizeParam"
- $ref: "#/components/parameters/pageNumParam"
- $ref: "#/components/parameters/deviceUIDParamQuery"
- $ref: "#/components/parameters/tagParam"
- $ref: "#/components/parameters/serialNumberParam"
- $ref: "#/components/parameters/notecardFirmwareParam"
- $ref: "#/components/parameters/locationParam"
- $ref: "#/components/parameters/hostFirmwareParam"
- $ref: "#/components/parameters/productUIDQueryParam"
- $ref: "#/components/parameters/skuParam"
responses:
"200":
description: Successful operation
Expand Down Expand Up @@ -2476,8 +2493,12 @@ components:
name: productUID
in: query
required: false
style: form
explode: true
schema:
type: string
type: array
items:
type: string

productQueryParam:
name: product
Expand All @@ -2490,8 +2511,86 @@ components:
name: monitorUID
in: query
required: false
style: form
explode: true
schema:
type: string
type: array
items:
type: string

tagParam:
name: tag
in: query
description: Tag filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string

serialNumberParam:
name: serialNumber
in: query
description: Serial number filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string

notecardFirmwareParam:
name: notecardFirmware
in: query
description: Firmware version filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string

locationParam:
name: location
in: query
description: Location filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string

hostFirmwareParam:
name: hostFirmware
in: query
description: Host firmware filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string

skuParam:
name: sku
in: query
description: SKU filter
required: false
style: form
explode: true
schema:
type: array
items:
type: string



responses:
ErrorResponse:
Expand Down
4 changes: 2 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The OpenAPI definition for the Notehub.io API.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.1.0
- Package version: 1.0.1
- Package version: 1.0.2
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/)
Expand Down Expand Up @@ -89,7 +89,7 @@ with notehub_py.ApiClient(configuration) as api_client:
project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str |
page_size = 50 # int | (optional) (default to 50)
page_num = 1 # int | (optional) (default to 1)
monitor_uid = 'monitor_uid_example' # str | (optional)
monitor_uid = ['monitor_uid_example'] # List[str] | (optional)

try:
api_response = api_instance.get_alerts(project_uid, page_size=page_size, page_num=page_num, monitor_uid=monitor_uid)
Expand Down
4 changes: 2 additions & 2 deletions src/docs/AlertApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ with notehub_py.ApiClient(configuration) as api_client:
project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str |
page_size = 50 # int | (optional) (default to 50)
page_num = 1 # int | (optional) (default to 1)
monitor_uid = 'monitor_uid_example' # str | (optional)
monitor_uid = ['monitor_uid_example'] # List[str] | (optional)

try:
api_response = api_instance.get_alerts(project_uid, page_size=page_size, page_num=page_num, monitor_uid=monitor_uid)
Expand All @@ -68,7 +68,7 @@ Name | Type | Description | Notes
**project_uid** | **str**| |
**page_size** | **int**| | [optional] [default to 50]
**page_num** | **int**| | [optional] [default to 1]
**monitor_uid** | **str**| | [optional]
**monitor_uid** | [**List[str]**](str.md)| | [optional]

### Return type

Expand Down
42 changes: 38 additions & 4 deletions src/docs/DeviceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_project_devices**
> GetProjectDevices200Response get_project_devices(project_uid, page_size=page_size, page_num=page_num)
> GetProjectDevices200Response get_project_devices(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)


Expand Down Expand Up @@ -1205,9 +1205,18 @@ with notehub_py.ApiClient(configuration) as api_client:
project_uid = 'app:2606f411-dea6-44a0-9743-1130f57d77d8' # str |
page_size = 50 # int | (optional) (default to 50)
page_num = 1 # int | (optional) (default to 1)
device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional)
tag = ['tag_example'] # List[str] | Tag filter (optional)
serial_number = ['serial_number_example'] # List[str] | Serial number filter (optional)
fleet_uid = 'fleet_uid_example' # str | (optional)
notecard_firmware = ['notecard_firmware_example'] # List[str] | Firmware version filter (optional)
location = ['location_example'] # List[str] | Location filter (optional)
host_firmware = ['host_firmware_example'] # List[str] | Host firmware filter (optional)
product_uid = ['product_uid_example'] # List[str] | (optional)
sku = ['sku_example'] # List[str] | SKU filter (optional)

try:
api_response = api_instance.get_project_devices(project_uid, page_size=page_size, page_num=page_num)
api_response = api_instance.get_project_devices(project_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, tag=tag, serial_number=serial_number, fleet_uid=fleet_uid, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)
print("The response of DeviceApi->get_project_devices:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -1224,6 +1233,15 @@ Name | Type | Description | Notes
**project_uid** | **str**| |
**page_size** | **int**| | [optional] [default to 50]
**page_num** | **int**| | [optional] [default to 1]
**device_uid** | [**List[str]**](str.md)| A Device UID. | [optional]
**tag** | [**List[str]**](str.md)| Tag filter | [optional]
**serial_number** | [**List[str]**](str.md)| Serial number filter | [optional]
**fleet_uid** | **str**| | [optional]
**notecard_firmware** | [**List[str]**](str.md)| Firmware version filter | [optional]
**location** | [**List[str]**](str.md)| Location filter | [optional]
**host_firmware** | [**List[str]**](str.md)| Host firmware filter | [optional]
**product_uid** | [**List[str]**](str.md)| | [optional]
**sku** | [**List[str]**](str.md)| SKU filter | [optional]

### Return type

Expand All @@ -1248,7 +1266,7 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_project_fleet_devices**
> GetProjectDevices200Response get_project_fleet_devices(project_uid, fleet_uid, page_size=page_size, page_num=page_num)
> GetProjectDevices200Response get_project_fleet_devices(project_uid, fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, tag=tag, serial_number=serial_number, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)


Expand Down Expand Up @@ -1289,9 +1307,17 @@ with notehub_py.ApiClient(configuration) as api_client:
fleet_uid = 'fleet_uid_example' # str |
page_size = 50 # int | (optional) (default to 50)
page_num = 1 # int | (optional) (default to 1)
device_uid = ['device_uid_example'] # List[str] | A Device UID. (optional)
tag = ['tag_example'] # List[str] | Tag filter (optional)
serial_number = ['serial_number_example'] # List[str] | Serial number filter (optional)
notecard_firmware = ['notecard_firmware_example'] # List[str] | Firmware version filter (optional)
location = ['location_example'] # List[str] | Location filter (optional)
host_firmware = ['host_firmware_example'] # List[str] | Host firmware filter (optional)
product_uid = ['product_uid_example'] # List[str] | (optional)
sku = ['sku_example'] # List[str] | SKU filter (optional)

try:
api_response = api_instance.get_project_fleet_devices(project_uid, fleet_uid, page_size=page_size, page_num=page_num)
api_response = api_instance.get_project_fleet_devices(project_uid, fleet_uid, page_size=page_size, page_num=page_num, device_uid=device_uid, tag=tag, serial_number=serial_number, notecard_firmware=notecard_firmware, location=location, host_firmware=host_firmware, product_uid=product_uid, sku=sku)
print("The response of DeviceApi->get_project_fleet_devices:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -1309,6 +1335,14 @@ Name | Type | Description | Notes
**fleet_uid** | **str**| |
**page_size** | **int**| | [optional] [default to 50]
**page_num** | **int**| | [optional] [default to 1]
**device_uid** | [**List[str]**](str.md)| A Device UID. | [optional]
**tag** | [**List[str]**](str.md)| Tag filter | [optional]
**serial_number** | [**List[str]**](str.md)| Serial number filter | [optional]
**notecard_firmware** | [**List[str]**](str.md)| Firmware version filter | [optional]
**location** | [**List[str]**](str.md)| Location filter | [optional]
**host_firmware** | [**List[str]**](str.md)| Host firmware filter | [optional]
**product_uid** | [**List[str]**](str.md)| | [optional]
**sku** | [**List[str]**](str.md)| SKU filter | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion src/notehub_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "1.0.1"
__version__ = "1.0.2"

# import apis into sdk package
from notehub_py.api.alert_api import AlertApi
Expand Down
15 changes: 8 additions & 7 deletions src/notehub_py/api/alert_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from typing_extensions import Annotated

from pydantic import Field, StrictStr
from typing import Optional
from typing import List, Optional
from typing_extensions import Annotated
from notehub_py.models.get_alerts200_response import GetAlerts200Response

Expand Down Expand Up @@ -46,7 +46,7 @@ def get_alerts(
project_uid: StrictStr,
page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None,
page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
monitor_uid: Optional[StrictStr] = None,
monitor_uid: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -71,7 +71,7 @@ def get_alerts(
:param page_num:
:type page_num: int
:param monitor_uid:
:type monitor_uid: str
:type monitor_uid: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -125,7 +125,7 @@ def get_alerts_with_http_info(
project_uid: StrictStr,
page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None,
page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
monitor_uid: Optional[StrictStr] = None,
monitor_uid: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -150,7 +150,7 @@ def get_alerts_with_http_info(
:param page_num:
:type page_num: int
:param monitor_uid:
:type monitor_uid: str
:type monitor_uid: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -204,7 +204,7 @@ def get_alerts_without_preload_content(
project_uid: StrictStr,
page_size: Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]] = None,
page_num: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
monitor_uid: Optional[StrictStr] = None,
monitor_uid: Optional[List[StrictStr]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -229,7 +229,7 @@ def get_alerts_without_preload_content(
:param page_num:
:type page_num: int
:param monitor_uid:
:type monitor_uid: str
:type monitor_uid: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -288,6 +288,7 @@ def _get_alerts_serialize(
_host = None

_collection_formats: Dict[str, str] = {
'monitorUID': 'multi',
}

_path_params: Dict[str, str] = {}
Expand Down
Loading

0 comments on commit a56363a

Please sign in to comment.