Skip to content

Commit

Permalink
Use Literal for graph_mode_update in AddRequestResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
lipoja committed Oct 18, 2023
1 parent ec0a59e commit 3270ff0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions iib/web/iib_static_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from proton._message import Message

IIB_BINARY_IMAGE_CONFIG_TYPE = Dict[str, Dict[str, str]]
GRAPH_MODE_LITERAL = Literal['replaces', 'semver', 'semver-skippatch']


class PaginationMetadata(TypedDict):
Expand Down Expand Up @@ -95,7 +96,7 @@ class AddRequestPayload(TypedDict):
distribution_scope: NotRequired[str]
force_backport: NotRequired[bool]
from_index: NotRequired[str]
graph_update_mode: NotRequired[str]
graph_update_mode: NotRequired[GRAPH_MODE_LITERAL]
organization: NotRequired[str]
overwrite_from_index: NotRequired[bool]
overwrite_from_index_token: NotRequired[str]
Expand Down Expand Up @@ -161,6 +162,7 @@ class MergeIndexImagesPayload(TypedDict):
build_tags: NotRequired[List[str]]
deprecation_list: NotRequired[List[str]]
distribution_scope: NotRequired[str]
graph_update_mode: NotRequired[str]
overwrite_target_index: NotRequired[bool]
overwrite_target_index_token: NotRequired[str]
source_from_index: str
Expand Down Expand Up @@ -350,7 +352,7 @@ class AddRequestResponse(AddRmRequestResponseBase):
"""Datastructure of the response to request from /builds/add API point."""

check_related_images: bool
graph_update_mode: str
graph_update_mode: GRAPH_MODE_LITERAL
omps_operator_version: Dict[str, Any]


Expand Down Expand Up @@ -388,6 +390,7 @@ class MergeIndexImageRequestResponse(APIPartImageBuildRequestResponse):
build_tags: List[str]
deprecation_list: List[str]
distribution_scope: str
graph_update_mode: Literal['replaces', 'semver', 'semver-skippatch']
index_image: Optional[str]
source_from_index: str
source_from_index_resolved: Optional[str]
Expand Down

0 comments on commit 3270ff0

Please sign in to comment.