From a4f8ca41cd250b9acace394f25d0a5740c944af5 Mon Sep 17 00:00:00 2001 From: plankthom <1620679+plankthom@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:26:50 +0000 Subject: [PATCH] chore: regenerate alarms sdk :repeat: --- .openapi-generator/VERSION | 2 +- README.md | 17 ++++++++++------- docs/AlarmEntity.md | 2 +- docs/AlarmEventAlarm.md | 2 +- docs/AlarmTimelineInfo.md | 2 +- docs/AlarmUpdate.md | 2 +- docs/AlarmsApi.md | 8 ++++---- docs/CreateAlarm.md | 2 +- pyproject.toml | 1 - requirements.txt | 2 +- .../.openapi-generator/VERSION | 2 +- waylay-sdk-alarms-types/README.md | 17 ++++++++++------- waylay-sdk-alarms-types/pyproject.toml | 7 +++---- .../waylay/services/alarms/models/__init__.py | 2 +- .../services/alarms/models/alarm_update.py | 2 +- .../services/alarms/models/cloud_alarm_event.py | 6 +++--- .../services/alarms/models/create_alarm.py | 2 +- waylay-sdk-alarms/.openapi-generator/VERSION | 2 +- waylay-sdk-alarms/README.md | 17 ++++++++++------- waylay-sdk-alarms/pyproject.toml | 5 ++--- .../waylay/services/alarms/api/alarms_api.py | 4 ++-- .../alarms/api/alarms_batch_operations_api.py | 2 +- .../waylay/services/alarms/service/__init__.py | 2 +- 23 files changed, 58 insertions(+), 52 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4b49d9b..1985849 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.7.0 diff --git a/README.md b/README.md index 800d9a5..02e9086 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,16 @@ It consists of two sub-packages that are both plugins for the waylay-sdk-core pa This package requires Python 3.9+. ## Installation -Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality. -When the service api methods are required, waylay-sdk-alarms is included in: -- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or -- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services. -When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in: -- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or -- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models. + +Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package: +* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services. +* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`. +* `pip install waylay-sdk[types]` will install the types packages for this and all other services. + +Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/): + +- `pip install waylay-sdk-alarms` to only install api support for _alarms_. +- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_. ## Usage diff --git a/docs/AlarmEntity.md b/docs/AlarmEntity.md index bd76c63..cfdfd87 100644 --- a/docs/AlarmEntity.md +++ b/docs/AlarmEntity.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **timestamp** | **datetime** | | **source** | [**IdObject**](IdObject.md) | | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | | -**status** | [**AlarmStatus**](AlarmStatus.md) | | +**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE] **count** | **int** | The number of times this alarm has been sent | **assignee** | **str** | String field to indicate an assignee for the alarm. | [optional] **history** | [**List[AlarmAuditRecord]**](AlarmAuditRecord.md) | | [optional] diff --git a/docs/AlarmEventAlarm.md b/docs/AlarmEventAlarm.md index e798bb8..22bbf31 100644 --- a/docs/AlarmEventAlarm.md +++ b/docs/AlarmEventAlarm.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **timestamp** | **datetime** | | **source** | [**IdObject**](IdObject.md) | | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | | -**status** | [**AlarmStatus**](AlarmStatus.md) | | +**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE] **count** | **int** | | ## Example diff --git a/docs/AlarmTimelineInfo.md b/docs/AlarmTimelineInfo.md index e974bf3..0183005 100644 --- a/docs/AlarmTimelineInfo.md +++ b/docs/AlarmTimelineInfo.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **type** | **str** | Type of the alarm. | **text** | **str** | Description of the alarm. | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | | -**status** | [**AlarmStatus**](AlarmStatus.md) | | +**status** | [**AlarmStatus**](AlarmStatus.md) | | [default to AlarmStatus.ACTIVE] **assignee** | **str** | String field to indicate an assignee for the alarm. | [optional] ## Example diff --git a/docs/AlarmUpdate.md b/docs/AlarmUpdate.md index 1805344..2d5f4df 100644 --- a/docs/AlarmUpdate.md +++ b/docs/AlarmUpdate.md @@ -7,7 +7,7 @@ At least one field must be specified. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **severity** | [**AlarmSeverity**](AlarmSeverity.md) | | [optional] -**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] +**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] [default to AlarmStatus.ACTIVE] **assignee** | **str** | | [optional] ## Example diff --git a/docs/AlarmsApi.md b/docs/AlarmsApi.md index 5e2ae53..9fc97ee 100644 --- a/docs/AlarmsApi.md +++ b/docs/AlarmsApi.md @@ -260,8 +260,8 @@ try: 'lastUpdatedTo': 56 'lastTriggeredFrom': 56 'lastTriggeredTo': 56 - 'sort': 'timestamp' - 'order': 'asc' + 'sort': timestamp + 'order': desc 'page': 1 'size': 50 'additionalQueryParams': {'key': waylay.services.alarms.ListAdditionalQueryParamsParameterValue()} @@ -296,8 +296,8 @@ Name | Type | API binding | Description | Notes **query['lastUpdatedTo']** (dict)
**query.last_updated_to** (Query) | **int** | query parameter `"lastUpdatedTo"` | Filter on alarm lastUpdateTime (equal or below). | [optional] **query['lastTriggeredFrom']** (dict)
**query.last_triggered_from** (Query) | **int** | query parameter `"lastTriggeredFrom"` | Filter on alarm lastTriggeredTime (equal or above). | [optional] **query['lastTriggeredTo']** (dict)
**query.last_triggered_to** (Query) | **int** | query parameter `"lastTriggeredTo"` | Filter on alarm lastTriggeredTime (equal or below). | [optional] -**query['sort']** (dict)
**query.sort** (Query) | [**ListSortParameter**](.md) | query parameter `"sort"` | (Pagination) field used to sort the alarms Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] -**query['order']** (dict)
**query.order** (Query) | [**ListOrderParameter**](.md) | query parameter `"order"` | (Pagination) sort order Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] +**query['sort']** (dict)
**query.sort** (Query) | [**ListSortParameter**](.md) | query parameter `"sort"` | (Pagination) field used to sort the alarms Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] [default timestamp] +**query['order']** (dict)
**query.order** (Query) | [**ListOrderParameter**](.md) | query parameter `"order"` | (Pagination) sort order Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] [default desc] **query['page']** (dict)
**query.page** (Query) | **int** | query parameter `"page"` | (Pagination) page Number Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] [default 1] **query['size']** (dict)
**query.size** (Query) | **int** | query parameter `"size"` | (Pagination) size of a page Ignored in combination with `Accept: application/vnd.waylay.alarms.timeseries+json` | [optional] [default 50] **query['additionalQueryParams']** (dict)
**query.additional_query_params** (Query) | [**Dict[str, ListAdditionalQueryParamsParameterValue]**](ListAdditionalQueryParamsParameterValue.md) | query parameter `"additionalQueryParams"` | To query the alarms based on the value of an additional property of the alarm, you can add the key of the additional property as query parameter with value the value you expect the alarm to have. | [optional] diff --git a/docs/CreateAlarm.md b/docs/CreateAlarm.md index ce3dbd4..2c605fe 100644 --- a/docs/CreateAlarm.md +++ b/docs/CreateAlarm.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **text** | **str** | Description of the alarm. | **severity** | [**AlarmSeverity**](AlarmSeverity.md) | | **source** | [**IdObject**](IdObject.md) | | -**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] +**status** | [**AlarmStatus**](AlarmStatus.md) | | [optional] [default to AlarmStatus.ACTIVE] **timestamp** | [**SO8601TimestampOrMillis**](SO8601TimestampOrMillis.md) | | [optional] **assignee** | **str** | String field to indicate an assignee for the alarm. | [optional] diff --git a/pyproject.toml b/pyproject.toml index efdced7..5b2aa9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,6 @@ include = ["pyproject.toml", "test/**/*.py"] [tool.ruff.lint] -ignore-init-module-imports = true # allow duplicate imports ignore=["F811"] # https://docs.astral.sh/ruff/rules diff --git a/requirements.txt b/requirements.txt index c98d1d4..85733e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pydantic ~= 2.6 typing-extensions ~= 4.9 -waylay-sdk-core ~= 0.2.1 +waylay-sdk-core ~= 0.2.3 diff --git a/waylay-sdk-alarms-types/.openapi-generator/VERSION b/waylay-sdk-alarms-types/.openapi-generator/VERSION index 4b49d9b..1985849 100644 --- a/waylay-sdk-alarms-types/.openapi-generator/VERSION +++ b/waylay-sdk-alarms-types/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.7.0 diff --git a/waylay-sdk-alarms-types/README.md b/waylay-sdk-alarms-types/README.md index 704e288..c448761 100644 --- a/waylay-sdk-alarms-types/README.md +++ b/waylay-sdk-alarms-types/README.md @@ -11,13 +11,16 @@ It is considered an extension of the waylay-sdk-alarms package, and it consists This package requires Python 3.9+. ## Installation -Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality. -When the service api methods are required, waylay-sdk-alarms is included in: -- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or -- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services. -When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in: -- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or -- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models. + +Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package: +* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services. +* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`. +* `pip install waylay-sdk[types]` will install the types packages for this and all other services. + +Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/): + +- `pip install waylay-sdk-alarms` to only install api support for _alarms_. +- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_. ## Usage diff --git a/waylay-sdk-alarms-types/pyproject.toml b/waylay-sdk-alarms-types/pyproject.toml index de6f3e7..ef11dda 100644 --- a/waylay-sdk-alarms-types/pyproject.toml +++ b/waylay-sdk-alarms-types/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "waylay-sdk-alarms-types" -version = "1.11.0.20240430" +version = "1.11.0.20240802" description = "Waylay Alarms Types " authors = [ { name = "Waylay", email = "info@waylay.io"} @@ -12,8 +12,8 @@ authors = [ keywords = ["Waylay Alarms" , "Types"] requires-python = ">= 3.9" dependencies = [ - "waylay-sdk-core ~= 0.2.1", - "waylay-sdk-alarms == 1.11.0.20240430", + "waylay-sdk-core ~= 0.2.3", + "waylay-sdk-alarms == 1.11.0.20240802", "pydantic ~= 2.6", "typing-extensions ~= 4.10", "eval-type-backport ~= 0.1.3; python_version < '3.10'", @@ -54,7 +54,6 @@ namespaces = true include = ["pyproject.toml", "src/**/*.py"] [tool.ruff.lint] -ignore-init-module-imports = true # allow duplicate imports ignore=["F811"] # https://docs.astral.sh/ruff/rules diff --git a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/__init__.py b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/__init__.py index abc5b51..4d8c9d8 100644 --- a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/__init__.py +++ b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/__init__.py @@ -12,7 +12,7 @@ Do not edit the class manually. """ -__version__ = "1.11.0.20240430" +__version__ = "1.11.0.20240802" # import models into model package from .a_batch_alarms_specification import ABatchAlarmsSpecification diff --git a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/alarm_update.py b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/alarm_update.py index 3c4eb02..966c714 100644 --- a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/alarm_update.py +++ b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/alarm_update.py @@ -26,7 +26,7 @@ class AlarmUpdate(WaylayBaseModel): """At least one field must be specified..""" severity: AlarmSeverity | None = None - status: AlarmStatus | None = None + status: AlarmStatus | None = AlarmStatus.ACTIVE assignee: Any | None = None model_config = ConfigDict( diff --git a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/cloud_alarm_event.py b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/cloud_alarm_event.py index 1d1500f..c365ea3 100644 --- a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/cloud_alarm_event.py +++ b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/cloud_alarm_event.py @@ -12,7 +12,7 @@ from __future__ import annotations from datetime import datetime -from typing import Any, Dict +from typing import Any from pydantic import ( ConfigDict, @@ -27,8 +27,8 @@ class CloudAlarmEvent(WaylayBaseModel): """CloudAlarmEvent.""" - id: Dict[str, Any] | None = None - source: Dict[str, Any] | None = None + id: Any | None = None + source: Any | None = None subject: StrictStr type: CloudAlarmEventDataType | None = None data: AlarmEvent | None = None diff --git a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/create_alarm.py b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/create_alarm.py index 7dfdd42..95657a4 100644 --- a/waylay-sdk-alarms-types/src/waylay/services/alarms/models/create_alarm.py +++ b/waylay-sdk-alarms-types/src/waylay/services/alarms/models/create_alarm.py @@ -31,7 +31,7 @@ class CreateAlarm(WaylayBaseModel): text: StrictStr = Field(description="Description of the alarm.") severity: AlarmSeverity source: IdObject - status: AlarmStatus | None = None + status: AlarmStatus | None = AlarmStatus.ACTIVE timestamp: SO8601TimestampOrMillis | None = None assignee: StrictStr | None = Field( default=None, description="String field to indicate an assignee for the alarm." diff --git a/waylay-sdk-alarms/.openapi-generator/VERSION b/waylay-sdk-alarms/.openapi-generator/VERSION index 4b49d9b..1985849 100644 --- a/waylay-sdk-alarms/.openapi-generator/VERSION +++ b/waylay-sdk-alarms/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.7.0 diff --git a/waylay-sdk-alarms/README.md b/waylay-sdk-alarms/README.md index 9839fdb..fbf5531 100644 --- a/waylay-sdk-alarms/README.md +++ b/waylay-sdk-alarms/README.md @@ -12,13 +12,16 @@ Note that the typed model classes for all path params, query params, body params This package requires Python 3.9+. ## Installation -Typically this package is installed when installing the [waylay-sdk-core](https://pypi.org/project/waylay-sdk/) package to enable the service's functionality. -When the service api methods are required, waylay-sdk-alarms is included in: -- ```pip install waylay-sdk-core[alarms]``` to install `waylay-sdk-core` along with only this service, or -- ```pip install waylay-sdk-core[services]``` to install `waylay-sdk-core` along with all services. -When the typed models are required, both waylay-sdk-alarms and waylay-sdk-alarms-types are included in: -- ```pip install waylay-sdk-core[alarms,alarms-types]``` to install `waylay-sdk-core` along with only this service including the typed models, or -- ```pip install waylay-sdk-core[services,services-types]``` to install `waylay-sdk-core` along with all services along with the typed models. + +Normally this package is installed together with support for other services using the [waylay-sdk](https://pypi.org/project/waylay-sdk/) umbrella package: +* `pip install waylay-sdk` will install `waylay-sdk-alarms` together with the SDK api packages for other services. +* `pip install waylay-sdk[types-alarms]` will additionally install the types package `waylay-sdk-alarms-types`. +* `pip install waylay-sdk[types]` will install the types packages for this and all other services. + +Alternatively, you can install support for this _alarms_ service only, installing or extending an existing [waylay-sdk-core](https://pypi.org/project/waylay-sdk-core/): + +- `pip install waylay-sdk-alarms` to only install api support for _alarms_. +- `pip install waylay-sdk-alarms[types]` to additionally install type support for _alarms_. ## Usage diff --git a/waylay-sdk-alarms/pyproject.toml b/waylay-sdk-alarms/pyproject.toml index 34dd468..0223a45 100644 --- a/waylay-sdk-alarms/pyproject.toml +++ b/waylay-sdk-alarms/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "waylay-sdk-alarms" -version = "1.11.0.20240430" +version = "1.11.0.20240802" description = "Waylay Alarms" authors = [ { name = "Waylay", email = "info@waylay.io"} @@ -12,7 +12,7 @@ authors = [ keywords = ["Waylay Alarms"] requires-python = ">= 3.9" dependencies = [ - "waylay-sdk-core ~= 0.2.1", + "waylay-sdk-core ~= 0.2.3", "pydantic ~= 2.6", "typing-extensions ~= 4.10", "eval-type-backport ~= 0.1.3; python_version < '3.10'", @@ -57,7 +57,6 @@ namespaces = true include = ["pyproject.toml", "src/**/*.py"] [tool.ruff.lint] -ignore-init-module-imports = true # allow duplicate imports ignore=["F811"] # https://docs.astral.sh/ruff/rules diff --git a/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_api.py b/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_api.py index b8bf3b8..eaa0c27 100644 --- a/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_api.py +++ b/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_api.py @@ -239,7 +239,7 @@ async def create( ## named body parameters body_args: Dict[str, Any] = {} if json is not None and validate_request: - body_adapter = TypeAdapter( + body_adapter: Any = TypeAdapter( Annotated[CreateAlarm, Field(description="Alarm Operations")] ) json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094 @@ -881,7 +881,7 @@ async def update( ## named body parameters body_args: Dict[str, Any] = {} if json is not None and validate_request: - body_adapter = TypeAdapter(AlarmUpdate) + body_adapter: Any = TypeAdapter(AlarmUpdate) json = body_adapter.validate_python(json) # type: ignore # https://github.com/pydantic/pydantic/discussions/7094 body_args["json"] = json diff --git a/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_batch_operations_api.py b/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_batch_operations_api.py index 4f48781..aaa1b03 100644 --- a/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_batch_operations_api.py +++ b/waylay-sdk-alarms/src/waylay/services/alarms/api/alarms_batch_operations_api.py @@ -385,7 +385,7 @@ async def start( ## named body parameters body_args: Dict[str, Any] = {} if json is not None and validate_request: - body_adapter = TypeAdapter( + body_adapter: Any = TypeAdapter( Annotated[ ABatchAlarmsSpecification, Field(description="Batch Alarm Operation"), diff --git a/waylay-sdk-alarms/src/waylay/services/alarms/service/__init__.py b/waylay-sdk-alarms/src/waylay/services/alarms/service/__init__.py index 98c7d98..41234f8 100644 --- a/waylay-sdk-alarms/src/waylay/services/alarms/service/__init__.py +++ b/waylay-sdk-alarms/src/waylay/services/alarms/service/__init__.py @@ -12,7 +12,7 @@ Do not edit the class manually. """ -__version__ = "1.11.0.20240430" +__version__ = "1.11.0.20240802" from .service import AlarmsService