diff --git a/scripts/generate_sdk.sh b/scripts/generate_sdk.sh index b357273..640ff9e 100755 --- a/scripts/generate_sdk.sh +++ b/scripts/generate_sdk.sh @@ -94,7 +94,6 @@ cat > "$TMP_DIR/config.manual.json" <<'EOF' } EOF -find "$OUTPUT_DIR" -mindepth 1 -maxdepth 1 -exec rm -rf {} + 2>/dev/null || true find "$GENERATOR_OUTPUT_DIR" -mindepth 1 -maxdepth 1 -exec rm -rf {} + 2>/dev/null || true docker pull "$GENERATOR_IMAGE" >/dev/null @@ -102,8 +101,9 @@ docker run --rm \ -v "$TMP_DIR:/workspace" \ -v "$GENERATOR_OUTPUT_DIR:/fern/output" \ "$GENERATOR_IMAGE" \ - /workspace/config.manual.json >/dev/null + /workspace/config.manual.json +find "$OUTPUT_DIR" -mindepth 1 -maxdepth 1 -exec rm -rf {} + 2>/dev/null || true cp -R "$GENERATOR_OUTPUT_DIR"/. "$OUTPUT_DIR"/ touch "$OUTPUT_DIR/py.typed" python3 -m compileall "$OUTPUT_DIR" >/dev/null diff --git a/src/sanka_sdk/__init__.py b/src/sanka_sdk/__init__.py index 3f0e2d9..9932d95 100644 --- a/src/sanka_sdk/__init__.py +++ b/src/sanka_sdk/__init__.py @@ -24,6 +24,7 @@ expenses, exports, ferry_diagrams, + ferry_programs, files, imports, incentives, @@ -76,6 +77,7 @@ "expenses": ".expenses", "exports": ".exports", "ferry_diagrams": ".ferry_diagrams", + "ferry_programs": ".ferry_programs", "files": ".files", "imports": ".imports", "incentives": ".incentives", @@ -150,6 +152,7 @@ def __dir__(): "expenses", "exports", "ferry_diagrams", + "ferry_programs", "files", "imports", "incentives", diff --git a/src/sanka_sdk/client.py b/src/sanka_sdk/client.py index d112d9e..3da9fb5 100644 --- a/src/sanka_sdk/client.py +++ b/src/sanka_sdk/client.py @@ -26,6 +26,7 @@ from .expenses.client import AsyncExpensesClient, ExpensesClient from .exports.client import AsyncExportsClient, ExportsClient from .ferry_diagrams.client import AsyncFerryDiagramsClient, FerryDiagramsClient + from .ferry_programs.client import AsyncFerryProgramsClient, FerryProgramsClient from .files.client import AsyncFilesClient, FilesClient from .imports.client import AsyncImportsClient, ImportsClient from .incentives.client import AsyncIncentivesClient, IncentivesClient @@ -174,6 +175,7 @@ def __init__( self._workflows: typing.Optional[WorkflowsClient] = None self._workflow_runs: typing.Optional[WorkflowRunsClient] = None self._ferry_diagrams: typing.Optional[FerryDiagramsClient] = None + self._ferry_programs: typing.Optional[FerryProgramsClient] = None @property def absences(self): @@ -551,6 +553,14 @@ def ferry_diagrams(self): self._ferry_diagrams = FerryDiagramsClient(client_wrapper=self._client_wrapper) return self._ferry_diagrams + @property + def ferry_programs(self): + if self._ferry_programs is None: + from .ferry_programs.client import FerryProgramsClient # noqa: E402 + + self._ferry_programs = FerryProgramsClient(client_wrapper=self._client_wrapper) + return self._ferry_programs + class AsyncSankaClient: """ @@ -668,6 +678,7 @@ def __init__( self._workflows: typing.Optional[AsyncWorkflowsClient] = None self._workflow_runs: typing.Optional[AsyncWorkflowRunsClient] = None self._ferry_diagrams: typing.Optional[AsyncFerryDiagramsClient] = None + self._ferry_programs: typing.Optional[AsyncFerryProgramsClient] = None @property def absences(self): @@ -1045,6 +1056,14 @@ def ferry_diagrams(self): self._ferry_diagrams = AsyncFerryDiagramsClient(client_wrapper=self._client_wrapper) return self._ferry_diagrams + @property + def ferry_programs(self): + if self._ferry_programs is None: + from .ferry_programs.client import AsyncFerryProgramsClient # noqa: E402 + + self._ferry_programs = AsyncFerryProgramsClient(client_wrapper=self._client_wrapper) + return self._ferry_programs + def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SankaClientEnvironment) -> str: if base_url is not None: diff --git a/src/sanka_sdk/ferry_programs/__init__.py b/src/sanka_sdk/ferry_programs/__init__.py new file mode 100644 index 0000000..5cde020 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/sanka_sdk/ferry_programs/client.py b/src/sanka_sdk/ferry_programs/client.py new file mode 100644 index 0000000..b2dc884 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/client.py @@ -0,0 +1,1145 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.batch_upsert_public_ferry_program_todos_api_v_2_public_ferry_programs_program_id_todos_batch_upsert_post_200_envelope import ( + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, +) +from ..types.create_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_post_200_envelope import ( + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, +) +from ..types.create_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_post_200_envelope import ( + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, +) +from ..types.delete_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_delete_200_envelope import ( + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, +) +from ..types.ferry_program_todo_batch_upsert_item import FerryProgramTodoBatchUpsertItem +from ..types.get_public_ferry_program_api_v_2_public_ferry_programs_program_id_get_200_envelope import ( + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, +) +from ..types.list_public_ferry_program_meetings_api_v_2_public_ferry_programs_program_id_meetings_get_200_envelope import ( + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, +) +from ..types.list_public_ferry_programs_api_v_2_public_ferry_programs_get_200_envelope import ( + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, +) +from ..types.update_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_meeting_id_patch_200_envelope import ( + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, +) +from ..types.update_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_patch_200_envelope import ( + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, +) +from .raw_client import AsyncRawFerryProgramsClient, RawFerryProgramsClient +from .types.ferry_program_todo_create_request_priority import FerryProgramTodoCreateRequestPriority +from .types.ferry_program_todo_create_request_status import FerryProgramTodoCreateRequestStatus +from .types.ferry_program_todo_update_request_priority import FerryProgramTodoUpdateRequestPriority +from .types.ferry_program_todo_update_request_status import FerryProgramTodoUpdateRequestStatus + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class FerryProgramsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawFerryProgramsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawFerryProgramsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawFerryProgramsClient + """ + return self._raw_client + + def list_public_ferry_programs_api( + self, *, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope: + """ + Parameters + ---------- + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.list_public_ferry_programs_api() + """ + _response = self._raw_client.list_public_ferry_programs_api( + workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def get_public_ferry_program_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.get_public_ferry_program_api( + program_id="program_id", + ) + """ + _response = self._raw_client.get_public_ferry_program_api( + program_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def list_public_ferry_program_meetings_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.list_public_ferry_program_meetings_api( + program_id="program_id", + ) + """ + _response = self._raw_client.list_public_ferry_program_meetings_api( + program_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def create_public_ferry_program_meeting_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.create_public_ferry_program_meeting_api( + program_id="program_id", + title="title", + ) + """ + _response = self._raw_client.create_public_ferry_program_meeting_api( + program_id, + title=title, + workspace_id=workspace_id, + meeting_at=meeting_at, + content_markdown=content_markdown, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data + + def update_public_ferry_program_meeting_api( + self, + program_id: str, + meeting_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope: + """ + Parameters + ---------- + program_id : str + + meeting_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.update_public_ferry_program_meeting_api( + program_id="program_id", + meeting_id="meeting_id", + ) + """ + _response = self._raw_client.update_public_ferry_program_meeting_api( + program_id, + meeting_id, + workspace_id=workspace_id, + title=title, + meeting_at=meeting_at, + content_markdown=content_markdown, + request_options=request_options, + ) + return _response.data + + def create_public_ferry_program_todo_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoCreateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoCreateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoCreateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoCreateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.create_public_ferry_program_todo_api( + program_id="program_id", + title="title", + ) + """ + _response = self._raw_client.create_public_ferry_program_todo_api( + program_id, + title=title, + workspace_id=workspace_id, + title_ja=title_ja, + description=description, + description_ja=description_ja, + category=category, + required=required, + status=status, + notes=notes, + start_date=start_date, + due_date=due_date, + priority=priority, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data + + def batch_upsert_public_ferry_program_todos_api( + self, + program_id: str, + *, + todos: typing.Sequence[FerryProgramTodoBatchUpsertItem], + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope: + """ + Parameters + ---------- + program_id : str + + todos : typing.Sequence[FerryProgramTodoBatchUpsertItem] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import FerryProgramTodoBatchUpsertItem, SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.batch_upsert_public_ferry_program_todos_api( + program_id="program_id", + todos=[ + FerryProgramTodoBatchUpsertItem( + title="title", + ) + ], + ) + """ + _response = self._raw_client.batch_upsert_public_ferry_program_todos_api( + program_id, todos=todos, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def delete_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.delete_public_ferry_program_todo_api( + program_id="program_id", + todo_id="todo_id", + ) + """ + _response = self._raw_client.delete_public_ferry_program_todo_api( + program_id, todo_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def update_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoUpdateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoUpdateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoUpdateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoUpdateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.ferry_programs.update_public_ferry_program_todo_api( + program_id="program_id", + todo_id="todo_id", + ) + """ + _response = self._raw_client.update_public_ferry_program_todo_api( + program_id, + todo_id, + workspace_id=workspace_id, + title=title, + title_ja=title_ja, + description=description, + description_ja=description_ja, + category=category, + required=required, + status=status, + notes=notes, + start_date=start_date, + due_date=due_date, + priority=priority, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data + + +class AsyncFerryProgramsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawFerryProgramsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawFerryProgramsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawFerryProgramsClient + """ + return self._raw_client + + async def list_public_ferry_programs_api( + self, *, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope: + """ + Parameters + ---------- + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.list_public_ferry_programs_api() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_public_ferry_programs_api( + workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def get_public_ferry_program_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.get_public_ferry_program_api( + program_id="program_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.get_public_ferry_program_api( + program_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def list_public_ferry_program_meetings_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.list_public_ferry_program_meetings_api( + program_id="program_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_public_ferry_program_meetings_api( + program_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def create_public_ferry_program_meeting_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.create_public_ferry_program_meeting_api( + program_id="program_id", + title="title", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create_public_ferry_program_meeting_api( + program_id, + title=title, + workspace_id=workspace_id, + meeting_at=meeting_at, + content_markdown=content_markdown, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data + + async def update_public_ferry_program_meeting_api( + self, + program_id: str, + meeting_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope: + """ + Parameters + ---------- + program_id : str + + meeting_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.update_public_ferry_program_meeting_api( + program_id="program_id", + meeting_id="meeting_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update_public_ferry_program_meeting_api( + program_id, + meeting_id, + workspace_id=workspace_id, + title=title, + meeting_at=meeting_at, + content_markdown=content_markdown, + request_options=request_options, + ) + return _response.data + + async def create_public_ferry_program_todo_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoCreateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoCreateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoCreateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoCreateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.create_public_ferry_program_todo_api( + program_id="program_id", + title="title", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create_public_ferry_program_todo_api( + program_id, + title=title, + workspace_id=workspace_id, + title_ja=title_ja, + description=description, + description_ja=description_ja, + category=category, + required=required, + status=status, + notes=notes, + start_date=start_date, + due_date=due_date, + priority=priority, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data + + async def batch_upsert_public_ferry_program_todos_api( + self, + program_id: str, + *, + todos: typing.Sequence[FerryProgramTodoBatchUpsertItem], + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope: + """ + Parameters + ---------- + program_id : str + + todos : typing.Sequence[FerryProgramTodoBatchUpsertItem] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient, FerryProgramTodoBatchUpsertItem + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.batch_upsert_public_ferry_program_todos_api( + program_id="program_id", + todos=[ + FerryProgramTodoBatchUpsertItem( + title="title", + ) + ], + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.batch_upsert_public_ferry_program_todos_api( + program_id, todos=todos, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def delete_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.delete_public_ferry_program_todo_api( + program_id="program_id", + todo_id="todo_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete_public_ferry_program_todo_api( + program_id, todo_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def update_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoUpdateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoUpdateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoUpdateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoUpdateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope + Successful Response + + Examples + -------- + import asyncio + + from sanka_sdk import AsyncSankaClient + + client = AsyncSankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.ferry_programs.update_public_ferry_program_todo_api( + program_id="program_id", + todo_id="todo_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update_public_ferry_program_todo_api( + program_id, + todo_id, + workspace_id=workspace_id, + title=title, + title_ja=title_ja, + description=description, + description_ja=description_ja, + category=category, + required=required, + status=status, + notes=notes, + start_date=start_date, + due_date=due_date, + priority=priority, + source_ref=source_ref, + request_options=request_options, + ) + return _response.data diff --git a/src/sanka_sdk/ferry_programs/raw_client.py b/src/sanka_sdk/ferry_programs/raw_client.py new file mode 100644 index 0000000..57ad9a3 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/raw_client.py @@ -0,0 +1,1800 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import jsonable_encoder +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..core.unchecked_base_model import construct_type +from ..errors.forbidden_error import ForbiddenError +from ..errors.unauthorized_error import UnauthorizedError +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.batch_upsert_public_ferry_program_todos_api_v_2_public_ferry_programs_program_id_todos_batch_upsert_post_200_envelope import ( + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, +) +from ..types.create_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_post_200_envelope import ( + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, +) +from ..types.create_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_post_200_envelope import ( + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, +) +from ..types.delete_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_delete_200_envelope import ( + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, +) +from ..types.error_envelope import ErrorEnvelope +from ..types.ferry_program_todo_batch_upsert_item import FerryProgramTodoBatchUpsertItem +from ..types.get_public_ferry_program_api_v_2_public_ferry_programs_program_id_get_200_envelope import ( + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, +) +from ..types.list_public_ferry_program_meetings_api_v_2_public_ferry_programs_program_id_meetings_get_200_envelope import ( + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, +) +from ..types.list_public_ferry_programs_api_v_2_public_ferry_programs_get_200_envelope import ( + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, +) +from ..types.update_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_meeting_id_patch_200_envelope import ( + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, +) +from ..types.update_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_patch_200_envelope import ( + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, +) +from .types.ferry_program_todo_create_request_priority import FerryProgramTodoCreateRequestPriority +from .types.ferry_program_todo_create_request_status import FerryProgramTodoCreateRequestStatus +from .types.ferry_program_todo_update_request_priority import FerryProgramTodoUpdateRequestPriority +from .types.ferry_program_todo_update_request_status import FerryProgramTodoUpdateRequestStatus + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawFerryProgramsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list_public_ferry_programs_api( + self, *, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope]: + """ + Parameters + ---------- + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v2/public/ferry/programs", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, + construct_type( + type_=ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def get_public_ferry_program_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope]: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, + construct_type( + type_=GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def list_public_ferry_program_meetings_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope]: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, + construct_type( + type_=ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_public_ferry_program_meeting_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope]: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "meetingAt": meeting_at, + "contentMarkdown": content_markdown, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, + construct_type( + type_=CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update_public_ferry_program_meeting_api( + self, + program_id: str, + meeting_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope + ]: + """ + Parameters + ---------- + program_id : str + + meeting_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings/{jsonable_encoder(meeting_id)}", + method="PATCH", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "meetingAt": meeting_at, + "contentMarkdown": content_markdown, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, + construct_type( + type_=UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create_public_ferry_program_todo_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoCreateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoCreateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope]: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoCreateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoCreateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "titleJa": title_ja, + "description": description, + "descriptionJa": description_ja, + "category": category, + "required": required, + "status": status, + "notes": notes, + "startDate": start_date, + "dueDate": due_date, + "priority": priority, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, + construct_type( + type_=CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def batch_upsert_public_ferry_program_todos_api( + self, + program_id: str, + *, + todos: typing.Sequence[FerryProgramTodoBatchUpsertItem], + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope + ]: + """ + Parameters + ---------- + program_id : str + + todos : typing.Sequence[FerryProgramTodoBatchUpsertItem] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/batch-upsert", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "todos": convert_and_respect_annotation_metadata( + object_=todos, annotation=typing.Sequence[FerryProgramTodoBatchUpsertItem], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, + construct_type( + type_=BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope]: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/{jsonable_encoder(todo_id)}", + method="DELETE", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, + construct_type( + type_=DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoUpdateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoUpdateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope]: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoUpdateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoUpdateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/{jsonable_encoder(todo_id)}", + method="PATCH", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "titleJa": title_ja, + "description": description, + "descriptionJa": description_ja, + "category": category, + "required": required, + "status": status, + "notes": notes, + "startDate": start_date, + "dueDate": due_date, + "priority": priority, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, + construct_type( + type_=UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawFerryProgramsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list_public_ferry_programs_api( + self, *, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope]: + """ + Parameters + ---------- + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v2/public/ferry/programs", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, + construct_type( + type_=ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def get_public_ferry_program_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope]: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, + construct_type( + type_=GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def list_public_ferry_program_meetings_api( + self, + program_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope]: + """ + Parameters + ---------- + program_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings", + method="GET", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, + construct_type( + type_=ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_public_ferry_program_meeting_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope]: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "meetingAt": meeting_at, + "contentMarkdown": content_markdown, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, + construct_type( + type_=CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update_public_ferry_program_meeting_api( + self, + program_id: str, + meeting_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + meeting_at: typing.Optional[dt.datetime] = OMIT, + content_markdown: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope + ]: + """ + Parameters + ---------- + program_id : str + + meeting_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + meeting_at : typing.Optional[dt.datetime] + + content_markdown : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/meetings/{jsonable_encoder(meeting_id)}", + method="PATCH", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "meetingAt": meeting_at, + "contentMarkdown": content_markdown, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, + construct_type( + type_=UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create_public_ferry_program_todo_api( + self, + program_id: str, + *, + title: str, + workspace_id: typing.Optional[str] = None, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoCreateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoCreateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope]: + """ + Parameters + ---------- + program_id : str + + title : str + + workspace_id : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoCreateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoCreateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "titleJa": title_ja, + "description": description, + "descriptionJa": description_ja, + "category": category, + "required": required, + "status": status, + "notes": notes, + "startDate": start_date, + "dueDate": due_date, + "priority": priority, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, + construct_type( + type_=CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def batch_upsert_public_ferry_program_todos_api( + self, + program_id: str, + *, + todos: typing.Sequence[FerryProgramTodoBatchUpsertItem], + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope + ]: + """ + Parameters + ---------- + program_id : str + + todos : typing.Sequence[FerryProgramTodoBatchUpsertItem] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/batch-upsert", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "todos": convert_and_respect_annotation_metadata( + object_=todos, annotation=typing.Sequence[FerryProgramTodoBatchUpsertItem], direction="write" + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, + construct_type( + type_=BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope]: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/{jsonable_encoder(todo_id)}", + method="DELETE", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, + construct_type( + type_=DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update_public_ferry_program_todo_api( + self, + program_id: str, + todo_id: str, + *, + workspace_id: typing.Optional[str] = None, + title: typing.Optional[str] = OMIT, + title_ja: typing.Optional[str] = OMIT, + description: typing.Optional[str] = OMIT, + description_ja: typing.Optional[str] = OMIT, + category: typing.Optional[str] = OMIT, + required: typing.Optional[bool] = OMIT, + status: typing.Optional[FerryProgramTodoUpdateRequestStatus] = OMIT, + notes: typing.Optional[str] = OMIT, + start_date: typing.Optional[str] = OMIT, + due_date: typing.Optional[str] = OMIT, + priority: typing.Optional[FerryProgramTodoUpdateRequestPriority] = OMIT, + source_ref: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope]: + """ + Parameters + ---------- + program_id : str + + todo_id : str + + workspace_id : typing.Optional[str] + + title : typing.Optional[str] + + title_ja : typing.Optional[str] + + description : typing.Optional[str] + + description_ja : typing.Optional[str] + + category : typing.Optional[str] + + required : typing.Optional[bool] + + status : typing.Optional[FerryProgramTodoUpdateRequestStatus] + + notes : typing.Optional[str] + + start_date : typing.Optional[str] + + due_date : typing.Optional[str] + + priority : typing.Optional[FerryProgramTodoUpdateRequestPriority] + + source_ref : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/public/ferry/programs/{jsonable_encoder(program_id)}/todos/{jsonable_encoder(todo_id)}", + method="PATCH", + params={ + "workspace_id": workspace_id, + }, + json={ + "title": title, + "titleJa": title_ja, + "description": description, + "descriptionJa": description_ja, + "category": category, + "required": required, + "status": status, + "notes": notes, + "startDate": start_date, + "dueDate": due_date, + "priority": priority, + "sourceRef": source_ref, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, + construct_type( + type_=UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 422: + raise UnprocessableEntityError( + headers=dict(_response.headers), + body=typing.cast( + ErrorEnvelope, + construct_type( + type_=ErrorEnvelope, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/sanka_sdk/ferry_programs/types/__init__.py b/src/sanka_sdk/ferry_programs/types/__init__.py new file mode 100644 index 0000000..5cde020 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/types/__init__.py @@ -0,0 +1,4 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + diff --git a/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_priority.py b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_priority.py new file mode 100644 index 0000000..4507313 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_priority.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoCreateRequestPriority = typing.Union[typing.Literal["P0", "P1", "P2", "P3", "P4"], typing.Any] diff --git a/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_status.py b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_status.py new file mode 100644 index 0000000..4ad92f6 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_create_request_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoCreateRequestStatus = typing.Union[ + typing.Literal["not_started", "in_progress", "completed", "blocked"], typing.Any +] diff --git a/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_priority.py b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_priority.py new file mode 100644 index 0000000..df170a7 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_priority.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoUpdateRequestPriority = typing.Union[typing.Literal["P0", "P1", "P2", "P3", "P4"], typing.Any] diff --git a/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_status.py b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_status.py new file mode 100644 index 0000000..b6f09d2 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/types/ferry_program_todo_update_request_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoUpdateRequestStatus = typing.Union[ + typing.Literal["not_started", "in_progress", "completed", "blocked"], typing.Any +] diff --git a/src/sanka_sdk/types/batch_upsert_public_ferry_program_todos_api_v_2_public_ferry_programs_program_id_todos_batch_upsert_post_200_envelope.py b/src/sanka_sdk/types/batch_upsert_public_ferry_program_todos_api_v_2_public_ferry_programs_program_id_todos_batch_upsert_post_200_envelope.py new file mode 100644 index 0000000..42dc89a --- /dev/null +++ b/src/sanka_sdk/types/batch_upsert_public_ferry_program_todos_api_v_2_public_ferry_programs_program_id_todos_batch_upsert_post_200_envelope.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_todo_batch_upsert_data import FerryProgramTodoBatchUpsertData + + +class BatchUpsertPublicFerryProgramTodosApiV2PublicFerryProgramsProgramIdTodosBatchUpsertPost200Envelope( + UncheckedBaseModel +): + success: typing.Literal[True] = True + data: FerryProgramTodoBatchUpsertData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/create_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_post_200_envelope.py b/src/sanka_sdk/types/create_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_post_200_envelope.py new file mode 100644 index 0000000..80ca1b3 --- /dev/null +++ b/src/sanka_sdk/types/create_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_post_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_meeting_data import FerryProgramMeetingData + + +class CreatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramMeetingData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/create_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_post_200_envelope.py b/src/sanka_sdk/types/create_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_post_200_envelope.py new file mode 100644 index 0000000..5e56e89 --- /dev/null +++ b/src/sanka_sdk/types/create_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_post_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_data import FerryProgramData + + +class CreatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/delete_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_delete_200_envelope.py b/src/sanka_sdk/types/delete_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_delete_200_envelope.py new file mode 100644 index 0000000..c81553b --- /dev/null +++ b/src/sanka_sdk/types/delete_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_delete_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_data import FerryProgramData + + +class DeletePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdDelete200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_data.py b/src/sanka_sdk/types/ferry_program_data.py new file mode 100644 index 0000000..ede4d99 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_data_billing_currency import FerryProgramDataBillingCurrency +from .ferry_program_data_created_at import FerryProgramDataCreatedAt +from .ferry_program_data_payment_state import FerryProgramDataPaymentState +from .ferry_program_data_plan import FerryProgramDataPlan +from .ferry_program_data_status import FerryProgramDataStatus +from .ferry_program_data_updated_at import FerryProgramDataUpdatedAt +from .ferry_program_endpoint import FerryProgramEndpoint +from .ferry_program_todo import FerryProgramTodo + + +class FerryProgramData(UncheckedBaseModel): + id: str + workspace_id: typing_extensions.Annotated[str, FieldMetadata(alias="workspaceId")] + template_slug: typing_extensions.Annotated[str, FieldMetadata(alias="templateSlug")] + status: FerryProgramDataStatus + plan: typing.Optional[FerryProgramDataPlan] = None + plan_change_locked: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="planChangeLocked")] = ( + None + ) + payment_state: typing_extensions.Annotated[ + typing.Optional[FerryProgramDataPaymentState], FieldMetadata(alias="paymentState") + ] = None + billing_currency: typing_extensions.Annotated[ + typing.Optional[FerryProgramDataBillingCurrency], FieldMetadata(alias="billingCurrency") + ] = None + record_count: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="recordCount")] = None + list_price: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="listPrice")] = None + quoted_price: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="quotedPrice")] = None + fee_waived: typing_extensions.Annotated[typing.Optional[bool], FieldMetadata(alias="feeWaived")] = None + fee_waiver_reason: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="feeWaiverReason")] = None + expert_user_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="expertUserId")] = None + expert_review_thread_id: typing_extensions.Annotated[ + typing.Optional[str], FieldMetadata(alias="expertReviewThreadId") + ] = None + expert_settings: typing_extensions.Annotated[ + typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="expertSettings") + ] = None + entitlements: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + name: str + description: typing.Optional[str] = None + updates_markdown: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="updatesMarkdown")] = None + sources: typing.Optional[typing.List[FerryProgramEndpoint]] = None + destinations: typing.Optional[typing.List[FerryProgramEndpoint]] = None + todos: typing.Optional[typing.List[FerryProgramTodo]] = None + linked_run_ids: typing_extensions.Annotated[ + typing.Optional[typing.List[str]], FieldMetadata(alias="linkedRunIds") + ] = None + created_by_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="createdById")] = None + updated_by_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="updatedById")] = None + created_at: typing_extensions.Annotated[ + typing.Optional[FerryProgramDataCreatedAt], FieldMetadata(alias="createdAt") + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[FerryProgramDataUpdatedAt], FieldMetadata(alias="updatedAt") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_data_billing_currency.py b/src/sanka_sdk/types/ferry_program_data_billing_currency.py new file mode 100644 index 0000000..a0c762c --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_billing_currency.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramDataBillingCurrency = typing.Union[typing.Literal["jpy", "usd"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_data_created_at.py b/src/sanka_sdk/types/ferry_program_data_created_at.py new file mode 100644 index 0000000..c23bfed --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_created_at.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +FerryProgramDataCreatedAt = typing.Union[dt.datetime, str] diff --git a/src/sanka_sdk/types/ferry_program_data_payment_state.py b/src/sanka_sdk/types/ferry_program_data_payment_state.py new file mode 100644 index 0000000..458cac8 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_payment_state.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramDataPaymentState = typing.Union[typing.Literal["draft", "awaiting_payment", "active"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_data_plan.py b/src/sanka_sdk/types/ferry_program_data_plan.py new file mode 100644 index 0000000..2967d57 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_plan.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramDataPlan = typing.Union[typing.Literal["self_serve", "sakura_led", "expert_led"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_data_status.py b/src/sanka_sdk/types/ferry_program_data_status.py new file mode 100644 index 0000000..47f134a --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramDataStatus = typing.Union[typing.Literal["draft", "active", "ready", "completed", "archived"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_data_updated_at.py b/src/sanka_sdk/types/ferry_program_data_updated_at.py new file mode 100644 index 0000000..04ef83e --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data_updated_at.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +FerryProgramDataUpdatedAt = typing.Union[dt.datetime, str] diff --git a/src/sanka_sdk/types/ferry_program_endpoint.py b/src/sanka_sdk/types/ferry_program_endpoint.py new file mode 100644 index 0000000..80b6ae4 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_endpoint.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_endpoint_role import FerryProgramEndpointRole + + +class FerryProgramEndpoint(UncheckedBaseModel): + id: str + kind: str + label: str + label_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="labelJa")] = None + role: FerryProgramEndpointRole + integration_slug: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="integrationSlug")] = None + channel_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="channelId")] = None + source_type: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceType")] = None + object_types: typing_extensions.Annotated[typing.Optional[typing.List[str]], FieldMetadata(alias="objectTypes")] = ( + None + ) + metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_endpoint_role.py b/src/sanka_sdk/types/ferry_program_endpoint_role.py new file mode 100644 index 0000000..d053bd3 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_endpoint_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramEndpointRole = typing.Union[typing.Literal["source", "destination"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_list_data.py b/src/sanka_sdk/types/ferry_program_list_data.py new file mode 100644 index 0000000..ce08217 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_list_data.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_data import FerryProgramData + + +class FerryProgramListData(UncheckedBaseModel): + programs: typing.List[FerryProgramData] + count: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_meeting_data.py b/src/sanka_sdk/types/ferry_program_meeting_data.py new file mode 100644 index 0000000..b70c9eb --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_meeting_data.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_meeting_data_created_at import FerryProgramMeetingDataCreatedAt +from .ferry_program_meeting_data_meeting_at import FerryProgramMeetingDataMeetingAt +from .ferry_program_meeting_data_updated_at import FerryProgramMeetingDataUpdatedAt + + +class FerryProgramMeetingData(UncheckedBaseModel): + id: str + program_id: typing_extensions.Annotated[str, FieldMetadata(alias="programId")] + workspace_id: typing_extensions.Annotated[str, FieldMetadata(alias="workspaceId")] + title: str + meeting_at: typing_extensions.Annotated[ + typing.Optional[FerryProgramMeetingDataMeetingAt], FieldMetadata(alias="meetingAt") + ] = None + content_markdown: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="contentMarkdown")] = None + source_ref: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceRef")] = None + created_by_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="createdById")] = None + updated_by_id: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="updatedById")] = None + created_at: typing_extensions.Annotated[ + typing.Optional[FerryProgramMeetingDataCreatedAt], FieldMetadata(alias="createdAt") + ] = None + updated_at: typing_extensions.Annotated[ + typing.Optional[FerryProgramMeetingDataUpdatedAt], FieldMetadata(alias="updatedAt") + ] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_meeting_data_created_at.py b/src/sanka_sdk/types/ferry_program_meeting_data_created_at.py new file mode 100644 index 0000000..b6e2333 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_meeting_data_created_at.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +FerryProgramMeetingDataCreatedAt = typing.Union[dt.datetime, str] diff --git a/src/sanka_sdk/types/ferry_program_meeting_data_meeting_at.py b/src/sanka_sdk/types/ferry_program_meeting_data_meeting_at.py new file mode 100644 index 0000000..8e97763 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_meeting_data_meeting_at.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +FerryProgramMeetingDataMeetingAt = typing.Union[dt.datetime, str] diff --git a/src/sanka_sdk/types/ferry_program_meeting_data_updated_at.py b/src/sanka_sdk/types/ferry_program_meeting_data_updated_at.py new file mode 100644 index 0000000..fc1c3ba --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_meeting_data_updated_at.py @@ -0,0 +1,6 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +FerryProgramMeetingDataUpdatedAt = typing.Union[dt.datetime, str] diff --git a/src/sanka_sdk/types/ferry_program_meeting_list_data.py b/src/sanka_sdk/types/ferry_program_meeting_list_data.py new file mode 100644 index 0000000..257b411 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_meeting_list_data.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_meeting_data import FerryProgramMeetingData + + +class FerryProgramMeetingListData(UncheckedBaseModel): + meetings: typing.List[FerryProgramMeetingData] + count: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_todo.py b/src/sanka_sdk/types/ferry_program_todo.py new file mode 100644 index 0000000..25b2943 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_todo_priority import FerryProgramTodoPriority +from .ferry_program_todo_status import FerryProgramTodoStatus + + +class FerryProgramTodo(UncheckedBaseModel): + id: str + title: str + title_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="titleJa")] = None + description: typing.Optional[str] = None + description_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="descriptionJa")] = None + category: typing.Optional[str] = None + required: typing.Optional[bool] = None + status: typing.Optional[FerryProgramTodoStatus] = None + notes: typing.Optional[str] = None + start_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="startDate")] = None + due_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dueDate")] = None + priority: typing.Optional[FerryProgramTodoPriority] = None + source_ref: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceRef")] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_todo_batch_upsert_data.py b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_data.py new file mode 100644 index 0000000..4de382a --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_data.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_data import FerryProgramData + + +class FerryProgramTodoBatchUpsertData(UncheckedBaseModel): + program: FerryProgramData + created_count: typing_extensions.Annotated[int, FieldMetadata(alias="createdCount")] + updated_count: typing_extensions.Annotated[int, FieldMetadata(alias="updatedCount")] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item.py b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item.py new file mode 100644 index 0000000..89439a4 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +import typing_extensions +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.serialization import FieldMetadata +from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_todo_batch_upsert_item_priority import FerryProgramTodoBatchUpsertItemPriority +from .ferry_program_todo_batch_upsert_item_status import FerryProgramTodoBatchUpsertItemStatus + + +class FerryProgramTodoBatchUpsertItem(UncheckedBaseModel): + title: str + title_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="titleJa")] = None + description: typing.Optional[str] = None + description_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="descriptionJa")] = None + category: typing.Optional[str] = None + required: typing.Optional[bool] = None + status: typing.Optional[FerryProgramTodoBatchUpsertItemStatus] = None + notes: typing.Optional[str] = None + start_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="startDate")] = None + due_date: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="dueDate")] = None + priority: typing.Optional[FerryProgramTodoBatchUpsertItemPriority] = None + source_ref: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="sourceRef")] = None + id: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_priority.py b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_priority.py new file mode 100644 index 0000000..4a5db4e --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_priority.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoBatchUpsertItemPriority = typing.Union[typing.Literal["P0", "P1", "P2", "P3", "P4"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_status.py b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_status.py new file mode 100644 index 0000000..a0bb2e3 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item_status.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoBatchUpsertItemStatus = typing.Union[ + typing.Literal["not_started", "in_progress", "completed", "blocked"], typing.Any +] diff --git a/src/sanka_sdk/types/ferry_program_todo_priority.py b/src/sanka_sdk/types/ferry_program_todo_priority.py new file mode 100644 index 0000000..e5cda53 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_priority.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoPriority = typing.Union[typing.Literal["P0", "P1", "P2", "P3", "P4"], typing.Any] diff --git a/src/sanka_sdk/types/ferry_program_todo_status.py b/src/sanka_sdk/types/ferry_program_todo_status.py new file mode 100644 index 0000000..591b123 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +FerryProgramTodoStatus = typing.Union[typing.Literal["not_started", "in_progress", "completed", "blocked"], typing.Any] diff --git a/src/sanka_sdk/types/get_public_ferry_program_api_v_2_public_ferry_programs_program_id_get_200_envelope.py b/src/sanka_sdk/types/get_public_ferry_program_api_v_2_public_ferry_programs_program_id_get_200_envelope.py new file mode 100644 index 0000000..ae1beba --- /dev/null +++ b/src/sanka_sdk/types/get_public_ferry_program_api_v_2_public_ferry_programs_program_id_get_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_data import FerryProgramData + + +class GetPublicFerryProgramApiV2PublicFerryProgramsProgramIdGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/list_public_ferry_program_meetings_api_v_2_public_ferry_programs_program_id_meetings_get_200_envelope.py b/src/sanka_sdk/types/list_public_ferry_program_meetings_api_v_2_public_ferry_programs_program_id_meetings_get_200_envelope.py new file mode 100644 index 0000000..5b291b8 --- /dev/null +++ b/src/sanka_sdk/types/list_public_ferry_program_meetings_api_v_2_public_ferry_programs_program_id_meetings_get_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_meeting_list_data import FerryProgramMeetingListData + + +class ListPublicFerryProgramMeetingsApiV2PublicFerryProgramsProgramIdMeetingsGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramMeetingListData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/list_public_ferry_programs_api_v_2_public_ferry_programs_get_200_envelope.py b/src/sanka_sdk/types/list_public_ferry_programs_api_v_2_public_ferry_programs_get_200_envelope.py new file mode 100644 index 0000000..a5876b2 --- /dev/null +++ b/src/sanka_sdk/types/list_public_ferry_programs_api_v_2_public_ferry_programs_get_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_list_data import FerryProgramListData + + +class ListPublicFerryProgramsApiV2PublicFerryProgramsGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramListData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/update_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_meeting_id_patch_200_envelope.py b/src/sanka_sdk/types/update_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_meeting_id_patch_200_envelope.py new file mode 100644 index 0000000..4a0b0ed --- /dev/null +++ b/src/sanka_sdk/types/update_public_ferry_program_meeting_api_v_2_public_ferry_programs_program_id_meetings_meeting_id_patch_200_envelope.py @@ -0,0 +1,26 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_meeting_data import FerryProgramMeetingData + + +class UpdatePublicFerryProgramMeetingApiV2PublicFerryProgramsProgramIdMeetingsMeetingIdPatch200Envelope( + UncheckedBaseModel +): + success: typing.Literal[True] = True + data: FerryProgramMeetingData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/sanka_sdk/types/update_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_patch_200_envelope.py b/src/sanka_sdk/types/update_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_patch_200_envelope.py new file mode 100644 index 0000000..81aff8f --- /dev/null +++ b/src/sanka_sdk/types/update_public_ferry_program_todo_api_v_2_public_ferry_programs_program_id_todos_todo_id_patch_200_envelope.py @@ -0,0 +1,24 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .envelope_meta import EnvelopeMeta +from .ferry_program_data import FerryProgramData + + +class UpdatePublicFerryProgramTodoApiV2PublicFerryProgramsProgramIdTodosTodoIdPatch200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: FerryProgramData + meta: EnvelopeMeta + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow