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
58 changes: 57 additions & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,9 @@ paths:
`limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded
`offset` past the cursor anchor. Supplying `limit` without `page`
selects cursor mode. `search` applies a case-insensitive project-name
filter in either mode. Sending `page` with `cursor` or `ending_before`,
filter in either mode. `include` optionally expands each returned
project with its Git connection and/or aggregate health summary using
`git_connection` and `health`. Sending `page` with `cursor` or `ending_before`,
or sending both cursor directions, returns 400.
operationId: listProjects
security:
Expand All @@ -961,6 +963,20 @@ paths:
- $ref: '#/components/parameters/EndingBefore'
- $ref: '#/components/parameters/Offset'
- $ref: '#/components/parameters/Search'
- name: include
in: query
required: false
description: Optional comma-separated project metadata expansions.
style: form
explode: false
schema:
type: array
uniqueItems: true
items:
type: string
enum:
- git_connection
- health
responses:
'200':
description: Successful response
Expand Down Expand Up @@ -15597,6 +15613,14 @@ components:
param that changes on each upload. Absent when the project has no
logo. The logo image is stored in the project's storage folder.
example: /projects/3fa85f64-5717-4562-b3fc-2c963f66afa6/logo?v=1718524800
git_connection:
allOf:
- $ref: '#/components/schemas/ProjectGitConnectionSummary'
description: Present for connected projects when `git_connection` is requested through the list endpoint's `include` parameter.
health:
allOf:
- $ref: '#/components/schemas/ProjectHealthSummary'
description: Present when `health` is requested through the list endpoint's `include` parameter.
created_at:
type: string
format: date-time
Expand All @@ -15611,6 +15635,38 @@ components:
- selected_regions
- created_at
- updated_at
ProjectGitConnectionSummary:
type: object
properties:
repo_installation_id:
type: integer
format: int64
repo_id:
type: integer
format: int64
repo_full_name:
type: string
root_directory:
type: string
production_branch:
type: string
updated_at:
type: string
format: date-time
required:
- repo_installation_id
- repo_id
- repo_full_name
- root_directory
- production_branch
- updated_at
ProjectHealthSummary:
type: object
properties:
status:
$ref: '#/components/schemas/ProjectHealthStatus'
required:
- status
ProjectConfig:
type: object
additionalProperties: false
Expand Down
41 changes: 37 additions & 4 deletions src/volcano_sdk/_generated/api/projects/list_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
from ... import errors

from ...models.error import Error
from ...models.list_projects_include_item import check_list_projects_include_item
from ...models.list_projects_include_item import ListProjectsIncludeItem
from ...models.paginated_projects import PaginatedProjects
from ...types import UNSET, Unset
from typing import cast
Expand All @@ -23,6 +25,7 @@ def _get_kwargs(
ending_before: str | Unset = UNSET,
offset: int | Unset = 0,
search: str | Unset = UNSET,
include: list[ListProjectsIncludeItem] | Unset = UNSET,

) -> dict[str, Any]:

Expand All @@ -43,6 +46,16 @@ def _get_kwargs(

params["search"] = search

json_include: list[str] | Unset = UNSET
if not isinstance(include, Unset):
json_include = []
for include_item_data in include:
include_item: str = include_item_data
json_include.append(include_item)


params["include"] = json_include


params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

Expand Down Expand Up @@ -97,6 +110,7 @@ def sync_detailed(
ending_before: str | Unset = UNSET,
offset: int | Unset = 0,
search: str | Unset = UNSET,
include: list[ListProjectsIncludeItem] | Unset = UNSET,

) -> Response[Error | PaginatedProjects]:
""" List all projects for authenticated user
Expand All @@ -107,7 +121,9 @@ def sync_detailed(
`limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded
`offset` past the cursor anchor. Supplying `limit` without `page`
selects cursor mode. `search` applies a case-insensitive project-name
filter in either mode. Sending `page` with `cursor` or `ending_before`,
filter in either mode. `include` optionally expands each returned
project with its Git connection and/or aggregate health summary using
`git_connection` and `health`. Sending `page` with `cursor` or `ending_before`,
or sending both cursor directions, returns 400.

Args:
Expand All @@ -117,6 +133,7 @@ def sync_detailed(
ending_before (str | Unset):
offset (int | Unset): Default: 0.
search (str | Unset):
include (list[ListProjectsIncludeItem] | Unset):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -134,6 +151,7 @@ def sync_detailed(
ending_before=ending_before,
offset=offset,
search=search,
include=include,

)

Expand All @@ -152,6 +170,7 @@ def sync(
ending_before: str | Unset = UNSET,
offset: int | Unset = 0,
search: str | Unset = UNSET,
include: list[ListProjectsIncludeItem] | Unset = UNSET,

) -> Error | PaginatedProjects | None:
""" List all projects for authenticated user
Expand All @@ -162,7 +181,9 @@ def sync(
`limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded
`offset` past the cursor anchor. Supplying `limit` without `page`
selects cursor mode. `search` applies a case-insensitive project-name
filter in either mode. Sending `page` with `cursor` or `ending_before`,
filter in either mode. `include` optionally expands each returned
project with its Git connection and/or aggregate health summary using
`git_connection` and `health`. Sending `page` with `cursor` or `ending_before`,
or sending both cursor directions, returns 400.

Args:
Expand All @@ -172,6 +193,7 @@ def sync(
ending_before (str | Unset):
offset (int | Unset): Default: 0.
search (str | Unset):
include (list[ListProjectsIncludeItem] | Unset):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -190,6 +212,7 @@ def sync(
ending_before=ending_before,
offset=offset,
search=search,
include=include,

).parsed

Expand All @@ -202,6 +225,7 @@ async def asyncio_detailed(
ending_before: str | Unset = UNSET,
offset: int | Unset = 0,
search: str | Unset = UNSET,
include: list[ListProjectsIncludeItem] | Unset = UNSET,

) -> Response[Error | PaginatedProjects]:
""" List all projects for authenticated user
Expand All @@ -212,7 +236,9 @@ async def asyncio_detailed(
`limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded
`offset` past the cursor anchor. Supplying `limit` without `page`
selects cursor mode. `search` applies a case-insensitive project-name
filter in either mode. Sending `page` with `cursor` or `ending_before`,
filter in either mode. `include` optionally expands each returned
project with its Git connection and/or aggregate health summary using
`git_connection` and `health`. Sending `page` with `cursor` or `ending_before`,
or sending both cursor directions, returns 400.

Args:
Expand All @@ -222,6 +248,7 @@ async def asyncio_detailed(
ending_before (str | Unset):
offset (int | Unset): Default: 0.
search (str | Unset):
include (list[ListProjectsIncludeItem] | Unset):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -239,6 +266,7 @@ async def asyncio_detailed(
ending_before=ending_before,
offset=offset,
search=search,
include=include,

)

Expand All @@ -257,6 +285,7 @@ async def asyncio(
ending_before: str | Unset = UNSET,
offset: int | Unset = 0,
search: str | Unset = UNSET,
include: list[ListProjectsIncludeItem] | Unset = UNSET,

) -> Error | PaginatedProjects | None:
""" List all projects for authenticated user
Expand All @@ -267,7 +296,9 @@ async def asyncio(
`limit`, returns `next_cursor`/`prev_cursor`, and supports a bounded
`offset` past the cursor anchor. Supplying `limit` without `page`
selects cursor mode. `search` applies a case-insensitive project-name
filter in either mode. Sending `page` with `cursor` or `ending_before`,
filter in either mode. `include` optionally expands each returned
project with its Git connection and/or aggregate health summary using
`git_connection` and `health`. Sending `page` with `cursor` or `ending_before`,
or sending both cursor directions, returns 400.

Args:
Expand All @@ -277,6 +308,7 @@ async def asyncio(
ending_before (str | Unset):
offset (int | Unset): Default: 0.
search (str | Unset):
include (list[ListProjectsIncludeItem] | Unset):

Raises:
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
Expand All @@ -295,5 +327,6 @@ async def asyncio(
ending_before=ending_before,
offset=offset,
search=search,
include=include,

)).parsed
6 changes: 6 additions & 0 deletions src/volcano_sdk/_generated/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
from .list_o_auth_configs_response_200 import ListOAuthConfigsResponse200
from .list_postgres_versions_response_200_item import ListPostgresVersionsResponse200Item
from .list_project_deployments_resource_type import ListProjectDeploymentsResourceType
from .list_projects_include_item import ListProjectsIncludeItem
from .list_storage_objects_admin_response_200 import ListStorageObjectsAdminResponse200
from .list_user_sessions_response_200 import ListUserSessionsResponse200
from .list_user_sessions_sort import ListUserSessionsSort
Expand Down Expand Up @@ -381,6 +382,7 @@
from .project_frontend_custom_domain import ProjectFrontendCustomDomain
from .project_frontend_custom_domain_frontend import ProjectFrontendCustomDomainFrontend
from .project_git_connection import ProjectGitConnection
from .project_git_connection_summary import ProjectGitConnectionSummary
from .project_git_deploy_settings import ProjectGitDeploySettings
from .project_health_category import ProjectHealthCategory
from .project_health_check import ProjectHealthCheck
Expand All @@ -391,6 +393,7 @@
from .project_health_response import ProjectHealthResponse
from .project_health_scope import ProjectHealthScope
from .project_health_status import ProjectHealthStatus
from .project_health_summary import ProjectHealthSummary
from .project_import_action import ProjectImportAction
from .project_import_action_code import ProjectImportActionCode
from .project_import_destination import ProjectImportDestination
Expand Down Expand Up @@ -767,6 +770,7 @@
"ListOAuthConfigsResponse200",
"ListPostgresVersionsResponse200Item",
"ListProjectDeploymentsResourceType",
"ListProjectsIncludeItem",
"ListStorageObjectsAdminResponse200",
"ListUserSessionsResponse200",
"ListUserSessionsSort",
Expand Down Expand Up @@ -879,6 +883,7 @@
"ProjectFrontendCustomDomain",
"ProjectFrontendCustomDomainFrontend",
"ProjectGitConnection",
"ProjectGitConnectionSummary",
"ProjectGitDeploySettings",
"ProjectHealthCategory",
"ProjectHealthCheck",
Expand All @@ -889,6 +894,7 @@
"ProjectHealthResponse",
"ProjectHealthScope",
"ProjectHealthStatus",
"ProjectHealthSummary",
"ProjectImportAction",
"ProjectImportActionCode",
"ProjectImportDestination",
Expand Down
10 changes: 10 additions & 0 deletions src/volcano_sdk/_generated/models/list_projects_include_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from typing import Literal

ListProjectsIncludeItem = Literal['git_connection', 'health']

LIST_PROJECTS_INCLUDE_ITEM_VALUES: set[ListProjectsIncludeItem] = { 'git_connection', 'health', }

def check_list_projects_include_item(value: str) -> ListProjectsIncludeItem:
if value in LIST_PROJECTS_INCLUDE_ITEM_VALUES:
return value
raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_PROJECTS_INCLUDE_ITEM_VALUES!r}")
Loading
Loading