skillforge-client 0.4.0__tar.gz → 0.6.0__tar.gz
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.
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/PKG-INFO +3 -3
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/README.md +1 -1
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/pyproject.toml +2 -2
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/pyproject.toml.orig +2 -2
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_add_user_to_group.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_add_user_role.py +51 -49
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_create_token.py +271 -0
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_tutor_activation.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_create_user.py +49 -51
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_job.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_get_discord_link.py +35 -36
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_operation.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_get_user.py +35 -35
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_grant_application_client_scopes.py +8 -4
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_cancel_operation.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_issue_discord_link_code.py +53 -45
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_student_activation.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_issue_invitation.py +53 -54
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_complete_job.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_issue_password_reset.py +53 -33
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_upsert_command_env.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_link_discord_account.py +67 -27
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_list_discord_links.py +289 -0
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_list_jobs.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_list_users.py +77 -50
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_redeem_discord_link_code.py +229 -0
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_remove_user_from_group.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_redeem_password.py +51 -45
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_remove_user_role.py +194 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_revoke_application_client_scope.py +20 -5
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_revoke_refresh_token.py +198 -0
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_revoke_user_sessions.py +179 -0
- skillforge_client-0.6.0/skillforge_client/api/auth/auth_unlink_discord_account.py +182 -0
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_fail_job.py → skillforge_client-0.6.0/skillforge_client/api/auth/auth_update_user.py +58 -58
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_delete_party.py +16 -8
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_get_party.py +8 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_list_parties.py +36 -20
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_remove_student_role.py +16 -4
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_remove_tutor_role.py +16 -4
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/__init__.py +32 -108
- skillforge_client-0.6.0/skillforge_client/models/access_token_response.py +133 -0
- skillforge_client-0.4.0/skillforge_client/models/discord_user_upsert_request.py → skillforge_client-0.6.0/skillforge_client/models/action_token_response.py +21 -30
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_response.py +27 -16
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_scope_grant_request.py +15 -2
- skillforge_client-0.6.0/skillforge_client/models/body_auth_create_token.py +209 -0
- skillforge_client-0.6.0/skillforge_client/models/discord_link.py +98 -0
- skillforge_client-0.6.0/skillforge_client/models/discord_link_redeem_request.py +72 -0
- skillforge_client-0.4.0/skillforge_client/models/person_profile.py → skillforge_client-0.6.0/skillforge_client/models/discord_link_request.py +15 -20
- skillforge_client-0.6.0/skillforge_client/models/grant_mode.py +9 -0
- skillforge_client-0.6.0/skillforge_client/models/me_response.py +157 -0
- skillforge_client-0.4.0/skillforge_client/models/page_job_list_item.py → skillforge_client-0.6.0/skillforge_client/models/page_discord_link.py +10 -10
- skillforge_client-0.4.0/skillforge_client/models/page_operation_summary.py → skillforge_client-0.6.0/skillforge_client/models/page_user_account_list_item.py +10 -10
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/party_list_item.py +11 -0
- skillforge_client-0.4.0/skillforge_client/models/discord_account_profile.py → skillforge_client-0.6.0/skillforge_client/models/password_redeem_request.py +19 -26
- skillforge_client-0.4.0/skillforge_client/models/group_membership_response.py → skillforge_client-0.6.0/skillforge_client/models/refresh_token_revoke_request.py +15 -20
- skillforge_client-0.4.0/skillforge_client/models/member_role.py → skillforge_client-0.6.0/skillforge_client/models/role.py +2 -1
- skillforge_client-0.6.0/skillforge_client/models/user_account_create_request.py +110 -0
- skillforge_client-0.6.0/skillforge_client/models/user_account_detail.py +189 -0
- skillforge_client-0.6.0/skillforge_client/models/user_account_list_item.py +155 -0
- skillforge_client-0.6.0/skillforge_client/models/user_account_role_name.py +8 -0
- skillforge_client-0.6.0/skillforge_client/models/user_account_status.py +9 -0
- skillforge_client-0.6.0/skillforge_client/models/user_account_update_request.py +93 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/worker_name.py +1 -1
- skillforge_client-0.4.0/skillforge_client/api/auth/auth_create_token.py +0 -175
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_check_authorization.py +0 -205
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_claim_jobs.py +0 -209
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_student_deactivation.py +0 -210
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_student_pop.py +0 -210
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_student_stash.py +0 -210
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_commit_tutor_deactivation.py +0 -210
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_deactivate_discord_account.py +0 -196
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_delete_command_env.py +0 -199
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_job_queue_summary.py +0 -201
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_link_discord_account.py +0 -226
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_list_operations.py +0 -301
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_student_activation.py +0 -181
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_student_deactivation.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_student_pop.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_student_stash.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_tutor_activation.py +0 -181
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_prepare_tutor_deactivation.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_principal.py +0 -176
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_principals_batch.py +0 -188
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_student_context.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_student_contexts_batch.py +0 -204
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_tutor_context.py +0 -190
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_read_tutor_contexts_batch.py +0 -204
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_resolve_command_env.py +0 -233
- skillforge_client-0.4.0/skillforge_client/api/bot/bot_upsert_discord_user.py +0 -212
- skillforge_client-0.4.0/skillforge_client/api/system/__init__.py +0 -1
- skillforge_client-0.4.0/skillforge_client/models/access_token_response.py +0 -85
- skillforge_client-0.4.0/skillforge_client/models/authorization_check_request.py +0 -78
- skillforge_client-0.4.0/skillforge_client/models/authorization_check_response.py +0 -61
- skillforge_client-0.4.0/skillforge_client/models/body_auth_create_token.py +0 -123
- skillforge_client-0.4.0/skillforge_client/models/bot_job.py +0 -119
- skillforge_client-0.4.0/skillforge_client/models/bot_job_payload.py +0 -47
- skillforge_client-0.4.0/skillforge_client/models/bot_principal.py +0 -148
- skillforge_client-0.4.0/skillforge_client/models/command_env_channel_response.py +0 -100
- skillforge_client-0.4.0/skillforge_client/models/command_env_kind.py +0 -9
- skillforge_client-0.4.0/skillforge_client/models/command_env_upsert_request.py +0 -100
- skillforge_client-0.4.0/skillforge_client/models/contact_info_profile.py +0 -92
- skillforge_client-0.4.0/skillforge_client/models/discord_account_link_request.py +0 -82
- skillforge_client-0.4.0/skillforge_client/models/discord_account_link_response.py +0 -86
- skillforge_client-0.4.0/skillforge_client/models/discord_id_batch_request.py +0 -62
- skillforge_client-0.4.0/skillforge_client/models/discord_user_response.py +0 -87
- skillforge_client-0.4.0/skillforge_client/models/external_accounts_profile.py +0 -113
- skillforge_client-0.4.0/skillforge_client/models/job_claim_request.py +0 -113
- skillforge_client-0.4.0/skillforge_client/models/job_detail.py +0 -239
- skillforge_client-0.4.0/skillforge_client/models/job_detail_payload.py +0 -47
- skillforge_client-0.4.0/skillforge_client/models/job_fail_request.py +0 -82
- skillforge_client-0.4.0/skillforge_client/models/job_kind_counts.py +0 -92
- skillforge_client-0.4.0/skillforge_client/models/job_list_item.py +0 -225
- skillforge_client-0.4.0/skillforge_client/models/job_queue_summary.py +0 -106
- skillforge_client-0.4.0/skillforge_client/models/job_response.py +0 -187
- skillforge_client-0.4.0/skillforge_client/models/job_status.py +0 -11
- skillforge_client-0.4.0/skillforge_client/models/job_status_counts.py +0 -86
- skillforge_client-0.4.0/skillforge_client/models/me_response.py +0 -85
- skillforge_client-0.4.0/skillforge_client/models/microsoft_account_profile.py +0 -61
- skillforge_client-0.4.0/skillforge_client/models/operation_cancel_response.py +0 -108
- skillforge_client-0.4.0/skillforge_client/models/operation_kind.py +0 -13
- skillforge_client-0.4.0/skillforge_client/models/operation_response.py +0 -257
- skillforge_client-0.4.0/skillforge_client/models/operation_response_plan.py +0 -47
- skillforge_client-0.4.0/skillforge_client/models/operation_status.py +0 -12
- skillforge_client-0.4.0/skillforge_client/models/operation_summary.py +0 -243
- skillforge_client-0.4.0/skillforge_client/models/operational_profile.py +0 -178
- skillforge_client-0.4.0/skillforge_client/models/principal_batch.py +0 -84
- skillforge_client-0.4.0/skillforge_client/models/relation_profile.py +0 -81
- skillforge_client-0.4.0/skillforge_client/models/relation_profile_direction.py +0 -9
- skillforge_client-0.4.0/skillforge_client/models/student_activation_commit_request.py +0 -61
- skillforge_client-0.4.0/skillforge_client/models/student_activation_prepare_request.py +0 -77
- skillforge_client-0.4.0/skillforge_client/models/student_channel_state.py +0 -9
- skillforge_client-0.4.0/skillforge_client/models/student_context.py +0 -140
- skillforge_client-0.4.0/skillforge_client/models/student_context_batch.py +0 -83
- skillforge_client-0.4.0/skillforge_client/models/transition_commit_response.py +0 -108
- skillforge_client-0.4.0/skillforge_client/models/transition_prepare_response.py +0 -95
- skillforge_client-0.4.0/skillforge_client/models/transition_prepare_response_plan.py +0 -47
- skillforge_client-0.4.0/skillforge_client/models/tutor_activation_commit_request.py +0 -69
- skillforge_client-0.4.0/skillforge_client/models/tutor_activation_prepare_request.py +0 -69
- skillforge_client-0.4.0/skillforge_client/models/tutor_context.py +0 -99
- skillforge_client-0.4.0/skillforge_client/models/tutor_context_batch.py +0 -83
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/__init__.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/__init__.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/__init__.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_create_application_client.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_create_application_client_secret.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_get_me.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_read_application_client.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_read_application_clients.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_revoke_application_client_secret.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/auth/auth_update_application_client.py +0 -0
- {skillforge_client-0.4.0/skillforge_client/api/bot → skillforge_client-0.6.0/skillforge_client/api/crm}/__init__.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_add_contact_info.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_create_company.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_create_person.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_create_subject.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_delete_subject.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_list_relations.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_list_subjects.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_put_relation.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_put_student_role.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_put_tutor_role.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_remove_contact_info.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_remove_relation.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_update_company.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_update_contact_info.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_update_person.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/crm/crm_update_subject.py +0 -0
- {skillforge_client-0.4.0/skillforge_client/api/crm → skillforge_client-0.6.0/skillforge_client/api/system}/__init__.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_dependencies_health_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_dependency_health_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_health_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_liveness_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_root.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_worker_health_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/api/system/system_workers_health_check.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/client.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/errors.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_secret_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_secret_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_status.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/application_client_update_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/company_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/company_detail.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/company_update_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/contact_info_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/contact_info_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/contact_info_type.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/contact_info_update_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/created_client_secret_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/dependencies_health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/dependencies_health_check_response_checks.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/dependency_health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/dependency_name.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/error_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/field_error.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/health_status.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/page_application_client_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/page_party_list_item.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/page_relation_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/page_subject_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/party_relation_type.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/party_role.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/party_type.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/person_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/person_detail.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/person_update_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/preferred_meeting_tool.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/relation_direction.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/relation_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/student_role.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/student_role_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/subject_create_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/subject_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/subject_update_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/system_health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/tutor_role.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/tutor_role_request.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/worker_health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/workers_health_check_response.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/models/workers_health_check_response_checks.py +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/py.typed +0 -0
- {skillforge_client-0.4.0 → skillforge_client-0.6.0}/skillforge_client/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: skillforge-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Official Python client for the Skillforge API.
|
|
5
5
|
Keywords: skillforge,api,client,openapi
|
|
6
6
|
Author: Leon Weimann
|
|
@@ -15,7 +15,7 @@ Requires-Dist: attrs>=22.2.0
|
|
|
15
15
|
Requires-Python: >=3.11
|
|
16
16
|
Project-URL: Repository, https://github.com/Nachhilfe-Leon-Weimann/skillforge
|
|
17
17
|
Project-URL: Issues, https://github.com/Nachhilfe-Leon-Weimann/skillforge/issues
|
|
18
|
-
Project-URL: OpenAPI contract, https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.
|
|
18
|
+
Project-URL: OpenAPI contract, https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.6.0/openapi.json
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
|
|
21
21
|
# Skillforge Python Client
|
|
@@ -77,7 +77,7 @@ Generated request and response models are available from `skillforge_client.mode
|
|
|
77
77
|
|
|
78
78
|
## Versioning and source
|
|
79
79
|
|
|
80
|
-
Client versions follow Skillforge releases. This package was generated from the [`openapi.json`](https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.
|
|
80
|
+
Client versions follow Skillforge releases. This package was generated from the [`openapi.json`](https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.6.0/openapi.json) contract for Skillforge v0.6.0; generated source is not maintained by hand.
|
|
81
81
|
|
|
82
82
|
- [Skillforge repository](https://github.com/Nachhilfe-Leon-Weimann/skillforge)
|
|
83
83
|
- [Issue tracker](https://github.com/Nachhilfe-Leon-Weimann/skillforge/issues)
|
|
@@ -57,7 +57,7 @@ Generated request and response models are available from `skillforge_client.mode
|
|
|
57
57
|
|
|
58
58
|
## Versioning and source
|
|
59
59
|
|
|
60
|
-
Client versions follow Skillforge releases. This package was generated from the [`openapi.json`](https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.
|
|
60
|
+
Client versions follow Skillforge releases. This package was generated from the [`openapi.json`](https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.6.0/openapi.json) contract for Skillforge v0.6.0; generated source is not maintained by hand.
|
|
61
61
|
|
|
62
62
|
- [Skillforge repository](https://github.com/Nachhilfe-Leon-Weimann/skillforge)
|
|
63
63
|
- [Issue tracker](https://github.com/Nachhilfe-Leon-Weimann/skillforge/issues)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "skillforge-client"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.6.0"
|
|
4
4
|
description = "Official Python client for the Skillforge API."
|
|
5
5
|
requires-python = ">=3.11"
|
|
6
6
|
readme = "README.md"
|
|
@@ -29,7 +29,7 @@ email = "coding@leonweimann.de"
|
|
|
29
29
|
[project.urls]
|
|
30
30
|
Repository = "https://github.com/Nachhilfe-Leon-Weimann/skillforge"
|
|
31
31
|
Issues = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/issues"
|
|
32
|
-
"OpenAPI contract" = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.
|
|
32
|
+
"OpenAPI contract" = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.6.0/openapi.json"
|
|
33
33
|
|
|
34
34
|
[tool.uv.build-backend]
|
|
35
35
|
module-name = "skillforge_client"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "skillforge-client"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.6.0"
|
|
4
4
|
description = "Official Python client for the Skillforge API."
|
|
5
5
|
authors = [{ name = "Leon Weimann", email = "coding@leonweimann.de" }]
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -21,7 +21,7 @@ dependencies = [
|
|
|
21
21
|
[project.urls]
|
|
22
22
|
Repository = "https://github.com/Nachhilfe-Leon-Weimann/skillforge"
|
|
23
23
|
Issues = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/issues"
|
|
24
|
-
"OpenAPI contract" = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.
|
|
24
|
+
"OpenAPI contract" = "https://github.com/Nachhilfe-Leon-Weimann/skillforge/blob/v0.6.0/openapi.json"
|
|
25
25
|
|
|
26
26
|
[tool.uv.build-backend]
|
|
27
27
|
module-name = "skillforge_client"
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
from http import HTTPStatus
|
|
2
2
|
from typing import Any
|
|
3
3
|
from urllib.parse import quote
|
|
4
|
+
from uuid import UUID
|
|
4
5
|
|
|
5
6
|
import httpx
|
|
6
7
|
|
|
7
8
|
from ... import errors
|
|
8
9
|
from ...client import AuthenticatedClient, Client
|
|
9
10
|
from ...models.error_response import ErrorResponse
|
|
10
|
-
from ...models.
|
|
11
|
+
from ...models.user_account_detail import UserAccountDetail
|
|
12
|
+
from ...models.user_account_role_name import UserAccountRoleName
|
|
11
13
|
from ...types import Response
|
|
12
14
|
|
|
13
15
|
|
|
14
16
|
def _get_kwargs(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
user_id: UUID,
|
|
18
|
+
role: UserAccountRoleName,
|
|
17
19
|
) -> dict[str, Any]:
|
|
18
20
|
|
|
19
21
|
_kwargs: dict[str, Any] = {
|
|
20
22
|
"method": "put",
|
|
21
|
-
"url": "/api/v1/
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
"url": "/api/v1/auth/users/{user_id}/roles/{role}".format(
|
|
24
|
+
user_id=quote(str(user_id), safe=""),
|
|
25
|
+
role=quote(str(role), safe=""),
|
|
24
26
|
),
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -29,9 +31,9 @@ def _get_kwargs(
|
|
|
29
31
|
|
|
30
32
|
def _parse_response(
|
|
31
33
|
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
32
|
-
) -> ErrorResponse |
|
|
34
|
+
) -> ErrorResponse | UserAccountDetail | None:
|
|
33
35
|
if response.status_code == 200:
|
|
34
|
-
response_200 =
|
|
36
|
+
response_200 = UserAccountDetail.from_dict(response.json())
|
|
35
37
|
|
|
36
38
|
return response_200
|
|
37
39
|
|
|
@@ -63,7 +65,7 @@ def _parse_response(
|
|
|
63
65
|
|
|
64
66
|
def _build_response(
|
|
65
67
|
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
66
|
-
) -> Response[ErrorResponse |
|
|
68
|
+
) -> Response[ErrorResponse | UserAccountDetail]:
|
|
67
69
|
return Response(
|
|
68
70
|
status_code=HTTPStatus(response.status_code),
|
|
69
71
|
content=response.content,
|
|
@@ -73,30 +75,30 @@ def _build_response(
|
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
def sync_detailed(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
user_id: UUID,
|
|
79
|
+
role: UserAccountRoleName,
|
|
78
80
|
*,
|
|
79
81
|
client: AuthenticatedClient,
|
|
80
|
-
) -> Response[ErrorResponse |
|
|
81
|
-
"""Add User
|
|
82
|
+
) -> Response[ErrorResponse | UserAccountDetail]:
|
|
83
|
+
"""Add User Role
|
|
82
84
|
|
|
83
|
-
|
|
85
|
+
Give the account a stored role. Idempotent: a role it already holds changes nothing.
|
|
84
86
|
|
|
85
87
|
Args:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
user_id (UUID): ID of the user account.
|
|
89
|
+
role (UserAccountRoleName):
|
|
88
90
|
|
|
89
91
|
Raises:
|
|
90
92
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
91
93
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
92
94
|
|
|
93
95
|
Returns:
|
|
94
|
-
Response[ErrorResponse |
|
|
96
|
+
Response[ErrorResponse | UserAccountDetail]
|
|
95
97
|
"""
|
|
96
98
|
|
|
97
99
|
kwargs = _get_kwargs(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
user_id=user_id,
|
|
101
|
+
role=role,
|
|
100
102
|
)
|
|
101
103
|
|
|
102
104
|
response = client.get_httpx_client().request(
|
|
@@ -107,59 +109,59 @@ def sync_detailed(
|
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
def sync(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
user_id: UUID,
|
|
113
|
+
role: UserAccountRoleName,
|
|
112
114
|
*,
|
|
113
115
|
client: AuthenticatedClient,
|
|
114
|
-
) -> ErrorResponse |
|
|
115
|
-
"""Add User
|
|
116
|
+
) -> ErrorResponse | UserAccountDetail | None:
|
|
117
|
+
"""Add User Role
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
Give the account a stored role. Idempotent: a role it already holds changes nothing.
|
|
118
120
|
|
|
119
121
|
Args:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
user_id (UUID): ID of the user account.
|
|
123
|
+
role (UserAccountRoleName):
|
|
122
124
|
|
|
123
125
|
Raises:
|
|
124
126
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
125
127
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
126
128
|
|
|
127
129
|
Returns:
|
|
128
|
-
ErrorResponse |
|
|
130
|
+
ErrorResponse | UserAccountDetail
|
|
129
131
|
"""
|
|
130
132
|
|
|
131
133
|
return sync_detailed(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
user_id=user_id,
|
|
135
|
+
role=role,
|
|
134
136
|
client=client,
|
|
135
137
|
).parsed
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
async def asyncio_detailed(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
user_id: UUID,
|
|
142
|
+
role: UserAccountRoleName,
|
|
141
143
|
*,
|
|
142
144
|
client: AuthenticatedClient,
|
|
143
|
-
) -> Response[ErrorResponse |
|
|
144
|
-
"""Add User
|
|
145
|
+
) -> Response[ErrorResponse | UserAccountDetail]:
|
|
146
|
+
"""Add User Role
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
Give the account a stored role. Idempotent: a role it already holds changes nothing.
|
|
147
149
|
|
|
148
150
|
Args:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
user_id (UUID): ID of the user account.
|
|
152
|
+
role (UserAccountRoleName):
|
|
151
153
|
|
|
152
154
|
Raises:
|
|
153
155
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
154
156
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
155
157
|
|
|
156
158
|
Returns:
|
|
157
|
-
Response[ErrorResponse |
|
|
159
|
+
Response[ErrorResponse | UserAccountDetail]
|
|
158
160
|
"""
|
|
159
161
|
|
|
160
162
|
kwargs = _get_kwargs(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
user_id=user_id,
|
|
164
|
+
role=role,
|
|
163
165
|
)
|
|
164
166
|
|
|
165
167
|
response = await client.get_async_httpx_client().request(**kwargs)
|
|
@@ -168,31 +170,31 @@ async def asyncio_detailed(
|
|
|
168
170
|
|
|
169
171
|
|
|
170
172
|
async def asyncio(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
user_id: UUID,
|
|
174
|
+
role: UserAccountRoleName,
|
|
173
175
|
*,
|
|
174
176
|
client: AuthenticatedClient,
|
|
175
|
-
) -> ErrorResponse |
|
|
176
|
-
"""Add User
|
|
177
|
+
) -> ErrorResponse | UserAccountDetail | None:
|
|
178
|
+
"""Add User Role
|
|
177
179
|
|
|
178
|
-
|
|
180
|
+
Give the account a stored role. Idempotent: a role it already holds changes nothing.
|
|
179
181
|
|
|
180
182
|
Args:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
user_id (UUID): ID of the user account.
|
|
184
|
+
role (UserAccountRoleName):
|
|
183
185
|
|
|
184
186
|
Raises:
|
|
185
187
|
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
186
188
|
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
187
189
|
|
|
188
190
|
Returns:
|
|
189
|
-
ErrorResponse |
|
|
191
|
+
ErrorResponse | UserAccountDetail
|
|
190
192
|
"""
|
|
191
193
|
|
|
192
194
|
return (
|
|
193
195
|
await asyncio_detailed(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
+
user_id=user_id,
|
|
197
|
+
role=role,
|
|
196
198
|
client=client,
|
|
197
199
|
)
|
|
198
200
|
).parsed
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.access_token_response import AccessTokenResponse
|
|
9
|
+
from ...models.body_auth_create_token import BodyAuthCreateToken
|
|
10
|
+
from ...models.error_response import ErrorResponse
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
*,
|
|
16
|
+
body: BodyAuthCreateToken,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
headers: dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
_kwargs: dict[str, Any] = {
|
|
21
|
+
"method": "post",
|
|
22
|
+
"url": "/api/v1/auth/token",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_kwargs["data"] = body.to_dict()
|
|
26
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded"
|
|
27
|
+
|
|
28
|
+
_kwargs["headers"] = headers
|
|
29
|
+
return _kwargs
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(
|
|
33
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
34
|
+
) -> AccessTokenResponse | ErrorResponse | None:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = AccessTokenResponse.from_dict(response.json())
|
|
37
|
+
|
|
38
|
+
return response_200
|
|
39
|
+
|
|
40
|
+
if response.status_code == 400:
|
|
41
|
+
response_400 = ErrorResponse.from_dict(response.json())
|
|
42
|
+
|
|
43
|
+
return response_400
|
|
44
|
+
|
|
45
|
+
if response.status_code == 401:
|
|
46
|
+
response_401 = ErrorResponse.from_dict(response.json())
|
|
47
|
+
|
|
48
|
+
return response_401
|
|
49
|
+
|
|
50
|
+
if response.status_code == 422:
|
|
51
|
+
response_422 = ErrorResponse.from_dict(response.json())
|
|
52
|
+
|
|
53
|
+
return response_422
|
|
54
|
+
|
|
55
|
+
if client.raise_on_unexpected_status:
|
|
56
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
57
|
+
else:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _build_response(
|
|
62
|
+
*, client: AuthenticatedClient | Client, response: httpx.Response
|
|
63
|
+
) -> Response[AccessTokenResponse | ErrorResponse]:
|
|
64
|
+
return Response(
|
|
65
|
+
status_code=HTTPStatus(response.status_code),
|
|
66
|
+
content=response.content,
|
|
67
|
+
headers=response.headers,
|
|
68
|
+
parsed=_parse_response(client=client, response=response),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync_detailed(
|
|
73
|
+
*,
|
|
74
|
+
client: AuthenticatedClient | Client,
|
|
75
|
+
body: BodyAuthCreateToken,
|
|
76
|
+
) -> Response[AccessTokenResponse | ErrorResponse]:
|
|
77
|
+
r"""Create Token
|
|
78
|
+
|
|
79
|
+
Issue an access token.
|
|
80
|
+
|
|
81
|
+
The client authenticates for every grant, with HTTP Basic or `client_id` / `client_secret` in the
|
|
82
|
+
form.
|
|
83
|
+
`client_credentials` issues a token of the client's own. `password` logs a person in and opens a
|
|
84
|
+
session;
|
|
85
|
+
`refresh_token` renews it and replaces its refresh token. Both need `auth:users:login` granted to
|
|
86
|
+
the client
|
|
87
|
+
in `application` mode. Every failure of the person's credentials or refresh token is the same
|
|
88
|
+
`invalid_grant`.
|
|
89
|
+
|
|
90
|
+
`urn:skillforge:params:oauth:grant-type:discord-user` exchanges the Discord user in
|
|
91
|
+
`discord_user_id` - the one
|
|
92
|
+
who sent a command, never one named in it - for a token of the person party it is actively linked
|
|
93
|
+
to. It needs
|
|
94
|
+
`auth:users:exchange` granted to the client in `application` mode. The token carries `amr:
|
|
95
|
+
[\"discord\"]` and at
|
|
96
|
+
most `crm:read`, `crm:read:own` and `crm:write`, within the client's `delegated` grants and the
|
|
97
|
+
person's roles.
|
|
98
|
+
No refresh token and no session: exchange again when it expires. No active link, no account and a
|
|
99
|
+
disabled
|
|
100
|
+
account are the same `invalid_grant`. Swagger UI's Authorize dialog cannot use this grant; try it
|
|
101
|
+
with curl.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
body (BodyAuthCreateToken):
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
Response[AccessTokenResponse | ErrorResponse]
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
kwargs = _get_kwargs(
|
|
115
|
+
body=body,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
response = client.get_httpx_client().request(
|
|
119
|
+
**kwargs,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
return _build_response(client=client, response=response)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def sync(
|
|
126
|
+
*,
|
|
127
|
+
client: AuthenticatedClient | Client,
|
|
128
|
+
body: BodyAuthCreateToken,
|
|
129
|
+
) -> AccessTokenResponse | ErrorResponse | None:
|
|
130
|
+
r"""Create Token
|
|
131
|
+
|
|
132
|
+
Issue an access token.
|
|
133
|
+
|
|
134
|
+
The client authenticates for every grant, with HTTP Basic or `client_id` / `client_secret` in the
|
|
135
|
+
form.
|
|
136
|
+
`client_credentials` issues a token of the client's own. `password` logs a person in and opens a
|
|
137
|
+
session;
|
|
138
|
+
`refresh_token` renews it and replaces its refresh token. Both need `auth:users:login` granted to
|
|
139
|
+
the client
|
|
140
|
+
in `application` mode. Every failure of the person's credentials or refresh token is the same
|
|
141
|
+
`invalid_grant`.
|
|
142
|
+
|
|
143
|
+
`urn:skillforge:params:oauth:grant-type:discord-user` exchanges the Discord user in
|
|
144
|
+
`discord_user_id` - the one
|
|
145
|
+
who sent a command, never one named in it - for a token of the person party it is actively linked
|
|
146
|
+
to. It needs
|
|
147
|
+
`auth:users:exchange` granted to the client in `application` mode. The token carries `amr:
|
|
148
|
+
[\"discord\"]` and at
|
|
149
|
+
most `crm:read`, `crm:read:own` and `crm:write`, within the client's `delegated` grants and the
|
|
150
|
+
person's roles.
|
|
151
|
+
No refresh token and no session: exchange again when it expires. No active link, no account and a
|
|
152
|
+
disabled
|
|
153
|
+
account are the same `invalid_grant`. Swagger UI's Authorize dialog cannot use this grant; try it
|
|
154
|
+
with curl.
|
|
155
|
+
|
|
156
|
+
Args:
|
|
157
|
+
body (BodyAuthCreateToken):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
AccessTokenResponse | ErrorResponse
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
return sync_detailed(
|
|
168
|
+
client=client,
|
|
169
|
+
body=body,
|
|
170
|
+
).parsed
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
async def asyncio_detailed(
|
|
174
|
+
*,
|
|
175
|
+
client: AuthenticatedClient | Client,
|
|
176
|
+
body: BodyAuthCreateToken,
|
|
177
|
+
) -> Response[AccessTokenResponse | ErrorResponse]:
|
|
178
|
+
r"""Create Token
|
|
179
|
+
|
|
180
|
+
Issue an access token.
|
|
181
|
+
|
|
182
|
+
The client authenticates for every grant, with HTTP Basic or `client_id` / `client_secret` in the
|
|
183
|
+
form.
|
|
184
|
+
`client_credentials` issues a token of the client's own. `password` logs a person in and opens a
|
|
185
|
+
session;
|
|
186
|
+
`refresh_token` renews it and replaces its refresh token. Both need `auth:users:login` granted to
|
|
187
|
+
the client
|
|
188
|
+
in `application` mode. Every failure of the person's credentials or refresh token is the same
|
|
189
|
+
`invalid_grant`.
|
|
190
|
+
|
|
191
|
+
`urn:skillforge:params:oauth:grant-type:discord-user` exchanges the Discord user in
|
|
192
|
+
`discord_user_id` - the one
|
|
193
|
+
who sent a command, never one named in it - for a token of the person party it is actively linked
|
|
194
|
+
to. It needs
|
|
195
|
+
`auth:users:exchange` granted to the client in `application` mode. The token carries `amr:
|
|
196
|
+
[\"discord\"]` and at
|
|
197
|
+
most `crm:read`, `crm:read:own` and `crm:write`, within the client's `delegated` grants and the
|
|
198
|
+
person's roles.
|
|
199
|
+
No refresh token and no session: exchange again when it expires. No active link, no account and a
|
|
200
|
+
disabled
|
|
201
|
+
account are the same `invalid_grant`. Swagger UI's Authorize dialog cannot use this grant; try it
|
|
202
|
+
with curl.
|
|
203
|
+
|
|
204
|
+
Args:
|
|
205
|
+
body (BodyAuthCreateToken):
|
|
206
|
+
|
|
207
|
+
Raises:
|
|
208
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
209
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
210
|
+
|
|
211
|
+
Returns:
|
|
212
|
+
Response[AccessTokenResponse | ErrorResponse]
|
|
213
|
+
"""
|
|
214
|
+
|
|
215
|
+
kwargs = _get_kwargs(
|
|
216
|
+
body=body,
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
220
|
+
|
|
221
|
+
return _build_response(client=client, response=response)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
async def asyncio(
|
|
225
|
+
*,
|
|
226
|
+
client: AuthenticatedClient | Client,
|
|
227
|
+
body: BodyAuthCreateToken,
|
|
228
|
+
) -> AccessTokenResponse | ErrorResponse | None:
|
|
229
|
+
r"""Create Token
|
|
230
|
+
|
|
231
|
+
Issue an access token.
|
|
232
|
+
|
|
233
|
+
The client authenticates for every grant, with HTTP Basic or `client_id` / `client_secret` in the
|
|
234
|
+
form.
|
|
235
|
+
`client_credentials` issues a token of the client's own. `password` logs a person in and opens a
|
|
236
|
+
session;
|
|
237
|
+
`refresh_token` renews it and replaces its refresh token. Both need `auth:users:login` granted to
|
|
238
|
+
the client
|
|
239
|
+
in `application` mode. Every failure of the person's credentials or refresh token is the same
|
|
240
|
+
`invalid_grant`.
|
|
241
|
+
|
|
242
|
+
`urn:skillforge:params:oauth:grant-type:discord-user` exchanges the Discord user in
|
|
243
|
+
`discord_user_id` - the one
|
|
244
|
+
who sent a command, never one named in it - for a token of the person party it is actively linked
|
|
245
|
+
to. It needs
|
|
246
|
+
`auth:users:exchange` granted to the client in `application` mode. The token carries `amr:
|
|
247
|
+
[\"discord\"]` and at
|
|
248
|
+
most `crm:read`, `crm:read:own` and `crm:write`, within the client's `delegated` grants and the
|
|
249
|
+
person's roles.
|
|
250
|
+
No refresh token and no session: exchange again when it expires. No active link, no account and a
|
|
251
|
+
disabled
|
|
252
|
+
account are the same `invalid_grant`. Swagger UI's Authorize dialog cannot use this grant; try it
|
|
253
|
+
with curl.
|
|
254
|
+
|
|
255
|
+
Args:
|
|
256
|
+
body (BodyAuthCreateToken):
|
|
257
|
+
|
|
258
|
+
Raises:
|
|
259
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
260
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
261
|
+
|
|
262
|
+
Returns:
|
|
263
|
+
AccessTokenResponse | ErrorResponse
|
|
264
|
+
"""
|
|
265
|
+
|
|
266
|
+
return (
|
|
267
|
+
await asyncio_detailed(
|
|
268
|
+
client=client,
|
|
269
|
+
body=body,
|
|
270
|
+
)
|
|
271
|
+
).parsed
|