structifyai 1.158.0__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/_base_client.py +140 -11
- structify/_client.py +1116 -253
- structify/_models.py +16 -1
- structify/_streaming.py +12 -10
- structify/_types.py +12 -2
- 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 +57 -27
- structify/resources/admin/__init__.py +26 -40
- structify/resources/admin/admin.py +39 -71
- structify/resources/admin/chat_templates.py +382 -0
- structify/resources/admin/jobs.py +76 -3
- structify/resources/admin/sandbox.py +184 -0
- structify/resources/admin/teams.py +88 -0
- structify/resources/admin/users.py +28 -238
- structify/resources/chat.py +232 -0
- 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.py → connectors/connectors.py} +1155 -325
- structify/resources/connectors/type_snippets.py +169 -0
- structify/resources/datasets/datasets.py +0 -4
- structify/resources/documents.py +1 -123
- structify/resources/external.py +35 -2
- structify/resources/jobs.py +19 -336
- structify/resources/nango.py +234 -0
- structify/resources/polars.py +225 -103
- structify/resources/sandbox.py +13 -110
- structify/resources/scrape.py +0 -16
- structify/resources/sessions.py +241 -153
- structify/resources/slack.py +1 -151
- structify/resources/structure.py +120 -48
- structify/resources/teams.py +96 -0
- structify/resources/user/__init__.py +14 -0
- structify/resources/user/api_keys.py +380 -0
- structify/resources/user/user.py +209 -2
- structify/resources/whitelabel.py +294 -187
- structify/resources/whitelabel_service.py +222 -0
- structify/resources/{report.py → wiki.py} +237 -210
- structify/resources/workflow_schedule.py +4 -5
- structify/types/__init__.py +67 -36
- structify/types/add_member_response.py +35 -4
- structify/types/admin/__init__.py +13 -88
- 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/chat_template_create_params.py +21 -0
- structify/types/admin/{human_llm_start_next_job_params.py → chat_template_list_params.py} +3 -3
- structify/types/admin/{human_llm_get_jobs_response.py → chat_template_list_response.py} +3 -3
- structify/types/admin/chat_template_update_params.py +22 -0
- structify/types/admin/{user_add_credits_response.py → expire_grants_response.py} +5 -3
- structify/types/admin/impersonate_response.py +17 -0
- structify/types/admin/{next_action_get_batched_training_data_params.py → job_delete_params.py} +2 -2
- 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/{user_set_credits_params.py → team_expire_grants_params.py} +4 -4
- structify/types/admin/user.py +16 -0
- structify/types/admin/user_create_params.py +1 -0
- structify/types/admin/{training_dataset_delete_params.py → user_impersonate_params.py} +3 -3
- structify/types/admin/user_list_response.py +14 -4
- structify/types/admin_grant_access_response.py +2 -0
- structify/types/{slack_user_mapping_response.py → admin_issue_found_response.py} +3 -5
- structify/types/chat_add_git_commit_response.py +2 -0
- structify/types/{admin/human_llm_get_next_step_params.py → chat_admin_issue_found_params.py} +4 -4
- structify/types/chat_create_session_params.py +7 -0
- structify/types/chat_dependency.py +17 -0
- structify/types/chat_event.py +51 -239
- structify/types/chat_get_git_commit_response.py +2 -0
- structify/types/chat_get_session_timeline_response.py +31 -1
- structify/types/{job_get_steps_response.py → chat_list_templates_response.py} +3 -3
- structify/types/chat_prompt.py +2 -0
- structify/types/chat_revert_to_commit_response.py +2 -0
- structify/types/chat_session.py +14 -0
- structify/types/chat_session_with_messages.py +33 -1
- structify/types/chat_template.py +31 -0
- structify/types/chat_update_session_params.py +2 -0
- structify/types/code_generate_code_params.py +7 -0
- structify/types/connector.py +16 -25
- 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/{admin/training_dataset_get_datum_info_params.py → connector_catalog/admin_list_scopes_params.py} +3 -3
- 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/connector_catalog/admin_upload_logo_params.py +13 -0
- 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 +11 -25
- 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 +9 -84
- structify/types/connector_get_clarification_requests_response.py +36 -0
- structify/types/connector_get_response.py +2 -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 +4 -25
- structify/types/connector_update_table_params.py +14 -0
- structify/types/connector_with_secrets.py +2 -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/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_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/edge_spec_param.py +13 -0
- structify/types/entity_get_source_entities_response.py +0 -2
- structify/types/entity_list_jobs_response.py +3 -3
- 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/finalize_dag_response.py +11 -0
- structify/types/get_chat_session_response.py +14 -6
- structify/types/get_dependencies_response.py +15 -0
- structify/types/get_job_events_response.py +20 -0
- structify/types/get_node_response.py +10 -0
- structify/types/job_cancel_response.py +3 -3
- structify/types/job_event_body.py +108 -1
- structify/types/job_get_source_entities_response.py +0 -2
- structify/types/job_list_params.py +1 -1
- structify/types/job_list_response.py +35 -1
- structify/types/knowledge_graph.py +6 -0
- structify/types/knowledge_graph_param.py +6 -0
- structify/types/list_chat_sessions_response.py +2 -0
- structify/types/list_collaborators_response.py +4 -0
- structify/types/list_tables_response.py +12 -0
- structify/types/llm_information_store.py +62 -28
- structify/types/merge_config.py +2 -0
- structify/types/merge_config_param.py +2 -0
- structify/types/message.py +2 -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} +4 -4
- structify/types/refresh_session_response.py +15 -0
- structify/types/sandbox.py +8 -2
- structify/types/sandbox_get_params.py +2 -1
- 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 +3 -1
- structify/types/{connector_approve_version_params.py → session_confirm_node_params.py} +3 -3
- structify/types/session_finalize_dag_params.py +20 -0
- structify/types/session_get_events_response.py +2 -0
- structify/types/session_request_confirmation_params.py +13 -0
- structify/types/session_upload_node_output_data_params.py +3 -0
- structify/types/slack_event_payload_param.py +18 -2
- structify/types/slack_events_params.py +18 -2
- structify/types/source_list_response.py +0 -2
- structify/types/structure_enhance_property_params.py +2 -17
- structify/types/structure_enhance_relationship_params.py +2 -17
- structify/types/structure_find_relationship_params.py +2 -18
- structify/types/structure_pdf_params.py +22 -0
- structify/types/structure_pdf_response.py +11 -0
- structify/types/structure_run_async_params.py +10 -17
- structify/types/table.py +2 -0
- structify/types/table_param.py +2 -0
- structify/types/team.py +14 -0
- structify/types/{admin/training_dataset_remove_datum_params.py → team_create_link_code_params.py} +3 -3
- structify/types/team_update_params.py +10 -0
- structify/types/team_wiki_page.py +28 -0
- structify/types/teams_link_code_response.py +13 -0
- structify/types/token_response.py +6 -2
- structify/types/tool_invocation.py +468 -0
- structify/types/tool_result.py +99 -0
- structify/types/update_table_response.py +46 -0
- structify/types/usage_group_key.py +14 -1
- structify/types/user/__init__.py +4 -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/user_enrich_params.py +11 -0
- structify/types/user_info.py +22 -0
- structify/types/user_refresh_params.py +13 -0
- structify/types/user_transactions_response.py +5 -5
- structify/types/user_update_params.py +32 -12
- 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/{admin/training_dataset_list_response.py → wiki_list_response.py} +4 -2
- structify/types/wiki_page_with_references.py +12 -0
- structify/types/wiki_update_params.py +16 -0
- structify/types/workflow_dag.py +2 -0
- structify/types/workflow_node_execution_status.py +3 -1
- structify/types/workflow_schedule_info.py +2 -2
- structify/types/workflow_session_node.py +10 -0
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/METADATA +67 -4
- structifyai-1.176.1.dist-info/RECORD +496 -0
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/licenses/LICENSE +1 -1
- structify/resources/admin/human_llm.py +0 -819
- structify/resources/admin/next_action.py +0 -656
- structify/resources/admin/training_datasets.py +0 -2028
- structify/resources/external/__init__.py +0 -61
- structify/resources/external/external.py +0 -166
- structify/resources/external/news.py +0 -519
- structify/resources/external/people.py +0 -998
- structify/resources/external/search_api.py +0 -1525
- structify/types/active_version_data.py +0 -21
- structify/types/active_version_response.py +0 -13
- 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/delete_action_training_data_response.py +0 -9
- structify/types/admin/human_llm_add_search_for_job_params.py +0 -13
- 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_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_datum_params.py +0 -13
- structify/types/admin/training_dataset_add_params.py +0 -12
- structify/types/admin/training_dataset_download_datum_params.py +0 -13
- 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_params.py +0 -17
- 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/admin/user_add_credits_params.py +0 -18
- structify/types/chat_prompt_param.py +0 -255
- structify/types/connector_column_descriptor.py +0 -21
- structify/types/connector_relational_database_descriptor.py +0 -13
- structify/types/connector_table_descriptor.py +0 -22
- 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/external/__init__.py +0 -96
- structify/types/external/companies_search_response.py +0 -28
- structify/types/external/company_search_result.py +0 -69
- structify/types/external/enriched_organization.py +0 -69
- structify/types/external/everything_response.py +0 -19
- structify/types/external/google_maps_result.py +0 -38
- structify/types/external/google_search_response.py +0 -19
- structify/types/external/google_search_result.py +0 -21
- structify/types/external/job_posting.py +0 -54
- structify/types/external/job_postings_response.py +0 -19
- structify/types/external/location_coordinates.py +0 -13
- structify/types/external/location_response.py +0 -16
- structify/types/external/location_result.py +0 -24
- structify/types/external/news_article.py +0 -33
- structify/types/external/news_everything_params.py +0 -45
- structify/types/external/news_source.py +0 -15
- structify/types/external/news_source_detail.py +0 -28
- structify/types/external/news_sources_params.py +0 -19
- structify/types/external/news_top_headlines_params.py +0 -28
- structify/types/external/organization_detail.py +0 -87
- structify/types/external/people_match_response.py +0 -18
- structify/types/external/people_search_response.py +0 -28
- structify/types/external/person_companies_search_params.py +0 -63
- structify/types/external/person_match.py +0 -60
- structify/types/external/person_organization_job_postings_params.py +0 -16
- structify/types/external/person_organizations_enrich_params.py +0 -16
- structify/types/external/person_people_match_params.py +0 -49
- structify/types/external/person_people_search_params.py +0 -57
- structify/types/external/person_search_result.py +0 -48
- structify/types/external/search_api_google_flights_calendar_params.py +0 -28
- structify/types/external/search_api_google_flights_calendar_response.py +0 -8
- structify/types/external/search_api_google_flights_location_search_params.py +0 -16
- structify/types/external/search_api_google_flights_location_search_response.py +0 -8
- structify/types/external/search_api_google_flights_search_params.py +0 -43
- structify/types/external/search_api_google_flights_search_response.py +0 -8
- structify/types/external/search_api_google_maps_place_details_params.py +0 -16
- structify/types/external/search_api_google_maps_place_details_response.py +0 -8
- structify/types/external/search_api_google_maps_place_photos_params.py +0 -16
- structify/types/external/search_api_google_maps_place_photos_response.py +0 -8
- structify/types/external/search_api_google_maps_place_reviews_params.py +0 -19
- structify/types/external/search_api_google_maps_place_reviews_response.py +0 -8
- structify/types/external/search_api_google_maps_search_params.py +0 -22
- structify/types/external/search_api_google_maps_search_response.py +0 -10
- structify/types/external/search_api_google_scholar_author_search_params.py +0 -22
- structify/types/external/search_api_google_scholar_author_search_response.py +0 -8
- structify/types/external/search_api_google_scholar_citations_params.py +0 -22
- structify/types/external/search_api_google_scholar_citations_response.py +0 -8
- structify/types/external/search_api_google_scholar_search_params.py +0 -28
- structify/types/external/search_api_google_scholar_search_response.py +0 -8
- structify/types/external/search_api_google_search_params.py +0 -25
- structify/types/external/search_api_location_search_params.py +0 -22
- structify/types/external/sources_response.py +0 -16
- structify/types/external/top_headlines_response.py +0 -19
- 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/message_param.py +0 -35
- structify/types/pending_version_response.py +0 -21
- structify/types/report_missing_params.py +0 -18
- structify/types/report_missing_response.py +0 -7
- structify/types/report_relationship_params.py +0 -18
- structify/types/report_relationship_response.py +0 -7
- structify/types/report_step_params.py +0 -15
- 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/sandbox_create_params.py +0 -20
- structify/types/session_create_edge_params.py +0 -13
- structify/types/slack_connection_status.py +0 -15
- structify/types/slack_user_mapping_params.py +0 -18
- structify/types/tool_metadata_param.py +0 -17
- structify/types/user_team.py +0 -35
- structify/types/workflow_schedule_get_response.py +0 -10
- structifyai-1.158.0.dist-info/RECORD +0 -530
- {structifyai-1.158.0.dist-info → structifyai-1.176.1.dist-info}/WHEEL +0 -0
|
@@ -18,20 +18,12 @@ from ..._response import (
|
|
|
18
18
|
async_to_raw_response_wrapper,
|
|
19
19
|
async_to_streamed_response_wrapper,
|
|
20
20
|
)
|
|
21
|
-
from ...types.admin import
|
|
22
|
-
user_create_params,
|
|
23
|
-
user_get_stats_params,
|
|
24
|
-
user_add_credits_params,
|
|
25
|
-
user_get_credits_params,
|
|
26
|
-
user_set_credits_params,
|
|
27
|
-
)
|
|
21
|
+
from ...types.admin import user_create_params, user_get_stats_params, user_impersonate_params
|
|
28
22
|
from ..._base_client import make_request_options
|
|
29
23
|
from ...types.token_response import TokenResponse
|
|
30
24
|
from ...types.admin.user_list_response import UserListResponse
|
|
25
|
+
from ...types.admin.impersonate_response import ImpersonateResponse
|
|
31
26
|
from ...types.admin.user_get_stats_response import UserGetStatsResponse
|
|
32
|
-
from ...types.admin.user_add_credits_response import UserAddCreditsResponse
|
|
33
|
-
from ...types.admin.user_get_credits_response import UserGetCreditsResponse
|
|
34
|
-
from ...types.admin.user_set_credits_response import UserSetCreditsResponse
|
|
35
27
|
|
|
36
28
|
__all__ = ["UsersResource", "AsyncUsersResource"]
|
|
37
29
|
|
|
@@ -72,6 +64,7 @@ class UsersResource(SyncAPIResource):
|
|
|
72
64
|
"cerebras_codegen",
|
|
73
65
|
"gemini25pro",
|
|
74
66
|
"claude_sonnet4",
|
|
67
|
+
"allow_job_deletion",
|
|
75
68
|
"none",
|
|
76
69
|
]
|
|
77
70
|
]
|
|
@@ -88,7 +81,7 @@ class UsersResource(SyncAPIResource):
|
|
|
88
81
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
89
82
|
) -> TokenResponse:
|
|
90
83
|
"""
|
|
91
|
-
Create a user,
|
|
84
|
+
Create a user, returning their session token.
|
|
92
85
|
|
|
93
86
|
Args:
|
|
94
87
|
extra_headers: Send extra headers
|
|
@@ -129,7 +122,7 @@ class UsersResource(SyncAPIResource):
|
|
|
129
122
|
extra_body: Body | None = None,
|
|
130
123
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
131
124
|
) -> UserListResponse:
|
|
132
|
-
"""Lists all
|
|
125
|
+
"""Lists all users with their team memberships."""
|
|
133
126
|
return self._get(
|
|
134
127
|
"/admin/users/list",
|
|
135
128
|
options=make_request_options(
|
|
@@ -138,88 +131,6 @@ class UsersResource(SyncAPIResource):
|
|
|
138
131
|
cast_to=UserListResponse,
|
|
139
132
|
)
|
|
140
133
|
|
|
141
|
-
def add_credits(
|
|
142
|
-
self,
|
|
143
|
-
*,
|
|
144
|
-
credit_amount: int,
|
|
145
|
-
user_email: str,
|
|
146
|
-
source_type: Optional[str] | Omit = omit,
|
|
147
|
-
valid_for_days: Optional[int] | Omit = omit,
|
|
148
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
149
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
150
|
-
extra_headers: Headers | None = None,
|
|
151
|
-
extra_query: Query | None = None,
|
|
152
|
-
extra_body: Body | None = None,
|
|
153
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
154
|
-
) -> UserAddCreditsResponse:
|
|
155
|
-
"""
|
|
156
|
-
Add credits to a user's account via a credit grant.
|
|
157
|
-
|
|
158
|
-
Args:
|
|
159
|
-
extra_headers: Send extra headers
|
|
160
|
-
|
|
161
|
-
extra_query: Add additional query parameters to the request
|
|
162
|
-
|
|
163
|
-
extra_body: Add additional JSON properties to the request
|
|
164
|
-
|
|
165
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
166
|
-
"""
|
|
167
|
-
return self._post(
|
|
168
|
-
"/admin/users/add_credits",
|
|
169
|
-
body=maybe_transform(
|
|
170
|
-
{
|
|
171
|
-
"credit_amount": credit_amount,
|
|
172
|
-
"user_email": user_email,
|
|
173
|
-
"source_type": source_type,
|
|
174
|
-
"valid_for_days": valid_for_days,
|
|
175
|
-
},
|
|
176
|
-
user_add_credits_params.UserAddCreditsParams,
|
|
177
|
-
),
|
|
178
|
-
options=make_request_options(
|
|
179
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
180
|
-
),
|
|
181
|
-
cast_to=UserAddCreditsResponse,
|
|
182
|
-
)
|
|
183
|
-
|
|
184
|
-
def get_credits(
|
|
185
|
-
self,
|
|
186
|
-
*,
|
|
187
|
-
user_email: Optional[str] | Omit = omit,
|
|
188
|
-
user_token: Optional[str] | Omit = omit,
|
|
189
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
190
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
191
|
-
extra_headers: Headers | None = None,
|
|
192
|
-
extra_query: Query | None = None,
|
|
193
|
-
extra_body: Body | None = None,
|
|
194
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
195
|
-
) -> UserGetCreditsResponse:
|
|
196
|
-
"""
|
|
197
|
-
get the credit balance of a user by email.
|
|
198
|
-
|
|
199
|
-
Args:
|
|
200
|
-
extra_headers: Send extra headers
|
|
201
|
-
|
|
202
|
-
extra_query: Add additional query parameters to the request
|
|
203
|
-
|
|
204
|
-
extra_body: Add additional JSON properties to the request
|
|
205
|
-
|
|
206
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
207
|
-
"""
|
|
208
|
-
return self._post(
|
|
209
|
-
"/admin/users/get_credits",
|
|
210
|
-
body=maybe_transform(
|
|
211
|
-
{
|
|
212
|
-
"user_email": user_email,
|
|
213
|
-
"user_token": user_token,
|
|
214
|
-
},
|
|
215
|
-
user_get_credits_params.UserGetCreditsParams,
|
|
216
|
-
),
|
|
217
|
-
options=make_request_options(
|
|
218
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
219
|
-
),
|
|
220
|
-
cast_to=UserGetCreditsResponse,
|
|
221
|
-
)
|
|
222
|
-
|
|
223
134
|
def get_stats(
|
|
224
135
|
self,
|
|
225
136
|
*,
|
|
@@ -263,21 +174,18 @@ class UsersResource(SyncAPIResource):
|
|
|
263
174
|
cast_to=UserGetStatsResponse,
|
|
264
175
|
)
|
|
265
176
|
|
|
266
|
-
def
|
|
177
|
+
def impersonate(
|
|
267
178
|
self,
|
|
268
179
|
*,
|
|
269
|
-
|
|
270
|
-
user_email: str,
|
|
180
|
+
membership_id: str,
|
|
271
181
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
272
182
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
273
183
|
extra_headers: Headers | None = None,
|
|
274
184
|
extra_query: Query | None = None,
|
|
275
185
|
extra_body: Body | None = None,
|
|
276
186
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
277
|
-
) ->
|
|
187
|
+
) -> ImpersonateResponse:
|
|
278
188
|
"""
|
|
279
|
-
set the credit balance of a user, returing that new credit balance.
|
|
280
|
-
|
|
281
189
|
Args:
|
|
282
190
|
extra_headers: Send extra headers
|
|
283
191
|
|
|
@@ -288,18 +196,12 @@ class UsersResource(SyncAPIResource):
|
|
|
288
196
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
289
197
|
"""
|
|
290
198
|
return self._post(
|
|
291
|
-
"/admin/users/
|
|
292
|
-
body=maybe_transform(
|
|
293
|
-
{
|
|
294
|
-
"credit_count": credit_count,
|
|
295
|
-
"user_email": user_email,
|
|
296
|
-
},
|
|
297
|
-
user_set_credits_params.UserSetCreditsParams,
|
|
298
|
-
),
|
|
199
|
+
"/admin/users/impersonate",
|
|
200
|
+
body=maybe_transform({"membership_id": membership_id}, user_impersonate_params.UserImpersonateParams),
|
|
299
201
|
options=make_request_options(
|
|
300
202
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
301
203
|
),
|
|
302
|
-
cast_to=
|
|
204
|
+
cast_to=ImpersonateResponse,
|
|
303
205
|
)
|
|
304
206
|
|
|
305
207
|
|
|
@@ -339,6 +241,7 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
339
241
|
"cerebras_codegen",
|
|
340
242
|
"gemini25pro",
|
|
341
243
|
"claude_sonnet4",
|
|
244
|
+
"allow_job_deletion",
|
|
342
245
|
"none",
|
|
343
246
|
]
|
|
344
247
|
]
|
|
@@ -355,7 +258,7 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
355
258
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
356
259
|
) -> TokenResponse:
|
|
357
260
|
"""
|
|
358
|
-
Create a user,
|
|
261
|
+
Create a user, returning their session token.
|
|
359
262
|
|
|
360
263
|
Args:
|
|
361
264
|
extra_headers: Send extra headers
|
|
@@ -396,7 +299,7 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
396
299
|
extra_body: Body | None = None,
|
|
397
300
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
398
301
|
) -> UserListResponse:
|
|
399
|
-
"""Lists all
|
|
302
|
+
"""Lists all users with their team memberships."""
|
|
400
303
|
return await self._get(
|
|
401
304
|
"/admin/users/list",
|
|
402
305
|
options=make_request_options(
|
|
@@ -405,88 +308,6 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
405
308
|
cast_to=UserListResponse,
|
|
406
309
|
)
|
|
407
310
|
|
|
408
|
-
async def add_credits(
|
|
409
|
-
self,
|
|
410
|
-
*,
|
|
411
|
-
credit_amount: int,
|
|
412
|
-
user_email: str,
|
|
413
|
-
source_type: Optional[str] | Omit = omit,
|
|
414
|
-
valid_for_days: Optional[int] | Omit = omit,
|
|
415
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
416
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
417
|
-
extra_headers: Headers | None = None,
|
|
418
|
-
extra_query: Query | None = None,
|
|
419
|
-
extra_body: Body | None = None,
|
|
420
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
421
|
-
) -> UserAddCreditsResponse:
|
|
422
|
-
"""
|
|
423
|
-
Add credits to a user's account via a credit grant.
|
|
424
|
-
|
|
425
|
-
Args:
|
|
426
|
-
extra_headers: Send extra headers
|
|
427
|
-
|
|
428
|
-
extra_query: Add additional query parameters to the request
|
|
429
|
-
|
|
430
|
-
extra_body: Add additional JSON properties to the request
|
|
431
|
-
|
|
432
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
433
|
-
"""
|
|
434
|
-
return await self._post(
|
|
435
|
-
"/admin/users/add_credits",
|
|
436
|
-
body=await async_maybe_transform(
|
|
437
|
-
{
|
|
438
|
-
"credit_amount": credit_amount,
|
|
439
|
-
"user_email": user_email,
|
|
440
|
-
"source_type": source_type,
|
|
441
|
-
"valid_for_days": valid_for_days,
|
|
442
|
-
},
|
|
443
|
-
user_add_credits_params.UserAddCreditsParams,
|
|
444
|
-
),
|
|
445
|
-
options=make_request_options(
|
|
446
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
447
|
-
),
|
|
448
|
-
cast_to=UserAddCreditsResponse,
|
|
449
|
-
)
|
|
450
|
-
|
|
451
|
-
async def get_credits(
|
|
452
|
-
self,
|
|
453
|
-
*,
|
|
454
|
-
user_email: Optional[str] | Omit = omit,
|
|
455
|
-
user_token: Optional[str] | Omit = omit,
|
|
456
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
457
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
458
|
-
extra_headers: Headers | None = None,
|
|
459
|
-
extra_query: Query | None = None,
|
|
460
|
-
extra_body: Body | None = None,
|
|
461
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
462
|
-
) -> UserGetCreditsResponse:
|
|
463
|
-
"""
|
|
464
|
-
get the credit balance of a user by email.
|
|
465
|
-
|
|
466
|
-
Args:
|
|
467
|
-
extra_headers: Send extra headers
|
|
468
|
-
|
|
469
|
-
extra_query: Add additional query parameters to the request
|
|
470
|
-
|
|
471
|
-
extra_body: Add additional JSON properties to the request
|
|
472
|
-
|
|
473
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
474
|
-
"""
|
|
475
|
-
return await self._post(
|
|
476
|
-
"/admin/users/get_credits",
|
|
477
|
-
body=await async_maybe_transform(
|
|
478
|
-
{
|
|
479
|
-
"user_email": user_email,
|
|
480
|
-
"user_token": user_token,
|
|
481
|
-
},
|
|
482
|
-
user_get_credits_params.UserGetCreditsParams,
|
|
483
|
-
),
|
|
484
|
-
options=make_request_options(
|
|
485
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
486
|
-
),
|
|
487
|
-
cast_to=UserGetCreditsResponse,
|
|
488
|
-
)
|
|
489
|
-
|
|
490
311
|
async def get_stats(
|
|
491
312
|
self,
|
|
492
313
|
*,
|
|
@@ -530,21 +351,18 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
530
351
|
cast_to=UserGetStatsResponse,
|
|
531
352
|
)
|
|
532
353
|
|
|
533
|
-
async def
|
|
354
|
+
async def impersonate(
|
|
534
355
|
self,
|
|
535
356
|
*,
|
|
536
|
-
|
|
537
|
-
user_email: str,
|
|
357
|
+
membership_id: str,
|
|
538
358
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
539
359
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
540
360
|
extra_headers: Headers | None = None,
|
|
541
361
|
extra_query: Query | None = None,
|
|
542
362
|
extra_body: Body | None = None,
|
|
543
363
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
544
|
-
) ->
|
|
364
|
+
) -> ImpersonateResponse:
|
|
545
365
|
"""
|
|
546
|
-
set the credit balance of a user, returing that new credit balance.
|
|
547
|
-
|
|
548
366
|
Args:
|
|
549
367
|
extra_headers: Send extra headers
|
|
550
368
|
|
|
@@ -555,18 +373,14 @@ class AsyncUsersResource(AsyncAPIResource):
|
|
|
555
373
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
556
374
|
"""
|
|
557
375
|
return await self._post(
|
|
558
|
-
"/admin/users/
|
|
376
|
+
"/admin/users/impersonate",
|
|
559
377
|
body=await async_maybe_transform(
|
|
560
|
-
{
|
|
561
|
-
"credit_count": credit_count,
|
|
562
|
-
"user_email": user_email,
|
|
563
|
-
},
|
|
564
|
-
user_set_credits_params.UserSetCreditsParams,
|
|
378
|
+
{"membership_id": membership_id}, user_impersonate_params.UserImpersonateParams
|
|
565
379
|
),
|
|
566
380
|
options=make_request_options(
|
|
567
381
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
568
382
|
),
|
|
569
|
-
cast_to=
|
|
383
|
+
cast_to=ImpersonateResponse,
|
|
570
384
|
)
|
|
571
385
|
|
|
572
386
|
|
|
@@ -580,17 +394,11 @@ class UsersResourceWithRawResponse:
|
|
|
580
394
|
self.list = to_raw_response_wrapper(
|
|
581
395
|
users.list,
|
|
582
396
|
)
|
|
583
|
-
self.add_credits = to_raw_response_wrapper(
|
|
584
|
-
users.add_credits,
|
|
585
|
-
)
|
|
586
|
-
self.get_credits = to_raw_response_wrapper(
|
|
587
|
-
users.get_credits,
|
|
588
|
-
)
|
|
589
397
|
self.get_stats = to_raw_response_wrapper(
|
|
590
398
|
users.get_stats,
|
|
591
399
|
)
|
|
592
|
-
self.
|
|
593
|
-
users.
|
|
400
|
+
self.impersonate = to_raw_response_wrapper(
|
|
401
|
+
users.impersonate,
|
|
594
402
|
)
|
|
595
403
|
|
|
596
404
|
|
|
@@ -604,17 +412,11 @@ class AsyncUsersResourceWithRawResponse:
|
|
|
604
412
|
self.list = async_to_raw_response_wrapper(
|
|
605
413
|
users.list,
|
|
606
414
|
)
|
|
607
|
-
self.add_credits = async_to_raw_response_wrapper(
|
|
608
|
-
users.add_credits,
|
|
609
|
-
)
|
|
610
|
-
self.get_credits = async_to_raw_response_wrapper(
|
|
611
|
-
users.get_credits,
|
|
612
|
-
)
|
|
613
415
|
self.get_stats = async_to_raw_response_wrapper(
|
|
614
416
|
users.get_stats,
|
|
615
417
|
)
|
|
616
|
-
self.
|
|
617
|
-
users.
|
|
418
|
+
self.impersonate = async_to_raw_response_wrapper(
|
|
419
|
+
users.impersonate,
|
|
618
420
|
)
|
|
619
421
|
|
|
620
422
|
|
|
@@ -628,17 +430,11 @@ class UsersResourceWithStreamingResponse:
|
|
|
628
430
|
self.list = to_streamed_response_wrapper(
|
|
629
431
|
users.list,
|
|
630
432
|
)
|
|
631
|
-
self.add_credits = to_streamed_response_wrapper(
|
|
632
|
-
users.add_credits,
|
|
633
|
-
)
|
|
634
|
-
self.get_credits = to_streamed_response_wrapper(
|
|
635
|
-
users.get_credits,
|
|
636
|
-
)
|
|
637
433
|
self.get_stats = to_streamed_response_wrapper(
|
|
638
434
|
users.get_stats,
|
|
639
435
|
)
|
|
640
|
-
self.
|
|
641
|
-
users.
|
|
436
|
+
self.impersonate = to_streamed_response_wrapper(
|
|
437
|
+
users.impersonate,
|
|
642
438
|
)
|
|
643
439
|
|
|
644
440
|
|
|
@@ -652,15 +448,9 @@ class AsyncUsersResourceWithStreamingResponse:
|
|
|
652
448
|
self.list = async_to_streamed_response_wrapper(
|
|
653
449
|
users.list,
|
|
654
450
|
)
|
|
655
|
-
self.add_credits = async_to_streamed_response_wrapper(
|
|
656
|
-
users.add_credits,
|
|
657
|
-
)
|
|
658
|
-
self.get_credits = async_to_streamed_response_wrapper(
|
|
659
|
-
users.get_credits,
|
|
660
|
-
)
|
|
661
451
|
self.get_stats = async_to_streamed_response_wrapper(
|
|
662
452
|
users.get_stats,
|
|
663
453
|
)
|
|
664
|
-
self.
|
|
665
|
-
users.
|
|
454
|
+
self.impersonate = async_to_streamed_response_wrapper(
|
|
455
|
+
users.impersonate,
|
|
666
456
|
)
|