From 8a43c7ab2b0e6517e0d880da7e92a7ef1f8de31c Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Tue, 16 Sep 2025 11:39:10 +0200 Subject: [PATCH 1/3] Update dependencies and enhance API model definitions - Updated `setup.py` to require `urllib3 >= 2.5.0`. --- setup.py | 2 +- src/corbado_python_sdk/generated/__init__.py | 358 ++++-- .../generated/api/__init__.py | 1 + .../generated/api/auth_events_api.py | 14 +- .../generated/api/challenges_api.py | 50 +- .../generated/api/client_envs_api.py | 300 +++++ .../generated/api/connect_tokens_api.py | 144 +-- .../generated/api/identifiers_api.py | 170 +-- .../generated/api/passkey_challenges_api.py | 98 +- .../generated/api/passkey_events_api.py | 134 +- .../generated/api/passkeys_api.py | 356 +++++- .../generated/api/password_managers_api.py | 20 +- .../generated/api/project_config_api.py | 20 +- .../generated/api/sessions_api.py | 1128 ++--------------- .../generated/api/users_api.py | 688 +++++++--- .../generated/api/webhook_endpoints_api.py | 304 ++++- .../generated/api_client.py | 19 +- .../generated/configuration.py | 13 +- .../generated/exceptions.py | 2 +- .../generated/models/__init__.py | 40 +- .../generated/models/aaguid_details.py | 2 +- .../generated/models/app_type.py | 39 - .../generated/models/append_history_data.py | 102 ++ .../generated/models/auth_event.py | 2 +- .../generated/models/auth_event_create_req.py | 2 +- .../generated/models/auth_event_method.py | 2 +- .../generated/models/auth_event_status.py | 2 +- .../generated/models/auth_event_type.py | 2 +- .../generated/models/challenge.py | 2 +- .../generated/models/challenge_create_req.py | 2 +- .../generated/models/challenge_status.py | 2 +- .../generated/models/challenge_type.py | 2 +- .../generated/models/challenge_update_req.py | 2 +- .../generated/models/client_env.py | 106 ++ ...ssion_update_req.py => client_env_list.py} | 27 +- .../generated/models/client_information.py | 18 +- .../generated/models/connect_token.py | 8 +- .../models/connect_token_create_req.py | 4 +- .../generated/models/connect_token_data.py | 2 +- .../connect_token_data_passkey_append.py | 8 +- .../connect_token_data_passkey_delete.py | 8 +- .../models/connect_token_data_passkey_list.py | 8 +- .../connect_token_data_passkey_login.py | 8 +- .../generated/models/connect_token_list.py | 8 +- .../generated/models/connect_token_status.py | 2 +- .../generated/models/connect_token_type.py | 2 +- .../models/connect_token_update_req.py | 2 +- .../generated/models/credential.py | 8 +- .../generated/models/credential_list.py | 8 +- .../cross_device_authentication_strategy.py | 2 +- .../generated/models/decision_insights.py | 10 +- ...session.py => decision_insights_append.py} | 43 +- .../generated/models/decision_tag.py | 5 +- .../generated/models/detection_insights.py | 12 +- .../generated/models/detection_tag.py | 2 +- .../generated/models/identifier.py | 8 +- .../generated/models/identifier_create_req.py | 2 +- .../generated/models/identifier_list.py | 8 +- .../generated/models/identifier_status.py | 2 +- .../generated/models/identifier_type.py | 2 +- .../generated/models/identifier_update_req.py | 2 +- .../models/java_script_high_entropy.py | 2 +- .../generated/models/long_session_status.py | 41 - .../generated/models/native_meta.py | 100 ++ ...on_create_req.py => parsed_device_info.py} | 25 +- .../models/passkey_append_finish_req.py | 8 +- .../models/passkey_append_finish_rsp.py | 2 +- .../models/passkey_append_start_req.py | 2 +- .../models/passkey_append_start_rsp.py | 8 +- .../generated/models/passkey_challenge.py | 2 +- .../models/passkey_challenge_list.py | 8 +- .../models/passkey_challenge_status.py | 2 +- .../models/passkey_challenge_type.py | 2 +- .../models/passkey_challenge_update_req.py | 2 +- .../generated/models/passkey_data.py | 2 +- .../generated/models/passkey_event.py | 2 +- .../models/passkey_event_create_req.py | 2 +- .../generated/models/passkey_event_list.py | 8 +- .../generated/models/passkey_event_type.py | 3 +- .../generated/models/passkey_intel_flags.py | 10 +- .../models/passkey_login_finish_req.py | 8 +- .../models/passkey_login_finish_rsp.py | 2 +- .../models/passkey_login_start_req.py | 2 +- .../models/passkey_login_start_rsp.py | 2 +- ...iation_finish_error_alternative_project.py | 97 ++ ...iation_finish_error_credential_deleted.py} | 25 +- .../models/passkey_mediation_finish_req.py | 8 +- .../models/passkey_mediation_finish_rsp.py | 12 +- .../passkey_mediation_finish_rsp_error.py | 141 +++ .../models/passkey_mediation_start_req.py | 2 +- .../models/passkey_mediation_start_rsp.py | 2 +- .../models/passkey_post_login_req.py | 2 +- .../models/passkey_post_login_rsp.py | 2 +- ...q.py => passkey_verify_signed_data_req.py} | 21 +- .../models/passkey_verify_signed_data_rsp.py | 95 ++ .../generated/models/password_manager.py | 2 +- .../generated/models/password_manager_list.py | 2 +- .../models/project_config_update_cname_req.py | 2 +- .../generated/models/session_list.py | 102 ++ .../models/session_list_sessions_inner.py | 107 ++ .../generated/models/social_account.py | 16 +- .../models/social_account_create_req.py | 22 +- .../generated/models/social_account_list.py | 8 +- .../generated/models/social_provider_type.py | 39 - .../generated/models/user.py | 12 +- .../generated/models/user_aggregate.py | 141 +++ .../generated/models/user_create_req.py | 4 +- ...eric_rsp.py => user_delete200_response.py} | 16 +- .../generated/models/user_list.py | 102 ++ ...r_rsp.py => user_list_default_response.py} | 22 +- ...ser_list_default_response_all_of_error.py} | 16 +- ...response_all_of_error_validation_inner.py} | 10 +- ...t_default_response_all_of_request_data.py} | 8 +- .../models/{paging.py => user_list_paging.py} | 10 +- .../generated/models/user_status.py | 2 +- .../generated/models/user_update_req.py | 2 +- .../generated/models/webhook_endpoint.py | 8 +- .../models/webhook_endpoint_create_req.py | 10 +- .../generated/models/webhook_endpoint_list.py | 2 +- .../models/webhook_endpoint_update_req.py | 97 ++ .../generated/models/webhook_event_type.py | 5 +- .../generated/requirements.txt | 5 +- src/corbado_python_sdk/generated/rest.py | 3 +- 123 files changed, 3703 insertions(+), 2073 deletions(-) create mode 100644 src/corbado_python_sdk/generated/api/client_envs_api.py delete mode 100644 src/corbado_python_sdk/generated/models/app_type.py create mode 100644 src/corbado_python_sdk/generated/models/append_history_data.py create mode 100644 src/corbado_python_sdk/generated/models/client_env.py rename src/corbado_python_sdk/generated/models/{long_session_update_req.py => client_env_list.py} (66%) rename src/corbado_python_sdk/generated/models/{long_session.py => decision_insights_append.py} (60%) delete mode 100644 src/corbado_python_sdk/generated/models/long_session_status.py create mode 100644 src/corbado_python_sdk/generated/models/native_meta.py rename src/corbado_python_sdk/generated/models/{long_session_create_req.py => parsed_device_info.py} (71%) create mode 100644 src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_alternative_project.py rename src/corbado_python_sdk/generated/models/{short_session.py => passkey_mediation_finish_error_credential_deleted.py} (69%) create mode 100644 src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp_error.py rename src/corbado_python_sdk/generated/models/{short_session_create_req.py => passkey_verify_signed_data_req.py} (76%) create mode 100644 src/corbado_python_sdk/generated/models/passkey_verify_signed_data_rsp.py create mode 100644 src/corbado_python_sdk/generated/models/session_list.py create mode 100644 src/corbado_python_sdk/generated/models/session_list_sessions_inner.py delete mode 100644 src/corbado_python_sdk/generated/models/social_provider_type.py create mode 100644 src/corbado_python_sdk/generated/models/user_aggregate.py rename src/corbado_python_sdk/generated/models/{generic_rsp.py => user_delete200_response.py} (79%) create mode 100644 src/corbado_python_sdk/generated/models/user_list.py rename src/corbado_python_sdk/generated/models/{error_rsp.py => user_list_default_response.py} (75%) rename src/corbado_python_sdk/generated/models/{error_rsp_all_of_error.py => user_list_default_response_all_of_error.py} (77%) rename src/corbado_python_sdk/generated/models/{error_rsp_all_of_error_validation.py => user_list_default_response_all_of_error_validation_inner.py} (83%) rename src/corbado_python_sdk/generated/models/{request_data.py => user_list_default_response_all_of_request_data.py} (87%) rename src/corbado_python_sdk/generated/models/{paging.py => user_list_paging.py} (88%) create mode 100644 src/corbado_python_sdk/generated/models/webhook_endpoint_update_req.py diff --git a/setup.py b/setup.py index 931d3f5..b53cb11 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ PYTHON_REQUIRES = ">=3.8" INSTALL_REQUIRES = [ - "urllib3 >= 1.25.3", + "urllib3 >= 2.5.0", "python-dateutil", # used in generated code "pydantic >= 2", "typing-extensions >= 4.7.1", diff --git a/src/corbado_python_sdk/generated/__init__.py b/src/corbado_python_sdk/generated/__init__.py index f57af42..93fdd7a 100644 --- a/src/corbado_python_sdk/generated/__init__.py +++ b/src/corbado_python_sdk/generated/__init__.py @@ -5,7 +5,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -17,119 +17,253 @@ __version__ = "1.0.0" +# Define package exports +__all__ = [ + "AuthEventsApi", + "ChallengesApi", + "ClientEnvsApi", + "ConnectTokensApi", + "IdentifiersApi", + "PasskeyChallengesApi", + "PasskeyEventsApi", + "PasskeysApi", + "PasswordManagersApi", + "ProjectConfigApi", + "SessionsApi", + "UsersApi", + "WebhookEndpointsApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AaguidDetails", + "AppendHistoryData", + "AuthEvent", + "AuthEventCreateReq", + "AuthEventMethod", + "AuthEventStatus", + "AuthEventType", + "Challenge", + "ChallengeCreateReq", + "ChallengeStatus", + "ChallengeType", + "ChallengeUpdateReq", + "ClientEnv", + "ClientEnvList", + "ClientInformation", + "ConnectToken", + "ConnectTokenCreateReq", + "ConnectTokenData", + "ConnectTokenDataPasskeyAppend", + "ConnectTokenDataPasskeyDelete", + "ConnectTokenDataPasskeyList", + "ConnectTokenDataPasskeyLogin", + "ConnectTokenList", + "ConnectTokenStatus", + "ConnectTokenType", + "ConnectTokenUpdateReq", + "Credential", + "CredentialList", + "CrossDeviceAuthenticationStrategy", + "DecisionInsights", + "DecisionInsightsAppend", + "DecisionTag", + "DetectionInsights", + "DetectionTag", + "Identifier", + "IdentifierCreateReq", + "IdentifierList", + "IdentifierStatus", + "IdentifierType", + "IdentifierUpdateReq", + "JavaScriptHighEntropy", + "NativeMeta", + "ParsedDeviceInfo", + "PasskeyAppendFinishReq", + "PasskeyAppendFinishRsp", + "PasskeyAppendStartReq", + "PasskeyAppendStartRsp", + "PasskeyChallenge", + "PasskeyChallengeList", + "PasskeyChallengeStatus", + "PasskeyChallengeType", + "PasskeyChallengeUpdateReq", + "PasskeyData", + "PasskeyEvent", + "PasskeyEventCreateReq", + "PasskeyEventList", + "PasskeyEventType", + "PasskeyIntelFlags", + "PasskeyLoginFinishReq", + "PasskeyLoginFinishRsp", + "PasskeyLoginStartReq", + "PasskeyLoginStartRsp", + "PasskeyMediationFinishErrorAlternativeProject", + "PasskeyMediationFinishErrorCredentialDeleted", + "PasskeyMediationFinishReq", + "PasskeyMediationFinishRsp", + "PasskeyMediationFinishRspError", + "PasskeyMediationStartReq", + "PasskeyMediationStartRsp", + "PasskeyPostLoginReq", + "PasskeyPostLoginRsp", + "PasskeyVerifySignedDataReq", + "PasskeyVerifySignedDataRsp", + "PasswordManager", + "PasswordManagerList", + "ProjectConfigUpdateCnameReq", + "SessionList", + "SessionListSessionsInner", + "SocialAccount", + "SocialAccountCreateReq", + "SocialAccountList", + "User", + "UserAggregate", + "UserCreateReq", + "UserDelete200Response", + "UserList", + "UserListDefaultResponse", + "UserListDefaultResponseAllOfError", + "UserListDefaultResponseAllOfErrorValidationInner", + "UserListDefaultResponseAllOfRequestData", + "UserListPaging", + "UserStatus", + "UserUpdateReq", + "WebhookEndpoint", + "WebhookEndpointCreateReq", + "WebhookEndpointList", + "WebhookEndpointUpdateReq", + "WebhookEventType", +] + # import apis into sdk package -from corbado_python_sdk.generated.api.auth_events_api import AuthEventsApi -from corbado_python_sdk.generated.api.challenges_api import ChallengesApi -from corbado_python_sdk.generated.api.connect_tokens_api import ConnectTokensApi -from corbado_python_sdk.generated.api.identifiers_api import IdentifiersApi -from corbado_python_sdk.generated.api.passkey_challenges_api import PasskeyChallengesApi -from corbado_python_sdk.generated.api.passkey_events_api import PasskeyEventsApi -from corbado_python_sdk.generated.api.passkeys_api import PasskeysApi -from corbado_python_sdk.generated.api.password_managers_api import PasswordManagersApi -from corbado_python_sdk.generated.api.project_config_api import ProjectConfigApi -from corbado_python_sdk.generated.api.sessions_api import SessionsApi -from corbado_python_sdk.generated.api.users_api import UsersApi -from corbado_python_sdk.generated.api.webhook_endpoints_api import WebhookEndpointsApi +from corbado_python_sdk.generated.api.auth_events_api import AuthEventsApi as AuthEventsApi +from corbado_python_sdk.generated.api.challenges_api import ChallengesApi as ChallengesApi +from corbado_python_sdk.generated.api.client_envs_api import ClientEnvsApi as ClientEnvsApi +from corbado_python_sdk.generated.api.connect_tokens_api import ConnectTokensApi as ConnectTokensApi +from corbado_python_sdk.generated.api.identifiers_api import IdentifiersApi as IdentifiersApi +from corbado_python_sdk.generated.api.passkey_challenges_api import PasskeyChallengesApi as PasskeyChallengesApi +from corbado_python_sdk.generated.api.passkey_events_api import PasskeyEventsApi as PasskeyEventsApi +from corbado_python_sdk.generated.api.passkeys_api import PasskeysApi as PasskeysApi +from corbado_python_sdk.generated.api.password_managers_api import PasswordManagersApi as PasswordManagersApi +from corbado_python_sdk.generated.api.project_config_api import ProjectConfigApi as ProjectConfigApi +from corbado_python_sdk.generated.api.sessions_api import SessionsApi as SessionsApi +from corbado_python_sdk.generated.api.users_api import UsersApi as UsersApi +from corbado_python_sdk.generated.api.webhook_endpoints_api import WebhookEndpointsApi as WebhookEndpointsApi # import ApiClient -from corbado_python_sdk.generated.api_response import ApiResponse -from corbado_python_sdk.generated.api_client import ApiClient -from corbado_python_sdk.generated.configuration import Configuration -from corbado_python_sdk.generated.exceptions import OpenApiException -from corbado_python_sdk.generated.exceptions import ApiTypeError -from corbado_python_sdk.generated.exceptions import ApiValueError -from corbado_python_sdk.generated.exceptions import ApiKeyError -from corbado_python_sdk.generated.exceptions import ApiAttributeError -from corbado_python_sdk.generated.exceptions import ApiException +from corbado_python_sdk.generated.api_response import ApiResponse as ApiResponse +from corbado_python_sdk.generated.api_client import ApiClient as ApiClient +from corbado_python_sdk.generated.configuration import Configuration as Configuration +from corbado_python_sdk.generated.exceptions import OpenApiException as OpenApiException +from corbado_python_sdk.generated.exceptions import ApiTypeError as ApiTypeError +from corbado_python_sdk.generated.exceptions import ApiValueError as ApiValueError +from corbado_python_sdk.generated.exceptions import ApiKeyError as ApiKeyError +from corbado_python_sdk.generated.exceptions import ApiAttributeError as ApiAttributeError +from corbado_python_sdk.generated.exceptions import ApiException as ApiException # import models into sdk package -from corbado_python_sdk.generated.models.aaguid_details import AaguidDetails -from corbado_python_sdk.generated.models.app_type import AppType -from corbado_python_sdk.generated.models.auth_event import AuthEvent -from corbado_python_sdk.generated.models.auth_event_create_req import AuthEventCreateReq -from corbado_python_sdk.generated.models.auth_event_method import AuthEventMethod -from corbado_python_sdk.generated.models.auth_event_status import AuthEventStatus -from corbado_python_sdk.generated.models.auth_event_type import AuthEventType -from corbado_python_sdk.generated.models.challenge import Challenge -from corbado_python_sdk.generated.models.challenge_create_req import ChallengeCreateReq -from corbado_python_sdk.generated.models.challenge_status import ChallengeStatus -from corbado_python_sdk.generated.models.challenge_type import ChallengeType -from corbado_python_sdk.generated.models.challenge_update_req import ChallengeUpdateReq -from corbado_python_sdk.generated.models.client_information import ClientInformation -from corbado_python_sdk.generated.models.connect_token import ConnectToken -from corbado_python_sdk.generated.models.connect_token_create_req import ConnectTokenCreateReq -from corbado_python_sdk.generated.models.connect_token_data import ConnectTokenData -from corbado_python_sdk.generated.models.connect_token_data_passkey_append import ConnectTokenDataPasskeyAppend -from corbado_python_sdk.generated.models.connect_token_data_passkey_delete import ConnectTokenDataPasskeyDelete -from corbado_python_sdk.generated.models.connect_token_data_passkey_list import ConnectTokenDataPasskeyList -from corbado_python_sdk.generated.models.connect_token_data_passkey_login import ConnectTokenDataPasskeyLogin -from corbado_python_sdk.generated.models.connect_token_list import ConnectTokenList -from corbado_python_sdk.generated.models.connect_token_status import ConnectTokenStatus -from corbado_python_sdk.generated.models.connect_token_type import ConnectTokenType -from corbado_python_sdk.generated.models.connect_token_update_req import ConnectTokenUpdateReq -from corbado_python_sdk.generated.models.credential import Credential -from corbado_python_sdk.generated.models.credential_list import CredentialList -from corbado_python_sdk.generated.models.cross_device_authentication_strategy import CrossDeviceAuthenticationStrategy -from corbado_python_sdk.generated.models.decision_insights import DecisionInsights -from corbado_python_sdk.generated.models.decision_tag import DecisionTag -from corbado_python_sdk.generated.models.detection_insights import DetectionInsights -from corbado_python_sdk.generated.models.detection_tag import DetectionTag -from corbado_python_sdk.generated.models.error_rsp import ErrorRsp -from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError -from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp -from corbado_python_sdk.generated.models.identifier import Identifier -from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq -from corbado_python_sdk.generated.models.identifier_list import IdentifierList -from corbado_python_sdk.generated.models.identifier_status import IdentifierStatus -from corbado_python_sdk.generated.models.identifier_type import IdentifierType -from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq -from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy -from corbado_python_sdk.generated.models.long_session import LongSession -from corbado_python_sdk.generated.models.long_session_create_req import LongSessionCreateReq -from corbado_python_sdk.generated.models.long_session_status import LongSessionStatus -from corbado_python_sdk.generated.models.long_session_update_req import LongSessionUpdateReq -from corbado_python_sdk.generated.models.paging import Paging -from corbado_python_sdk.generated.models.passkey_append_finish_req import PasskeyAppendFinishReq -from corbado_python_sdk.generated.models.passkey_append_finish_rsp import PasskeyAppendFinishRsp -from corbado_python_sdk.generated.models.passkey_append_start_req import PasskeyAppendStartReq -from corbado_python_sdk.generated.models.passkey_append_start_rsp import PasskeyAppendStartRsp -from corbado_python_sdk.generated.models.passkey_challenge import PasskeyChallenge -from corbado_python_sdk.generated.models.passkey_challenge_list import PasskeyChallengeList -from corbado_python_sdk.generated.models.passkey_challenge_status import PasskeyChallengeStatus -from corbado_python_sdk.generated.models.passkey_challenge_type import PasskeyChallengeType -from corbado_python_sdk.generated.models.passkey_challenge_update_req import PasskeyChallengeUpdateReq -from corbado_python_sdk.generated.models.passkey_data import PasskeyData -from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent -from corbado_python_sdk.generated.models.passkey_event_create_req import PasskeyEventCreateReq -from corbado_python_sdk.generated.models.passkey_event_list import PasskeyEventList -from corbado_python_sdk.generated.models.passkey_event_type import PasskeyEventType -from corbado_python_sdk.generated.models.passkey_intel_flags import PasskeyIntelFlags -from corbado_python_sdk.generated.models.passkey_login_finish_req import PasskeyLoginFinishReq -from corbado_python_sdk.generated.models.passkey_login_finish_rsp import PasskeyLoginFinishRsp -from corbado_python_sdk.generated.models.passkey_login_start_req import PasskeyLoginStartReq -from corbado_python_sdk.generated.models.passkey_login_start_rsp import PasskeyLoginStartRsp -from corbado_python_sdk.generated.models.passkey_mediation_finish_req import PasskeyMediationFinishReq -from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp import PasskeyMediationFinishRsp -from corbado_python_sdk.generated.models.passkey_mediation_start_req import PasskeyMediationStartReq -from corbado_python_sdk.generated.models.passkey_mediation_start_rsp import PasskeyMediationStartRsp -from corbado_python_sdk.generated.models.passkey_post_login_req import PasskeyPostLoginReq -from corbado_python_sdk.generated.models.passkey_post_login_rsp import PasskeyPostLoginRsp -from corbado_python_sdk.generated.models.password_manager import PasswordManager -from corbado_python_sdk.generated.models.password_manager_list import PasswordManagerList -from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq -from corbado_python_sdk.generated.models.request_data import RequestData -from corbado_python_sdk.generated.models.short_session import ShortSession -from corbado_python_sdk.generated.models.short_session_create_req import ShortSessionCreateReq -from corbado_python_sdk.generated.models.social_account import SocialAccount -from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq -from corbado_python_sdk.generated.models.social_account_list import SocialAccountList -from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType -from corbado_python_sdk.generated.models.user import User -from corbado_python_sdk.generated.models.user_create_req import UserCreateReq -from corbado_python_sdk.generated.models.user_status import UserStatus -from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq -from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint -from corbado_python_sdk.generated.models.webhook_endpoint_create_req import WebhookEndpointCreateReq -from corbado_python_sdk.generated.models.webhook_endpoint_list import WebhookEndpointList -from corbado_python_sdk.generated.models.webhook_event_type import WebhookEventType +from corbado_python_sdk.generated.models.aaguid_details import AaguidDetails as AaguidDetails +from corbado_python_sdk.generated.models.append_history_data import AppendHistoryData as AppendHistoryData +from corbado_python_sdk.generated.models.auth_event import AuthEvent as AuthEvent +from corbado_python_sdk.generated.models.auth_event_create_req import AuthEventCreateReq as AuthEventCreateReq +from corbado_python_sdk.generated.models.auth_event_method import AuthEventMethod as AuthEventMethod +from corbado_python_sdk.generated.models.auth_event_status import AuthEventStatus as AuthEventStatus +from corbado_python_sdk.generated.models.auth_event_type import AuthEventType as AuthEventType +from corbado_python_sdk.generated.models.challenge import Challenge as Challenge +from corbado_python_sdk.generated.models.challenge_create_req import ChallengeCreateReq as ChallengeCreateReq +from corbado_python_sdk.generated.models.challenge_status import ChallengeStatus as ChallengeStatus +from corbado_python_sdk.generated.models.challenge_type import ChallengeType as ChallengeType +from corbado_python_sdk.generated.models.challenge_update_req import ChallengeUpdateReq as ChallengeUpdateReq +from corbado_python_sdk.generated.models.client_env import ClientEnv as ClientEnv +from corbado_python_sdk.generated.models.client_env_list import ClientEnvList as ClientEnvList +from corbado_python_sdk.generated.models.client_information import ClientInformation as ClientInformation +from corbado_python_sdk.generated.models.connect_token import ConnectToken as ConnectToken +from corbado_python_sdk.generated.models.connect_token_create_req import ConnectTokenCreateReq as ConnectTokenCreateReq +from corbado_python_sdk.generated.models.connect_token_data import ConnectTokenData as ConnectTokenData +from corbado_python_sdk.generated.models.connect_token_data_passkey_append import ConnectTokenDataPasskeyAppend as ConnectTokenDataPasskeyAppend +from corbado_python_sdk.generated.models.connect_token_data_passkey_delete import ConnectTokenDataPasskeyDelete as ConnectTokenDataPasskeyDelete +from corbado_python_sdk.generated.models.connect_token_data_passkey_list import ConnectTokenDataPasskeyList as ConnectTokenDataPasskeyList +from corbado_python_sdk.generated.models.connect_token_data_passkey_login import ConnectTokenDataPasskeyLogin as ConnectTokenDataPasskeyLogin +from corbado_python_sdk.generated.models.connect_token_list import ConnectTokenList as ConnectTokenList +from corbado_python_sdk.generated.models.connect_token_status import ConnectTokenStatus as ConnectTokenStatus +from corbado_python_sdk.generated.models.connect_token_type import ConnectTokenType as ConnectTokenType +from corbado_python_sdk.generated.models.connect_token_update_req import ConnectTokenUpdateReq as ConnectTokenUpdateReq +from corbado_python_sdk.generated.models.credential import Credential as Credential +from corbado_python_sdk.generated.models.credential_list import CredentialList as CredentialList +from corbado_python_sdk.generated.models.cross_device_authentication_strategy import CrossDeviceAuthenticationStrategy as CrossDeviceAuthenticationStrategy +from corbado_python_sdk.generated.models.decision_insights import DecisionInsights as DecisionInsights +from corbado_python_sdk.generated.models.decision_insights_append import DecisionInsightsAppend as DecisionInsightsAppend +from corbado_python_sdk.generated.models.decision_tag import DecisionTag as DecisionTag +from corbado_python_sdk.generated.models.detection_insights import DetectionInsights as DetectionInsights +from corbado_python_sdk.generated.models.detection_tag import DetectionTag as DetectionTag +from corbado_python_sdk.generated.models.identifier import Identifier as Identifier +from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq as IdentifierCreateReq +from corbado_python_sdk.generated.models.identifier_list import IdentifierList as IdentifierList +from corbado_python_sdk.generated.models.identifier_status import IdentifierStatus as IdentifierStatus +from corbado_python_sdk.generated.models.identifier_type import IdentifierType as IdentifierType +from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq as IdentifierUpdateReq +from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy as JavaScriptHighEntropy +from corbado_python_sdk.generated.models.native_meta import NativeMeta as NativeMeta +from corbado_python_sdk.generated.models.parsed_device_info import ParsedDeviceInfo as ParsedDeviceInfo +from corbado_python_sdk.generated.models.passkey_append_finish_req import PasskeyAppendFinishReq as PasskeyAppendFinishReq +from corbado_python_sdk.generated.models.passkey_append_finish_rsp import PasskeyAppendFinishRsp as PasskeyAppendFinishRsp +from corbado_python_sdk.generated.models.passkey_append_start_req import PasskeyAppendStartReq as PasskeyAppendStartReq +from corbado_python_sdk.generated.models.passkey_append_start_rsp import PasskeyAppendStartRsp as PasskeyAppendStartRsp +from corbado_python_sdk.generated.models.passkey_challenge import PasskeyChallenge as PasskeyChallenge +from corbado_python_sdk.generated.models.passkey_challenge_list import PasskeyChallengeList as PasskeyChallengeList +from corbado_python_sdk.generated.models.passkey_challenge_status import PasskeyChallengeStatus as PasskeyChallengeStatus +from corbado_python_sdk.generated.models.passkey_challenge_type import PasskeyChallengeType as PasskeyChallengeType +from corbado_python_sdk.generated.models.passkey_challenge_update_req import PasskeyChallengeUpdateReq as PasskeyChallengeUpdateReq +from corbado_python_sdk.generated.models.passkey_data import PasskeyData as PasskeyData +from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent as PasskeyEvent +from corbado_python_sdk.generated.models.passkey_event_create_req import PasskeyEventCreateReq as PasskeyEventCreateReq +from corbado_python_sdk.generated.models.passkey_event_list import PasskeyEventList as PasskeyEventList +from corbado_python_sdk.generated.models.passkey_event_type import PasskeyEventType as PasskeyEventType +from corbado_python_sdk.generated.models.passkey_intel_flags import PasskeyIntelFlags as PasskeyIntelFlags +from corbado_python_sdk.generated.models.passkey_login_finish_req import PasskeyLoginFinishReq as PasskeyLoginFinishReq +from corbado_python_sdk.generated.models.passkey_login_finish_rsp import PasskeyLoginFinishRsp as PasskeyLoginFinishRsp +from corbado_python_sdk.generated.models.passkey_login_start_req import PasskeyLoginStartReq as PasskeyLoginStartReq +from corbado_python_sdk.generated.models.passkey_login_start_rsp import PasskeyLoginStartRsp as PasskeyLoginStartRsp +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_alternative_project import PasskeyMediationFinishErrorAlternativeProject as PasskeyMediationFinishErrorAlternativeProject +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_credential_deleted import PasskeyMediationFinishErrorCredentialDeleted as PasskeyMediationFinishErrorCredentialDeleted +from corbado_python_sdk.generated.models.passkey_mediation_finish_req import PasskeyMediationFinishReq as PasskeyMediationFinishReq +from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp import PasskeyMediationFinishRsp as PasskeyMediationFinishRsp +from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp_error import PasskeyMediationFinishRspError as PasskeyMediationFinishRspError +from corbado_python_sdk.generated.models.passkey_mediation_start_req import PasskeyMediationStartReq as PasskeyMediationStartReq +from corbado_python_sdk.generated.models.passkey_mediation_start_rsp import PasskeyMediationStartRsp as PasskeyMediationStartRsp +from corbado_python_sdk.generated.models.passkey_post_login_req import PasskeyPostLoginReq as PasskeyPostLoginReq +from corbado_python_sdk.generated.models.passkey_post_login_rsp import PasskeyPostLoginRsp as PasskeyPostLoginRsp +from corbado_python_sdk.generated.models.passkey_verify_signed_data_req import PasskeyVerifySignedDataReq as PasskeyVerifySignedDataReq +from corbado_python_sdk.generated.models.passkey_verify_signed_data_rsp import PasskeyVerifySignedDataRsp as PasskeyVerifySignedDataRsp +from corbado_python_sdk.generated.models.password_manager import PasswordManager as PasswordManager +from corbado_python_sdk.generated.models.password_manager_list import PasswordManagerList as PasswordManagerList +from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq as ProjectConfigUpdateCnameReq +from corbado_python_sdk.generated.models.session_list import SessionList as SessionList +from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner as SessionListSessionsInner +from corbado_python_sdk.generated.models.social_account import SocialAccount as SocialAccount +from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq as SocialAccountCreateReq +from corbado_python_sdk.generated.models.social_account_list import SocialAccountList as SocialAccountList +from corbado_python_sdk.generated.models.user import User as User +from corbado_python_sdk.generated.models.user_aggregate import UserAggregate as UserAggregate +from corbado_python_sdk.generated.models.user_create_req import UserCreateReq as UserCreateReq +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response as UserDelete200Response +from corbado_python_sdk.generated.models.user_list import UserList as UserList +from corbado_python_sdk.generated.models.user_list_default_response import UserListDefaultResponse as UserListDefaultResponse +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError as UserListDefaultResponseAllOfError +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner as UserListDefaultResponseAllOfErrorValidationInner +from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData as UserListDefaultResponseAllOfRequestData +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging as UserListPaging +from corbado_python_sdk.generated.models.user_status import UserStatus as UserStatus +from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq as UserUpdateReq +from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint as WebhookEndpoint +from corbado_python_sdk.generated.models.webhook_endpoint_create_req import WebhookEndpointCreateReq as WebhookEndpointCreateReq +from corbado_python_sdk.generated.models.webhook_endpoint_list import WebhookEndpointList as WebhookEndpointList +from corbado_python_sdk.generated.models.webhook_endpoint_update_req import WebhookEndpointUpdateReq as WebhookEndpointUpdateReq +from corbado_python_sdk.generated.models.webhook_event_type import WebhookEventType as WebhookEventType + diff --git a/src/corbado_python_sdk/generated/api/__init__.py b/src/corbado_python_sdk/generated/api/__init__.py index 432cae8..9b299b8 100644 --- a/src/corbado_python_sdk/generated/api/__init__.py +++ b/src/corbado_python_sdk/generated/api/__init__.py @@ -3,6 +3,7 @@ # import apis into api package from corbado_python_sdk.generated.api.auth_events_api import AuthEventsApi from corbado_python_sdk.generated.api.challenges_api import ChallengesApi +from corbado_python_sdk.generated.api.client_envs_api import ClientEnvsApi from corbado_python_sdk.generated.api.connect_tokens_api import ConnectTokensApi from corbado_python_sdk.generated.api.identifiers_api import IdentifiersApi from corbado_python_sdk.generated.api.passkey_challenges_api import PasskeyChallengesApi diff --git a/src/corbado_python_sdk/generated/api/auth_events_api.py b/src/corbado_python_sdk/generated/api/auth_events_api.py index 47d2ca0..c3c58d9 100644 --- a/src/corbado_python_sdk/generated/api/auth_events_api.py +++ b/src/corbado_python_sdk/generated/api/auth_events_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -43,7 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call def auth_event_create( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], auth_event_create_req: AuthEventCreateReq, _request_timeout: Union[ None, @@ -62,7 +62,7 @@ def auth_event_create( Create a new authentication event for a user - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param auth_event_create_req: (required) :type auth_event_create_req: AuthEventCreateReq @@ -114,7 +114,7 @@ def auth_event_create( @validate_call def auth_event_create_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], auth_event_create_req: AuthEventCreateReq, _request_timeout: Union[ None, @@ -133,7 +133,7 @@ def auth_event_create_with_http_info( Create a new authentication event for a user - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param auth_event_create_req: (required) :type auth_event_create_req: AuthEventCreateReq @@ -185,7 +185,7 @@ def auth_event_create_with_http_info( @validate_call def auth_event_create_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], auth_event_create_req: AuthEventCreateReq, _request_timeout: Union[ None, @@ -204,7 +204,7 @@ def auth_event_create_without_preload_content( Create a new authentication event for a user - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param auth_event_create_req: (required) :type auth_event_create_req: AuthEventCreateReq diff --git a/src/corbado_python_sdk/generated/api/challenges_api.py b/src/corbado_python_sdk/generated/api/challenges_api.py index 23a3ff3..27b18ea 100644 --- a/src/corbado_python_sdk/generated/api/challenges_api.py +++ b/src/corbado_python_sdk/generated/api/challenges_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -44,7 +44,7 @@ def __init__(self, api_client=None) -> None: @validate_call def challenge_create( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_create_req: ChallengeCreateReq, _request_timeout: Union[ None, @@ -59,11 +59,11 @@ def challenge_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Challenge: - """challenge_create + """Create a challenge for a user - Create a new challenge to verify a login identifier + Creates a new challenge to verify a login identifier for a user by given `userID`. Challenges come in three flavors: **Email OTP**, **SMS OTP**, and **Email Magiclink**. **OTP** stands for One-Time Password. It is a unique code sent to the user via email or SMS, which they must enter to complete the verification process. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_create_req: (required) :type challenge_create_req: ChallengeCreateReq @@ -115,7 +115,7 @@ def challenge_create( @validate_call def challenge_create_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_create_req: ChallengeCreateReq, _request_timeout: Union[ None, @@ -130,11 +130,11 @@ def challenge_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Challenge]: - """challenge_create + """Create a challenge for a user - Create a new challenge to verify a login identifier + Creates a new challenge to verify a login identifier for a user by given `userID`. Challenges come in three flavors: **Email OTP**, **SMS OTP**, and **Email Magiclink**. **OTP** stands for One-Time Password. It is a unique code sent to the user via email or SMS, which they must enter to complete the verification process. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_create_req: (required) :type challenge_create_req: ChallengeCreateReq @@ -186,7 +186,7 @@ def challenge_create_with_http_info( @validate_call def challenge_create_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_create_req: ChallengeCreateReq, _request_timeout: Union[ None, @@ -201,11 +201,11 @@ def challenge_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """challenge_create + """Create a challenge for a user - Create a new challenge to verify a login identifier + Creates a new challenge to verify a login identifier for a user by given `userID`. Challenges come in three flavors: **Email OTP**, **SMS OTP**, and **Email Magiclink**. **OTP** stands for One-Time Password. It is a unique code sent to the user via email or SMS, which they must enter to complete the verification process. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_create_req: (required) :type challenge_create_req: ChallengeCreateReq @@ -333,7 +333,7 @@ def _challenge_create_serialize( @validate_call def challenge_update( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_id: Annotated[StrictStr, Field(description="ID of challenge")], challenge_update_req: ChallengeUpdateReq, _request_timeout: Union[ @@ -349,11 +349,11 @@ def challenge_update( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Challenge: - """challenge_update + """Update a challenge for a user - Updates a challenge (e.g. from pending to completed) + Updates a challenge for a user by given `userID` and `challengeID`. For example, this can be used to change the challenge status from `pending` to `completed`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_id: ID of challenge (required) :type challenge_id: str @@ -408,7 +408,7 @@ def challenge_update( @validate_call def challenge_update_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_id: Annotated[StrictStr, Field(description="ID of challenge")], challenge_update_req: ChallengeUpdateReq, _request_timeout: Union[ @@ -424,11 +424,11 @@ def challenge_update_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Challenge]: - """challenge_update + """Update a challenge for a user - Updates a challenge (e.g. from pending to completed) + Updates a challenge for a user by given `userID` and `challengeID`. For example, this can be used to change the challenge status from `pending` to `completed`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_id: ID of challenge (required) :type challenge_id: str @@ -483,7 +483,7 @@ def challenge_update_with_http_info( @validate_call def challenge_update_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], challenge_id: Annotated[StrictStr, Field(description="ID of challenge")], challenge_update_req: ChallengeUpdateReq, _request_timeout: Union[ @@ -499,11 +499,11 @@ def challenge_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """challenge_update + """Update a challenge for a user - Updates a challenge (e.g. from pending to completed) + Updates a challenge for a user by given `userID` and `challengeID`. For example, this can be used to change the challenge status from `pending` to `completed`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param challenge_id: ID of challenge (required) :type challenge_id: str diff --git a/src/corbado_python_sdk/generated/api/client_envs_api.py b/src/corbado_python_sdk/generated/api/client_envs_api.py new file mode 100644 index 0000000..ac44d24 --- /dev/null +++ b/src/corbado_python_sdk/generated/api/client_envs_api.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing_extensions import Annotated +from corbado_python_sdk.generated.models.client_env_list import ClientEnvList + +from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized +from corbado_python_sdk.generated.api_response import ApiResponse +from corbado_python_sdk.generated.rest import RESTResponseType + + +class ClientEnvsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def client_env_list( + self, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ClientEnvList: + """List client environments for a user + + Returns a list of clientEnvs + + :param user_id: Unique identifier of the user. Format: `usr-`. (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._client_env_list_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClientEnvList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def client_env_list_with_http_info( + self, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ClientEnvList]: + """List client environments for a user + + Returns a list of clientEnvs + + :param user_id: Unique identifier of the user. Format: `usr-`. (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._client_env_list_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClientEnvList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def client_env_list_without_preload_content( + self, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List client environments for a user + + Returns a list of clientEnvs + + :param user_id: Unique identifier of the user. Format: `usr-`. (required) + :type user_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._client_env_list_serialize( + user_id=user_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ClientEnvList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _client_env_list_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userID'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'basicAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users/{userID}/clientEnvs', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/corbado_python_sdk/generated/api/connect_tokens_api.py b/src/corbado_python_sdk/generated/api/connect_tokens_api.py index 1225ece..89f372b 100644 --- a/src/corbado_python_sdk/generated/api/connect_tokens_api.py +++ b/src/corbado_python_sdk/generated/api/connect_tokens_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -24,7 +24,7 @@ from corbado_python_sdk.generated.models.connect_token_create_req import ConnectTokenCreateReq from corbado_python_sdk.generated.models.connect_token_list import ConnectTokenList from corbado_python_sdk.generated.models.connect_token_update_req import ConnectTokenUpdateReq -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -61,9 +61,9 @@ def connect_token_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ConnectToken: - """connect_token_create + """Create a connectToken - Create a new connect token + Creates a new ConnectToken, which is essential for [Corbado Connect](/corbado-connect). ConnectTokens authorize actions that modify user data. Consult the [Documentation](/corbado-connect/concepts/connect-token) for more details. :param connect_token_create_req: (required) :type connect_token_create_req: ConnectTokenCreateReq @@ -128,9 +128,9 @@ def connect_token_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ConnectToken]: - """connect_token_create + """Create a connectToken - Create a new connect token + Creates a new ConnectToken, which is essential for [Corbado Connect](/corbado-connect). ConnectTokens authorize actions that modify user data. Consult the [Documentation](/corbado-connect/concepts/connect-token) for more details. :param connect_token_create_req: (required) :type connect_token_create_req: ConnectTokenCreateReq @@ -195,9 +195,9 @@ def connect_token_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """connect_token_create + """Create a connectToken - Create a new connect token + Creates a new ConnectToken, which is essential for [Corbado Connect](/corbado-connect). ConnectTokens authorize actions that modify user data. Consult the [Documentation](/corbado-connect/concepts/connect-token) for more details. :param connect_token_create_req: (required) :type connect_token_create_req: ConnectTokenCreateReq @@ -321,7 +321,7 @@ def _connect_token_create_serialize( @validate_call def connect_token_delete( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -334,12 +334,12 @@ def connect_token_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """connect_token_delete + ) -> UserDelete200Response: + """Delete a ConnectToken - Deletes an existing append token + Deletes an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -372,7 +372,7 @@ def connect_token_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -388,7 +388,7 @@ def connect_token_delete( @validate_call def connect_token_delete_with_http_info( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -401,12 +401,12 @@ def connect_token_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """connect_token_delete + ) -> ApiResponse[UserDelete200Response]: + """Delete a ConnectToken - Deletes an existing append token + Deletes an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -439,7 +439,7 @@ def connect_token_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -455,7 +455,7 @@ def connect_token_delete_with_http_info( @validate_call def connect_token_delete_without_preload_content( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -469,11 +469,11 @@ def connect_token_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """connect_token_delete + """Delete a ConnectToken - Deletes an existing append token + Deletes an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -506,7 +506,7 @@ def connect_token_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -582,10 +582,10 @@ def _connect_token_delete_serialize( @validate_call def connect_token_list( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -599,17 +599,17 @@ def connect_token_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ConnectTokenList: - """connect_token_list + """List all ConnectTokens - Returns a list of matching append tokens + Returns a list of ConnectTokens. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. - The `filter` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -661,10 +661,10 @@ def connect_token_list( @validate_call def connect_token_list_with_http_info( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -678,17 +678,17 @@ def connect_token_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ConnectTokenList]: - """connect_token_list + """List all ConnectTokens - Returns a list of matching append tokens + Returns a list of ConnectTokens. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. - The `filter` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -740,10 +740,10 @@ def connect_token_list_with_http_info( @validate_call def connect_token_list_without_preload_content( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -757,17 +757,17 @@ def connect_token_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """connect_token_list + """List all ConnectTokens - Returns a list of matching append tokens + Returns a list of ConnectTokens. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. - The `filter` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -897,7 +897,7 @@ def _connect_token_list_serialize( @validate_call def connect_token_update( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], connect_token_update_req: ConnectTokenUpdateReq, _request_timeout: Union[ None, @@ -911,12 +911,12 @@ def connect_token_update( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """connect_token_update + ) -> UserDelete200Response: + """Update a ConnectToken - Updates an existing append token + Updates an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param connect_token_update_req: (required) :type connect_token_update_req: ConnectTokenUpdateReq @@ -952,7 +952,7 @@ def connect_token_update( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -968,7 +968,7 @@ def connect_token_update( @validate_call def connect_token_update_with_http_info( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], connect_token_update_req: ConnectTokenUpdateReq, _request_timeout: Union[ None, @@ -982,12 +982,12 @@ def connect_token_update_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """connect_token_update + ) -> ApiResponse[UserDelete200Response]: + """Update a ConnectToken - Updates an existing append token + Updates an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param connect_token_update_req: (required) :type connect_token_update_req: ConnectTokenUpdateReq @@ -1023,7 +1023,7 @@ def connect_token_update_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1039,7 +1039,7 @@ def connect_token_update_with_http_info( @validate_call def connect_token_update_without_preload_content( self, - connect_token_id: Annotated[StrictStr, Field(description="ID of an append token")], + connect_token_id: Annotated[StrictStr, Field(description="Unique identifier of the connectToken. Format: `ctk-`. ")], connect_token_update_req: ConnectTokenUpdateReq, _request_timeout: Union[ None, @@ -1054,11 +1054,11 @@ def connect_token_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """connect_token_update + """Update a ConnectToken - Updates an existing append token + Updates an existing ConnectToken. - :param connect_token_id: ID of an append token (required) + :param connect_token_id: Unique identifier of the connectToken. Format: `ctk-`. (required) :type connect_token_id: str :param connect_token_update_req: (required) :type connect_token_update_req: ConnectTokenUpdateReq @@ -1094,7 +1094,7 @@ def connect_token_update_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/identifiers_api.py b/src/corbado_python_sdk/generated/api/identifiers_api.py index b85fa8f..ccdb644 100644 --- a/src/corbado_python_sdk/generated/api/identifiers_api.py +++ b/src/corbado_python_sdk/generated/api/identifiers_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,11 +20,11 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.identifier import Identifier from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq from corbado_python_sdk.generated.models.identifier_list import IdentifierList from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -47,7 +47,7 @@ def __init__(self, api_client=None) -> None: @validate_call def identifier_create( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], identifier_create_req: IdentifierCreateReq, _request_timeout: Union[ None, @@ -62,11 +62,11 @@ def identifier_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Identifier: - """identifier_create + """Create a login identifier for a user - Create a new login identifier + Creates a new login identifier for a user with the given ID. Login identifiers can be of the type `email`, `phone`, or `username`. Separating login identifiers from users allows Corbado to manage multiple login identifiers of different types for each user. You can set up login identifiers in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Overview) or consult the [Documentation](/corbado-complete/overview/configuration/user-flow-configuration#2-login-identifiers-and-fallbacks) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param identifier_create_req: (required) :type identifier_create_req: IdentifierCreateReq @@ -118,7 +118,7 @@ def identifier_create( @validate_call def identifier_create_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], identifier_create_req: IdentifierCreateReq, _request_timeout: Union[ None, @@ -133,11 +133,11 @@ def identifier_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Identifier]: - """identifier_create + """Create a login identifier for a user - Create a new login identifier + Creates a new login identifier for a user with the given ID. Login identifiers can be of the type `email`, `phone`, or `username`. Separating login identifiers from users allows Corbado to manage multiple login identifiers of different types for each user. You can set up login identifiers in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Overview) or consult the [Documentation](/corbado-complete/overview/configuration/user-flow-configuration#2-login-identifiers-and-fallbacks) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param identifier_create_req: (required) :type identifier_create_req: IdentifierCreateReq @@ -189,7 +189,7 @@ def identifier_create_with_http_info( @validate_call def identifier_create_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], identifier_create_req: IdentifierCreateReq, _request_timeout: Union[ None, @@ -204,11 +204,11 @@ def identifier_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """identifier_create + """Create a login identifier for a user - Create a new login identifier + Creates a new login identifier for a user with the given ID. Login identifiers can be of the type `email`, `phone`, or `username`. Separating login identifiers from users allows Corbado to manage multiple login identifiers of different types for each user. You can set up login identifiers in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Overview) or consult the [Documentation](/corbado-complete/overview/configuration/user-flow-configuration#2-login-identifiers-and-fallbacks) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param identifier_create_req: (required) :type identifier_create_req: IdentifierCreateReq @@ -336,8 +336,8 @@ def _identifier_create_serialize( @validate_call def identifier_delete( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -350,14 +350,14 @@ def identifier_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """identifier_delete + ) -> UserDelete200Response: + """Delete a login identifier for a user - Delete an existing login identifier + Delete an existing login identifier for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -391,7 +391,7 @@ def identifier_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -407,8 +407,8 @@ def identifier_delete( @validate_call def identifier_delete_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -421,14 +421,14 @@ def identifier_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """identifier_delete + ) -> ApiResponse[UserDelete200Response]: + """Delete a login identifier for a user - Delete an existing login identifier + Delete an existing login identifier for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -462,7 +462,7 @@ def identifier_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -478,8 +478,8 @@ def identifier_delete_with_http_info( @validate_call def identifier_delete_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -493,13 +493,13 @@ def identifier_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """identifier_delete + """Delete a login identifier for a user - Delete an existing login identifier + Delete an existing login identifier for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -533,7 +533,7 @@ def identifier_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -612,10 +612,10 @@ def _identifier_delete_serialize( @validate_call def identifier_list( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -629,17 +629,17 @@ def identifier_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> IdentifierList: - """identifier_list + """List all login identifiers - Returns a list of matching identifiers + Returns a list of login identifiers. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. - The `filter` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -691,10 +691,10 @@ def identifier_list( @validate_call def identifier_list_with_http_info( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -708,17 +708,17 @@ def identifier_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[IdentifierList]: - """identifier_list + """List all login identifiers - Returns a list of matching identifiers + Returns a list of login identifiers. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. - The `filter` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -770,10 +770,10 @@ def identifier_list_with_http_info( @validate_call def identifier_list_without_preload_content( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -787,17 +787,17 @@ def identifier_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """identifier_list + """List all login identifiers - Returns a list of matching identifiers + Returns a list of login identifiers. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. - The `filter` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -927,8 +927,8 @@ def _identifier_list_serialize( @validate_call def identifier_update( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], identifier_update_req: IdentifierUpdateReq, _request_timeout: Union[ None, @@ -943,13 +943,13 @@ def identifier_update( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Identifier: - """identifier_update + """Update a login identifier for a user - Updates a login identifier (e.g. from pending to verified) + Updates a login identifier (e.g. from `pending` to `verified`) for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param identifier_update_req: (required) :type identifier_update_req: IdentifierUpdateReq @@ -1002,8 +1002,8 @@ def identifier_update( @validate_call def identifier_update_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], identifier_update_req: IdentifierUpdateReq, _request_timeout: Union[ None, @@ -1018,13 +1018,13 @@ def identifier_update_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Identifier]: - """identifier_update + """Update a login identifier for a user - Updates a login identifier (e.g. from pending to verified) + Updates a login identifier (e.g. from `pending` to `verified`) for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param identifier_update_req: (required) :type identifier_update_req: IdentifierUpdateReq @@ -1077,8 +1077,8 @@ def identifier_update_with_http_info( @validate_call def identifier_update_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - identifier_id: Annotated[StrictStr, Field(description="ID of login identifier")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + identifier_id: Annotated[StrictStr, Field(description="Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. ")], identifier_update_req: IdentifierUpdateReq, _request_timeout: Union[ None, @@ -1093,13 +1093,13 @@ def identifier_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """identifier_update + """Update a login identifier for a user - Updates a login identifier (e.g. from pending to verified) + Updates a login identifier (e.g. from `pending` to `verified`) for a user by given `userID` and `identifierID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param identifier_id: ID of login identifier (required) + :param identifier_id: Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. (required) :type identifier_id: str :param identifier_update_req: (required) :type identifier_update_req: IdentifierUpdateReq diff --git a/src/corbado_python_sdk/generated/api/passkey_challenges_api.py b/src/corbado_python_sdk/generated/api/passkey_challenges_api.py index 86b56e1..08b60c7 100644 --- a/src/corbado_python_sdk/generated/api/passkey_challenges_api.py +++ b/src/corbado_python_sdk/generated/api/passkey_challenges_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -45,11 +45,11 @@ def __init__(self, api_client=None) -> None: @validate_call def passkey_challenge_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -63,19 +63,19 @@ def passkey_challenge_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyChallengeList: - """passkey_challenge_list + """List all passkey challenges for a user - Returns a list of matching passkey challenges + Returns a list of passkey challenges for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. - The `filter` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -128,11 +128,11 @@ def passkey_challenge_list( @validate_call def passkey_challenge_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -146,19 +146,19 @@ def passkey_challenge_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyChallengeList]: - """passkey_challenge_list + """List all passkey challenges for a user - Returns a list of matching passkey challenges + Returns a list of passkey challenges for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. - The `filter` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -211,11 +211,11 @@ def passkey_challenge_list_with_http_info( @validate_call def passkey_challenge_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -229,19 +229,19 @@ def passkey_challenge_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_challenge_list + """List all passkey challenges for a user - Returns a list of matching passkey challenges + Returns a list of passkey challenges for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. - The `filter` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -375,7 +375,7 @@ def _passkey_challenge_list_serialize( @validate_call def passkey_challenge_update( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_challenge_id: Annotated[StrictStr, Field(description="ID of a passkey challenge")], passkey_challenge_update_req: PasskeyChallengeUpdateReq, _request_timeout: Union[ @@ -391,11 +391,11 @@ def passkey_challenge_update( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyChallenge: - """passkey_challenge_update + """Update a passkey challenge for a user - Updates a passkey challenge + Updates a passkey challenge for a user by given `userID` and `passkeyChallengeID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_challenge_id: ID of a passkey challenge (required) :type passkey_challenge_id: str @@ -450,7 +450,7 @@ def passkey_challenge_update( @validate_call def passkey_challenge_update_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_challenge_id: Annotated[StrictStr, Field(description="ID of a passkey challenge")], passkey_challenge_update_req: PasskeyChallengeUpdateReq, _request_timeout: Union[ @@ -466,11 +466,11 @@ def passkey_challenge_update_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyChallenge]: - """passkey_challenge_update + """Update a passkey challenge for a user - Updates a passkey challenge + Updates a passkey challenge for a user by given `userID` and `passkeyChallengeID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_challenge_id: ID of a passkey challenge (required) :type passkey_challenge_id: str @@ -525,7 +525,7 @@ def passkey_challenge_update_with_http_info( @validate_call def passkey_challenge_update_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_challenge_id: Annotated[StrictStr, Field(description="ID of a passkey challenge")], passkey_challenge_update_req: PasskeyChallengeUpdateReq, _request_timeout: Union[ @@ -541,11 +541,11 @@ def passkey_challenge_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_challenge_update + """Update a passkey challenge for a user - Updates a passkey challenge + Updates a passkey challenge for a user by given `userID` and `passkeyChallengeID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_challenge_id: ID of a passkey challenge (required) :type passkey_challenge_id: str diff --git a/src/corbado_python_sdk/generated/api/passkey_events_api.py b/src/corbado_python_sdk/generated/api/passkey_events_api.py index 428c423..f76e4bf 100644 --- a/src/corbado_python_sdk/generated/api/passkey_events_api.py +++ b/src/corbado_python_sdk/generated/api/passkey_events_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,10 +20,10 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent from corbado_python_sdk.generated.models.passkey_event_create_req import PasskeyEventCreateReq from corbado_python_sdk.generated.models.passkey_event_list import PasskeyEventList +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -46,7 +46,7 @@ def __init__(self, api_client=None) -> None: @validate_call def passkey_event_create( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_create_req: PasskeyEventCreateReq, _request_timeout: Union[ None, @@ -61,11 +61,11 @@ def passkey_event_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyEvent: - """passkey_event_create + """Create a passkey event for a user - Create a new passkey event for a user + Creates a new passkey event for a user by given `userID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_create_req: (required) :type passkey_event_create_req: PasskeyEventCreateReq @@ -117,7 +117,7 @@ def passkey_event_create( @validate_call def passkey_event_create_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_create_req: PasskeyEventCreateReq, _request_timeout: Union[ None, @@ -132,11 +132,11 @@ def passkey_event_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyEvent]: - """passkey_event_create + """Create a passkey event for a user - Create a new passkey event for a user + Creates a new passkey event for a user by given `userID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_create_req: (required) :type passkey_event_create_req: PasskeyEventCreateReq @@ -188,7 +188,7 @@ def passkey_event_create_with_http_info( @validate_call def passkey_event_create_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_create_req: PasskeyEventCreateReq, _request_timeout: Union[ None, @@ -203,11 +203,11 @@ def passkey_event_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_event_create + """Create a passkey event for a user - Create a new passkey event for a user + Creates a new passkey event for a user by given `userID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_create_req: (required) :type passkey_event_create_req: PasskeyEventCreateReq @@ -335,7 +335,7 @@ def _passkey_event_create_serialize( @validate_call def passkey_event_delete( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_id: Annotated[StrictStr, Field(description="ID of a passkey event")], _request_timeout: Union[ None, @@ -349,12 +349,12 @@ def passkey_event_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """passkey_event_delete + ) -> UserDelete200Response: + """Delete a passkey event for a user - Deletes an existing passkey event + Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_id: ID of a passkey event (required) :type passkey_event_id: str @@ -390,7 +390,7 @@ def passkey_event_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -406,7 +406,7 @@ def passkey_event_delete( @validate_call def passkey_event_delete_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_id: Annotated[StrictStr, Field(description="ID of a passkey event")], _request_timeout: Union[ None, @@ -420,12 +420,12 @@ def passkey_event_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """passkey_event_delete + ) -> ApiResponse[UserDelete200Response]: + """Delete a passkey event for a user - Deletes an existing passkey event + Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_id: ID of a passkey event (required) :type passkey_event_id: str @@ -461,7 +461,7 @@ def passkey_event_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -477,7 +477,7 @@ def passkey_event_delete_with_http_info( @validate_call def passkey_event_delete_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], passkey_event_id: Annotated[StrictStr, Field(description="ID of a passkey event")], _request_timeout: Union[ None, @@ -492,11 +492,11 @@ def passkey_event_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_event_delete + """Delete a passkey event for a user - Deletes an existing passkey event + Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param passkey_event_id: ID of a passkey event (required) :type passkey_event_id: str @@ -532,7 +532,7 @@ def passkey_event_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -611,11 +611,11 @@ def _passkey_event_delete_serialize( @validate_call def passkey_event_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -629,19 +629,19 @@ def passkey_event_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyEventList: - """passkey_event_list + """List all passkey events for a user - Returns a list of matching passkey events + Returns a list of passkey events for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `created` and `eventType`. - The `filter` parameter supports the following fields: `eventType`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -694,11 +694,11 @@ def passkey_event_list( @validate_call def passkey_event_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -712,19 +712,19 @@ def passkey_event_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyEventList]: - """passkey_event_list + """List all passkey events for a user - Returns a list of matching passkey events + Returns a list of passkey events for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `created` and `eventType`. - The `filter` parameter supports the following fields: `eventType`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -777,11 +777,11 @@ def passkey_event_list_with_http_info( @validate_call def passkey_event_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -795,19 +795,19 @@ def passkey_event_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_event_list + """List all passkey events for a user - Returns a list of matching passkey events + Returns a list of passkey events for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `created` and `eventType`. - The `filter` parameter supports the following fields: `eventType`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/src/corbado_python_sdk/generated/api/passkeys_api.py b/src/corbado_python_sdk/generated/api/passkeys_api.py index aba46aa..8d3f356 100644 --- a/src/corbado_python_sdk/generated/api/passkeys_api.py +++ b/src/corbado_python_sdk/generated/api/passkeys_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -31,6 +31,8 @@ from corbado_python_sdk.generated.models.passkey_mediation_start_rsp import PasskeyMediationStartRsp from corbado_python_sdk.generated.models.passkey_post_login_req import PasskeyPostLoginReq from corbado_python_sdk.generated.models.passkey_post_login_rsp import PasskeyPostLoginRsp +from corbado_python_sdk.generated.models.passkey_verify_signed_data_req import PasskeyVerifySignedDataReq +from corbado_python_sdk.generated.models.passkey_verify_signed_data_rsp import PasskeyVerifySignedDataRsp from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -67,9 +69,9 @@ def passkey_append_finish( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyAppendFinishRsp: - """passkey_append_finish + """Finish creating a new passkey - Completes a challenge for creating a new passkey + Finishes creating a new passkey by completing the WebAuthn ceremony. :param passkey_append_finish_req: (required) :type passkey_append_finish_req: PasskeyAppendFinishReq @@ -134,9 +136,9 @@ def passkey_append_finish_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyAppendFinishRsp]: - """passkey_append_finish + """Finish creating a new passkey - Completes a challenge for creating a new passkey + Finishes creating a new passkey by completing the WebAuthn ceremony. :param passkey_append_finish_req: (required) :type passkey_append_finish_req: PasskeyAppendFinishReq @@ -201,9 +203,9 @@ def passkey_append_finish_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_append_finish + """Finish creating a new passkey - Completes a challenge for creating a new passkey + Finishes creating a new passkey by completing the WebAuthn ceremony. :param passkey_append_finish_req: (required) :type passkey_append_finish_req: PasskeyAppendFinishReq @@ -341,9 +343,9 @@ def passkey_append_start( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyAppendStartRsp: - """passkey_append_start + """Start creating a new passkey - Starts a challenge for creating a new passkey + Starts creating a new passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-creating-a-new-passkey). :param passkey_append_start_req: (required) :type passkey_append_start_req: PasskeyAppendStartReq @@ -408,9 +410,9 @@ def passkey_append_start_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyAppendStartRsp]: - """passkey_append_start + """Start creating a new passkey - Starts a challenge for creating a new passkey + Starts creating a new passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-creating-a-new-passkey). :param passkey_append_start_req: (required) :type passkey_append_start_req: PasskeyAppendStartReq @@ -475,9 +477,9 @@ def passkey_append_start_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_append_start + """Start creating a new passkey - Starts a challenge for creating a new passkey + Starts creating a new passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-creating-a-new-passkey). :param passkey_append_start_req: (required) :type passkey_append_start_req: PasskeyAppendStartReq @@ -615,9 +617,9 @@ def passkey_login_finish( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyLoginFinishRsp: - """passkey_login_finish + """Finish login with an existing passkey - Completes a challenge for an existing passkey + Finishes login with an existing passkey by completing the WebAuthn ceremony. :param passkey_login_finish_req: (required) :type passkey_login_finish_req: PasskeyLoginFinishReq @@ -682,9 +684,9 @@ def passkey_login_finish_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyLoginFinishRsp]: - """passkey_login_finish + """Finish login with an existing passkey - Completes a challenge for an existing passkey + Finishes login with an existing passkey by completing the WebAuthn ceremony. :param passkey_login_finish_req: (required) :type passkey_login_finish_req: PasskeyLoginFinishReq @@ -749,9 +751,9 @@ def passkey_login_finish_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_login_finish + """Finish login with an existing passkey - Completes a challenge for an existing passkey + Finishes login with an existing passkey by completing the WebAuthn ceremony. :param passkey_login_finish_req: (required) :type passkey_login_finish_req: PasskeyLoginFinishReq @@ -889,9 +891,9 @@ def passkey_login_start( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyLoginStartRsp: - """passkey_login_start + """Start login with an existing passkey - Starts a challenge for an existing passkey + Starts login with an existing passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey). :param passkey_login_start_req: (required) :type passkey_login_start_req: PasskeyLoginStartReq @@ -956,9 +958,9 @@ def passkey_login_start_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyLoginStartRsp]: - """passkey_login_start + """Start login with an existing passkey - Starts a challenge for an existing passkey + Starts login with an existing passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey). :param passkey_login_start_req: (required) :type passkey_login_start_req: PasskeyLoginStartReq @@ -1023,9 +1025,9 @@ def passkey_login_start_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_login_start + """Start login with an existing passkey - Starts a challenge for an existing passkey + Starts login with an existing passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey). :param passkey_login_start_req: (required) :type passkey_login_start_req: PasskeyLoginStartReq @@ -1163,9 +1165,9 @@ def passkey_mediation_finish( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyMediationFinishRsp: - """passkey_mediation_finish + """Finish login with an existing passkey (Conditional UI) - Completes a challenge for an existing passkey (Conditional UI) + Finishes login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. :param passkey_mediation_finish_req: (required) :type passkey_mediation_finish_req: PasskeyMediationFinishReq @@ -1230,9 +1232,9 @@ def passkey_mediation_finish_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyMediationFinishRsp]: - """passkey_mediation_finish + """Finish login with an existing passkey (Conditional UI) - Completes a challenge for an existing passkey (Conditional UI) + Finishes login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. :param passkey_mediation_finish_req: (required) :type passkey_mediation_finish_req: PasskeyMediationFinishReq @@ -1297,9 +1299,9 @@ def passkey_mediation_finish_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_mediation_finish + """Finish login with an existing passkey (Conditional UI) - Completes a challenge for an existing passkey (Conditional UI) + Finishes login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. :param passkey_mediation_finish_req: (required) :type passkey_mediation_finish_req: PasskeyMediationFinishReq @@ -1437,9 +1439,9 @@ def passkey_mediation_start( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyMediationStartRsp: - """passkey_mediation_start + """Start login with an existing passkey (Conditional UI) - Starts a challenge for an existing passkey (Conditional UI) + Starts login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey-conditional-ui). :param passkey_mediation_start_req: (required) :type passkey_mediation_start_req: PasskeyMediationStartReq @@ -1504,9 +1506,9 @@ def passkey_mediation_start_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyMediationStartRsp]: - """passkey_mediation_start + """Start login with an existing passkey (Conditional UI) - Starts a challenge for an existing passkey (Conditional UI) + Starts login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey-conditional-ui). :param passkey_mediation_start_req: (required) :type passkey_mediation_start_req: PasskeyMediationStartReq @@ -1571,9 +1573,9 @@ def passkey_mediation_start_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_mediation_start + """Start login with an existing passkey (Conditional UI) - Starts a challenge for an existing passkey (Conditional UI) + Starts login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey-conditional-ui). :param passkey_mediation_start_req: (required) :type passkey_mediation_start_req: PasskeyMediationStartReq @@ -1711,7 +1713,7 @@ def passkey_post_login( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasskeyPostLoginRsp: - """passkey_post_login + """Run the post-login action for passkey Explicitly runs the post-login action @@ -1778,7 +1780,7 @@ def passkey_post_login_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasskeyPostLoginRsp]: - """passkey_post_login + """Run the post-login action for passkey Explicitly runs the post-login action @@ -1845,7 +1847,7 @@ def passkey_post_login_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """passkey_post_login + """Run the post-login action for passkey Explicitly runs the post-login action @@ -1966,3 +1968,277 @@ def _passkey_post_login_serialize( ) + + + @validate_call + def passkey_verify_signed_data( + self, + passkey_verify_signed_data_req: PasskeyVerifySignedDataReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PasskeyVerifySignedDataRsp: + """Verify signedPasskeyData from a passkey login + + Verifies the `signedPasskeyData` from a passkey login. The `signedPasskeyData` is returned by the [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey) call and is essential for transferring the authentication state to your backend. It is required only for [Corbado Connect](/corbado-connect) and is thoroughly explained in our [Documentation](/corbado-connect/concepts/signed-passkey-data). Our [generic integration guide](/corbado-connect/integration/generic) explains how to use `signedPasskeyData` in your backend. + + :param passkey_verify_signed_data_req: (required) + :type passkey_verify_signed_data_req: PasskeyVerifySignedDataReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._passkey_verify_signed_data_serialize( + passkey_verify_signed_data_req=passkey_verify_signed_data_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PasskeyVerifySignedDataRsp", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def passkey_verify_signed_data_with_http_info( + self, + passkey_verify_signed_data_req: PasskeyVerifySignedDataReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PasskeyVerifySignedDataRsp]: + """Verify signedPasskeyData from a passkey login + + Verifies the `signedPasskeyData` from a passkey login. The `signedPasskeyData` is returned by the [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey) call and is essential for transferring the authentication state to your backend. It is required only for [Corbado Connect](/corbado-connect) and is thoroughly explained in our [Documentation](/corbado-connect/concepts/signed-passkey-data). Our [generic integration guide](/corbado-connect/integration/generic) explains how to use `signedPasskeyData` in your backend. + + :param passkey_verify_signed_data_req: (required) + :type passkey_verify_signed_data_req: PasskeyVerifySignedDataReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._passkey_verify_signed_data_serialize( + passkey_verify_signed_data_req=passkey_verify_signed_data_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PasskeyVerifySignedDataRsp", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def passkey_verify_signed_data_without_preload_content( + self, + passkey_verify_signed_data_req: PasskeyVerifySignedDataReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Verify signedPasskeyData from a passkey login + + Verifies the `signedPasskeyData` from a passkey login. The `signedPasskeyData` is returned by the [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey) call and is essential for transferring the authentication state to your backend. It is required only for [Corbado Connect](/corbado-connect) and is thoroughly explained in our [Documentation](/corbado-connect/concepts/signed-passkey-data). Our [generic integration guide](/corbado-connect/integration/generic) explains how to use `signedPasskeyData` in your backend. + + :param passkey_verify_signed_data_req: (required) + :type passkey_verify_signed_data_req: PasskeyVerifySignedDataReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._passkey_verify_signed_data_serialize( + passkey_verify_signed_data_req=passkey_verify_signed_data_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PasskeyVerifySignedDataRsp", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _passkey_verify_signed_data_serialize( + self, + passkey_verify_signed_data_req, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if passkey_verify_signed_data_req is not None: + _body_params = passkey_verify_signed_data_req + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'basicAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/passkey/verifySignedData', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/corbado_python_sdk/generated/api/password_managers_api.py b/src/corbado_python_sdk/generated/api/password_managers_api.py index 722cb23..6535522 100644 --- a/src/corbado_python_sdk/generated/api/password_managers_api.py +++ b/src/corbado_python_sdk/generated/api/password_managers_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -42,7 +42,7 @@ def __init__(self, api_client=None) -> None: @validate_call def password_manager_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -56,11 +56,11 @@ def password_manager_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PasswordManagerList: - """password_manager_list + """List password managers for a user Returns a list of password managers - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -109,7 +109,7 @@ def password_manager_list( @validate_call def password_manager_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -123,11 +123,11 @@ def password_manager_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PasswordManagerList]: - """password_manager_list + """List password managers for a user Returns a list of password managers - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -176,7 +176,7 @@ def password_manager_list_with_http_info( @validate_call def password_manager_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -190,11 +190,11 @@ def password_manager_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """password_manager_list + """List password managers for a user Returns a list of password managers - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/src/corbado_python_sdk/generated/api/project_config_api.py b/src/corbado_python_sdk/generated/api/project_config_api.py index 6c3fff0..368da31 100644 --- a/src/corbado_python_sdk/generated/api/project_config_api.py +++ b/src/corbado_python_sdk/generated/api/project_config_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -17,8 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -54,8 +54,8 @@ def project_config_update_cname( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """project_config_update_cname + ) -> UserDelete200Response: + """Update project CNAME and generate SSL certificate Update project config CNAME and generates new SSL certificate @@ -92,7 +92,7 @@ def project_config_update_cname( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -121,8 +121,8 @@ def project_config_update_cname_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """project_config_update_cname + ) -> ApiResponse[UserDelete200Response]: + """Update project CNAME and generate SSL certificate Update project config CNAME and generates new SSL certificate @@ -159,7 +159,7 @@ def project_config_update_cname_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -189,7 +189,7 @@ def project_config_update_cname_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """project_config_update_cname + """Update project CNAME and generate SSL certificate Update project config CNAME and generates new SSL certificate @@ -226,7 +226,7 @@ def project_config_update_cname_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/sessions_api.py b/src/corbado_python_sdk/generated/api/sessions_api.py index c093755..0a2b96e 100644 --- a/src/corbado_python_sdk/generated/api/sessions_api.py +++ b/src/corbado_python_sdk/generated/api/sessions_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -17,13 +17,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictStr +from pydantic import Field, StrictInt, StrictStr +from typing import List, Optional from typing_extensions import Annotated -from corbado_python_sdk.generated.models.long_session import LongSession -from corbado_python_sdk.generated.models.long_session_create_req import LongSessionCreateReq -from corbado_python_sdk.generated.models.long_session_update_req import LongSessionUpdateReq -from corbado_python_sdk.generated.models.short_session import ShortSession -from corbado_python_sdk.generated.models.short_session_create_req import ShortSessionCreateReq +from corbado_python_sdk.generated.models.session_list import SessionList +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -44,10 +42,12 @@ def __init__(self, api_client=None) -> None: @validate_call - def long_session_create( + def session_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_create_req: LongSessionCreateReq, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -60,568 +60,19 @@ def long_session_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LongSession: - """long_session_create - - Create a new long session - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_create_req: (required) - :type long_session_create_req: LongSessionCreateReq - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_create_serialize( - user_id=user_id, - long_session_create_req=long_session_create_req, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def long_session_create_with_http_info( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_create_req: LongSessionCreateReq, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LongSession]: - """long_session_create - - Create a new long session - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_create_req: (required) - :type long_session_create_req: LongSessionCreateReq - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_create_serialize( - user_id=user_id, - long_session_create_req=long_session_create_req, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def long_session_create_without_preload_content( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_create_req: LongSessionCreateReq, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """long_session_create - - Create a new long session - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_create_req: (required) - :type long_session_create_req: LongSessionCreateReq - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_create_serialize( - user_id=user_id, - long_session_create_req=long_session_create_req, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _long_session_create_serialize( - self, - user_id, - long_session_create_req, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userID'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if long_session_create_req is not None: - _body_params = long_session_create_req - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'basicAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/users/{userID}/longSessions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def long_session_get( - self, - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LongSession: - """long_session_get - - Retrieves a long session by ID - - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_get_serialize( - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def long_session_get_with_http_info( - self, - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LongSession]: - """long_session_get - - Retrieves a long session by ID - - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_get_serialize( - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def long_session_get_without_preload_content( - self, - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """long_session_get - - Retrieves a long session by ID - - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._long_session_get_serialize( - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _long_session_get_serialize( - self, - long_session_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if long_session_id is not None: - _path_params['longSessionID'] = long_session_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'basicAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/longSessions/{longSessionID}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def long_session_update( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - long_session_update_req: LongSessionUpdateReq, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LongSession: - """long_session_update - - Updates long session status - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param long_session_update_req: (required) - :type long_session_update_req: LongSessionUpdateReq + ) -> SessionList: + """List all sessions + + Returns a list of sessions. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. - The `filter` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. You can view and manage sessions in the [Developer Panel](https://app.corbado.com/users/sessions) or consult the [Documentation](https://docs.corbado.com/corbado-complete/sessions/overview) for more details. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -644,10 +95,11 @@ def long_session_update( :return: Returns the result object. """ # noqa: E501 - _param = self._long_session_update_serialize( - user_id=user_id, - long_session_id=long_session_id, - long_session_update_req=long_session_update_req, + _param = self._session_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -655,7 +107,7 @@ def long_session_update( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", + '200': "SessionList", } response_data = self.api_client.call_api( *_param, @@ -669,11 +121,12 @@ def long_session_update( @validate_call - def long_session_update_with_http_info( + def session_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - long_session_update_req: LongSessionUpdateReq, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -686,17 +139,19 @@ def long_session_update_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LongSession]: - """long_session_update - - Updates long session status - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param long_session_update_req: (required) - :type long_session_update_req: LongSessionUpdateReq + ) -> ApiResponse[SessionList]: + """List all sessions + + Returns a list of sessions. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. - The `filter` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. You can view and manage sessions in the [Developer Panel](https://app.corbado.com/users/sessions) or consult the [Documentation](https://docs.corbado.com/corbado-complete/sessions/overview) for more details. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -719,10 +174,11 @@ def long_session_update_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._long_session_update_serialize( - user_id=user_id, - long_session_id=long_session_id, - long_session_update_req=long_session_update_req, + _param = self._session_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -730,7 +186,7 @@ def long_session_update_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", + '200': "SessionList", } response_data = self.api_client.call_api( *_param, @@ -744,11 +200,12 @@ def long_session_update_with_http_info( @validate_call - def long_session_update_without_preload_content( + def session_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - long_session_update_req: LongSessionUpdateReq, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -762,16 +219,18 @@ def long_session_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """long_session_update - - Updates long session status - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param long_session_update_req: (required) - :type long_session_update_req: LongSessionUpdateReq + """List all sessions + + Returns a list of sessions. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. - The `filter` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. You can view and manage sessions in the [Developer Panel](https://app.corbado.com/users/sessions) or consult the [Documentation](https://docs.corbado.com/corbado-complete/sessions/overview) for more details. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -794,10 +253,11 @@ def long_session_update_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._long_session_update_serialize( - user_id=user_id, - long_session_id=long_session_id, - long_session_update_req=long_session_update_req, + _param = self._session_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -805,7 +265,7 @@ def long_session_update_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", + '200': "SessionList", } response_data = self.api_client.call_api( *_param, @@ -814,11 +274,12 @@ def long_session_update_without_preload_content( return response_data.response - def _long_session_update_serialize( + def _session_list_serialize( self, - user_id, - long_session_id, - long_session_update_req, + sort, + filter, + page, + page_size, _request_auth, _content_type, _headers, @@ -828,6 +289,7 @@ def _long_session_update_serialize( _host = None _collection_formats: Dict[str, str] = { + 'filter[]': 'multi', } _path_params: Dict[str, str] = {} @@ -840,16 +302,26 @@ def _long_session_update_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userID'] = user_id - if long_session_id is not None: - _path_params['longSessionID'] = long_session_id # process the query parameters + if sort is not None: + + _query_params.append(('sort', sort)) + + if filter is not None: + + _query_params.append(('filter[]', filter)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + # process the header parameters # process the form parameters # process the body parameter - if long_session_update_req is not None: - _body_params = long_session_update_req # set the HTTP header `Accept` @@ -860,19 +332,6 @@ def _long_session_update_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -880,8 +339,8 @@ def _long_session_update_serialize( ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/users/{userID}/longSessions/{longSessionID}', + method='GET', + resource_path='/sessions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -898,11 +357,9 @@ def _long_session_update_serialize( @validate_call - def short_session_create( + def session_revoke( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - short_session_create_req: ShortSessionCreateReq, + session_id: Annotated[str, Field(min_length=30, strict=True, max_length=30, description="ID of session")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -915,17 +372,13 @@ def short_session_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShortSession: - """short_session_create + ) -> UserDelete200Response: + """Revoke a session - Create a new short session + Revokes an existing session by given `sessionID`. - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param short_session_create_req: (required) - :type short_session_create_req: ShortSessionCreateReq + :param session_id: ID of session (required) + :type session_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -948,10 +401,8 @@ def short_session_create( :return: Returns the result object. """ # noqa: E501 - _param = self._short_session_create_serialize( - user_id=user_id, - long_session_id=long_session_id, - short_session_create_req=short_session_create_req, + _param = self._session_revoke_serialize( + session_id=session_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -959,7 +410,7 @@ def short_session_create( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ShortSession", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -973,11 +424,9 @@ def short_session_create( @validate_call - def short_session_create_with_http_info( + def session_revoke_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - short_session_create_req: ShortSessionCreateReq, + session_id: Annotated[str, Field(min_length=30, strict=True, max_length=30, description="ID of session")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -990,17 +439,13 @@ def short_session_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShortSession]: - """short_session_create + ) -> ApiResponse[UserDelete200Response]: + """Revoke a session - Create a new short session + Revokes an existing session by given `sessionID`. - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param short_session_create_req: (required) - :type short_session_create_req: ShortSessionCreateReq + :param session_id: ID of session (required) + :type session_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1023,10 +468,8 @@ def short_session_create_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._short_session_create_serialize( - user_id=user_id, - long_session_id=long_session_id, - short_session_create_req=short_session_create_req, + _param = self._session_revoke_serialize( + session_id=session_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1034,7 +477,7 @@ def short_session_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ShortSession", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1048,11 +491,9 @@ def short_session_create_with_http_info( @validate_call - def short_session_create_without_preload_content( + def session_revoke_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - short_session_create_req: ShortSessionCreateReq, + session_id: Annotated[str, Field(min_length=30, strict=True, max_length=30, description="ID of session")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1066,16 +507,12 @@ def short_session_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """short_session_create + """Revoke a session - Create a new short session + Revokes an existing session by given `sessionID`. - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param short_session_create_req: (required) - :type short_session_create_req: ShortSessionCreateReq + :param session_id: ID of session (required) + :type session_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1098,10 +535,8 @@ def short_session_create_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._short_session_create_serialize( - user_id=user_id, - long_session_id=long_session_id, - short_session_create_req=short_session_create_req, + _param = self._session_revoke_serialize( + session_id=session_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1109,7 +544,7 @@ def short_session_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ShortSession", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1118,11 +553,9 @@ def short_session_create_without_preload_content( return response_data.response - def _short_session_create_serialize( + def _session_revoke_serialize( self, - user_id, - long_session_id, - short_session_create_req, + session_id, _request_auth, _content_type, _headers, @@ -1144,16 +577,12 @@ def _short_session_create_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userID'] = user_id - if long_session_id is not None: - _path_params['longSessionID'] = long_session_id + if session_id is not None: + _path_params['sessionID'] = session_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if short_session_create_req is not None: - _body_params = short_session_create_req # set the HTTP header `Accept` @@ -1164,19 +593,6 @@ def _short_session_create_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1185,283 +601,7 @@ def _short_session_create_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/users/{userID}/longSessions/{longSessionID}/shortSessions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def user_long_session_get( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LongSession: - """user_long_session_get - - Retrieves a long session by ID and user ID - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_long_session_get_serialize( - user_id=user_id, - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_long_session_get_with_http_info( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LongSession]: - """user_long_session_get - - Retrieves a long session by ID and user ID - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_long_session_get_serialize( - user_id=user_id, - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_long_session_get_without_preload_content( - self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - long_session_id: Annotated[StrictStr, Field(description="ID of long session")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """user_long_session_get - - Retrieves a long session by ID and user ID - - :param user_id: ID of user (required) - :type user_id: str - :param long_session_id: ID of long session (required) - :type long_session_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_long_session_get_serialize( - user_id=user_id, - long_session_id=long_session_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LongSession", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_long_session_get_serialize( - self, - user_id, - long_session_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userID'] = user_id - if long_session_id is not None: - _path_params['longSessionID'] = long_session_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'basicAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/users/{userID}/longSessions/{longSessionID}', + resource_path='/sessions/{sessionID}/revoke', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/src/corbado_python_sdk/generated/api/users_api.py b/src/corbado_python_sdk/generated/api/users_api.py index ef9bc2c..c7efd6b 100644 --- a/src/corbado_python_sdk/generated/api/users_api.py +++ b/src/corbado_python_sdk/generated/api/users_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,12 +21,13 @@ from typing import List, Optional from typing_extensions import Annotated from corbado_python_sdk.generated.models.credential_list import CredentialList -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.social_account import SocialAccount from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq from corbado_python_sdk.generated.models.social_account_list import SocialAccountList from corbado_python_sdk.generated.models.user import User from corbado_python_sdk.generated.models.user_create_req import UserCreateReq +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response +from corbado_python_sdk.generated.models.user_list import UserList from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized @@ -50,8 +51,8 @@ def __init__(self, api_client=None) -> None: @validate_call def credential_delete( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - credential_id: Annotated[StrictStr, Field(description="ID of credential")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + credential_id: Annotated[StrictStr, Field(description="Unique identifier of the passkey. Format: `cre-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -64,14 +65,14 @@ def credential_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """credential_delete + ) -> UserDelete200Response: + """Delete a passkey for a user - Deletes an existing credential (passkey) + Deletes an existing passkey for a user by given `userID` and `credentialID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param credential_id: ID of credential (required) + :param credential_id: Unique identifier of the passkey. Format: `cre-`. (required) :type credential_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -105,7 +106,7 @@ def credential_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -121,8 +122,8 @@ def credential_delete( @validate_call def credential_delete_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - credential_id: Annotated[StrictStr, Field(description="ID of credential")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + credential_id: Annotated[StrictStr, Field(description="Unique identifier of the passkey. Format: `cre-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -135,14 +136,14 @@ def credential_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """credential_delete + ) -> ApiResponse[UserDelete200Response]: + """Delete a passkey for a user - Deletes an existing credential (passkey) + Deletes an existing passkey for a user by given `userID` and `credentialID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param credential_id: ID of credential (required) + :param credential_id: Unique identifier of the passkey. Format: `cre-`. (required) :type credential_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -176,7 +177,7 @@ def credential_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -192,8 +193,8 @@ def credential_delete_with_http_info( @validate_call def credential_delete_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - credential_id: Annotated[StrictStr, Field(description="ID of credential")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + credential_id: Annotated[StrictStr, Field(description="Unique identifier of the passkey. Format: `cre-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -207,13 +208,13 @@ def credential_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """credential_delete + """Delete a passkey for a user - Deletes an existing credential (passkey) + Deletes an existing passkey for a user by given `userID` and `credentialID`. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param credential_id: ID of credential (required) + :param credential_id: Unique identifier of the passkey. Format: `cre-`. (required) :type credential_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -247,7 +248,7 @@ def credential_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -326,11 +327,11 @@ def _credential_delete_serialize( @validate_call def credential_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -344,19 +345,19 @@ def credential_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CredentialList: - """credential_list + """List passkeys for a user - Returns a list of credentials (passkeys) + Returns a list of passkeys for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. - The `filter` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -409,11 +410,11 @@ def credential_list( @validate_call def credential_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -427,19 +428,19 @@ def credential_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CredentialList]: - """credential_list + """List passkeys for a user - Returns a list of credentials (passkeys) + Returns a list of passkeys for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. - The `filter` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -492,11 +493,11 @@ def credential_list_with_http_info( @validate_call def credential_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -510,19 +511,19 @@ def credential_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """credential_list + """List passkeys for a user - Returns a list of credentials (passkeys) + Returns a list of passkeys for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. - The `filter` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -656,7 +657,7 @@ def _credential_list_serialize( @validate_call def social_account_create( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], social_account_create_req: SocialAccountCreateReq, _request_timeout: Union[ None, @@ -671,11 +672,11 @@ def social_account_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SocialAccount: - """social_account_create + """Create a social login for a user - Creates a new social account + Creates a new social login for a user by given `userID`. Social logins are used to authenticate users with third-party providers like Google, Microsoft, or GitHub. You can set up social logins in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Social) or consult the [Documentation](/corbado-complete/overview/configuration/social-logins/overview) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param social_account_create_req: (required) :type social_account_create_req: SocialAccountCreateReq @@ -727,7 +728,7 @@ def social_account_create( @validate_call def social_account_create_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], social_account_create_req: SocialAccountCreateReq, _request_timeout: Union[ None, @@ -742,11 +743,11 @@ def social_account_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SocialAccount]: - """social_account_create + """Create a social login for a user - Creates a new social account + Creates a new social login for a user by given `userID`. Social logins are used to authenticate users with third-party providers like Google, Microsoft, or GitHub. You can set up social logins in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Social) or consult the [Documentation](/corbado-complete/overview/configuration/social-logins/overview) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param social_account_create_req: (required) :type social_account_create_req: SocialAccountCreateReq @@ -798,7 +799,7 @@ def social_account_create_with_http_info( @validate_call def social_account_create_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], social_account_create_req: SocialAccountCreateReq, _request_timeout: Union[ None, @@ -813,11 +814,11 @@ def social_account_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """social_account_create + """Create a social login for a user - Creates a new social account + Creates a new social login for a user by given `userID`. Social logins are used to authenticate users with third-party providers like Google, Microsoft, or GitHub. You can set up social logins in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Social) or consult the [Documentation](/corbado-complete/overview/configuration/social-logins/overview) for more details. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param social_account_create_req: (required) :type social_account_create_req: SocialAccountCreateReq @@ -945,10 +946,10 @@ def _social_account_create_serialize( @validate_call def social_account_list( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -962,17 +963,17 @@ def social_account_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> SocialAccountList: - """social_account_list + """List all social logins - Returns a list of social accounts + Returns a list of social logins. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1024,10 +1025,10 @@ def social_account_list( @validate_call def social_account_list_with_http_info( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1041,17 +1042,17 @@ def social_account_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[SocialAccountList]: - """social_account_list + """List all social logins - Returns a list of social accounts + Returns a list of social logins. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1103,10 +1104,10 @@ def social_account_list_with_http_info( @validate_call def social_account_list_without_preload_content( self, - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1120,17 +1121,17 @@ def social_account_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """social_account_list + """List all social logins - Returns a list of social accounts + Returns a list of social logins. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1274,9 +1275,9 @@ def user_create( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> User: - """user_create + """Create a new user - Creates a new user + Creates a new user with the given status. Use [login identifiers](/api-reference/backend-api/identifiers/create-a-login-identifier-for-a-user) to add an email address or phone number to the user. You can also manage users in the [Developer Panel](https://app.corbado.com/users). :param user_create_req: (required) :type user_create_req: UserCreateReq @@ -1341,9 +1342,9 @@ def user_create_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[User]: - """user_create + """Create a new user - Creates a new user + Creates a new user with the given status. Use [login identifiers](/api-reference/backend-api/identifiers/create-a-login-identifier-for-a-user) to add an email address or phone number to the user. You can also manage users in the [Developer Panel](https://app.corbado.com/users). :param user_create_req: (required) :type user_create_req: UserCreateReq @@ -1408,9 +1409,9 @@ def user_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_create + """Create a new user - Creates a new user + Creates a new user with the given status. Use [login identifiers](/api-reference/backend-api/identifiers/create-a-login-identifier-for-a-user) to add an email address or phone number to the user. You can also manage users in the [Developer Panel](https://app.corbado.com/users). :param user_create_req: (required) :type user_create_req: UserCreateReq @@ -1534,7 +1535,7 @@ def _user_create_serialize( @validate_call def user_delete( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1547,12 +1548,12 @@ def user_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: - """user_delete + ) -> UserDelete200Response: + """Delete a user - Deletes a user + Deletes a user by given `userID`. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1585,7 +1586,7 @@ def user_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1601,7 +1602,7 @@ def user_delete( @validate_call def user_delete_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1614,12 +1615,12 @@ def user_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: - """user_delete + ) -> ApiResponse[UserDelete200Response]: + """Delete a user - Deletes a user + Deletes a user by given `userID`. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1652,7 +1653,7 @@ def user_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1668,7 +1669,7 @@ def user_delete_with_http_info( @validate_call def user_delete_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1682,11 +1683,11 @@ def user_delete_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_delete + """Delete a user - Deletes a user + Deletes a user by given `userID`. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1719,7 +1720,7 @@ def user_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -1795,7 +1796,7 @@ def _user_delete_serialize( @validate_call def user_get( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1809,11 +1810,11 @@ def user_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> User: - """user_get + """Retrieve a user - Returns a user + Retrieves a user by given `userID`. This does not return login identifiers like email addresses or phone numbers. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1862,7 +1863,7 @@ def user_get( @validate_call def user_get_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1876,11 +1877,11 @@ def user_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[User]: - """user_get + """Retrieve a user - Returns a user + Retrieves a user by given `userID`. This does not return login identifiers like email addresses or phone numbers. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1929,7 +1930,7 @@ def user_get_with_http_info( @validate_call def user_get_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1943,11 +1944,11 @@ def user_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_get + """Retrieve a user - Returns a user + Retrieves a user by given `userID`. This does not return login identifiers like email addresses or phone numbers. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2053,14 +2054,329 @@ def _user_get_serialize( + @validate_call + def user_list( + self, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserList: + """List users + + Returns a list of project users. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `id`, `name`, `fullName`, `created`, `updated` and `status`. - The `filter` parameter supports the following fields: `id`, `searchValue`, `name`, `fullName`, `created`, `updated` and `status`. Searches in `searchValue` are performed across the `name`, `fullName` fields and identifiers values (emails, usernames and phone numbers). Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._user_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def user_list_with_http_info( + self, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserList]: + """List users + + Returns a list of project users. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `id`, `name`, `fullName`, `created`, `updated` and `status`. - The `filter` parameter supports the following fields: `id`, `searchValue`, `name`, `fullName`, `created`, `updated` and `status`. Searches in `searchValue` are performed across the `name`, `fullName` fields and identifiers values (emails, usernames and phone numbers). Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._user_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def user_list_without_preload_content( + self, + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List users + + Returns a list of project users. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `id`, `name`, `fullName`, `created`, `updated` and `status`. - The `filter` parameter supports the following fields: `id`, `searchValue`, `name`, `fullName`, `created`, `updated` and `status`. Searches in `searchValue` are performed across the `name`, `fullName` fields and identifiers values (emails, usernames and phone numbers). Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + :type sort: str + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + :type filter: List[str] + :param page: The page number to retrieve for paginated results. + :type page: int + :param page_size: The number of items to return per page. Useful for pagination. + :type page_size: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._user_list_serialize( + sort=sort, + filter=filter, + page=page, + page_size=page_size, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserList", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _user_list_serialize( + self, + sort, + filter, + page, + page_size, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'filter[]': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if sort is not None: + + _query_params.append(('sort', sort)) + + if filter is not None: + + _query_params.append(('filter[]', filter)) + + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'basicAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/users', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def user_social_account_list( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2074,19 +2390,19 @@ def user_social_account_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> List[SocialAccount]: - """user_social_account_list + """List all social logins for a user - Returns a list of social accounts + Returns a list of social logins for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2139,11 +2455,11 @@ def user_social_account_list( @validate_call def user_social_account_list_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2157,19 +2473,19 @@ def user_social_account_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[List[SocialAccount]]: - """user_social_account_list + """List all social logins for a user - Returns a list of social accounts + Returns a list of social logins for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2222,11 +2538,11 @@ def user_social_account_list_with_http_info( @validate_call def user_social_account_list_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], - sort: Annotated[Optional[StrictStr], Field(description="Field sorting")] = None, - filter: Annotated[Optional[List[StrictStr]], Field(description="Field filtering")] = None, - page: Annotated[Optional[StrictInt], Field(description="Page number")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of items per page")] = None, + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], + sort: Annotated[Optional[StrictStr], Field(description="Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. ")] = None, + filter: Annotated[Optional[List[StrictStr]], Field(description="Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) ")] = None, + page: Annotated[Optional[StrictInt], Field(description="The page number to retrieve for paginated results. ")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The number of items to return per page. Useful for pagination. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2240,19 +2556,19 @@ def user_social_account_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_social_account_list + """List all social logins for a user - Returns a list of social accounts + Returns a list of social logins for a user by given `userID`. The list can be sorted and filtered: - The `sort` parameter supports the following fields: `providerType` and `foreignID`. - The `filter` parameter supports the following fields: `providerType` and `foreignID`. Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str - :param sort: Field sorting + :param sort: Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. :type sort: str - :param filter: Field filtering + :param filter: Filter results by specific fields and conditions. Format: `::`. Supported operators include: - `eq`: equals (e\\.g\\. `email:eq:mail@example\\.com` matches items where email equals mail@example\\.com) - `gt`: greater than (e\\.g\\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) - `lt`: less than (e\\.g\\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) :type filter: List[str] - :param page: Page number + :param page: The page number to retrieve for paginated results. :type page: int - :param page_size: Number of items per page + :param page_size: The number of items to return per page. Useful for pagination. :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2386,7 +2702,7 @@ def _user_social_account_list_serialize( @validate_call def user_update( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], user_update_req: UserUpdateReq, _request_timeout: Union[ None, @@ -2401,11 +2717,11 @@ def user_update( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> User: - """user_update + """Update a user - Updates a user + Updates a user by given `userID`. For example, this can be used to modify the user's status. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param user_update_req: (required) :type user_update_req: UserUpdateReq @@ -2457,7 +2773,7 @@ def user_update( @validate_call def user_update_with_http_info( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], user_update_req: UserUpdateReq, _request_timeout: Union[ None, @@ -2472,11 +2788,11 @@ def user_update_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[User]: - """user_update + """Update a user - Updates a user + Updates a user by given `userID`. For example, this can be used to modify the user's status. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param user_update_req: (required) :type user_update_req: UserUpdateReq @@ -2528,7 +2844,7 @@ def user_update_with_http_info( @validate_call def user_update_without_preload_content( self, - user_id: Annotated[StrictStr, Field(description="ID of user")], + user_id: Annotated[StrictStr, Field(description="Unique identifier of the user. Format: `usr-`. ")], user_update_req: UserUpdateReq, _request_timeout: Union[ None, @@ -2543,11 +2859,11 @@ def user_update_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """user_update + """Update a user - Updates a user + Updates a user by given `userID`. For example, this can be used to modify the user's status. You can also manage users in the [Developer Panel](https://app.corbado.com/users). - :param user_id: ID of user (required) + :param user_id: Unique identifier of the user. Format: `usr-`. (required) :type user_id: str :param user_update_req: (required) :type user_update_req: UserUpdateReq diff --git a/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py b/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py index ecbc7f0..c474824 100644 --- a/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py +++ b/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -19,10 +19,11 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint from corbado_python_sdk.generated.models.webhook_endpoint_create_req import WebhookEndpointCreateReq from corbado_python_sdk.generated.models.webhook_endpoint_list import WebhookEndpointList +from corbado_python_sdk.generated.models.webhook_endpoint_update_req import WebhookEndpointUpdateReq from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -332,7 +333,7 @@ def webhook_endpoint_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GenericRsp: + ) -> UserDelete200Response: """webhook_endpoint_delete Deletes an existing webhook endpoint @@ -370,7 +371,7 @@ def webhook_endpoint_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -399,7 +400,7 @@ def webhook_endpoint_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GenericRsp]: + ) -> ApiResponse[UserDelete200Response]: """webhook_endpoint_delete Deletes an existing webhook endpoint @@ -437,7 +438,7 @@ def webhook_endpoint_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -504,7 +505,7 @@ def webhook_endpoint_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GenericRsp", + '200': "UserDelete200Response", } response_data = self.api_client.call_api( *_param, @@ -821,3 +822,292 @@ def _webhook_endpoint_list_serialize( ) + + + @validate_call + def webhook_endpoint_update( + self, + webhook_endpoint_id: Annotated[StrictStr, Field(description="ID of a webhook endpoint")], + webhook_endpoint_update_req: WebhookEndpointUpdateReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebhookEndpoint: + """webhook_endpoint_update + + Updates an existing webhook endpoint + + :param webhook_endpoint_id: ID of a webhook endpoint (required) + :type webhook_endpoint_id: str + :param webhook_endpoint_update_req: (required) + :type webhook_endpoint_update_req: WebhookEndpointUpdateReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._webhook_endpoint_update_serialize( + webhook_endpoint_id=webhook_endpoint_id, + webhook_endpoint_update_req=webhook_endpoint_update_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookEndpoint", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def webhook_endpoint_update_with_http_info( + self, + webhook_endpoint_id: Annotated[StrictStr, Field(description="ID of a webhook endpoint")], + webhook_endpoint_update_req: WebhookEndpointUpdateReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebhookEndpoint]: + """webhook_endpoint_update + + Updates an existing webhook endpoint + + :param webhook_endpoint_id: ID of a webhook endpoint (required) + :type webhook_endpoint_id: str + :param webhook_endpoint_update_req: (required) + :type webhook_endpoint_update_req: WebhookEndpointUpdateReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._webhook_endpoint_update_serialize( + webhook_endpoint_id=webhook_endpoint_id, + webhook_endpoint_update_req=webhook_endpoint_update_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookEndpoint", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def webhook_endpoint_update_without_preload_content( + self, + webhook_endpoint_id: Annotated[StrictStr, Field(description="ID of a webhook endpoint")], + webhook_endpoint_update_req: WebhookEndpointUpdateReq, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """webhook_endpoint_update + + Updates an existing webhook endpoint + + :param webhook_endpoint_id: ID of a webhook endpoint (required) + :type webhook_endpoint_id: str + :param webhook_endpoint_update_req: (required) + :type webhook_endpoint_update_req: WebhookEndpointUpdateReq + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._webhook_endpoint_update_serialize( + webhook_endpoint_id=webhook_endpoint_id, + webhook_endpoint_update_req=webhook_endpoint_update_req, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebhookEndpoint", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _webhook_endpoint_update_serialize( + self, + webhook_endpoint_id, + webhook_endpoint_update_req, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if webhook_endpoint_id is not None: + _path_params['webhookEndpointID'] = webhook_endpoint_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if webhook_endpoint_update_req is not None: + _body_params = webhook_endpoint_update_req + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'basicAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/webhookEndpoints/{webhookEndpointID}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/src/corbado_python_sdk/generated/api_client.py b/src/corbado_python_sdk/generated/api_client.py index fe11a5e..52f5e3a 100644 --- a/src/corbado_python_sdk/generated/api_client.py +++ b/src/corbado_python_sdk/generated/api_client.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -22,6 +22,7 @@ import os import re import tempfile +import uuid from urllib.parse import quote from typing import Tuple, Optional, List, Dict, Union @@ -357,6 +358,8 @@ def sanitize_for_serialization(self, obj): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj + elif isinstance(obj, uuid.UUID): + return str(obj) elif isinstance(obj, list): return [ self.sanitize_for_serialization(sub_obj) for sub_obj in obj @@ -383,6 +386,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + return { key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() @@ -405,7 +412,7 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: @@ -454,13 +461,13 @@ def __deserialize(self, data, klass): if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) - elif klass == object: + elif klass is object: return self.__deserialize_object(data) - elif klass == datetime.date: + elif klass is datetime.date: return self.__deserialize_date(data) - elif klass == datetime.datetime: + elif klass is datetime.datetime: return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: + elif klass is decimal.Decimal: return decimal.Decimal(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) diff --git a/src/corbado_python_sdk/generated/configuration.py b/src/corbado_python_sdk/generated/configuration.py index bf8a711..8959dc2 100644 --- a/src/corbado_python_sdk/generated/configuration.py +++ b/src/corbado_python_sdk/generated/configuration.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -19,7 +19,7 @@ from logging import FileHandler import multiprocessing import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union from typing_extensions import NotRequired, Self import urllib3 @@ -162,6 +162,8 @@ class Configuration: :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. :Example: @@ -192,13 +194,14 @@ def __init__( username: Optional[str]=None, password: Optional[str]=None, access_token: Optional[str]=None, - server_index: Optional[int]=None, + server_index: Optional[int]=None, server_variables: Optional[ServerVariablesT]=None, server_operation_index: Optional[Dict[int, int]]=None, server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, ignore_operation_servers: bool=False, ssl_ca_cert: Optional[str]=None, retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, *, debug: Optional[bool] = None, ) -> None: @@ -276,6 +279,10 @@ def __init__( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ self.cert_file = None """client certificate file """ diff --git a/src/corbado_python_sdk/generated/exceptions.py b/src/corbado_python_sdk/generated/exceptions.py index c4ab103..278b478 100644 --- a/src/corbado_python_sdk/generated/exceptions.py +++ b/src/corbado_python_sdk/generated/exceptions.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/__init__.py b/src/corbado_python_sdk/generated/models/__init__.py index aba7041..6628f43 100644 --- a/src/corbado_python_sdk/generated/models/__init__.py +++ b/src/corbado_python_sdk/generated/models/__init__.py @@ -4,7 +4,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -13,10 +13,9 @@ Do not edit the class manually. """ # noqa: E501 - # import models into model package from corbado_python_sdk.generated.models.aaguid_details import AaguidDetails -from corbado_python_sdk.generated.models.app_type import AppType +from corbado_python_sdk.generated.models.append_history_data import AppendHistoryData from corbado_python_sdk.generated.models.auth_event import AuthEvent from corbado_python_sdk.generated.models.auth_event_create_req import AuthEventCreateReq from corbado_python_sdk.generated.models.auth_event_method import AuthEventMethod @@ -27,6 +26,8 @@ from corbado_python_sdk.generated.models.challenge_status import ChallengeStatus from corbado_python_sdk.generated.models.challenge_type import ChallengeType from corbado_python_sdk.generated.models.challenge_update_req import ChallengeUpdateReq +from corbado_python_sdk.generated.models.client_env import ClientEnv +from corbado_python_sdk.generated.models.client_env_list import ClientEnvList from corbado_python_sdk.generated.models.client_information import ClientInformation from corbado_python_sdk.generated.models.connect_token import ConnectToken from corbado_python_sdk.generated.models.connect_token_create_req import ConnectTokenCreateReq @@ -43,13 +44,10 @@ from corbado_python_sdk.generated.models.credential_list import CredentialList from corbado_python_sdk.generated.models.cross_device_authentication_strategy import CrossDeviceAuthenticationStrategy from corbado_python_sdk.generated.models.decision_insights import DecisionInsights +from corbado_python_sdk.generated.models.decision_insights_append import DecisionInsightsAppend from corbado_python_sdk.generated.models.decision_tag import DecisionTag from corbado_python_sdk.generated.models.detection_insights import DetectionInsights from corbado_python_sdk.generated.models.detection_tag import DetectionTag -from corbado_python_sdk.generated.models.error_rsp import ErrorRsp -from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError -from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation -from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.identifier import Identifier from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq from corbado_python_sdk.generated.models.identifier_list import IdentifierList @@ -57,11 +55,8 @@ from corbado_python_sdk.generated.models.identifier_type import IdentifierType from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy -from corbado_python_sdk.generated.models.long_session import LongSession -from corbado_python_sdk.generated.models.long_session_create_req import LongSessionCreateReq -from corbado_python_sdk.generated.models.long_session_status import LongSessionStatus -from corbado_python_sdk.generated.models.long_session_update_req import LongSessionUpdateReq -from corbado_python_sdk.generated.models.paging import Paging +from corbado_python_sdk.generated.models.native_meta import NativeMeta +from corbado_python_sdk.generated.models.parsed_device_info import ParsedDeviceInfo from corbado_python_sdk.generated.models.passkey_append_finish_req import PasskeyAppendFinishReq from corbado_python_sdk.generated.models.passkey_append_finish_rsp import PasskeyAppendFinishRsp from corbado_python_sdk.generated.models.passkey_append_start_req import PasskeyAppendStartReq @@ -81,27 +76,40 @@ from corbado_python_sdk.generated.models.passkey_login_finish_rsp import PasskeyLoginFinishRsp from corbado_python_sdk.generated.models.passkey_login_start_req import PasskeyLoginStartReq from corbado_python_sdk.generated.models.passkey_login_start_rsp import PasskeyLoginStartRsp +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_alternative_project import PasskeyMediationFinishErrorAlternativeProject +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_credential_deleted import PasskeyMediationFinishErrorCredentialDeleted from corbado_python_sdk.generated.models.passkey_mediation_finish_req import PasskeyMediationFinishReq from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp import PasskeyMediationFinishRsp +from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp_error import PasskeyMediationFinishRspError from corbado_python_sdk.generated.models.passkey_mediation_start_req import PasskeyMediationStartReq from corbado_python_sdk.generated.models.passkey_mediation_start_rsp import PasskeyMediationStartRsp from corbado_python_sdk.generated.models.passkey_post_login_req import PasskeyPostLoginReq from corbado_python_sdk.generated.models.passkey_post_login_rsp import PasskeyPostLoginRsp +from corbado_python_sdk.generated.models.passkey_verify_signed_data_req import PasskeyVerifySignedDataReq +from corbado_python_sdk.generated.models.passkey_verify_signed_data_rsp import PasskeyVerifySignedDataRsp from corbado_python_sdk.generated.models.password_manager import PasswordManager from corbado_python_sdk.generated.models.password_manager_list import PasswordManagerList from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq -from corbado_python_sdk.generated.models.request_data import RequestData -from corbado_python_sdk.generated.models.short_session import ShortSession -from corbado_python_sdk.generated.models.short_session_create_req import ShortSessionCreateReq +from corbado_python_sdk.generated.models.session_list import SessionList +from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner from corbado_python_sdk.generated.models.social_account import SocialAccount from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq from corbado_python_sdk.generated.models.social_account_list import SocialAccountList -from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType from corbado_python_sdk.generated.models.user import User +from corbado_python_sdk.generated.models.user_aggregate import UserAggregate from corbado_python_sdk.generated.models.user_create_req import UserCreateReq +from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response +from corbado_python_sdk.generated.models.user_list import UserList +from corbado_python_sdk.generated.models.user_list_default_response import UserListDefaultResponse +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner +from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from corbado_python_sdk.generated.models.user_status import UserStatus from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint from corbado_python_sdk.generated.models.webhook_endpoint_create_req import WebhookEndpointCreateReq from corbado_python_sdk.generated.models.webhook_endpoint_list import WebhookEndpointList +from corbado_python_sdk.generated.models.webhook_endpoint_update_req import WebhookEndpointUpdateReq from corbado_python_sdk.generated.models.webhook_event_type import WebhookEventType + diff --git a/src/corbado_python_sdk/generated/models/aaguid_details.py b/src/corbado_python_sdk/generated/models/aaguid_details.py index a53dc39..f98f2c8 100644 --- a/src/corbado_python_sdk/generated/models/aaguid_details.py +++ b/src/corbado_python_sdk/generated/models/aaguid_details.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/app_type.py b/src/corbado_python_sdk/generated/models/app_type.py deleted file mode 100644 index 29dfc8b..0000000 --- a/src/corbado_python_sdk/generated/models/app_type.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Corbado Backend API - - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. - - The version of the OpenAPI document: 2.0.0 - Contact: support@corbado.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class AppType(str, Enum): - """ - Application type - """ - - """ - allowed enum values - """ - EMPTY = 'empty' - WEB = 'web' - NATIVE = 'native' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of AppType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/src/corbado_python_sdk/generated/models/append_history_data.py b/src/corbado_python_sdk/generated/models/append_history_data.py new file mode 100644 index 0000000..e7b1893 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/append_history_data.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AppendHistoryData(BaseModel): + """ + AppendHistoryData + """ # noqa: E501 + default_count: StrictInt = Field(alias="defaultCount") + after_error_count: StrictInt = Field(alias="afterErrorCount") + after_hybrid_count: StrictInt = Field(alias="afterHybridCount") + auto_count: StrictInt = Field(alias="autoCount") + default_cooldown: StrictBool = Field(alias="defaultCooldown") + after_error_cooldown: StrictBool = Field(alias="afterErrorCooldown") + after_hybrid_cooldown: StrictBool = Field(alias="afterHybridCooldown") + auto_cooldown: StrictBool = Field(alias="autoCooldown") + __properties: ClassVar[List[str]] = ["defaultCount", "afterErrorCount", "afterHybridCount", "autoCount", "defaultCooldown", "afterErrorCooldown", "afterHybridCooldown", "autoCooldown"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AppendHistoryData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AppendHistoryData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "defaultCount": obj.get("defaultCount"), + "afterErrorCount": obj.get("afterErrorCount"), + "afterHybridCount": obj.get("afterHybridCount"), + "autoCount": obj.get("autoCount"), + "defaultCooldown": obj.get("defaultCooldown"), + "afterErrorCooldown": obj.get("afterErrorCooldown"), + "afterHybridCooldown": obj.get("afterHybridCooldown"), + "autoCooldown": obj.get("autoCooldown") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/auth_event.py b/src/corbado_python_sdk/generated/models/auth_event.py index 3ffabd3..2763d3f 100644 --- a/src/corbado_python_sdk/generated/models/auth_event.py +++ b/src/corbado_python_sdk/generated/models/auth_event.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/auth_event_create_req.py b/src/corbado_python_sdk/generated/models/auth_event_create_req.py index f282653..827c79c 100644 --- a/src/corbado_python_sdk/generated/models/auth_event_create_req.py +++ b/src/corbado_python_sdk/generated/models/auth_event_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/auth_event_method.py b/src/corbado_python_sdk/generated/models/auth_event_method.py index e44b828..7636621 100644 --- a/src/corbado_python_sdk/generated/models/auth_event_method.py +++ b/src/corbado_python_sdk/generated/models/auth_event_method.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/auth_event_status.py b/src/corbado_python_sdk/generated/models/auth_event_status.py index 20d73a3..2b244e0 100644 --- a/src/corbado_python_sdk/generated/models/auth_event_status.py +++ b/src/corbado_python_sdk/generated/models/auth_event_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/auth_event_type.py b/src/corbado_python_sdk/generated/models/auth_event_type.py index 3da8e58..5179a1b 100644 --- a/src/corbado_python_sdk/generated/models/auth_event_type.py +++ b/src/corbado_python_sdk/generated/models/auth_event_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/challenge.py b/src/corbado_python_sdk/generated/models/challenge.py index 66a7d6c..0854de3 100644 --- a/src/corbado_python_sdk/generated/models/challenge.py +++ b/src/corbado_python_sdk/generated/models/challenge.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/challenge_create_req.py b/src/corbado_python_sdk/generated/models/challenge_create_req.py index 3004b77..3aaad8c 100644 --- a/src/corbado_python_sdk/generated/models/challenge_create_req.py +++ b/src/corbado_python_sdk/generated/models/challenge_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/challenge_status.py b/src/corbado_python_sdk/generated/models/challenge_status.py index 50dc0cf..8566348 100644 --- a/src/corbado_python_sdk/generated/models/challenge_status.py +++ b/src/corbado_python_sdk/generated/models/challenge_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/challenge_type.py b/src/corbado_python_sdk/generated/models/challenge_type.py index 15f0eec..bff696e 100644 --- a/src/corbado_python_sdk/generated/models/challenge_type.py +++ b/src/corbado_python_sdk/generated/models/challenge_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/challenge_update_req.py b/src/corbado_python_sdk/generated/models/challenge_update_req.py index ee437a1..4885720 100644 --- a/src/corbado_python_sdk/generated/models/challenge_update_req.py +++ b/src/corbado_python_sdk/generated/models/challenge_update_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/client_env.py b/src/corbado_python_sdk/generated/models/client_env.py new file mode 100644 index 0000000..13ec7c6 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/client_env.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ClientEnv(BaseModel): + """ + ClientEnv + """ # noqa: E501 + id: StrictStr + handle: StrictStr + browser_name: StrictStr = Field(alias="browserName") + browser_version: StrictStr = Field(alias="browserVersion") + os_name: StrictStr = Field(alias="osName") + os_version: StrictStr = Field(alias="osVersion") + user_agent: StrictStr = Field(alias="userAgent") + js_fingerprint: StrictStr = Field(alias="jsFingerprint") + created_ms: StrictInt = Field(alias="createdMs") + device_id: Optional[StrictStr] = Field(default=None, alias="deviceId") + __properties: ClassVar[List[str]] = ["id", "handle", "browserName", "browserVersion", "osName", "osVersion", "userAgent", "jsFingerprint", "createdMs", "deviceId"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ClientEnv from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ClientEnv from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "handle": obj.get("handle"), + "browserName": obj.get("browserName"), + "browserVersion": obj.get("browserVersion"), + "osName": obj.get("osName"), + "osVersion": obj.get("osVersion"), + "userAgent": obj.get("userAgent"), + "jsFingerprint": obj.get("jsFingerprint"), + "createdMs": obj.get("createdMs"), + "deviceId": obj.get("deviceId") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/long_session_update_req.py b/src/corbado_python_sdk/generated/models/client_env_list.py similarity index 66% rename from src/corbado_python_sdk/generated/models/long_session_update_req.py rename to src/corbado_python_sdk/generated/models/client_env_list.py index 74832bf..ab35b73 100644 --- a/src/corbado_python_sdk/generated/models/long_session_update_req.py +++ b/src/corbado_python_sdk/generated/models/client_env_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,18 +18,18 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.long_session_status import LongSessionStatus +from corbado_python_sdk.generated.models.client_env import ClientEnv from typing import Optional, Set from typing_extensions import Self -class LongSessionUpdateReq(BaseModel): +class ClientEnvList(BaseModel): """ - LongSessionUpdateReq + ClientEnvList """ # noqa: E501 - status: LongSessionStatus - __properties: ClassVar[List[str]] = ["status"] + client_envs: List[ClientEnv] = Field(alias="clientEnvs") + __properties: ClassVar[List[str]] = ["clientEnvs"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LongSessionUpdateReq from a JSON string""" + """Create an instance of ClientEnvList from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -70,11 +70,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in client_envs (list) + _items = [] + if self.client_envs: + for _item_client_envs in self.client_envs: + if _item_client_envs: + _items.append(_item_client_envs.to_dict()) + _dict['clientEnvs'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LongSessionUpdateReq from a dict""" + """Create an instance of ClientEnvList from a dict""" if obj is None: return None @@ -82,7 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status") + "clientEnvs": [ClientEnv.from_dict(_item) for _item in obj["clientEnvs"]] if obj.get("clientEnvs") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/client_information.py b/src/corbado_python_sdk/generated/models/client_information.py index b8d9263..c7c40a7 100644 --- a/src/corbado_python_sdk/generated/models/client_information.py +++ b/src/corbado_python_sdk/generated/models/client_information.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,6 +21,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy +from corbado_python_sdk.generated.models.native_meta import NativeMeta +from corbado_python_sdk.generated.models.parsed_device_info import ParsedDeviceInfo from typing import Optional, Set from typing_extensions import Self @@ -38,7 +40,9 @@ class ClientInformation(BaseModel): user_verifying_platform_authenticator_available: StrictBool = Field(alias="userVerifyingPlatformAuthenticatorAvailable") conditional_mediation_available: StrictBool = Field(alias="conditionalMediationAvailable") private_mode: Optional[StrictBool] = Field(default=None, alias="privateMode") - __properties: ClassVar[List[str]] = ["remoteAddress", "userAgent", "clientEnvHandle", "javascriptFingerprint", "javaScriptHighEntropy", "bluetoothAvailable", "passwordManagerAvailable", "userVerifyingPlatformAuthenticatorAvailable", "conditionalMediationAvailable", "privateMode"] + parsed_device_info: ParsedDeviceInfo = Field(alias="parsedDeviceInfo") + native_meta: Optional[NativeMeta] = Field(default=None, alias="nativeMeta") + __properties: ClassVar[List[str]] = ["remoteAddress", "userAgent", "clientEnvHandle", "javascriptFingerprint", "javaScriptHighEntropy", "bluetoothAvailable", "passwordManagerAvailable", "userVerifyingPlatformAuthenticatorAvailable", "conditionalMediationAvailable", "privateMode", "parsedDeviceInfo", "nativeMeta"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +86,12 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of java_script_high_entropy if self.java_script_high_entropy: _dict['javaScriptHighEntropy'] = self.java_script_high_entropy.to_dict() + # override the default output from pydantic by calling `to_dict()` of parsed_device_info + if self.parsed_device_info: + _dict['parsedDeviceInfo'] = self.parsed_device_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of native_meta + if self.native_meta: + _dict['nativeMeta'] = self.native_meta.to_dict() return _dict @classmethod @@ -103,7 +113,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "passwordManagerAvailable": obj.get("passwordManagerAvailable"), "userVerifyingPlatformAuthenticatorAvailable": obj.get("userVerifyingPlatformAuthenticatorAvailable"), "conditionalMediationAvailable": obj.get("conditionalMediationAvailable"), - "privateMode": obj.get("privateMode") + "privateMode": obj.get("privateMode"), + "parsedDeviceInfo": ParsedDeviceInfo.from_dict(obj["parsedDeviceInfo"]) if obj.get("parsedDeviceInfo") is not None else None, + "nativeMeta": NativeMeta.from_dict(obj["nativeMeta"]) if obj.get("nativeMeta") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/connect_token.py b/src/corbado_python_sdk/generated/models/connect_token.py index 000a9b2..02d7455 100644 --- a/src/corbado_python_sdk/generated/models/connect_token.py +++ b/src/corbado_python_sdk/generated/models/connect_token.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -30,12 +30,12 @@ class ConnectToken(BaseModel): """ ConnectToken """ # noqa: E501 - id: StrictStr + id: StrictStr = Field(description="Unique identifier of the connectToken.") token_type: ConnectTokenType = Field(alias="tokenType") data: ConnectTokenData connect_token_status: ConnectTokenStatus = Field(alias="connectTokenStatus") - secret: Optional[StrictStr] = None - expires: StrictInt + secret: Optional[StrictStr] = Field(default=None, description="Secret of the connectToken.") + expires: StrictInt = Field(description="Unix time of when the connectToken expires (in seconds elapsed since January 1, 1970, 00:00:00 UTC).") __properties: ClassVar[List[str]] = ["id", "tokenType", "data", "connectTokenStatus", "secret", "expires"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_create_req.py b/src/corbado_python_sdk/generated/models/connect_token_create_req.py index a77b2d6..b698184 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_create_req.py +++ b/src/corbado_python_sdk/generated/models/connect_token_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -31,7 +31,7 @@ class ConnectTokenCreateReq(BaseModel): """ # noqa: E501 type: ConnectTokenType data: ConnectTokenData - max_lifetime_in_seconds: Optional[StrictInt] = Field(default=None, alias="maxLifetimeInSeconds") + max_lifetime_in_seconds: Optional[StrictInt] = Field(default=None, description="Maximum lifetime of the connectToken in seconds.", alias="maxLifetimeInSeconds") __properties: ClassVar[List[str]] = ["type", "data", "maxLifetimeInSeconds"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_data.py b/src/corbado_python_sdk/generated/models/connect_token_data.py index 6b0d6d0..1e620e6 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_data.py +++ b/src/corbado_python_sdk/generated/models/connect_token_data.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_append.py b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_append.py index d37d2e7..164e614 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_append.py +++ b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_append.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -25,10 +25,10 @@ class ConnectTokenDataPasskeyAppend(BaseModel): """ - ConnectTokenDataPasskeyAppend + Data for `passkey-append`. """ # noqa: E501 - display_name: StrictStr = Field(alias="displayName") - identifier: StrictStr + display_name: StrictStr = Field(description="Display name of the user.", alias="displayName") + identifier: StrictStr = Field(description="Login identifier of the user (here email address).") __properties: ClassVar[List[str]] = ["displayName", "identifier"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_delete.py b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_delete.py index 322f672..cfbf010 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_delete.py +++ b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_delete.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,16 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self class ConnectTokenDataPasskeyDelete(BaseModel): """ - ConnectTokenDataPasskeyDelete + Data for `passkey-delete`. """ # noqa: E501 - identifier: StrictStr + identifier: StrictStr = Field(description="Login identifier of the user (here email address).") __properties: ClassVar[List[str]] = ["identifier"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_list.py b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_list.py index 7fd3432..fb43390 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_list.py +++ b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,16 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self class ConnectTokenDataPasskeyList(BaseModel): """ - ConnectTokenDataPasskeyList + Data for `passkey-list`. """ # noqa: E501 - identifier: StrictStr + identifier: StrictStr = Field(description="Login identifier of the user (here email address).") __properties: ClassVar[List[str]] = ["identifier"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_login.py b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_login.py index f55b4e1..a81e85c 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_data_passkey_login.py +++ b/src/corbado_python_sdk/generated/models/connect_token_data_passkey_login.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,16 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self class ConnectTokenDataPasskeyLogin(BaseModel): """ - ConnectTokenDataPasskeyLogin + Data for `passkey-login`. """ # noqa: E501 - identifier: StrictStr + identifier: StrictStr = Field(description="Login identifier of the user (here email address).") __properties: ClassVar[List[str]] = ["identifier"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/connect_token_list.py b/src/corbado_python_sdk/generated/models/connect_token_list.py index 7aa497c..c754271 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_list.py +++ b/src/corbado_python_sdk/generated/models/connect_token_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.connect_token import ConnectToken -from corbado_python_sdk.generated.models.paging import Paging +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class ConnectTokenList(BaseModel): ConnectTokenList """ # noqa: E501 connect_tokens: List[ConnectToken] = Field(alias="connectTokens") - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["connectTokens", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "connectTokens": [ConnectToken.from_dict(_item) for _item in obj["connectTokens"]] if obj.get("connectTokens") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/connect_token_status.py b/src/corbado_python_sdk/generated/models/connect_token_status.py index ea069d3..6e7efbd 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_status.py +++ b/src/corbado_python_sdk/generated/models/connect_token_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/connect_token_type.py b/src/corbado_python_sdk/generated/models/connect_token_type.py index 13d0517..1c656ef 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_type.py +++ b/src/corbado_python_sdk/generated/models/connect_token_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/connect_token_update_req.py b/src/corbado_python_sdk/generated/models/connect_token_update_req.py index 5c0608c..c32568b 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_update_req.py +++ b/src/corbado_python_sdk/generated/models/connect_token_update_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/credential.py b/src/corbado_python_sdk/generated/models/credential.py index 8f8c066..652abdb 100644 --- a/src/corbado_python_sdk/generated/models/credential.py +++ b/src/corbado_python_sdk/generated/models/credential.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -43,7 +43,8 @@ class Credential(BaseModel): created_ms: StrictInt = Field(alias="createdMs") status: StrictStr = Field(description="Status") aaguid_details: AaguidDetails = Field(alias="aaguidDetails") - __properties: ClassVar[List[str]] = ["id", "credentialID", "attestationType", "transport", "backupEligible", "backupState", "authenticatorAAGUID", "sourceOS", "sourceBrowser", "lastUsed", "lastUsedMs", "created", "createdMs", "status", "aaguidDetails"] + tags: List[StrictStr] + __properties: ClassVar[List[str]] = ["id", "credentialID", "attestationType", "transport", "backupEligible", "backupState", "authenticatorAAGUID", "sourceOS", "sourceBrowser", "lastUsed", "lastUsedMs", "created", "createdMs", "status", "aaguidDetails", "tags"] @field_validator('transport') def transport_validate_enum(cls, value): @@ -128,7 +129,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created": obj.get("created"), "createdMs": obj.get("createdMs"), "status": obj.get("status"), - "aaguidDetails": AaguidDetails.from_dict(obj["aaguidDetails"]) if obj.get("aaguidDetails") is not None else None + "aaguidDetails": AaguidDetails.from_dict(obj["aaguidDetails"]) if obj.get("aaguidDetails") is not None else None, + "tags": obj.get("tags") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/credential_list.py b/src/corbado_python_sdk/generated/models/credential_list.py index a3e25e1..a8c53c4 100644 --- a/src/corbado_python_sdk/generated/models/credential_list.py +++ b/src/corbado_python_sdk/generated/models/credential_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.credential import Credential -from corbado_python_sdk.generated.models.paging import Paging +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class CredentialList(BaseModel): CredentialList """ # noqa: E501 credentials: List[Credential] - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["credentials", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/cross_device_authentication_strategy.py b/src/corbado_python_sdk/generated/models/cross_device_authentication_strategy.py index c7581c9..1df0fa7 100644 --- a/src/corbado_python_sdk/generated/models/cross_device_authentication_strategy.py +++ b/src/corbado_python_sdk/generated/models/cross_device_authentication_strategy.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/decision_insights.py b/src/corbado_python_sdk/generated/models/decision_insights.py index 244a9fe..74df490 100644 --- a/src/corbado_python_sdk/generated/models/decision_insights.py +++ b/src/corbado_python_sdk/generated/models/decision_insights.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from corbado_python_sdk.generated.models.decision_tag import DecisionTag from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,8 @@ class DecisionInsights(BaseModel): tag: DecisionTag is_cda_candidate: StrictBool = Field(alias="isCDACandidate") experiments: List[StrictStr] - __properties: ClassVar[List[str]] = ["tag", "isCDACandidate", "experiments"] + prefer_immediately_available: Optional[StrictBool] = Field(default=None, alias="preferImmediatelyAvailable") + __properties: ClassVar[List[str]] = ["tag", "isCDACandidate", "experiments", "preferImmediatelyAvailable"] model_config = ConfigDict( populate_by_name=True, @@ -86,7 +87,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tag": obj.get("tag"), "isCDACandidate": obj.get("isCDACandidate"), - "experiments": obj.get("experiments") + "experiments": obj.get("experiments"), + "preferImmediatelyAvailable": obj.get("preferImmediatelyAvailable") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/long_session.py b/src/corbado_python_sdk/generated/models/decision_insights_append.py similarity index 60% rename from src/corbado_python_sdk/generated/models/long_session.py rename to src/corbado_python_sdk/generated/models/decision_insights_append.py index 01c85db..d0d5c0c 100644 --- a/src/corbado_python_sdk/generated/models/long_session.py +++ b/src/corbado_python_sdk/generated/models/decision_insights_append.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,23 +18,28 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.long_session_status import LongSessionStatus +from corbado_python_sdk.generated.models.decision_tag import DecisionTag from typing import Optional, Set from typing_extensions import Self -class LongSession(BaseModel): +class DecisionInsightsAppend(BaseModel): """ - LongSession + DecisionInsightsAppend """ # noqa: E501 - long_session_id: StrictStr = Field(alias="longSessionID") - user_id: StrictStr = Field(alias="userID") - identifier_value: StrictStr = Field(alias="identifierValue") - status: LongSessionStatus - expires: StrictStr - expires_ms: StrictInt = Field(alias="expiresMs") - __properties: ClassVar[List[str]] = ["longSessionID", "userID", "identifierValue", "status", "expires", "expiresMs"] + tag: DecisionTag + is_restricted_browser: StrictBool = Field(alias="isRestrictedBrowser") + variant: StrictStr + auto: StrictBool + __properties: ClassVar[List[str]] = ["tag", "isRestrictedBrowser", "variant", "auto"] + + @field_validator('variant') + def variant_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['default', 'after-error', 'after-hybrid', 'passkey-list', 'after-no-credential']): + raise ValueError("must be one of enum values ('default', 'after-error', 'after-hybrid', 'passkey-list', 'after-no-credential')") + return value model_config = ConfigDict( populate_by_name=True, @@ -54,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LongSession from a JSON string""" + """Create an instance of DecisionInsightsAppend from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -79,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LongSession from a dict""" + """Create an instance of DecisionInsightsAppend from a dict""" if obj is None: return None @@ -87,12 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "longSessionID": obj.get("longSessionID"), - "userID": obj.get("userID"), - "identifierValue": obj.get("identifierValue"), - "status": obj.get("status"), - "expires": obj.get("expires"), - "expiresMs": obj.get("expiresMs") + "tag": obj.get("tag"), + "isRestrictedBrowser": obj.get("isRestrictedBrowser"), + "variant": obj.get("variant"), + "auto": obj.get("auto") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/decision_tag.py b/src/corbado_python_sdk/generated/models/decision_tag.py index cc9af36..cf9bb35 100644 --- a/src/corbado_python_sdk/generated/models/decision_tag.py +++ b/src/corbado_python_sdk/generated/models/decision_tag.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -27,6 +27,7 @@ class DecisionTag(str, Enum): """ allowed enum values """ + ENV_MINUS_NO_MINUS_PLATFORM_MINUS_PK_MINUS_SUPPORT = 'env-no-platform-pk-support' ENV_MINUS_NO_MINUS_PK_MINUS_SUPPORT = 'env-no-pk-support' USER_MINUS_NO_MINUS_PKS = 'user-no-pks' USER_MINUS_LOGIN_MINUS_BLACKLISTED = 'user-login-blacklisted' @@ -46,6 +47,8 @@ class DecisionTag(str, Enum): PROCESS_MINUS_PK_MINUS_LOGIN_MINUS_INCOMPLETE = 'process-pk-login-incomplete' PROCESS_MINUS_PK_MINUS_LOGIN_MINUS_CROSS_MINUS_PLATFORM_MINUS_COMPLETED = 'process-pk-login-cross-platform-completed' DEVICE_MINUS_LOCAL_MINUS_PLATFORM_MINUS_PASSKEY_MINUS_EXPERIMENT = 'device-local-platform-passkey-experiment' + ENV_MINUS_BROKEN = 'env-broken' + PROCESS_MINUS_PK_MINUS_LOGIN_MINUS_ABORTED = 'process-pk-login-aborted' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/corbado_python_sdk/generated/models/detection_insights.py b/src/corbado_python_sdk/generated/models/detection_insights.py index a380e36..bb596cd 100644 --- a/src/corbado_python_sdk/generated/models/detection_insights.py +++ b/src/corbado_python_sdk/generated/models/detection_insights.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.append_history_data import AppendHistoryData from corbado_python_sdk.generated.models.detection_tag import DetectionTag from typing import Optional, Set from typing_extensions import Self @@ -32,7 +33,8 @@ class DetectionInsights(BaseModel): credential_ids: List[StrictStr] = Field(alias="credentialIds") client_env_ids: List[StrictStr] = Field(alias="clientEnvIds") password_manager_ids: List[StrictStr] = Field(alias="passwordManagerIds") - __properties: ClassVar[List[str]] = ["tags", "credentialIds", "clientEnvIds", "passwordManagerIds"] + history_data: AppendHistoryData = Field(alias="historyData") + __properties: ClassVar[List[str]] = ["tags", "credentialIds", "clientEnvIds", "passwordManagerIds", "historyData"] model_config = ConfigDict( populate_by_name=True, @@ -80,6 +82,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_tags: _items.append(_item_tags.to_dict()) _dict['tags'] = _items + # override the default output from pydantic by calling `to_dict()` of history_data + if self.history_data: + _dict['historyData'] = self.history_data.to_dict() return _dict @classmethod @@ -95,7 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": [DetectionTag.from_dict(_item) for _item in obj["tags"]] if obj.get("tags") is not None else None, "credentialIds": obj.get("credentialIds"), "clientEnvIds": obj.get("clientEnvIds"), - "passwordManagerIds": obj.get("passwordManagerIds") + "passwordManagerIds": obj.get("passwordManagerIds"), + "historyData": AppendHistoryData.from_dict(obj["historyData"]) if obj.get("historyData") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/detection_tag.py b/src/corbado_python_sdk/generated/models/detection_tag.py index 634c4d3..d792b67 100644 --- a/src/corbado_python_sdk/generated/models/detection_tag.py +++ b/src/corbado_python_sdk/generated/models/detection_tag.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/identifier.py b/src/corbado_python_sdk/generated/models/identifier.py index 85e1ebd..5803717 100644 --- a/src/corbado_python_sdk/generated/models/identifier.py +++ b/src/corbado_python_sdk/generated/models/identifier.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -29,11 +29,11 @@ class Identifier(BaseModel): """ Identifier """ # noqa: E501 - identifier_id: StrictStr = Field(alias="identifierID") + identifier_id: StrictStr = Field(description="Unique identifier of the login identifier.", alias="identifierID") type: IdentifierType - value: StrictStr + value: StrictStr = Field(description="Value of the identifier (here email address).") status: IdentifierStatus - user_id: StrictStr = Field(alias="userID") + user_id: StrictStr = Field(description="Unique identifier of the user.", alias="userID") __properties: ClassVar[List[str]] = ["identifierID", "type", "value", "status", "userID"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/identifier_create_req.py b/src/corbado_python_sdk/generated/models/identifier_create_req.py index d5516b3..e1280f7 100644 --- a/src/corbado_python_sdk/generated/models/identifier_create_req.py +++ b/src/corbado_python_sdk/generated/models/identifier_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/identifier_list.py b/src/corbado_python_sdk/generated/models/identifier_list.py index 165f5e2..5336418 100644 --- a/src/corbado_python_sdk/generated/models/identifier_list.py +++ b/src/corbado_python_sdk/generated/models/identifier_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.identifier import Identifier -from corbado_python_sdk.generated.models.paging import Paging +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class IdentifierList(BaseModel): IdentifierList """ # noqa: E501 identifiers: List[Identifier] - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["identifiers", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "identifiers": [Identifier.from_dict(_item) for _item in obj["identifiers"]] if obj.get("identifiers") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/identifier_status.py b/src/corbado_python_sdk/generated/models/identifier_status.py index fb2028e..824d4a7 100644 --- a/src/corbado_python_sdk/generated/models/identifier_status.py +++ b/src/corbado_python_sdk/generated/models/identifier_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/identifier_type.py b/src/corbado_python_sdk/generated/models/identifier_type.py index 0c0d0a5..236a55e 100644 --- a/src/corbado_python_sdk/generated/models/identifier_type.py +++ b/src/corbado_python_sdk/generated/models/identifier_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/identifier_update_req.py b/src/corbado_python_sdk/generated/models/identifier_update_req.py index 5679175..bb74c98 100644 --- a/src/corbado_python_sdk/generated/models/identifier_update_req.py +++ b/src/corbado_python_sdk/generated/models/identifier_update_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/java_script_high_entropy.py b/src/corbado_python_sdk/generated/models/java_script_high_entropy.py index c835e50..fcb9223 100644 --- a/src/corbado_python_sdk/generated/models/java_script_high_entropy.py +++ b/src/corbado_python_sdk/generated/models/java_script_high_entropy.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/long_session_status.py b/src/corbado_python_sdk/generated/models/long_session_status.py deleted file mode 100644 index a39f5f1..0000000 --- a/src/corbado_python_sdk/generated/models/long_session_status.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - Corbado Backend API - - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. - - The version of the OpenAPI document: 2.0.0 - Contact: support@corbado.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class LongSessionStatus(str, Enum): - """ - LongSessionStatus - """ - - """ - allowed enum values - """ - ACTIVE = 'active' - LOGGED_OUT = 'logged_out' - EXPIRED = 'expired' - INACTIVITY_REACHED = 'inactivity_reached' - REVOKED = 'revoked' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of LongSessionStatus from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/src/corbado_python_sdk/generated/models/native_meta.py b/src/corbado_python_sdk/generated/models/native_meta.py new file mode 100644 index 0000000..9d208ba --- /dev/null +++ b/src/corbado_python_sdk/generated/models/native_meta.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class NativeMeta(BaseModel): + """ + NativeMeta + """ # noqa: E501 + build: StrictStr + device_owner_auth: Optional[StrictStr] = Field(default=None, alias="deviceOwnerAuth") + is_platform_authenticator_api_supported: Optional[StrictBool] = Field(default=None, alias="isPlatformAuthenticatorAPISupported") + is_bluetooth_available: Optional[StrictBool] = Field(default=None, alias="isBluetoothAvailable") + is_bluetooth_on: Optional[StrictBool] = Field(default=None, alias="isBluetoothOn") + google_play_services: Optional[StrictBool] = Field(default=None, alias="googlePlayServices") + device_secure: Optional[StrictBool] = Field(default=None, alias="deviceSecure") + __properties: ClassVar[List[str]] = ["build", "deviceOwnerAuth", "isPlatformAuthenticatorAPISupported", "isBluetoothAvailable", "isBluetoothOn", "googlePlayServices", "deviceSecure"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NativeMeta from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NativeMeta from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "build": obj.get("build"), + "deviceOwnerAuth": obj.get("deviceOwnerAuth"), + "isPlatformAuthenticatorAPISupported": obj.get("isPlatformAuthenticatorAPISupported"), + "isBluetoothAvailable": obj.get("isBluetoothAvailable"), + "isBluetoothOn": obj.get("isBluetoothOn"), + "googlePlayServices": obj.get("googlePlayServices"), + "deviceSecure": obj.get("deviceSecure") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/long_session_create_req.py b/src/corbado_python_sdk/generated/models/parsed_device_info.py similarity index 71% rename from src/corbado_python_sdk/generated/models/long_session_create_req.py rename to src/corbado_python_sdk/generated/models/parsed_device_info.py index d67482c..04ec335 100644 --- a/src/corbado_python_sdk/generated/models/long_session_create_req.py +++ b/src/corbado_python_sdk/generated/models/parsed_device_info.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,17 +20,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.app_type import AppType from typing import Optional, Set from typing_extensions import Self -class LongSessionCreateReq(BaseModel): +class ParsedDeviceInfo(BaseModel): """ - LongSessionCreateReq + ParsedDeviceInfo """ # noqa: E501 - app_type: AppType = Field(alias="appType") - identifier_value: StrictStr = Field(alias="identifierValue") - __properties: ClassVar[List[str]] = ["appType", "identifierValue"] + browser_name: StrictStr = Field(alias="browserName") + browser_version: StrictStr = Field(alias="browserVersion") + os_name: StrictStr = Field(alias="osName") + os_version: StrictStr = Field(alias="osVersion") + __properties: ClassVar[List[str]] = ["browserName", "browserVersion", "osName", "osVersion"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LongSessionCreateReq from a JSON string""" + """Create an instance of ParsedDeviceInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LongSessionCreateReq from a dict""" + """Create an instance of ParsedDeviceInfo from a dict""" if obj is None: return None @@ -83,8 +84,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "appType": obj.get("appType"), - "identifierValue": obj.get("identifierValue") + "browserName": obj.get("browserName"), + "browserVersion": obj.get("browserVersion"), + "osName": obj.get("osName"), + "osVersion": obj.get("osVersion") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_append_finish_req.py b/src/corbado_python_sdk/generated/models/passkey_append_finish_req.py index ca54f55..5b9b6d1 100644 --- a/src/corbado_python_sdk/generated/models/passkey_append_finish_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_append_finish_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -33,7 +33,8 @@ class PasskeyAppendFinishReq(BaseModel): attestation_response: StrictStr = Field(alias="attestationResponse") client_information: ClientInformation = Field(alias="clientInformation") send_notification: Optional[StrictBool] = Field(default=None, alias="sendNotification") - __properties: ClassVar[List[str]] = ["userID", "processID", "attestationResponse", "clientInformation", "sendNotification"] + tracking_id: StrictStr = Field(alias="trackingID") + __properties: ClassVar[List[str]] = ["userID", "processID", "attestationResponse", "clientInformation", "sendNotification", "trackingID"] model_config = ConfigDict( populate_by_name=True, @@ -93,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "processID": obj.get("processID"), "attestationResponse": obj.get("attestationResponse"), "clientInformation": ClientInformation.from_dict(obj["clientInformation"]) if obj.get("clientInformation") is not None else None, - "sendNotification": obj.get("sendNotification") + "sendNotification": obj.get("sendNotification"), + "trackingID": obj.get("trackingID") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_append_finish_rsp.py b/src/corbado_python_sdk/generated/models/passkey_append_finish_rsp.py index 14408ce..f283156 100644 --- a/src/corbado_python_sdk/generated/models/passkey_append_finish_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_append_finish_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_append_start_req.py b/src/corbado_python_sdk/generated/models/passkey_append_start_req.py index 5a67195..bcd9f08 100644 --- a/src/corbado_python_sdk/generated/models/passkey_append_start_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_append_start_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_append_start_rsp.py b/src/corbado_python_sdk/generated/models/passkey_append_start_rsp.py index 413f134..81c4f7e 100644 --- a/src/corbado_python_sdk/generated/models/passkey_append_start_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_append_start_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.decision_insights import DecisionInsights +from corbado_python_sdk.generated.models.decision_insights_append import DecisionInsightsAppend from corbado_python_sdk.generated.models.detection_insights import DetectionInsights from typing import Optional, Set from typing_extensions import Self @@ -32,7 +32,7 @@ class PasskeyAppendStartRsp(BaseModel): append_allow: StrictBool = Field(alias="appendAllow") attestation_options: StrictStr = Field(alias="attestationOptions") detection_insights: DetectionInsights = Field(alias="detectionInsights") - decision_insights: DecisionInsights = Field(alias="decisionInsights") + decision_insights: DecisionInsightsAppend = Field(alias="decisionInsights") __properties: ClassVar[List[str]] = ["appendAllow", "attestationOptions", "detectionInsights", "decisionInsights"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "appendAllow": obj.get("appendAllow"), "attestationOptions": obj.get("attestationOptions"), "detectionInsights": DetectionInsights.from_dict(obj["detectionInsights"]) if obj.get("detectionInsights") is not None else None, - "decisionInsights": DecisionInsights.from_dict(obj["decisionInsights"]) if obj.get("decisionInsights") is not None else None + "decisionInsights": DecisionInsightsAppend.from_dict(obj["decisionInsights"]) if obj.get("decisionInsights") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge.py b/src/corbado_python_sdk/generated/models/passkey_challenge.py index e5077a9..a1c6508 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge_list.py b/src/corbado_python_sdk/generated/models/passkey_challenge_list.py index 0ae5825..bc65f85 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge_list.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.passkey_challenge import PasskeyChallenge +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class PasskeyChallengeList(BaseModel): PasskeyChallengeList """ # noqa: E501 passkey_challenges: List[PasskeyChallenge] = Field(alias="passkeyChallenges") - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["passkeyChallenges", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "passkeyChallenges": [PasskeyChallenge.from_dict(_item) for _item in obj["passkeyChallenges"]] if obj.get("passkeyChallenges") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge_status.py b/src/corbado_python_sdk/generated/models/passkey_challenge_status.py index 17fd62c..7c6817b 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge_status.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge_type.py b/src/corbado_python_sdk/generated/models/passkey_challenge_type.py index 7ee7152..8b674f0 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge_type.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge_update_req.py b/src/corbado_python_sdk/generated/models/passkey_challenge_update_req.py index 088c76d..89c6cc9 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge_update_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge_update_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_data.py b/src/corbado_python_sdk/generated/models/passkey_data.py index 31039ba..b003c6b 100644 --- a/src/corbado_python_sdk/generated/models/passkey_data.py +++ b/src/corbado_python_sdk/generated/models/passkey_data.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_event.py b/src/corbado_python_sdk/generated/models/passkey_event.py index 2134936..87674b8 100644 --- a/src/corbado_python_sdk/generated/models/passkey_event.py +++ b/src/corbado_python_sdk/generated/models/passkey_event.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_event_create_req.py b/src/corbado_python_sdk/generated/models/passkey_event_create_req.py index 71a6c56..e0dc6e5 100644 --- a/src/corbado_python_sdk/generated/models/passkey_event_create_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_event_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_event_list.py b/src/corbado_python_sdk/generated/models/passkey_event_list.py index 7cacdfb..94e9d55 100644 --- a/src/corbado_python_sdk/generated/models/passkey_event_list.py +++ b/src/corbado_python_sdk/generated/models/passkey_event_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class PasskeyEventList(BaseModel): PasskeyEventList """ # noqa: E501 passkey_events: List[PasskeyEvent] = Field(alias="passkeyEvents") - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["passkeyEvents", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "passkeyEvents": [PasskeyEvent.from_dict(_item) for _item in obj["passkeyEvents"]] if obj.get("passkeyEvents") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_event_type.py b/src/corbado_python_sdk/generated/models/passkey_event_type.py index f573e1a..8107f1c 100644 --- a/src/corbado_python_sdk/generated/models/passkey_event_type.py +++ b/src/corbado_python_sdk/generated/models/passkey_event_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -37,6 +37,7 @@ class PasskeyEventType(str, Enum): APPEND_MINUS_CREDENTIAL_MINUS_EXISTS = 'append-credential-exists' APPEND_MINUS_EXPLICIT_MINUS_ABORT = 'append-explicit-abort' APPEND_MINUS_ERROR = 'append-error' + LOGIN_MINUS_NO_MINUS_CREDENTIALS = 'login-no-credentials' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/corbado_python_sdk/generated/models/passkey_intel_flags.py b/src/corbado_python_sdk/generated/models/passkey_intel_flags.py index d5219c3..2a51601 100644 --- a/src/corbado_python_sdk/generated/models/passkey_intel_flags.py +++ b/src/corbado_python_sdk/generated/models/passkey_intel_flags.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,8 @@ class PasskeyIntelFlags(BaseModel): PasskeyIntelFlags """ # noqa: E501 force_passkey_append: StrictBool = Field(alias="forcePasskeyAppend") - __properties: ClassVar[List[str]] = ["forcePasskeyAppend"] + ask_for_auto_append: Optional[StrictBool] = Field(default=None, alias="askForAutoAppend") + __properties: ClassVar[List[str]] = ["forcePasskeyAppend", "askForAutoAppend"] model_config = ConfigDict( populate_by_name=True, @@ -81,7 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "forcePasskeyAppend": obj.get("forcePasskeyAppend") + "forcePasskeyAppend": obj.get("forcePasskeyAppend"), + "askForAutoAppend": obj.get("askForAutoAppend") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_login_finish_req.py b/src/corbado_python_sdk/generated/models/passkey_login_finish_req.py index 590e621..90ddf02 100644 --- a/src/corbado_python_sdk/generated/models/passkey_login_finish_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_login_finish_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -33,7 +33,8 @@ class PasskeyLoginFinishReq(BaseModel): client_information: ClientInformation = Field(alias="clientInformation") process_id: StrictStr = Field(alias="processID") sign_passkey_data: Optional[StrictBool] = Field(default=None, alias="signPasskeyData") - __properties: ClassVar[List[str]] = ["userID", "assertionResponse", "clientInformation", "processID", "signPasskeyData"] + tracking_id: StrictStr = Field(alias="trackingID") + __properties: ClassVar[List[str]] = ["userID", "assertionResponse", "clientInformation", "processID", "signPasskeyData", "trackingID"] model_config = ConfigDict( populate_by_name=True, @@ -93,7 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "assertionResponse": obj.get("assertionResponse"), "clientInformation": ClientInformation.from_dict(obj["clientInformation"]) if obj.get("clientInformation") is not None else None, "processID": obj.get("processID"), - "signPasskeyData": obj.get("signPasskeyData") + "signPasskeyData": obj.get("signPasskeyData"), + "trackingID": obj.get("trackingID") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_login_finish_rsp.py b/src/corbado_python_sdk/generated/models/passkey_login_finish_rsp.py index fd8f499..ccbd34a 100644 --- a/src/corbado_python_sdk/generated/models/passkey_login_finish_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_login_finish_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_login_start_req.py b/src/corbado_python_sdk/generated/models/passkey_login_start_req.py index 4eb3c4b..8298971 100644 --- a/src/corbado_python_sdk/generated/models/passkey_login_start_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_login_start_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_login_start_rsp.py b/src/corbado_python_sdk/generated/models/passkey_login_start_rsp.py index 2108966..3855c1d 100644 --- a/src/corbado_python_sdk/generated/models/passkey_login_start_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_login_start_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_alternative_project.py b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_alternative_project.py new file mode 100644 index 0000000..1cf5098 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_alternative_project.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PasskeyMediationFinishErrorAlternativeProject(BaseModel): + """ + PasskeyMediationFinishErrorAlternativeProject + """ # noqa: E501 + type: StrictStr + alternative_project_name: StrictStr = Field(alias="alternativeProjectName") + __properties: ClassVar[List[str]] = ["type", "alternativeProjectName"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['alternativeProjectID']): + raise ValueError("must be one of enum values ('alternativeProjectID')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PasskeyMediationFinishErrorAlternativeProject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PasskeyMediationFinishErrorAlternativeProject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "alternativeProjectName": obj.get("alternativeProjectName") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/short_session.py b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_credential_deleted.py similarity index 69% rename from src/corbado_python_sdk/generated/models/short_session.py rename to src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_credential_deleted.py index de958eb..a0ad200 100644 --- a/src/corbado_python_sdk/generated/models/short_session.py +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_error_credential_deleted.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,17 +18,24 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self -class ShortSession(BaseModel): +class PasskeyMediationFinishErrorCredentialDeleted(BaseModel): """ - ShortSession + PasskeyMediationFinishErrorCredentialDeleted """ # noqa: E501 - value: StrictStr - __properties: ClassVar[List[str]] = ["value"] + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['credentialDeleted']): + raise ValueError("must be one of enum values ('credentialDeleted')") + return value model_config = ConfigDict( populate_by_name=True, @@ -48,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShortSession from a JSON string""" + """Create an instance of PasskeyMediationFinishErrorCredentialDeleted from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShortSession from a dict""" + """Create an instance of PasskeyMediationFinishErrorCredentialDeleted from a dict""" if obj is None: return None @@ -81,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "value": obj.get("value") + "type": obj.get("type") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_req.py b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_req.py index bb97ad3..560a874 100644 --- a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -32,7 +32,8 @@ class PasskeyMediationFinishReq(BaseModel): client_information: ClientInformation = Field(alias="clientInformation") process_id: StrictStr = Field(alias="processID") sign_passkey_data: Optional[StrictBool] = Field(default=None, alias="signPasskeyData") - __properties: ClassVar[List[str]] = ["assertionResponse", "clientInformation", "processID", "signPasskeyData"] + tracking_id: StrictStr = Field(alias="trackingID") + __properties: ClassVar[List[str]] = ["assertionResponse", "clientInformation", "processID", "signPasskeyData", "trackingID"] model_config = ConfigDict( populate_by_name=True, @@ -91,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "assertionResponse": obj.get("assertionResponse"), "clientInformation": ClientInformation.from_dict(obj["clientInformation"]) if obj.get("clientInformation") is not None else None, "processID": obj.get("processID"), - "signPasskeyData": obj.get("signPasskeyData") + "signPasskeyData": obj.get("signPasskeyData"), + "trackingID": obj.get("trackingID") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp.py b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp.py index 2894c03..541e588 100644 --- a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from corbado_python_sdk.generated.models.passkey_data import PasskeyData +from corbado_python_sdk.generated.models.passkey_mediation_finish_rsp_error import PasskeyMediationFinishRspError from typing import Optional, Set from typing_extensions import Self @@ -30,7 +31,8 @@ class PasskeyMediationFinishRsp(BaseModel): """ # noqa: E501 passkey_data: PasskeyData = Field(alias="passkeyData") signed_passkey_data: Optional[StrictStr] = Field(default=None, alias="signedPasskeyData") - __properties: ClassVar[List[str]] = ["passkeyData", "signedPasskeyData"] + error: Optional[PasskeyMediationFinishRspError] = None + __properties: ClassVar[List[str]] = ["passkeyData", "signedPasskeyData", "error"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +76,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of passkey_data if self.passkey_data: _dict['passkeyData'] = self.passkey_data.to_dict() + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() return _dict @classmethod @@ -87,7 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "passkeyData": PasskeyData.from_dict(obj["passkeyData"]) if obj.get("passkeyData") is not None else None, - "signedPasskeyData": obj.get("signedPasskeyData") + "signedPasskeyData": obj.get("signedPasskeyData"), + "error": PasskeyMediationFinishRspError.from_dict(obj["error"]) if obj.get("error") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp_error.py b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp_error.py new file mode 100644 index 0000000..2837462 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_finish_rsp_error.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_alternative_project import PasskeyMediationFinishErrorAlternativeProject +from corbado_python_sdk.generated.models.passkey_mediation_finish_error_credential_deleted import PasskeyMediationFinishErrorCredentialDeleted +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +PASSKEYMEDIATIONFINISHRSPERROR_ONE_OF_SCHEMAS = ["PasskeyMediationFinishErrorAlternativeProject", "PasskeyMediationFinishErrorCredentialDeleted"] + +class PasskeyMediationFinishRspError(BaseModel): + """ + PasskeyMediationFinishRspError + """ + # data type: PasskeyMediationFinishErrorCredentialDeleted + oneof_schema_1_validator: Optional[PasskeyMediationFinishErrorCredentialDeleted] = None + # data type: PasskeyMediationFinishErrorAlternativeProject + oneof_schema_2_validator: Optional[PasskeyMediationFinishErrorAlternativeProject] = None + actual_instance: Optional[Union[PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted]] = None + one_of_schemas: Set[str] = { "PasskeyMediationFinishErrorAlternativeProject", "PasskeyMediationFinishErrorCredentialDeleted" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = PasskeyMediationFinishRspError.model_construct() + error_messages = [] + match = 0 + # validate data type: PasskeyMediationFinishErrorCredentialDeleted + if not isinstance(v, PasskeyMediationFinishErrorCredentialDeleted): + error_messages.append(f"Error! Input type `{type(v)}` is not `PasskeyMediationFinishErrorCredentialDeleted`") + else: + match += 1 + # validate data type: PasskeyMediationFinishErrorAlternativeProject + if not isinstance(v, PasskeyMediationFinishErrorAlternativeProject): + error_messages.append(f"Error! Input type `{type(v)}` is not `PasskeyMediationFinishErrorAlternativeProject`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in PasskeyMediationFinishRspError with oneOf schemas: PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in PasskeyMediationFinishRspError with oneOf schemas: PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into PasskeyMediationFinishErrorCredentialDeleted + try: + instance.actual_instance = PasskeyMediationFinishErrorCredentialDeleted.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into PasskeyMediationFinishErrorAlternativeProject + try: + instance.actual_instance = PasskeyMediationFinishErrorAlternativeProject.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into PasskeyMediationFinishRspError with oneOf schemas: PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into PasskeyMediationFinishRspError with oneOf schemas: PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], PasskeyMediationFinishErrorAlternativeProject, PasskeyMediationFinishErrorCredentialDeleted]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_start_req.py b/src/corbado_python_sdk/generated/models/passkey_mediation_start_req.py index 46d6699..3175119 100644 --- a/src/corbado_python_sdk/generated/models/passkey_mediation_start_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_start_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_mediation_start_rsp.py b/src/corbado_python_sdk/generated/models/passkey_mediation_start_rsp.py index 408861a..3f6dfe0 100644 --- a/src/corbado_python_sdk/generated/models/passkey_mediation_start_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_mediation_start_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_post_login_req.py b/src/corbado_python_sdk/generated/models/passkey_post_login_req.py index fb5f2a2..34e9022 100644 --- a/src/corbado_python_sdk/generated/models/passkey_post_login_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_post_login_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/passkey_post_login_rsp.py b/src/corbado_python_sdk/generated/models/passkey_post_login_rsp.py index d8c83e1..b8c38ff 100644 --- a/src/corbado_python_sdk/generated/models/passkey_post_login_rsp.py +++ b/src/corbado_python_sdk/generated/models/passkey_post_login_rsp.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/short_session_create_req.py b/src/corbado_python_sdk/generated/models/passkey_verify_signed_data_req.py similarity index 76% rename from src/corbado_python_sdk/generated/models/short_session_create_req.py rename to src/corbado_python_sdk/generated/models/passkey_verify_signed_data_req.py index 853a2b5..4705e45 100644 --- a/src/corbado_python_sdk/generated/models/short_session_create_req.py +++ b/src/corbado_python_sdk/generated/models/passkey_verify_signed_data_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,17 +20,16 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.app_type import AppType from typing import Optional, Set from typing_extensions import Self -class ShortSessionCreateReq(BaseModel): +class PasskeyVerifySignedDataReq(BaseModel): """ - ShortSessionCreateReq + PasskeyVerifySignedDataReq """ # noqa: E501 - app_type: AppType = Field(alias="appType") - issuer: StrictStr - __properties: ClassVar[List[str]] = ["appType", "issuer"] + signed_passkey_data: StrictStr = Field(alias="signedPasskeyData") + username: StrictStr + __properties: ClassVar[List[str]] = ["signedPasskeyData", "username"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShortSessionCreateReq from a JSON string""" + """Create an instance of PasskeyVerifySignedDataReq from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShortSessionCreateReq from a dict""" + """Create an instance of PasskeyVerifySignedDataReq from a dict""" if obj is None: return None @@ -83,8 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "appType": obj.get("appType"), - "issuer": obj.get("issuer") + "signedPasskeyData": obj.get("signedPasskeyData"), + "username": obj.get("username") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_verify_signed_data_rsp.py b/src/corbado_python_sdk/generated/models/passkey_verify_signed_data_rsp.py new file mode 100644 index 0000000..bdf0f10 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/passkey_verify_signed_data_rsp.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class PasskeyVerifySignedDataRsp(BaseModel): + """ + PasskeyVerifySignedDataRsp + """ # noqa: E501 + verification_result: StrictStr = Field(alias="verificationResult") + __properties: ClassVar[List[str]] = ["verificationResult"] + + @field_validator('verification_result') + def verification_result_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['success', 'invalid_signature', 'invalid_challenge', 'user_mismatch', 'generic_error']): + raise ValueError("must be one of enum values ('success', 'invalid_signature', 'invalid_challenge', 'user_mismatch', 'generic_error')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PasskeyVerifySignedDataRsp from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PasskeyVerifySignedDataRsp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "verificationResult": obj.get("verificationResult") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/password_manager.py b/src/corbado_python_sdk/generated/models/password_manager.py index 9ea7390..74558f2 100644 --- a/src/corbado_python_sdk/generated/models/password_manager.py +++ b/src/corbado_python_sdk/generated/models/password_manager.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/password_manager_list.py b/src/corbado_python_sdk/generated/models/password_manager_list.py index daec0a8..b4545ba 100644 --- a/src/corbado_python_sdk/generated/models/password_manager_list.py +++ b/src/corbado_python_sdk/generated/models/password_manager_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/project_config_update_cname_req.py b/src/corbado_python_sdk/generated/models/project_config_update_cname_req.py index ab3a6a5..8448edd 100644 --- a/src/corbado_python_sdk/generated/models/project_config_update_cname_req.py +++ b/src/corbado_python_sdk/generated/models/project_config_update_cname_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/session_list.py b/src/corbado_python_sdk/generated/models/session_list.py new file mode 100644 index 0000000..ca4d926 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/session_list.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from typing import Optional, Set +from typing_extensions import Self + +class SessionList(BaseModel): + """ + SessionList + """ # noqa: E501 + sessions: List[SessionListSessionsInner] + paging: UserListPaging + __properties: ClassVar[List[str]] = ["sessions", "paging"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in sessions (list) + _items = [] + if self.sessions: + for _item_sessions in self.sessions: + if _item_sessions: + _items.append(_item_sessions.to_dict()) + _dict['sessions'] = _items + # override the default output from pydantic by calling `to_dict()` of paging + if self.paging: + _dict['paging'] = self.paging.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessions": [SessionListSessionsInner.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None, + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/session_list_sessions_inner.py b/src/corbado_python_sdk/generated/models/session_list_sessions_inner.py new file mode 100644 index 0000000..2eaa328 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/session_list_sessions_inner.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class SessionListSessionsInner(BaseModel): + """ + SessionListSessionsInner + """ # noqa: E501 + session_id: StrictStr = Field(description="Unique identifier of the session.", alias="sessionID") + user_id: StrictStr = Field(description="Unique identifier of the user.", alias="userID") + identifier_value: StrictStr = Field(description="Login identifier of the user (here email address).", alias="identifierValue") + created_ms: StrictInt = Field(description="Unix time of when the session was created (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="createdMs") + last_action_ms: StrictInt = Field(description="Unix time of when last action (e.g., refresh) on session occurred (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="lastActionMs") + expires_ms: StrictInt = Field(description="Unix time of when the session expires (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="expiresMs") + status: StrictStr + __properties: ClassVar[List[str]] = ["sessionID", "userID", "identifierValue", "createdMs", "lastActionMs", "expiresMs", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['active', 'logged_out', 'expired', 'inactivity_reached', 'revoked']): + raise ValueError("must be one of enum values ('active', 'logged_out', 'expired', 'inactivity_reached', 'revoked')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SessionListSessionsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SessionListSessionsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sessionID": obj.get("sessionID"), + "userID": obj.get("userID"), + "identifierValue": obj.get("identifierValue"), + "createdMs": obj.get("createdMs"), + "lastActionMs": obj.get("lastActionMs"), + "expiresMs": obj.get("expiresMs"), + "status": obj.get("status") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/social_account.py b/src/corbado_python_sdk/generated/models/social_account.py index b789d75..f2b057b 100644 --- a/src/corbado_python_sdk/generated/models/social_account.py +++ b/src/corbado_python_sdk/generated/models/social_account.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -27,13 +27,13 @@ class SocialAccount(BaseModel): """ SocialAccount """ # noqa: E501 - social_account_id: StrictStr = Field(alias="socialAccountID") - provider_type: StrictStr = Field(alias="providerType") - identifier_value: StrictStr = Field(alias="identifierValue") - user_id: StrictStr = Field(alias="userID") - foreign_id: StrictStr = Field(alias="foreignID") - avatar_url: StrictStr = Field(alias="avatarURL") - full_name: StrictStr = Field(alias="fullName") + social_account_id: StrictStr = Field(description="Unique identifier of the social account.", alias="socialAccountID") + provider_type: StrictStr = Field(description="Type of the social provider.", alias="providerType") + identifier_value: StrictStr = Field(description="Login identifier of the user (here email address).", alias="identifierValue") + user_id: StrictStr = Field(description="Unique identifier of the user.", alias="userID") + foreign_id: StrictStr = Field(description="Unique identifier of the user in the social provider.", alias="foreignID") + avatar_url: StrictStr = Field(description="URL of the avatar of the user in the social provider.", alias="avatarURL") + full_name: StrictStr = Field(description="Full name of the user in the social provider.", alias="fullName") __properties: ClassVar[List[str]] = ["socialAccountID", "providerType", "identifierValue", "userID", "foreignID", "avatarURL", "fullName"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/social_account_create_req.py b/src/corbado_python_sdk/generated/models/social_account_create_req.py index 4908e79..f450d15 100644 --- a/src/corbado_python_sdk/generated/models/social_account_create_req.py +++ b/src/corbado_python_sdk/generated/models/social_account_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,9 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType from typing import Optional, Set from typing_extensions import Self @@ -28,13 +27,20 @@ class SocialAccountCreateReq(BaseModel): """ SocialAccountCreateReq """ # noqa: E501 - provider_type: SocialProviderType = Field(alias="providerType") - identifier_value: StrictStr = Field(alias="identifierValue") - foreign_id: StrictStr = Field(alias="foreignID") - avatar_url: StrictStr = Field(alias="avatarURL") - full_name: StrictStr = Field(alias="fullName") + provider_type: StrictStr = Field(description="Type of the social provider.", alias="providerType") + identifier_value: StrictStr = Field(description="Login identifier of the user (here email address).", alias="identifierValue") + foreign_id: StrictStr = Field(description="Unique identifier of the user in the social provider.", alias="foreignID") + avatar_url: StrictStr = Field(description="URL of the avatar of the user in the social provider.", alias="avatarURL") + full_name: StrictStr = Field(description="Full name of the user in the social provider.", alias="fullName") __properties: ClassVar[List[str]] = ["providerType", "identifierValue", "foreignID", "avatarURL", "fullName"] + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['google', 'microsoft', 'github']): + raise ValueError("must be one of enum values ('google', 'microsoft', 'github')") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/src/corbado_python_sdk/generated/models/social_account_list.py b/src/corbado_python_sdk/generated/models/social_account_list.py index 8880c61..8acbd4f 100644 --- a/src/corbado_python_sdk/generated/models/social_account_list.py +++ b/src/corbado_python_sdk/generated/models/social_account_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.social_account import SocialAccount +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class SocialAccountList(BaseModel): SocialAccountList """ # noqa: E501 social_accounts: List[SocialAccount] = Field(alias="socialAccounts") - paging: Paging + paging: UserListPaging __properties: ClassVar[List[str]] = ["socialAccounts", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "socialAccounts": [SocialAccount.from_dict(_item) for _item in obj["socialAccounts"]] if obj.get("socialAccounts") is not None else None, - "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/social_provider_type.py b/src/corbado_python_sdk/generated/models/social_provider_type.py deleted file mode 100644 index 9d7c2f0..0000000 --- a/src/corbado_python_sdk/generated/models/social_provider_type.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Corbado Backend API - - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. - - The version of the OpenAPI document: 2.0.0 - Contact: support@corbado.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class SocialProviderType(str, Enum): - """ - SocialProviderType - """ - - """ - allowed enum values - """ - GOOGLE = 'google' - MICROSOFT = 'microsoft' - GITHUB = 'github' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of SocialProviderType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/src/corbado_python_sdk/generated/models/user.py b/src/corbado_python_sdk/generated/models/user.py index 47600f6..bd6e7fa 100644 --- a/src/corbado_python_sdk/generated/models/user.py +++ b/src/corbado_python_sdk/generated/models/user.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from corbado_python_sdk.generated.models.user_status import UserStatus from typing import Optional, Set @@ -32,7 +32,9 @@ class User(BaseModel): full_name: Optional[StrictStr] = Field(default=None, alias="fullName") status: UserStatus explicit_webauthn_id: Optional[StrictStr] = Field(default=None, alias="explicitWebauthnID") - __properties: ClassVar[List[str]] = ["userID", "fullName", "status", "explicitWebauthnID"] + updated: StrictStr + updated_ms: StrictInt = Field(alias="updatedMs") + __properties: ClassVar[List[str]] = ["userID", "fullName", "status", "explicitWebauthnID", "updated", "updatedMs"] model_config = ConfigDict( populate_by_name=True, @@ -88,7 +90,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userID": obj.get("userID"), "fullName": obj.get("fullName"), "status": obj.get("status"), - "explicitWebauthnID": obj.get("explicitWebauthnID") + "explicitWebauthnID": obj.get("explicitWebauthnID"), + "updated": obj.get("updated"), + "updatedMs": obj.get("updatedMs") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_aggregate.py b/src/corbado_python_sdk/generated/models/user_aggregate.py new file mode 100644 index 0000000..9f46f7a --- /dev/null +++ b/src/corbado_python_sdk/generated/models/user_aggregate.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corbado_python_sdk.generated.models.identifier import Identifier +from corbado_python_sdk.generated.models.social_account import SocialAccount +from corbado_python_sdk.generated.models.user_status import UserStatus +from typing import Optional, Set +from typing_extensions import Self + +class UserAggregate(BaseModel): + """ + UserAggregate + """ # noqa: E501 + user_id: StrictStr = Field(alias="userID") + full_name: Optional[StrictStr] = Field(default=None, alias="fullName") + status: UserStatus + explicit_webauthn_id: Optional[StrictStr] = Field(default=None, alias="explicitWebauthnID") + email_identifiers: List[Identifier] = Field(alias="emailIdentifiers") + phone_number_identifiers: List[Identifier] = Field(alias="phoneNumberIdentifiers") + username_identifiers: List[Identifier] = Field(alias="usernameIdentifiers") + social_accounts: List[SocialAccount] = Field(alias="socialAccounts") + created: StrictStr + created_ms: StrictInt = Field(alias="createdMS") + updated: StrictStr + updated_ms: StrictInt = Field(alias="updatedMs") + __properties: ClassVar[List[str]] = ["userID", "fullName", "status", "explicitWebauthnID", "emailIdentifiers", "phoneNumberIdentifiers", "usernameIdentifiers", "socialAccounts", "created", "createdMS", "updated", "updatedMs"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserAggregate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in email_identifiers (list) + _items = [] + if self.email_identifiers: + for _item_email_identifiers in self.email_identifiers: + if _item_email_identifiers: + _items.append(_item_email_identifiers.to_dict()) + _dict['emailIdentifiers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in phone_number_identifiers (list) + _items = [] + if self.phone_number_identifiers: + for _item_phone_number_identifiers in self.phone_number_identifiers: + if _item_phone_number_identifiers: + _items.append(_item_phone_number_identifiers.to_dict()) + _dict['phoneNumberIdentifiers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in username_identifiers (list) + _items = [] + if self.username_identifiers: + for _item_username_identifiers in self.username_identifiers: + if _item_username_identifiers: + _items.append(_item_username_identifiers.to_dict()) + _dict['usernameIdentifiers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in social_accounts (list) + _items = [] + if self.social_accounts: + for _item_social_accounts in self.social_accounts: + if _item_social_accounts: + _items.append(_item_social_accounts.to_dict()) + _dict['socialAccounts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserAggregate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "userID": obj.get("userID"), + "fullName": obj.get("fullName"), + "status": obj.get("status"), + "explicitWebauthnID": obj.get("explicitWebauthnID"), + "emailIdentifiers": [Identifier.from_dict(_item) for _item in obj["emailIdentifiers"]] if obj.get("emailIdentifiers") is not None else None, + "phoneNumberIdentifiers": [Identifier.from_dict(_item) for _item in obj["phoneNumberIdentifiers"]] if obj.get("phoneNumberIdentifiers") is not None else None, + "usernameIdentifiers": [Identifier.from_dict(_item) for _item in obj["usernameIdentifiers"]] if obj.get("usernameIdentifiers") is not None else None, + "socialAccounts": [SocialAccount.from_dict(_item) for _item in obj["socialAccounts"]] if obj.get("socialAccounts") is not None else None, + "created": obj.get("created"), + "createdMS": obj.get("createdMS"), + "updated": obj.get("updated"), + "updatedMs": obj.get("updatedMs") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/user_create_req.py b/src/corbado_python_sdk/generated/models/user_create_req.py index 62a9a17..bcddc93 100644 --- a/src/corbado_python_sdk/generated/models/user_create_req.py +++ b/src/corbado_python_sdk/generated/models/user_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -30,7 +30,7 @@ class UserCreateReq(BaseModel): """ # noqa: E501 full_name: Optional[StrictStr] = Field(default=None, alias="fullName") status: UserStatus - explicit_webauthn_id: Optional[StrictStr] = Field(default=None, description="For connect projects, the webauthnID can be explicitly set for a user", alias="explicitWebauthnID") + explicit_webauthn_id: Optional[StrictStr] = Field(default=None, description="For [Corbado Connect](https://docs.corbado.com/corbado-connect) projects, the webauthnID can be explicitly set for a user", alias="explicitWebauthnID") __properties: ClassVar[List[str]] = ["fullName", "status", "explicitWebauthnID"] model_config = ConfigDict( diff --git a/src/corbado_python_sdk/generated/models/generic_rsp.py b/src/corbado_python_sdk/generated/models/user_delete200_response.py similarity index 79% rename from src/corbado_python_sdk/generated/models/generic_rsp.py rename to src/corbado_python_sdk/generated/models/user_delete200_response.py index 909cf98..2826e4e 100644 --- a/src/corbado_python_sdk/generated/models/generic_rsp.py +++ b/src/corbado_python_sdk/generated/models/user_delete200_response.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,17 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Union -from corbado_python_sdk.generated.models.request_data import RequestData +from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData from typing import Optional, Set from typing_extensions import Self -class GenericRsp(BaseModel): +class UserDelete200Response(BaseModel): """ - GenericRsp + UserDelete200Response """ # noqa: E501 http_status_code: StrictInt = Field(description="HTTP status code of operation", alias="httpStatusCode") message: StrictStr - request_data: RequestData = Field(alias="requestData") + request_data: UserListDefaultResponseAllOfRequestData = Field(alias="requestData") runtime: Union[StrictFloat, StrictInt] = Field(description="Runtime in seconds for this request") __properties: ClassVar[List[str]] = ["httpStatusCode", "message", "requestData", "runtime"] @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GenericRsp from a JSON string""" + """Create an instance of UserDelete200Response from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GenericRsp from a dict""" + """Create an instance of UserDelete200Response from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "httpStatusCode": obj.get("httpStatusCode"), "message": obj.get("message"), - "requestData": RequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, + "requestData": UserListDefaultResponseAllOfRequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, "runtime": obj.get("runtime") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list.py b/src/corbado_python_sdk/generated/models/user_list.py new file mode 100644 index 0000000..edd7442 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/user_list.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.user_aggregate import UserAggregate +from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from typing import Optional, Set +from typing_extensions import Self + +class UserList(BaseModel): + """ + UserList + """ # noqa: E501 + users: List[UserAggregate] + paging: UserListPaging + __properties: ClassVar[List[str]] = ["users", "paging"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in users (list) + _items = [] + if self.users: + for _item_users in self.users: + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items + # override the default output from pydantic by calling `to_dict()` of paging + if self.paging: + _dict['paging'] = self.paging.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "users": [UserAggregate.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/error_rsp.py b/src/corbado_python_sdk/generated/models/user_list_default_response.py similarity index 75% rename from src/corbado_python_sdk/generated/models/error_rsp.py rename to src/corbado_python_sdk/generated/models/user_list_default_response.py index 5063568..1812606 100644 --- a/src/corbado_python_sdk/generated/models/error_rsp.py +++ b/src/corbado_python_sdk/generated/models/user_list_default_response.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,21 +20,21 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError -from corbado_python_sdk.generated.models.request_data import RequestData +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError +from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData from typing import Optional, Set from typing_extensions import Self -class ErrorRsp(BaseModel): +class UserListDefaultResponse(BaseModel): """ - ErrorRsp + UserListDefaultResponse """ # noqa: E501 http_status_code: StrictInt = Field(description="HTTP status code of operation", alias="httpStatusCode") message: StrictStr - request_data: RequestData = Field(alias="requestData") + request_data: UserListDefaultResponseAllOfRequestData = Field(alias="requestData") runtime: Union[StrictFloat, StrictInt] = Field(description="Runtime in seconds for this request") data: Optional[Dict[str, Any]] = None - error: ErrorRspAllOfError + error: UserListDefaultResponseAllOfError __properties: ClassVar[List[str]] = ["httpStatusCode", "message", "requestData", "runtime", "data", "error"] model_config = ConfigDict( @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorRsp from a JSON string""" + """Create an instance of UserListDefaultResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorRsp from a dict""" + """Create an instance of UserListDefaultResponse from a dict""" if obj is None: return None @@ -96,10 +96,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "httpStatusCode": obj.get("httpStatusCode"), "message": obj.get("message"), - "requestData": RequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, + "requestData": UserListDefaultResponseAllOfRequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, "runtime": obj.get("runtime"), "data": obj.get("data"), - "error": ErrorRspAllOfError.from_dict(obj["error"]) if obj.get("error") is not None else None + "error": UserListDefaultResponseAllOfError.from_dict(obj["error"]) if obj.get("error") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py similarity index 77% rename from src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py rename to src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py index bd29bba..71f3482 100644 --- a/src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py +++ b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -20,17 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation +from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner from typing import Optional, Set from typing_extensions import Self -class ErrorRspAllOfError(BaseModel): +class UserListDefaultResponseAllOfError(BaseModel): """ - ErrorRspAllOfError + UserListDefaultResponseAllOfError """ # noqa: E501 type: StrictStr = Field(description="Type of error") details: Optional[StrictStr] = Field(default=None, description="Details of error") - validation: Optional[List[ErrorRspAllOfErrorValidation]] = Field(default=None, description="Validation errors per field") + validation: Optional[List[UserListDefaultResponseAllOfErrorValidationInner]] = Field(default=None, description="Validation errors per field") links: Optional[List[StrictStr]] = Field(default=None, description="Additional links to help understand the error") __properties: ClassVar[List[str]] = ["type", "details", "validation", "links"] @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorRspAllOfError from a JSON string""" + """Create an instance of UserListDefaultResponseAllOfError from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorRspAllOfError from a dict""" + """Create an instance of UserListDefaultResponseAllOfError from a dict""" if obj is None: return None @@ -94,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), "details": obj.get("details"), - "validation": [ErrorRspAllOfErrorValidation.from_dict(_item) for _item in obj["validation"]] if obj.get("validation") is not None else None, + "validation": [UserListDefaultResponseAllOfErrorValidationInner.from_dict(_item) for _item in obj["validation"]] if obj.get("validation") is not None else None, "links": obj.get("links") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py similarity index 83% rename from src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py rename to src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py index e5c8011..e1b7918 100644 --- a/src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py +++ b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class ErrorRspAllOfErrorValidation(BaseModel): +class UserListDefaultResponseAllOfErrorValidationInner(BaseModel): """ - ErrorRspAllOfErrorValidation + UserListDefaultResponseAllOfErrorValidationInner """ # noqa: E501 var_field: StrictStr = Field(alias="field") message: StrictStr @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorRspAllOfErrorValidation from a JSON string""" + """Create an instance of UserListDefaultResponseAllOfErrorValidationInner from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorRspAllOfErrorValidation from a dict""" + """Create an instance of UserListDefaultResponseAllOfErrorValidationInner from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/request_data.py b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py similarity index 87% rename from src/corbado_python_sdk/generated/models/request_data.py rename to src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py index f5eb7ec..9257804 100644 --- a/src/corbado_python_sdk/generated/models/request_data.py +++ b/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -23,7 +23,7 @@ from typing import Optional, Set from typing_extensions import Self -class RequestData(BaseModel): +class UserListDefaultResponseAllOfRequestData(BaseModel): """ Data about the request itself, can be used for debugging """ # noqa: E501 @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RequestData from a JSON string""" + """Create an instance of UserListDefaultResponseAllOfRequestData from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RequestData from a dict""" + """Create an instance of UserListDefaultResponseAllOfRequestData from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/paging.py b/src/corbado_python_sdk/generated/models/user_list_paging.py similarity index 88% rename from src/corbado_python_sdk/generated/models/paging.py rename to src/corbado_python_sdk/generated/models/user_list_paging.py index 6828893..f1879fa 100644 --- a/src/corbado_python_sdk/generated/models/paging.py +++ b/src/corbado_python_sdk/generated/models/user_list_paging.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class Paging(BaseModel): +class UserListPaging(BaseModel): """ - Paging + UserListPaging """ # noqa: E501 page: StrictInt = Field(description="current page returned in response") total_pages: StrictInt = Field(description="total number of pages available", alias="totalPages") @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Paging from a JSON string""" + """Create an instance of UserListPaging from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Paging from a dict""" + """Create an instance of UserListPaging from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/user_status.py b/src/corbado_python_sdk/generated/models/user_status.py index edd1f90..4320265 100644 --- a/src/corbado_python_sdk/generated/models/user_status.py +++ b/src/corbado_python_sdk/generated/models/user_status.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/user_update_req.py b/src/corbado_python_sdk/generated/models/user_update_req.py index 09e217c..d04fa0b 100644 --- a/src/corbado_python_sdk/generated/models/user_update_req.py +++ b/src/corbado_python_sdk/generated/models/user_update_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/webhook_endpoint.py b/src/corbado_python_sdk/generated/models/webhook_endpoint.py index 4c700a3..1af3dfa 100644 --- a/src/corbado_python_sdk/generated/models/webhook_endpoint.py +++ b/src/corbado_python_sdk/generated/models/webhook_endpoint.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -30,13 +30,15 @@ class WebhookEndpoint(BaseModel): """ # noqa: E501 id: StrictStr url: StrictStr + basic_auth_username: StrictStr = Field(alias="basicAuthUsername") + basic_auth_password: StrictStr = Field(alias="basicAuthPassword") custom_headers: Dict[str, Any] = Field(alias="customHeaders") subscribed_events: List[WebhookEventType] = Field(alias="subscribedEvents") created: StrictStr created_ms: StrictInt = Field(alias="createdMs") updated: StrictStr updated_ms: StrictInt = Field(alias="updatedMs") - __properties: ClassVar[List[str]] = ["id", "url", "customHeaders", "subscribedEvents", "created", "createdMs", "updated", "updatedMs"] + __properties: ClassVar[List[str]] = ["id", "url", "basicAuthUsername", "basicAuthPassword", "customHeaders", "subscribedEvents", "created", "createdMs", "updated", "updatedMs"] model_config = ConfigDict( populate_by_name=True, @@ -91,6 +93,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "url": obj.get("url"), + "basicAuthUsername": obj.get("basicAuthUsername"), + "basicAuthPassword": obj.get("basicAuthPassword"), "customHeaders": obj.get("customHeaders"), "subscribedEvents": obj.get("subscribedEvents"), "created": obj.get("created"), diff --git a/src/corbado_python_sdk/generated/models/webhook_endpoint_create_req.py b/src/corbado_python_sdk/generated/models/webhook_endpoint_create_req.py index 86f652f..f86c2b3 100644 --- a/src/corbado_python_sdk/generated/models/webhook_endpoint_create_req.py +++ b/src/corbado_python_sdk/generated/models/webhook_endpoint_create_req.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from corbado_python_sdk.generated.models.webhook_event_type import WebhookEventType from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,11 @@ class WebhookEndpointCreateReq(BaseModel): WebhookEndpointCreateReq """ # noqa: E501 url: StrictStr + basic_auth_username: Optional[StrictStr] = Field(default=None, alias="basicAuthUsername") + basic_auth_password: Optional[StrictStr] = Field(default=None, alias="basicAuthPassword") subscribed_events: List[WebhookEventType] = Field(alias="subscribedEvents") custom_headers: Dict[str, Any] = Field(alias="customHeaders") - __properties: ClassVar[List[str]] = ["url", "subscribedEvents", "customHeaders"] + __properties: ClassVar[List[str]] = ["url", "basicAuthUsername", "basicAuthPassword", "subscribedEvents", "customHeaders"] model_config = ConfigDict( populate_by_name=True, @@ -85,6 +87,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "url": obj.get("url"), + "basicAuthUsername": obj.get("basicAuthUsername"), + "basicAuthPassword": obj.get("basicAuthPassword"), "subscribedEvents": obj.get("subscribedEvents"), "customHeaders": obj.get("customHeaders") }) diff --git a/src/corbado_python_sdk/generated/models/webhook_endpoint_list.py b/src/corbado_python_sdk/generated/models/webhook_endpoint_list.py index 25e6b47..7ea95e4 100644 --- a/src/corbado_python_sdk/generated/models/webhook_endpoint_list.py +++ b/src/corbado_python_sdk/generated/models/webhook_endpoint_list.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com diff --git a/src/corbado_python_sdk/generated/models/webhook_endpoint_update_req.py b/src/corbado_python_sdk/generated/models/webhook_endpoint_update_req.py new file mode 100644 index 0000000..4071cbd --- /dev/null +++ b/src/corbado_python_sdk/generated/models/webhook_endpoint_update_req.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from corbado_python_sdk.generated.models.webhook_event_type import WebhookEventType +from typing import Optional, Set +from typing_extensions import Self + +class WebhookEndpointUpdateReq(BaseModel): + """ + WebhookEndpointUpdateReq + """ # noqa: E501 + url: Optional[StrictStr] = None + basic_auth_username: Optional[StrictStr] = Field(default=None, alias="basicAuthUsername") + basic_auth_password: Optional[StrictStr] = Field(default=None, alias="basicAuthPassword") + subscribed_events: Optional[List[WebhookEventType]] = Field(default=None, alias="subscribedEvents") + custom_headers: Optional[Dict[str, Any]] = Field(default=None, alias="customHeaders") + __properties: ClassVar[List[str]] = ["url", "basicAuthUsername", "basicAuthPassword", "subscribedEvents", "customHeaders"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebhookEndpointUpdateReq from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebhookEndpointUpdateReq from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "basicAuthUsername": obj.get("basicAuthUsername"), + "basicAuthPassword": obj.get("basicAuthPassword"), + "subscribedEvents": obj.get("subscribedEvents"), + "customHeaders": obj.get("customHeaders") + }) + return _obj + + diff --git a/src/corbado_python_sdk/generated/models/webhook_event_type.py b/src/corbado_python_sdk/generated/models/webhook_event_type.py index 92d7c81..83c1b23 100644 --- a/src/corbado_python_sdk/generated/models/webhook_event_type.py +++ b/src/corbado_python_sdk/generated/models/webhook_event_type.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -30,6 +30,9 @@ class WebhookEventType(str, Enum): PASSKEY_MINUS_LOGIN_DOT_COMPLETED = 'passkey-login.completed' PASSKEY_DOT_CREATED = 'passkey.created' PASSKEY_DOT_DELETED = 'passkey.deleted' + USER_DOT_CREATED = 'user.created' + USER_DOT_UPDATED = 'user.updated' + USER_DOT_DELETED = 'user.deleted' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/src/corbado_python_sdk/generated/requirements.txt b/src/corbado_python_sdk/generated/requirements.txt index cc85509..6cbb2b9 100644 --- a/src/corbado_python_sdk/generated/requirements.txt +++ b/src/corbado_python_sdk/generated/requirements.txt @@ -1,5 +1,4 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 +urllib3 >= 2.1.0, < 3.0.0 +python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/src/corbado_python_sdk/generated/rest.py b/src/corbado_python_sdk/generated/rest.py index a621bf2..2d40ac2 100644 --- a/src/corbado_python_sdk/generated/rest.py +++ b/src/corbado_python_sdk/generated/rest.py @@ -3,7 +3,7 @@ """ Corbado Backend API - # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. The version of the OpenAPI document: 2.0.0 Contact: support@corbado.com @@ -77,6 +77,7 @@ def __init__(self, configuration) -> None: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args['assert_hostname'] = ( From c6a24b276cd40df23440c2e9ad5d676d963cc4ed Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Tue, 16 Sep 2025 11:39:49 +0200 Subject: [PATCH 2/3] Update version to 2.0.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f93ea0c..6acdb44 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.2 \ No newline at end of file +2.0.3 \ No newline at end of file From 6d7be0345bc0d5bdcdf8fc538088eebe987c5f94 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Tue, 16 Sep 2025 11:43:35 +0200 Subject: [PATCH 3/3] Downgrade urllib3 dependency to version 1.25.3 in setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b53cb11..931d3f5 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ PYTHON_REQUIRES = ">=3.8" INSTALL_REQUIRES = [ - "urllib3 >= 2.5.0", + "urllib3 >= 1.25.3", "python-dateutil", # used in generated code "pydantic >= 2", "typing-extensions >= 4.7.1",