Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .spec-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9fe47587946f7ab984ac1dd701c85c15c368a67c
22d7f164e18c741e9d6e2cba0f280a3a3af4d153
14 changes: 12 additions & 2 deletions src/onepin/.fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@
"generatorConfig": {
"client_class_name": "OnePinClient",
"package_name": "onepin",
"flat_layout": false
"flat_layout": false,
"additional_init_exports": [
{
"from": "_version_gate",
"imports": [
"make_client",
"make_async_client",
"OnePinUpgradeRequiredError"
]
}
]
},
"originGitCommit": "2bb9115ea1292fce9ca3019bd7c90ba226cc58b6",
"originGitCommit": "e61a07d289073104a086ed6aec6161a6169f829a",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"ciProvider": "github"
Expand Down
57 changes: 43 additions & 14 deletions src/onepin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
if typing.TYPE_CHECKING:
from .types import (
ApiCountedListResponseApiKeyOut,
ApiCountedListResponseCatalogVoiceOut,
ApiCountedListResponseVoiceOut,
ApiCountedListResponseWorkflowListItem,
ApiCountedListResponseWorkflowRunListItem,
Expand All @@ -19,6 +20,8 @@
ApiKeyOut,
ApiKeyRotateOut,
ApiKeyScope,
ApiListResponseCatalogModelOut,
ApiListResponseCatalogProviderOut,
ApiListResponseCustomerPlanResponse,
ApiListResponseDictionaryOut,
ApiListResponseNodePortsOut,
Expand All @@ -33,6 +36,8 @@
ApiResponseApiKeyRotateOut,
ApiResponseAuthWhoamiOut,
ApiResponseBalanceResponse,
ApiResponseCatalogModelOut,
ApiResponseCatalogProviderOut,
ApiResponseCheckoutResponse,
ApiResponseCustomerPlanChangePreviewResponse,
ApiResponseCustomerSubscriptionResponse,
Expand Down Expand Up @@ -73,6 +78,10 @@
AuthWhoamiOut,
AuthWhoamiOutAuthKind,
BalanceResponse,
CatalogLink,
CatalogModelOut,
CatalogProviderOut,
CatalogVoiceOut,
CheckoutResponse,
CountedPaginationMeta,
CustomerPlanChangePreviewResponse,
Expand Down Expand Up @@ -180,8 +189,8 @@
WorkflowRunDataRowOut,
WorkflowRunDataRowOutAutoCorrectedStatus,
WorkflowRunDataRowOutScriptStatus,
WorkflowRunDataScoresOut,
WorkflowRunDataScoresOutAccuracyStatus,
WorkflowRunDataValidationOut,
WorkflowRunDataValidationOutStatus,
WorkflowRunDataVoiceOut,
WorkflowRunDataVoiceOutStatus,
WorkflowRunDetailOut,
Expand Down Expand Up @@ -222,6 +231,7 @@
health,
nodes,
provider_keys,
providers,
templates,
uploads,
usage,
Expand All @@ -235,6 +245,7 @@
workspaces,
)
from ._default_clients import DefaultAioHttpClient, DefaultAsyncHttpxClient
from ._version_gate import OnePinUpgradeRequiredError, make_async_client, make_client
from .client import AsyncOnePinClient, OnePinClient
from .dictionary import (
ListDictionaryEntriesApiV1DictionaryGetRequestLanguage,
Expand Down Expand Up @@ -265,6 +276,7 @@
from .workflows import ListWorkflowsRequestOrderItem, ListWorkflowsRequestSortItem
_dynamic_imports: typing.Dict[str, str] = {
"ApiCountedListResponseApiKeyOut": ".types",
"ApiCountedListResponseCatalogVoiceOut": ".types",
"ApiCountedListResponseVoiceOut": ".types",
"ApiCountedListResponseWorkflowListItem": ".types",
"ApiCountedListResponseWorkflowRunListItem": ".types",
Expand All @@ -276,6 +288,8 @@
"ApiKeyOut": ".types",
"ApiKeyRotateOut": ".types",
"ApiKeyScope": ".types",
"ApiListResponseCatalogModelOut": ".types",
"ApiListResponseCatalogProviderOut": ".types",
"ApiListResponseCustomerPlanResponse": ".types",
"ApiListResponseDictionaryOut": ".types",
"ApiListResponseNodePortsOut": ".types",
Expand All @@ -290,6 +304,8 @@
"ApiResponseApiKeyRotateOut": ".types",
"ApiResponseAuthWhoamiOut": ".types",
"ApiResponseBalanceResponse": ".types",
"ApiResponseCatalogModelOut": ".types",
"ApiResponseCatalogProviderOut": ".types",
"ApiResponseCheckoutResponse": ".types",
"ApiResponseCustomerPlanChangePreviewResponse": ".types",
"ApiResponseCustomerSubscriptionResponse": ".types",
Expand Down Expand Up @@ -331,6 +347,10 @@
"AuthWhoamiOut": ".types",
"AuthWhoamiOutAuthKind": ".types",
"BalanceResponse": ".types",
"CatalogLink": ".types",
"CatalogModelOut": ".types",
"CatalogProviderOut": ".types",
"CatalogVoiceOut": ".types",
"CheckoutResponse": ".types",
"ConflictError": ".errors",
"CountedPaginationMeta": ".types",
Expand Down Expand Up @@ -385,6 +405,7 @@
"NumericOption": ".types",
"OnePinClient": ".client",
"OnePinClientEnvironment": ".environment",
"OnePinUpgradeRequiredError": "._version_gate",
"PaginationMeta": ".types",
"PaymentMethodResponse": ".types",
"PlanDetails": ".types",
Expand Down Expand Up @@ -467,8 +488,8 @@
"WorkflowRunDataRowOut": ".types",
"WorkflowRunDataRowOutAutoCorrectedStatus": ".types",
"WorkflowRunDataRowOutScriptStatus": ".types",
"WorkflowRunDataScoresOut": ".types",
"WorkflowRunDataScoresOutAccuracyStatus": ".types",
"WorkflowRunDataValidationOut": ".types",
"WorkflowRunDataValidationOutStatus": ".types",
"WorkflowRunDataVoiceOut": ".types",
"WorkflowRunDataVoiceOutStatus": ".types",
"WorkflowRunDetailOut": ".types",
Expand Down Expand Up @@ -504,8 +525,11 @@
"billing": ".billing",
"dictionary": ".dictionary",
"health": ".health",
"make_async_client": "._version_gate",
"make_client": "._version_gate",
"nodes": ".nodes",
"provider_keys": ".provider_keys",
"providers": ".providers",
"templates": ".templates",
"uploads": ".uploads",
"usage": ".usage",
Expand All @@ -517,11 +541,6 @@
"workspace_aggregates": ".workspace_aggregates",
"workspace_members": ".workspace_members",
"workspaces": ".workspaces",
# Hand-rolled version gate, re-exported here. Also declared in
# fern/generators.yml `additional_init_exports`, so `fern generate` reproduces these.
"OnePinUpgradeRequiredError": "._version_gate",
"make_async_client": "._version_gate",
"make_client": "._version_gate",
}


Expand All @@ -548,6 +567,7 @@ def __dir__():

__all__ = [
"ApiCountedListResponseApiKeyOut",
"ApiCountedListResponseCatalogVoiceOut",
"ApiCountedListResponseVoiceOut",
"ApiCountedListResponseWorkflowListItem",
"ApiCountedListResponseWorkflowRunListItem",
Expand All @@ -559,6 +579,8 @@ def __dir__():
"ApiKeyOut",
"ApiKeyRotateOut",
"ApiKeyScope",
"ApiListResponseCatalogModelOut",
"ApiListResponseCatalogProviderOut",
"ApiListResponseCustomerPlanResponse",
"ApiListResponseDictionaryOut",
"ApiListResponseNodePortsOut",
Expand All @@ -573,6 +595,8 @@ def __dir__():
"ApiResponseApiKeyRotateOut",
"ApiResponseAuthWhoamiOut",
"ApiResponseBalanceResponse",
"ApiResponseCatalogModelOut",
"ApiResponseCatalogProviderOut",
"ApiResponseCheckoutResponse",
"ApiResponseCustomerPlanChangePreviewResponse",
"ApiResponseCustomerSubscriptionResponse",
Expand Down Expand Up @@ -614,6 +638,10 @@ def __dir__():
"AuthWhoamiOut",
"AuthWhoamiOutAuthKind",
"BalanceResponse",
"CatalogLink",
"CatalogModelOut",
"CatalogProviderOut",
"CatalogVoiceOut",
"CheckoutResponse",
"ConflictError",
"CountedPaginationMeta",
Expand Down Expand Up @@ -668,6 +696,7 @@ def __dir__():
"NumericOption",
"OnePinClient",
"OnePinClientEnvironment",
"OnePinUpgradeRequiredError",
"PaginationMeta",
"PaymentMethodResponse",
"PlanDetails",
Expand Down Expand Up @@ -750,8 +779,8 @@ def __dir__():
"WorkflowRunDataRowOut",
"WorkflowRunDataRowOutAutoCorrectedStatus",
"WorkflowRunDataRowOutScriptStatus",
"WorkflowRunDataScoresOut",
"WorkflowRunDataScoresOutAccuracyStatus",
"WorkflowRunDataValidationOut",
"WorkflowRunDataValidationOutStatus",
"WorkflowRunDataVoiceOut",
"WorkflowRunDataVoiceOutStatus",
"WorkflowRunDetailOut",
Expand Down Expand Up @@ -787,8 +816,11 @@ def __dir__():
"billing",
"dictionary",
"health",
"make_async_client",
"make_client",
"nodes",
"provider_keys",
"providers",
"templates",
"uploads",
"usage",
Expand All @@ -800,7 +832,4 @@ def __dir__():
"workspace_aggregates",
"workspace_members",
"workspaces",
"OnePinUpgradeRequiredError",
"make_async_client",
"make_client",
]
19 changes: 19 additions & 0 deletions src/onepin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from .health.client import AsyncHealthClient, HealthClient
from .nodes.client import AsyncNodesClient, NodesClient
from .provider_keys.client import AsyncProviderKeysClient, ProviderKeysClient
from .providers.client import AsyncProvidersClient, ProvidersClient
from .templates.client import AsyncTemplatesClient, TemplatesClient
from .uploads.client import AsyncUploadsClient, UploadsClient
from .usage.client import AsyncUsageClient, UsageClient
Expand Down Expand Up @@ -113,6 +114,7 @@ def __init__(
self._dictionary: typing.Optional[DictionaryClient] = None
self._nodes: typing.Optional[NodesClient] = None
self._provider_keys: typing.Optional[ProviderKeysClient] = None
self._providers: typing.Optional[ProvidersClient] = None
self._templates: typing.Optional[TemplatesClient] = None
self._voices: typing.Optional[VoicesClient] = None
self._workspace: typing.Optional[WorkspaceClient] = None
Expand Down Expand Up @@ -181,6 +183,14 @@ def provider_keys(self):
self._provider_keys = ProviderKeysClient(client_wrapper=self._client_wrapper)
return self._provider_keys

@property
def providers(self):
if self._providers is None:
from .providers.client import ProvidersClient # noqa: E402

self._providers = ProvidersClient(client_wrapper=self._client_wrapper)
return self._providers

@property
def templates(self):
if self._templates is None:
Expand Down Expand Up @@ -374,6 +384,7 @@ def __init__(
self._dictionary: typing.Optional[AsyncDictionaryClient] = None
self._nodes: typing.Optional[AsyncNodesClient] = None
self._provider_keys: typing.Optional[AsyncProviderKeysClient] = None
self._providers: typing.Optional[AsyncProvidersClient] = None
self._templates: typing.Optional[AsyncTemplatesClient] = None
self._voices: typing.Optional[AsyncVoicesClient] = None
self._workspace: typing.Optional[AsyncWorkspaceClient] = None
Expand Down Expand Up @@ -442,6 +453,14 @@ def provider_keys(self):
self._provider_keys = AsyncProviderKeysClient(client_wrapper=self._client_wrapper)
return self._provider_keys

@property
def providers(self):
if self._providers is None:
from .providers.client import AsyncProvidersClient # noqa: E402

self._providers = AsyncProvidersClient(client_wrapper=self._client_wrapper)
return self._providers

@property
def templates(self):
if self._templates is None:
Expand Down
2 changes: 1 addition & 1 deletion src/onepin/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "onepin/0.5.1",
"User-Agent": "onepin/0.6.1",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
Expand Down
Loading
Loading