Skip to content

Commit

Permalink
release: 0.1.2 (#38)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
stainless-app[bot] authored Feb 14, 2025
1 parent daa4f73 commit c16c250
Showing 19 changed files with 1,290 additions and 237 deletions.
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.1.1"
".": "0.1.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-27f7bd641de1e4657ad8ce84a456fe0c5e8f1e14779bf1f567a4bc8667eba4da.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.2 (2025-02-14)

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

### Features

* **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))
* **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))

## 0.1.1 (2025-02-14)

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)
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,10 @@

```python
from gitpod.types import (
ArbitraryData,
AutomationTrigger,
EnvironmentClass,
ErrorCode,
FieldValue,
OrganizationRole,
Principal,
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "gitpod-sdk"
version = "0.1.1"
version = "0.1.2"
description = "The official Python library for the gitpod API"
dynamic = ["readme"]
license = "Apache-2.0"
31 changes: 30 additions & 1 deletion src/gitpod/_exceptions.py
Original file line number Diff line number Diff line change
@@ -2,10 +2,16 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Optional, cast
from typing_extensions import Literal

import httpx

from ._utils import is_dict
from ._models import construct_type
from .types.shared.error_code import ErrorCode
from .types.shared.arbitrary_data import ArbitraryData

__all__ = [
"BadRequestError",
"AuthenticationError",
@@ -37,12 +43,35 @@ class APIError(GitpodError):
If there was no response associated with this error then it will be `None`.
"""

def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: # noqa: ARG002
code: Optional[ErrorCode] = None
"""
The status code, which should be an enum value of
[google.rpc.Code][google.rpc.Code].
"""
detail: Optional[ArbitraryData] = None
"""
Contains an arbitrary serialized message along with a @type that describes the
type of the serialized message.
"""
if TYPE_CHECKING:
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> object: ...

def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None:
super().__init__(message)
self.request = request
self.message = message
self.body = body

if is_dict(body):
self.code = cast(Any, construct_type(type_=Optional[ErrorCode], value=body.get("code")))
self.detail = cast(Any, construct_type(type_=Optional[ArbitraryData], value=body.get("detail")))
else:
self.code = None
self.detail = None


class APIResponseValidationError(APIError):
response: httpx.Response
2 changes: 1 addition & 1 deletion src/gitpod/_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__ = "gitpod"
__version__ = "0.1.1" # x-release-please-version
__version__ = "0.1.2" # x-release-please-version
Loading
Oops, something went wrong.

0 comments on commit c16c250

Please sign in to comment.