diff --git a/src/sanka_sdk/__init__.py b/src/sanka_sdk/__init__.py index 3f0e2d9..96d523e 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, @@ -33,6 +34,7 @@ items, journals, locations, + lookout, meters, object_schemas, orders, @@ -46,6 +48,7 @@ reports, revenues, rule_settings, + sanka_buy, subscriptions, tasks, tickets, @@ -76,6 +79,7 @@ "expenses": ".expenses", "exports": ".exports", "ferry_diagrams": ".ferry_diagrams", + "ferry_programs": ".ferry_programs", "files": ".files", "imports": ".imports", "incentives": ".incentives", @@ -85,6 +89,7 @@ "items": ".items", "journals": ".journals", "locations": ".locations", + "lookout": ".lookout", "meters": ".meters", "object_schemas": ".object_schemas", "orders": ".orders", @@ -98,6 +103,7 @@ "reports": ".reports", "revenues": ".revenues", "rule_settings": ".rule_settings", + "sanka_buy": ".sanka_buy", "subscriptions": ".subscriptions", "tasks": ".tasks", "tickets": ".tickets", @@ -150,6 +156,7 @@ def __dir__(): "expenses", "exports", "ferry_diagrams", + "ferry_programs", "files", "imports", "incentives", @@ -159,6 +166,7 @@ def __dir__(): "items", "journals", "locations", + "lookout", "meters", "object_schemas", "orders", @@ -172,6 +180,7 @@ def __dir__(): "reports", "revenues", "rule_settings", + "sanka_buy", "subscriptions", "tasks", "tickets", diff --git a/src/sanka_sdk/absences/client.py b/src/sanka_sdk/absences/client.py index 5819162..1154f32 100644 --- a/src/sanka_sdk/absences/client.py +++ b/src/sanka_sdk/absences/client.py @@ -53,6 +53,7 @@ def list_public_absences_api( view_id: typing.Optional[str] = None, search: typing.Optional[str] = None, language: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -86,6 +87,8 @@ def list_public_absences_api( language : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -134,6 +137,7 @@ def list_public_absences_api( view_id=view_id, search=search, language=language, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -388,6 +392,7 @@ async def list_public_absences_api( view_id: typing.Optional[str] = None, search: typing.Optional[str] = None, language: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -421,6 +426,8 @@ async def list_public_absences_api( language : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -477,6 +484,7 @@ async def main() -> None: view_id=view_id, search=search, language=language, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/absences/raw_client.py b/src/sanka_sdk/absences/raw_client.py index 4b4904b..546cbb7 100644 --- a/src/sanka_sdk/absences/raw_client.py +++ b/src/sanka_sdk/absences/raw_client.py @@ -49,6 +49,7 @@ def list_public_absences_api( view_id: typing.Optional[str] = None, search: typing.Optional[str] = None, language: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -82,6 +83,8 @@ def list_public_absences_api( language : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -123,6 +126,7 @@ def list_public_absences_api( "view_id": view_id, "search": search, "language": language, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -525,6 +529,7 @@ async def list_public_absences_api( view_id: typing.Optional[str] = None, search: typing.Optional[str] = None, language: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -558,6 +563,8 @@ async def list_public_absences_api( language : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -599,6 +606,7 @@ async def list_public_absences_api( "view_id": view_id, "search": search, "language": language, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/attendance_records/client.py b/src/sanka_sdk/attendance_records/client.py index 251ec9d..9ba00e8 100644 --- a/src/sanka_sdk/attendance_records/client.py +++ b/src/sanka_sdk/attendance_records/client.py @@ -49,6 +49,7 @@ def list_public_attendance_records_api( search: typing.Optional[str] = None, language: typing.Optional[str] = None, status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_attendance_records_api( status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_attendance_records_api( search=search, language=language, status=status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -383,6 +387,7 @@ async def list_public_attendance_records_api( search: typing.Optional[str] = None, language: typing.Optional[str] = None, status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -410,6 +415,8 @@ async def list_public_attendance_records_api( status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -463,6 +470,7 @@ async def main() -> None: search=search, language=language, status=status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/attendance_records/raw_client.py b/src/sanka_sdk/attendance_records/raw_client.py index 1ec4641..ca582ad 100644 --- a/src/sanka_sdk/attendance_records/raw_client.py +++ b/src/sanka_sdk/attendance_records/raw_client.py @@ -45,6 +45,7 @@ def list_public_attendance_records_api( search: typing.Optional[str] = None, language: typing.Optional[str] = None, status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_attendance_records_api( status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_attendance_records_api( "search": search, "language": language, "status": status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -521,6 +525,7 @@ async def list_public_attendance_records_api( search: typing.Optional[str] = None, language: typing.Optional[str] = None, status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -548,6 +553,8 @@ async def list_public_attendance_records_api( status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -586,6 +593,7 @@ async def list_public_attendance_records_api( "search": search, "language": language, "status": status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/bills/client.py b/src/sanka_sdk/bills/client.py index 1b0a9d2..432cb81 100644 --- a/src/sanka_sdk/bills/client.py +++ b/src/sanka_sdk/bills/client.py @@ -53,6 +53,7 @@ def list_public_bills_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -80,6 +81,8 @@ def list_public_bills_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -125,6 +128,7 @@ def list_public_bills_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -425,6 +429,7 @@ async def list_public_bills_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -452,6 +457,8 @@ async def list_public_bills_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -505,6 +512,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/bills/raw_client.py b/src/sanka_sdk/bills/raw_client.py index 2760fba..d1bf588 100644 --- a/src/sanka_sdk/bills/raw_client.py +++ b/src/sanka_sdk/bills/raw_client.py @@ -49,6 +49,7 @@ def list_public_bills_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_bills_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -114,6 +117,7 @@ def list_public_bills_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -599,6 +603,7 @@ async def list_public_bills_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -626,6 +631,8 @@ async def list_public_bills_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -664,6 +671,7 @@ async def list_public_bills_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/client.py b/src/sanka_sdk/client.py index d112d9e..ffc184f 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 @@ -35,6 +36,7 @@ from .items.client import AsyncItemsClient, ItemsClient from .journals.client import AsyncJournalsClient, JournalsClient from .locations.client import AsyncLocationsClient, LocationsClient + from .lookout.client import AsyncLookoutClient, LookoutClient from .meters.client import AsyncMetersClient, MetersClient from .object_schemas.client import AsyncObjectSchemasClient, ObjectSchemasClient from .orders.client import AsyncOrdersClient, OrdersClient @@ -48,6 +50,7 @@ from .reports.client import AsyncReportsClient, ReportsClient from .revenues.client import AsyncRevenuesClient, RevenuesClient from .rule_settings.client import AsyncRuleSettingsClient, RuleSettingsClient + from .sanka_buy.client import AsyncSankaBuyClient, SankaBuyClient from .subscriptions.client import AsyncSubscriptionsClient, SubscriptionsClient from .tasks.client import AsyncTasksClient, TasksClient from .tickets.client import AsyncTicketsClient, TicketsClient @@ -133,6 +136,8 @@ def __init__( self._approval_requests: typing.Optional[ApprovalRequestsClient] = None self._associations: typing.Optional[AssociationsClient] = None self._attendance_records: typing.Optional[AttendanceRecordsClient] = None + self._sanka_buy: typing.Optional[SankaBuyClient] = None + self._lookout: typing.Optional[LookoutClient] = None self._bills: typing.Optional[BillsClient] = None self._companies: typing.Optional[CompaniesClient] = None self._contacts: typing.Optional[ContactsClient] = None @@ -143,6 +148,8 @@ def __init__( self._estimates: typing.Optional[EstimatesClient] = None self._expenses: typing.Optional[ExpensesClient] = None self._exports: typing.Optional[ExportsClient] = None + self._ferry_diagrams: typing.Optional[FerryDiagramsClient] = None + self._ferry_programs: typing.Optional[FerryProgramsClient] = None self._files: typing.Optional[FilesClient] = None self._inventories: typing.Optional[InventoriesClient] = None self._inventory_transactions: typing.Optional[InventoryTransactionsClient] = None @@ -173,7 +180,6 @@ def __init__( self._workflow_actions: typing.Optional[WorkflowActionsClient] = None self._workflows: typing.Optional[WorkflowsClient] = None self._workflow_runs: typing.Optional[WorkflowRunsClient] = None - self._ferry_diagrams: typing.Optional[FerryDiagramsClient] = None @property def absences(self): @@ -223,6 +229,22 @@ def attendance_records(self): self._attendance_records = AttendanceRecordsClient(client_wrapper=self._client_wrapper) return self._attendance_records + @property + def sanka_buy(self): + if self._sanka_buy is None: + from .sanka_buy.client import SankaBuyClient # noqa: E402 + + self._sanka_buy = SankaBuyClient(client_wrapper=self._client_wrapper) + return self._sanka_buy + + @property + def lookout(self): + if self._lookout is None: + from .lookout.client import LookoutClient # noqa: E402 + + self._lookout = LookoutClient(client_wrapper=self._client_wrapper) + return self._lookout + @property def bills(self): if self._bills is None: @@ -303,6 +325,22 @@ def exports(self): self._exports = ExportsClient(client_wrapper=self._client_wrapper) return self._exports + @property + def ferry_diagrams(self): + if self._ferry_diagrams is None: + from .ferry_diagrams.client import FerryDiagramsClient # noqa: E402 + + 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 + @property def files(self): if self._files is None: @@ -543,14 +581,6 @@ def workflow_runs(self): self._workflow_runs = WorkflowRunsClient(client_wrapper=self._client_wrapper) return self._workflow_runs - @property - def ferry_diagrams(self): - if self._ferry_diagrams is None: - from .ferry_diagrams.client import FerryDiagramsClient # noqa: E402 - - self._ferry_diagrams = FerryDiagramsClient(client_wrapper=self._client_wrapper) - return self._ferry_diagrams - class AsyncSankaClient: """ @@ -627,6 +657,8 @@ def __init__( self._approval_requests: typing.Optional[AsyncApprovalRequestsClient] = None self._associations: typing.Optional[AsyncAssociationsClient] = None self._attendance_records: typing.Optional[AsyncAttendanceRecordsClient] = None + self._sanka_buy: typing.Optional[AsyncSankaBuyClient] = None + self._lookout: typing.Optional[AsyncLookoutClient] = None self._bills: typing.Optional[AsyncBillsClient] = None self._companies: typing.Optional[AsyncCompaniesClient] = None self._contacts: typing.Optional[AsyncContactsClient] = None @@ -637,6 +669,8 @@ def __init__( self._estimates: typing.Optional[AsyncEstimatesClient] = None self._expenses: typing.Optional[AsyncExpensesClient] = None self._exports: typing.Optional[AsyncExportsClient] = None + self._ferry_diagrams: typing.Optional[AsyncFerryDiagramsClient] = None + self._ferry_programs: typing.Optional[AsyncFerryProgramsClient] = None self._files: typing.Optional[AsyncFilesClient] = None self._inventories: typing.Optional[AsyncInventoriesClient] = None self._inventory_transactions: typing.Optional[AsyncInventoryTransactionsClient] = None @@ -667,7 +701,6 @@ def __init__( self._workflow_actions: typing.Optional[AsyncWorkflowActionsClient] = None self._workflows: typing.Optional[AsyncWorkflowsClient] = None self._workflow_runs: typing.Optional[AsyncWorkflowRunsClient] = None - self._ferry_diagrams: typing.Optional[AsyncFerryDiagramsClient] = None @property def absences(self): @@ -717,6 +750,22 @@ def attendance_records(self): self._attendance_records = AsyncAttendanceRecordsClient(client_wrapper=self._client_wrapper) return self._attendance_records + @property + def sanka_buy(self): + if self._sanka_buy is None: + from .sanka_buy.client import AsyncSankaBuyClient # noqa: E402 + + self._sanka_buy = AsyncSankaBuyClient(client_wrapper=self._client_wrapper) + return self._sanka_buy + + @property + def lookout(self): + if self._lookout is None: + from .lookout.client import AsyncLookoutClient # noqa: E402 + + self._lookout = AsyncLookoutClient(client_wrapper=self._client_wrapper) + return self._lookout + @property def bills(self): if self._bills is None: @@ -797,6 +846,22 @@ def exports(self): self._exports = AsyncExportsClient(client_wrapper=self._client_wrapper) return self._exports + @property + def ferry_diagrams(self): + if self._ferry_diagrams is None: + from .ferry_diagrams.client import AsyncFerryDiagramsClient # noqa: E402 + + 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 + @property def files(self): if self._files is None: @@ -1037,14 +1102,6 @@ def workflow_runs(self): self._workflow_runs = AsyncWorkflowRunsClient(client_wrapper=self._client_wrapper) return self._workflow_runs - @property - def ferry_diagrams(self): - if self._ferry_diagrams is None: - from .ferry_diagrams.client import AsyncFerryDiagramsClient # noqa: E402 - - self._ferry_diagrams = AsyncFerryDiagramsClient(client_wrapper=self._client_wrapper) - return self._ferry_diagrams - 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/companies/client.py b/src/sanka_sdk/companies/client.py index 5772283..d967638 100644 --- a/src/sanka_sdk/companies/client.py +++ b/src/sanka_sdk/companies/client.py @@ -61,6 +61,7 @@ def list_public_companies_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -88,6 +89,8 @@ def list_public_companies_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -133,6 +136,7 @@ def list_public_companies_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -735,6 +739,7 @@ async def list_public_companies_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -762,6 +767,8 @@ async def list_public_companies_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -815,6 +822,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/companies/raw_client.py b/src/sanka_sdk/companies/raw_client.py index bab5542..3628bfd 100644 --- a/src/sanka_sdk/companies/raw_client.py +++ b/src/sanka_sdk/companies/raw_client.py @@ -57,6 +57,7 @@ def list_public_companies_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -84,6 +85,8 @@ def list_public_companies_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -122,6 +125,7 @@ def list_public_companies_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -996,6 +1000,7 @@ async def list_public_companies_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -1023,6 +1028,8 @@ async def list_public_companies_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -1061,6 +1068,7 @@ async def list_public_companies_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/contacts/client.py b/src/sanka_sdk/contacts/client.py index 2d29b81..4249595 100644 --- a/src/sanka_sdk/contacts/client.py +++ b/src/sanka_sdk/contacts/client.py @@ -49,6 +49,7 @@ def list_public_contacts_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_contacts_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_contacts_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -458,6 +462,7 @@ async def list_public_contacts_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -485,6 +490,8 @@ async def list_public_contacts_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -538,6 +545,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/contacts/raw_client.py b/src/sanka_sdk/contacts/raw_client.py index 309637e..b16b479 100644 --- a/src/sanka_sdk/contacts/raw_client.py +++ b/src/sanka_sdk/contacts/raw_client.py @@ -45,6 +45,7 @@ def list_public_contacts_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_contacts_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_contacts_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -593,6 +597,7 @@ async def list_public_contacts_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -620,6 +625,8 @@ async def list_public_contacts_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -658,6 +665,7 @@ async def list_public_contacts_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/custom_objects/client.py b/src/sanka_sdk/custom_objects/client.py index 78f05fb..54b02b2 100644 --- a/src/sanka_sdk/custom_objects/client.py +++ b/src/sanka_sdk/custom_objects/client.py @@ -66,6 +66,7 @@ def list_public_custom_object_records_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -95,6 +96,8 @@ def list_public_custom_object_records_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -143,6 +146,7 @@ def list_public_custom_object_records_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -670,6 +674,7 @@ async def list_public_custom_object_records_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -699,6 +704,8 @@ async def list_public_custom_object_records_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -755,6 +762,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/custom_objects/raw_client.py b/src/sanka_sdk/custom_objects/raw_client.py index 6e8f059..588d9de 100644 --- a/src/sanka_sdk/custom_objects/raw_client.py +++ b/src/sanka_sdk/custom_objects/raw_client.py @@ -64,6 +64,7 @@ def list_public_custom_object_records_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -93,6 +94,8 @@ def list_public_custom_object_records_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -131,6 +134,7 @@ def list_public_custom_object_records_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -1040,6 +1044,7 @@ async def list_public_custom_object_records_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -1069,6 +1074,8 @@ async def list_public_custom_object_records_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -1107,6 +1114,7 @@ async def list_public_custom_object_records_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/deals/client.py b/src/sanka_sdk/deals/client.py index 41fb260..6a94bf0 100644 --- a/src/sanka_sdk/deals/client.py +++ b/src/sanka_sdk/deals/client.py @@ -52,6 +52,7 @@ def list_public_deals_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -79,6 +80,8 @@ def list_public_deals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -124,6 +127,7 @@ def list_public_deals_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -484,6 +488,7 @@ async def list_public_deals_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -511,6 +516,8 @@ async def list_public_deals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -564,6 +571,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/deals/raw_client.py b/src/sanka_sdk/deals/raw_client.py index da32094..14388bb 100644 --- a/src/sanka_sdk/deals/raw_client.py +++ b/src/sanka_sdk/deals/raw_client.py @@ -48,6 +48,7 @@ def list_public_deals_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -75,6 +76,8 @@ def list_public_deals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -113,6 +116,7 @@ def list_public_deals_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -649,6 +653,7 @@ async def list_public_deals_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -676,6 +681,8 @@ async def list_public_deals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -714,6 +721,7 @@ async def list_public_deals_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/disbursements/client.py b/src/sanka_sdk/disbursements/client.py index ac38607..b86f787 100644 --- a/src/sanka_sdk/disbursements/client.py +++ b/src/sanka_sdk/disbursements/client.py @@ -32,6 +32,10 @@ UpdatePublicDisbursementApiV2PublicDisbursementsDisbursementIdPut200Envelope, ) from .raw_client import AsyncRawDisbursementsClient, RawDisbursementsClient +from .types.disbursement_allocation_create_request_payable_type import DisbursementAllocationCreateRequestPayableType +from .types.disbursement_allocation_create_request_source import DisbursementAllocationCreateRequestSource +from .types.disbursement_allocation_patch_request_payable_type import DisbursementAllocationPatchRequestPayableType +from .types.disbursement_allocation_patch_request_source import DisbursementAllocationPatchRequestSource # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -61,6 +65,7 @@ def list_public_disbursements_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -88,6 +93,8 @@ def list_public_disbursements_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -133,6 +140,7 @@ def list_public_disbursements_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -427,11 +435,18 @@ def create_public_disbursement_allocation_api( self, disbursement_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], + amount: float, external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationCreateRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationCreateRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost200Envelope: """ @@ -439,7 +454,7 @@ def create_public_disbursement_allocation_api( ---------- disbursement_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] + amount : float external_id : typing.Optional[str] @@ -449,6 +464,20 @@ def create_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationCreateRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationCreateRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -467,16 +496,23 @@ def create_public_disbursement_allocation_api( ) client.disbursements.create_public_disbursement_allocation_api( disbursement_id="disbursement_id", - request={"key": "value"}, + amount=1.1, ) """ _response = self._raw_client.create_public_disbursement_allocation_api( disbursement_id, - request=request, + amount=amount, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, + payable_type=payable_type, + payable_id=payable_id, + bill_id=bill_id, + expense_id=expense_id, + currency=currency, + source=source, + notes=notes, request_options=request_options, ) return _response.data @@ -546,11 +582,18 @@ def update_public_disbursement_allocation_api( disbursement_id: str, allocation_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationPatchRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + amount: typing.Optional[float] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationPatchRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ( UpdatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch200Envelope @@ -562,8 +605,6 @@ def update_public_disbursement_allocation_api( allocation_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -572,6 +613,22 @@ def update_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationPatchRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + amount : typing.Optional[float] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationPatchRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -591,17 +648,23 @@ def update_public_disbursement_allocation_api( client.disbursements.update_public_disbursement_allocation_api( disbursement_id="disbursement_id", allocation_id="allocation_id", - request={"key": "value"}, ) """ _response = self._raw_client.update_public_disbursement_allocation_api( disbursement_id, allocation_id, - request=request, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, + payable_type=payable_type, + payable_id=payable_id, + bill_id=bill_id, + expense_id=expense_id, + amount=amount, + currency=currency, + source=source, + notes=notes, request_options=request_options, ) return _response.data @@ -631,6 +694,7 @@ async def list_public_disbursements_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -658,6 +722,8 @@ async def list_public_disbursements_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -711,6 +777,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -1045,11 +1112,18 @@ async def create_public_disbursement_allocation_api( self, disbursement_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], + amount: float, external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationCreateRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationCreateRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost200Envelope: """ @@ -1057,7 +1131,7 @@ async def create_public_disbursement_allocation_api( ---------- disbursement_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] + amount : float external_id : typing.Optional[str] @@ -1067,6 +1141,20 @@ async def create_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationCreateRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationCreateRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1090,7 +1178,7 @@ async def create_public_disbursement_allocation_api( async def main() -> None: await client.disbursements.create_public_disbursement_allocation_api( disbursement_id="disbursement_id", - request={"key": "value"}, + amount=1.1, ) @@ -1098,11 +1186,18 @@ async def main() -> None: """ _response = await self._raw_client.create_public_disbursement_allocation_api( disbursement_id, - request=request, + amount=amount, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, + payable_type=payable_type, + payable_id=payable_id, + bill_id=bill_id, + expense_id=expense_id, + currency=currency, + source=source, + notes=notes, request_options=request_options, ) return _response.data @@ -1180,11 +1275,18 @@ async def update_public_disbursement_allocation_api( disbursement_id: str, allocation_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationPatchRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + amount: typing.Optional[float] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationPatchRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ( UpdatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch200Envelope @@ -1196,8 +1298,6 @@ async def update_public_disbursement_allocation_api( allocation_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -1206,6 +1306,22 @@ async def update_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationPatchRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + amount : typing.Optional[float] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationPatchRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1230,7 +1346,6 @@ async def main() -> None: await client.disbursements.update_public_disbursement_allocation_api( disbursement_id="disbursement_id", allocation_id="allocation_id", - request={"key": "value"}, ) @@ -1239,11 +1354,18 @@ async def main() -> None: _response = await self._raw_client.update_public_disbursement_allocation_api( disbursement_id, allocation_id, - request=request, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, + payable_type=payable_type, + payable_id=payable_id, + bill_id=bill_id, + expense_id=expense_id, + amount=amount, + currency=currency, + source=source, + notes=notes, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/disbursements/raw_client.py b/src/sanka_sdk/disbursements/raw_client.py index 88feeb8..fcb9d5d 100644 --- a/src/sanka_sdk/disbursements/raw_client.py +++ b/src/sanka_sdk/disbursements/raw_client.py @@ -39,6 +39,10 @@ from ..types.update_public_disbursement_api_v_2_public_disbursements_disbursement_id_put_200_envelope import ( UpdatePublicDisbursementApiV2PublicDisbursementsDisbursementIdPut200Envelope, ) +from .types.disbursement_allocation_create_request_payable_type import DisbursementAllocationCreateRequestPayableType +from .types.disbursement_allocation_create_request_source import DisbursementAllocationCreateRequestSource +from .types.disbursement_allocation_patch_request_payable_type import DisbursementAllocationPatchRequestPayableType +from .types.disbursement_allocation_patch_request_source import DisbursementAllocationPatchRequestSource # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -57,6 +61,7 @@ def list_public_disbursements_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -84,6 +89,8 @@ def list_public_disbursements_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -122,6 +129,7 @@ def list_public_disbursements_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -602,11 +610,18 @@ def create_public_disbursement_allocation_api( self, disbursement_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], + amount: float, external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationCreateRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationCreateRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ CreatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost200Envelope @@ -616,7 +631,7 @@ def create_public_disbursement_allocation_api( ---------- disbursement_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] + amount : float external_id : typing.Optional[str] @@ -626,6 +641,20 @@ def create_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationCreateRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationCreateRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -643,7 +672,16 @@ def create_public_disbursement_allocation_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "payable_type": payable_type, + "payable_id": payable_id, + "bill_id": bill_id, + "expense_id": expense_id, + "amount": amount, + "currency": currency, + "source": source, + "notes": notes, + }, headers={ "content-type": "application/json", }, @@ -776,11 +814,18 @@ def update_public_disbursement_allocation_api( disbursement_id: str, allocation_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationPatchRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + amount: typing.Optional[float] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationPatchRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ UpdatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch200Envelope @@ -792,8 +837,6 @@ def update_public_disbursement_allocation_api( allocation_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -802,6 +845,22 @@ def update_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationPatchRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + amount : typing.Optional[float] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationPatchRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -819,7 +878,16 @@ def update_public_disbursement_allocation_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "payable_type": payable_type, + "payable_id": payable_id, + "bill_id": bill_id, + "expense_id": expense_id, + "amount": amount, + "currency": currency, + "source": source, + "notes": notes, + }, headers={ "content-type": "application/json", }, @@ -877,6 +945,7 @@ async def list_public_disbursements_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -904,6 +973,8 @@ async def list_public_disbursements_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -942,6 +1013,7 @@ async def list_public_disbursements_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -1424,11 +1496,18 @@ async def create_public_disbursement_allocation_api( self, disbursement_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], + amount: float, external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationCreateRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationCreateRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ CreatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsPost200Envelope @@ -1438,7 +1517,7 @@ async def create_public_disbursement_allocation_api( ---------- disbursement_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] + amount : float external_id : typing.Optional[str] @@ -1448,6 +1527,20 @@ async def create_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationCreateRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationCreateRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1465,7 +1558,16 @@ async def create_public_disbursement_allocation_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "payable_type": payable_type, + "payable_id": payable_id, + "bill_id": bill_id, + "expense_id": expense_id, + "amount": amount, + "currency": currency, + "source": source, + "notes": notes, + }, headers={ "content-type": "application/json", }, @@ -1598,11 +1700,18 @@ async def update_public_disbursement_allocation_api( disbursement_id: str, allocation_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, + payable_type: typing.Optional[DisbursementAllocationPatchRequestPayableType] = OMIT, + payable_id: typing.Optional[str] = OMIT, + bill_id: typing.Optional[str] = OMIT, + expense_id: typing.Optional[str] = OMIT, + amount: typing.Optional[float] = OMIT, + currency: typing.Optional[str] = OMIT, + source: typing.Optional[DisbursementAllocationPatchRequestSource] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ UpdatePublicDisbursementAllocationApiV2PublicDisbursementsDisbursementIdAllocationsAllocationIdPatch200Envelope @@ -1614,8 +1723,6 @@ async def update_public_disbursement_allocation_api( allocation_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -1624,6 +1731,22 @@ async def update_public_disbursement_allocation_api( workspace_id : typing.Optional[str] + payable_type : typing.Optional[DisbursementAllocationPatchRequestPayableType] + + payable_id : typing.Optional[str] + + bill_id : typing.Optional[str] + + expense_id : typing.Optional[str] + + amount : typing.Optional[float] + + currency : typing.Optional[str] + + source : typing.Optional[DisbursementAllocationPatchRequestSource] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1641,7 +1764,16 @@ async def update_public_disbursement_allocation_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "payable_type": payable_type, + "payable_id": payable_id, + "bill_id": bill_id, + "expense_id": expense_id, + "amount": amount, + "currency": currency, + "source": source, + "notes": notes, + }, headers={ "content-type": "application/json", }, diff --git a/src/sanka_sdk/disbursements/types/__init__.py b/src/sanka_sdk/disbursements/types/__init__.py new file mode 100644 index 0000000..5cde020 --- /dev/null +++ b/src/sanka_sdk/disbursements/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/disbursements/types/disbursement_allocation_create_request_payable_type.py b/src/sanka_sdk/disbursements/types/disbursement_allocation_create_request_payable_type.py new file mode 100644 index 0000000..f73bc28 --- /dev/null +++ b/src/sanka_sdk/disbursements/types/disbursement_allocation_create_request_payable_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisbursementAllocationCreateRequestPayableType = typing.Union[typing.Literal["bill", "expense"], typing.Any] diff --git a/src/sanka_sdk/disbursements/types/disbursement_allocation_create_request_source.py b/src/sanka_sdk/disbursements/types/disbursement_allocation_create_request_source.py new file mode 100644 index 0000000..baafa95 --- /dev/null +++ b/src/sanka_sdk/disbursements/types/disbursement_allocation_create_request_source.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisbursementAllocationCreateRequestSource = typing.Union[ + typing.Literal["manual", "bank_statement", "api", "migration"], typing.Any +] diff --git a/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_payable_type.py b/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_payable_type.py new file mode 100644 index 0000000..2b2441a --- /dev/null +++ b/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_payable_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisbursementAllocationPatchRequestPayableType = typing.Union[typing.Literal["bill", "expense"], typing.Any] diff --git a/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_source.py b/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_source.py new file mode 100644 index 0000000..52546ff --- /dev/null +++ b/src/sanka_sdk/disbursements/types/disbursement_allocation_patch_request_source.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +DisbursementAllocationPatchRequestSource = typing.Union[ + typing.Literal["manual", "bank_statement", "api", "migration"], typing.Any +] diff --git a/src/sanka_sdk/employees/client.py b/src/sanka_sdk/employees/client.py index 42d6b06..7a59ece 100644 --- a/src/sanka_sdk/employees/client.py +++ b/src/sanka_sdk/employees/client.py @@ -34,6 +34,7 @@ def list_public_employees_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -61,6 +62,8 @@ def list_public_employees_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -106,6 +109,7 @@ def list_public_employees_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -145,6 +149,7 @@ async def list_public_employees_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -172,6 +177,8 @@ async def list_public_employees_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -225,6 +232,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/employees/raw_client.py b/src/sanka_sdk/employees/raw_client.py index e6b1777..3a70446 100644 --- a/src/sanka_sdk/employees/raw_client.py +++ b/src/sanka_sdk/employees/raw_client.py @@ -29,6 +29,7 @@ def list_public_employees_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -56,6 +57,8 @@ def list_public_employees_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -94,6 +97,7 @@ def list_public_employees_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -160,6 +164,7 @@ async def list_public_employees_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -187,6 +192,8 @@ async def list_public_employees_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -225,6 +232,7 @@ async def list_public_employees_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/errors/conflict_error.py b/src/sanka_sdk/errors/conflict_error.py deleted file mode 100644 index 97edc8f..0000000 --- a/src/sanka_sdk/errors/conflict_error.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -from ..core.api_error import ApiError -from ..types.error_envelope import ErrorEnvelope - - -class ConflictError(ApiError): - def __init__(self, body: ErrorEnvelope, headers: typing.Optional[typing.Dict[str, str]] = None): - super().__init__(status_code=409, headers=headers, body=body) diff --git a/src/sanka_sdk/estimates/client.py b/src/sanka_sdk/estimates/client.py index 1592eec..5b92349 100644 --- a/src/sanka_sdk/estimates/client.py +++ b/src/sanka_sdk/estimates/client.py @@ -53,6 +53,7 @@ def list_public_estimates_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -80,6 +81,8 @@ def list_public_estimates_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -125,6 +128,7 @@ def list_public_estimates_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -486,6 +490,7 @@ async def list_public_estimates_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -513,6 +518,8 @@ async def list_public_estimates_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -566,6 +573,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/estimates/raw_client.py b/src/sanka_sdk/estimates/raw_client.py index 5fd9b7c..9f592fb 100644 --- a/src/sanka_sdk/estimates/raw_client.py +++ b/src/sanka_sdk/estimates/raw_client.py @@ -50,6 +50,7 @@ def list_public_estimates_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -77,6 +78,8 @@ def list_public_estimates_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -115,6 +118,7 @@ def list_public_estimates_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -693,6 +697,7 @@ async def list_public_estimates_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -720,6 +725,8 @@ async def list_public_estimates_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -758,6 +765,7 @@ async def list_public_estimates_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/expenses/client.py b/src/sanka_sdk/expenses/client.py index fb57d9d..d644a33 100644 --- a/src/sanka_sdk/expenses/client.py +++ b/src/sanka_sdk/expenses/client.py @@ -53,6 +53,7 @@ def list_public_expenses_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -80,6 +81,8 @@ def list_public_expenses_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -125,6 +128,7 @@ def list_public_expenses_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -145,9 +149,8 @@ def create_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicExpenseApiV2PublicExpensesPost200Envelope: """ @@ -159,11 +162,10 @@ def create_public_expense_api( form_view_id : typing.Optional[str] - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -187,9 +189,8 @@ def create_public_expense_api( workspace_id=workspace_id, view_id=view_id, form_view_id=form_view_id, - cost_line_items=cost_line_items, - line_items=line_items, properties=properties, + base_currency=base_currency, request_options=request_options, ) return _response.data @@ -293,11 +294,8 @@ def update_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - associations: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - files: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicExpenseApiV2PublicExpensesExpenseIdPut200Envelope: """ @@ -313,15 +311,10 @@ def update_public_expense_api( form_view_id : typing.Optional[str] - associations : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - files : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -349,11 +342,8 @@ def update_public_expense_api( workspace_id=workspace_id, view_id=view_id, form_view_id=form_view_id, - associations=associations, - cost_line_items=cost_line_items, - files=files, - line_items=line_items, properties=properties, + base_currency=base_currency, request_options=request_options, ) return _response.data @@ -425,6 +415,7 @@ async def list_public_expenses_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -452,6 +443,8 @@ async def list_public_expenses_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -505,6 +498,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -525,9 +519,8 @@ async def create_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicExpenseApiV2PublicExpensesPost200Envelope: """ @@ -539,11 +532,10 @@ async def create_public_expense_api( form_view_id : typing.Optional[str] - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -575,9 +567,8 @@ async def main() -> None: workspace_id=workspace_id, view_id=view_id, form_view_id=form_view_id, - cost_line_items=cost_line_items, - line_items=line_items, properties=properties, + base_currency=base_currency, request_options=request_options, ) return _response.data @@ -697,11 +688,8 @@ async def update_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - associations: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - files: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicExpenseApiV2PublicExpensesExpenseIdPut200Envelope: """ @@ -717,15 +705,10 @@ async def update_public_expense_api( form_view_id : typing.Optional[str] - associations : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - files : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -761,11 +744,8 @@ async def main() -> None: workspace_id=workspace_id, view_id=view_id, form_view_id=form_view_id, - associations=associations, - cost_line_items=cost_line_items, - files=files, - line_items=line_items, properties=properties, + base_currency=base_currency, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/expenses/raw_client.py b/src/sanka_sdk/expenses/raw_client.py index 533cbc8..d030fd7 100644 --- a/src/sanka_sdk/expenses/raw_client.py +++ b/src/sanka_sdk/expenses/raw_client.py @@ -49,6 +49,7 @@ def list_public_expenses_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_expenses_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -114,6 +117,7 @@ def list_public_expenses_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -172,9 +176,8 @@ def create_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreatePublicExpenseApiV2PublicExpensesPost200Envelope]: """ @@ -186,11 +189,10 @@ def create_public_expense_api( form_view_id : typing.Optional[str] - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -209,9 +211,8 @@ def create_public_expense_api( json={ "view_id": view_id, "form_view_id": form_view_id, - "cost_line_items": cost_line_items, - "line_items": line_items, "properties": properties, + "base_currency": base_currency, }, headers={ "content-type": "application/json", @@ -417,11 +418,8 @@ def update_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - associations: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - files: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UpdatePublicExpenseApiV2PublicExpensesExpenseIdPut200Envelope]: """ @@ -437,15 +435,10 @@ def update_public_expense_api( form_view_id : typing.Optional[str] - associations : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - files : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -465,11 +458,8 @@ def update_public_expense_api( json={ "view_id": view_id, "form_view_id": form_view_id, - "associations": associations, - "cost_line_items": cost_line_items, - "files": files, - "line_items": line_items, "properties": properties, + "base_currency": base_currency, }, headers={ "content-type": "application/json", @@ -599,6 +589,7 @@ async def list_public_expenses_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -626,6 +617,8 @@ async def list_public_expenses_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -664,6 +657,7 @@ async def list_public_expenses_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -722,9 +716,8 @@ async def create_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreatePublicExpenseApiV2PublicExpensesPost200Envelope]: """ @@ -736,11 +729,10 @@ async def create_public_expense_api( form_view_id : typing.Optional[str] - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -759,9 +751,8 @@ async def create_public_expense_api( json={ "view_id": view_id, "form_view_id": form_view_id, - "cost_line_items": cost_line_items, - "line_items": line_items, "properties": properties, + "base_currency": base_currency, }, headers={ "content-type": "application/json", @@ -967,11 +958,8 @@ async def update_public_expense_api( workspace_id: typing.Optional[str] = None, view_id: typing.Optional[str] = OMIT, form_view_id: typing.Optional[str] = OMIT, - associations: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - cost_line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - files: typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] = OMIT, - line_items: typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] = OMIT, - properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] = OMIT, + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + base_currency: typing.Optional[float] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UpdatePublicExpenseApiV2PublicExpensesExpenseIdPut200Envelope]: """ @@ -987,15 +975,10 @@ async def update_public_expense_api( form_view_id : typing.Optional[str] - associations : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - cost_line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] - - files : typing.Optional[typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]] - - line_items : typing.Optional[typing.Sequence[typing.Optional[typing.Any]]] + properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] - properties : typing.Optional[typing.Dict[str, typing.Optional[typing.Optional[typing.Any]]]] + base_currency : typing.Optional[float] + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1015,11 +998,8 @@ async def update_public_expense_api( json={ "view_id": view_id, "form_view_id": form_view_id, - "associations": associations, - "cost_line_items": cost_line_items, - "files": files, - "line_items": line_items, "properties": properties, + "base_currency": base_currency, }, headers={ "content-type": "application/json", diff --git a/src/sanka_sdk/exports/client.py b/src/sanka_sdk/exports/client.py index 718d883..5177d6c 100644 --- a/src/sanka_sdk/exports/client.py +++ b/src/sanka_sdk/exports/client.py @@ -10,6 +10,7 @@ from ..types.create_public_export_job_compat_api_v_2_public_exports_post_200_envelope import ( CreatePublicExportJobCompatApiV2PublicExportsPost200Envelope, ) +from ..types.export_template_filter_field_input import ExportTemplateFilterFieldInput from ..types.get_public_export_job_compat_api_v_2_public_exports_job_id_get_200_envelope import ( GetPublicExportJobCompatApiV2PublicExportsJobIdGet200Envelope, ) @@ -101,15 +102,24 @@ def create_public_export_job_compat_api( provider: typing.Optional[str] = OMIT, target_system: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, + request_invoice: typing.Optional[bool] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, workspace_scope: typing.Optional[str] = OMIT, + view_id: typing.Optional[str] = OMIT, + search_query: typing.Optional[str] = OMIT, + filter_fields: typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, custom_object_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, file_format: typing.Optional[str] = OMIT, dry_run: typing.Optional[bool] = OMIT, workflow_action_tracker_id: typing.Optional[str] = OMIT, action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, key_field: typing.Optional[str] = OMIT, export_set_items: typing.Optional[bool] = OMIT, set_code_source: typing.Optional[str] = OMIT, @@ -126,15 +136,16 @@ def create_public_export_job_compat_api( Create an export job. Integration-destination exports are validated against the runnable - delivery matrix (item/order to nextengine, and company/contact/deal/item/ - order to hubspot via the native outbound dispatcher). Provider and + delivery matrix. HubSpot Company, Contact, Custom Object, Deal, Invoice, + Item, Order, Subscription, and Ticket exports use the dedicated Hatchet + bulk workflow, bounded CSV chunks, and HubSpot's Imports API. Invoice + requires an explicitly selected HubSpot custom-object type id. NextEngine + Item and Order exports keep their dedicated Hatchet pipelines. Provider and object pairs without a working delivery pipeline are rejected with HTTP - 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` (details: - ``object_type``, ``provider``, ``reason``) before any job history row or - outbound event is created. Empty or unknown provider slugs are rejected - with HTTP 400 and error code ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. - Accepted integration exports are recorded with status ``queued`` while - background delivery runs. + 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` before any job + history row is created. Empty or unknown provider slugs are rejected with + ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. Accepted jobs stay queued or + running until provider completion and required post-processing finish. Parameters ---------- @@ -150,12 +161,28 @@ def create_public_export_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + operation : typing.Optional[str] + request_invoice : typing.Optional[bool] + record_ids : typing.Optional[typing.Sequence[str]] workspace_scope : typing.Optional[str] + view_id : typing.Optional[str] + + search_query : typing.Optional[str] + + filter_fields : typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] + + idempotency_key : typing.Optional[str] + custom_object_id : typing.Optional[str] limit : typing.Optional[int] @@ -168,6 +195,8 @@ def create_public_export_job_compat_api( action_tracker_id : typing.Optional[str] + workflow_language : typing.Optional[str] + key_field : typing.Optional[str] export_set_items : typing.Optional[bool] @@ -215,15 +244,24 @@ def create_public_export_job_compat_api( provider=provider, target_system=target_system, channel_id=channel_id, + mapping_template_id=mapping_template_id, + mapping_template_revision=mapping_template_revision, + mapping_template_state=mapping_template_state, operation=operation, + request_invoice=request_invoice, record_ids=record_ids, workspace_scope=workspace_scope, + view_id=view_id, + search_query=search_query, + filter_fields=filter_fields, + idempotency_key=idempotency_key, custom_object_id=custom_object_id, limit=limit, file_format=file_format, dry_run=dry_run, workflow_action_tracker_id=workflow_action_tracker_id, action_tracker_id=action_tracker_id, + workflow_language=workflow_language, key_field=key_field, export_set_items=export_set_items, set_code_source=set_code_source, @@ -404,15 +442,24 @@ async def create_public_export_job_compat_api( provider: typing.Optional[str] = OMIT, target_system: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, + request_invoice: typing.Optional[bool] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, workspace_scope: typing.Optional[str] = OMIT, + view_id: typing.Optional[str] = OMIT, + search_query: typing.Optional[str] = OMIT, + filter_fields: typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, custom_object_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, file_format: typing.Optional[str] = OMIT, dry_run: typing.Optional[bool] = OMIT, workflow_action_tracker_id: typing.Optional[str] = OMIT, action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, key_field: typing.Optional[str] = OMIT, export_set_items: typing.Optional[bool] = OMIT, set_code_source: typing.Optional[str] = OMIT, @@ -429,15 +476,16 @@ async def create_public_export_job_compat_api( Create an export job. Integration-destination exports are validated against the runnable - delivery matrix (item/order to nextengine, and company/contact/deal/item/ - order to hubspot via the native outbound dispatcher). Provider and + delivery matrix. HubSpot Company, Contact, Custom Object, Deal, Invoice, + Item, Order, Subscription, and Ticket exports use the dedicated Hatchet + bulk workflow, bounded CSV chunks, and HubSpot's Imports API. Invoice + requires an explicitly selected HubSpot custom-object type id. NextEngine + Item and Order exports keep their dedicated Hatchet pipelines. Provider and object pairs without a working delivery pipeline are rejected with HTTP - 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` (details: - ``object_type``, ``provider``, ``reason``) before any job history row or - outbound event is created. Empty or unknown provider slugs are rejected - with HTTP 400 and error code ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. - Accepted integration exports are recorded with status ``queued`` while - background delivery runs. + 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` before any job + history row is created. Empty or unknown provider slugs are rejected with + ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. Accepted jobs stay queued or + running until provider completion and required post-processing finish. Parameters ---------- @@ -453,12 +501,28 @@ async def create_public_export_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + operation : typing.Optional[str] + request_invoice : typing.Optional[bool] + record_ids : typing.Optional[typing.Sequence[str]] workspace_scope : typing.Optional[str] + view_id : typing.Optional[str] + + search_query : typing.Optional[str] + + filter_fields : typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] + + idempotency_key : typing.Optional[str] + custom_object_id : typing.Optional[str] limit : typing.Optional[int] @@ -471,6 +535,8 @@ async def create_public_export_job_compat_api( action_tracker_id : typing.Optional[str] + workflow_language : typing.Optional[str] + key_field : typing.Optional[str] export_set_items : typing.Optional[bool] @@ -526,15 +592,24 @@ async def main() -> None: provider=provider, target_system=target_system, channel_id=channel_id, + mapping_template_id=mapping_template_id, + mapping_template_revision=mapping_template_revision, + mapping_template_state=mapping_template_state, operation=operation, + request_invoice=request_invoice, record_ids=record_ids, workspace_scope=workspace_scope, + view_id=view_id, + search_query=search_query, + filter_fields=filter_fields, + idempotency_key=idempotency_key, custom_object_id=custom_object_id, limit=limit, file_format=file_format, dry_run=dry_run, workflow_action_tracker_id=workflow_action_tracker_id, action_tracker_id=action_tracker_id, + workflow_language=workflow_language, key_field=key_field, export_set_items=export_set_items, set_code_source=set_code_source, diff --git a/src/sanka_sdk/exports/raw_client.py b/src/sanka_sdk/exports/raw_client.py index bb62f13..079b990 100644 --- a/src/sanka_sdk/exports/raw_client.py +++ b/src/sanka_sdk/exports/raw_client.py @@ -8,6 +8,7 @@ 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.bad_request_error import BadRequestError from ..errors.forbidden_error import ForbiddenError @@ -20,6 +21,7 @@ CreatePublicExportJobCompatApiV2PublicExportsPost200Envelope, ) from ..types.error_envelope import ErrorEnvelope +from ..types.export_template_filter_field_input import ExportTemplateFilterFieldInput from ..types.get_public_export_job_compat_api_v_2_public_exports_job_id_get_200_envelope import ( GetPublicExportJobCompatApiV2PublicExportsJobIdGet200Envelope, ) @@ -139,15 +141,24 @@ def create_public_export_job_compat_api( provider: typing.Optional[str] = OMIT, target_system: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, + request_invoice: typing.Optional[bool] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, workspace_scope: typing.Optional[str] = OMIT, + view_id: typing.Optional[str] = OMIT, + search_query: typing.Optional[str] = OMIT, + filter_fields: typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, custom_object_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, file_format: typing.Optional[str] = OMIT, dry_run: typing.Optional[bool] = OMIT, workflow_action_tracker_id: typing.Optional[str] = OMIT, action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, key_field: typing.Optional[str] = OMIT, export_set_items: typing.Optional[bool] = OMIT, set_code_source: typing.Optional[str] = OMIT, @@ -164,15 +175,16 @@ def create_public_export_job_compat_api( Create an export job. Integration-destination exports are validated against the runnable - delivery matrix (item/order to nextengine, and company/contact/deal/item/ - order to hubspot via the native outbound dispatcher). Provider and + delivery matrix. HubSpot Company, Contact, Custom Object, Deal, Invoice, + Item, Order, Subscription, and Ticket exports use the dedicated Hatchet + bulk workflow, bounded CSV chunks, and HubSpot's Imports API. Invoice + requires an explicitly selected HubSpot custom-object type id. NextEngine + Item and Order exports keep their dedicated Hatchet pipelines. Provider and object pairs without a working delivery pipeline are rejected with HTTP - 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` (details: - ``object_type``, ``provider``, ``reason``) before any job history row or - outbound event is created. Empty or unknown provider slugs are rejected - with HTTP 400 and error code ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. - Accepted integration exports are recorded with status ``queued`` while - background delivery runs. + 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` before any job + history row is created. Empty or unknown provider slugs are rejected with + ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. Accepted jobs stay queued or + running until provider completion and required post-processing finish. Parameters ---------- @@ -188,12 +200,28 @@ def create_public_export_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + operation : typing.Optional[str] + request_invoice : typing.Optional[bool] + record_ids : typing.Optional[typing.Sequence[str]] workspace_scope : typing.Optional[str] + view_id : typing.Optional[str] + + search_query : typing.Optional[str] + + filter_fields : typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] + + idempotency_key : typing.Optional[str] + custom_object_id : typing.Optional[str] limit : typing.Optional[int] @@ -206,6 +234,8 @@ def create_public_export_job_compat_api( action_tracker_id : typing.Optional[str] + workflow_language : typing.Optional[str] + key_field : typing.Optional[str] export_set_items : typing.Optional[bool] @@ -246,15 +276,26 @@ def create_public_export_job_compat_api( "provider": provider, "target_system": target_system, "channel_id": channel_id, + "mapping_template_id": mapping_template_id, + "mapping_template_revision": mapping_template_revision, + "mapping_template_state": mapping_template_state, "operation": operation, + "request_invoice": request_invoice, "record_ids": record_ids, "workspace_scope": workspace_scope, + "view_id": view_id, + "search_query": search_query, + "filter_fields": convert_and_respect_annotation_metadata( + object_=filter_fields, annotation=typing.Sequence[ExportTemplateFilterFieldInput], direction="write" + ), + "idempotency_key": idempotency_key, "custom_object_id": custom_object_id, "limit": limit, "file_format": file_format, "dry_run": dry_run, "workflow_action_tracker_id": workflow_action_tracker_id, "action_tracker_id": action_tracker_id, + "workflow_language": workflow_language, "key_field": key_field, "export_set_items": export_set_items, "set_code_source": set_code_source, @@ -596,15 +637,24 @@ async def create_public_export_job_compat_api( provider: typing.Optional[str] = OMIT, target_system: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, + request_invoice: typing.Optional[bool] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, workspace_scope: typing.Optional[str] = OMIT, + view_id: typing.Optional[str] = OMIT, + search_query: typing.Optional[str] = OMIT, + filter_fields: typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, custom_object_id: typing.Optional[str] = OMIT, limit: typing.Optional[int] = OMIT, file_format: typing.Optional[str] = OMIT, dry_run: typing.Optional[bool] = OMIT, workflow_action_tracker_id: typing.Optional[str] = OMIT, action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, key_field: typing.Optional[str] = OMIT, export_set_items: typing.Optional[bool] = OMIT, set_code_source: typing.Optional[str] = OMIT, @@ -621,15 +671,16 @@ async def create_public_export_job_compat_api( Create an export job. Integration-destination exports are validated against the runnable - delivery matrix (item/order to nextengine, and company/contact/deal/item/ - order to hubspot via the native outbound dispatcher). Provider and + delivery matrix. HubSpot Company, Contact, Custom Object, Deal, Invoice, + Item, Order, Subscription, and Ticket exports use the dedicated Hatchet + bulk workflow, bounded CSV chunks, and HubSpot's Imports API. Invoice + requires an explicitly selected HubSpot custom-object type id. NextEngine + Item and Order exports keep their dedicated Hatchet pipelines. Provider and object pairs without a working delivery pipeline are rejected with HTTP - 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` (details: - ``object_type``, ``provider``, ``reason``) before any job history row or - outbound event is created. Empty or unknown provider slugs are rejected - with HTTP 400 and error code ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. - Accepted integration exports are recorded with status ``queued`` while - background delivery runs. + 400 and error code ``INTEGRATION_EXPORT_NOT_SUPPORTED`` before any job + history row is created. Empty or unknown provider slugs are rejected with + ``INTEGRATION_EXPORT_UNKNOWN_PROVIDER``. Accepted jobs stay queued or + running until provider completion and required post-processing finish. Parameters ---------- @@ -645,12 +696,28 @@ async def create_public_export_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + operation : typing.Optional[str] + request_invoice : typing.Optional[bool] + record_ids : typing.Optional[typing.Sequence[str]] workspace_scope : typing.Optional[str] + view_id : typing.Optional[str] + + search_query : typing.Optional[str] + + filter_fields : typing.Optional[typing.Sequence[ExportTemplateFilterFieldInput]] + + idempotency_key : typing.Optional[str] + custom_object_id : typing.Optional[str] limit : typing.Optional[int] @@ -663,6 +730,8 @@ async def create_public_export_job_compat_api( action_tracker_id : typing.Optional[str] + workflow_language : typing.Optional[str] + key_field : typing.Optional[str] export_set_items : typing.Optional[bool] @@ -703,15 +772,26 @@ async def create_public_export_job_compat_api( "provider": provider, "target_system": target_system, "channel_id": channel_id, + "mapping_template_id": mapping_template_id, + "mapping_template_revision": mapping_template_revision, + "mapping_template_state": mapping_template_state, "operation": operation, + "request_invoice": request_invoice, "record_ids": record_ids, "workspace_scope": workspace_scope, + "view_id": view_id, + "search_query": search_query, + "filter_fields": convert_and_respect_annotation_metadata( + object_=filter_fields, annotation=typing.Sequence[ExportTemplateFilterFieldInput], direction="write" + ), + "idempotency_key": idempotency_key, "custom_object_id": custom_object_id, "limit": limit, "file_format": file_format, "dry_run": dry_run, "workflow_action_tracker_id": workflow_action_tracker_id, "action_tracker_id": action_tracker_id, + "workflow_language": workflow_language, "key_field": key_field, "export_set_items": export_set_items, "set_code_source": set_code_source, 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..d282f49 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/client.py @@ -0,0 +1,1193 @@ +# 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + phase_id=phase_id, + parent_todo_id=parent_todo_id, + sort_order=sort_order, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + phase_id=phase_id, + parent_todo_id=parent_todo_id, + sort_order=sort_order, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + phase_id=phase_id, + parent_todo_id=parent_todo_id, + sort_order=sort_order, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + phase_id=phase_id, + parent_todo_id=parent_todo_id, + sort_order=sort_order, + 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..56a66e6 --- /dev/null +++ b/src/sanka_sdk/ferry_programs/raw_client.py @@ -0,0 +1,1848 @@ +# 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + "phaseId": phase_id, + "parentTodoId": parent_todo_id, + "sortOrder": sort_order, + }, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + "phaseId": phase_id, + "parentTodoId": parent_todo_id, + "sortOrder": sort_order, + }, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + "phaseId": phase_id, + "parentTodoId": parent_todo_id, + "sortOrder": sort_order, + }, + 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, + phase_id: typing.Optional[str] = OMIT, + parent_todo_id: typing.Optional[str] = OMIT, + sort_order: typing.Optional[int] = 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] + + phase_id : typing.Optional[str] + + parent_todo_id : typing.Optional[str] + + sort_order : typing.Optional[int] + + 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, + "phaseId": phase_id, + "parentTodoId": parent_todo_id, + "sortOrder": sort_order, + }, + 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/imports/client.py b/src/sanka_sdk/imports/client.py index 2c468f3..6e6a186 100644 --- a/src/sanka_sdk/imports/client.py +++ b/src/sanka_sdk/imports/client.py @@ -104,6 +104,9 @@ def create_public_import_job_compat_api( custom_object_id: typing.Optional[str] = OMIT, provider: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, source_record: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, @@ -112,6 +115,10 @@ def create_public_import_job_compat_api( relation_key_map: typing.Optional[typing.Dict[str, str]] = OMIT, column_mappings: typing.Optional[typing.Sequence[TransferColumnMapping]] = OMIT, dry_run: typing.Optional[bool] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, + workflow_action_tracker_id: typing.Optional[str] = OMIT, + action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicImportJobCompatApiV2PublicImportsPost200Envelope: """ @@ -133,6 +140,12 @@ def create_public_import_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + record_ids : typing.Optional[typing.Sequence[str]] source_record : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] @@ -150,6 +163,14 @@ def create_public_import_job_compat_api( dry_run : typing.Optional[bool] + idempotency_key : typing.Optional[str] + + workflow_action_tracker_id : typing.Optional[str] + + action_tracker_id : typing.Optional[str] + + workflow_language : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -179,6 +200,9 @@ def create_public_import_job_compat_api( custom_object_id=custom_object_id, provider=provider, channel_id=channel_id, + mapping_template_id=mapping_template_id, + mapping_template_revision=mapping_template_revision, + mapping_template_state=mapping_template_state, record_ids=record_ids, source_record=source_record, operation=operation, @@ -187,6 +211,10 @@ def create_public_import_job_compat_api( relation_key_map=relation_key_map, column_mappings=column_mappings, dry_run=dry_run, + idempotency_key=idempotency_key, + workflow_action_tracker_id=workflow_action_tracker_id, + action_tracker_id=action_tracker_id, + workflow_language=workflow_language, request_options=request_options, ) return _response.data @@ -359,6 +387,9 @@ async def create_public_import_job_compat_api( custom_object_id: typing.Optional[str] = OMIT, provider: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, source_record: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, @@ -367,6 +398,10 @@ async def create_public_import_job_compat_api( relation_key_map: typing.Optional[typing.Dict[str, str]] = OMIT, column_mappings: typing.Optional[typing.Sequence[TransferColumnMapping]] = OMIT, dry_run: typing.Optional[bool] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, + workflow_action_tracker_id: typing.Optional[str] = OMIT, + action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicImportJobCompatApiV2PublicImportsPost200Envelope: """ @@ -388,6 +423,12 @@ async def create_public_import_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + record_ids : typing.Optional[typing.Sequence[str]] source_record : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] @@ -405,6 +446,14 @@ async def create_public_import_job_compat_api( dry_run : typing.Optional[bool] + idempotency_key : typing.Optional[str] + + workflow_action_tracker_id : typing.Optional[str] + + action_tracker_id : typing.Optional[str] + + workflow_language : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -442,6 +491,9 @@ async def main() -> None: custom_object_id=custom_object_id, provider=provider, channel_id=channel_id, + mapping_template_id=mapping_template_id, + mapping_template_revision=mapping_template_revision, + mapping_template_state=mapping_template_state, record_ids=record_ids, source_record=source_record, operation=operation, @@ -450,6 +502,10 @@ async def main() -> None: relation_key_map=relation_key_map, column_mappings=column_mappings, dry_run=dry_run, + idempotency_key=idempotency_key, + workflow_action_tracker_id=workflow_action_tracker_id, + action_tracker_id=action_tracker_id, + workflow_language=workflow_language, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/imports/raw_client.py b/src/sanka_sdk/imports/raw_client.py index 2c4d48c..a00da77 100644 --- a/src/sanka_sdk/imports/raw_client.py +++ b/src/sanka_sdk/imports/raw_client.py @@ -130,6 +130,9 @@ def create_public_import_job_compat_api( custom_object_id: typing.Optional[str] = OMIT, provider: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, source_record: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, @@ -138,6 +141,10 @@ def create_public_import_job_compat_api( relation_key_map: typing.Optional[typing.Dict[str, str]] = OMIT, column_mappings: typing.Optional[typing.Sequence[TransferColumnMapping]] = OMIT, dry_run: typing.Optional[bool] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, + workflow_action_tracker_id: typing.Optional[str] = OMIT, + action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreatePublicImportJobCompatApiV2PublicImportsPost200Envelope]: """ @@ -159,6 +166,12 @@ def create_public_import_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + record_ids : typing.Optional[typing.Sequence[str]] source_record : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] @@ -176,6 +189,14 @@ def create_public_import_job_compat_api( dry_run : typing.Optional[bool] + idempotency_key : typing.Optional[str] + + workflow_action_tracker_id : typing.Optional[str] + + action_tracker_id : typing.Optional[str] + + workflow_language : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -198,6 +219,9 @@ def create_public_import_job_compat_api( "custom_object_id": custom_object_id, "provider": provider, "channel_id": channel_id, + "mapping_template_id": mapping_template_id, + "mapping_template_revision": mapping_template_revision, + "mapping_template_state": mapping_template_state, "record_ids": record_ids, "source_record": source_record, "operation": operation, @@ -208,6 +232,10 @@ def create_public_import_job_compat_api( object_=column_mappings, annotation=typing.Sequence[TransferColumnMapping], direction="write" ), "dry_run": dry_run, + "idempotency_key": idempotency_key, + "workflow_action_tracker_id": workflow_action_tracker_id, + "action_tracker_id": action_tracker_id, + "workflow_language": workflow_language, }, headers={ "content-type": "application/json", @@ -486,6 +514,9 @@ async def create_public_import_job_compat_api( custom_object_id: typing.Optional[str] = OMIT, provider: typing.Optional[str] = OMIT, channel_id: typing.Optional[str] = OMIT, + mapping_template_id: typing.Optional[str] = OMIT, + mapping_template_revision: typing.Optional[int] = OMIT, + mapping_template_state: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, record_ids: typing.Optional[typing.Sequence[str]] = OMIT, source_record: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, operation: typing.Optional[str] = OMIT, @@ -494,6 +525,10 @@ async def create_public_import_job_compat_api( relation_key_map: typing.Optional[typing.Dict[str, str]] = OMIT, column_mappings: typing.Optional[typing.Sequence[TransferColumnMapping]] = OMIT, dry_run: typing.Optional[bool] = OMIT, + idempotency_key: typing.Optional[str] = OMIT, + workflow_action_tracker_id: typing.Optional[str] = OMIT, + action_tracker_id: typing.Optional[str] = OMIT, + workflow_language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreatePublicImportJobCompatApiV2PublicImportsPost200Envelope]: """ @@ -515,6 +550,12 @@ async def create_public_import_job_compat_api( channel_id : typing.Optional[str] + mapping_template_id : typing.Optional[str] + + mapping_template_revision : typing.Optional[int] + + mapping_template_state : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + record_ids : typing.Optional[typing.Sequence[str]] source_record : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] @@ -532,6 +573,14 @@ async def create_public_import_job_compat_api( dry_run : typing.Optional[bool] + idempotency_key : typing.Optional[str] + + workflow_action_tracker_id : typing.Optional[str] + + action_tracker_id : typing.Optional[str] + + workflow_language : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -554,6 +603,9 @@ async def create_public_import_job_compat_api( "custom_object_id": custom_object_id, "provider": provider, "channel_id": channel_id, + "mapping_template_id": mapping_template_id, + "mapping_template_revision": mapping_template_revision, + "mapping_template_state": mapping_template_state, "record_ids": record_ids, "source_record": source_record, "operation": operation, @@ -564,6 +616,10 @@ async def create_public_import_job_compat_api( object_=column_mappings, annotation=typing.Sequence[TransferColumnMapping], direction="write" ), "dry_run": dry_run, + "idempotency_key": idempotency_key, + "workflow_action_tracker_id": workflow_action_tracker_id, + "action_tracker_id": action_tracker_id, + "workflow_language": workflow_language, }, headers={ "content-type": "application/json", diff --git a/src/sanka_sdk/inventories/client.py b/src/sanka_sdk/inventories/client.py index 1205845..83b4c6a 100644 --- a/src/sanka_sdk/inventories/client.py +++ b/src/sanka_sdk/inventories/client.py @@ -49,6 +49,7 @@ def list_public_inventories_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_inventories_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_inventories_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -423,6 +427,7 @@ async def list_public_inventories_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -450,6 +455,8 @@ async def list_public_inventories_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -503,6 +510,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/inventories/raw_client.py b/src/sanka_sdk/inventories/raw_client.py index df0a239..7b7a346 100644 --- a/src/sanka_sdk/inventories/raw_client.py +++ b/src/sanka_sdk/inventories/raw_client.py @@ -45,6 +45,7 @@ def list_public_inventories_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_inventories_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_inventories_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -561,6 +565,7 @@ async def list_public_inventories_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -588,6 +593,8 @@ async def list_public_inventories_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -626,6 +633,7 @@ async def list_public_inventories_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/inventory_transactions/client.py b/src/sanka_sdk/inventory_transactions/client.py index 998409b..d892c24 100644 --- a/src/sanka_sdk/inventory_transactions/client.py +++ b/src/sanka_sdk/inventory_transactions/client.py @@ -49,6 +49,7 @@ def list_public_inventory_transactions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_inventory_transactions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_inventory_transactions_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -412,6 +416,7 @@ async def list_public_inventory_transactions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -439,6 +444,8 @@ async def list_public_inventory_transactions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -492,6 +499,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/inventory_transactions/raw_client.py b/src/sanka_sdk/inventory_transactions/raw_client.py index 816795d..88ea285 100644 --- a/src/sanka_sdk/inventory_transactions/raw_client.py +++ b/src/sanka_sdk/inventory_transactions/raw_client.py @@ -45,6 +45,7 @@ def list_public_inventory_transactions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_inventory_transactions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_inventory_transactions_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -549,6 +553,7 @@ async def list_public_inventory_transactions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -576,6 +581,8 @@ async def list_public_inventory_transactions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -614,6 +621,7 @@ async def list_public_inventory_transactions_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/invoices/client.py b/src/sanka_sdk/invoices/client.py index bcac44c..146016c 100644 --- a/src/sanka_sdk/invoices/client.py +++ b/src/sanka_sdk/invoices/client.py @@ -68,6 +68,7 @@ def list_public_invoices_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -95,6 +96,8 @@ def list_public_invoices_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -140,6 +143,7 @@ def list_public_invoices_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -761,6 +765,7 @@ async def list_public_invoices_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -788,6 +793,8 @@ async def list_public_invoices_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -841,6 +848,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/invoices/raw_client.py b/src/sanka_sdk/invoices/raw_client.py index 25e0a46..0609417 100644 --- a/src/sanka_sdk/invoices/raw_client.py +++ b/src/sanka_sdk/invoices/raw_client.py @@ -66,6 +66,7 @@ def list_public_invoices_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -93,6 +94,8 @@ def list_public_invoices_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -131,6 +134,7 @@ def list_public_invoices_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -1097,6 +1101,7 @@ async def list_public_invoices_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -1124,6 +1129,8 @@ async def list_public_invoices_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -1162,6 +1169,7 @@ async def list_public_invoices_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/items/client.py b/src/sanka_sdk/items/client.py index e8e727e..6b80e6c 100644 --- a/src/sanka_sdk/items/client.py +++ b/src/sanka_sdk/items/client.py @@ -49,6 +49,7 @@ def list_public_items_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_items_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_items_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -383,6 +387,7 @@ async def list_public_items_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -410,6 +415,8 @@ async def list_public_items_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -463,6 +470,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/items/raw_client.py b/src/sanka_sdk/items/raw_client.py index e22c8b0..72615c0 100644 --- a/src/sanka_sdk/items/raw_client.py +++ b/src/sanka_sdk/items/raw_client.py @@ -45,6 +45,7 @@ def list_public_items_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_items_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_items_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -521,6 +525,7 @@ async def list_public_items_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -548,6 +553,8 @@ async def list_public_items_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -586,6 +593,7 @@ async def list_public_items_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/journals/client.py b/src/sanka_sdk/journals/client.py index ec05c91..c21d3c2 100644 --- a/src/sanka_sdk/journals/client.py +++ b/src/sanka_sdk/journals/client.py @@ -59,6 +59,7 @@ def list_public_journals_api( search: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -88,6 +89,8 @@ def list_public_journals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -134,6 +137,7 @@ def list_public_journals_api( search=search, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -539,6 +543,7 @@ async def list_public_journals_api( search: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -568,6 +573,8 @@ async def list_public_journals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -622,6 +629,7 @@ async def main() -> None: search=search, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/journals/raw_client.py b/src/sanka_sdk/journals/raw_client.py index ff07334..d0891ca 100644 --- a/src/sanka_sdk/journals/raw_client.py +++ b/src/sanka_sdk/journals/raw_client.py @@ -56,6 +56,7 @@ def list_public_journals_api( search: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -85,6 +86,8 @@ def list_public_journals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -124,6 +127,7 @@ def list_public_journals_api( "search": search, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -856,6 +860,7 @@ async def list_public_journals_api( search: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -885,6 +890,8 @@ async def list_public_journals_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -924,6 +931,7 @@ async def list_public_journals_api( "search": search, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/locations/client.py b/src/sanka_sdk/locations/client.py index 5d860a8..60af596 100644 --- a/src/sanka_sdk/locations/client.py +++ b/src/sanka_sdk/locations/client.py @@ -49,6 +49,7 @@ def list_public_locations_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_locations_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_locations_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -380,6 +384,7 @@ async def list_public_locations_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -407,6 +412,8 @@ async def list_public_locations_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -460,6 +467,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/locations/raw_client.py b/src/sanka_sdk/locations/raw_client.py index 96fdaa6..993c713 100644 --- a/src/sanka_sdk/locations/raw_client.py +++ b/src/sanka_sdk/locations/raw_client.py @@ -45,6 +45,7 @@ def list_public_locations_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_locations_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_locations_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -517,6 +521,7 @@ async def list_public_locations_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -544,6 +549,8 @@ async def list_public_locations_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -582,6 +589,7 @@ async def list_public_locations_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/lookout/__init__.py b/src/sanka_sdk/lookout/__init__.py new file mode 100644 index 0000000..5cde020 --- /dev/null +++ b/src/sanka_sdk/lookout/__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/lookout/client.py b/src/sanka_sdk/lookout/client.py new file mode 100644 index 0000000..51fd087 --- /dev/null +++ b/src/sanka_sdk/lookout/client.py @@ -0,0 +1,709 @@ +# 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.claim_provider_action_api_v_2_lookout_provider_actions_action_id_claim_post_200_envelope import ( + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, +) +from ..types.complete_provider_action_api_v_2_lookout_provider_actions_action_id_complete_post_200_envelope import ( + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, +) +from ..types.ingest_clay_signal_api_v_2_lookout_connectors_clay_signals_post_200_envelope import ( + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, +) +from ..types.ingest_provider_signal_api_v_2_lookout_connectors_provider_signals_post_200_envelope import ( + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, +) +from ..types.list_provider_actions_api_v_2_lookout_provider_actions_get_200_envelope import ( + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, +) +from ..types.lookout_provider_action_complete_request_status import LookoutProviderActionCompleteRequestStatus +from .raw_client import AsyncRawLookoutClient, RawLookoutClient + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class LookoutClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawLookoutClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawLookoutClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawLookoutClient + """ + return self._raw_client + + def ingest_clay_signal_api( + self, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope: + """ + Parameters + ---------- + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.lookout.ingest_clay_signal_api( + signal_type="signal_type", + dedupe_key="dedupe_key", + ) + """ + _response = self._raw_client.ingest_clay_signal_api( + signal_type=signal_type, + dedupe_key=dedupe_key, + workspace_id=workspace_id, + provider=provider, + occurred_at=occurred_at, + account=account, + contact=contact, + attributes=attributes, + source_url=source_url, + confidence=confidence, + raw_payload=raw_payload, + request_options=request_options, + ) + return _response.data + + def ingest_provider_signal_api( + self, + provider_: str, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope: + """ + Parameters + ---------- + provider_ : str + + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.lookout.ingest_provider_signal_api( + provider_="provider", + signal_type="signal_type", + dedupe_key="dedupe_key", + ) + """ + _response = self._raw_client.ingest_provider_signal_api( + provider_, + signal_type=signal_type, + dedupe_key=dedupe_key, + workspace_id=workspace_id, + provider=provider, + occurred_at=occurred_at, + account=account, + contact=contact, + attributes=attributes, + source_url=source_url, + confidence=confidence, + raw_payload=raw_payload, + request_options=request_options, + ) + return _response.data + + def list_provider_actions_api( + self, + *, + provider: typing.Optional[str] = None, + status: typing.Optional[str] = None, + run_id: typing.Optional[str] = None, + limit: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListProviderActionsApiV2LookoutProviderActionsGet200Envelope: + """ + Parameters + ---------- + provider : typing.Optional[str] + + status : typing.Optional[str] + + run_id : typing.Optional[str] + + limit : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.lookout.list_provider_actions_api() + """ + _response = self._raw_client.list_provider_actions_api( + provider=provider, + status=status, + run_id=run_id, + limit=limit, + workspace_id=workspace_id, + request_options=request_options, + ) + return _response.data + + def claim_provider_action_api( + self, + action_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope: + """ + Parameters + ---------- + action_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.lookout.claim_provider_action_api( + action_id="action_id", + ) + """ + _response = self._raw_client.claim_provider_action_api( + action_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + def complete_provider_action_api( + self, + action_id: str, + *, + status: LookoutProviderActionCompleteRequestStatus, + workspace_id: typing.Optional[str] = None, + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + error: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope: + """ + Parameters + ---------- + action_id : str + + status : LookoutProviderActionCompleteRequestStatus + + workspace_id : typing.Optional[str] + + provider_response : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + error : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.lookout.complete_provider_action_api( + action_id="action_id", + status="succeeded", + ) + """ + _response = self._raw_client.complete_provider_action_api( + action_id, + status=status, + workspace_id=workspace_id, + provider_response=provider_response, + error=error, + request_options=request_options, + ) + return _response.data + + +class AsyncLookoutClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawLookoutClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawLookoutClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawLookoutClient + """ + return self._raw_client + + async def ingest_clay_signal_api( + self, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope: + """ + Parameters + ---------- + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope + 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.lookout.ingest_clay_signal_api( + signal_type="signal_type", + dedupe_key="dedupe_key", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.ingest_clay_signal_api( + signal_type=signal_type, + dedupe_key=dedupe_key, + workspace_id=workspace_id, + provider=provider, + occurred_at=occurred_at, + account=account, + contact=contact, + attributes=attributes, + source_url=source_url, + confidence=confidence, + raw_payload=raw_payload, + request_options=request_options, + ) + return _response.data + + async def ingest_provider_signal_api( + self, + provider_: str, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope: + """ + Parameters + ---------- + provider_ : str + + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope + 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.lookout.ingest_provider_signal_api( + provider_="provider", + signal_type="signal_type", + dedupe_key="dedupe_key", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.ingest_provider_signal_api( + provider_, + signal_type=signal_type, + dedupe_key=dedupe_key, + workspace_id=workspace_id, + provider=provider, + occurred_at=occurred_at, + account=account, + contact=contact, + attributes=attributes, + source_url=source_url, + confidence=confidence, + raw_payload=raw_payload, + request_options=request_options, + ) + return _response.data + + async def list_provider_actions_api( + self, + *, + provider: typing.Optional[str] = None, + status: typing.Optional[str] = None, + run_id: typing.Optional[str] = None, + limit: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListProviderActionsApiV2LookoutProviderActionsGet200Envelope: + """ + Parameters + ---------- + provider : typing.Optional[str] + + status : typing.Optional[str] + + run_id : typing.Optional[str] + + limit : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope + 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.lookout.list_provider_actions_api() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_provider_actions_api( + provider=provider, + status=status, + run_id=run_id, + limit=limit, + workspace_id=workspace_id, + request_options=request_options, + ) + return _response.data + + async def claim_provider_action_api( + self, + action_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope: + """ + Parameters + ---------- + action_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope + 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.lookout.claim_provider_action_api( + action_id="action_id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.claim_provider_action_api( + action_id, workspace_id=workspace_id, request_options=request_options + ) + return _response.data + + async def complete_provider_action_api( + self, + action_id: str, + *, + status: LookoutProviderActionCompleteRequestStatus, + workspace_id: typing.Optional[str] = None, + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + error: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope: + """ + Parameters + ---------- + action_id : str + + status : LookoutProviderActionCompleteRequestStatus + + workspace_id : typing.Optional[str] + + provider_response : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + error : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope + 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.lookout.complete_provider_action_api( + action_id="action_id", + status="succeeded", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.complete_provider_action_api( + action_id, + status=status, + workspace_id=workspace_id, + provider_response=provider_response, + error=error, + request_options=request_options, + ) + return _response.data diff --git a/src/sanka_sdk/lookout/raw_client.py b/src/sanka_sdk/lookout/raw_client.py new file mode 100644 index 0000000..c46375b --- /dev/null +++ b/src/sanka_sdk/lookout/raw_client.py @@ -0,0 +1,954 @@ +# 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.unchecked_base_model import construct_type +from ..errors.unauthorized_error import UnauthorizedError +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.claim_provider_action_api_v_2_lookout_provider_actions_action_id_claim_post_200_envelope import ( + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, +) +from ..types.complete_provider_action_api_v_2_lookout_provider_actions_action_id_complete_post_200_envelope import ( + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, +) +from ..types.error_envelope import ErrorEnvelope +from ..types.ingest_clay_signal_api_v_2_lookout_connectors_clay_signals_post_200_envelope import ( + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, +) +from ..types.ingest_provider_signal_api_v_2_lookout_connectors_provider_signals_post_200_envelope import ( + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, +) +from ..types.list_provider_actions_api_v_2_lookout_provider_actions_get_200_envelope import ( + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, +) +from ..types.lookout_provider_action_complete_request_status import LookoutProviderActionCompleteRequestStatus + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawLookoutClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def ingest_clay_signal_api( + self, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope]: + """ + Parameters + ---------- + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v2/lookout/connectors/clay/signals", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "provider": provider, + "signal_type": signal_type, + "dedupe_key": dedupe_key, + "occurred_at": occurred_at, + "account": account, + "contact": contact, + "attributes": attributes, + "source_url": source_url, + "confidence": confidence, + "raw_payload": raw_payload, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, + construct_type( + type_=IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, # 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 == 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 ingest_provider_signal_api( + self, + provider_: str, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope]: + """ + Parameters + ---------- + provider_ : str + + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/lookout/connectors/{jsonable_encoder(provider_)}/signals", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "provider": provider, + "signal_type": signal_type, + "dedupe_key": dedupe_key, + "occurred_at": occurred_at, + "account": account, + "contact": contact, + "attributes": attributes, + "source_url": source_url, + "confidence": confidence, + "raw_payload": raw_payload, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, + construct_type( + type_=IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, # 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 == 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_provider_actions_api( + self, + *, + provider: typing.Optional[str] = None, + status: typing.Optional[str] = None, + run_id: typing.Optional[str] = None, + limit: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ListProviderActionsApiV2LookoutProviderActionsGet200Envelope]: + """ + Parameters + ---------- + provider : typing.Optional[str] + + status : typing.Optional[str] + + run_id : typing.Optional[str] + + limit : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ListProviderActionsApiV2LookoutProviderActionsGet200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v2/lookout/provider-actions", + method="GET", + params={ + "provider": provider, + "status": status, + "run_id": run_id, + "limit": limit, + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, + construct_type( + type_=ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, # 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 == 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 claim_provider_action_api( + self, + action_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope]: + """ + Parameters + ---------- + action_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/lookout/provider-actions/{jsonable_encoder(action_id)}/claim", + method="POST", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, + construct_type( + type_=ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, # 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 == 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 complete_provider_action_api( + self, + action_id: str, + *, + status: LookoutProviderActionCompleteRequestStatus, + workspace_id: typing.Optional[str] = None, + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + error: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope]: + """ + Parameters + ---------- + action_id : str + + status : LookoutProviderActionCompleteRequestStatus + + workspace_id : typing.Optional[str] + + provider_response : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + error : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + f"v2/lookout/provider-actions/{jsonable_encoder(action_id)}/complete", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "status": status, + "provider_response": provider_response, + "error": error, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, + construct_type( + type_=CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, # 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 == 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 AsyncRawLookoutClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def ingest_clay_signal_api( + self, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope]: + """ + Parameters + ---------- + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v2/lookout/connectors/clay/signals", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "provider": provider, + "signal_type": signal_type, + "dedupe_key": dedupe_key, + "occurred_at": occurred_at, + "account": account, + "contact": contact, + "attributes": attributes, + "source_url": source_url, + "confidence": confidence, + "raw_payload": raw_payload, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, + construct_type( + type_=IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope, # 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 == 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 ingest_provider_signal_api( + self, + provider_: str, + *, + signal_type: str, + dedupe_key: str, + workspace_id: typing.Optional[str] = None, + provider: typing.Optional[str] = OMIT, + occurred_at: typing.Optional[dt.datetime] = OMIT, + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + source_url: typing.Optional[str] = OMIT, + confidence: typing.Optional[float] = OMIT, + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope]: + """ + Parameters + ---------- + provider_ : str + + signal_type : str + + dedupe_key : str + + workspace_id : typing.Optional[str] + + provider : typing.Optional[str] + + occurred_at : typing.Optional[dt.datetime] + + account : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + contact : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + attributes : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + source_url : typing.Optional[str] + + confidence : typing.Optional[float] + + raw_payload : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/lookout/connectors/{jsonable_encoder(provider_)}/signals", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "provider": provider, + "signal_type": signal_type, + "dedupe_key": dedupe_key, + "occurred_at": occurred_at, + "account": account, + "contact": contact, + "attributes": attributes, + "source_url": source_url, + "confidence": confidence, + "raw_payload": raw_payload, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, + construct_type( + type_=IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope, # 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 == 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_provider_actions_api( + self, + *, + provider: typing.Optional[str] = None, + status: typing.Optional[str] = None, + run_id: typing.Optional[str] = None, + limit: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ListProviderActionsApiV2LookoutProviderActionsGet200Envelope]: + """ + Parameters + ---------- + provider : typing.Optional[str] + + status : typing.Optional[str] + + run_id : typing.Optional[str] + + limit : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ListProviderActionsApiV2LookoutProviderActionsGet200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v2/lookout/provider-actions", + method="GET", + params={ + "provider": provider, + "status": status, + "run_id": run_id, + "limit": limit, + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, + construct_type( + type_=ListProviderActionsApiV2LookoutProviderActionsGet200Envelope, # 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 == 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 claim_provider_action_api( + self, + action_id: str, + *, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope]: + """ + Parameters + ---------- + action_id : str + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/lookout/provider-actions/{jsonable_encoder(action_id)}/claim", + method="POST", + params={ + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, + construct_type( + type_=ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope, # 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 == 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 complete_provider_action_api( + self, + action_id: str, + *, + status: LookoutProviderActionCompleteRequestStatus, + workspace_id: typing.Optional[str] = None, + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT, + error: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope]: + """ + Parameters + ---------- + action_id : str + + status : LookoutProviderActionCompleteRequestStatus + + workspace_id : typing.Optional[str] + + provider_response : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] + + error : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + f"v2/lookout/provider-actions/{jsonable_encoder(action_id)}/complete", + method="POST", + params={ + "workspace_id": workspace_id, + }, + json={ + "status": status, + "provider_response": provider_response, + "error": error, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, + construct_type( + type_=CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope, # 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 == 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/meters/client.py b/src/sanka_sdk/meters/client.py index 6306e1e..f7c7211 100644 --- a/src/sanka_sdk/meters/client.py +++ b/src/sanka_sdk/meters/client.py @@ -49,6 +49,7 @@ def list_public_meters_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_meters_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_meters_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -423,6 +427,7 @@ async def list_public_meters_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -450,6 +455,8 @@ async def list_public_meters_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -503,6 +510,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/meters/raw_client.py b/src/sanka_sdk/meters/raw_client.py index 130e1e8..dde9dec 100644 --- a/src/sanka_sdk/meters/raw_client.py +++ b/src/sanka_sdk/meters/raw_client.py @@ -45,6 +45,7 @@ def list_public_meters_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -72,6 +73,8 @@ def list_public_meters_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -110,6 +113,7 @@ def list_public_meters_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -561,6 +565,7 @@ async def list_public_meters_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -588,6 +593,8 @@ async def list_public_meters_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -626,6 +633,7 @@ async def list_public_meters_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/orders/client.py b/src/sanka_sdk/orders/client.py index ea2c0c6..cd999c7 100644 --- a/src/sanka_sdk/orders/client.py +++ b/src/sanka_sdk/orders/client.py @@ -57,6 +57,7 @@ def list_public_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -84,6 +85,8 @@ def list_public_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -129,6 +132,7 @@ def list_public_orders_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -537,6 +541,7 @@ async def list_public_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -564,6 +569,8 @@ async def list_public_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -617,6 +624,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/orders/raw_client.py b/src/sanka_sdk/orders/raw_client.py index 2fc49a2..96667ea 100644 --- a/src/sanka_sdk/orders/raw_client.py +++ b/src/sanka_sdk/orders/raw_client.py @@ -55,6 +55,7 @@ def list_public_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -82,6 +83,8 @@ def list_public_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -120,6 +123,7 @@ def list_public_orders_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -782,6 +786,7 @@ async def list_public_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -809,6 +814,8 @@ async def list_public_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -847,6 +854,7 @@ async def list_public_orders_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/payments/client.py b/src/sanka_sdk/payments/client.py index 83d7139..ca48c9f 100644 --- a/src/sanka_sdk/payments/client.py +++ b/src/sanka_sdk/payments/client.py @@ -19,6 +19,7 @@ from ..types.list_public_payments_api_v_2_public_payments_get_200_envelope import ( ListPublicPaymentsApiV2PublicPaymentsGet200Envelope, ) +from ..types.payment_allocation_save_input import PaymentAllocationSaveInput from ..types.update_public_payment_allocations_api_v_2_public_payments_payment_id_allocations_put_200_envelope import ( UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope, ) @@ -55,6 +56,7 @@ def list_public_payments_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -82,6 +84,8 @@ def list_public_payments_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -127,6 +131,7 @@ def list_public_payments_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -486,12 +491,12 @@ def update_public_payment_allocations_api( self, payment_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, + allocations: typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope: """ @@ -499,8 +504,6 @@ def update_public_payment_allocations_api( ---------- payment_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -511,6 +514,8 @@ def update_public_payment_allocations_api( accept_language : typing.Optional[str] + allocations : typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -529,17 +534,16 @@ def update_public_payment_allocations_api( ) client.payments.update_public_payment_allocations_api( payment_id="payment_id", - request={"key": "value"}, ) """ _response = self._raw_client.update_public_payment_allocations_api( payment_id, - request=request, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, accept_language=accept_language, + allocations=allocations, request_options=request_options, ) return _response.data @@ -569,6 +573,7 @@ async def list_public_payments_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -596,6 +601,8 @@ async def list_public_payments_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -649,6 +656,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -1057,12 +1065,12 @@ async def update_public_payment_allocations_api( self, payment_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, + allocations: typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope: """ @@ -1070,8 +1078,6 @@ async def update_public_payment_allocations_api( ---------- payment_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -1082,6 +1088,8 @@ async def update_public_payment_allocations_api( accept_language : typing.Optional[str] + allocations : typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1105,7 +1113,6 @@ async def update_public_payment_allocations_api( async def main() -> None: await client.payments.update_public_payment_allocations_api( payment_id="payment_id", - request={"key": "value"}, ) @@ -1113,12 +1120,12 @@ async def main() -> None: """ _response = await self._raw_client.update_public_payment_allocations_api( payment_id, - request=request, external_id=external_id, lang=lang, language=language, workspace_id=workspace_id, accept_language=accept_language, + allocations=allocations, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/payments/raw_client.py b/src/sanka_sdk/payments/raw_client.py index 13e72be..8db4139 100644 --- a/src/sanka_sdk/payments/raw_client.py +++ b/src/sanka_sdk/payments/raw_client.py @@ -9,6 +9,7 @@ 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.unauthorized_error import UnauthorizedError from ..errors.unprocessable_entity_error import UnprocessableEntityError @@ -28,6 +29,7 @@ from ..types.list_public_payments_api_v_2_public_payments_get_200_envelope import ( ListPublicPaymentsApiV2PublicPaymentsGet200Envelope, ) +from ..types.payment_allocation_save_input import PaymentAllocationSaveInput from ..types.update_public_payment_allocations_api_v_2_public_payments_payment_id_allocations_put_200_envelope import ( UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope, ) @@ -52,6 +54,7 @@ def list_public_payments_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -79,6 +82,8 @@ def list_public_payments_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -117,6 +122,7 @@ def list_public_payments_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -696,12 +702,12 @@ def update_public_payment_allocations_api( self, payment_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, + allocations: typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope]: """ @@ -709,8 +715,6 @@ def update_public_payment_allocations_api( ---------- payment_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -721,6 +725,8 @@ def update_public_payment_allocations_api( accept_language : typing.Optional[str] + allocations : typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -738,7 +744,11 @@ def update_public_payment_allocations_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "allocations": convert_and_respect_annotation_metadata( + object_=allocations, annotation=typing.Sequence[PaymentAllocationSaveInput], direction="write" + ), + }, headers={ "content-type": "application/json", "Accept-Language": str(accept_language) if accept_language is not None else None, @@ -797,6 +807,7 @@ async def list_public_payments_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -824,6 +835,8 @@ async def list_public_payments_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -862,6 +875,7 @@ async def list_public_payments_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -1442,12 +1456,12 @@ async def update_public_payment_allocations_api( self, payment_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], external_id: typing.Optional[str] = None, lang: typing.Optional[str] = None, language: typing.Optional[str] = None, workspace_id: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, + allocations: typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UpdatePublicPaymentAllocationsApiV2PublicPaymentsPaymentIdAllocationsPut200Envelope]: """ @@ -1455,8 +1469,6 @@ async def update_public_payment_allocations_api( ---------- payment_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - external_id : typing.Optional[str] lang : typing.Optional[str] @@ -1467,6 +1479,8 @@ async def update_public_payment_allocations_api( accept_language : typing.Optional[str] + allocations : typing.Optional[typing.Sequence[PaymentAllocationSaveInput]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1484,7 +1498,11 @@ async def update_public_payment_allocations_api( "language": language, "workspace_id": workspace_id, }, - json=request, + json={ + "allocations": convert_and_respect_annotation_metadata( + object_=allocations, annotation=typing.Sequence[PaymentAllocationSaveInput], direction="write" + ), + }, headers={ "content-type": "application/json", "Accept-Language": str(accept_language) if accept_language is not None else None, diff --git a/src/sanka_sdk/payroll/client.py b/src/sanka_sdk/payroll/client.py index 06d757f..aa9095a 100644 --- a/src/sanka_sdk/payroll/client.py +++ b/src/sanka_sdk/payroll/client.py @@ -364,8 +364,11 @@ def create_public_payroll_journal_entry_api( self, run_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], workspace_id: typing.Optional[str] = None, + debit_account: typing.Optional[str] = OMIT, + credit_account: typing.Optional[str] = OMIT, + deductions_account: typing.Optional[str] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost200Envelope: """ @@ -373,10 +376,16 @@ def create_public_payroll_journal_entry_api( ---------- run_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - workspace_id : typing.Optional[str] + debit_account : typing.Optional[str] + + credit_account : typing.Optional[str] + + deductions_account : typing.Optional[str] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -395,11 +404,16 @@ def create_public_payroll_journal_entry_api( ) client.payroll.create_public_payroll_journal_entry_api( run_id="run_id", - request={"key": "value"}, ) """ _response = self._raw_client.create_public_payroll_journal_entry_api( - run_id, request=request, workspace_id=workspace_id, request_options=request_options + run_id, + workspace_id=workspace_id, + debit_account=debit_account, + credit_account=credit_account, + deductions_account=deductions_account, + notes=notes, + request_options=request_options, ) return _response.data @@ -834,8 +848,11 @@ async def create_public_payroll_journal_entry_api( self, run_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], workspace_id: typing.Optional[str] = None, + debit_account: typing.Optional[str] = OMIT, + credit_account: typing.Optional[str] = OMIT, + deductions_account: typing.Optional[str] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost200Envelope: """ @@ -843,10 +860,16 @@ async def create_public_payroll_journal_entry_api( ---------- run_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - workspace_id : typing.Optional[str] + debit_account : typing.Optional[str] + + credit_account : typing.Optional[str] + + deductions_account : typing.Optional[str] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -870,14 +893,19 @@ async def create_public_payroll_journal_entry_api( async def main() -> None: await client.payroll.create_public_payroll_journal_entry_api( run_id="run_id", - request={"key": "value"}, ) asyncio.run(main()) """ _response = await self._raw_client.create_public_payroll_journal_entry_api( - run_id, request=request, workspace_id=workspace_id, request_options=request_options + run_id, + workspace_id=workspace_id, + debit_account=debit_account, + credit_account=credit_account, + deductions_account=deductions_account, + notes=notes, + request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/payroll/raw_client.py b/src/sanka_sdk/payroll/raw_client.py index be3e5f3..a0d3909 100644 --- a/src/sanka_sdk/payroll/raw_client.py +++ b/src/sanka_sdk/payroll/raw_client.py @@ -544,8 +544,11 @@ def create_public_payroll_journal_entry_api( self, run_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], workspace_id: typing.Optional[str] = None, + debit_account: typing.Optional[str] = OMIT, + credit_account: typing.Optional[str] = OMIT, + deductions_account: typing.Optional[str] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreatePublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost200Envelope]: """ @@ -553,10 +556,16 @@ def create_public_payroll_journal_entry_api( ---------- run_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - workspace_id : typing.Optional[str] + debit_account : typing.Optional[str] + + credit_account : typing.Optional[str] + + deductions_account : typing.Optional[str] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -571,7 +580,12 @@ def create_public_payroll_journal_entry_api( params={ "workspace_id": workspace_id, }, - json=request, + json={ + "debit_account": debit_account, + "credit_account": credit_account, + "deductions_account": deductions_account, + "notes": notes, + }, headers={ "content-type": "application/json", }, @@ -1197,8 +1211,11 @@ async def create_public_payroll_journal_entry_api( self, run_id: str, *, - request: typing.Dict[str, typing.Optional[typing.Any]], workspace_id: typing.Optional[str] = None, + debit_account: typing.Optional[str] = OMIT, + credit_account: typing.Optional[str] = OMIT, + deductions_account: typing.Optional[str] = OMIT, + notes: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreatePublicPayrollJournalEntryApiV2PublicPayrollRunsRunIdJournalEntryPost200Envelope]: """ @@ -1206,10 +1223,16 @@ async def create_public_payroll_journal_entry_api( ---------- run_id : str - request : typing.Dict[str, typing.Optional[typing.Any]] - workspace_id : typing.Optional[str] + debit_account : typing.Optional[str] + + credit_account : typing.Optional[str] + + deductions_account : typing.Optional[str] + + notes : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -1224,7 +1247,12 @@ async def create_public_payroll_journal_entry_api( params={ "workspace_id": workspace_id, }, - json=request, + json={ + "debit_account": debit_account, + "credit_account": credit_account, + "deductions_account": deductions_account, + "notes": notes, + }, headers={ "content-type": "application/json", }, diff --git a/src/sanka_sdk/projects/client.py b/src/sanka_sdk/projects/client.py index 997e795..546ce83 100644 --- a/src/sanka_sdk/projects/client.py +++ b/src/sanka_sdk/projects/client.py @@ -16,7 +16,6 @@ from ..types.list_public_projects_api_v_2_public_projects_get_200_envelope import ( ListPublicProjectsApiV2PublicProjectsGet200Envelope, ) -from ..types.public_project_delete_request import PublicProjectDeleteRequest from ..types.public_project_status_request import PublicProjectStatusRequest from ..types.update_public_project_api_v_2_public_projects_project_id_put_200_envelope import ( UpdatePublicProjectApiV2PublicProjectsProjectIdPut200Envelope, @@ -42,7 +41,7 @@ def with_raw_response(self) -> RawProjectsClient: """ return self._raw_client - def list( + def list_public_projects_api( self, *, page: typing.Optional[int] = None, @@ -83,7 +82,7 @@ def list( Returns ------- ListPublicProjectsApiV2PublicProjectsGet200Envelope - Project list response + Successful Response Examples -------- @@ -93,9 +92,9 @@ def list( workspace_code="YOUR_WORKSPACE_CODE", token="YOUR_TOKEN", ) - client.projects.list() + client.projects.list_public_projects_api() """ - _response = self._raw_client.list( + _response = self._raw_client.list_public_projects_api( page=page, limit=limit, search=search, @@ -109,9 +108,10 @@ def list( ) return _response.data - def create( + def create_public_project_api( self, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -123,6 +123,8 @@ def create( """ Parameters ---------- + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -151,9 +153,10 @@ def create( workspace_code="YOUR_WORKSPACE_CODE", token="YOUR_TOKEN", ) - client.projects.create() + client.projects.create_public_project_api() """ - _response = self._raw_client.create( + _response = self._raw_client.create_public_project_api( + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, title=title, @@ -164,7 +167,7 @@ def create( ) return _response.data - def retrieve( + def get_public_project_api( self, project_id: str, *, @@ -190,7 +193,7 @@ def retrieve( Returns ------- GetPublicProjectApiV2PublicProjectsProjectIdGet200Envelope - Project detail response + Successful Response Examples -------- @@ -200,11 +203,11 @@ def retrieve( workspace_code="YOUR_WORKSPACE_CODE", token="YOUR_TOKEN", ) - client.projects.retrieve( + client.projects.get_public_project_api( project_id="project_id", ) """ - _response = self._raw_client.retrieve( + _response = self._raw_client.get_public_project_api( project_id, workspace_id=workspace_id, x_language=x_language, @@ -213,10 +216,11 @@ def retrieve( ) return _response.data - def update( + def update_public_project_api( self, project_id: str, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -230,6 +234,8 @@ def update( ---------- project_id : str + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -258,12 +264,13 @@ def update( workspace_code="YOUR_WORKSPACE_CODE", token="YOUR_TOKEN", ) - client.projects.update( + client.projects.update_public_project_api( project_id="project_id", ) """ - _response = self._raw_client.update( + _response = self._raw_client.update_public_project_api( project_id, + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, title=title, @@ -274,15 +281,15 @@ def update( ) return _response.data - def delete( + def delete_public_project_api( self, project_id: str, *, replacement_project_id: typing.Optional[str] = None, clear_task_project: typing.Optional[bool] = None, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, - request: typing.Optional[PublicProjectDeleteRequest] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DeletePublicProjectApiV2PublicProjectsProjectIdDelete200Envelope: """ @@ -294,12 +301,12 @@ def delete( clear_task_project : typing.Optional[bool] + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] - request : typing.Optional[PublicProjectDeleteRequest] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -310,24 +317,23 @@ def delete( Examples -------- - from sanka_sdk import PublicProjectDeleteRequest, SankaClient + from sanka_sdk import SankaClient client = SankaClient( workspace_code="YOUR_WORKSPACE_CODE", token="YOUR_TOKEN", ) - client.projects.delete( + client.projects.delete_public_project_api( project_id="project_id", - request=PublicProjectDeleteRequest(), ) """ - _response = self._raw_client.delete( + _response = self._raw_client.delete_public_project_api( project_id, replacement_project_id=replacement_project_id, clear_task_project=clear_task_project, + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, - request=request, request_options=request_options, ) return _response.data @@ -348,7 +354,7 @@ def with_raw_response(self) -> AsyncRawProjectsClient: """ return self._raw_client - async def list( + async def list_public_projects_api( self, *, page: typing.Optional[int] = None, @@ -389,7 +395,7 @@ async def list( Returns ------- ListPublicProjectsApiV2PublicProjectsGet200Envelope - Project list response + Successful Response Examples -------- @@ -404,12 +410,12 @@ async def list( async def main() -> None: - await client.projects.list() + await client.projects.list_public_projects_api() asyncio.run(main()) """ - _response = await self._raw_client.list( + _response = await self._raw_client.list_public_projects_api( page=page, limit=limit, search=search, @@ -423,9 +429,10 @@ async def main() -> None: ) return _response.data - async def create( + async def create_public_project_api( self, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -437,6 +444,8 @@ async def create( """ Parameters ---------- + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -470,12 +479,13 @@ async def create( async def main() -> None: - await client.projects.create() + await client.projects.create_public_project_api() asyncio.run(main()) """ - _response = await self._raw_client.create( + _response = await self._raw_client.create_public_project_api( + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, title=title, @@ -486,7 +496,7 @@ async def main() -> None: ) return _response.data - async def retrieve( + async def get_public_project_api( self, project_id: str, *, @@ -512,7 +522,7 @@ async def retrieve( Returns ------- GetPublicProjectApiV2PublicProjectsProjectIdGet200Envelope - Project detail response + Successful Response Examples -------- @@ -527,14 +537,14 @@ async def retrieve( async def main() -> None: - await client.projects.retrieve( + await client.projects.get_public_project_api( project_id="project_id", ) asyncio.run(main()) """ - _response = await self._raw_client.retrieve( + _response = await self._raw_client.get_public_project_api( project_id, workspace_id=workspace_id, x_language=x_language, @@ -543,10 +553,11 @@ async def main() -> None: ) return _response.data - async def update( + async def update_public_project_api( self, project_id: str, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -560,6 +571,8 @@ async def update( ---------- project_id : str + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -593,15 +606,16 @@ async def update( async def main() -> None: - await client.projects.update( + await client.projects.update_public_project_api( project_id="project_id", ) asyncio.run(main()) """ - _response = await self._raw_client.update( + _response = await self._raw_client.update_public_project_api( project_id, + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, title=title, @@ -612,15 +626,15 @@ async def main() -> None: ) return _response.data - async def delete( + async def delete_public_project_api( self, project_id: str, *, replacement_project_id: typing.Optional[str] = None, clear_task_project: typing.Optional[bool] = None, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, - request: typing.Optional[PublicProjectDeleteRequest] = None, request_options: typing.Optional[RequestOptions] = None, ) -> DeletePublicProjectApiV2PublicProjectsProjectIdDelete200Envelope: """ @@ -632,12 +646,12 @@ async def delete( clear_task_project : typing.Optional[bool] + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] - request : typing.Optional[PublicProjectDeleteRequest] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -650,7 +664,7 @@ async def delete( -------- import asyncio - from sanka_sdk import AsyncSankaClient, PublicProjectDeleteRequest + from sanka_sdk import AsyncSankaClient client = AsyncSankaClient( workspace_code="YOUR_WORKSPACE_CODE", @@ -659,21 +673,20 @@ async def delete( async def main() -> None: - await client.projects.delete( + await client.projects.delete_public_project_api( project_id="project_id", - request=PublicProjectDeleteRequest(), ) asyncio.run(main()) """ - _response = await self._raw_client.delete( + _response = await self._raw_client.delete_public_project_api( project_id, replacement_project_id=replacement_project_id, clear_task_project=clear_task_project, + workspace_id=workspace_id, x_language=x_language, accept_language=accept_language, - request=request, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/projects/raw_client.py b/src/sanka_sdk/projects/raw_client.py index 56fae8d..254a75d 100644 --- a/src/sanka_sdk/projects/raw_client.py +++ b/src/sanka_sdk/projects/raw_client.py @@ -10,7 +10,6 @@ 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.conflict_error import ConflictError from ..errors.unauthorized_error import UnauthorizedError from ..errors.unprocessable_entity_error import UnprocessableEntityError from ..types.create_public_project_api_v_2_public_projects_post_200_envelope import ( @@ -26,7 +25,6 @@ from ..types.list_public_projects_api_v_2_public_projects_get_200_envelope import ( ListPublicProjectsApiV2PublicProjectsGet200Envelope, ) -from ..types.public_project_delete_request import PublicProjectDeleteRequest from ..types.public_project_status_request import PublicProjectStatusRequest from ..types.update_public_project_api_v_2_public_projects_project_id_put_200_envelope import ( UpdatePublicProjectApiV2PublicProjectsProjectIdPut200Envelope, @@ -40,7 +38,7 @@ class RawProjectsClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def list( + def list_public_projects_api( self, *, page: typing.Optional[int] = None, @@ -81,7 +79,7 @@ def list( Returns ------- HttpResponse[ListPublicProjectsApiV2PublicProjectsGet200Envelope] - Project list response + Successful Response """ _response = self._client_wrapper.httpx_client.request( "v2/public/projects", @@ -138,9 +136,10 @@ def list( 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( + def create_public_project_api( self, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -152,6 +151,8 @@ def create( """ Parameters ---------- + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -175,6 +176,9 @@ def create( _response = self._client_wrapper.httpx_client.request( "v2/public/projects", method="POST", + params={ + "workspace_id": workspace_id, + }, json={ "title": title, "description": description, @@ -230,7 +234,7 @@ def create( 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 retrieve( + def get_public_project_api( self, project_id: str, *, @@ -256,7 +260,7 @@ def retrieve( Returns ------- HttpResponse[GetPublicProjectApiV2PublicProjectsProjectIdGet200Envelope] - Project detail response + Successful Response """ _response = self._client_wrapper.httpx_client.request( f"v2/public/projects/{jsonable_encoder(project_id)}", @@ -307,10 +311,11 @@ def retrieve( 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( + def update_public_project_api( self, project_id: str, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -324,6 +329,8 @@ def update( ---------- project_id : str + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -347,6 +354,9 @@ def update( _response = self._client_wrapper.httpx_client.request( f"v2/public/projects/{jsonable_encoder(project_id)}", method="PUT", + params={ + "workspace_id": workspace_id, + }, json={ "title": title, "description": description, @@ -402,15 +412,15 @@ def update( 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( + def delete_public_project_api( self, project_id: str, *, replacement_project_id: typing.Optional[str] = None, clear_task_project: typing.Optional[bool] = None, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, - request: typing.Optional[PublicProjectDeleteRequest] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[DeletePublicProjectApiV2PublicProjectsProjectIdDelete200Envelope]: """ @@ -422,12 +432,12 @@ def delete( clear_task_project : typing.Optional[bool] + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] - request : typing.Optional[PublicProjectDeleteRequest] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -442,17 +452,13 @@ def delete( params={ "replacement_project_id": replacement_project_id, "clear_task_project": clear_task_project, + "workspace_id": workspace_id, }, - json=convert_and_respect_annotation_metadata( - object_=request, annotation=typing.Optional[PublicProjectDeleteRequest], direction="write" - ), headers={ - "content-type": "application/json", "X-Language": str(x_language) if x_language is not None else None, "Accept-Language": str(accept_language) if accept_language is not None else None, }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -475,17 +481,6 @@ def delete( ), ), ) - if _response.status_code == 409: - raise ConflictError( - 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), @@ -507,7 +502,7 @@ class AsyncRawProjectsClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def list( + async def list_public_projects_api( self, *, page: typing.Optional[int] = None, @@ -548,7 +543,7 @@ async def list( Returns ------- AsyncHttpResponse[ListPublicProjectsApiV2PublicProjectsGet200Envelope] - Project list response + Successful Response """ _response = await self._client_wrapper.httpx_client.request( "v2/public/projects", @@ -605,9 +600,10 @@ async def list( 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( + async def create_public_project_api( self, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -619,6 +615,8 @@ async def create( """ Parameters ---------- + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -642,6 +640,9 @@ async def create( _response = await self._client_wrapper.httpx_client.request( "v2/public/projects", method="POST", + params={ + "workspace_id": workspace_id, + }, json={ "title": title, "description": description, @@ -697,7 +698,7 @@ async def create( 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 retrieve( + async def get_public_project_api( self, project_id: str, *, @@ -723,7 +724,7 @@ async def retrieve( Returns ------- AsyncHttpResponse[GetPublicProjectApiV2PublicProjectsProjectIdGet200Envelope] - Project detail response + Successful Response """ _response = await self._client_wrapper.httpx_client.request( f"v2/public/projects/{jsonable_encoder(project_id)}", @@ -774,10 +775,11 @@ async def retrieve( 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( + async def update_public_project_api( self, project_id: str, *, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, title: typing.Optional[str] = OMIT, @@ -791,6 +793,8 @@ async def update( ---------- project_id : str + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] @@ -814,6 +818,9 @@ async def update( _response = await self._client_wrapper.httpx_client.request( f"v2/public/projects/{jsonable_encoder(project_id)}", method="PUT", + params={ + "workspace_id": workspace_id, + }, json={ "title": title, "description": description, @@ -869,15 +876,15 @@ async def update( 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( + async def delete_public_project_api( self, project_id: str, *, replacement_project_id: typing.Optional[str] = None, clear_task_project: typing.Optional[bool] = None, + workspace_id: typing.Optional[str] = None, x_language: typing.Optional[str] = None, accept_language: typing.Optional[str] = None, - request: typing.Optional[PublicProjectDeleteRequest] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[DeletePublicProjectApiV2PublicProjectsProjectIdDelete200Envelope]: """ @@ -889,12 +896,12 @@ async def delete( clear_task_project : typing.Optional[bool] + workspace_id : typing.Optional[str] + x_language : typing.Optional[str] accept_language : typing.Optional[str] - request : typing.Optional[PublicProjectDeleteRequest] - request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -909,17 +916,13 @@ async def delete( params={ "replacement_project_id": replacement_project_id, "clear_task_project": clear_task_project, + "workspace_id": workspace_id, }, - json=convert_and_respect_annotation_metadata( - object_=request, annotation=typing.Optional[PublicProjectDeleteRequest], direction="write" - ), headers={ - "content-type": "application/json", "X-Language": str(x_language) if x_language is not None else None, "Accept-Language": str(accept_language) if accept_language is not None else None, }, request_options=request_options, - omit=OMIT, ) try: if 200 <= _response.status_code < 300: @@ -942,17 +945,6 @@ async def delete( ), ), ) - if _response.status_code == 409: - raise ConflictError( - 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), diff --git a/src/sanka_sdk/purchase_orders/client.py b/src/sanka_sdk/purchase_orders/client.py index a667934..caf7bc9 100644 --- a/src/sanka_sdk/purchase_orders/client.py +++ b/src/sanka_sdk/purchase_orders/client.py @@ -53,6 +53,7 @@ def list_public_purchase_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -80,6 +81,8 @@ def list_public_purchase_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -125,6 +128,7 @@ def list_public_purchase_orders_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -486,6 +490,7 @@ async def list_public_purchase_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -513,6 +518,8 @@ async def list_public_purchase_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -566,6 +573,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/purchase_orders/raw_client.py b/src/sanka_sdk/purchase_orders/raw_client.py index 5884cd5..a8378c5 100644 --- a/src/sanka_sdk/purchase_orders/raw_client.py +++ b/src/sanka_sdk/purchase_orders/raw_client.py @@ -50,6 +50,7 @@ def list_public_purchase_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -77,6 +78,8 @@ def list_public_purchase_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -115,6 +118,7 @@ def list_public_purchase_orders_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -693,6 +697,7 @@ async def list_public_purchase_orders_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -720,6 +725,8 @@ async def list_public_purchase_orders_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -758,6 +765,7 @@ async def list_public_purchase_orders_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/revenues/client.py b/src/sanka_sdk/revenues/client.py index 1a8c5e2..810f0f2 100644 --- a/src/sanka_sdk/revenues/client.py +++ b/src/sanka_sdk/revenues/client.py @@ -49,6 +49,7 @@ def list_public_slips_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -76,6 +77,8 @@ def list_public_slips_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -121,6 +124,7 @@ def list_public_slips_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -444,6 +448,7 @@ async def list_public_slips_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -471,6 +476,8 @@ async def list_public_slips_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -524,6 +531,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/revenues/raw_client.py b/src/sanka_sdk/revenues/raw_client.py index 33920fe..6bd09c2 100644 --- a/src/sanka_sdk/revenues/raw_client.py +++ b/src/sanka_sdk/revenues/raw_client.py @@ -46,6 +46,7 @@ def list_public_slips_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -73,6 +74,8 @@ def list_public_slips_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -111,6 +114,7 @@ def list_public_slips_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -615,6 +619,7 @@ async def list_public_slips_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -642,6 +647,8 @@ async def list_public_slips_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -680,6 +687,7 @@ async def list_public_slips_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/sanka_buy/__init__.py b/src/sanka_sdk/sanka_buy/__init__.py new file mode 100644 index 0000000..5cde020 --- /dev/null +++ b/src/sanka_sdk/sanka_buy/__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/sanka_buy/client.py b/src/sanka_sdk/sanka_buy/client.py new file mode 100644 index 0000000..efa21a8 --- /dev/null +++ b/src/sanka_sdk/sanka_buy/client.py @@ -0,0 +1,160 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.request_options import RequestOptions +from ..types.list_public_buy_offers_api_v_2_public_buy_offers_get_200_envelope import ( + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, +) +from .raw_client import AsyncRawSankaBuyClient, RawSankaBuyClient + + +class SankaBuyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawSankaBuyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawSankaBuyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawSankaBuyClient + """ + return self._raw_client + + def list_public_buy_offers_api( + self, + *, + request_id: typing.Optional[str] = None, + provider: typing.Optional[str] = None, + latest_only: typing.Optional[bool] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope: + """ + Parameters + ---------- + request_id : typing.Optional[str] + + provider : typing.Optional[str] + + latest_only : typing.Optional[bool] + + page : typing.Optional[int] + + page_size : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope + Successful Response + + Examples + -------- + from sanka_sdk import SankaClient + + client = SankaClient( + workspace_code="YOUR_WORKSPACE_CODE", + token="YOUR_TOKEN", + ) + client.sanka_buy.list_public_buy_offers_api() + """ + _response = self._raw_client.list_public_buy_offers_api( + request_id=request_id, + provider=provider, + latest_only=latest_only, + page=page, + page_size=page_size, + workspace_id=workspace_id, + request_options=request_options, + ) + return _response.data + + +class AsyncSankaBuyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawSankaBuyClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawSankaBuyClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawSankaBuyClient + """ + return self._raw_client + + async def list_public_buy_offers_api( + self, + *, + request_id: typing.Optional[str] = None, + provider: typing.Optional[str] = None, + latest_only: typing.Optional[bool] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope: + """ + Parameters + ---------- + request_id : typing.Optional[str] + + provider : typing.Optional[str] + + latest_only : typing.Optional[bool] + + page : typing.Optional[int] + + page_size : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope + 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.sanka_buy.list_public_buy_offers_api() + + + asyncio.run(main()) + """ + _response = await self._raw_client.list_public_buy_offers_api( + request_id=request_id, + provider=provider, + latest_only=latest_only, + page=page, + page_size=page_size, + workspace_id=workspace_id, + request_options=request_options, + ) + return _response.data diff --git a/src/sanka_sdk/sanka_buy/raw_client.py b/src/sanka_sdk/sanka_buy/raw_client.py new file mode 100644 index 0000000..bbe8c90 --- /dev/null +++ b/src/sanka_sdk/sanka_buy/raw_client.py @@ -0,0 +1,194 @@ +# This file was auto-generated by Fern from our API Definition. + +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.request_options import RequestOptions +from ..core.unchecked_base_model import construct_type +from ..errors.unauthorized_error import UnauthorizedError +from ..errors.unprocessable_entity_error import UnprocessableEntityError +from ..types.error_envelope import ErrorEnvelope +from ..types.list_public_buy_offers_api_v_2_public_buy_offers_get_200_envelope import ( + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, +) + + +class RawSankaBuyClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list_public_buy_offers_api( + self, + *, + request_id: typing.Optional[str] = None, + provider: typing.Optional[str] = None, + latest_only: typing.Optional[bool] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope]: + """ + Parameters + ---------- + request_id : typing.Optional[str] + + provider : typing.Optional[str] + + latest_only : typing.Optional[bool] + + page : typing.Optional[int] + + page_size : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope] + Successful Response + """ + _response = self._client_wrapper.httpx_client.request( + "v2/public/buy/offers", + method="GET", + params={ + "request_id": request_id, + "provider": provider, + "latest_only": latest_only, + "page": page, + "page_size": page_size, + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, + construct_type( + type_=ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, # 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 == 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 AsyncRawSankaBuyClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list_public_buy_offers_api( + self, + *, + request_id: typing.Optional[str] = None, + provider: typing.Optional[str] = None, + latest_only: typing.Optional[bool] = None, + page: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, + workspace_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope]: + """ + Parameters + ---------- + request_id : typing.Optional[str] + + provider : typing.Optional[str] + + latest_only : typing.Optional[bool] + + page : typing.Optional[int] + + page_size : typing.Optional[int] + + workspace_id : typing.Optional[str] + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope] + Successful Response + """ + _response = await self._client_wrapper.httpx_client.request( + "v2/public/buy/offers", + method="GET", + params={ + "request_id": request_id, + "provider": provider, + "latest_only": latest_only, + "page": page, + "page_size": page_size, + "workspace_id": workspace_id, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, + construct_type( + type_=ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope, # 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 == 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/subscriptions/client.py b/src/sanka_sdk/subscriptions/client.py index c7a2246..8a17034 100644 --- a/src/sanka_sdk/subscriptions/client.py +++ b/src/sanka_sdk/subscriptions/client.py @@ -52,6 +52,7 @@ def list_public_subscriptions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -79,6 +80,8 @@ def list_public_subscriptions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -124,6 +127,7 @@ def list_public_subscriptions_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -453,6 +457,7 @@ async def list_public_subscriptions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -480,6 +485,8 @@ async def list_public_subscriptions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -533,6 +540,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/subscriptions/raw_client.py b/src/sanka_sdk/subscriptions/raw_client.py index e1dc035..61cbe86 100644 --- a/src/sanka_sdk/subscriptions/raw_client.py +++ b/src/sanka_sdk/subscriptions/raw_client.py @@ -48,6 +48,7 @@ def list_public_subscriptions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -75,6 +76,8 @@ def list_public_subscriptions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -113,6 +116,7 @@ def list_public_subscriptions_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -626,6 +630,7 @@ async def list_public_subscriptions_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -653,6 +658,8 @@ async def list_public_subscriptions_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -691,6 +698,7 @@ async def list_public_subscriptions_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/tasks/client.py b/src/sanka_sdk/tasks/client.py index 2075268..2949d09 100644 --- a/src/sanka_sdk/tasks/client.py +++ b/src/sanka_sdk/tasks/client.py @@ -51,6 +51,7 @@ def list_public_tasks_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -82,6 +83,8 @@ def list_public_tasks_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -129,6 +132,7 @@ def list_public_tasks_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -382,6 +386,7 @@ async def list_public_tasks_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -413,6 +418,8 @@ async def list_public_tasks_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -468,6 +475,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/tasks/raw_client.py b/src/sanka_sdk/tasks/raw_client.py index 172c76d..30397bc 100644 --- a/src/sanka_sdk/tasks/raw_client.py +++ b/src/sanka_sdk/tasks/raw_client.py @@ -47,6 +47,7 @@ def list_public_tasks_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -78,6 +79,8 @@ def list_public_tasks_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -118,6 +121,7 @@ def list_public_tasks_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -519,6 +523,7 @@ async def list_public_tasks_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -550,6 +555,8 @@ async def list_public_tasks_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -590,6 +597,7 @@ async def list_public_tasks_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, diff --git a/src/sanka_sdk/tickets/client.py b/src/sanka_sdk/tickets/client.py index bea36ea..0cab1fb 100644 --- a/src/sanka_sdk/tickets/client.py +++ b/src/sanka_sdk/tickets/client.py @@ -55,6 +55,7 @@ def list_public_tickets_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -82,6 +83,8 @@ def list_public_tickets_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -127,6 +130,7 @@ def list_public_tickets_api( language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, @@ -473,6 +477,7 @@ async def list_public_tickets_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -500,6 +505,8 @@ async def list_public_tickets_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -553,6 +560,7 @@ async def main() -> None: language=language, status=status, usage_status=usage_status, + filters=filters, page=page, limit=limit, cursor=cursor, diff --git a/src/sanka_sdk/tickets/raw_client.py b/src/sanka_sdk/tickets/raw_client.py index a49706c..a6292e0 100644 --- a/src/sanka_sdk/tickets/raw_client.py +++ b/src/sanka_sdk/tickets/raw_client.py @@ -51,6 +51,7 @@ def list_public_tickets_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -78,6 +79,8 @@ def list_public_tickets_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -116,6 +119,7 @@ def list_public_tickets_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, @@ -667,6 +671,7 @@ async def list_public_tickets_api( language: typing.Optional[str] = None, status: typing.Optional[str] = None, usage_status: typing.Optional[str] = None, + filters: typing.Optional[str] = None, page: typing.Optional[int] = None, limit: typing.Optional[int] = None, cursor: typing.Optional[str] = None, @@ -694,6 +699,8 @@ async def list_public_tickets_api( usage_status : typing.Optional[str] + filters : typing.Optional[str] + page : typing.Optional[int] limit : typing.Optional[int] @@ -732,6 +739,7 @@ async def list_public_tickets_api( "language": language, "status": status, "usage_status": usage_status, + "filters": filters, "page": page, "limit": limit, "cursor": cursor, 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/claim_provider_action_api_v_2_lookout_ad_actions_action_id_claim_post_200_envelope.py b/src/sanka_sdk/types/claim_provider_action_api_v_2_lookout_ad_actions_action_id_claim_post_200_envelope.py new file mode 100644 index 0000000..3b43967 --- /dev/null +++ b/src/sanka_sdk/types/claim_provider_action_api_v_2_lookout_ad_actions_action_id_claim_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 .lookout_provider_action_data import LookoutProviderActionData + + +class ClaimProviderActionApiV2LookoutAdActionsActionIdClaimPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionData + 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/claim_provider_action_api_v_2_lookout_provider_actions_action_id_claim_post_200_envelope.py b/src/sanka_sdk/types/claim_provider_action_api_v_2_lookout_provider_actions_action_id_claim_post_200_envelope.py new file mode 100644 index 0000000..cf3ea8a --- /dev/null +++ b/src/sanka_sdk/types/claim_provider_action_api_v_2_lookout_provider_actions_action_id_claim_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 .lookout_provider_action_data import LookoutProviderActionData + + +class ClaimProviderActionApiV2LookoutProviderActionsActionIdClaimPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionData + 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/complete_provider_action_api_v_2_lookout_ad_actions_action_id_complete_post_200_envelope.py b/src/sanka_sdk/types/complete_provider_action_api_v_2_lookout_ad_actions_action_id_complete_post_200_envelope.py new file mode 100644 index 0000000..753413f --- /dev/null +++ b/src/sanka_sdk/types/complete_provider_action_api_v_2_lookout_ad_actions_action_id_complete_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 .lookout_provider_action_data import LookoutProviderActionData + + +class CompleteProviderActionApiV2LookoutAdActionsActionIdCompletePost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionData + 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/complete_provider_action_api_v_2_lookout_provider_actions_action_id_complete_post_200_envelope.py b/src/sanka_sdk/types/complete_provider_action_api_v_2_lookout_provider_actions_action_id_complete_post_200_envelope.py new file mode 100644 index 0000000..0434404 --- /dev/null +++ b/src/sanka_sdk/types/complete_provider_action_api_v_2_lookout_provider_actions_action_id_complete_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 .lookout_provider_action_data import LookoutProviderActionData + + +class CompleteProviderActionApiV2LookoutProviderActionsActionIdCompletePost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionData + 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/export_template_filter_field_input.py b/src/sanka_sdk/types/export_template_filter_field_input.py new file mode 100644 index 0000000..67e4707 --- /dev/null +++ b/src/sanka_sdk/types/export_template_filter_field_input.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 + + +class ExportTemplateFilterFieldInput(UncheckedBaseModel): + filter_type: typing.Optional[str] = None + filter_option: typing.Optional[str] = None + filter_value: 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_data.py b/src/sanka_sdk/types/ferry_program_data.py new file mode 100644 index 0000000..e9c68e9 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_data.py @@ -0,0 +1,77 @@ +# 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_phase import FerryProgramPhase +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 + description: typing.Optional[str] = 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 + 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 + task_phases: typing_extensions.Annotated[ + typing.Optional[typing.List[FerryProgramPhase]], FieldMetadata(alias="taskPhases") + ] = 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/public_project_delete_request.py b/src/sanka_sdk/types/ferry_program_list_data.py similarity index 75% rename from src/sanka_sdk/types/public_project_delete_request.py rename to src/sanka_sdk/types/ferry_program_list_data.py index fd207f5..ce08217 100644 --- a/src/sanka_sdk/types/public_project_delete_request.py +++ b/src/sanka_sdk/types/ferry_program_list_data.py @@ -5,11 +5,12 @@ import pydantic from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel +from .ferry_program_data import FerryProgramData -class PublicProjectDeleteRequest(UncheckedBaseModel): - replacement_project_id: typing.Optional[str] = None - clear_task_project: typing.Optional[bool] = None +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 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_phase.py b/src/sanka_sdk/types/ferry_program_phase.py new file mode 100644 index 0000000..7319c3f --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_phase.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 + + +class FerryProgramPhase(UncheckedBaseModel): + id: str + name: str + name_ja: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nameJa")] = None + sort_order: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="sortOrder")] = 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.py b/src/sanka_sdk/types/ferry_program_todo.py new file mode 100644 index 0000000..64b7aeb --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo.py @@ -0,0 +1,39 @@ +# 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 + phase_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phaseId")] = None + parent_todo_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="parentTodoId")] = None + sort_order: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="sortOrder")] = 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..ede70a1 --- /dev/null +++ b/src/sanka_sdk/types/ferry_program_todo_batch_upsert_item.py @@ -0,0 +1,39 @@ +# 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 + phase_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="phaseId")] = None + parent_todo_id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="parentTodoId")] = None + sort_order: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="sortOrder")] = 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/ingest_clay_signal_api_v_2_lookout_connectors_clay_signals_post_200_envelope.py b/src/sanka_sdk/types/ingest_clay_signal_api_v_2_lookout_connectors_clay_signals_post_200_envelope.py new file mode 100644 index 0000000..709d6b1 --- /dev/null +++ b/src/sanka_sdk/types/ingest_clay_signal_api_v_2_lookout_connectors_clay_signals_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 .lookout_signal_data import LookoutSignalData + + +class IngestClaySignalApiV2LookoutConnectorsClaySignalsPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutSignalData + 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/ingest_provider_signal_api_v_2_lookout_connectors_provider_signals_post_200_envelope.py b/src/sanka_sdk/types/ingest_provider_signal_api_v_2_lookout_connectors_provider_signals_post_200_envelope.py new file mode 100644 index 0000000..81c43df --- /dev/null +++ b/src/sanka_sdk/types/ingest_provider_signal_api_v_2_lookout_connectors_provider_signals_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 .lookout_signal_data import LookoutSignalData + + +class IngestProviderSignalApiV2LookoutConnectorsProviderSignalsPost200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutSignalData + 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_provider_actions_api_v_2_lookout_ad_actions_get_200_envelope.py b/src/sanka_sdk/types/list_provider_actions_api_v_2_lookout_ad_actions_get_200_envelope.py new file mode 100644 index 0000000..c4842bf --- /dev/null +++ b/src/sanka_sdk/types/list_provider_actions_api_v_2_lookout_ad_actions_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 .lookout_provider_action_list_data import LookoutProviderActionListData + + +class ListProviderActionsApiV2LookoutAdActionsGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionListData + 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_provider_actions_api_v_2_lookout_provider_actions_get_200_envelope.py b/src/sanka_sdk/types/list_provider_actions_api_v_2_lookout_provider_actions_get_200_envelope.py new file mode 100644 index 0000000..19f365c --- /dev/null +++ b/src/sanka_sdk/types/list_provider_actions_api_v_2_lookout_provider_actions_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 .lookout_provider_action_list_data import LookoutProviderActionListData + + +class ListProviderActionsApiV2LookoutProviderActionsGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: LookoutProviderActionListData + 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_buy_offers_api_v_2_public_buy_offers_get_200_envelope.py b/src/sanka_sdk/types/list_public_buy_offers_api_v_2_public_buy_offers_get_200_envelope.py new file mode 100644 index 0000000..4c829ed --- /dev/null +++ b/src/sanka_sdk/types/list_public_buy_offers_api_v_2_public_buy_offers_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 .offer_snapshot_list_data import OfferSnapshotListData + + +class ListPublicBuyOffersApiV2PublicBuyOffersGet200Envelope(UncheckedBaseModel): + success: typing.Literal[True] = True + data: OfferSnapshotListData + 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/lookout_provider_action_complete_request.py b/src/sanka_sdk/types/lookout_provider_action_complete_request.py new file mode 100644 index 0000000..a74590b --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_complete_request.py @@ -0,0 +1,23 @@ +# 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 .lookout_provider_action_complete_request_status import LookoutProviderActionCompleteRequestStatus + + +class LookoutProviderActionCompleteRequest(UncheckedBaseModel): + status: LookoutProviderActionCompleteRequestStatus + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + error: 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/lookout_provider_action_complete_request_status.py b/src/sanka_sdk/types/lookout_provider_action_complete_request_status.py new file mode 100644 index 0000000..7558a35 --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_complete_request_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LookoutProviderActionCompleteRequestStatus = typing.Union[typing.Literal["succeeded", "failed"], typing.Any] diff --git a/src/sanka_sdk/types/lookout_provider_action_data.py b/src/sanka_sdk/types/lookout_provider_action_data.py new file mode 100644 index 0000000..97e5913 --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_data.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel +from .lookout_provider_action_data_provider import LookoutProviderActionDataProvider +from .lookout_provider_action_data_status import LookoutProviderActionDataStatus + + +class LookoutProviderActionData(UncheckedBaseModel): + id: str + workspace_id: str + run_id: str + provider: LookoutProviderActionDataProvider + action_slug: str + target_id: typing.Optional[str] = None + campaign_id: typing.Optional[str] = None + input_data: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + safety: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + status: LookoutProviderActionDataStatus + provider_response: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + error: typing.Optional[str] = None + claimed_at: typing.Optional[dt.datetime] = None + completed_at: typing.Optional[dt.datetime] = None + created_at: dt.datetime + updated_at: dt.datetime + + 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/lookout_provider_action_data_provider.py b/src/sanka_sdk/types/lookout_provider_action_data_provider.py new file mode 100644 index 0000000..417c1f6 --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_data_provider.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LookoutProviderActionDataProvider = typing.Union[typing.Literal["google_ads", "meta_ads", "hubspot"], typing.Any] diff --git a/src/sanka_sdk/types/lookout_provider_action_data_status.py b/src/sanka_sdk/types/lookout_provider_action_data_status.py new file mode 100644 index 0000000..e54c572 --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_data_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +LookoutProviderActionDataStatus = typing.Union[typing.Literal["queued", "claimed", "succeeded", "failed"], typing.Any] diff --git a/src/sanka_sdk/types/lookout_provider_action_list_data.py b/src/sanka_sdk/types/lookout_provider_action_list_data.py new file mode 100644 index 0000000..5715d9d --- /dev/null +++ b/src/sanka_sdk/types/lookout_provider_action_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 .lookout_provider_action_data import LookoutProviderActionData + + +class LookoutProviderActionListData(UncheckedBaseModel): + items: typing.Optional[typing.List[LookoutProviderActionData]] = None + total: typing.Optional[int] = 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/lookout_signal_data.py b/src/sanka_sdk/types/lookout_signal_data.py new file mode 100644 index 0000000..f1bb795 --- /dev/null +++ b/src/sanka_sdk/types/lookout_signal_data.py @@ -0,0 +1,36 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LookoutSignalData(UncheckedBaseModel): + provider: typing.Optional[str] = None + signal_type: str + dedupe_key: str + occurred_at: typing.Optional[dt.datetime] = None + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + source_url: typing.Optional[str] = None + confidence: typing.Optional[float] = None + raw_payload: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + id: str + workspace_id: str + status: typing.Optional[str] = None + received_at: dt.datetime + duplicate: typing.Optional[bool] = None + dispatched_motion_ids: typing.Optional[typing.List[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/lookout_signal_request.py b/src/sanka_sdk/types/lookout_signal_request.py new file mode 100644 index 0000000..1be380a --- /dev/null +++ b/src/sanka_sdk/types/lookout_signal_request.py @@ -0,0 +1,30 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class LookoutSignalRequest(UncheckedBaseModel): + provider: typing.Optional[str] = None + signal_type: str + dedupe_key: str + occurred_at: typing.Optional[dt.datetime] = None + account: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + contact: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + attributes: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + source_url: typing.Optional[str] = None + confidence: typing.Optional[float] = None + raw_payload: 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/object_record_list_data.py b/src/sanka_sdk/types/object_record_list_data.py index d83b9a7..8bf9601 100644 --- a/src/sanka_sdk/types/object_record_list_data.py +++ b/src/sanka_sdk/types/object_record_list_data.py @@ -6,6 +6,7 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2 from ..core.unchecked_base_model import UncheckedBaseModel from .object_record_data import ObjectRecordData +from .object_record_subtotal_result import ObjectRecordSubtotalResult from .object_record_view_data import ObjectRecordViewData @@ -19,6 +20,7 @@ class ObjectRecordListData(UncheckedBaseModel): page_size: int total: int next_cursor: typing.Optional[str] = None + subtotals: typing.Optional[typing.List[ObjectRecordSubtotalResult]] = None meta: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: diff --git a/src/sanka_sdk/types/object_record_subtotal_result.py b/src/sanka_sdk/types/object_record_subtotal_result.py new file mode 100644 index 0000000..3974795 --- /dev/null +++ b/src/sanka_sdk/types/object_record_subtotal_result.py @@ -0,0 +1,28 @@ +# 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 .object_record_subtotal_result_operation import ObjectRecordSubtotalResultOperation +from .object_record_subtotal_result_scope import ObjectRecordSubtotalResultScope + + +class ObjectRecordSubtotalResult(UncheckedBaseModel): + field_id: str + operation: ObjectRecordSubtotalResultOperation + value: typing.Optional[typing.Optional[typing.Any]] = None + value_type: str + count: typing.Optional[int] = None + formatted: typing.Optional[str] = None + scope: typing.Optional[ObjectRecordSubtotalResultScope] = 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/object_record_subtotal_result_operation.py b/src/sanka_sdk/types/object_record_subtotal_result_operation.py new file mode 100644 index 0000000..8e58d48 --- /dev/null +++ b/src/sanka_sdk/types/object_record_subtotal_result_operation.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ObjectRecordSubtotalResultOperation = typing.Union[ + typing.Literal["count", "sum", "avg", "median", "min", "max"], typing.Any +] diff --git a/src/sanka_sdk/types/object_record_subtotal_result_scope.py b/src/sanka_sdk/types/object_record_subtotal_result_scope.py new file mode 100644 index 0000000..f28332e --- /dev/null +++ b/src/sanka_sdk/types/object_record_subtotal_result_scope.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ObjectRecordSubtotalResultScope = typing.Union[typing.Literal["page", "view"], typing.Any] diff --git a/src/sanka_sdk/types/offer_snapshot_data.py b/src/sanka_sdk/types/offer_snapshot_data.py new file mode 100644 index 0000000..3839a58 --- /dev/null +++ b/src/sanka_sdk/types/offer_snapshot_data.py @@ -0,0 +1,47 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +from ..core.unchecked_base_model import UncheckedBaseModel + + +class OfferSnapshotData(UncheckedBaseModel): + id: str + buy_request_id: str + buy_request_line_id: str + sourcing_run_id: typing.Optional[str] = None + provider: str + merchant_key: str + merchant_name: str + merchant_domain: typing.Optional[str] = None + provider_product_id: typing.Optional[str] = None + upid: typing.Optional[str] = None + title: str + variant_title: typing.Optional[str] = None + product_url: typing.Optional[str] = None + image_url: typing.Optional[str] = None + quantity: float + unit_price: typing.Optional[float] = None + shipping_amount: typing.Optional[float] = None + tax_amount: typing.Optional[float] = None + total_amount: typing.Optional[float] = None + currency: typing.Optional[str] = None + availability: typing.Optional[str] = None + delivery_estimate: typing.Optional[str] = None + raw_snapshot: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + snapshot_hash: str + snapshot_version: int + captured_at: dt.datetime + expires_at: typing.Optional[dt.datetime] = 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/offer_snapshot_list_data.py b/src/sanka_sdk/types/offer_snapshot_list_data.py new file mode 100644 index 0000000..f6755b7 --- /dev/null +++ b/src/sanka_sdk/types/offer_snapshot_list_data.py @@ -0,0 +1,25 @@ +# 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 .offer_snapshot_data import OfferSnapshotData + + +class OfferSnapshotListData(UncheckedBaseModel): + items: typing.List[OfferSnapshotData] + page: int + page_size: int + total: int + message: 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/order_line_item_mutation_request.py b/src/sanka_sdk/types/order_line_item_mutation_request.py index c3a9781..7136f0c 100644 --- a/src/sanka_sdk/types/order_line_item_mutation_request.py +++ b/src/sanka_sdk/types/order_line_item_mutation_request.py @@ -19,6 +19,9 @@ class OrderLineItemMutationRequest(UncheckedBaseModel): total_price: typing.Optional[float] = None total_price_without_tax: typing.Optional[float] = None currency: typing.Optional[str] = None + row_type: typing.Optional[str] = None + section_label: typing.Optional[str] = None + section_type: typing.Optional[str] = None custom_fields: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None if IS_PYDANTIC_V2: diff --git a/src/sanka_sdk/types/payment_allocation_save_input.py b/src/sanka_sdk/types/payment_allocation_save_input.py new file mode 100644 index 0000000..ae6bbda --- /dev/null +++ b/src/sanka_sdk/types/payment_allocation_save_input.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 + + +class PaymentAllocationSaveInput(UncheckedBaseModel): + invoice_id: str + amount: float + adjustment_amount: typing.Optional[float] = None + adjustment_type: typing.Optional[str] = None + currency: typing.Optional[str] = None + source: typing.Optional[str] = None + notes: 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/public_expense_mutation_request.py b/src/sanka_sdk/types/public_expense_mutation_request.py new file mode 100644 index 0000000..ef644d0 --- /dev/null +++ b/src/sanka_sdk/types/public_expense_mutation_request.py @@ -0,0 +1,30 @@ +# 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 + + +class PublicExpenseMutationRequest(UncheckedBaseModel): + """ + Public expense mutation envelope with typed SDK-friendly overrides. + """ + + view_id: typing.Optional[str] = None + form_view_id: typing.Optional[str] = None + properties: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None + base_currency: typing.Optional[float] = pydantic.Field(default=None) + """ + Explicit amount in the workspace base currency. When omitted, Sanka calculates the value from the expense amount and currency. A provided value takes precedence over automatic conversion. + """ + + 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 diff --git a/src/sanka_sdk/types/view_subtotal_calculation.py b/src/sanka_sdk/types/view_subtotal_calculation.py new file mode 100644 index 0000000..108fcd4 --- /dev/null +++ b/src/sanka_sdk/types/view_subtotal_calculation.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 .view_subtotal_calculation_operation import ViewSubtotalCalculationOperation +from .view_subtotal_calculation_scope import ViewSubtotalCalculationScope + + +class ViewSubtotalCalculation(UncheckedBaseModel): + field_id: str + operation: ViewSubtotalCalculationOperation + scope: typing.Optional[ViewSubtotalCalculationScope] = 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/view_subtotal_calculation_operation.py b/src/sanka_sdk/types/view_subtotal_calculation_operation.py new file mode 100644 index 0000000..0ad5ceb --- /dev/null +++ b/src/sanka_sdk/types/view_subtotal_calculation_operation.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ViewSubtotalCalculationOperation = typing.Union[ + typing.Literal["count", "sum", "avg", "median", "min", "max"], typing.Any +] diff --git a/src/sanka_sdk/types/view_subtotal_calculation_scope.py b/src/sanka_sdk/types/view_subtotal_calculation_scope.py new file mode 100644 index 0000000..3a6bbf4 --- /dev/null +++ b/src/sanka_sdk/types/view_subtotal_calculation_scope.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ViewSubtotalCalculationScope = typing.Union[typing.Literal["page", "view"], typing.Any] diff --git a/src/sanka_sdk/views/client.py b/src/sanka_sdk/views/client.py index 5014f58..30531e8 100644 --- a/src/sanka_sdk/views/client.py +++ b/src/sanka_sdk/views/client.py @@ -22,6 +22,7 @@ from ..types.update_public_view_api_v_2_public_views_view_id_patch_200_envelope import ( UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope, ) +from ..types.view_subtotal_calculation import ViewSubtotalCalculation from .raw_client import AsyncRawViewsClient, RawViewsClient from .types.view_create_request_mode import ViewCreateRequestMode from .types.view_create_request_visibility import ViewCreateRequestVisibility @@ -113,7 +114,9 @@ def create_public_view_api( form_view_id: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewCreateRequestVisibility] = OMIT, mode: typing.Optional[ViewCreateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, column_field_ids: typing.Optional[typing.Sequence[str]] = OMIT, + subtotal_calculations: typing.Optional[typing.Sequence[ViewSubtotalCalculation]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicViewApiV2PublicViewsPost200Envelope: """ @@ -135,8 +138,12 @@ def create_public_view_api( mode : typing.Optional[ViewCreateRequestMode] + group_field_id : typing.Optional[str] + column_field_ids : typing.Optional[typing.Sequence[str]] + subtotal_calculations : typing.Optional[typing.Sequence[ViewSubtotalCalculation]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -166,7 +173,9 @@ def create_public_view_api( form_view_id=form_view_id, visibility=visibility, mode=mode, + group_field_id=group_field_id, column_field_ids=column_field_ids, + subtotal_calculations=subtotal_calculations, request_options=request_options, ) return _response.data @@ -261,6 +270,7 @@ def update_public_view_api( title: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewUpdateRequestVisibility] = OMIT, mode: typing.Optional[ViewUpdateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope: """ @@ -278,6 +288,8 @@ def update_public_view_api( mode : typing.Optional[ViewUpdateRequestMode] + group_field_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -305,6 +317,7 @@ def update_public_view_api( title=title, visibility=visibility, mode=mode, + group_field_id=group_field_id, request_options=request_options, ) return _response.data @@ -454,7 +467,9 @@ async def create_public_view_api( form_view_id: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewCreateRequestVisibility] = OMIT, mode: typing.Optional[ViewCreateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, column_field_ids: typing.Optional[typing.Sequence[str]] = OMIT, + subtotal_calculations: typing.Optional[typing.Sequence[ViewSubtotalCalculation]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreatePublicViewApiV2PublicViewsPost200Envelope: """ @@ -476,8 +491,12 @@ async def create_public_view_api( mode : typing.Optional[ViewCreateRequestMode] + group_field_id : typing.Optional[str] + column_field_ids : typing.Optional[typing.Sequence[str]] + subtotal_calculations : typing.Optional[typing.Sequence[ViewSubtotalCalculation]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -515,7 +534,9 @@ async def main() -> None: form_view_id=form_view_id, visibility=visibility, mode=mode, + group_field_id=group_field_id, column_field_ids=column_field_ids, + subtotal_calculations=subtotal_calculations, request_options=request_options, ) return _response.data @@ -626,6 +647,7 @@ async def update_public_view_api( title: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewUpdateRequestVisibility] = OMIT, mode: typing.Optional[ViewUpdateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope: """ @@ -643,6 +665,8 @@ async def update_public_view_api( mode : typing.Optional[ViewUpdateRequestMode] + group_field_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -678,6 +702,7 @@ async def main() -> None: title=title, visibility=visibility, mode=mode, + group_field_id=group_field_id, request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/views/raw_client.py b/src/sanka_sdk/views/raw_client.py index c18b134..62b077d 100644 --- a/src/sanka_sdk/views/raw_client.py +++ b/src/sanka_sdk/views/raw_client.py @@ -8,6 +8,7 @@ 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.unauthorized_error import UnauthorizedError from ..errors.unprocessable_entity_error import UnprocessableEntityError @@ -30,6 +31,7 @@ from ..types.update_public_view_api_v_2_public_views_view_id_patch_200_envelope import ( UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope, ) +from ..types.view_subtotal_calculation import ViewSubtotalCalculation from .types.view_create_request_mode import ViewCreateRequestMode from .types.view_create_request_visibility import ViewCreateRequestVisibility from .types.view_update_request_mode import ViewUpdateRequestMode @@ -138,7 +140,9 @@ def create_public_view_api( form_view_id: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewCreateRequestVisibility] = OMIT, mode: typing.Optional[ViewCreateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, column_field_ids: typing.Optional[typing.Sequence[str]] = OMIT, + subtotal_calculations: typing.Optional[typing.Sequence[ViewSubtotalCalculation]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreatePublicViewApiV2PublicViewsPost200Envelope]: """ @@ -160,8 +164,12 @@ def create_public_view_api( mode : typing.Optional[ViewCreateRequestMode] + group_field_id : typing.Optional[str] + column_field_ids : typing.Optional[typing.Sequence[str]] + subtotal_calculations : typing.Optional[typing.Sequence[ViewSubtotalCalculation]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -184,7 +192,13 @@ def create_public_view_api( "form_view_id": form_view_id, "visibility": visibility, "mode": mode, + "group_field_id": group_field_id, "column_field_ids": column_field_ids, + "subtotal_calculations": convert_and_respect_annotation_metadata( + object_=subtotal_calculations, + annotation=typing.Sequence[ViewSubtotalCalculation], + direction="write", + ), }, headers={ "content-type": "application/json", @@ -376,6 +390,7 @@ def update_public_view_api( title: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewUpdateRequestVisibility] = OMIT, mode: typing.Optional[ViewUpdateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope]: """ @@ -393,6 +408,8 @@ def update_public_view_api( mode : typing.Optional[ViewUpdateRequestMode] + group_field_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -412,6 +429,7 @@ def update_public_view_api( "title": title, "visibility": visibility, "mode": mode, + "group_field_id": group_field_id, }, headers={ "content-type": "application/json", @@ -639,7 +657,9 @@ async def create_public_view_api( form_view_id: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewCreateRequestVisibility] = OMIT, mode: typing.Optional[ViewCreateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, column_field_ids: typing.Optional[typing.Sequence[str]] = OMIT, + subtotal_calculations: typing.Optional[typing.Sequence[ViewSubtotalCalculation]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreatePublicViewApiV2PublicViewsPost200Envelope]: """ @@ -661,8 +681,12 @@ async def create_public_view_api( mode : typing.Optional[ViewCreateRequestMode] + group_field_id : typing.Optional[str] + column_field_ids : typing.Optional[typing.Sequence[str]] + subtotal_calculations : typing.Optional[typing.Sequence[ViewSubtotalCalculation]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -685,7 +709,13 @@ async def create_public_view_api( "form_view_id": form_view_id, "visibility": visibility, "mode": mode, + "group_field_id": group_field_id, "column_field_ids": column_field_ids, + "subtotal_calculations": convert_and_respect_annotation_metadata( + object_=subtotal_calculations, + annotation=typing.Sequence[ViewSubtotalCalculation], + direction="write", + ), }, headers={ "content-type": "application/json", @@ -877,6 +907,7 @@ async def update_public_view_api( title: typing.Optional[str] = OMIT, visibility: typing.Optional[ViewUpdateRequestVisibility] = OMIT, mode: typing.Optional[ViewUpdateRequestMode] = OMIT, + group_field_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[UpdatePublicViewApiV2PublicViewsViewIdPatch200Envelope]: """ @@ -894,6 +925,8 @@ async def update_public_view_api( mode : typing.Optional[ViewUpdateRequestMode] + group_field_id : typing.Optional[str] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -913,6 +946,7 @@ async def update_public_view_api( "title": title, "visibility": visibility, "mode": mode, + "group_field_id": group_field_id, }, headers={ "content-type": "application/json", diff --git a/src/sanka_sdk/workflows/client.py b/src/sanka_sdk/workflows/client.py index d88f374..1066ff7 100644 --- a/src/sanka_sdk/workflows/client.py +++ b/src/sanka_sdk/workflows/client.py @@ -51,6 +51,7 @@ def list_public_workflows_api( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, status: typing.Optional[str] = None, + include_lookout: typing.Optional[bool] = None, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ListPublicWorkflowsApiV2PublicWorkflowsGet200Envelope: @@ -65,6 +66,8 @@ def list_public_workflows_api( status : typing.Optional[str] + include_lookout : typing.Optional[bool] + workspace_id : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -86,7 +89,13 @@ def list_public_workflows_api( client.workflows.list_public_workflows_api() """ _response = self._raw_client.list_public_workflows_api( - page=page, limit=limit, q=q, status=status, workspace_id=workspace_id, request_options=request_options + page=page, + limit=limit, + q=q, + status=status, + include_lookout=include_lookout, + workspace_id=workspace_id, + request_options=request_options, ) return _response.data @@ -454,6 +463,7 @@ async def list_public_workflows_api( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, status: typing.Optional[str] = None, + include_lookout: typing.Optional[bool] = None, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ListPublicWorkflowsApiV2PublicWorkflowsGet200Envelope: @@ -468,6 +478,8 @@ async def list_public_workflows_api( status : typing.Optional[str] + include_lookout : typing.Optional[bool] + workspace_id : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -497,7 +509,13 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.list_public_workflows_api( - page=page, limit=limit, q=q, status=status, workspace_id=workspace_id, request_options=request_options + page=page, + limit=limit, + q=q, + status=status, + include_lookout=include_lookout, + workspace_id=workspace_id, + request_options=request_options, ) return _response.data diff --git a/src/sanka_sdk/workflows/raw_client.py b/src/sanka_sdk/workflows/raw_client.py index dff5145..6b8f79a 100644 --- a/src/sanka_sdk/workflows/raw_client.py +++ b/src/sanka_sdk/workflows/raw_client.py @@ -49,6 +49,7 @@ def list_public_workflows_api( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, status: typing.Optional[str] = None, + include_lookout: typing.Optional[bool] = None, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ListPublicWorkflowsApiV2PublicWorkflowsGet200Envelope]: @@ -63,6 +64,8 @@ def list_public_workflows_api( status : typing.Optional[str] + include_lookout : typing.Optional[bool] + workspace_id : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -81,6 +84,7 @@ def list_public_workflows_api( "limit": limit, "q": q, "status": status, + "include_lookout": include_lookout, "workspace_id": workspace_id, }, request_options=request_options, @@ -698,6 +702,7 @@ async def list_public_workflows_api( limit: typing.Optional[int] = None, q: typing.Optional[str] = None, status: typing.Optional[str] = None, + include_lookout: typing.Optional[bool] = None, workspace_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ListPublicWorkflowsApiV2PublicWorkflowsGet200Envelope]: @@ -712,6 +717,8 @@ async def list_public_workflows_api( status : typing.Optional[str] + include_lookout : typing.Optional[bool] + workspace_id : typing.Optional[str] request_options : typing.Optional[RequestOptions] @@ -730,6 +737,7 @@ async def list_public_workflows_api( "limit": limit, "q": q, "status": status, + "include_lookout": include_lookout, "workspace_id": workspace_id, }, request_options=request_options,