letta-client 0.1.233__py3-none-any.whl → 0.1.234__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +2 -0
- letta_client/agents/__init__.py +2 -0
- letta_client/agents/blocks/__init__.py +2 -0
- letta_client/agents/blocks/client.py +72 -313
- letta_client/agents/blocks/raw_client.py +654 -0
- letta_client/agents/client.py +329 -869
- letta_client/agents/context/__init__.py +2 -0
- letta_client/agents/context/client.py +31 -66
- letta_client/agents/context/raw_client.py +122 -0
- letta_client/agents/core_memory/__init__.py +2 -0
- letta_client/agents/core_memory/client.py +31 -66
- letta_client/agents/core_memory/raw_client.py +124 -0
- letta_client/agents/files/__init__.py +2 -0
- letta_client/agents/files/client.py +39 -178
- letta_client/agents/files/raw_client.py +349 -0
- letta_client/agents/folders/__init__.py +2 -0
- letta_client/agents/folders/client.py +39 -178
- letta_client/agents/folders/raw_client.py +327 -0
- letta_client/agents/groups/__init__.py +2 -0
- letta_client/agents/groups/client.py +31 -72
- letta_client/agents/groups/raw_client.py +142 -0
- letta_client/agents/memory_variables/__init__.py +2 -0
- letta_client/agents/memory_variables/client.py +31 -65
- letta_client/agents/memory_variables/raw_client.py +125 -0
- letta_client/agents/memory_variables/types/__init__.py +2 -0
- letta_client/agents/memory_variables/types/memory_variables_list_response.py +3 -2
- letta_client/agents/messages/__init__.py +2 -0
- letta_client/agents/messages/client.py +150 -589
- letta_client/agents/messages/raw_client.py +1384 -0
- letta_client/agents/messages/types/__init__.py +2 -0
- letta_client/agents/messages/types/letta_streaming_response.py +6 -5
- letta_client/agents/messages/types/messages_modify_request.py +3 -2
- letta_client/agents/messages/types/messages_modify_response.py +5 -4
- letta_client/agents/messages/types/messages_preview_raw_payload_request.py +1 -0
- letta_client/agents/passages/__init__.py +2 -0
- letta_client/agents/passages/client.py +89 -301
- letta_client/agents/passages/raw_client.py +678 -0
- letta_client/agents/raw_client.py +2068 -0
- letta_client/agents/sources/__init__.py +2 -0
- letta_client/agents/sources/client.py +39 -178
- letta_client/agents/sources/raw_client.py +327 -0
- letta_client/agents/templates/__init__.py +2 -0
- letta_client/agents/templates/client.py +57 -276
- letta_client/agents/templates/raw_client.py +505 -0
- letta_client/agents/templates/types/__init__.py +2 -0
- letta_client/agents/templates/types/templates_create_response.py +5 -4
- letta_client/agents/templates/types/templates_migrate_response.py +3 -2
- letta_client/agents/tools/__init__.py +2 -0
- letta_client/agents/tools/client.py +40 -179
- letta_client/agents/tools/raw_client.py +327 -0
- letta_client/agents/types/__init__.py +2 -0
- letta_client/agents/types/agents_search_request_search_item.py +4 -3
- letta_client/agents/types/agents_search_request_search_item_field.py +4 -3
- letta_client/agents/types/agents_search_request_search_item_one.py +4 -3
- letta_client/agents/types/agents_search_request_search_item_three.py +3 -2
- letta_client/agents/types/agents_search_request_search_item_two.py +3 -2
- letta_client/agents/types/agents_search_request_search_item_zero.py +3 -2
- letta_client/agents/types/agents_search_response.py +5 -4
- letta_client/agents/types/create_agent_request_response_format.py +1 -0
- letta_client/agents/types/create_agent_request_tool_rules_item.py +4 -3
- letta_client/agents/types/update_agent_response_format.py +1 -0
- letta_client/agents/types/update_agent_tool_rules_item.py +4 -3
- letta_client/base_client.py +41 -49
- letta_client/batches/__init__.py +2 -0
- letta_client/batches/client.py +45 -253
- letta_client/batches/raw_client.py +457 -0
- letta_client/blocks/__init__.py +2 -0
- letta_client/blocks/agents/__init__.py +2 -0
- letta_client/blocks/agents/client.py +33 -70
- letta_client/blocks/agents/raw_client.py +144 -0
- letta_client/blocks/client.py +126 -424
- letta_client/blocks/raw_client.py +973 -0
- letta_client/client_side_access_tokens/__init__.py +2 -0
- letta_client/client_side_access_tokens/client.py +45 -216
- letta_client/client_side_access_tokens/raw_client.py +435 -0
- letta_client/client_side_access_tokens/types/__init__.py +2 -0
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_request_policy_item.py +4 -3
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response.py +6 -5
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy.py +4 -3
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item.py +4 -3
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response.py +6 -5
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item.py +6 -5
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy.py +4 -3
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item.py +4 -3
- letta_client/core/__init__.py +5 -0
- letta_client/core/api_error.py +13 -5
- letta_client/core/client_wrapper.py +14 -5
- letta_client/core/force_multipart.py +16 -0
- letta_client/core/http_client.py +70 -26
- letta_client/core/http_response.py +55 -0
- letta_client/core/jsonable_encoder.py +0 -1
- letta_client/core/pydantic_utilities.py +70 -111
- letta_client/core/serialization.py +7 -3
- letta_client/core/unchecked_base_model.py +40 -4
- letta_client/embedding_models/__init__.py +2 -0
- letta_client/embedding_models/client.py +31 -65
- letta_client/embedding_models/raw_client.py +117 -0
- letta_client/errors/__init__.py +2 -0
- letta_client/errors/bad_request_error.py +4 -3
- letta_client/errors/conflict_error.py +4 -2
- letta_client/errors/internal_server_error.py +4 -3
- letta_client/errors/not_found_error.py +4 -3
- letta_client/errors/payment_required_error.py +4 -2
- letta_client/errors/unprocessable_entity_error.py +4 -2
- letta_client/folders/__init__.py +2 -0
- letta_client/folders/client.py +100 -564
- letta_client/folders/files/__init__.py +2 -0
- letta_client/folders/files/client.py +44 -189
- letta_client/folders/files/raw_client.py +391 -0
- letta_client/folders/passages/__init__.py +2 -0
- letta_client/folders/passages/client.py +33 -74
- letta_client/folders/passages/raw_client.py +162 -0
- letta_client/folders/raw_client.py +1084 -0
- letta_client/groups/__init__.py +2 -0
- letta_client/groups/client.py +87 -406
- letta_client/groups/messages/__init__.py +2 -0
- letta_client/groups/messages/client.py +110 -371
- letta_client/groups/messages/raw_client.py +881 -0
- letta_client/groups/messages/types/__init__.py +2 -0
- letta_client/groups/messages/types/letta_streaming_response.py +5 -4
- letta_client/groups/messages/types/messages_modify_request.py +3 -2
- letta_client/groups/messages/types/messages_modify_response.py +5 -4
- letta_client/groups/raw_client.py +807 -0
- letta_client/groups/types/__init__.py +2 -0
- letta_client/groups/types/group_create_manager_config.py +1 -0
- letta_client/groups/types/group_update_manager_config.py +1 -0
- letta_client/health/__init__.py +2 -0
- letta_client/health/client.py +31 -43
- letta_client/health/raw_client.py +85 -0
- letta_client/identities/__init__.py +2 -0
- letta_client/identities/client.py +115 -498
- letta_client/identities/properties/__init__.py +2 -0
- letta_client/identities/properties/client.py +32 -76
- letta_client/identities/properties/raw_client.py +152 -0
- letta_client/identities/raw_client.py +1010 -0
- letta_client/jobs/__init__.py +2 -0
- letta_client/jobs/client.py +67 -310
- letta_client/jobs/raw_client.py +624 -0
- letta_client/messages/__init__.py +2 -0
- letta_client/messages/client.py +41 -74
- letta_client/messages/raw_client.py +186 -0
- letta_client/models/__init__.py +2 -0
- letta_client/models/client.py +39 -73
- letta_client/models/raw_client.py +151 -0
- letta_client/projects/__init__.py +2 -0
- letta_client/projects/client.py +31 -53
- letta_client/projects/raw_client.py +125 -0
- letta_client/projects/types/__init__.py +2 -0
- letta_client/projects/types/projects_list_response.py +5 -4
- letta_client/projects/types/projects_list_response_projects_item.py +3 -2
- letta_client/providers/__init__.py +2 -0
- letta_client/providers/client.py +62 -335
- letta_client/providers/raw_client.py +664 -0
- letta_client/runs/__init__.py +2 -0
- letta_client/runs/client.py +56 -258
- letta_client/runs/messages/__init__.py +2 -0
- letta_client/runs/messages/client.py +34 -79
- letta_client/runs/messages/raw_client.py +209 -0
- letta_client/runs/raw_client.py +440 -0
- letta_client/runs/steps/__init__.py +2 -0
- letta_client/runs/steps/client.py +33 -76
- letta_client/runs/steps/raw_client.py +192 -0
- letta_client/runs/usage/__init__.py +2 -0
- letta_client/runs/usage/client.py +31 -66
- letta_client/runs/usage/raw_client.py +122 -0
- letta_client/sources/__init__.py +2 -0
- letta_client/sources/client.py +107 -625
- letta_client/sources/files/__init__.py +2 -0
- letta_client/sources/files/client.py +44 -189
- letta_client/sources/files/raw_client.py +391 -0
- letta_client/sources/passages/__init__.py +2 -0
- letta_client/sources/passages/client.py +33 -74
- letta_client/sources/passages/raw_client.py +162 -0
- letta_client/sources/raw_client.py +1209 -0
- letta_client/steps/__init__.py +2 -0
- letta_client/steps/client.py +65 -153
- letta_client/steps/feedback/__init__.py +2 -0
- letta_client/steps/feedback/client.py +32 -73
- letta_client/steps/feedback/raw_client.py +141 -0
- letta_client/steps/raw_client.py +355 -0
- letta_client/steps/types/__init__.py +2 -0
- letta_client/tags/__init__.py +2 -0
- letta_client/tags/client.py +33 -73
- letta_client/tags/raw_client.py +148 -0
- letta_client/telemetry/__init__.py +2 -0
- letta_client/telemetry/client.py +31 -66
- letta_client/telemetry/raw_client.py +118 -0
- letta_client/templates/__init__.py +2 -0
- letta_client/templates/agents/__init__.py +2 -0
- letta_client/templates/agents/client.py +48 -96
- letta_client/templates/agents/raw_client.py +227 -0
- letta_client/templates/agents/types/__init__.py +2 -0
- letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item.py +4 -3
- letta_client/templates/agents/types/agents_create_response.py +4 -3
- letta_client/templates/client.py +36 -57
- letta_client/templates/raw_client.py +133 -0
- letta_client/templates/types/__init__.py +2 -0
- letta_client/templates/types/templates_list_response.py +5 -4
- letta_client/templates/types/templates_list_response_templates_item.py +3 -2
- letta_client/tools/__init__.py +2 -0
- letta_client/tools/client.py +195 -1322
- letta_client/tools/raw_client.py +2565 -0
- letta_client/tools/types/__init__.py +2 -0
- letta_client/tools/types/add_mcp_server_request.py +2 -1
- letta_client/tools/types/add_mcp_server_response_item.py +2 -1
- letta_client/tools/types/connect_mcp_server_request.py +2 -1
- letta_client/tools/types/delete_mcp_server_response_item.py +2 -1
- letta_client/tools/types/list_mcp_servers_response_value.py +1 -0
- letta_client/tools/types/streaming_response.py +5 -4
- letta_client/tools/types/test_mcp_server_request.py +2 -1
- letta_client/tools/types/update_mcp_server_request.py +2 -1
- letta_client/tools/types/update_mcp_server_response.py +2 -1
- letta_client/types/__init__.py +2 -0
- letta_client/types/action_model.py +6 -5
- letta_client/types/action_parameters_model.py +3 -2
- letta_client/types/action_response_model.py +3 -2
- letta_client/types/agent_environment_variable.py +3 -2
- letta_client/types/agent_schema.py +7 -6
- letta_client/types/agent_schema_tool_rules_item.py +2 -1
- letta_client/types/agent_state.py +9 -8
- letta_client/types/agent_state_response_format.py +1 -0
- letta_client/types/agent_state_tool_rules_item.py +4 -3
- letta_client/types/app_auth_scheme.py +4 -3
- letta_client/types/app_model.py +5 -4
- letta_client/types/assistant_message.py +3 -2
- letta_client/types/assistant_message_content.py +1 -0
- letta_client/types/audio.py +3 -2
- letta_client/types/auth_request.py +2 -1
- letta_client/types/auth_response.py +5 -4
- letta_client/types/auth_scheme_field.py +3 -2
- letta_client/types/bad_request_error_body.py +3 -2
- letta_client/types/base_64_image.py +2 -1
- letta_client/types/base_tool_rule_schema.py +3 -2
- letta_client/types/batch_job.py +4 -3
- letta_client/types/block.py +3 -2
- letta_client/types/block_update.py +2 -1
- letta_client/types/chat_completion_assistant_message_param.py +5 -4
- letta_client/types/chat_completion_assistant_message_param_content.py +1 -0
- letta_client/types/chat_completion_assistant_message_param_content_item.py +2 -1
- letta_client/types/chat_completion_audio_param.py +4 -3
- letta_client/types/chat_completion_content_part_image_param.py +4 -3
- letta_client/types/chat_completion_content_part_input_audio_param.py +4 -3
- letta_client/types/chat_completion_content_part_refusal_param.py +3 -2
- letta_client/types/chat_completion_content_part_text_param.py +3 -2
- letta_client/types/chat_completion_developer_message_param.py +4 -3
- letta_client/types/chat_completion_developer_message_param_content.py +1 -0
- letta_client/types/chat_completion_function_call_option_param.py +3 -2
- letta_client/types/chat_completion_function_message_param.py +3 -2
- letta_client/types/chat_completion_message_tool_call.py +4 -3
- letta_client/types/chat_completion_message_tool_call_param.py +4 -3
- letta_client/types/chat_completion_named_tool_choice_param.py +4 -3
- letta_client/types/chat_completion_prediction_content_param.py +4 -3
- letta_client/types/chat_completion_prediction_content_param_content.py +1 -0
- letta_client/types/chat_completion_stream_options_param.py +3 -2
- letta_client/types/chat_completion_system_message_param.py +4 -3
- letta_client/types/chat_completion_system_message_param_content.py +1 -0
- letta_client/types/chat_completion_tool_message_param.py +4 -3
- letta_client/types/chat_completion_tool_message_param_content.py +1 -0
- letta_client/types/chat_completion_tool_param.py +4 -3
- letta_client/types/chat_completion_user_message_param.py +4 -3
- letta_client/types/chat_completion_user_message_param_content.py +1 -0
- letta_client/types/chat_completion_user_message_param_content_item.py +2 -1
- letta_client/types/child_tool_rule.py +3 -2
- letta_client/types/child_tool_rule_schema.py +3 -2
- letta_client/types/code_input.py +3 -2
- letta_client/types/completion_create_params_non_streaming.py +10 -9
- letta_client/types/completion_create_params_non_streaming_function_call.py +1 -0
- letta_client/types/completion_create_params_non_streaming_messages_item.py +4 -3
- letta_client/types/completion_create_params_non_streaming_response_format.py +3 -2
- letta_client/types/completion_create_params_non_streaming_tool_choice.py +1 -0
- letta_client/types/completion_create_params_streaming.py +10 -9
- letta_client/types/completion_create_params_streaming_function_call.py +1 -0
- letta_client/types/completion_create_params_streaming_messages_item.py +4 -3
- letta_client/types/completion_create_params_streaming_response_format.py +3 -2
- letta_client/types/completion_create_params_streaming_tool_choice.py +1 -0
- letta_client/types/conditional_tool_rule.py +3 -2
- letta_client/types/conditional_tool_rule_schema.py +3 -2
- letta_client/types/conflict_error_body.py +3 -2
- letta_client/types/context_window_overview.py +4 -3
- letta_client/types/continue_tool_rule.py +3 -2
- letta_client/types/core_memory_block_schema.py +4 -3
- letta_client/types/create_block.py +3 -2
- letta_client/types/dynamic_manager.py +2 -1
- letta_client/types/dynamic_manager_update.py +2 -1
- letta_client/types/e_2_b_sandbox_config.py +2 -1
- letta_client/types/embedding_config.py +4 -3
- letta_client/types/file.py +4 -3
- letta_client/types/file_block.py +4 -3
- letta_client/types/file_file.py +3 -2
- letta_client/types/file_metadata.py +5 -4
- letta_client/types/file_stats.py +3 -2
- letta_client/types/folder.py +5 -4
- letta_client/types/function_call.py +3 -2
- letta_client/types/function_definition_input.py +3 -2
- letta_client/types/function_definition_output.py +3 -2
- letta_client/types/function_output.py +3 -2
- letta_client/types/function_tool.py +4 -3
- letta_client/types/generate_tool_input.py +3 -2
- letta_client/types/generate_tool_output.py +4 -3
- letta_client/types/group.py +4 -3
- letta_client/types/health.py +3 -2
- letta_client/types/hidden_reasoning_message.py +4 -3
- letta_client/types/http_validation_error.py +4 -3
- letta_client/types/identity.py +4 -3
- letta_client/types/identity_property.py +5 -4
- letta_client/types/image_content.py +3 -2
- letta_client/types/image_content_source.py +1 -0
- letta_client/types/image_url.py +4 -3
- letta_client/types/init_tool_rule.py +3 -2
- letta_client/types/input_audio.py +4 -3
- letta_client/types/internal_server_error_body.py +3 -2
- letta_client/types/job.py +4 -3
- letta_client/types/json_object_response_format.py +3 -2
- letta_client/types/json_schema.py +4 -3
- letta_client/types/json_schema_response_format.py +2 -1
- letta_client/types/letta_batch_messages.py +4 -3
- letta_client/types/letta_batch_request.py +4 -3
- letta_client/types/letta_image.py +2 -1
- letta_client/types/letta_message_content_union.py +4 -3
- letta_client/types/letta_message_union.py +5 -4
- letta_client/types/letta_ping.py +2 -1
- letta_client/types/letta_request.py +4 -3
- letta_client/types/letta_request_config.py +3 -2
- letta_client/types/letta_response.py +4 -3
- letta_client/types/letta_stop_reason.py +3 -2
- letta_client/types/letta_streaming_request.py +9 -3
- letta_client/types/letta_usage_statistics.py +3 -2
- letta_client/types/letta_user_message_content_union.py +2 -1
- letta_client/types/llm_config.py +6 -5
- letta_client/types/local_sandbox_config.py +3 -2
- letta_client/types/max_count_per_step_tool_rule.py +3 -2
- letta_client/types/max_count_per_step_tool_rule_schema.py +3 -2
- letta_client/types/mcp_tool.py +4 -3
- letta_client/types/memory.py +4 -3
- letta_client/types/message.py +6 -5
- letta_client/types/message_content_item.py +1 -0
- letta_client/types/message_create.py +5 -4
- letta_client/types/message_create_content.py +1 -0
- letta_client/types/message_schema.py +4 -3
- letta_client/types/modal_sandbox_config.py +2 -1
- letta_client/types/not_found_error_body.py +3 -2
- letta_client/types/omitted_reasoning_content.py +3 -2
- letta_client/types/openai_types_chat_chat_completion_message_tool_call_param_function.py +3 -2
- letta_client/types/openai_types_chat_chat_completion_named_tool_choice_param_function.py +3 -2
- letta_client/types/openai_types_chat_completion_create_params_function.py +3 -2
- letta_client/types/organization.py +3 -2
- letta_client/types/organization_create.py +2 -1
- letta_client/types/organization_sources_stats.py +3 -2
- letta_client/types/organization_update.py +2 -1
- letta_client/types/parameter_properties.py +3 -2
- letta_client/types/parameters_schema.py +4 -3
- letta_client/types/parent_tool_rule.py +3 -2
- letta_client/types/passage.py +4 -3
- letta_client/types/payment_required_error_body.py +3 -2
- letta_client/types/pip_requirement.py +3 -2
- letta_client/types/provider.py +5 -4
- letta_client/types/provider_check.py +4 -3
- letta_client/types/provider_trace.py +3 -2
- letta_client/types/reasoning_content.py +2 -1
- letta_client/types/reasoning_message.py +4 -3
- letta_client/types/redacted_reasoning_content.py +2 -1
- letta_client/types/required_before_exit_tool_rule.py +3 -2
- letta_client/types/response_format_json_object.py +3 -2
- letta_client/types/response_format_json_schema.py +4 -3
- letta_client/types/response_format_text.py +3 -2
- letta_client/types/round_robin_manager.py +2 -1
- letta_client/types/round_robin_manager_update.py +2 -1
- letta_client/types/run.py +4 -3
- letta_client/types/sandbox_config.py +4 -3
- letta_client/types/sandbox_config_create.py +4 -3
- letta_client/types/sandbox_config_create_config.py +2 -1
- letta_client/types/sandbox_config_update.py +3 -2
- letta_client/types/sandbox_config_update_config.py +2 -1
- letta_client/types/sandbox_environment_variable.py +3 -2
- letta_client/types/sandbox_environment_variable_create.py +3 -2
- letta_client/types/sandbox_environment_variable_update.py +2 -1
- letta_client/types/sleeptime_manager.py +2 -1
- letta_client/types/sleeptime_manager_update.py +2 -1
- letta_client/types/source.py +5 -4
- letta_client/types/source_create.py +4 -3
- letta_client/types/source_stats.py +4 -3
- letta_client/types/source_update.py +3 -2
- letta_client/types/sse_server_config.py +4 -3
- letta_client/types/stdio_server_config.py +4 -3
- letta_client/types/step.py +5 -4
- letta_client/types/streamable_http_server_config.py +4 -3
- letta_client/types/supervisor_manager.py +2 -1
- letta_client/types/supervisor_manager_update.py +2 -1
- letta_client/types/system_message.py +2 -1
- letta_client/types/tag_schema.py +3 -2
- letta_client/types/terminal_tool_rule.py +3 -2
- letta_client/types/text_content.py +2 -1
- letta_client/types/text_response_format.py +3 -2
- letta_client/types/tool.py +5 -4
- letta_client/types/tool_annotations.py +4 -3
- letta_client/types/tool_call.py +3 -2
- letta_client/types/tool_call_content.py +2 -1
- letta_client/types/tool_call_delta.py +3 -2
- letta_client/types/tool_call_message.py +4 -3
- letta_client/types/tool_call_message_tool_call.py +1 -0
- letta_client/types/tool_create.py +3 -2
- letta_client/types/tool_env_var_schema.py +3 -2
- letta_client/types/tool_json_schema.py +4 -3
- letta_client/types/tool_return.py +4 -3
- letta_client/types/tool_return_content.py +2 -1
- letta_client/types/tool_return_message.py +4 -3
- letta_client/types/tool_schema.py +5 -4
- letta_client/types/update_assistant_message.py +3 -2
- letta_client/types/update_assistant_message_content.py +1 -0
- letta_client/types/update_reasoning_message.py +3 -2
- letta_client/types/update_ssemcp_server.py +2 -1
- letta_client/types/update_stdio_mcp_server.py +3 -2
- letta_client/types/update_streamable_httpmcp_server.py +2 -1
- letta_client/types/update_system_message.py +2 -1
- letta_client/types/update_user_message.py +3 -2
- letta_client/types/update_user_message_content.py +1 -0
- letta_client/types/url_image.py +2 -1
- letta_client/types/usage_statistics.py +5 -4
- letta_client/types/usage_statistics_completion_token_details.py +3 -2
- letta_client/types/usage_statistics_prompt_token_details.py +3 -2
- letta_client/types/user.py +3 -2
- letta_client/types/user_create.py +3 -2
- letta_client/types/user_message.py +3 -2
- letta_client/types/user_message_content.py +1 -0
- letta_client/types/user_update.py +3 -2
- letta_client/types/validation_error.py +4 -3
- letta_client/types/voice_sleeptime_manager.py +2 -1
- letta_client/types/voice_sleeptime_manager_update.py +2 -1
- letta_client/types/web_search_options.py +4 -3
- letta_client/types/web_search_options_user_location.py +4 -3
- letta_client/types/web_search_options_user_location_approximate.py +3 -2
- letta_client/voice/__init__.py +2 -0
- letta_client/voice/client.py +33 -74
- letta_client/voice/raw_client.py +154 -0
- {letta_client-0.1.233.dist-info → letta_client-0.1.234.dist-info}/METADATA +24 -3
- letta_client-0.1.234.dist-info/RECORD +503 -0
- letta_client-0.1.233.dist-info/RECORD +0 -455
- {letta_client-0.1.233.dist-info → letta_client-0.1.234.dist-info}/WHEEL +0 -0
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
|
-
|
|
5
|
-
from .
|
|
6
|
-
from ..types.identity_type import IdentityType
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
6
|
from ..core.request_options import RequestOptions
|
|
8
7
|
from ..types.identity import Identity
|
|
9
|
-
from ..core.unchecked_base_model import construct_type
|
|
10
|
-
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
11
|
-
from ..types.http_validation_error import HttpValidationError
|
|
12
|
-
from json.decoder import JSONDecodeError
|
|
13
|
-
from ..core.api_error import ApiError
|
|
14
8
|
from ..types.identity_property import IdentityProperty
|
|
15
|
-
from ..
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from .properties.client import AsyncPropertiesClient
|
|
9
|
+
from ..types.identity_type import IdentityType
|
|
10
|
+
from .properties.client import AsyncPropertiesClient, PropertiesClient
|
|
11
|
+
from .raw_client import AsyncRawIdentitiesClient, RawIdentitiesClient
|
|
19
12
|
|
|
20
13
|
# this is used as the default value for optional parameters
|
|
21
14
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -23,8 +16,19 @@ OMIT = typing.cast(typing.Any, ...)
|
|
|
23
16
|
|
|
24
17
|
class IdentitiesClient:
|
|
25
18
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
26
|
-
self.
|
|
27
|
-
self.properties = PropertiesClient(client_wrapper=
|
|
19
|
+
self._raw_client = RawIdentitiesClient(client_wrapper=client_wrapper)
|
|
20
|
+
self.properties = PropertiesClient(client_wrapper=client_wrapper)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def with_raw_response(self) -> RawIdentitiesClient:
|
|
24
|
+
"""
|
|
25
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
26
|
+
|
|
27
|
+
Returns
|
|
28
|
+
-------
|
|
29
|
+
RawIdentitiesClient
|
|
30
|
+
"""
|
|
31
|
+
return self._raw_client
|
|
28
32
|
|
|
29
33
|
def list(
|
|
30
34
|
self,
|
|
@@ -75,43 +79,17 @@ class IdentitiesClient:
|
|
|
75
79
|
)
|
|
76
80
|
client.identities.list()
|
|
77
81
|
"""
|
|
78
|
-
_response = self.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"before": before,
|
|
87
|
-
"after": after,
|
|
88
|
-
"limit": limit,
|
|
89
|
-
},
|
|
82
|
+
_response = self._raw_client.list(
|
|
83
|
+
name=name,
|
|
84
|
+
project_id=project_id,
|
|
85
|
+
identifier_key=identifier_key,
|
|
86
|
+
identity_type=identity_type,
|
|
87
|
+
before=before,
|
|
88
|
+
after=after,
|
|
89
|
+
limit=limit,
|
|
90
90
|
request_options=request_options,
|
|
91
91
|
)
|
|
92
|
-
|
|
93
|
-
if 200 <= _response.status_code < 300:
|
|
94
|
-
return typing.cast(
|
|
95
|
-
typing.List[Identity],
|
|
96
|
-
construct_type(
|
|
97
|
-
type_=typing.List[Identity], # type: ignore
|
|
98
|
-
object_=_response.json(),
|
|
99
|
-
),
|
|
100
|
-
)
|
|
101
|
-
if _response.status_code == 422:
|
|
102
|
-
raise UnprocessableEntityError(
|
|
103
|
-
typing.cast(
|
|
104
|
-
HttpValidationError,
|
|
105
|
-
construct_type(
|
|
106
|
-
type_=HttpValidationError, # type: ignore
|
|
107
|
-
object_=_response.json(),
|
|
108
|
-
),
|
|
109
|
-
)
|
|
110
|
-
)
|
|
111
|
-
_response_json = _response.json()
|
|
112
|
-
except JSONDecodeError:
|
|
113
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
114
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
92
|
+
return _response.data
|
|
115
93
|
|
|
116
94
|
def create(
|
|
117
95
|
self,
|
|
@@ -171,49 +149,17 @@ class IdentitiesClient:
|
|
|
171
149
|
identity_type="org",
|
|
172
150
|
)
|
|
173
151
|
"""
|
|
174
|
-
_response = self.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"agent_ids": agent_ids,
|
|
183
|
-
"block_ids": block_ids,
|
|
184
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
185
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
186
|
-
),
|
|
187
|
-
},
|
|
188
|
-
headers={
|
|
189
|
-
"content-type": "application/json",
|
|
190
|
-
},
|
|
152
|
+
_response = self._raw_client.create(
|
|
153
|
+
identifier_key=identifier_key,
|
|
154
|
+
name=name,
|
|
155
|
+
identity_type=identity_type,
|
|
156
|
+
project_id=project_id,
|
|
157
|
+
agent_ids=agent_ids,
|
|
158
|
+
block_ids=block_ids,
|
|
159
|
+
properties=properties,
|
|
191
160
|
request_options=request_options,
|
|
192
|
-
omit=OMIT,
|
|
193
161
|
)
|
|
194
|
-
|
|
195
|
-
if 200 <= _response.status_code < 300:
|
|
196
|
-
return typing.cast(
|
|
197
|
-
Identity,
|
|
198
|
-
construct_type(
|
|
199
|
-
type_=Identity, # type: ignore
|
|
200
|
-
object_=_response.json(),
|
|
201
|
-
),
|
|
202
|
-
)
|
|
203
|
-
if _response.status_code == 422:
|
|
204
|
-
raise UnprocessableEntityError(
|
|
205
|
-
typing.cast(
|
|
206
|
-
HttpValidationError,
|
|
207
|
-
construct_type(
|
|
208
|
-
type_=HttpValidationError, # type: ignore
|
|
209
|
-
object_=_response.json(),
|
|
210
|
-
),
|
|
211
|
-
)
|
|
212
|
-
)
|
|
213
|
-
_response_json = _response.json()
|
|
214
|
-
except JSONDecodeError:
|
|
215
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
216
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
162
|
+
return _response.data
|
|
217
163
|
|
|
218
164
|
def upsert(
|
|
219
165
|
self,
|
|
@@ -273,49 +219,17 @@ class IdentitiesClient:
|
|
|
273
219
|
identity_type="org",
|
|
274
220
|
)
|
|
275
221
|
"""
|
|
276
|
-
_response = self.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
"agent_ids": agent_ids,
|
|
285
|
-
"block_ids": block_ids,
|
|
286
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
287
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
288
|
-
),
|
|
289
|
-
},
|
|
290
|
-
headers={
|
|
291
|
-
"content-type": "application/json",
|
|
292
|
-
},
|
|
222
|
+
_response = self._raw_client.upsert(
|
|
223
|
+
identifier_key=identifier_key,
|
|
224
|
+
name=name,
|
|
225
|
+
identity_type=identity_type,
|
|
226
|
+
project_id=project_id,
|
|
227
|
+
agent_ids=agent_ids,
|
|
228
|
+
block_ids=block_ids,
|
|
229
|
+
properties=properties,
|
|
293
230
|
request_options=request_options,
|
|
294
|
-
omit=OMIT,
|
|
295
231
|
)
|
|
296
|
-
|
|
297
|
-
if 200 <= _response.status_code < 300:
|
|
298
|
-
return typing.cast(
|
|
299
|
-
Identity,
|
|
300
|
-
construct_type(
|
|
301
|
-
type_=Identity, # type: ignore
|
|
302
|
-
object_=_response.json(),
|
|
303
|
-
),
|
|
304
|
-
)
|
|
305
|
-
if _response.status_code == 422:
|
|
306
|
-
raise UnprocessableEntityError(
|
|
307
|
-
typing.cast(
|
|
308
|
-
HttpValidationError,
|
|
309
|
-
construct_type(
|
|
310
|
-
type_=HttpValidationError, # type: ignore
|
|
311
|
-
object_=_response.json(),
|
|
312
|
-
),
|
|
313
|
-
)
|
|
314
|
-
)
|
|
315
|
-
_response_json = _response.json()
|
|
316
|
-
except JSONDecodeError:
|
|
317
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
318
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
232
|
+
return _response.data
|
|
319
233
|
|
|
320
234
|
def count(self, *, request_options: typing.Optional[RequestOptions] = None) -> int:
|
|
321
235
|
"""
|
|
@@ -341,34 +255,8 @@ class IdentitiesClient:
|
|
|
341
255
|
)
|
|
342
256
|
client.identities.count()
|
|
343
257
|
"""
|
|
344
|
-
_response = self.
|
|
345
|
-
|
|
346
|
-
method="GET",
|
|
347
|
-
request_options=request_options,
|
|
348
|
-
)
|
|
349
|
-
try:
|
|
350
|
-
if 200 <= _response.status_code < 300:
|
|
351
|
-
return typing.cast(
|
|
352
|
-
int,
|
|
353
|
-
construct_type(
|
|
354
|
-
type_=int, # type: ignore
|
|
355
|
-
object_=_response.json(),
|
|
356
|
-
),
|
|
357
|
-
)
|
|
358
|
-
if _response.status_code == 422:
|
|
359
|
-
raise UnprocessableEntityError(
|
|
360
|
-
typing.cast(
|
|
361
|
-
HttpValidationError,
|
|
362
|
-
construct_type(
|
|
363
|
-
type_=HttpValidationError, # type: ignore
|
|
364
|
-
object_=_response.json(),
|
|
365
|
-
),
|
|
366
|
-
)
|
|
367
|
-
)
|
|
368
|
-
_response_json = _response.json()
|
|
369
|
-
except JSONDecodeError:
|
|
370
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
371
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
258
|
+
_response = self._raw_client.count(request_options=request_options)
|
|
259
|
+
return _response.data
|
|
372
260
|
|
|
373
261
|
def retrieve(self, identity_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Identity:
|
|
374
262
|
"""
|
|
@@ -396,34 +284,8 @@ class IdentitiesClient:
|
|
|
396
284
|
identity_id="identity_id",
|
|
397
285
|
)
|
|
398
286
|
"""
|
|
399
|
-
_response = self.
|
|
400
|
-
|
|
401
|
-
method="GET",
|
|
402
|
-
request_options=request_options,
|
|
403
|
-
)
|
|
404
|
-
try:
|
|
405
|
-
if 200 <= _response.status_code < 300:
|
|
406
|
-
return typing.cast(
|
|
407
|
-
Identity,
|
|
408
|
-
construct_type(
|
|
409
|
-
type_=Identity, # type: ignore
|
|
410
|
-
object_=_response.json(),
|
|
411
|
-
),
|
|
412
|
-
)
|
|
413
|
-
if _response.status_code == 422:
|
|
414
|
-
raise UnprocessableEntityError(
|
|
415
|
-
typing.cast(
|
|
416
|
-
HttpValidationError,
|
|
417
|
-
construct_type(
|
|
418
|
-
type_=HttpValidationError, # type: ignore
|
|
419
|
-
object_=_response.json(),
|
|
420
|
-
),
|
|
421
|
-
)
|
|
422
|
-
)
|
|
423
|
-
_response_json = _response.json()
|
|
424
|
-
except JSONDecodeError:
|
|
425
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
426
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
287
|
+
_response = self._raw_client.retrieve(identity_id, request_options=request_options)
|
|
288
|
+
return _response.data
|
|
427
289
|
|
|
428
290
|
def delete(
|
|
429
291
|
self, identity_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -455,34 +317,8 @@ class IdentitiesClient:
|
|
|
455
317
|
identity_id="identity_id",
|
|
456
318
|
)
|
|
457
319
|
"""
|
|
458
|
-
_response = self.
|
|
459
|
-
|
|
460
|
-
method="DELETE",
|
|
461
|
-
request_options=request_options,
|
|
462
|
-
)
|
|
463
|
-
try:
|
|
464
|
-
if 200 <= _response.status_code < 300:
|
|
465
|
-
return typing.cast(
|
|
466
|
-
typing.Optional[typing.Any],
|
|
467
|
-
construct_type(
|
|
468
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
469
|
-
object_=_response.json(),
|
|
470
|
-
),
|
|
471
|
-
)
|
|
472
|
-
if _response.status_code == 422:
|
|
473
|
-
raise UnprocessableEntityError(
|
|
474
|
-
typing.cast(
|
|
475
|
-
HttpValidationError,
|
|
476
|
-
construct_type(
|
|
477
|
-
type_=HttpValidationError, # type: ignore
|
|
478
|
-
object_=_response.json(),
|
|
479
|
-
),
|
|
480
|
-
)
|
|
481
|
-
)
|
|
482
|
-
_response_json = _response.json()
|
|
483
|
-
except JSONDecodeError:
|
|
484
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
485
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
320
|
+
_response = self._raw_client.delete(identity_id, request_options=request_options)
|
|
321
|
+
return _response.data
|
|
486
322
|
|
|
487
323
|
def modify(
|
|
488
324
|
self,
|
|
@@ -539,54 +375,34 @@ class IdentitiesClient:
|
|
|
539
375
|
identity_id="identity_id",
|
|
540
376
|
)
|
|
541
377
|
"""
|
|
542
|
-
_response = self.
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
"block_ids": block_ids,
|
|
551
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
552
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
553
|
-
),
|
|
554
|
-
},
|
|
555
|
-
headers={
|
|
556
|
-
"content-type": "application/json",
|
|
557
|
-
},
|
|
378
|
+
_response = self._raw_client.modify(
|
|
379
|
+
identity_id,
|
|
380
|
+
identifier_key=identifier_key,
|
|
381
|
+
name=name,
|
|
382
|
+
identity_type=identity_type,
|
|
383
|
+
agent_ids=agent_ids,
|
|
384
|
+
block_ids=block_ids,
|
|
385
|
+
properties=properties,
|
|
558
386
|
request_options=request_options,
|
|
559
|
-
omit=OMIT,
|
|
560
387
|
)
|
|
561
|
-
|
|
562
|
-
if 200 <= _response.status_code < 300:
|
|
563
|
-
return typing.cast(
|
|
564
|
-
Identity,
|
|
565
|
-
construct_type(
|
|
566
|
-
type_=Identity, # type: ignore
|
|
567
|
-
object_=_response.json(),
|
|
568
|
-
),
|
|
569
|
-
)
|
|
570
|
-
if _response.status_code == 422:
|
|
571
|
-
raise UnprocessableEntityError(
|
|
572
|
-
typing.cast(
|
|
573
|
-
HttpValidationError,
|
|
574
|
-
construct_type(
|
|
575
|
-
type_=HttpValidationError, # type: ignore
|
|
576
|
-
object_=_response.json(),
|
|
577
|
-
),
|
|
578
|
-
)
|
|
579
|
-
)
|
|
580
|
-
_response_json = _response.json()
|
|
581
|
-
except JSONDecodeError:
|
|
582
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
583
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
388
|
+
return _response.data
|
|
584
389
|
|
|
585
390
|
|
|
586
391
|
class AsyncIdentitiesClient:
|
|
587
392
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
588
|
-
self.
|
|
589
|
-
self.properties = AsyncPropertiesClient(client_wrapper=
|
|
393
|
+
self._raw_client = AsyncRawIdentitiesClient(client_wrapper=client_wrapper)
|
|
394
|
+
self.properties = AsyncPropertiesClient(client_wrapper=client_wrapper)
|
|
395
|
+
|
|
396
|
+
@property
|
|
397
|
+
def with_raw_response(self) -> AsyncRawIdentitiesClient:
|
|
398
|
+
"""
|
|
399
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
400
|
+
|
|
401
|
+
Returns
|
|
402
|
+
-------
|
|
403
|
+
AsyncRawIdentitiesClient
|
|
404
|
+
"""
|
|
405
|
+
return self._raw_client
|
|
590
406
|
|
|
591
407
|
async def list(
|
|
592
408
|
self,
|
|
@@ -645,43 +461,17 @@ class AsyncIdentitiesClient:
|
|
|
645
461
|
|
|
646
462
|
asyncio.run(main())
|
|
647
463
|
"""
|
|
648
|
-
_response = await self.
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
"before": before,
|
|
657
|
-
"after": after,
|
|
658
|
-
"limit": limit,
|
|
659
|
-
},
|
|
464
|
+
_response = await self._raw_client.list(
|
|
465
|
+
name=name,
|
|
466
|
+
project_id=project_id,
|
|
467
|
+
identifier_key=identifier_key,
|
|
468
|
+
identity_type=identity_type,
|
|
469
|
+
before=before,
|
|
470
|
+
after=after,
|
|
471
|
+
limit=limit,
|
|
660
472
|
request_options=request_options,
|
|
661
473
|
)
|
|
662
|
-
|
|
663
|
-
if 200 <= _response.status_code < 300:
|
|
664
|
-
return typing.cast(
|
|
665
|
-
typing.List[Identity],
|
|
666
|
-
construct_type(
|
|
667
|
-
type_=typing.List[Identity], # type: ignore
|
|
668
|
-
object_=_response.json(),
|
|
669
|
-
),
|
|
670
|
-
)
|
|
671
|
-
if _response.status_code == 422:
|
|
672
|
-
raise UnprocessableEntityError(
|
|
673
|
-
typing.cast(
|
|
674
|
-
HttpValidationError,
|
|
675
|
-
construct_type(
|
|
676
|
-
type_=HttpValidationError, # type: ignore
|
|
677
|
-
object_=_response.json(),
|
|
678
|
-
),
|
|
679
|
-
)
|
|
680
|
-
)
|
|
681
|
-
_response_json = _response.json()
|
|
682
|
-
except JSONDecodeError:
|
|
683
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
684
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
474
|
+
return _response.data
|
|
685
475
|
|
|
686
476
|
async def create(
|
|
687
477
|
self,
|
|
@@ -749,49 +539,17 @@ class AsyncIdentitiesClient:
|
|
|
749
539
|
|
|
750
540
|
asyncio.run(main())
|
|
751
541
|
"""
|
|
752
|
-
_response = await self.
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
"agent_ids": agent_ids,
|
|
761
|
-
"block_ids": block_ids,
|
|
762
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
763
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
764
|
-
),
|
|
765
|
-
},
|
|
766
|
-
headers={
|
|
767
|
-
"content-type": "application/json",
|
|
768
|
-
},
|
|
542
|
+
_response = await self._raw_client.create(
|
|
543
|
+
identifier_key=identifier_key,
|
|
544
|
+
name=name,
|
|
545
|
+
identity_type=identity_type,
|
|
546
|
+
project_id=project_id,
|
|
547
|
+
agent_ids=agent_ids,
|
|
548
|
+
block_ids=block_ids,
|
|
549
|
+
properties=properties,
|
|
769
550
|
request_options=request_options,
|
|
770
|
-
omit=OMIT,
|
|
771
551
|
)
|
|
772
|
-
|
|
773
|
-
if 200 <= _response.status_code < 300:
|
|
774
|
-
return typing.cast(
|
|
775
|
-
Identity,
|
|
776
|
-
construct_type(
|
|
777
|
-
type_=Identity, # type: ignore
|
|
778
|
-
object_=_response.json(),
|
|
779
|
-
),
|
|
780
|
-
)
|
|
781
|
-
if _response.status_code == 422:
|
|
782
|
-
raise UnprocessableEntityError(
|
|
783
|
-
typing.cast(
|
|
784
|
-
HttpValidationError,
|
|
785
|
-
construct_type(
|
|
786
|
-
type_=HttpValidationError, # type: ignore
|
|
787
|
-
object_=_response.json(),
|
|
788
|
-
),
|
|
789
|
-
)
|
|
790
|
-
)
|
|
791
|
-
_response_json = _response.json()
|
|
792
|
-
except JSONDecodeError:
|
|
793
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
794
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
552
|
+
return _response.data
|
|
795
553
|
|
|
796
554
|
async def upsert(
|
|
797
555
|
self,
|
|
@@ -859,49 +617,17 @@ class AsyncIdentitiesClient:
|
|
|
859
617
|
|
|
860
618
|
asyncio.run(main())
|
|
861
619
|
"""
|
|
862
|
-
_response = await self.
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
"agent_ids": agent_ids,
|
|
871
|
-
"block_ids": block_ids,
|
|
872
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
873
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
874
|
-
),
|
|
875
|
-
},
|
|
876
|
-
headers={
|
|
877
|
-
"content-type": "application/json",
|
|
878
|
-
},
|
|
620
|
+
_response = await self._raw_client.upsert(
|
|
621
|
+
identifier_key=identifier_key,
|
|
622
|
+
name=name,
|
|
623
|
+
identity_type=identity_type,
|
|
624
|
+
project_id=project_id,
|
|
625
|
+
agent_ids=agent_ids,
|
|
626
|
+
block_ids=block_ids,
|
|
627
|
+
properties=properties,
|
|
879
628
|
request_options=request_options,
|
|
880
|
-
omit=OMIT,
|
|
881
629
|
)
|
|
882
|
-
|
|
883
|
-
if 200 <= _response.status_code < 300:
|
|
884
|
-
return typing.cast(
|
|
885
|
-
Identity,
|
|
886
|
-
construct_type(
|
|
887
|
-
type_=Identity, # type: ignore
|
|
888
|
-
object_=_response.json(),
|
|
889
|
-
),
|
|
890
|
-
)
|
|
891
|
-
if _response.status_code == 422:
|
|
892
|
-
raise UnprocessableEntityError(
|
|
893
|
-
typing.cast(
|
|
894
|
-
HttpValidationError,
|
|
895
|
-
construct_type(
|
|
896
|
-
type_=HttpValidationError, # type: ignore
|
|
897
|
-
object_=_response.json(),
|
|
898
|
-
),
|
|
899
|
-
)
|
|
900
|
-
)
|
|
901
|
-
_response_json = _response.json()
|
|
902
|
-
except JSONDecodeError:
|
|
903
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
904
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
630
|
+
return _response.data
|
|
905
631
|
|
|
906
632
|
async def count(self, *, request_options: typing.Optional[RequestOptions] = None) -> int:
|
|
907
633
|
"""
|
|
@@ -935,34 +661,8 @@ class AsyncIdentitiesClient:
|
|
|
935
661
|
|
|
936
662
|
asyncio.run(main())
|
|
937
663
|
"""
|
|
938
|
-
_response = await self.
|
|
939
|
-
|
|
940
|
-
method="GET",
|
|
941
|
-
request_options=request_options,
|
|
942
|
-
)
|
|
943
|
-
try:
|
|
944
|
-
if 200 <= _response.status_code < 300:
|
|
945
|
-
return typing.cast(
|
|
946
|
-
int,
|
|
947
|
-
construct_type(
|
|
948
|
-
type_=int, # type: ignore
|
|
949
|
-
object_=_response.json(),
|
|
950
|
-
),
|
|
951
|
-
)
|
|
952
|
-
if _response.status_code == 422:
|
|
953
|
-
raise UnprocessableEntityError(
|
|
954
|
-
typing.cast(
|
|
955
|
-
HttpValidationError,
|
|
956
|
-
construct_type(
|
|
957
|
-
type_=HttpValidationError, # type: ignore
|
|
958
|
-
object_=_response.json(),
|
|
959
|
-
),
|
|
960
|
-
)
|
|
961
|
-
)
|
|
962
|
-
_response_json = _response.json()
|
|
963
|
-
except JSONDecodeError:
|
|
964
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
965
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
664
|
+
_response = await self._raw_client.count(request_options=request_options)
|
|
665
|
+
return _response.data
|
|
966
666
|
|
|
967
667
|
async def retrieve(self, identity_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Identity:
|
|
968
668
|
"""
|
|
@@ -998,34 +698,8 @@ class AsyncIdentitiesClient:
|
|
|
998
698
|
|
|
999
699
|
asyncio.run(main())
|
|
1000
700
|
"""
|
|
1001
|
-
_response = await self.
|
|
1002
|
-
|
|
1003
|
-
method="GET",
|
|
1004
|
-
request_options=request_options,
|
|
1005
|
-
)
|
|
1006
|
-
try:
|
|
1007
|
-
if 200 <= _response.status_code < 300:
|
|
1008
|
-
return typing.cast(
|
|
1009
|
-
Identity,
|
|
1010
|
-
construct_type(
|
|
1011
|
-
type_=Identity, # type: ignore
|
|
1012
|
-
object_=_response.json(),
|
|
1013
|
-
),
|
|
1014
|
-
)
|
|
1015
|
-
if _response.status_code == 422:
|
|
1016
|
-
raise UnprocessableEntityError(
|
|
1017
|
-
typing.cast(
|
|
1018
|
-
HttpValidationError,
|
|
1019
|
-
construct_type(
|
|
1020
|
-
type_=HttpValidationError, # type: ignore
|
|
1021
|
-
object_=_response.json(),
|
|
1022
|
-
),
|
|
1023
|
-
)
|
|
1024
|
-
)
|
|
1025
|
-
_response_json = _response.json()
|
|
1026
|
-
except JSONDecodeError:
|
|
1027
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1028
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
701
|
+
_response = await self._raw_client.retrieve(identity_id, request_options=request_options)
|
|
702
|
+
return _response.data
|
|
1029
703
|
|
|
1030
704
|
async def delete(
|
|
1031
705
|
self, identity_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
@@ -1065,34 +739,8 @@ class AsyncIdentitiesClient:
|
|
|
1065
739
|
|
|
1066
740
|
asyncio.run(main())
|
|
1067
741
|
"""
|
|
1068
|
-
_response = await self.
|
|
1069
|
-
|
|
1070
|
-
method="DELETE",
|
|
1071
|
-
request_options=request_options,
|
|
1072
|
-
)
|
|
1073
|
-
try:
|
|
1074
|
-
if 200 <= _response.status_code < 300:
|
|
1075
|
-
return typing.cast(
|
|
1076
|
-
typing.Optional[typing.Any],
|
|
1077
|
-
construct_type(
|
|
1078
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
1079
|
-
object_=_response.json(),
|
|
1080
|
-
),
|
|
1081
|
-
)
|
|
1082
|
-
if _response.status_code == 422:
|
|
1083
|
-
raise UnprocessableEntityError(
|
|
1084
|
-
typing.cast(
|
|
1085
|
-
HttpValidationError,
|
|
1086
|
-
construct_type(
|
|
1087
|
-
type_=HttpValidationError, # type: ignore
|
|
1088
|
-
object_=_response.json(),
|
|
1089
|
-
),
|
|
1090
|
-
)
|
|
1091
|
-
)
|
|
1092
|
-
_response_json = _response.json()
|
|
1093
|
-
except JSONDecodeError:
|
|
1094
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1095
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
742
|
+
_response = await self._raw_client.delete(identity_id, request_options=request_options)
|
|
743
|
+
return _response.data
|
|
1096
744
|
|
|
1097
745
|
async def modify(
|
|
1098
746
|
self,
|
|
@@ -1157,45 +805,14 @@ class AsyncIdentitiesClient:
|
|
|
1157
805
|
|
|
1158
806
|
asyncio.run(main())
|
|
1159
807
|
"""
|
|
1160
|
-
_response = await self.
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
"block_ids": block_ids,
|
|
1169
|
-
"properties": convert_and_respect_annotation_metadata(
|
|
1170
|
-
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
1171
|
-
),
|
|
1172
|
-
},
|
|
1173
|
-
headers={
|
|
1174
|
-
"content-type": "application/json",
|
|
1175
|
-
},
|
|
808
|
+
_response = await self._raw_client.modify(
|
|
809
|
+
identity_id,
|
|
810
|
+
identifier_key=identifier_key,
|
|
811
|
+
name=name,
|
|
812
|
+
identity_type=identity_type,
|
|
813
|
+
agent_ids=agent_ids,
|
|
814
|
+
block_ids=block_ids,
|
|
815
|
+
properties=properties,
|
|
1176
816
|
request_options=request_options,
|
|
1177
|
-
omit=OMIT,
|
|
1178
817
|
)
|
|
1179
|
-
|
|
1180
|
-
if 200 <= _response.status_code < 300:
|
|
1181
|
-
return typing.cast(
|
|
1182
|
-
Identity,
|
|
1183
|
-
construct_type(
|
|
1184
|
-
type_=Identity, # type: ignore
|
|
1185
|
-
object_=_response.json(),
|
|
1186
|
-
),
|
|
1187
|
-
)
|
|
1188
|
-
if _response.status_code == 422:
|
|
1189
|
-
raise UnprocessableEntityError(
|
|
1190
|
-
typing.cast(
|
|
1191
|
-
HttpValidationError,
|
|
1192
|
-
construct_type(
|
|
1193
|
-
type_=HttpValidationError, # type: ignore
|
|
1194
|
-
object_=_response.json(),
|
|
1195
|
-
),
|
|
1196
|
-
)
|
|
1197
|
-
)
|
|
1198
|
-
_response_json = _response.json()
|
|
1199
|
-
except JSONDecodeError:
|
|
1200
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1201
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
818
|
+
return _response.data
|