Skip to content
Merged
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: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.5.0"
".": "0.6.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/miru-ml%2Fmiru-server-d5d0de741a61bae4e957197c6fb0859ee5880ddab98616469f4414dc373c9d7f.yml
openapi_spec_hash: 10d91729a0e0430fd2a6c68b2c81f886
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/miru-ml%2Fmiru-server-f83963fba7bea9fcb404a2a9f23e1dc72d095a723e3f0d80908d9403418defed.yml
openapi_spec_hash: 338aed81ffea9410ecd43393094977bf
config_hash: 12fa4b9e99bf5317506a12aa9fecf73b
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

## 0.6.0 (2025-10-21)

Full Changelog: [v0.5.0...v0.6.0](https://github.com/miruml/python-server-sdk/compare/v0.5.0...v0.6.0)

### Features

* **api:** manual updates ([1f24c3f](https://github.com/miruml/python-server-sdk/commit/1f24c3f238e13344e158a909a8444fe6a02534ec))
* **api:** manual updates ([616466d](https://github.com/miruml/python-server-sdk/commit/616466d196871cb65ad48ecccf292be3596043b1))
* **api:** uat environment ([67e2b55](https://github.com/miruml/python-server-sdk/commit/67e2b5530fadfbd61d67e85d4fc5b4c363558fd9))
* **api:** update to v0.1.0 ([af3571c](https://github.com/miruml/python-server-sdk/commit/af3571c82e8ef891ca6c891cb4361e342a2f8fec))


### Bug Fixes

* **api:** expansions to use bracket format ([0344365](https://github.com/miruml/python-server-sdk/commit/03443654ab20a279be8594224358a15b746cfd01))
* **api:** restore webhook event models ([3e556df](https://github.com/miruml/python-server-sdk/commit/3e556dfa6728fd8a0e6e2206b6d5e38200f8325e))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([c54533f](https://github.com/miruml/python-server-sdk/commit/c54533f4c9d33df7720a786ef80f275d7bfd2e83))
* **internal:** detect missing future annotations with ruff ([ea21d88](https://github.com/miruml/python-server-sdk/commit/ea21d88960b9babe76a058adc0446205f909317f))
* update SDK settings ([e7bd9a6](https://github.com/miruml/python-server-sdk/commit/e7bd9a6b432ceeb9e9746577c0588bc3d8d6d81c))
* update SDK settings ([e6ec403](https://github.com/miruml/python-server-sdk/commit/e6ec4031305e950d8f61d18a55344de0e36f752b))


### Documentation

* update docs ([c152552](https://github.com/miruml/python-server-sdk/commit/c15255242bb7a5051d8618682afd0b981fe32396))


### Styles

* alphabetize webhook imports ([944a3ef](https://github.com/miruml/python-server-sdk/commit/944a3ef1b90d1efcff434ad218237107fb216a56))


### Refactors

* **api:** rename miru-server to miru ([163c465](https://github.com/miruml/python-server-sdk/commit/163c4659c64f6b954d9b91e7b340554f0919efa6))
* **api:** revert package name to miru_server_sdk ([0c8b7d7](https://github.com/miruml/python-server-sdk/commit/0c8b7d74ae67df4005fc069c4575ffae78b975c6))
* webhook payload to be type 'Any' instead of 'string' ([d0f5bdf](https://github.com/miruml/python-server-sdk/commit/d0f5bdf96c37812e15ddba85ce45e898491546ae))

## 0.5.0 (2025-10-07)

Full Changelog: [v0.4.1...v0.5.0](https://github.com/miruml/python-server-sdk/compare/v0.4.1...v0.5.0)
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "miru_server_sdk"
version = "0.5.0"
version = "0.6.0"
description = "The official Python library for the miru API"
dynamic = ["readme"]
license = "MIT"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/miruml/python-server-sdk"
Repository = "https://github.com/miruml/python-server-sdk"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand Down Expand Up @@ -224,6 +224,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -246,6 +248,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via miru-server-sdk
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via miru-server-sdk
idna==3.4
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via miru-server-sdk
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via miru-server-sdk
idna==3.4
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion src/miru_server_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "miru_server_sdk"
__version__ = "0.5.0" # x-release-please-version
__version__ = "0.6.0" # x-release-please-version
24 changes: 10 additions & 14 deletions src/miru_server_sdk/resources/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def create(
device_id: str,
new_config_instances: Iterable[deployment_create_params.NewConfigInstance],
release_id: str,
target_status: Literal["pending", "approved", "deployed"],
target_status: Literal["staged", "deployed"],
expand: List[Literal["device", "release", "config_instances"]] | Omit = omit,
patch_source_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -86,10 +86,8 @@ def create(

target_status: Desired state of the deployment.

- Pending: staged for deployment but not yet approved. Deployments can only be
staged if their release is not the current release for the device.
- Approved: staged and approved for deployment. Deployments can only be staged
if their release is not the current release for the device.
- Staged: ready for deployment. Deployments can only be staged if their release
is not the current release for the device.
- Deployed: deployed to the device. Deployments can only be deployed if their
release is the device's current release.

Expand Down Expand Up @@ -175,7 +173,7 @@ def list(
self,
*,
id: str | Omit = omit,
activity_status: Literal["validating", "pending", "approved", "queued", "deployed", "removing", "archived"]
activity_status: Literal["validating", "needs_review", "staged", "queued", "deployed", "removing", "archived"]
| Omit = omit,
device_id: str | Omit = omit,
error_status: Literal["none", "failed", "retrying"] | Omit = omit,
Expand All @@ -184,7 +182,7 @@ def list(
offset: int | Omit = omit,
order_by: Literal["id:asc", "id:desc", "created_at:desc", "created_at:asc"] | Omit = omit,
release_id: str | Omit = omit,
target_status: Literal["pending", "approved", "deployed", "archived"] | Omit = omit,
target_status: Literal["staged", "deployed", "archived"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -329,7 +327,7 @@ async def create(
device_id: str,
new_config_instances: Iterable[deployment_create_params.NewConfigInstance],
release_id: str,
target_status: Literal["pending", "approved", "deployed"],
target_status: Literal["staged", "deployed"],
expand: List[Literal["device", "release", "config_instances"]] | Omit = omit,
patch_source_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -357,10 +355,8 @@ async def create(

target_status: Desired state of the deployment.

- Pending: staged for deployment but not yet approved. Deployments can only be
staged if their release is not the current release for the device.
- Approved: staged and approved for deployment. Deployments can only be staged
if their release is not the current release for the device.
- Staged: ready for deployment. Deployments can only be staged if their release
is not the current release for the device.
- Deployed: deployed to the device. Deployments can only be deployed if their
release is the device's current release.

Expand Down Expand Up @@ -448,7 +444,7 @@ async def list(
self,
*,
id: str | Omit = omit,
activity_status: Literal["validating", "pending", "approved", "queued", "deployed", "removing", "archived"]
activity_status: Literal["validating", "needs_review", "staged", "queued", "deployed", "removing", "archived"]
| Omit = omit,
device_id: str | Omit = omit,
error_status: Literal["none", "failed", "retrying"] | Omit = omit,
Expand All @@ -457,7 +453,7 @@ async def list(
offset: int | Omit = omit,
order_by: Literal["id:asc", "id:desc", "created_at:desc", "created_at:asc"] | Omit = omit,
release_id: str | Omit = omit,
target_status: Literal["pending", "approved", "deployed", "archived"] | Omit = omit,
target_status: Literal["staged", "deployed", "archived"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down
15 changes: 6 additions & 9 deletions src/miru_server_sdk/types/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ class Deployment(BaseModel):
id: str
"""ID of the deployment."""

activity_status: Literal["validating", "pending", "approved", "queued", "deployed", "removing", "archived"]
activity_status: Literal["validating", "needs_review", "staged", "queued", "deployed", "removing", "archived"]
"""Last known activity state of the deployment.

- Validating: the deployment's config instances are being validated with user's
custom validation
- Pending: staged for deployment but not yet approved; requires approval for
deployment to occur
- Approved: staged and approved for deployment
- Needs review: deployment needs to be reviewed before it can be deployed
- Staged: is ready to be deployed
- Queued: the deployment's config instances are waiting to be received by the
device; will be deployed as soon as the device is online
- Deployed: the deployment's config instances are currently available for
Expand Down Expand Up @@ -70,7 +69,7 @@ class Deployment(BaseModel):
"""The version of the release."""

status: Literal[
"validating", "pending", "approved", "queued", "deployed", "removing", "archived", "failed", "retrying"
"validating", "needs_review", "staged", "queued", "deployed", "removing", "archived", "failed", "retrying"
]
"""
This status merges the 'activity_status' and 'error_status' fields, with error
Expand All @@ -80,12 +79,10 @@ class Deployment(BaseModel):
status is 'deployed', the status is 'deployed'.
"""

target_status: Literal["pending", "approved", "deployed", "archived"]
target_status: Literal["staged", "deployed", "archived"]
"""Desired state of the deployment.

- Pending: staged for deployment but not yet approved; requires approval for
deployment to occur
- Approved: staged and approved for deployment
- Staged: is ready to be deployed
- Deployed: all config instances part of the deployment are available for
consumption on the device
- Archived: the deployment is available for historical reference but cannot be
Expand Down
8 changes: 3 additions & 5 deletions src/miru_server_sdk/types/deployment_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@ class DeploymentCreateParams(TypedDict, total=False):
release_id: Required[str]
"""The release ID which this deployment adheres to."""

target_status: Required[Literal["pending", "approved", "deployed"]]
target_status: Required[Literal["staged", "deployed"]]
"""Desired state of the deployment.

- Pending: staged for deployment but not yet approved. Deployments can only be
staged if their release is not the current release for the device.
- Approved: staged and approved for deployment. Deployments can only be staged
if their release is not the current release for the device.
- Staged: ready for deployment. Deployments can only be staged if their release
is not the current release for the device.
- Deployed: deployed to the device. Deployments can only be deployed if their
release is the device's current release.

Expand Down
4 changes: 2 additions & 2 deletions src/miru_server_sdk/types/deployment_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DeploymentListParams(TypedDict, total=False):
id: str
"""The deployment ID to filter by."""

activity_status: Literal["validating", "pending", "approved", "queued", "deployed", "removing", "archived"]
activity_status: Literal["validating", "needs_review", "staged", "queued", "deployed", "removing", "archived"]
"""The deployment activity status to filter by."""

device_id: str
Expand Down Expand Up @@ -41,5 +41,5 @@ class DeploymentListParams(TypedDict, total=False):
release_id: str
"""The deployment release ID to filter by."""

target_status: Literal["pending", "approved", "deployed", "archived"]
target_status: Literal["staged", "deployed", "archived"]
"""The deployment target status to filter by."""
20 changes: 10 additions & 10 deletions tests/api_resources/test_deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_method_create(self, client: Miru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
)
assert_matches_type(Deployment, deployment, path=["response"])

Expand All @@ -61,7 +61,7 @@ def test_method_create_with_all_params(self, client: Miru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
expand=["device"],
patch_source_id="dpl_123",
)
Expand All @@ -85,7 +85,7 @@ def test_raw_response_create(self, client: Miru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
)

assert response.is_closed is True
Expand All @@ -111,7 +111,7 @@ def test_streaming_response_create(self, client: Miru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_method_list_with_all_params(self, client: Miru) -> None:
offset=0,
order_by="id:asc",
release_id="rls_123",
target_status="pending",
target_status="staged",
)
assert_matches_type(DeploymentListResponse, deployment, path=["response"])

Expand Down Expand Up @@ -339,7 +339,7 @@ async def test_method_create(self, async_client: AsyncMiru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
)
assert_matches_type(Deployment, deployment, path=["response"])

Expand All @@ -361,7 +361,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncMiru) -> N
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
expand=["device"],
patch_source_id="dpl_123",
)
Expand All @@ -385,7 +385,7 @@ async def test_raw_response_create(self, async_client: AsyncMiru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
)

assert response.is_closed is True
Expand All @@ -411,7 +411,7 @@ async def test_streaming_response_create(self, async_client: AsyncMiru) -> None:
}
],
release_id="rls_123",
target_status="pending",
target_status="staged",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand Down Expand Up @@ -491,7 +491,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncMiru) -> Non
offset=0,
order_by="id:asc",
release_id="rls_123",
target_status="pending",
target_status="staged",
)
assert_matches_type(DeploymentListResponse, deployment, path=["response"])

Expand Down