Skip to content

Commit c16c250

Browse files
release: 0.1.2 (#38)
* feat(api): Organizations Open API docs (#37) * feat(api): manual updates (#39) * release: 0.1.2 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent daa4f73 commit c16c250

19 files changed

+1290
-237
lines changed

Diff for: .release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.1"
2+
".": "0.1.2"
33
}

Diff for: .stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-27f7bd641de1e4657ad8ce84a456fe0c5e8f1e14779bf1f567a4bc8667eba4da.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml

Diff for: CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 0.1.2 (2025-02-14)
4+
5+
Full Changelog: [v0.1.1...v0.1.2](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.1...v0.1.2)
6+
7+
### Features
8+
9+
* **api:** manual updates ([#39](https://github.com/gitpod-io/gitpod-sdk-python/issues/39)) ([31f6c01](https://github.com/gitpod-io/gitpod-sdk-python/commit/31f6c01e50663c19a4e11808458b4bbd3fb38ead))
10+
* **api:** Organizations Open API docs ([#37](https://github.com/gitpod-io/gitpod-sdk-python/issues/37)) ([ed6623d](https://github.com/gitpod-io/gitpod-sdk-python/commit/ed6623dbad5cf3605f8d5e3d07450cc30576ad0f))
11+
312
## 0.1.1 (2025-02-14)
413

514
Full Changelog: [v0.1.0-alpha.3...v0.1.1](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.3...v0.1.1)

Diff for: api.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
```python
44
from gitpod.types import (
5+
ArbitraryData,
56
AutomationTrigger,
67
EnvironmentClass,
8+
ErrorCode,
79
FieldValue,
810
OrganizationRole,
911
Principal,

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "gitpod-sdk"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "The official Python library for the gitpod API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

Diff for: src/gitpod/_exceptions.py

+30-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
from __future__ import annotations
44

5+
from typing import TYPE_CHECKING, Any, Optional, cast
56
from typing_extensions import Literal
67

78
import httpx
89

10+
from ._utils import is_dict
11+
from ._models import construct_type
12+
from .types.shared.error_code import ErrorCode
13+
from .types.shared.arbitrary_data import ArbitraryData
14+
915
__all__ = [
1016
"BadRequestError",
1117
"AuthenticationError",
@@ -37,12 +43,35 @@ class APIError(GitpodError):
3743
If there was no response associated with this error then it will be `None`.
3844
"""
3945

40-
def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: # noqa: ARG002
46+
code: Optional[ErrorCode] = None
47+
"""
48+
The status code, which should be an enum value of
49+
[google.rpc.Code][google.rpc.Code].
50+
"""
51+
detail: Optional[ArbitraryData] = None
52+
"""
53+
Contains an arbitrary serialized message along with a @type that describes the
54+
type of the serialized message.
55+
"""
56+
if TYPE_CHECKING:
57+
# Stub to indicate that arbitrary properties are accepted.
58+
# To access properties that are not valid identifiers you can use `getattr`, e.g.
59+
# `getattr(obj, '$type')`
60+
def __getattr__(self, attr: str) -> object: ...
61+
62+
def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None:
4163
super().__init__(message)
4264
self.request = request
4365
self.message = message
4466
self.body = body
4567

68+
if is_dict(body):
69+
self.code = cast(Any, construct_type(type_=Optional[ErrorCode], value=body.get("code")))
70+
self.detail = cast(Any, construct_type(type_=Optional[ArbitraryData], value=body.get("detail")))
71+
else:
72+
self.code = None
73+
self.detail = None
74+
4675

4776
class APIResponseValidationError(APIError):
4877
response: httpx.Response

Diff for: src/gitpod/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "gitpod"
4-
__version__ = "0.1.1" # x-release-please-version
4+
__version__ = "0.1.2" # x-release-please-version

0 commit comments

Comments
 (0)