Skip to content

Commit 1a90a1b

Browse files
feat(api): manual updates (#20)
1 parent ad9f662 commit 1a90a1b

File tree

16 files changed

+42
-39
lines changed

16 files changed

+42
-39
lines changed

Diff for: api.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ from gitpod.types import (
99
Principal,
1010
RunsOn,
1111
Subject,
12+
Task,
1213
TaskExecution,
1314
TaskExecutionMetadata,
1415
TaskExecutionPhase,
1516
TaskExecutionSpec,
1617
TaskExecutionStatus,
18+
TaskMetadata,
19+
TaskSpec,
1720
UserStatus,
1821
)
1922
```
@@ -141,9 +144,6 @@ Types:
141144

142145
```python
143146
from gitpod.types.environments.automations import (
144-
Task,
145-
TaskMetadata,
146-
TaskSpec,
147147
TaskCreateResponse,
148148
TaskRetrieveResponse,
149149
TaskUpdateResponse,
@@ -157,7 +157,7 @@ Methods:
157157
- <code title="post /gitpod.v1.EnvironmentAutomationService/CreateTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">create</a>(\*\*<a href="src/gitpod/types/environments/automations/task_create_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_create_response.py">TaskCreateResponse</a></code>
158158
- <code title="post /gitpod.v1.EnvironmentAutomationService/GetTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">retrieve</a>(\*\*<a href="src/gitpod/types/environments/automations/task_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_retrieve_response.py">TaskRetrieveResponse</a></code>
159159
- <code title="post /gitpod.v1.EnvironmentAutomationService/UpdateTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">update</a>(\*\*<a href="src/gitpod/types/environments/automations/task_update_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_update_response.py">object</a></code>
160-
- <code title="post /gitpod.v1.EnvironmentAutomationService/ListTasks">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">list</a>(\*\*<a href="src/gitpod/types/environments/automations/task_list_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task.py">SyncTasksPage[Task]</a></code>
160+
- <code title="post /gitpod.v1.EnvironmentAutomationService/ListTasks">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">list</a>(\*\*<a href="src/gitpod/types/environments/automations/task_list_params.py">params</a>) -> <a href="./src/gitpod/types/shared/task.py">SyncTasksPage[Task]</a></code>
161161
- <code title="post /gitpod.v1.EnvironmentAutomationService/DeleteTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">delete</a>(\*\*<a href="src/gitpod/types/environments/automations/task_delete_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_delete_response.py">object</a></code>
162162
- <code title="post /gitpod.v1.EnvironmentAutomationService/StartTask">client.environments.automations.tasks.<a href="./src/gitpod/resources/environments/automations/tasks/tasks.py">start</a>(\*\*<a href="src/gitpod/types/environments/automations/task_start_params.py">params</a>) -> <a href="./src/gitpod/types/environments/automations/task_start_response.py">TaskStartResponse</a></code>
163163

Diff for: src/gitpod/resources/environments/automations/tasks/tasks.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
)
3030
from .....pagination import SyncTasksPage, AsyncTasksPage
3131
from ....._base_client import AsyncPaginator, make_request_options
32+
from .....types.shared.task import Task
33+
from .....types.shared_params.task_spec import TaskSpec
3234
from .....types.environments.automations import (
3335
task_list_params,
3436
task_start_params,
@@ -37,9 +39,7 @@
3739
task_update_params,
3840
task_retrieve_params,
3941
)
40-
from .....types.environments.automations.task import Task
41-
from .....types.environments.automations.task_spec_param import TaskSpecParam
42-
from .....types.environments.automations.task_metadata_param import TaskMetadataParam
42+
from .....types.shared_params.task_metadata import TaskMetadata
4343
from .....types.environments.automations.task_start_response import TaskStartResponse
4444
from .....types.environments.automations.task_create_response import TaskCreateResponse
4545
from .....types.environments.automations.task_retrieve_response import TaskRetrieveResponse
@@ -76,8 +76,8 @@ def create(
7676
*,
7777
depends_on: List[str] | NotGiven = NOT_GIVEN,
7878
environment_id: str | NotGiven = NOT_GIVEN,
79-
metadata: TaskMetadataParam | NotGiven = NOT_GIVEN,
80-
spec: TaskSpecParam | NotGiven = NOT_GIVEN,
79+
metadata: TaskMetadata | NotGiven = NOT_GIVEN,
80+
spec: TaskSpec | NotGiven = NOT_GIVEN,
8181
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8282
# The extra values given here take precedence over values defined on the client or passed to this method.
8383
extra_headers: Headers | None = None,
@@ -344,8 +344,8 @@ async def create(
344344
*,
345345
depends_on: List[str] | NotGiven = NOT_GIVEN,
346346
environment_id: str | NotGiven = NOT_GIVEN,
347-
metadata: TaskMetadataParam | NotGiven = NOT_GIVEN,
348-
spec: TaskSpecParam | NotGiven = NOT_GIVEN,
347+
metadata: TaskMetadata | NotGiven = NOT_GIVEN,
348+
spec: TaskSpec | NotGiven = NOT_GIVEN,
349349
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
350350
# The extra values given here take precedence over values defined on the client or passed to this method.
351351
extra_headers: Headers | None = None,

Diff for: src/gitpod/types/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
from .runner import Runner as Runner
1010
from .secret import Secret as Secret
1111
from .shared import (
12+
Task as Task,
1213
RunsOn as RunsOn,
1314
Subject as Subject,
15+
TaskSpec as TaskSpec,
1416
Principal as Principal,
1517
FieldValue as FieldValue,
1618
UserStatus as UserStatus,
19+
TaskMetadata as TaskMetadata,
1720
TaskExecution as TaskExecution,
1821
EnvironmentClass as EnvironmentClass,
1922
OrganizationRole as OrganizationRole,

Diff for: src/gitpod/types/environments/automations/__init__.py

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

33
from __future__ import annotations
44

5-
from .task import Task as Task
65
from .service import Service as Service
7-
from .task_spec import TaskSpec as TaskSpec
86
from .service_spec import ServiceSpec as ServiceSpec
97
from .service_phase import ServicePhase as ServicePhase
10-
from .task_metadata import TaskMetadata as TaskMetadata
118
from .service_status import ServiceStatus as ServiceStatus
12-
from .task_spec_param import TaskSpecParam as TaskSpecParam
139
from .service_metadata import ServiceMetadata as ServiceMetadata
1410
from .task_list_params import TaskListParams as TaskListParams
1511
from .task_start_params import TaskStartParams as TaskStartParams
@@ -19,7 +15,6 @@
1915
from .task_update_params import TaskUpdateParams as TaskUpdateParams
2016
from .service_list_params import ServiceListParams as ServiceListParams
2117
from .service_stop_params import ServiceStopParams as ServiceStopParams
22-
from .task_metadata_param import TaskMetadataParam as TaskMetadataParam
2318
from .task_start_response import TaskStartResponse as TaskStartResponse
2419
from .service_start_params import ServiceStartParams as ServiceStartParams
2520
from .task_create_response import TaskCreateResponse as TaskCreateResponse

Diff for: src/gitpod/types/environments/automations/task_create_params.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from typing_extensions import Annotated, TypedDict
77

88
from ...._utils import PropertyInfo
9-
from .task_spec_param import TaskSpecParam
10-
from .task_metadata_param import TaskMetadataParam
9+
from ...shared_params.task_spec import TaskSpec
10+
from ...shared_params.task_metadata import TaskMetadata
1111

1212
__all__ = ["TaskCreateParams"]
1313

@@ -17,6 +17,6 @@ class TaskCreateParams(TypedDict, total=False):
1717

1818
environment_id: Annotated[str, PropertyInfo(alias="environmentId")]
1919

20-
metadata: TaskMetadataParam
20+
metadata: TaskMetadata
2121

22-
spec: TaskSpecParam
22+
spec: TaskSpec

Diff for: src/gitpod/types/environments/automations/task_create_response.py

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

33
from typing import Optional
44

5-
from .task import Task
65
from ...._models import BaseModel
6+
from ...shared.task import Task
77

88
__all__ = ["TaskCreateResponse"]
99

Diff for: src/gitpod/types/environments/automations/task_retrieve_response.py

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

33
from typing import Optional
44

5-
from .task import Task
65
from ...._models import BaseModel
6+
from ...shared.task import Task
77

88
__all__ = ["TaskRetrieveResponse"]
99

Diff for: src/gitpod/types/shared/__init__.py

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

3+
from .task import Task as Task
34
from .runs_on import RunsOn as RunsOn
45
from .subject import Subject as Subject
56
from .principal import Principal as Principal
7+
from .task_spec import TaskSpec as TaskSpec
68
from .field_value import FieldValue as FieldValue
79
from .user_status import UserStatus as UserStatus
10+
from .task_metadata import TaskMetadata as TaskMetadata
811
from .task_execution import TaskExecution as TaskExecution
912
from .environment_class import EnvironmentClass as EnvironmentClass
1013
from .organization_role import OrganizationRole as OrganizationRole

Diff for: src/gitpod/types/environments/automations/task.py renamed to src/gitpod/types/shared/task.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from pydantic import Field as FieldInfo
66

7+
from ..._models import BaseModel
78
from .task_spec import TaskSpec
8-
from ...._models import BaseModel
99
from .task_metadata import TaskMetadata
1010

1111
__all__ = ["Task"]

Diff for: src/gitpod/types/shared/task_execution_spec.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from pydantic import Field as FieldInfo
66

77
from ..._models import BaseModel
8+
from .task_spec import TaskSpec
89
from .task_execution_phase import TaskExecutionPhase
9-
from ..environments.automations.task_spec import TaskSpec
1010

1111
__all__ = ["TaskExecutionSpec", "Plan", "PlanStep", "PlanStepTask"]
1212

Diff for: src/gitpod/types/environments/automations/task_metadata.py renamed to src/gitpod/types/shared/task_metadata.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
from pydantic import Field as FieldInfo
77

8-
from ...._models import BaseModel
9-
from ...shared.subject import Subject
10-
from ...shared.automation_trigger import AutomationTrigger
8+
from .subject import Subject
9+
from ..._models import BaseModel
10+
from .automation_trigger import AutomationTrigger
1111

1212
__all__ = ["TaskMetadata"]
1313

Diff for: src/gitpod/types/environments/automations/task_spec.py renamed to src/gitpod/types/shared/task_spec.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from pydantic import Field as FieldInfo
66

7-
from ...._models import BaseModel
8-
from ...shared.runs_on import RunsOn
7+
from .runs_on import RunsOn
8+
from ..._models import BaseModel
99

1010
__all__ = ["TaskSpec"]
1111

Diff for: src/gitpod/types/shared_params/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
from .runs_on import RunsOn as RunsOn
44
from .subject import Subject as Subject
55
from .principal import Principal as Principal
6+
from .task_spec import TaskSpec as TaskSpec
67
from .field_value import FieldValue as FieldValue
8+
from .task_metadata import TaskMetadata as TaskMetadata
79
from .environment_class import EnvironmentClass as EnvironmentClass
810
from .organization_role import OrganizationRole as OrganizationRole
911
from .automation_trigger import AutomationTrigger as AutomationTrigger

Diff for: src/gitpod/types/environments/automations/task_metadata_param.py renamed to src/gitpod/types/shared_params/task_metadata.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
from datetime import datetime
77
from typing_extensions import Annotated, TypedDict
88

9-
from ...._utils import PropertyInfo
10-
from ...shared_params.subject import Subject
11-
from ...shared_params.automation_trigger import AutomationTrigger
9+
from .subject import Subject
10+
from ..._utils import PropertyInfo
11+
from .automation_trigger import AutomationTrigger
1212

13-
__all__ = ["TaskMetadataParam"]
13+
__all__ = ["TaskMetadata"]
1414

1515

16-
class TaskMetadataParam(TypedDict, total=False):
16+
class TaskMetadata(TypedDict, total=False):
1717
created_at: Annotated[Union[str, datetime], PropertyInfo(alias="createdAt", format="iso8601")]
1818
"""
1919
A Timestamp represents a point in time independent of any time zone or local

Diff for: src/gitpod/types/environments/automations/task_spec_param.py renamed to src/gitpod/types/shared_params/task_spec.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
from typing_extensions import Annotated, TypedDict
66

7-
from ...._utils import PropertyInfo
8-
from ...shared_params.runs_on import RunsOn
7+
from .runs_on import RunsOn
8+
from ..._utils import PropertyInfo
99

10-
__all__ = ["TaskSpecParam"]
10+
__all__ = ["TaskSpec"]
1111

1212

13-
class TaskSpecParam(TypedDict, total=False):
13+
class TaskSpec(TypedDict, total=False):
1414
command: str
1515
"""command contains the command the task should execute"""
1616

Diff for: tests/api_resources/environments/automations/test_tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from tests.utils import assert_matches_type
1212
from gitpod._utils import parse_datetime
1313
from gitpod.pagination import SyncTasksPage, AsyncTasksPage
14+
from gitpod.types.shared import Task
1415
from gitpod.types.environments.automations import (
15-
Task,
1616
TaskStartResponse,
1717
TaskCreateResponse,
1818
TaskRetrieveResponse,

0 commit comments

Comments
 (0)