diff --git a/zitadel_client/api/feature_service_api.py b/zitadel_client/api/feature_service_api.py index e246abeb..51b911f2 100644 --- a/zitadel_client/api/feature_service_api.py +++ b/zitadel_client/api/feature_service_api.py @@ -1060,6 +1060,19 @@ def __feature_service_set_organization_features_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] = [ @@ -1277,6 +1290,19 @@ def __feature_service_set_user_features_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] = [ diff --git a/zitadel_client/api/session_service_api.py b/zitadel_client/api/session_service_api.py index 71f9a0ac..4602f2dc 100644 --- a/zitadel_client/api/session_service_api.py +++ b/zitadel_client/api/session_service_api.py @@ -70,7 +70,7 @@ def session_service_create_session( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", + '200': "SessionServiceCreateSessionResponse", '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } diff --git a/zitadel_client/api/user_service_api.py b/zitadel_client/api/user_service_api.py index 029e973b..5bbf83d8 100644 --- a/zitadel_client/api/user_service_api.py +++ b/zitadel_client/api/user_service_api.py @@ -130,7 +130,7 @@ def user_service_add_human_user( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", + '200': "UserServiceAddHumanUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } @@ -422,6 +422,19 @@ def __user_service_add_otp_email_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] = [ @@ -524,6 +537,19 @@ def __user_service_add_otpsms_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] = [ @@ -556,7 +582,7 @@ def user_service_create_invite_code( ) -> UserServiceCreateInviteCodeResponse: """Create an invite code for a user - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. If an invite code has been created previously, it's url template and application name will be used as defaults for the new code. The new code will overwrite the previous one and make it invalid. :param user_id: (required) :type user_id: str @@ -870,6 +896,19 @@ def __user_service_deactivate_user_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] = [ @@ -1176,6 +1215,19 @@ def __user_service_human_mfa_init_skipped_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] = [ @@ -1641,6 +1693,19 @@ def __user_service_list_passkeys_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] = [ @@ -1859,6 +1924,19 @@ def __user_service_lock_user_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] = [ @@ -2083,6 +2161,19 @@ def __user_service_reactivate_user_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] = [ @@ -2307,6 +2398,19 @@ def __user_service_register_totp_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] = [ @@ -2545,6 +2649,19 @@ def __user_service_remove_idp_link_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] = [ @@ -2960,6 +3077,19 @@ def __user_service_remove_phone_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] = [ @@ -3322,14 +3452,15 @@ def user_service_resend_invite_code( self, user_id: StrictStr, ) -> UserServiceResendInviteCodeResponse: - """Resend an invite code for a user + """(Deprecated) Resend an invite code for a user - Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. + Deprecated: Use [CreateInviteCode](apis/resources/user_service_v2/user-service-create-invite-code.api.mdx) instead. Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. :param user_id: (required) :type user_id: str :return: Returns the result object. """ # noqa: E501 + warnings.warn("POST /v2/users/{userId}/invite_code/resend is deprecated.", DeprecationWarning) _param = self.__user_service_resend_invite_code_serialize( user_id=user_id, @@ -4344,6 +4475,19 @@ def __user_service_unlock_user_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] = [ diff --git a/zitadel_client/models/user_service_send_invite_code.py b/zitadel_client/models/user_service_send_invite_code.py index 5a6c571c..657f57f7 100644 --- a/zitadel_client/models/user_service_send_invite_code.py +++ b/zitadel_client/models/user_service_send_invite_code.py @@ -27,8 +27,8 @@ class UserServiceSendInviteCode(BaseModel): """ UserServiceSendInviteCode """ # noqa: E501 - url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") - application_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set, ZITADEL will be used as default.", alias="applicationName") + url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set and no previous code was created, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + application_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set and no previous code was created, ZITADEL will be used as default.", alias="applicationName") model_config = ConfigDict( populate_by_name=True,