From 46868c8d368b4b5ad95dc1a3fb6751221d62695c Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Mon, 16 Feb 2026 09:29:02 +0000 Subject: [PATCH] chore: regenerate SDK --- activitysmith_openapi/__init__.py | 5 + .../api/live_activities_api.py | 21 +++- .../api/push_notifications_api.py | 15 ++- activitysmith_openapi/docs/AlertPayload.md | 30 +++++ activitysmith_openapi/docs/BadRequestError.md | 30 +++++ activitysmith_openapi/docs/ChannelTarget.md | 29 +++++ activitysmith_openapi/docs/ForbiddenError.md | 30 +++++ .../docs/LiveActivitiesApi.md | 7 +- .../docs/LiveActivityStartRequest.md | 2 + .../docs/LiveActivityStartResponse.md | 1 + .../docs/NoRecipientsError.md | 31 ++++++ .../docs/PushNotificationRequest.md | 4 + .../docs/PushNotificationResponse.md | 1 + .../docs/PushNotificationsApi.md | 5 +- activitysmith_openapi/models/__init__.py | 5 + activitysmith_openapi/models/alert_payload.py | 102 +++++++++++++++++ .../models/bad_request_error.py | 102 +++++++++++++++++ .../models/channel_target.py | 101 +++++++++++++++++ .../models/content_state_end.py | 13 +++ .../models/content_state_start.py | 13 +++ .../models/content_state_update.py | 13 +++ .../models/forbidden_error.py | 102 +++++++++++++++++ .../models/live_activity_end_request.py | 13 +++ .../models/live_activity_end_response.py | 13 +++ .../models/live_activity_limit_error.py | 13 +++ .../models/live_activity_start_request.py | 31 +++++- .../models/live_activity_start_response.py | 17 ++- .../models/live_activity_update_request.py | 13 +++ .../models/live_activity_update_response.py | 13 +++ .../models/no_recipients_error.py | 104 ++++++++++++++++++ .../models/push_notification_request.py | 31 +++++- .../models/push_notification_response.py | 19 +++- .../models/rate_limit_error.py | 13 +++ .../test/test_alert_payload.py | 52 +++++++++ .../test/test_bad_request_error.py | 54 +++++++++ .../test/test_channel_target.py | 56 ++++++++++ .../test/test_forbidden_error.py | 54 +++++++++ .../test/test_live_activity_end_request.py | 18 +-- .../test/test_live_activity_start_request.py | 20 +--- .../test/test_live_activity_start_response.py | 3 + .../test/test_live_activity_update_request.py | 16 +-- .../test/test_no_recipients_error.py | 57 ++++++++++ .../test/test_push_notification_request.py | 6 +- .../test/test_push_notification_response.py | 3 + generated/.regen-branch.txt | 2 +- 45 files changed, 1218 insertions(+), 65 deletions(-) create mode 100644 activitysmith_openapi/docs/AlertPayload.md create mode 100644 activitysmith_openapi/docs/BadRequestError.md create mode 100644 activitysmith_openapi/docs/ChannelTarget.md create mode 100644 activitysmith_openapi/docs/ForbiddenError.md create mode 100644 activitysmith_openapi/docs/NoRecipientsError.md create mode 100644 activitysmith_openapi/models/alert_payload.py create mode 100644 activitysmith_openapi/models/bad_request_error.py create mode 100644 activitysmith_openapi/models/channel_target.py create mode 100644 activitysmith_openapi/models/forbidden_error.py create mode 100644 activitysmith_openapi/models/no_recipients_error.py create mode 100644 activitysmith_openapi/test/test_alert_payload.py create mode 100644 activitysmith_openapi/test/test_bad_request_error.py create mode 100644 activitysmith_openapi/test/test_channel_target.py create mode 100644 activitysmith_openapi/test/test_forbidden_error.py create mode 100644 activitysmith_openapi/test/test_no_recipients_error.py diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index 9a26a58..0149a0a 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -32,9 +32,13 @@ from activitysmith_openapi.exceptions import ApiException # import models into sdk package +from activitysmith_openapi.models.alert_payload import AlertPayload +from activitysmith_openapi.models.bad_request_error import BadRequestError +from activitysmith_openapi.models.channel_target import ChannelTarget from activitysmith_openapi.models.content_state_end import ContentStateEnd from activitysmith_openapi.models.content_state_start import ContentStateStart from activitysmith_openapi.models.content_state_update import ContentStateUpdate +from activitysmith_openapi.models.forbidden_error import ForbiddenError from activitysmith_openapi.models.live_activity_end_request import LiveActivityEndRequest from activitysmith_openapi.models.live_activity_end_response import LiveActivityEndResponse from activitysmith_openapi.models.live_activity_limit_error import LiveActivityLimitError @@ -42,6 +46,7 @@ from activitysmith_openapi.models.live_activity_start_response import LiveActivityStartResponse from activitysmith_openapi.models.live_activity_update_request import LiveActivityUpdateRequest from activitysmith_openapi.models.live_activity_update_response import LiveActivityUpdateResponse +from activitysmith_openapi.models.no_recipients_error import NoRecipientsError from activitysmith_openapi.models.push_notification_request import PushNotificationRequest from activitysmith_openapi.models.push_notification_response import PushNotificationResponse from activitysmith_openapi.models.rate_limit_error import RateLimitError diff --git a/activitysmith_openapi/api/live_activities_api.py b/activitysmith_openapi/api/live_activities_api.py index ae547d5..0b3353e 100644 --- a/activitysmith_openapi/api/live_activities_api.py +++ b/activitysmith_openapi/api/live_activities_api.py @@ -96,6 +96,7 @@ def end_live_activity( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityEndResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -164,6 +165,7 @@ def end_live_activity_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityEndResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -232,6 +234,7 @@ def end_live_activity_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityEndResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -335,7 +338,7 @@ def start_live_activity( ) -> LiveActivityStartResponse: """Start a Live Activity - Starts a Live Activity on all registered devices and returns an activity_id. + Starts a Live Activity on devices matched by API key scope and optional target channels. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -371,6 +374,9 @@ def start_live_activity( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityStartResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -403,7 +409,7 @@ def start_live_activity_with_http_info( ) -> ApiResponse[LiveActivityStartResponse]: """Start a Live Activity - Starts a Live Activity on all registered devices and returns an activity_id. + Starts a Live Activity on devices matched by API key scope and optional target channels. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -439,6 +445,9 @@ def start_live_activity_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityStartResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -471,7 +480,7 @@ def start_live_activity_without_preload_content( ) -> RESTResponseType: """Start a Live Activity - Starts a Live Activity on all registered devices and returns an activity_id. + Starts a Live Activity on devices matched by API key scope and optional target channels. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -507,6 +516,9 @@ def start_live_activity_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityStartResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -646,6 +658,7 @@ def update_live_activity( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityUpdateResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -714,6 +727,7 @@ def update_live_activity_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityUpdateResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( @@ -782,6 +796,7 @@ def update_live_activity_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "LiveActivityUpdateResponse", + '403': "ForbiddenError", '429': "RateLimitError", } response_data = self.api_client.call_api( diff --git a/activitysmith_openapi/api/push_notifications_api.py b/activitysmith_openapi/api/push_notifications_api.py index 959fcab..63b021e 100644 --- a/activitysmith_openapi/api/push_notifications_api.py +++ b/activitysmith_openapi/api/push_notifications_api.py @@ -56,7 +56,7 @@ def send_push_notification( ) -> PushNotificationResponse: """Send a push notification - Sends a push notification to every paired device in your account. + Sends a push notification to devices matched by API key scope and optional target channels. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest @@ -92,6 +92,9 @@ def send_push_notification( _response_types_map: Dict[str, Optional[str]] = { '200': "PushNotificationResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "SendPushNotification429Response", } response_data = self.api_client.call_api( @@ -124,7 +127,7 @@ def send_push_notification_with_http_info( ) -> ApiResponse[PushNotificationResponse]: """Send a push notification - Sends a push notification to every paired device in your account. + Sends a push notification to devices matched by API key scope and optional target channels. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest @@ -160,6 +163,9 @@ def send_push_notification_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "PushNotificationResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "SendPushNotification429Response", } response_data = self.api_client.call_api( @@ -192,7 +198,7 @@ def send_push_notification_without_preload_content( ) -> RESTResponseType: """Send a push notification - Sends a push notification to every paired device in your account. + Sends a push notification to devices matched by API key scope and optional target channels. :param push_notification_request: (required) :type push_notification_request: PushNotificationRequest @@ -228,6 +234,9 @@ def send_push_notification_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "PushNotificationResponse", + '400': "BadRequestError", + '403': "ForbiddenError", + '404': "NoRecipientsError", '429': "SendPushNotification429Response", } response_data = self.api_client.call_api( diff --git a/activitysmith_openapi/docs/AlertPayload.md b/activitysmith_openapi/docs/AlertPayload.md new file mode 100644 index 0000000..d9655f9 --- /dev/null +++ b/activitysmith_openapi/docs/AlertPayload.md @@ -0,0 +1,30 @@ +# AlertPayload + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **str** | | [optional] +**body** | **str** | | [optional] + +## Example + +```python +from activitysmith_openapi.models.alert_payload import AlertPayload + +# TODO update the JSON string below +json = "{}" +# create an instance of AlertPayload from a JSON string +alert_payload_instance = AlertPayload.from_json(json) +# print the JSON string representation of the object +print(AlertPayload.to_json()) + +# convert the object into a dict +alert_payload_dict = alert_payload_instance.to_dict() +# create an instance of AlertPayload from a dict +alert_payload_from_dict = AlertPayload.from_dict(alert_payload_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/BadRequestError.md b/activitysmith_openapi/docs/BadRequestError.md new file mode 100644 index 0000000..2173716 --- /dev/null +++ b/activitysmith_openapi/docs/BadRequestError.md @@ -0,0 +1,30 @@ +# BadRequestError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**message** | **str** | | + +## Example + +```python +from activitysmith_openapi.models.bad_request_error import BadRequestError + +# TODO update the JSON string below +json = "{}" +# create an instance of BadRequestError from a JSON string +bad_request_error_instance = BadRequestError.from_json(json) +# print the JSON string representation of the object +print(BadRequestError.to_json()) + +# convert the object into a dict +bad_request_error_dict = bad_request_error_instance.to_dict() +# create an instance of BadRequestError from a dict +bad_request_error_from_dict = BadRequestError.from_dict(bad_request_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/ChannelTarget.md b/activitysmith_openapi/docs/ChannelTarget.md new file mode 100644 index 0000000..361d79d --- /dev/null +++ b/activitysmith_openapi/docs/ChannelTarget.md @@ -0,0 +1,29 @@ +# ChannelTarget + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**channels** | **List[str]** | Channel slugs. When omitted, API key scope determines recipients. | + +## Example + +```python +from activitysmith_openapi.models.channel_target import ChannelTarget + +# TODO update the JSON string below +json = "{}" +# create an instance of ChannelTarget from a JSON string +channel_target_instance = ChannelTarget.from_json(json) +# print the JSON string representation of the object +print(ChannelTarget.to_json()) + +# convert the object into a dict +channel_target_dict = channel_target_instance.to_dict() +# create an instance of ChannelTarget from a dict +channel_target_from_dict = ChannelTarget.from_dict(channel_target_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/ForbiddenError.md b/activitysmith_openapi/docs/ForbiddenError.md new file mode 100644 index 0000000..c0867b5 --- /dev/null +++ b/activitysmith_openapi/docs/ForbiddenError.md @@ -0,0 +1,30 @@ +# ForbiddenError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**message** | **str** | | + +## Example + +```python +from activitysmith_openapi.models.forbidden_error import ForbiddenError + +# TODO update the JSON string below +json = "{}" +# create an instance of ForbiddenError from a JSON string +forbidden_error_instance = ForbiddenError.from_json(json) +# print the JSON string representation of the object +print(ForbiddenError.to_json()) + +# convert the object into a dict +forbidden_error_dict = forbidden_error_instance.to_dict() +# create an instance of ForbiddenError from a dict +forbidden_error_from_dict = ForbiddenError.from_dict(forbidden_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/LiveActivitiesApi.md b/activitysmith_openapi/docs/LiveActivitiesApi.md index 885d37d..9b7880c 100644 --- a/activitysmith_openapi/docs/LiveActivitiesApi.md +++ b/activitysmith_openapi/docs/LiveActivitiesApi.md @@ -85,6 +85,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Live Activity ended | - | +**403** | Forbidden (activity not owned by this API key account) | - | **429** | Rate limit exceeded | - | [[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) @@ -94,7 +95,7 @@ Name | Type | Description | Notes Start a Live Activity -Starts a Live Activity on all registered devices and returns an activity_id. +Starts a Live Activity on devices matched by API key scope and optional target channels. ### Example @@ -165,6 +166,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Live Activity started | - | +**400** | Bad request (invalid payload or channel targeting input) | - | +**403** | Forbidden (API key scope or channel assignment violation) | - | +**404** | No recipients found for effective channel target | - | **429** | Rate limit exceeded | - | [[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) @@ -245,6 +249,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Live Activity updated (or queued) | - | +**403** | Forbidden (activity not owned by this API key account) | - | **429** | Rate limit exceeded | - | [[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) diff --git a/activitysmith_openapi/docs/LiveActivityStartRequest.md b/activitysmith_openapi/docs/LiveActivityStartRequest.md index d9d2c9f..9efb065 100644 --- a/activitysmith_openapi/docs/LiveActivityStartRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStartRequest.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**ContentStateStart**](ContentStateStart.md) | | +**alert** | [**AlertPayload**](AlertPayload.md) | | [optional] +**target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartResponse.md b/activitysmith_openapi/docs/LiveActivityStartResponse.md index 4adcd16..5f3777b 100644 --- a/activitysmith_openapi/docs/LiveActivityStartResponse.md +++ b/activitysmith_openapi/docs/LiveActivityStartResponse.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **devices_notified** | **int** | | [optional] **users_notified** | **int** | | [optional] **activity_id** | **str** | | +**effective_channel_slugs** | **List[str]** | | [optional] **timestamp** | **datetime** | | ## Example diff --git a/activitysmith_openapi/docs/NoRecipientsError.md b/activitysmith_openapi/docs/NoRecipientsError.md new file mode 100644 index 0000000..6de3dab --- /dev/null +++ b/activitysmith_openapi/docs/NoRecipientsError.md @@ -0,0 +1,31 @@ +# NoRecipientsError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **str** | | +**message** | **str** | | +**effective_channel_slugs** | **List[str]** | | [optional] + +## Example + +```python +from activitysmith_openapi.models.no_recipients_error import NoRecipientsError + +# TODO update the JSON string below +json = "{}" +# create an instance of NoRecipientsError from a JSON string +no_recipients_error_instance = NoRecipientsError.from_json(json) +# print the JSON string representation of the object +print(NoRecipientsError.to_json()) + +# convert the object into a dict +no_recipients_error_dict = no_recipients_error_instance.to_dict() +# create an instance of NoRecipientsError from a dict +no_recipients_error_from_dict = NoRecipientsError.from_dict(no_recipients_error_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/activitysmith_openapi/docs/PushNotificationRequest.md b/activitysmith_openapi/docs/PushNotificationRequest.md index 5a101fa..0774173 100644 --- a/activitysmith_openapi/docs/PushNotificationRequest.md +++ b/activitysmith_openapi/docs/PushNotificationRequest.md @@ -8,6 +8,10 @@ Name | Type | Description | Notes **title** | **str** | | **message** | **str** | | [optional] **subtitle** | **str** | | [optional] +**payload** | **Dict[str, object]** | | [optional] +**badge** | **int** | | [optional] +**sound** | **str** | | [optional] +**target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] ## Example diff --git a/activitysmith_openapi/docs/PushNotificationResponse.md b/activitysmith_openapi/docs/PushNotificationResponse.md index a43196d..5d88808 100644 --- a/activitysmith_openapi/docs/PushNotificationResponse.md +++ b/activitysmith_openapi/docs/PushNotificationResponse.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **success** | **bool** | | **devices_notified** | **int** | | [optional] **users_notified** | **int** | | [optional] +**effective_channel_slugs** | **List[str]** | | [optional] **timestamp** | **datetime** | | ## Example diff --git a/activitysmith_openapi/docs/PushNotificationsApi.md b/activitysmith_openapi/docs/PushNotificationsApi.md index ed9fb65..ce8a04a 100644 --- a/activitysmith_openapi/docs/PushNotificationsApi.md +++ b/activitysmith_openapi/docs/PushNotificationsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description Send a push notification -Sends a push notification to every paired device in your account. +Sends a push notification to devices matched by API key scope and optional target channels. ### Example @@ -83,6 +83,9 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Push notification sent | - | +**400** | Bad request (invalid payload or channel targeting input) | - | +**403** | Forbidden (API key scope or channel assignment violation) | - | +**404** | No recipients found for effective channel target | - | **429** | Rate limit exceeded | - | [[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) diff --git a/activitysmith_openapi/models/__init__.py b/activitysmith_openapi/models/__init__.py index d2659a2..f63f482 100644 --- a/activitysmith_openapi/models/__init__.py +++ b/activitysmith_openapi/models/__init__.py @@ -14,9 +14,13 @@ # import models into model package +from activitysmith_openapi.models.alert_payload import AlertPayload +from activitysmith_openapi.models.bad_request_error import BadRequestError +from activitysmith_openapi.models.channel_target import ChannelTarget from activitysmith_openapi.models.content_state_end import ContentStateEnd from activitysmith_openapi.models.content_state_start import ContentStateStart from activitysmith_openapi.models.content_state_update import ContentStateUpdate +from activitysmith_openapi.models.forbidden_error import ForbiddenError from activitysmith_openapi.models.live_activity_end_request import LiveActivityEndRequest from activitysmith_openapi.models.live_activity_end_response import LiveActivityEndResponse from activitysmith_openapi.models.live_activity_limit_error import LiveActivityLimitError @@ -24,6 +28,7 @@ from activitysmith_openapi.models.live_activity_start_response import LiveActivityStartResponse from activitysmith_openapi.models.live_activity_update_request import LiveActivityUpdateRequest from activitysmith_openapi.models.live_activity_update_response import LiveActivityUpdateResponse +from activitysmith_openapi.models.no_recipients_error import NoRecipientsError from activitysmith_openapi.models.push_notification_request import PushNotificationRequest from activitysmith_openapi.models.push_notification_response import PushNotificationResponse from activitysmith_openapi.models.rate_limit_error import RateLimitError diff --git a/activitysmith_openapi/models/alert_payload.py b/activitysmith_openapi/models/alert_payload.py new file mode 100644 index 0000000..44501ff --- /dev/null +++ b/activitysmith_openapi/models/alert_payload.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AlertPayload(BaseModel): + """ + AlertPayload + """ # noqa: E501 + title: Optional[StrictStr] = None + body: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "body"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlertPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlertPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "title": obj.get("title"), + "body": obj.get("body") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/activitysmith_openapi/models/bad_request_error.py b/activitysmith_openapi/models/bad_request_error.py new file mode 100644 index 0000000..e6e1113 --- /dev/null +++ b/activitysmith_openapi/models/bad_request_error.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class BadRequestError(BaseModel): + """ + BadRequestError + """ # noqa: E501 + error: StrictStr + message: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BadRequestError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BadRequestError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/activitysmith_openapi/models/channel_target.py b/activitysmith_openapi/models/channel_target.py new file mode 100644 index 0000000..5dc9e74 --- /dev/null +++ b/activitysmith_openapi/models/channel_target.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChannelTarget(BaseModel): + """ + ChannelTarget + """ # noqa: E501 + channels: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Channel slugs. When omitted, API key scope determines recipients.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["channels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChannelTarget from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChannelTarget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "channels": obj.get("channels") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/activitysmith_openapi/models/content_state_end.py b/activitysmith_openapi/models/content_state_end.py index b20b643..0741945 100644 --- a/activitysmith_openapi/models/content_state_end.py +++ b/activitysmith_openapi/models/content_state_end.py @@ -34,6 +34,7 @@ class ContentStateEnd(BaseModel): color: Optional[StrictStr] = Field(default='blue', description="Optional. Accent color for the Live Activity. Defaults to blue.") step_color: Optional[StrictStr] = Field(default=None, description="Optional. Overrides color for the current step.") auto_dismiss_minutes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=3, description="Optional. Minutes before the ended Live Activity is dismissed. Default 3. Set 0 for immediate dismissal. iOS will dismiss ended Live Activities after ~4 hours max.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "color", "step_color", "auto_dismiss_minutes"] @field_validator('color') @@ -86,8 +87,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -95,6 +98,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -115,6 +123,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "step_color": obj.get("step_color"), "auto_dismiss_minutes": obj.get("auto_dismiss_minutes") if obj.get("auto_dismiss_minutes") is not None else 3 }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/content_state_start.py b/activitysmith_openapi/models/content_state_start.py index c129325..f040933 100644 --- a/activitysmith_openapi/models/content_state_start.py +++ b/activitysmith_openapi/models/content_state_start.py @@ -34,6 +34,7 @@ class ContentStateStart(BaseModel): type: StrictStr color: Optional[StrictStr] = Field(default='blue', description="Optional. Accent color for the Live Activity. Defaults to blue.") step_color: Optional[StrictStr] = Field(default=None, description="Optional. Overrides color for the current step.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "type", "color", "step_color"] @field_validator('type') @@ -93,8 +94,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -102,6 +105,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -122,6 +130,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "color": obj.get("color") if obj.get("color") is not None else 'blue', "step_color": obj.get("step_color") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/content_state_update.py b/activitysmith_openapi/models/content_state_update.py index 08d425b..414888e 100644 --- a/activitysmith_openapi/models/content_state_update.py +++ b/activitysmith_openapi/models/content_state_update.py @@ -33,6 +33,7 @@ class ContentStateUpdate(BaseModel): current_step: Annotated[int, Field(strict=True, ge=1)] color: Optional[StrictStr] = Field(default='blue', description="Optional. Accent color for the Live Activity. Defaults to blue.") step_color: Optional[StrictStr] = Field(default=None, description="Optional. Overrides color for the current step.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "color", "step_color"] @field_validator('color') @@ -85,8 +86,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -94,6 +97,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -113,6 +121,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "color": obj.get("color") if obj.get("color") is not None else 'blue', "step_color": obj.get("step_color") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/forbidden_error.py b/activitysmith_openapi/models/forbidden_error.py new file mode 100644 index 0000000..b965152 --- /dev/null +++ b/activitysmith_openapi/models/forbidden_error.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ForbiddenError(BaseModel): + """ + ForbiddenError + """ # noqa: E501 + error: StrictStr + message: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "message"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ForbiddenError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ForbiddenError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/activitysmith_openapi/models/live_activity_end_request.py b/activitysmith_openapi/models/live_activity_end_request.py index a96fac6..8c638ef 100644 --- a/activitysmith_openapi/models/live_activity_end_request.py +++ b/activitysmith_openapi/models/live_activity_end_request.py @@ -29,6 +29,7 @@ class LiveActivityEndRequest(BaseModel): """ # noqa: E501 activity_id: StrictStr content_state: ContentStateEnd + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["activity_id", "content_state"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of content_state if self.content_state: _dict['content_state'] = self.content_state.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -88,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "activity_id": obj.get("activity_id"), "content_state": ContentStateEnd.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_end_response.py b/activitysmith_openapi/models/live_activity_end_response.py index b7224cc..ca408c8 100644 --- a/activitysmith_openapi/models/live_activity_end_response.py +++ b/activitysmith_openapi/models/live_activity_end_response.py @@ -32,6 +32,7 @@ class LiveActivityEndResponse(BaseModel): devices_queued: Optional[StrictInt] = None devices_notified: Optional[StrictInt] = None timestamp: datetime + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["success", "activity_id", "devices_queued", "devices_notified", "timestamp"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "devices_notified": obj.get("devices_notified"), "timestamp": obj.get("timestamp") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_limit_error.py b/activitysmith_openapi/models/live_activity_limit_error.py index f33b7e4..9b5abba 100644 --- a/activitysmith_openapi/models/live_activity_limit_error.py +++ b/activitysmith_openapi/models/live_activity_limit_error.py @@ -30,6 +30,7 @@ class LiveActivityLimitError(BaseModel): message: StrictStr limit: StrictInt active: StrictInt = Field(description="Current number of active Live Activities.") + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error", "message", "limit", "active"] model_config = ConfigDict( @@ -62,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -71,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -88,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "limit": obj.get("limit"), "active": obj.get("active") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_start_request.py b/activitysmith_openapi/models/live_activity_start_request.py index 56367a2..dbd9ebc 100644 --- a/activitysmith_openapi/models/live_activity_start_request.py +++ b/activitysmith_openapi/models/live_activity_start_request.py @@ -18,7 +18,9 @@ import json from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from activitysmith_openapi.models.alert_payload import AlertPayload +from activitysmith_openapi.models.channel_target import ChannelTarget from activitysmith_openapi.models.content_state_start import ContentStateStart from typing import Optional, Set from typing_extensions import Self @@ -28,7 +30,10 @@ class LiveActivityStartRequest(BaseModel): LiveActivityStartRequest """ # noqa: E501 content_state: ContentStateStart - __properties: ClassVar[List[str]] = ["content_state"] + alert: Optional[AlertPayload] = None + target: Optional[ChannelTarget] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["content_state", "alert", "target"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +79,17 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of content_state if self.content_state: _dict['content_state'] = self.content_state.to_dict() + # override the default output from pydantic by calling `to_dict()` of alert + if self.alert: + _dict['alert'] = self.alert.to_dict() + # override the default output from pydantic by calling `to_dict()` of target + if self.target: + _dict['target'] = self.target.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -84,8 +102,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content_state": ContentStateStart.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None + "content_state": ContentStateStart.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None, + "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_start_response.py b/activitysmith_openapi/models/live_activity_start_response.py index 51dc4ab..e75f024 100644 --- a/activitysmith_openapi/models/live_activity_start_response.py +++ b/activitysmith_openapi/models/live_activity_start_response.py @@ -31,8 +31,10 @@ class LiveActivityStartResponse(BaseModel): devices_notified: Optional[StrictInt] = None users_notified: Optional[StrictInt] = None activity_id: StrictStr + effective_channel_slugs: Optional[List[StrictStr]] = None timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "activity_id", "timestamp"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "activity_id", "effective_channel_slugs", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -89,8 +98,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "devices_notified": obj.get("devices_notified"), "users_notified": obj.get("users_notified"), "activity_id": obj.get("activity_id"), + "effective_channel_slugs": obj.get("effective_channel_slugs"), "timestamp": obj.get("timestamp") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_update_request.py b/activitysmith_openapi/models/live_activity_update_request.py index c816538..fe4c962 100644 --- a/activitysmith_openapi/models/live_activity_update_request.py +++ b/activitysmith_openapi/models/live_activity_update_request.py @@ -29,6 +29,7 @@ class LiveActivityUpdateRequest(BaseModel): """ # noqa: E501 activity_id: StrictStr content_state: ContentStateUpdate + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["activity_id", "content_state"] model_config = ConfigDict( @@ -61,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of content_state if self.content_state: _dict['content_state'] = self.content_state.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -88,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "activity_id": obj.get("activity_id"), "content_state": ContentStateUpdate.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/live_activity_update_response.py b/activitysmith_openapi/models/live_activity_update_response.py index 4ffa9c9..e1c71c0 100644 --- a/activitysmith_openapi/models/live_activity_update_response.py +++ b/activitysmith_openapi/models/live_activity_update_response.py @@ -32,6 +32,7 @@ class LiveActivityUpdateResponse(BaseModel): devices_queued: Optional[StrictInt] = None devices_notified: Optional[StrictInt] = None timestamp: datetime + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["success", "activity_id", "devices_queued", "devices_notified", "timestamp"] model_config = ConfigDict( @@ -64,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -73,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -91,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "devices_notified": obj.get("devices_notified"), "timestamp": obj.get("timestamp") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/no_recipients_error.py b/activitysmith_openapi/models/no_recipients_error.py new file mode 100644 index 0000000..3fae1f9 --- /dev/null +++ b/activitysmith_openapi/models/no_recipients_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NoRecipientsError(BaseModel): + """ + NoRecipientsError + """ # noqa: E501 + error: StrictStr + message: StrictStr + effective_channel_slugs: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "message", "effective_channel_slugs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NoRecipientsError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NoRecipientsError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "message": obj.get("message"), + "effective_channel_slugs": obj.get("effective_channel_slugs") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/activitysmith_openapi/models/push_notification_request.py b/activitysmith_openapi/models/push_notification_request.py index 464677a..d0eb4de 100644 --- a/activitysmith_openapi/models/push_notification_request.py +++ b/activitysmith_openapi/models/push_notification_request.py @@ -17,8 +17,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from activitysmith_openapi.models.channel_target import ChannelTarget from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,12 @@ class PushNotificationRequest(BaseModel): title: StrictStr message: Optional[StrictStr] = None subtitle: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["title", "message", "subtitle"] + payload: Optional[Dict[str, Any]] = None + badge: Optional[StrictInt] = None + sound: Optional[StrictStr] = None + target: Optional[ChannelTarget] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["title", "message", "subtitle", "payload", "badge", "sound", "target"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -70,6 +78,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of target + if self.target: + _dict['target'] = self.target.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -84,8 +100,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "title": obj.get("title"), "message": obj.get("message"), - "subtitle": obj.get("subtitle") + "subtitle": obj.get("subtitle"), + "payload": obj.get("payload"), + "badge": obj.get("badge"), + "sound": obj.get("sound"), + "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/push_notification_response.py b/activitysmith_openapi/models/push_notification_response.py index 73e297d..9445802 100644 --- a/activitysmith_openapi/models/push_notification_response.py +++ b/activitysmith_openapi/models/push_notification_response.py @@ -18,7 +18,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,8 +30,10 @@ class PushNotificationResponse(BaseModel): success: StrictBool devices_notified: Optional[StrictInt] = None users_notified: Optional[StrictInt] = None + effective_channel_slugs: Optional[List[StrictStr]] = None timestamp: datetime - __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "timestamp"] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["success", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -87,8 +96,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "success": obj.get("success"), "devices_notified": obj.get("devices_notified"), "users_notified": obj.get("users_notified"), + "effective_channel_slugs": obj.get("effective_channel_slugs"), "timestamp": obj.get("timestamp") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/models/rate_limit_error.py b/activitysmith_openapi/models/rate_limit_error.py index 5881109..f559e59 100644 --- a/activitysmith_openapi/models/rate_limit_error.py +++ b/activitysmith_openapi/models/rate_limit_error.py @@ -28,6 +28,7 @@ class RateLimitError(BaseModel): """ # noqa: E501 error: StrictStr message: StrictStr + additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error", "message"] model_config = ConfigDict( @@ -60,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ + "additional_properties", ]) _dict = self.model_dump( @@ -69,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + return _dict @classmethod @@ -84,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "error": obj.get("error"), "message": obj.get("message") }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + return _obj diff --git a/activitysmith_openapi/test/test_alert_payload.py b/activitysmith_openapi/test/test_alert_payload.py new file mode 100644 index 0000000..6bef354 --- /dev/null +++ b/activitysmith_openapi/test/test_alert_payload.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.alert_payload import AlertPayload + +class TestAlertPayload(unittest.TestCase): + """AlertPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AlertPayload: + """Test AlertPayload + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AlertPayload` + """ + model = AlertPayload() + if include_optional: + return AlertPayload( + title = '', + body = '' + ) + else: + return AlertPayload( + ) + """ + + def testAlertPayload(self): + """Test AlertPayload""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_bad_request_error.py b/activitysmith_openapi/test/test_bad_request_error.py new file mode 100644 index 0000000..d69b41b --- /dev/null +++ b/activitysmith_openapi/test/test_bad_request_error.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.bad_request_error import BadRequestError + +class TestBadRequestError(unittest.TestCase): + """BadRequestError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BadRequestError: + """Test BadRequestError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BadRequestError` + """ + model = BadRequestError() + if include_optional: + return BadRequestError( + error = '', + message = '' + ) + else: + return BadRequestError( + error = '', + message = '', + ) + """ + + def testBadRequestError(self): + """Test BadRequestError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_channel_target.py b/activitysmith_openapi/test/test_channel_target.py new file mode 100644 index 0000000..7463603 --- /dev/null +++ b/activitysmith_openapi/test/test_channel_target.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.channel_target import ChannelTarget + +class TestChannelTarget(unittest.TestCase): + """ChannelTarget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChannelTarget: + """Test ChannelTarget + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChannelTarget` + """ + model = ChannelTarget() + if include_optional: + return ChannelTarget( + channels = [ + '' + ] + ) + else: + return ChannelTarget( + channels = [ + '' + ], + ) + """ + + def testChannelTarget(self): + """Test ChannelTarget""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_forbidden_error.py b/activitysmith_openapi/test/test_forbidden_error.py new file mode 100644 index 0000000..f2bf7f7 --- /dev/null +++ b/activitysmith_openapi/test/test_forbidden_error.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.forbidden_error import ForbiddenError + +class TestForbiddenError(unittest.TestCase): + """ForbiddenError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ForbiddenError: + """Test ForbiddenError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ForbiddenError` + """ + model = ForbiddenError() + if include_optional: + return ForbiddenError( + error = '', + message = '' + ) + else: + return ForbiddenError( + error = '', + message = '', + ) + """ + + def testForbiddenError(self): + """Test ForbiddenError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_live_activity_end_request.py b/activitysmith_openapi/test/test_live_activity_end_request.py index 3522eb4..36d2c55 100644 --- a/activitysmith_openapi/test/test_live_activity_end_request.py +++ b/activitysmith_openapi/test/test_live_activity_end_request.py @@ -36,26 +36,12 @@ def make_instance(self, include_optional) -> LiveActivityEndRequest: if include_optional: return LiveActivityEndRequest( activity_id = '', - content_state = activitysmith_openapi.models.content_state_end.ContentStateEnd( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - color = 'blue', - step_color = 'lime', - auto_dismiss_minutes = 0, ) + content_state = { } ) else: return LiveActivityEndRequest( activity_id = '', - content_state = activitysmith_openapi.models.content_state_end.ContentStateEnd( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - color = 'blue', - step_color = 'lime', - auto_dismiss_minutes = 0, ), + content_state = { }, ) """ diff --git a/activitysmith_openapi/test/test_live_activity_start_request.py b/activitysmith_openapi/test/test_live_activity_start_request.py index 3d30c25..cd38317 100644 --- a/activitysmith_openapi/test/test_live_activity_start_request.py +++ b/activitysmith_openapi/test/test_live_activity_start_request.py @@ -35,25 +35,13 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: model = LiveActivityStartRequest() if include_optional: return LiveActivityStartRequest( - content_state = activitysmith_openapi.models.content_state_start.ContentStateStart( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - type = 'segmented_progress', - color = 'blue', - step_color = 'lime', ) + content_state = { }, + alert = { }, + target = { } ) else: return LiveActivityStartRequest( - content_state = activitysmith_openapi.models.content_state_start.ContentStateStart( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - type = 'segmented_progress', - color = 'blue', - step_color = 'lime', ), + content_state = { }, ) """ diff --git a/activitysmith_openapi/test/test_live_activity_start_response.py b/activitysmith_openapi/test/test_live_activity_start_response.py index f5db9b6..79922ad 100644 --- a/activitysmith_openapi/test/test_live_activity_start_response.py +++ b/activitysmith_openapi/test/test_live_activity_start_response.py @@ -39,6 +39,9 @@ def make_instance(self, include_optional) -> LiveActivityStartResponse: devices_notified = 56, users_notified = 56, activity_id = '', + effective_channel_slugs = [ + '' + ], timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/activitysmith_openapi/test/test_live_activity_update_request.py b/activitysmith_openapi/test/test_live_activity_update_request.py index 6896096..0832114 100644 --- a/activitysmith_openapi/test/test_live_activity_update_request.py +++ b/activitysmith_openapi/test/test_live_activity_update_request.py @@ -36,24 +36,12 @@ def make_instance(self, include_optional) -> LiveActivityUpdateRequest: if include_optional: return LiveActivityUpdateRequest( activity_id = '', - content_state = activitysmith_openapi.models.content_state_update.ContentStateUpdate( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - color = 'blue', - step_color = 'lime', ) + content_state = { } ) else: return LiveActivityUpdateRequest( activity_id = '', - content_state = activitysmith_openapi.models.content_state_update.ContentStateUpdate( - title = '', - subtitle = '', - number_of_steps = 1, - current_step = 1, - color = 'blue', - step_color = 'lime', ), + content_state = { }, ) """ diff --git a/activitysmith_openapi/test/test_no_recipients_error.py b/activitysmith_openapi/test/test_no_recipients_error.py new file mode 100644 index 0000000..6b3ae70 --- /dev/null +++ b/activitysmith_openapi/test/test_no_recipients_error.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + ActivitySmith API + + Send push notifications and Live Activities to your own devices via a single API key. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from activitysmith_openapi.models.no_recipients_error import NoRecipientsError + +class TestNoRecipientsError(unittest.TestCase): + """NoRecipientsError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> NoRecipientsError: + """Test NoRecipientsError + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `NoRecipientsError` + """ + model = NoRecipientsError() + if include_optional: + return NoRecipientsError( + error = '', + message = '', + effective_channel_slugs = [ + '' + ] + ) + else: + return NoRecipientsError( + error = '', + message = '', + ) + """ + + def testNoRecipientsError(self): + """Test NoRecipientsError""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/activitysmith_openapi/test/test_push_notification_request.py b/activitysmith_openapi/test/test_push_notification_request.py index f583937..bd721e6 100644 --- a/activitysmith_openapi/test/test_push_notification_request.py +++ b/activitysmith_openapi/test/test_push_notification_request.py @@ -37,7 +37,11 @@ def make_instance(self, include_optional) -> PushNotificationRequest: return PushNotificationRequest( title = '', message = '', - subtitle = '' + subtitle = '', + payload = { }, + badge = 56, + sound = '', + target = { } ) else: return PushNotificationRequest( diff --git a/activitysmith_openapi/test/test_push_notification_response.py b/activitysmith_openapi/test/test_push_notification_response.py index 042ea3e..04d996d 100644 --- a/activitysmith_openapi/test/test_push_notification_response.py +++ b/activitysmith_openapi/test/test_push_notification_response.py @@ -38,6 +38,9 @@ def make_instance(self, include_optional) -> PushNotificationResponse: success = True, devices_notified = 56, users_notified = 56, + effective_channel_slugs = [ + '' + ], timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') ) else: diff --git a/generated/.regen-branch.txt b/generated/.regen-branch.txt index 84c8ed9..5dbdbb2 100644 --- a/generated/.regen-branch.txt +++ b/generated/.regen-branch.txt @@ -1 +1 @@ -regen/openapi-main +regen/openapi-e3d906fdaa37dd3d08772a17115a21f9c25e0ace