diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2aca35a..4208b5c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.5.0" + ".": "0.6.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 88b95b7..6a1f486 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8f697..1e5bbce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 0c36d25..ef9b568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" @@ -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 @@ -224,6 +224,8 @@ select = [ "B", # remove unused imports "F401", + # check for missing future annotations + "FA102", # bare except statements "E722", # unused arguments @@ -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" diff --git a/requirements-dev.lock b/requirements-dev.lock index 86aec41..b668252 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -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 diff --git a/requirements.lock b/requirements.lock index 649fec0..1e316ae 100644 --- a/requirements.lock +++ b/requirements.lock @@ -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 diff --git a/src/miru_server_sdk/_version.py b/src/miru_server_sdk/_version.py index b354a86..7d08993 100644 --- a/src/miru_server_sdk/_version.py +++ b/src/miru_server_sdk/_version.py @@ -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 diff --git a/src/miru_server_sdk/resources/deployments.py b/src/miru_server_sdk/resources/deployments.py index 3aaa3c6..729563b 100644 --- a/src/miru_server_sdk/resources/deployments.py +++ b/src/miru_server_sdk/resources/deployments.py @@ -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. @@ -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. @@ -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, @@ -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, @@ -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. @@ -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. @@ -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, @@ -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, diff --git a/src/miru_server_sdk/types/deployment.py b/src/miru_server_sdk/types/deployment.py index b03512e..ac4496c 100644 --- a/src/miru_server_sdk/types/deployment.py +++ b/src/miru_server_sdk/types/deployment.py @@ -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 @@ -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 @@ -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 diff --git a/src/miru_server_sdk/types/deployment_create_params.py b/src/miru_server_sdk/types/deployment_create_params.py index 14d9de8..380ead0 100644 --- a/src/miru_server_sdk/types/deployment_create_params.py +++ b/src/miru_server_sdk/types/deployment_create_params.py @@ -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. diff --git a/src/miru_server_sdk/types/deployment_list_params.py b/src/miru_server_sdk/types/deployment_list_params.py index eb810bd..8d387c9 100644 --- a/src/miru_server_sdk/types/deployment_list_params.py +++ b/src/miru_server_sdk/types/deployment_list_params.py @@ -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 @@ -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.""" diff --git a/tests/api_resources/test_deployments.py b/tests/api_resources/test_deployments.py index f10f929..ea4dd1d 100644 --- a/tests/api_resources/test_deployments.py +++ b/tests/api_resources/test_deployments.py @@ -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"]) @@ -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", ) @@ -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 @@ -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" @@ -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"]) @@ -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"]) @@ -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", ) @@ -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 @@ -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" @@ -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"])