Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions activitysmith_openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from activitysmith_openapi.models.activity_metric import ActivityMetric
from activitysmith_openapi.models.activity_metric_value import ActivityMetricValue
from activitysmith_openapi.models.alert_payload import AlertPayload
from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError
from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest
from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse
from activitysmith_openapi.models.bad_request_error import BadRequestError
Expand Down Expand Up @@ -76,3 +77,4 @@
from activitysmith_openapi.models.rate_limit_error import RateLimitError
from activitysmith_openapi.models.send_push_notification429_response import SendPushNotification429Response
from activitysmith_openapi.models.stream_content_state import StreamContentState
from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response
9 changes: 6 additions & 3 deletions activitysmith_openapi/api/app_icon_badges_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def update_app_icon_badge_count(
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
'403': "ForbiddenError",
'404': "NoRecipientsError",
'422': "UpdateAppIconBadgeCount422Response",
'502': "AppIconBadgeCountUpdateError",
'429': "RateLimitError",
}
response_data = self.api_client.call_api(
Expand Down Expand Up @@ -165,7 +166,8 @@ def update_app_icon_badge_count_with_http_info(
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
'403': "ForbiddenError",
'404': "NoRecipientsError",
'422': "UpdateAppIconBadgeCount422Response",
'502': "AppIconBadgeCountUpdateError",
'429': "RateLimitError",
}
response_data = self.api_client.call_api(
Expand Down Expand Up @@ -236,7 +238,8 @@ def update_app_icon_badge_count_without_preload_content(
'200': "AppIconBadgeCountUpdateResponse",
'400': "BadRequestError",
'403': "ForbiddenError",
'404': "NoRecipientsError",
'422': "UpdateAppIconBadgeCount422Response",
'502': "AppIconBadgeCountUpdateError",
'429': "RateLimitError",
}
response_data = self.api_client.call_api(
Expand Down
37 changes: 37 additions & 0 deletions activitysmith_openapi/docs/AppIconBadgeCountUpdateError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# AppIconBadgeCountUpdateError


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **str** | |
**code** | **str** | |
**message** | **str** | |
**badge** | **int** | |
**devices_targeted** | **int** | | [optional]
**devices_updated** | **int** | |
**users_updated** | **int** | | [optional]
**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional]
**effective_channel_slugs** | **List[str]** | | [optional]

## Example

```python
from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError

# TODO update the JSON string below
json = "{}"
# create an instance of AppIconBadgeCountUpdateError from a JSON string
app_icon_badge_count_update_error_instance = AppIconBadgeCountUpdateError.from_json(json)
# print the JSON string representation of the object
print(AppIconBadgeCountUpdateError.to_json())

# convert the object into a dict
app_icon_badge_count_update_error_dict = app_icon_badge_count_update_error_instance.to_dict()
# create an instance of AppIconBadgeCountUpdateError from a dict
app_icon_badge_count_update_error_from_dict = AppIconBadgeCountUpdateError.from_dict(app_icon_badge_count_update_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)


6 changes: 4 additions & 2 deletions activitysmith_openapi/docs/AppIconBadgeCountUpdateResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**success** | **bool** | |
**badge** | **int** | |
**devices_notified** | **int** | |
**users_notified** | **int** | |
**devices_updated** | **int** | Number of devices whose App Icon Badge Count was updated. |
**users_updated** | **int** | Number of account users with at least one updated device. |
**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional]
**users_notified** | **int** | Deprecated compatibility alias for users_updated. | [optional]
**effective_channel_slugs** | **List[str]** | |
**timestamp** | **datetime** | |

Expand Down
3 changes: 2 additions & 1 deletion activitysmith_openapi/docs/AppIconBadgesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ Name | Type | Description | Notes
**200** | App Icon Badge Count updated | - |
**400** | Bad request | - |
**403** | Forbidden | - |
**404** | No recipients found for effective channel target | - |
**422** | No matching devices found, or a targeted device needs to reconnect | - |
**502** | App Icon Badge Count could not be updated | - |
**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)
Expand Down
4 changes: 3 additions & 1 deletion activitysmith_openapi/docs/LiveActivityLimitError.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Name | Type | Description | Notes
**error** | **str** | |
**message** | **str** | |
**limit** | **int** | |
**active** | **int** | Current number of active Live Activities. |
**active** | **int** | Highest number of active Live Activities among the targeted devices. |
**blocked_devices** | **int** | Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity. | [optional]
**targeted_devices** | **int** | Total number of targeted devices. Included only when targeted devices have mixed capacity. | [optional]

## Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Name | Type | Description | Notes
**error** | **str** | |
**message** | **str** | |
**limit** | **int** | |
**active** | **int** | Current number of active Live Activities. |
**active** | **int** | Highest number of active Live Activities among the targeted devices. |
**blocked_devices** | **int** | Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity. | [optional]
**targeted_devices** | **int** | Total number of targeted devices. Included only when targeted devices have mixed capacity. | [optional]

## Example

Expand Down
37 changes: 37 additions & 0 deletions activitysmith_openapi/docs/UpdateAppIconBadgeCount422Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# UpdateAppIconBadgeCount422Response


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **str** | |
**message** | **str** | |
**effective_channel_slugs** | **List[str]** | | [optional]
**code** | **str** | |
**badge** | **int** | |
**devices_targeted** | **int** | | [optional]
**devices_updated** | **int** | |
**users_updated** | **int** | | [optional]
**devices_notified** | **int** | Deprecated compatibility alias for devices_updated. | [optional]

## Example

```python
from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response

# TODO update the JSON string below
json = "{}"
# create an instance of UpdateAppIconBadgeCount422Response from a JSON string
update_app_icon_badge_count422_response_instance = UpdateAppIconBadgeCount422Response.from_json(json)
# print the JSON string representation of the object
print(UpdateAppIconBadgeCount422Response.to_json())

# convert the object into a dict
update_app_icon_badge_count422_response_dict = update_app_icon_badge_count422_response_instance.to_dict()
# create an instance of UpdateAppIconBadgeCount422Response from a dict
update_app_icon_badge_count422_response_from_dict = UpdateAppIconBadgeCount422Response.from_dict(update_app_icon_badge_count422_response_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)


2 changes: 2 additions & 0 deletions activitysmith_openapi/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from activitysmith_openapi.models.activity_metric import ActivityMetric
from activitysmith_openapi.models.activity_metric_value import ActivityMetricValue
from activitysmith_openapi.models.alert_payload import AlertPayload
from activitysmith_openapi.models.app_icon_badge_count_update_error import AppIconBadgeCountUpdateError
from activitysmith_openapi.models.app_icon_badge_count_update_request import AppIconBadgeCountUpdateRequest
from activitysmith_openapi.models.app_icon_badge_count_update_response import AppIconBadgeCountUpdateResponse
from activitysmith_openapi.models.bad_request_error import BadRequestError
Expand Down Expand Up @@ -56,3 +57,4 @@
from activitysmith_openapi.models.rate_limit_error import RateLimitError
from activitysmith_openapi.models.send_push_notification429_response import SendPushNotification429Response
from activitysmith_openapi.models.stream_content_state import StreamContentState
from activitysmith_openapi.models.update_app_icon_badge_count422_response import UpdateAppIconBadgeCount422Response
111 changes: 111 additions & 0 deletions activitysmith_openapi/models/app_icon_badge_count_update_error.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# 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, StrictInt, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self

class AppIconBadgeCountUpdateError(BaseModel):
"""
AppIconBadgeCountUpdateError
""" # noqa: E501
error: StrictStr
code: StrictStr
message: StrictStr
badge: Annotated[int, Field(le=2147483647, strict=True, ge=0)]
devices_targeted: Optional[StrictInt] = None
devices_updated: StrictInt
users_updated: Optional[StrictInt] = None
devices_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for devices_updated.")
effective_channel_slugs: Optional[List[StrictStr]] = None
__properties: ClassVar[List[str]] = ["error", "code", "message", "badge", "devices_targeted", "devices_updated", "users_updated", "devices_notified", "effective_channel_slugs"]

@field_validator('code')
def code_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(['badge_device_disconnected', 'badge_update_failed']):
raise ValueError("must be one of enum values ('badge_device_disconnected', 'badge_update_failed')")
return value

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 AppIconBadgeCountUpdateError 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.
"""
excluded_fields: Set[str] = set([
])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AppIconBadgeCountUpdateError 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"),
"code": obj.get("code"),
"message": obj.get("message"),
"badge": obj.get("badge"),
"devices_targeted": obj.get("devices_targeted"),
"devices_updated": obj.get("devices_updated"),
"users_updated": obj.get("users_updated"),
"devices_notified": obj.get("devices_notified"),
"effective_channel_slugs": obj.get("effective_channel_slugs")
})
return _obj


Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -30,11 +30,13 @@ class AppIconBadgeCountUpdateResponse(BaseModel):
""" # noqa: E501
success: StrictBool
badge: Annotated[int, Field(le=2147483647, strict=True, ge=0)]
devices_notified: StrictInt
users_notified: StrictInt
devices_updated: StrictInt = Field(description="Number of devices whose App Icon Badge Count was updated.")
users_updated: StrictInt = Field(description="Number of account users with at least one updated device.")
devices_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for devices_updated.")
users_notified: Optional[StrictInt] = Field(default=None, description="Deprecated compatibility alias for users_updated.")
effective_channel_slugs: List[StrictStr]
timestamp: datetime
__properties: ClassVar[List[str]] = ["success", "badge", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"]
__properties: ClassVar[List[str]] = ["success", "badge", "devices_updated", "users_updated", "devices_notified", "users_notified", "effective_channel_slugs", "timestamp"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -89,6 +91,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate({
"success": obj.get("success"),
"badge": obj.get("badge"),
"devices_updated": obj.get("devices_updated"),
"users_updated": obj.get("users_updated"),
"devices_notified": obj.get("devices_notified"),
"users_notified": obj.get("users_notified"),
"effective_channel_slugs": obj.get("effective_channel_slugs"),
Expand Down
12 changes: 8 additions & 4 deletions activitysmith_openapi/models/live_activity_limit_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import json

from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -29,8 +29,10 @@ class LiveActivityLimitError(BaseModel):
error: StrictStr
message: StrictStr
limit: StrictInt
active: StrictInt = Field(description="Current number of active Live Activities.")
__properties: ClassVar[List[str]] = ["error", "message", "limit", "active"]
active: StrictInt = Field(description="Highest number of active Live Activities among the targeted devices.")
blocked_devices: Optional[StrictInt] = Field(default=None, description="Number of targeted devices that have reached the enforced iOS Live Activity concurrency threshold. Included only when targeted devices have mixed capacity.")
targeted_devices: Optional[StrictInt] = Field(default=None, description="Total number of targeted devices. Included only when targeted devices have mixed capacity.")
__properties: ClassVar[List[str]] = ["error", "message", "limit", "active", "blocked_devices", "targeted_devices"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -86,7 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"error": obj.get("error"),
"message": obj.get("message"),
"limit": obj.get("limit"),
"active": obj.get("active")
"active": obj.get("active"),
"blocked_devices": obj.get("blocked_devices"),
"targeted_devices": obj.get("targeted_devices")
})
return _obj

Expand Down
Loading