structifyai 1.138.10__py3-none-any.whl → 1.176.1__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.
- structify/__init__.py +3 -1
- structify/_base_client.py +152 -23
- structify/_client.py +1127 -228
- structify/_compat.py +48 -48
- structify/_models.py +102 -59
- structify/_qs.py +7 -7
- structify/_streaming.py +12 -12
- structify/_types.py +30 -13
- structify/_utils/__init__.py +8 -2
- structify/_utils/_compat.py +45 -0
- structify/_utils/_datetime_parse.py +136 -0
- structify/_utils/_sync.py +3 -31
- structify/_utils/_transform.py +13 -3
- structify/_utils/_typing.py +1 -1
- structify/_utils/_utils.py +5 -6
- structify/_version.py +1 -1
- structify/lib/__init__.py +5 -0
- structify/lib/cost_confirmation.py +63 -0
- structify/pagination.py +63 -1
- structify/resources/__init__.py +114 -28
- structify/resources/admin/__init__.py +53 -39
- structify/resources/admin/admin.py +90 -58
- structify/resources/admin/chat_templates.py +382 -0
- structify/resources/admin/dataset.py +3 -3
- structify/resources/admin/functional_tests.py +600 -0
- structify/resources/admin/jobs.py +86 -13
- structify/resources/admin/sandbox.py +184 -0
- structify/resources/admin/{next_action.py → teams.py} +303 -295
- structify/resources/admin/users.py +71 -166
- structify/resources/chat.py +1197 -226
- structify/resources/code.py +115 -29
- structify/resources/connector_catalog/__init__.py +33 -0
- structify/resources/connector_catalog/admin.py +1510 -0
- structify/resources/connector_catalog/connector_catalog.py +394 -0
- structify/resources/connectors/__init__.py +33 -0
- structify/resources/connectors/connectors.py +2227 -0
- structify/resources/connectors/type_snippets.py +169 -0
- structify/resources/datasets/datasets.py +168 -88
- structify/resources/datasets/evaluate.py +13 -13
- structify/resources/documents.py +46 -140
- structify/resources/entities.py +298 -75
- structify/resources/external.py +99 -0
- structify/resources/external_dataframe_proxy.py +290 -0
- structify/resources/jobs.py +79 -380
- structify/resources/match.py +337 -0
- structify/resources/nango.py +234 -0
- structify/resources/polars.py +382 -180
- structify/resources/projects.py +123 -10
- structify/resources/public_sessions.py +5 -5
- structify/resources/sandbox.py +19 -85
- structify/resources/scrape.py +17 -33
- structify/resources/server.py +3 -3
- structify/resources/sessions.py +711 -164
- structify/resources/slack.py +330 -0
- structify/resources/sources.py +9 -9
- structify/resources/structure.py +172 -100
- structify/resources/teams.py +450 -42
- structify/resources/user/__init__.py +14 -0
- structify/resources/user/api_keys.py +380 -0
- structify/resources/user/stripe.py +97 -6
- structify/resources/user/user.py +228 -60
- structify/resources/whitelabel.py +329 -0
- structify/resources/whitelabel_service.py +222 -0
- structify/resources/{secrets.py → wiki.py} +166 -172
- structify/resources/workflow.py +250 -0
- structify/resources/workflow_schedule.py +194 -34
- structify/types/__init__.py +147 -35
- structify/types/accept_invitation_response.py +13 -0
- structify/types/add_member_response.py +37 -3
- structify/types/admin/__init__.py +34 -85
- structify/types/admin/admin_dataset_return.py +6 -0
- structify/types/admin/{user_get_credits_response.py → admin_delete_jobs_response.py} +3 -3
- structify/types/admin/admin_list_jobs_response.py +35 -1
- structify/types/admin/admin_sandbox.py +38 -0
- structify/types/admin/admin_teams_list_response.py +53 -0
- structify/types/admin/cancel_subscription_response.py +11 -0
- structify/types/admin/chat_template_create_params.py +21 -0
- structify/types/admin/chat_template_list_params.py +12 -0
- structify/types/{secret_list_response.py → admin/chat_template_list_response.py} +3 -3
- structify/types/admin/chat_template_update_params.py +22 -0
- structify/types/admin/create_subscription_response.py +13 -0
- structify/types/admin/{delete_action_training_data_response.py → expire_grants_response.py} +5 -3
- structify/types/admin/extend_trial_response.py +15 -0
- structify/types/admin/functional_test.py +22 -0
- structify/types/{report_step_params.py → admin/functional_test_create_params.py} +6 -5
- structify/types/admin/functional_test_get_results_params.py +14 -0
- structify/types/admin/functional_test_link_chat_params.py +18 -0
- structify/types/admin/functional_test_list_response.py +28 -0
- structify/types/admin/functional_test_results_response.py +23 -0
- structify/types/{report_missing_response.py → admin/functional_test_system_prompt_response.py} +2 -2
- structify/types/admin/functional_test_update_results_params.py +18 -0
- structify/types/admin/grant_credits_response.py +13 -0
- structify/types/admin/impersonate_response.py +17 -0
- structify/types/admin/job_delete_params.py +13 -0
- structify/types/admin/{user_get_credits_params.py → sandbox_list_params.py} +4 -4
- structify/types/admin/sandbox_type.py +7 -0
- structify/types/admin/{training_dataset_delete_params.py → team_cancel_subscription_params.py} +3 -3
- structify/types/admin/team_create_subscription_params.py +25 -0
- structify/types/admin/{user_set_credits_params.py → team_expire_grants_params.py} +4 -4
- structify/types/admin/{training_dataset_list_datums_params.py → team_extend_trial_params.py} +4 -4
- structify/types/admin/team_grant_credits_params.py +25 -0
- structify/types/admin/team_list_params.py +14 -0
- structify/types/admin/user.py +42 -2
- structify/types/admin/user_create_params.py +7 -0
- structify/types/admin/{training_dataset_get_datum_info_params.py → user_impersonate_params.py} +3 -3
- structify/types/admin/user_list_response.py +14 -4
- structify/types/admin_grant_access_response.py +16 -0
- structify/types/{toggle_public_response.py → admin_issue_found_response.py} +3 -3
- structify/types/autofix_context.py +7 -0
- structify/types/chat_add_collaborator_params.py +2 -2
- structify/types/chat_add_git_commit_response.py +2 -0
- structify/types/chat_admin_issue_found_params.py +13 -0
- structify/types/chat_copy_node_output_by_code_hash_params.py +1 -2
- structify/types/chat_copy_params.py +20 -0
- structify/types/chat_create_session_params.py +48 -5
- structify/types/{admin/training_dataset_add_datum_params.py → chat_delete_files_params.py} +4 -4
- structify/types/{get_project_response.py → chat_delete_files_response.py} +3 -4
- structify/types/chat_dependency.py +17 -0
- structify/types/chat_event.py +166 -0
- structify/types/chat_get_git_commit_response.py +2 -0
- structify/types/{admin/human_llm_get_jobs_response.py → chat_get_partial_chats_response.py} +3 -3
- structify/types/chat_get_session_timeline_response.py +36 -2
- structify/types/chat_grant_admin_override_params.py +16 -0
- structify/types/chat_list_sessions_params.py +7 -1
- structify/types/chat_list_templates_response.py +10 -0
- structify/types/{admin/training_dataset_download_datum_params.py → chat_load_files_params.py} +5 -4
- structify/types/chat_load_files_response.py +13 -0
- structify/types/chat_prompt.py +9 -28
- structify/types/chat_revert_to_commit_params.py +12 -0
- structify/types/chat_revert_to_commit_response.py +17 -0
- structify/types/chat_session.py +31 -2
- structify/types/chat_session_role.py +1 -1
- structify/types/chat_session_with_messages.py +43 -5
- structify/types/chat_template.py +31 -0
- structify/types/{admin/training_dataset_remove_datum_params.py → chat_update_session_favorite_params.py} +3 -3
- structify/types/chat_update_session_params.py +4 -2
- structify/types/chat_update_visibility_params.py +13 -0
- structify/types/chat_visibility.py +7 -0
- structify/types/code_generate_code_params.py +48 -10
- structify/types/code_interrupt_generation_params.py +13 -0
- structify/types/connector.py +50 -0
- structify/types/connector_auth_method.py +29 -0
- structify/types/connector_auth_method_with_fields.py +15 -0
- structify/types/connector_catalog/__init__.py +32 -0
- structify/types/connector_catalog/admin_batch_create_credential_fields_params.py +14 -0
- structify/types/connector_catalog/admin_batch_create_credential_fields_response.py +10 -0
- structify/types/connector_catalog/admin_batch_create_scopes_params.py +14 -0
- structify/types/connector_catalog/admin_create_auth_method_params.py +22 -0
- structify/types/connector_catalog/admin_create_catalog_params.py +22 -0
- structify/types/connector_catalog/admin_create_credential_field_params.py +28 -0
- structify/types/connector_catalog/admin_create_scope_params.py +19 -0
- structify/types/connector_catalog/admin_list_nango_pending_response.py +10 -0
- structify/types/{chat_add_message_params.py → connector_catalog/admin_list_scopes_params.py} +3 -5
- structify/types/connector_catalog/admin_update_auth_method_params.py +16 -0
- structify/types/connector_catalog/admin_update_catalog_params.py +20 -0
- structify/types/connector_catalog/admin_update_credential_field_params.py +26 -0
- structify/types/connector_catalog/admin_update_scope_params.py +18 -0
- structify/types/{admin/human_llm_get_next_step_params.py → connector_catalog/admin_upload_logo_params.py} +4 -4
- structify/types/connector_catalog/batch_create_scopes_response.py +12 -0
- structify/types/connector_catalog/connector_auth_method_scope.py +25 -0
- structify/types/connector_catalog/connector_catalog.py +26 -0
- structify/types/connector_catalog/create_credential_field_request_param.py +28 -0
- structify/types/connector_catalog/create_scope_request_param.py +19 -0
- structify/types/connector_catalog/list_scopes_response.py +12 -0
- structify/types/connector_catalog/pending_nango_integration.py +17 -0
- structify/types/{admin/user_set_credits_response.py → connector_catalog/upload_logo_response.py} +3 -3
- structify/types/connector_catalog_list_params.py +20 -0
- structify/types/connector_catalog_list_response.py +22 -0
- structify/types/connector_catalog_with_methods.py +15 -0
- structify/types/connector_category.py +7 -0
- structify/types/connector_create_params.py +36 -0
- structify/types/{secret_create_params.py → connector_create_secret_params.py} +2 -2
- structify/types/connector_credential_field.py +34 -0
- structify/types/connector_delete_schema_object_params.py +35 -0
- structify/types/connector_explore_params.py +19 -0
- structify/types/connector_explorer_chat.py +34 -0
- structify/types/connector_get_clarification_requests_response.py +36 -0
- structify/types/connector_get_explorer_chat_params.py +12 -0
- structify/types/connector_get_response.py +25 -0
- structify/types/connector_list_params.py +16 -0
- structify/types/connector_list_with_snippets_params.py +12 -0
- structify/types/connector_list_with_snippets_response.py +10 -0
- structify/types/connector_search_tables_params.py +15 -0
- structify/types/connector_search_tables_response.py +160 -0
- structify/types/connector_store_response.py +21 -0
- structify/types/connector_summaries_params.py +15 -0
- structify/types/connector_summaries_response.py +10 -0
- structify/types/connector_summary.py +16 -0
- structify/types/connector_table_info.py +15 -0
- structify/types/connector_update_column_params.py +12 -0
- structify/types/connector_update_params.py +20 -0
- structify/types/connector_update_table_params.py +14 -0
- structify/types/connector_with_secrets.py +25 -0
- structify/types/connector_with_snippets.py +11 -0
- structify/types/connectors/__init__.py +6 -0
- structify/types/connectors/snippet.py +20 -0
- structify/types/connectors/type_snippet_upsert_params.py +12 -0
- structify/types/create_chat_session_response.py +2 -0
- structify/types/create_match_jobs_response.py +15 -0
- structify/types/dashboard_component.py +17 -0
- structify/types/{report_relationship_params.py → dashboard_component_param.py} +6 -6
- structify/types/dashboard_layout.py +16 -0
- structify/types/dashboard_layout_param.py +18 -0
- structify/types/dataset_count_missing_embeddings_params.py +11 -0
- structify/types/dataset_count_missing_embeddings_response.py +9 -0
- structify/types/dataset_create_params.py +0 -2
- structify/types/dataset_descriptor.py +6 -0
- structify/types/dataset_descriptor_param.py +6 -0
- structify/types/dataset_get_response.py +6 -0
- structify/types/dataset_list_response.py +6 -0
- structify/types/dataset_reorder_properties_params.py +3 -2
- structify/types/dataset_view_table_response.py +3 -1
- structify/types/delete_chat_session_response.py +2 -0
- structify/types/delete_schema_object_request_param.py +35 -0
- structify/types/delete_schema_object_response.py +13 -0
- structify/types/document_list_params.py +2 -0
- structify/types/document_list_response.py +2 -0
- structify/types/document_upload_params.py +2 -0
- structify/types/edge_spec_param.py +13 -0
- structify/types/entity_agent_merge_params.py +3 -2
- structify/types/entity_derive_all_params.py +20 -0
- structify/types/{admin/training_dataset_list_response.py → entity_derive_all_response.py} +2 -2
- structify/types/entity_get_source_entities_response.py +0 -2
- structify/types/entity_list_jobs_response.py +3 -3
- structify/types/entity_summarize_params.py +5 -3
- structify/types/entity_upload_parquet_params.py +17 -0
- structify/types/entity_view_response.py +0 -2
- structify/types/estimate_cost_response.py +9 -0
- structify/types/exploration_phase_id.py +79 -0
- structify/types/{project_secret_summary.py → exploration_run.py} +3 -7
- structify/types/exploration_runs_response.py +12 -0
- structify/types/exploration_status.py +7 -0
- structify/types/explore_status_response.py +17 -0
- structify/types/explorer_chat_response.py +12 -0
- structify/types/finalize_dag_response.py +11 -0
- structify/types/get_chat_session_response.py +77 -3
- structify/types/get_dependencies_response.py +15 -0
- structify/types/get_job_events_response.py +20 -0
- structify/types/get_node_logs_response.py +12 -0
- structify/types/get_node_response.py +10 -0
- structify/types/get_team_response.py +3 -0
- structify/types/invitation_details_response.py +13 -0
- structify/types/job_cancel_response.py +3 -3
- structify/types/job_event_body.py +206 -0
- structify/types/job_get_source_entities_response.py +0 -2
- structify/types/job_list_params.py +4 -1
- structify/types/job_list_response.py +35 -1
- structify/types/job_status_params.py +6 -2
- structify/types/knowledge_graph.py +8 -2
- structify/types/knowledge_graph_param.py +7 -1
- structify/types/list_chat_sessions_response.py +10 -1
- structify/types/list_collaborators_response.py +4 -0
- structify/types/list_members_response.py +16 -3
- structify/types/list_tables_response.py +12 -0
- structify/types/llm_information_store.py +87 -0
- structify/types/match_create_jobs_params.py +24 -0
- structify/types/match_list_results_params.py +21 -0
- structify/types/match_result.py +28 -0
- structify/types/merge_config.py +2 -0
- structify/types/merge_config_param.py +2 -0
- structify/types/message.py +36 -0
- structify/types/nango_create_session_params.py +21 -0
- structify/types/nango_create_session_response.py +15 -0
- structify/types/nango_list_integrations_response.py +28 -0
- structify/types/{session_create_node_params.py → node_spec_param.py} +6 -3
- structify/types/project.py +3 -0
- structify/types/project_collaborator_input_param.py +15 -0
- structify/types/project_get_response.py +12 -0
- structify/types/{get_secret_response.py → project_member.py} +7 -4
- structify/types/project_update_params.py +23 -0
- structify/types/project_visibility.py +7 -0
- structify/types/property_type_param.py +3 -2
- structify/types/refresh_session_response.py +15 -0
- structify/types/sandbox.py +8 -2
- structify/types/sandbox_get_params.py +2 -1
- structify/types/save_requirement_param.py +4 -2
- structify/types/scrape_list_params.py +1 -22
- structify/types/scrape_list_response.py +2 -0
- structify/types/scrape_scrape_params.py +1 -14
- structify/types/scrape_scrape_response.py +2 -0
- structify/types/select_team_response.py +13 -0
- structify/types/session_confirm_node_params.py +11 -0
- structify/types/session_finalize_dag_params.py +20 -0
- structify/types/session_get_events_params.py +8 -3
- structify/types/session_get_events_response.py +43 -0
- structify/types/session_get_node_progress_response.py +17 -3
- structify/types/{admin/human_llm_start_next_job_params.py → session_kill_jobs_params.py} +3 -3
- structify/types/session_kill_jobs_response.py +13 -0
- structify/types/session_mark_errored_params.py +6 -0
- structify/types/session_request_confirmation_params.py +13 -0
- structify/types/session_update_node_progress_params.py +8 -2
- structify/types/session_upload_dashboard_layout_params.py +13 -0
- structify/types/session_upload_node_output_data_params.py +3 -0
- structify/types/session_upload_node_visualization_output_params.py +12 -0
- structify/types/slack_api_response.py +21 -0
- structify/types/slack_event_payload_param.py +77 -0
- structify/types/slack_events_params.py +77 -0
- structify/types/source_list_response.py +0 -2
- structify/types/structure_enhance_property_params.py +8 -21
- structify/types/structure_enhance_relationship_params.py +8 -21
- structify/types/structure_find_relationship_params.py +7 -21
- structify/types/structure_is_complete_params.py +3 -2
- structify/types/structure_job_status_params.py +4 -2
- structify/types/structure_pdf_params.py +22 -0
- structify/types/structure_pdf_response.py +11 -0
- structify/types/structure_run_async_params.py +15 -21
- structify/types/table.py +2 -0
- structify/types/table_param.py +2 -0
- structify/types/team.py +16 -2
- structify/types/team_accept_invitation_params.py +11 -0
- structify/types/team_add_member_params.py +2 -2
- structify/types/team_create_link_code_params.py +11 -0
- structify/types/team_role.py +1 -1
- structify/types/team_subscription_status.py +24 -0
- structify/types/team_update_member_role_params.py +15 -0
- structify/types/team_update_params.py +10 -0
- structify/types/team_wiki_page.py +28 -0
- structify/types/team_with_role.py +3 -0
- structify/types/{update_secret_response.py → teams_link_code_response.py} +4 -4
- structify/types/token_response.py +6 -2
- structify/types/tool_invocation.py +468 -0
- structify/types/tool_result.py +99 -0
- structify/types/update_member_role_response.py +9 -0
- structify/types/update_table_response.py +46 -0
- structify/types/update_visibility_response.py +10 -0
- structify/types/usage_group_key.py +14 -1
- structify/types/user/__init__.py +5 -0
- structify/types/{admin/training_dataset_size_params.py → user/api_key_create_params.py} +5 -5
- structify/types/user/api_key_info.py +24 -0
- structify/types/user/create_api_key_response.py +12 -0
- structify/types/user/list_api_keys_response.py +12 -0
- structify/types/{admin/human_llm_add_search_for_job_params.py → user/stripe_create_portal_session_params.py} +4 -4
- structify/types/user/subscription_plan.py +1 -1
- structify/types/{chat_toggle_public_params.py → user_enrich_params.py} +3 -3
- structify/types/user_info.py +31 -1
- structify/types/user_refresh_params.py +13 -0
- structify/types/user_transactions_response.py +5 -1
- structify/types/user_update_params.py +61 -13
- structify/types/user_usage_response.py +0 -2
- structify/types/wiki_connector_reference.py +63 -0
- structify/types/wiki_create_params.py +16 -0
- structify/types/{job_get_steps_response.py → wiki_list_response.py} +3 -3
- structify/types/wiki_page_with_references.py +12 -0
- structify/types/wiki_update_params.py +16 -0
- structify/types/workflow_dag.py +10 -0
- structify/types/workflow_node_execution_status.py +3 -1
- structify/types/{user_team.py → workflow_node_log.py} +6 -7
- structify/types/workflow_run_params.py +13 -0
- structify/types/workflow_schedule_create_params.py +2 -2
- structify/types/workflow_schedule_info.py +4 -2
- structify/types/workflow_schedule_pause_params.py +11 -0
- structify/types/workflow_schedule_update_params.py +2 -0
- structify/types/workflow_session.py +8 -0
- structify/types/workflow_session_node.py +16 -0
- structify/types/workflow_stop_params.py +11 -0
- {structifyai-1.138.10.dist-info → structifyai-1.176.1.dist-info}/METADATA +73 -194
- structifyai-1.176.1.dist-info/RECORD +496 -0
- {structifyai-1.138.10.dist-info → structifyai-1.176.1.dist-info}/licenses/LICENSE +1 -1
- structify/resources/admin/human_llm.py +0 -819
- structify/resources/admin/training_datasets.py +0 -2028
- structify/resources/report.py +0 -494
- structify/types/add_chat_message_response.py +0 -25
- structify/types/admin/action_training_data_entry.py +0 -219
- structify/types/admin/action_training_data_response.py +0 -12
- structify/types/admin/datum_status.py +0 -19
- structify/types/admin/human_llm_add_to_dataset_params.py +0 -186
- structify/types/admin/human_llm_finish_job_params.py +0 -13
- structify/types/admin/human_llm_get_jobs_params.py +0 -12
- structify/types/admin/human_llm_get_next_step_response.py +0 -196
- structify/types/admin/human_llm_job.py +0 -73
- structify/types/admin/human_llm_prelabel_step_response.py +0 -184
- structify/types/admin/human_llm_update_step_params.py +0 -186
- structify/types/admin/labeling_stats.py +0 -24
- structify/types/admin/next_action_add_training_datum_params.py +0 -203
- structify/types/admin/next_action_delete_training_data_params.py +0 -12
- structify/types/admin/next_action_get_batched_training_data_params.py +0 -12
- structify/types/admin/next_action_get_training_data_params.py +0 -25
- structify/types/admin/next_action_get_training_datum_params.py +0 -12
- structify/types/admin/next_action_label_training_datum_params.py +0 -90
- structify/types/admin/step_choices.py +0 -32
- structify/types/admin/training_dataset_add_params.py +0 -12
- structify/types/admin/training_dataset_get_labeller_stats_params.py +0 -23
- structify/types/admin/training_dataset_get_labeller_stats_response.py +0 -10
- structify/types/admin/training_dataset_get_next_for_labeling_params.py +0 -15
- structify/types/admin/training_dataset_get_next_for_qa_params.py +0 -18
- structify/types/admin/training_dataset_get_next_suspicious_params.py +0 -23
- structify/types/admin/training_dataset_label_datum_params.py +0 -188
- structify/types/admin/training_dataset_list_datums_response.py +0 -33
- structify/types/admin/training_dataset_mark_datum_suspicious_params.py +0 -19
- structify/types/admin/training_dataset_size_response.py +0 -37
- structify/types/admin/training_dataset_suspicious_count_params.py +0 -23
- structify/types/admin/training_dataset_suspicious_count_response.py +0 -9
- structify/types/admin/training_dataset_switch_dataset_params.py +0 -13
- structify/types/admin/training_dataset_update_datum_status_params.py +0 -18
- structify/types/admin/training_dataset_upload_labeled_step_params.py +0 -15
- structify/types/admin/training_dataset_verify_datum_params.py +0 -17
- structify/types/admin/training_datum_response.py +0 -405
- structify/types/chat_prompt_param.py +0 -274
- structify/types/create_project_response.py +0 -10
- structify/types/document_structure_params.py +0 -21
- structify/types/document_structure_response.py +0 -8
- structify/types/execution_step.py +0 -198
- structify/types/get_session_events_response.py +0 -26
- structify/types/job_delete_response.py +0 -7
- structify/types/job_get_response.py +0 -62
- structify/types/job_get_step_graph_response.py +0 -233
- structify/types/job_get_step_response.py +0 -196
- structify/types/report_missing_params.py +0 -18
- structify/types/report_relationship_response.py +0 -7
- structify/types/report_step_response.py +0 -7
- structify/types/report_wrong_params.py +0 -18
- structify/types/report_wrong_response.py +0 -7
- structify/types/secret_update_params.py +0 -14
- structify/types/session_create_edge_params.py +0 -13
- structify/types/tool_metadata_param.py +0 -17
- structify/types/workflow_schedule_get_response.py +0 -10
- structifyai-1.138.10.dist-info/RECORD +0 -370
- {structifyai-1.138.10.dist-info → structifyai-1.176.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import httpx
|
|
8
|
+
|
|
9
|
+
from .admin import (
|
|
10
|
+
AdminResource,
|
|
11
|
+
AsyncAdminResource,
|
|
12
|
+
AdminResourceWithRawResponse,
|
|
13
|
+
AsyncAdminResourceWithRawResponse,
|
|
14
|
+
AdminResourceWithStreamingResponse,
|
|
15
|
+
AsyncAdminResourceWithStreamingResponse,
|
|
16
|
+
)
|
|
17
|
+
from ...types import connector_catalog_list_params
|
|
18
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
19
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
20
|
+
from ..._compat import cached_property
|
|
21
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
+
from ..._response import (
|
|
23
|
+
BinaryAPIResponse,
|
|
24
|
+
AsyncBinaryAPIResponse,
|
|
25
|
+
StreamedBinaryAPIResponse,
|
|
26
|
+
AsyncStreamedBinaryAPIResponse,
|
|
27
|
+
to_raw_response_wrapper,
|
|
28
|
+
to_streamed_response_wrapper,
|
|
29
|
+
async_to_raw_response_wrapper,
|
|
30
|
+
to_custom_raw_response_wrapper,
|
|
31
|
+
async_to_streamed_response_wrapper,
|
|
32
|
+
to_custom_streamed_response_wrapper,
|
|
33
|
+
async_to_custom_raw_response_wrapper,
|
|
34
|
+
async_to_custom_streamed_response_wrapper,
|
|
35
|
+
)
|
|
36
|
+
from ..._base_client import make_request_options
|
|
37
|
+
from ...types.connector_catalog_with_methods import ConnectorCatalogWithMethods
|
|
38
|
+
from ...types.connector_catalog_list_response import ConnectorCatalogListResponse
|
|
39
|
+
|
|
40
|
+
__all__ = ["ConnectorCatalogResource", "AsyncConnectorCatalogResource"]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class ConnectorCatalogResource(SyncAPIResource):
|
|
44
|
+
@cached_property
|
|
45
|
+
def admin(self) -> AdminResource:
|
|
46
|
+
return AdminResource(self._client)
|
|
47
|
+
|
|
48
|
+
@cached_property
|
|
49
|
+
def with_raw_response(self) -> ConnectorCatalogResourceWithRawResponse:
|
|
50
|
+
"""
|
|
51
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
52
|
+
the raw response object instead of the parsed content.
|
|
53
|
+
|
|
54
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
|
|
55
|
+
"""
|
|
56
|
+
return ConnectorCatalogResourceWithRawResponse(self)
|
|
57
|
+
|
|
58
|
+
@cached_property
|
|
59
|
+
def with_streaming_response(self) -> ConnectorCatalogResourceWithStreamingResponse:
|
|
60
|
+
"""
|
|
61
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
62
|
+
|
|
63
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
|
|
64
|
+
"""
|
|
65
|
+
return ConnectorCatalogResourceWithStreamingResponse(self)
|
|
66
|
+
|
|
67
|
+
def list(
|
|
68
|
+
self,
|
|
69
|
+
*,
|
|
70
|
+
limit: int | Omit = omit,
|
|
71
|
+
offset: int | Omit = omit,
|
|
72
|
+
search: Optional[str] | Omit = omit,
|
|
73
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
74
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
75
|
+
extra_headers: Headers | None = None,
|
|
76
|
+
extra_query: Query | None = None,
|
|
77
|
+
extra_body: Body | None = None,
|
|
78
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
79
|
+
) -> ConnectorCatalogListResponse:
|
|
80
|
+
"""
|
|
81
|
+
List all connector catalog entries with their active auth methods and logos
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
search: Optional search query to filter by name, slug, or category (case-insensitive
|
|
85
|
+
substring match)
|
|
86
|
+
|
|
87
|
+
extra_headers: Send extra headers
|
|
88
|
+
|
|
89
|
+
extra_query: Add additional query parameters to the request
|
|
90
|
+
|
|
91
|
+
extra_body: Add additional JSON properties to the request
|
|
92
|
+
|
|
93
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
94
|
+
"""
|
|
95
|
+
return self._get(
|
|
96
|
+
"/connector-catalog",
|
|
97
|
+
options=make_request_options(
|
|
98
|
+
extra_headers=extra_headers,
|
|
99
|
+
extra_query=extra_query,
|
|
100
|
+
extra_body=extra_body,
|
|
101
|
+
timeout=timeout,
|
|
102
|
+
query=maybe_transform(
|
|
103
|
+
{
|
|
104
|
+
"limit": limit,
|
|
105
|
+
"offset": offset,
|
|
106
|
+
"search": search,
|
|
107
|
+
},
|
|
108
|
+
connector_catalog_list_params.ConnectorCatalogListParams,
|
|
109
|
+
),
|
|
110
|
+
),
|
|
111
|
+
cast_to=ConnectorCatalogListResponse,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def get(
|
|
115
|
+
self,
|
|
116
|
+
slug: str,
|
|
117
|
+
*,
|
|
118
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
119
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
120
|
+
extra_headers: Headers | None = None,
|
|
121
|
+
extra_query: Query | None = None,
|
|
122
|
+
extra_body: Body | None = None,
|
|
123
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
124
|
+
) -> ConnectorCatalogWithMethods:
|
|
125
|
+
"""
|
|
126
|
+
Get a connector catalog entry by slug with its active auth methods
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
extra_headers: Send extra headers
|
|
130
|
+
|
|
131
|
+
extra_query: Add additional query parameters to the request
|
|
132
|
+
|
|
133
|
+
extra_body: Add additional JSON properties to the request
|
|
134
|
+
|
|
135
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
136
|
+
"""
|
|
137
|
+
if not slug:
|
|
138
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
139
|
+
return self._get(
|
|
140
|
+
f"/connector-catalog/{slug}",
|
|
141
|
+
options=make_request_options(
|
|
142
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
143
|
+
),
|
|
144
|
+
cast_to=ConnectorCatalogWithMethods,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
def get_logo(
|
|
148
|
+
self,
|
|
149
|
+
slug: str,
|
|
150
|
+
*,
|
|
151
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
152
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
153
|
+
extra_headers: Headers | None = None,
|
|
154
|
+
extra_query: Query | None = None,
|
|
155
|
+
extra_body: Body | None = None,
|
|
156
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
157
|
+
) -> BinaryAPIResponse:
|
|
158
|
+
"""
|
|
159
|
+
Args:
|
|
160
|
+
extra_headers: Send extra headers
|
|
161
|
+
|
|
162
|
+
extra_query: Add additional query parameters to the request
|
|
163
|
+
|
|
164
|
+
extra_body: Add additional JSON properties to the request
|
|
165
|
+
|
|
166
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
167
|
+
"""
|
|
168
|
+
if not slug:
|
|
169
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
170
|
+
extra_headers = {"Accept": "application/octet-stream", **(extra_headers or {})}
|
|
171
|
+
return self._get(
|
|
172
|
+
f"/connector-catalog/{slug}/logo",
|
|
173
|
+
options=make_request_options(
|
|
174
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
175
|
+
),
|
|
176
|
+
cast_to=BinaryAPIResponse,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
class AsyncConnectorCatalogResource(AsyncAPIResource):
|
|
181
|
+
@cached_property
|
|
182
|
+
def admin(self) -> AsyncAdminResource:
|
|
183
|
+
return AsyncAdminResource(self._client)
|
|
184
|
+
|
|
185
|
+
@cached_property
|
|
186
|
+
def with_raw_response(self) -> AsyncConnectorCatalogResourceWithRawResponse:
|
|
187
|
+
"""
|
|
188
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
189
|
+
the raw response object instead of the parsed content.
|
|
190
|
+
|
|
191
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#accessing-raw-response-data-eg-headers
|
|
192
|
+
"""
|
|
193
|
+
return AsyncConnectorCatalogResourceWithRawResponse(self)
|
|
194
|
+
|
|
195
|
+
@cached_property
|
|
196
|
+
def with_streaming_response(self) -> AsyncConnectorCatalogResourceWithStreamingResponse:
|
|
197
|
+
"""
|
|
198
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
199
|
+
|
|
200
|
+
For more information, see https://www.github.com/StructifyAI/structify-python#with_streaming_response
|
|
201
|
+
"""
|
|
202
|
+
return AsyncConnectorCatalogResourceWithStreamingResponse(self)
|
|
203
|
+
|
|
204
|
+
async def list(
|
|
205
|
+
self,
|
|
206
|
+
*,
|
|
207
|
+
limit: int | Omit = omit,
|
|
208
|
+
offset: int | Omit = omit,
|
|
209
|
+
search: Optional[str] | Omit = omit,
|
|
210
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
211
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
212
|
+
extra_headers: Headers | None = None,
|
|
213
|
+
extra_query: Query | None = None,
|
|
214
|
+
extra_body: Body | None = None,
|
|
215
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
216
|
+
) -> ConnectorCatalogListResponse:
|
|
217
|
+
"""
|
|
218
|
+
List all connector catalog entries with their active auth methods and logos
|
|
219
|
+
|
|
220
|
+
Args:
|
|
221
|
+
search: Optional search query to filter by name, slug, or category (case-insensitive
|
|
222
|
+
substring match)
|
|
223
|
+
|
|
224
|
+
extra_headers: Send extra headers
|
|
225
|
+
|
|
226
|
+
extra_query: Add additional query parameters to the request
|
|
227
|
+
|
|
228
|
+
extra_body: Add additional JSON properties to the request
|
|
229
|
+
|
|
230
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
231
|
+
"""
|
|
232
|
+
return await self._get(
|
|
233
|
+
"/connector-catalog",
|
|
234
|
+
options=make_request_options(
|
|
235
|
+
extra_headers=extra_headers,
|
|
236
|
+
extra_query=extra_query,
|
|
237
|
+
extra_body=extra_body,
|
|
238
|
+
timeout=timeout,
|
|
239
|
+
query=await async_maybe_transform(
|
|
240
|
+
{
|
|
241
|
+
"limit": limit,
|
|
242
|
+
"offset": offset,
|
|
243
|
+
"search": search,
|
|
244
|
+
},
|
|
245
|
+
connector_catalog_list_params.ConnectorCatalogListParams,
|
|
246
|
+
),
|
|
247
|
+
),
|
|
248
|
+
cast_to=ConnectorCatalogListResponse,
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
async def get(
|
|
252
|
+
self,
|
|
253
|
+
slug: str,
|
|
254
|
+
*,
|
|
255
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
256
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
257
|
+
extra_headers: Headers | None = None,
|
|
258
|
+
extra_query: Query | None = None,
|
|
259
|
+
extra_body: Body | None = None,
|
|
260
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
261
|
+
) -> ConnectorCatalogWithMethods:
|
|
262
|
+
"""
|
|
263
|
+
Get a connector catalog entry by slug with its active auth methods
|
|
264
|
+
|
|
265
|
+
Args:
|
|
266
|
+
extra_headers: Send extra headers
|
|
267
|
+
|
|
268
|
+
extra_query: Add additional query parameters to the request
|
|
269
|
+
|
|
270
|
+
extra_body: Add additional JSON properties to the request
|
|
271
|
+
|
|
272
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
273
|
+
"""
|
|
274
|
+
if not slug:
|
|
275
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
276
|
+
return await self._get(
|
|
277
|
+
f"/connector-catalog/{slug}",
|
|
278
|
+
options=make_request_options(
|
|
279
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
280
|
+
),
|
|
281
|
+
cast_to=ConnectorCatalogWithMethods,
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
async def get_logo(
|
|
285
|
+
self,
|
|
286
|
+
slug: str,
|
|
287
|
+
*,
|
|
288
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
289
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
290
|
+
extra_headers: Headers | None = None,
|
|
291
|
+
extra_query: Query | None = None,
|
|
292
|
+
extra_body: Body | None = None,
|
|
293
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
294
|
+
) -> AsyncBinaryAPIResponse:
|
|
295
|
+
"""
|
|
296
|
+
Args:
|
|
297
|
+
extra_headers: Send extra headers
|
|
298
|
+
|
|
299
|
+
extra_query: Add additional query parameters to the request
|
|
300
|
+
|
|
301
|
+
extra_body: Add additional JSON properties to the request
|
|
302
|
+
|
|
303
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
304
|
+
"""
|
|
305
|
+
if not slug:
|
|
306
|
+
raise ValueError(f"Expected a non-empty value for `slug` but received {slug!r}")
|
|
307
|
+
extra_headers = {"Accept": "application/octet-stream", **(extra_headers or {})}
|
|
308
|
+
return await self._get(
|
|
309
|
+
f"/connector-catalog/{slug}/logo",
|
|
310
|
+
options=make_request_options(
|
|
311
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
312
|
+
),
|
|
313
|
+
cast_to=AsyncBinaryAPIResponse,
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
class ConnectorCatalogResourceWithRawResponse:
|
|
318
|
+
def __init__(self, connector_catalog: ConnectorCatalogResource) -> None:
|
|
319
|
+
self._connector_catalog = connector_catalog
|
|
320
|
+
|
|
321
|
+
self.list = to_raw_response_wrapper(
|
|
322
|
+
connector_catalog.list,
|
|
323
|
+
)
|
|
324
|
+
self.get = to_raw_response_wrapper(
|
|
325
|
+
connector_catalog.get,
|
|
326
|
+
)
|
|
327
|
+
self.get_logo = to_custom_raw_response_wrapper(
|
|
328
|
+
connector_catalog.get_logo,
|
|
329
|
+
BinaryAPIResponse,
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
@cached_property
|
|
333
|
+
def admin(self) -> AdminResourceWithRawResponse:
|
|
334
|
+
return AdminResourceWithRawResponse(self._connector_catalog.admin)
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class AsyncConnectorCatalogResourceWithRawResponse:
|
|
338
|
+
def __init__(self, connector_catalog: AsyncConnectorCatalogResource) -> None:
|
|
339
|
+
self._connector_catalog = connector_catalog
|
|
340
|
+
|
|
341
|
+
self.list = async_to_raw_response_wrapper(
|
|
342
|
+
connector_catalog.list,
|
|
343
|
+
)
|
|
344
|
+
self.get = async_to_raw_response_wrapper(
|
|
345
|
+
connector_catalog.get,
|
|
346
|
+
)
|
|
347
|
+
self.get_logo = async_to_custom_raw_response_wrapper(
|
|
348
|
+
connector_catalog.get_logo,
|
|
349
|
+
AsyncBinaryAPIResponse,
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
@cached_property
|
|
353
|
+
def admin(self) -> AsyncAdminResourceWithRawResponse:
|
|
354
|
+
return AsyncAdminResourceWithRawResponse(self._connector_catalog.admin)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
class ConnectorCatalogResourceWithStreamingResponse:
|
|
358
|
+
def __init__(self, connector_catalog: ConnectorCatalogResource) -> None:
|
|
359
|
+
self._connector_catalog = connector_catalog
|
|
360
|
+
|
|
361
|
+
self.list = to_streamed_response_wrapper(
|
|
362
|
+
connector_catalog.list,
|
|
363
|
+
)
|
|
364
|
+
self.get = to_streamed_response_wrapper(
|
|
365
|
+
connector_catalog.get,
|
|
366
|
+
)
|
|
367
|
+
self.get_logo = to_custom_streamed_response_wrapper(
|
|
368
|
+
connector_catalog.get_logo,
|
|
369
|
+
StreamedBinaryAPIResponse,
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
@cached_property
|
|
373
|
+
def admin(self) -> AdminResourceWithStreamingResponse:
|
|
374
|
+
return AdminResourceWithStreamingResponse(self._connector_catalog.admin)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
class AsyncConnectorCatalogResourceWithStreamingResponse:
|
|
378
|
+
def __init__(self, connector_catalog: AsyncConnectorCatalogResource) -> None:
|
|
379
|
+
self._connector_catalog = connector_catalog
|
|
380
|
+
|
|
381
|
+
self.list = async_to_streamed_response_wrapper(
|
|
382
|
+
connector_catalog.list,
|
|
383
|
+
)
|
|
384
|
+
self.get = async_to_streamed_response_wrapper(
|
|
385
|
+
connector_catalog.get,
|
|
386
|
+
)
|
|
387
|
+
self.get_logo = async_to_custom_streamed_response_wrapper(
|
|
388
|
+
connector_catalog.get_logo,
|
|
389
|
+
AsyncStreamedBinaryAPIResponse,
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
@cached_property
|
|
393
|
+
def admin(self) -> AsyncAdminResourceWithStreamingResponse:
|
|
394
|
+
return AsyncAdminResourceWithStreamingResponse(self._connector_catalog.admin)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .connectors import (
|
|
4
|
+
ConnectorsResource,
|
|
5
|
+
AsyncConnectorsResource,
|
|
6
|
+
ConnectorsResourceWithRawResponse,
|
|
7
|
+
AsyncConnectorsResourceWithRawResponse,
|
|
8
|
+
ConnectorsResourceWithStreamingResponse,
|
|
9
|
+
AsyncConnectorsResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .type_snippets import (
|
|
12
|
+
TypeSnippetsResource,
|
|
13
|
+
AsyncTypeSnippetsResource,
|
|
14
|
+
TypeSnippetsResourceWithRawResponse,
|
|
15
|
+
AsyncTypeSnippetsResourceWithRawResponse,
|
|
16
|
+
TypeSnippetsResourceWithStreamingResponse,
|
|
17
|
+
AsyncTypeSnippetsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"TypeSnippetsResource",
|
|
22
|
+
"AsyncTypeSnippetsResource",
|
|
23
|
+
"TypeSnippetsResourceWithRawResponse",
|
|
24
|
+
"AsyncTypeSnippetsResourceWithRawResponse",
|
|
25
|
+
"TypeSnippetsResourceWithStreamingResponse",
|
|
26
|
+
"AsyncTypeSnippetsResourceWithStreamingResponse",
|
|
27
|
+
"ConnectorsResource",
|
|
28
|
+
"AsyncConnectorsResource",
|
|
29
|
+
"ConnectorsResourceWithRawResponse",
|
|
30
|
+
"AsyncConnectorsResourceWithRawResponse",
|
|
31
|
+
"ConnectorsResourceWithStreamingResponse",
|
|
32
|
+
"AsyncConnectorsResourceWithStreamingResponse",
|
|
33
|
+
]
|