diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index 50a13bc..e3ef693 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.4.2" +__version__ = "1.5.0" # import apis into sdk package from activitysmith_openapi.api.live_activities_api import LiveActivitiesApi diff --git a/activitysmith_openapi/api_client.py b/activitysmith_openapi/api_client.py index c788ea0..aa1984b 100644 --- a/activitysmith_openapi/api_client.py +++ b/activitysmith_openapi/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.4.2/python' + self.user_agent = 'OpenAPI-Generator/1.5.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/activitysmith_openapi/configuration.py b/activitysmith_openapi/configuration.py index 66437ec..30ffd08 100644 --- a/activitysmith_openapi/configuration.py +++ b/activitysmith_openapi/configuration.py @@ -393,7 +393,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.4.2".\ + "SDK Package Version: 1.5.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/activitysmith_openapi/docs/ContentStateEnd.md b/activitysmith_openapi/docs/ContentStateEnd.md index 66275af..65bc34e 100644 --- a/activitysmith_openapi/docs/ContentStateEnd.md +++ b/activitysmith_openapi/docs/ContentStateEnd.md @@ -6,21 +6,21 @@ End payload requires title. For segmented_progress include current_step and opti Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | -**subtitle** | **str** | | [optional] -**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. Optional on end, and safe to change if the final workflow used more or fewer steps than originally planned. | [optional] -**current_step** | **int** | Current step. Use for type=segmented_progress. | [optional] -**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] -**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] -**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] -**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] -**message** | **str** | Alert message. Use for type=alert. | [optional] -**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] -**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] -**type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] -**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] -**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] -**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] +**title** | **str** | | +**subtitle** | **str** | | [optional] +**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. Optional on end, and safe to change if the final workflow used more or fewer steps than originally planned. | [optional] +**current_step** | **int** | Current completed step count. Use for type=segmented_progress. Must be less than or equal to number_of_steps when number_of_steps is provided. | [optional] +**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] +**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] +**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] +**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] +**message** | **str** | Alert message. Use for type=alert. | [optional] +**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] +**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] +**type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] +**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] **auto_dismiss_minutes** | **int** | 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. | [optional] [default to 3] ## Example diff --git a/activitysmith_openapi/docs/ContentStateStart.md b/activitysmith_openapi/docs/ContentStateStart.md index 5ccee0a..779b022 100644 --- a/activitysmith_openapi/docs/ContentStateStart.md +++ b/activitysmith_openapi/docs/ContentStateStart.md @@ -6,21 +6,21 @@ Start payload requires title and type. For segmented_progress include number_of_ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | -**subtitle** | **str** | | [optional] -**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. This value can be increased or decreased later when updating or ending the same activity. | [optional] -**current_step** | **int** | Current step. Use for type=segmented_progress. | [optional] -**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] -**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] -**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] -**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] -**message** | **str** | Required for type=alert. | [optional] -**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] -**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] -**type** | **str** | | -**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] -**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] -**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] +**title** | **str** | | +**subtitle** | **str** | | [optional] +**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. This value can be increased or decreased later when updating or ending the same activity. | [optional] +**current_step** | **int** | Current completed step count. Use for type=segmented_progress. Set 0 when the activity has started but no segment is complete yet. Must be less than or equal to number_of_steps. | [optional] +**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] +**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] +**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] +**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] +**message** | **str** | Required for type=alert. | [optional] +**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] +**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] +**type** | **str** | | +**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] +**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] ## Example diff --git a/activitysmith_openapi/docs/ContentStateUpdate.md b/activitysmith_openapi/docs/ContentStateUpdate.md index 933312a..8653ffe 100644 --- a/activitysmith_openapi/docs/ContentStateUpdate.md +++ b/activitysmith_openapi/docs/ContentStateUpdate.md @@ -6,21 +6,21 @@ Update payload requires title. For segmented_progress include current_step and o Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | -**subtitle** | **str** | | [optional] -**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. Optional on update, and safe to change if the workflow gains or loses steps. | [optional] -**current_step** | **int** | Current step. Use for type=segmented_progress. | [optional] -**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] -**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] -**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] -**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] -**message** | **str** | Alert message. Use for type=alert. | [optional] -**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] -**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] -**type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] -**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] -**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] -**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] +**title** | **str** | | +**subtitle** | **str** | | [optional] +**number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. Optional on update, and safe to change if the workflow gains or loses steps. | [optional] +**current_step** | **int** | Current completed step count. Use for type=segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided. | [optional] +**percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] +**value** | **float** | Current progress value. Use with upper_limit for type=progress. | [optional] +**upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] +**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] +**message** | **str** | Alert message. Use for type=alert. | [optional] +**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] +**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] +**type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] +**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] ## Example diff --git a/activitysmith_openapi/docs/StreamContentState.md b/activitysmith_openapi/docs/StreamContentState.md index da407b4..78f993c 100644 --- a/activitysmith_openapi/docs/StreamContentState.md +++ b/activitysmith_openapi/docs/StreamContentState.md @@ -6,23 +6,23 @@ Current state for a managed Live Activity stream. Include type on the first PUT, Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | -**subtitle** | **str** | | [optional] -**number_of_steps** | **int** | Use for segmented_progress. | [optional] -**current_step** | **int** | Use for segmented_progress. | [optional] -**percentage** | **float** | Use for progress. Takes precedence over value/upper_limit if both are provided. | [optional] -**value** | **float** | Current progress value. Use with upper_limit for progress. | [optional] -**upper_limit** | **float** | Maximum progress value. Use with value for progress. | [optional] -**type** | **str** | Required on the first PUT or whenever the stream cannot infer the current activity type. | [optional] -**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] -**step_color** | **str** | Optional. Overrides color for the current step. Only applies to segmented_progress. | [optional] -**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] -**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for metrics and stats activities. | [optional] -**message** | **str** | Required for type=alert. | [optional] -**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] -**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] -**auto_dismiss_seconds** | **int** | Optional. Seconds before the ended Live Activity is dismissed. | [optional] -**auto_dismiss_minutes** | **int** | Optional. Minutes before the ended Live Activity is dismissed. | [optional] +**title** | **str** | | +**subtitle** | **str** | | [optional] +**number_of_steps** | **int** | Use for segmented_progress. | [optional] +**current_step** | **int** | Use for segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided. | [optional] +**percentage** | **float** | Use for progress. Takes precedence over value/upper_limit if both are provided. | [optional] +**value** | **float** | Current progress value. Use with upper_limit for progress. | [optional] +**upper_limit** | **float** | Maximum progress value. Use with value for progress. | [optional] +**type** | **str** | Required on the first PUT or whenever the stream cannot infer the current activity type. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**step_color** | **str** | Optional. Overrides color for the current step. Only applies to segmented_progress. | [optional] +**step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] +**metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for metrics and stats activities. | [optional] +**message** | **str** | Required for type=alert. | [optional] +**icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon for type=alert. | [optional] +**badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge for type=alert. | [optional] +**auto_dismiss_seconds** | **int** | Optional. Seconds before the ended Live Activity is dismissed. | [optional] +**auto_dismiss_minutes** | **int** | Optional. Minutes before the ended Live Activity is dismissed. | [optional] ## Example diff --git a/activitysmith_openapi/models/content_state_end.py b/activitysmith_openapi/models/content_state_end.py index 7e41627..6d0c67b 100644 --- a/activitysmith_openapi/models/content_state_end.py +++ b/activitysmith_openapi/models/content_state_end.py @@ -33,7 +33,7 @@ class ContentStateEnd(BaseModel): title: StrictStr subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of steps. Use for type=segmented_progress. Optional on end, and safe to change if the final workflow used more or fewer steps than originally planned.") - current_step: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Current step. Use for type=segmented_progress.") + current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Current completed step count. Use for type=segmented_progress. Must be less than or equal to number_of_steps when number_of_steps is provided.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current progress value. Use with upper_limit for type=progress.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for type=progress.") diff --git a/activitysmith_openapi/models/content_state_start.py b/activitysmith_openapi/models/content_state_start.py index 7edef0c..1055dfb 100644 --- a/activitysmith_openapi/models/content_state_start.py +++ b/activitysmith_openapi/models/content_state_start.py @@ -33,7 +33,7 @@ class ContentStateStart(BaseModel): title: StrictStr subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of steps. Use for type=segmented_progress. This value can be increased or decreased later when updating or ending the same activity.") - current_step: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Current step. Use for type=segmented_progress.") + current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Current completed step count. Use for type=segmented_progress. Set 0 when the activity has started but no segment is complete yet. Must be less than or equal to number_of_steps.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current progress value. Use with upper_limit for type=progress.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for type=progress.") diff --git a/activitysmith_openapi/models/content_state_update.py b/activitysmith_openapi/models/content_state_update.py index 550e93c..d1f0c3d 100644 --- a/activitysmith_openapi/models/content_state_update.py +++ b/activitysmith_openapi/models/content_state_update.py @@ -33,7 +33,7 @@ class ContentStateUpdate(BaseModel): title: StrictStr subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of steps. Use for type=segmented_progress. Optional on update, and safe to change if the workflow gains or loses steps.") - current_step: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Current step. Use for type=segmented_progress.") + current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Current completed step count. Use for type=segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current progress value. Use with upper_limit for type=progress.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for type=progress.") diff --git a/activitysmith_openapi/models/stream_content_state.py b/activitysmith_openapi/models/stream_content_state.py index bf399d6..7c0e0ab 100644 --- a/activitysmith_openapi/models/stream_content_state.py +++ b/activitysmith_openapi/models/stream_content_state.py @@ -33,7 +33,7 @@ class StreamContentState(BaseModel): title: StrictStr subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Use for segmented_progress.") - current_step: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Use for segmented_progress.") + current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Use for segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Use for progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current progress value. Use with upper_limit for progress.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for progress.") diff --git a/activitysmith_openapi/test/test_content_state_end.py b/activitysmith_openapi/test/test_content_state_end.py index 92199b1..caa5d26 100644 --- a/activitysmith_openapi/test/test_content_state_end.py +++ b/activitysmith_openapi/test/test_content_state_end.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ContentStateEnd: title = '', subtitle = '', number_of_steps = 1, - current_step = 1, + current_step = 0, percentage = 0, value = 1.337, upper_limit = 1.337, diff --git a/activitysmith_openapi/test/test_content_state_start.py b/activitysmith_openapi/test/test_content_state_start.py index 0f82e65..0df0b04 100644 --- a/activitysmith_openapi/test/test_content_state_start.py +++ b/activitysmith_openapi/test/test_content_state_start.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ContentStateStart: title = '', subtitle = '', number_of_steps = 1, - current_step = 1, + current_step = 0, percentage = 0, value = 1.337, upper_limit = 1.337, diff --git a/activitysmith_openapi/test/test_content_state_update.py b/activitysmith_openapi/test/test_content_state_update.py index b273f79..2d347f7 100644 --- a/activitysmith_openapi/test/test_content_state_update.py +++ b/activitysmith_openapi/test/test_content_state_update.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> ContentStateUpdate: title = '', subtitle = '', number_of_steps = 1, - current_step = 1, + current_step = 0, percentage = 0, value = 1.337, upper_limit = 1.337, diff --git a/activitysmith_openapi/test/test_stream_content_state.py b/activitysmith_openapi/test/test_stream_content_state.py index 5e00f46..a44de74 100644 --- a/activitysmith_openapi/test/test_stream_content_state.py +++ b/activitysmith_openapi/test/test_stream_content_state.py @@ -38,7 +38,7 @@ def make_instance(self, include_optional) -> StreamContentState: title = '', subtitle = '', number_of_steps = 1, - current_step = 1, + current_step = 0, percentage = 0, value = 1.337, upper_limit = 1.337,