shellrent-sdk 0.1.0__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.
- shellrent_sdk/__init__.py +22 -0
- shellrent_sdk/__main__.py +5 -0
- shellrent_sdk/_errors.py +54 -0
- shellrent_sdk/_factory.py +48 -0
- shellrent_sdk/auth.py +527 -0
- shellrent_sdk/cli.py +220 -0
- shellrent_sdk/client/__init__.py +8 -0
- shellrent_sdk/client/api/__init__.py +1 -0
- shellrent_sdk/client/api/account/__init__.py +1 -0
- shellrent_sdk/client/api/account/create_sub_account.py +194 -0
- shellrent_sdk/client/api/account/delete_sub_account.py +189 -0
- shellrent_sdk/client/api/account/get_account.py +162 -0
- shellrent_sdk/client/api/account/get_sub_account.py +189 -0
- shellrent_sdk/client/api/account/list_sub_accounts.py +209 -0
- shellrent_sdk/client/api/account/update_sub_account.py +210 -0
- shellrent_sdk/client/api/account/upload_file.py +195 -0
- shellrent_sdk/client/api/billing/__init__.py +1 -0
- shellrent_sdk/client/api/billing/download_credit_note_pdf.py +189 -0
- shellrent_sdk/client/api/billing/download_credit_note_xml.py +210 -0
- shellrent_sdk/client/api/billing/download_invoice_pdf.py +189 -0
- shellrent_sdk/client/api/billing/download_invoice_xml.py +210 -0
- shellrent_sdk/client/api/billing/get_credit_note.py +189 -0
- shellrent_sdk/client/api/billing/get_credit_note_row.py +203 -0
- shellrent_sdk/client/api/billing/get_invoice.py +189 -0
- shellrent_sdk/client/api/billing/get_invoice_row.py +203 -0
- shellrent_sdk/client/api/billing/list_credit_note_rows.py +189 -0
- shellrent_sdk/client/api/billing/list_credit_notes.py +246 -0
- shellrent_sdk/client/api/billing/list_invoice_rows.py +189 -0
- shellrent_sdk/client/api/billing/list_invoices.py +261 -0
- shellrent_sdk/client/api/domains/__init__.py +1 -0
- shellrent_sdk/client/api/domains/activate_domain_dnssec.py +189 -0
- shellrent_sdk/client/api/domains/apply_domain_contact_changes.py +189 -0
- shellrent_sdk/client/api/domains/can_activate_domain_dnssec.py +189 -0
- shellrent_sdk/client/api/domains/can_change_domain_nameservers.py +189 -0
- shellrent_sdk/client/api/domains/can_deactivate_domain_dnssec.py +189 -0
- shellrent_sdk/client/api/domains/check_domain_availability.py +194 -0
- shellrent_sdk/client/api/domains/create_domain_dns_record.py +210 -0
- shellrent_sdk/client/api/domains/deactivate_domain_dnssec.py +193 -0
- shellrent_sdk/client/api/domains/delete_domain_dns_record.py +203 -0
- shellrent_sdk/client/api/domains/get_domain.py +189 -0
- shellrent_sdk/client/api/domains/get_domain_contact.py +203 -0
- shellrent_sdk/client/api/domains/get_domain_dns_record.py +203 -0
- shellrent_sdk/client/api/domains/get_domain_dns_zone.py +189 -0
- shellrent_sdk/client/api/domains/get_domain_dnssec.py +189 -0
- shellrent_sdk/client/api/domains/list_domain_contacts.py +189 -0
- shellrent_sdk/client/api/domains/list_domain_dns_records.py +278 -0
- shellrent_sdk/client/api/domains/list_domains.py +269 -0
- shellrent_sdk/client/api/domains/set_domain_cloudflare_nameservers.py +212 -0
- shellrent_sdk/client/api/domains/set_domain_external_nameservers.py +210 -0
- shellrent_sdk/client/api/domains/set_domain_standard_nameservers.py +189 -0
- shellrent_sdk/client/api/domains/update_domain_contact.py +224 -0
- shellrent_sdk/client/api/domains/update_domain_dns_record.py +224 -0
- shellrent_sdk/client/api/domains/update_domain_dns_zone.py +210 -0
- shellrent_sdk/client/api/domains/update_domain_dnssec.py +210 -0
- shellrent_sdk/client/api/health/__init__.py +1 -0
- shellrent_sdk/client/api/health/get_health.py +152 -0
- shellrent_sdk/client/api/hosting/__init__.py +1 -0
- shellrent_sdk/client/api/hosting/create_hosting_allow_list_entry.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_block_list_entry.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_catch_all.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_cronjob.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_database.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_email_alias.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_mod_security_rule.py +210 -0
- shellrent_sdk/client/api/hosting/create_hosting_subdomain.py +210 -0
- shellrent_sdk/client/api/hosting/delete_all_hosting_mod_security_rules.py +189 -0
- shellrent_sdk/client/api/hosting/delete_hosting_allow_list_entry.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_block_list_entry.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_catch_all.py +189 -0
- shellrent_sdk/client/api/hosting/delete_hosting_cronjob.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_email_alias.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_exposed_backup.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_mod_security_rule.py +203 -0
- shellrent_sdk/client/api/hosting/delete_hosting_subdomain.py +189 -0
- shellrent_sdk/client/api/hosting/enable_hosting_mod_security_rules.py +210 -0
- shellrent_sdk/client/api/hosting/expose_hosting_backups.py +210 -0
- shellrent_sdk/client/api/hosting/get_hosting.py +189 -0
- shellrent_sdk/client/api/hosting/get_hosting_allow_list_entry.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_antivirus.py +189 -0
- shellrent_sdk/client/api/hosting/get_hosting_antivirus_removal_scan.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_antivirus_scan.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_backup.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_block_list_entry.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_catch_all.py +189 -0
- shellrent_sdk/client/api/hosting/get_hosting_credentials.py +189 -0
- shellrent_sdk/client/api/hosting/get_hosting_cronjob.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_database.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_email_alias.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_mod_security.py +189 -0
- shellrent_sdk/client/api/hosting/get_hosting_mod_security_rule.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_mod_security_scan.py +203 -0
- shellrent_sdk/client/api/hosting/get_hosting_ssl_certificate.py +203 -0
- shellrent_sdk/client/api/hosting/install_hosting_ssl_certificate.py +211 -0
- shellrent_sdk/client/api/hosting/list_hosting_allow_list_entries.py +227 -0
- shellrent_sdk/client/api/hosting/list_hosting_antivirus_removal_scans.py +227 -0
- shellrent_sdk/client/api/hosting/list_hosting_antivirus_scans.py +227 -0
- shellrent_sdk/client/api/hosting/list_hosting_backups.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_block_list_entries.py +227 -0
- shellrent_sdk/client/api/hosting/list_hosting_cronjobs.py +225 -0
- shellrent_sdk/client/api/hosting/list_hosting_databases.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_dns_records.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_email_aliases.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_exposed_backups.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_mod_security_rules.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_mod_security_scans.py +227 -0
- shellrent_sdk/client/api/hosting/list_hosting_php_versions.py +189 -0
- shellrent_sdk/client/api/hosting/list_hosting_ssl_certificates.py +189 -0
- shellrent_sdk/client/api/hosting/list_hostings.py +209 -0
- shellrent_sdk/client/api/hosting/remove_hosting_ssl_certificate.py +203 -0
- shellrent_sdk/client/api/hosting/restore_hosting_backup.py +203 -0
- shellrent_sdk/client/api/hosting/start_hosting_antivirus_removal_scan.py +189 -0
- shellrent_sdk/client/api/hosting/start_hosting_antivirus_scan.py +189 -0
- shellrent_sdk/client/api/hosting/start_hosting_first_backup.py +189 -0
- shellrent_sdk/client/api/hosting/update_hosting_catch_all.py +210 -0
- shellrent_sdk/client/api/hosting/update_hosting_file_protection.py +210 -0
- shellrent_sdk/client/api/hosting/update_hosting_http_version.py +210 -0
- shellrent_sdk/client/api/hosting/update_hosting_mod_security.py +210 -0
- shellrent_sdk/client/api/hosting/update_hosting_php_settings.py +210 -0
- shellrent_sdk/client/api/hosting/update_hosting_php_version.py +210 -0
- shellrent_sdk/client/api/license_/__init__.py +1 -0
- shellrent_sdk/client/api/license_/downgrade_microsoft_365_subscription_quantity.py +212 -0
- shellrent_sdk/client/api/license_/downgrade_secure_mail_quantity.py +214 -0
- shellrent_sdk/client/api/license_/get_cpanel_license.py +189 -0
- shellrent_sdk/client/api/license_/get_microsoft_365_partner_link.py +189 -0
- shellrent_sdk/client/api/license_/get_microsoft_365_subscription.py +189 -0
- shellrent_sdk/client/api/license_/get_microsoft_365_tenant.py +189 -0
- shellrent_sdk/client/api/license_/get_plesk_license.py +189 -0
- shellrent_sdk/client/api/license_/get_secure_mail.py +189 -0
- shellrent_sdk/client/api/license_/get_secure_mail_statistics.py +189 -0
- shellrent_sdk/client/api/license_/list_cpanel_licenses.py +209 -0
- shellrent_sdk/client/api/license_/list_microsoft_365_subscriptions.py +209 -0
- shellrent_sdk/client/api/license_/list_microsoft_365_tenants.py +211 -0
- shellrent_sdk/client/api/license_/list_plesk_licenses.py +209 -0
- shellrent_sdk/client/api/license_/list_secure_mail_mailboxes.py +227 -0
- shellrent_sdk/client/api/license_/list_secure_mails.py +209 -0
- shellrent_sdk/client/api/license_/upgrade_microsoft_365_subscription_quantity.py +212 -0
- shellrent_sdk/client/api/license_/upgrade_secure_mail_quantity.py +214 -0
- shellrent_sdk/client/api/monitoring/__init__.py +1 -0
- shellrent_sdk/client/api/monitoring/create_server_monitoring_probe.py +210 -0
- shellrent_sdk/client/api/monitoring/delete_server_monitoring_probe.py +203 -0
- shellrent_sdk/client/api/monitoring/get_server_monitoring.py +189 -0
- shellrent_sdk/client/api/monitoring/get_server_monitoring_probe.py +203 -0
- shellrent_sdk/client/api/monitoring/get_server_monitoring_probe_chart.py +203 -0
- shellrent_sdk/client/api/monitoring/get_web_monitoring.py +189 -0
- shellrent_sdk/client/api/monitoring/get_web_monitoring_availability_chart.py +191 -0
- shellrent_sdk/client/api/monitoring/get_web_monitoring_download_speed_chart.py +191 -0
- shellrent_sdk/client/api/monitoring/get_web_monitoring_notices.py +189 -0
- shellrent_sdk/client/api/monitoring/get_web_monitoring_response_time_chart.py +191 -0
- shellrent_sdk/client/api/monitoring/list_server_monitoring_probes.py +189 -0
- shellrent_sdk/client/api/monitoring/list_server_monitorings.py +211 -0
- shellrent_sdk/client/api/monitoring/list_web_monitorings.py +209 -0
- shellrent_sdk/client/api/monitoring/update_server_monitoring_probe.py +224 -0
- shellrent_sdk/client/api/monitoring/update_web_monitoring_notices.py +210 -0
- shellrent_sdk/client/api/o_auth/__init__.py +1 -0
- shellrent_sdk/client/api/o_auth/get_jwks.py +142 -0
- shellrent_sdk/client/api/o_auth/request_access_token.py +204 -0
- shellrent_sdk/client/api/payment/__init__.py +1 -0
- shellrent_sdk/client/api/payment/activate_one_click_autorenew.py +162 -0
- shellrent_sdk/client/api/payment/activate_prepaid_credit_autorenew.py +162 -0
- shellrent_sdk/client/api/payment/create_prepaid_credit_topup.py +194 -0
- shellrent_sdk/client/api/payment/get_one_click.py +189 -0
- shellrent_sdk/client/api/payment/get_one_click_autorenew.py +162 -0
- shellrent_sdk/client/api/payment/get_payment.py +189 -0
- shellrent_sdk/client/api/payment/get_prepaid_credit.py +162 -0
- shellrent_sdk/client/api/payment/get_prepaid_credit_operation.py +189 -0
- shellrent_sdk/client/api/payment/get_prepaid_credit_topup.py +189 -0
- shellrent_sdk/client/api/payment/list_one_clicks.py +261 -0
- shellrent_sdk/client/api/payment/list_payments.py +261 -0
- shellrent_sdk/client/api/payment/list_prepaid_credit_operations.py +248 -0
- shellrent_sdk/client/api/payment/list_prepaid_credit_topups.py +308 -0
- shellrent_sdk/client/api/payment/revoke_one_click_autorenew.py +162 -0
- shellrent_sdk/client/api/payment/revoke_prepaid_credit_autorenew.py +162 -0
- shellrent_sdk/client/api/pec/__init__.py +1 -0
- shellrent_sdk/client/api/pec/create_pec_domain_owner_change.py +210 -0
- shellrent_sdk/client/api/pec/create_pec_mailbox_owner_change.py +210 -0
- shellrent_sdk/client/api/pec/get_pec_domain.py +189 -0
- shellrent_sdk/client/api/pec/get_pec_domain_owner_change.py +203 -0
- shellrent_sdk/client/api/pec/get_pec_mailbox.py +189 -0
- shellrent_sdk/client/api/pec/list_pec_domain_owner_changes.py +225 -0
- shellrent_sdk/client/api/pec/list_pec_domains.py +209 -0
- shellrent_sdk/client/api/pec/list_pec_mailbox_owner_changes.py +225 -0
- shellrent_sdk/client/api/pec/list_pec_mailboxes.py +209 -0
- shellrent_sdk/client/api/pec/update_pec_mailbox.py +210 -0
- shellrent_sdk/client/api/purchases/__init__.py +1 -0
- shellrent_sdk/client/api/purchases/can_add_purchase_additional.py +189 -0
- shellrent_sdk/client/api/purchases/can_cancel_purchase.py +189 -0
- shellrent_sdk/client/api/purchases/can_change_purchase_recurrence.py +203 -0
- shellrent_sdk/client/api/purchases/can_change_purchase_renew_status.py +203 -0
- shellrent_sdk/client/api/purchases/can_change_purchase_service.py +193 -0
- shellrent_sdk/client/api/purchases/can_renew_purchase.py +189 -0
- shellrent_sdk/client/api/purchases/cancel_purchase.py +189 -0
- shellrent_sdk/client/api/purchases/change_purchase_recurrence.py +215 -0
- shellrent_sdk/client/api/purchases/change_purchase_renew_status.py +215 -0
- shellrent_sdk/client/api/purchases/complete_task_data.py +210 -0
- shellrent_sdk/client/api/purchases/delete_purchase_billing_info.py +189 -0
- shellrent_sdk/client/api/purchases/delete_purchase_comment.py +189 -0
- shellrent_sdk/client/api/purchases/get_purchase.py +189 -0
- shellrent_sdk/client/api/purchases/get_task.py +189 -0
- shellrent_sdk/client/api/purchases/list_purchases.py +406 -0
- shellrent_sdk/client/api/purchases/list_tasks.py +254 -0
- shellrent_sdk/client/api/purchases/renew_purchase.py +189 -0
- shellrent_sdk/client/api/purchases/update_purchase_billing_info.py +215 -0
- shellrent_sdk/client/api/purchases/update_purchase_comment.py +215 -0
- shellrent_sdk/client/api/server/__init__.py +1 -0
- shellrent_sdk/client/api/server/can_hard_reboot_server.py +189 -0
- shellrent_sdk/client/api/server/can_hard_stop_server.py +189 -0
- shellrent_sdk/client/api/server/can_reboot_server.py +189 -0
- shellrent_sdk/client/api/server/can_start_server.py +189 -0
- shellrent_sdk/client/api/server/can_stop_server.py +189 -0
- shellrent_sdk/client/api/server/create_private_cloud_virtual_machine.py +210 -0
- shellrent_sdk/client/api/server/create_server_automatic_snapshot.py +210 -0
- shellrent_sdk/client/api/server/create_server_network_interface.py +210 -0
- shellrent_sdk/client/api/server/delete_private_cloud_virtual_machine.py +203 -0
- shellrent_sdk/client/api/server/delete_server_automatic_snapshot.py +189 -0
- shellrent_sdk/client/api/server/delete_server_exposed_backups.py +189 -0
- shellrent_sdk/client/api/server/delete_server_ip_address_reverse_dns.py +203 -0
- shellrent_sdk/client/api/server/delete_server_network_interface.py +203 -0
- shellrent_sdk/client/api/server/delete_server_snapshot.py +203 -0
- shellrent_sdk/client/api/server/expose_server_backup.py +210 -0
- shellrent_sdk/client/api/server/get_server.py +189 -0
- shellrent_sdk/client/api/server/get_server_automatic_snapshot.py +189 -0
- shellrent_sdk/client/api/server/get_server_backup.py +203 -0
- shellrent_sdk/client/api/server/get_server_ip_address.py +203 -0
- shellrent_sdk/client/api/server/get_server_network_interface.py +203 -0
- shellrent_sdk/client/api/server/get_server_private_cloud.py +189 -0
- shellrent_sdk/client/api/server/get_server_snapshot.py +203 -0
- shellrent_sdk/client/api/server/hard_reboot_server.py +189 -0
- shellrent_sdk/client/api/server/hard_stop_server.py +189 -0
- shellrent_sdk/client/api/server/list_server_backups.py +189 -0
- shellrent_sdk/client/api/server/list_server_credentials.py +189 -0
- shellrent_sdk/client/api/server/list_server_exposed_backups.py +189 -0
- shellrent_sdk/client/api/server/list_server_ip_addresses.py +189 -0
- shellrent_sdk/client/api/server/list_server_network_interfaces.py +189 -0
- shellrent_sdk/client/api/server/list_server_snapshots.py +225 -0
- shellrent_sdk/client/api/server/list_servers.py +209 -0
- shellrent_sdk/client/api/server/reboot_server.py +189 -0
- shellrent_sdk/client/api/server/reinstall_server.py +211 -0
- shellrent_sdk/client/api/server/restore_server_backup.py +203 -0
- shellrent_sdk/client/api/server/restore_server_snapshot.py +203 -0
- shellrent_sdk/client/api/server/start_server.py +189 -0
- shellrent_sdk/client/api/server/start_server_first_backup.py +189 -0
- shellrent_sdk/client/api/server/stop_server.py +189 -0
- shellrent_sdk/client/api/server/update_private_cloud_virtual_machine.py +224 -0
- shellrent_sdk/client/api/server/update_server_automatic_snapshot.py +210 -0
- shellrent_sdk/client/api/server/update_server_ip_address_reverse_dns.py +224 -0
- shellrent_sdk/client/api/shop/__init__.py +1 -0
- shellrent_sdk/client/api/shop/buy_active_monitoring.py +194 -0
- shellrent_sdk/client/api/shop/buy_cloud_storage.py +194 -0
- shellrent_sdk/client/api/shop/buy_cloud_vps.py +194 -0
- shellrent_sdk/client/api/shop/buy_cpanel_license.py +194 -0
- shellrent_sdk/client/api/shop/buy_dedicated_server.py +194 -0
- shellrent_sdk/client/api/shop/buy_domain.py +194 -0
- shellrent_sdk/client/api/shop/buy_microsoft_365_subscription.py +194 -0
- shellrent_sdk/client/api/shop/buy_object_storage.py +194 -0
- shellrent_sdk/client/api/shop/buy_pec.py +194 -0
- shellrent_sdk/client/api/shop/buy_pec_domain.py +194 -0
- shellrent_sdk/client/api/shop/buy_plesk_license.py +194 -0
- shellrent_sdk/client/api/shop/buy_private_cloud_sv.py +194 -0
- shellrent_sdk/client/api/shop/buy_secure_mail.py +194 -0
- shellrent_sdk/client/api/shop/buy_secure_mail_for_google_workspace.py +196 -0
- shellrent_sdk/client/api/shop/buy_secure_mail_for_microsoft_365.py +196 -0
- shellrent_sdk/client/api/shop/buy_sms_topup.py +194 -0
- shellrent_sdk/client/api/shop/buy_ssl_certificate.py +194 -0
- shellrent_sdk/client/api/shop/buy_veeam_baas.py +194 -0
- shellrent_sdk/client/api/shop/can_cancel_order.py +189 -0
- shellrent_sdk/client/api/shop/can_pay_order.py +189 -0
- shellrent_sdk/client/api/shop/cancel_order.py +189 -0
- shellrent_sdk/client/api/shop/check_microsoft_365_domain_availability.py +194 -0
- shellrent_sdk/client/api/shop/get_order.py +189 -0
- shellrent_sdk/client/api/shop/get_order_row.py +203 -0
- shellrent_sdk/client/api/shop/get_tld.py +189 -0
- shellrent_sdk/client/api/shop/list_active_monitoring_products.py +209 -0
- shellrent_sdk/client/api/shop/list_cloud_storage_products.py +209 -0
- shellrent_sdk/client/api/shop/list_cloud_vps_products.py +209 -0
- shellrent_sdk/client/api/shop/list_cpanel_license_products.py +209 -0
- shellrent_sdk/client/api/shop/list_dedicated_server_products.py +209 -0
- shellrent_sdk/client/api/shop/list_microsoft_365_products.py +209 -0
- shellrent_sdk/client/api/shop/list_order_rows.py +189 -0
- shellrent_sdk/client/api/shop/list_orders.py +326 -0
- shellrent_sdk/client/api/shop/list_pec_products.py +209 -0
- shellrent_sdk/client/api/shop/list_plesk_license_products.py +209 -0
- shellrent_sdk/client/api/shop/list_private_cloud_sv_products.py +209 -0
- shellrent_sdk/client/api/shop/list_shop_microsoft_365_tenants.py +230 -0
- shellrent_sdk/client/api/shop/list_sms_topup_products.py +209 -0
- shellrent_sdk/client/api/shop/list_ssl_certificate_products.py +209 -0
- shellrent_sdk/client/api/shop/list_tlds.py +269 -0
- shellrent_sdk/client/api/shop/pay_orders.py +222 -0
- shellrent_sdk/client/api/sms/__init__.py +1 -0
- shellrent_sdk/client/api/sms/add_sms_phonebook_contacts.py +210 -0
- shellrent_sdk/client/api/sms/can_cancel_sms.py +189 -0
- shellrent_sdk/client/api/sms/can_delete_sms.py +189 -0
- shellrent_sdk/client/api/sms/cancel_sms.py +189 -0
- shellrent_sdk/client/api/sms/create_sms_phonebook.py +194 -0
- shellrent_sdk/client/api/sms/delete_all_sms_phonebook_contacts.py +189 -0
- shellrent_sdk/client/api/sms/delete_sms.py +189 -0
- shellrent_sdk/client/api/sms/delete_sms_phonebook.py +189 -0
- shellrent_sdk/client/api/sms/delete_sms_phonebook_contact.py +203 -0
- shellrent_sdk/client/api/sms/get_sms.py +189 -0
- shellrent_sdk/client/api/sms/get_sms_credit.py +162 -0
- shellrent_sdk/client/api/sms/get_sms_message.py +203 -0
- shellrent_sdk/client/api/sms/get_sms_phonebook.py +189 -0
- shellrent_sdk/client/api/sms/get_sms_price.py +189 -0
- shellrent_sdk/client/api/sms/list_sms.py +266 -0
- shellrent_sdk/client/api/sms/list_sms_messages.py +189 -0
- shellrent_sdk/client/api/sms/list_sms_phonebook_contacts.py +227 -0
- shellrent_sdk/client/api/sms/list_sms_phonebooks.py +209 -0
- shellrent_sdk/client/api/sms/list_sms_prices.py +162 -0
- shellrent_sdk/client/api/sms/replace_sms_phonebook_contacts.py +210 -0
- shellrent_sdk/client/api/sms/send_sms.py +202 -0
- shellrent_sdk/client/api/sms/update_sms_phonebook.py +210 -0
- shellrent_sdk/client/api/ssl/__init__.py +1 -0
- shellrent_sdk/client/api/ssl/can_reemit_ssl_certificate.py +189 -0
- shellrent_sdk/client/api/ssl/export_ssl_certificate.py +203 -0
- shellrent_sdk/client/api/ssl/get_ssl_certificate.py +189 -0
- shellrent_sdk/client/api/ssl/get_ssl_certificate_keys.py +189 -0
- shellrent_sdk/client/api/ssl/list_ssl_approver_emails.py +189 -0
- shellrent_sdk/client/api/ssl/list_ssl_certificate_export_formats.py +191 -0
- shellrent_sdk/client/api/ssl/list_ssl_certificates.py +239 -0
- shellrent_sdk/client/api/ssl/reemit_ssl_certificate.py +210 -0
- shellrent_sdk/client/api/ssl/update_ssl_certificate_csr.py +210 -0
- shellrent_sdk/client/api/ssl/update_ssl_certificate_owner.py +210 -0
- shellrent_sdk/client/api/storage/__init__.py +1 -0
- shellrent_sdk/client/api/storage/create_cloud_storage_access.py +210 -0
- shellrent_sdk/client/api/storage/create_object_storage_bucket_firewall_entry.py +228 -0
- shellrent_sdk/client/api/storage/create_object_storage_iam_user.py +189 -0
- shellrent_sdk/client/api/storage/create_object_storage_iam_user_s3_key.py +203 -0
- shellrent_sdk/client/api/storage/delete_cloud_storage_access.py +203 -0
- shellrent_sdk/client/api/storage/delete_cloud_storage_user.py +203 -0
- shellrent_sdk/client/api/storage/delete_object_storage_bucket_firewall_entry.py +219 -0
- shellrent_sdk/client/api/storage/delete_object_storage_iam_user.py +203 -0
- shellrent_sdk/client/api/storage/delete_object_storage_iam_user_s3_key.py +217 -0
- shellrent_sdk/client/api/storage/downgrade_cloud_storage_size.py +189 -0
- shellrent_sdk/client/api/storage/get_cloud_storage.py +189 -0
- shellrent_sdk/client/api/storage/get_cloud_storage_access.py +203 -0
- shellrent_sdk/client/api/storage/get_cloud_storage_user.py +203 -0
- shellrent_sdk/client/api/storage/get_object_storage.py +189 -0
- shellrent_sdk/client/api/storage/get_object_storage_bucket.py +203 -0
- shellrent_sdk/client/api/storage/get_object_storage_bucket_chart.py +203 -0
- shellrent_sdk/client/api/storage/get_object_storage_bucket_firewall_entry.py +219 -0
- shellrent_sdk/client/api/storage/get_object_storage_iam_user.py +203 -0
- shellrent_sdk/client/api/storage/get_object_storage_iam_user_s3_key.py +217 -0
- shellrent_sdk/client/api/storage/get_object_storage_s3_key.py +189 -0
- shellrent_sdk/client/api/storage/list_cloud_storage_accesses.py +227 -0
- shellrent_sdk/client/api/storage/list_cloud_storage_users.py +189 -0
- shellrent_sdk/client/api/storage/list_cloud_storages.py +209 -0
- shellrent_sdk/client/api/storage/list_object_storage_bucket_firewall_entries.py +243 -0
- shellrent_sdk/client/api/storage/list_object_storage_buckets.py +227 -0
- shellrent_sdk/client/api/storage/list_object_storage_iam_user_s3_keys.py +205 -0
- shellrent_sdk/client/api/storage/list_object_storage_iam_users.py +227 -0
- shellrent_sdk/client/api/storage/list_object_storages.py +209 -0
- shellrent_sdk/client/api/storage/update_cloud_storage_user_size.py +224 -0
- shellrent_sdk/client/api/storage/upgrade_cloud_storage_size.py +189 -0
- shellrent_sdk/client/client.py +264 -0
- shellrent_sdk/client/errors.py +16 -0
- shellrent_sdk/client/models/__init__.py +1289 -0
- shellrent_sdk/client/models/account.py +208 -0
- shellrent_sdk/client/models/account_billing.py +333 -0
- shellrent_sdk/client/models/account_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/account_response.py +110 -0
- shellrent_sdk/client/models/account_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/amount.py +114 -0
- shellrent_sdk/client/models/amount_simple.py +63 -0
- shellrent_sdk/client/models/api_error.py +125 -0
- shellrent_sdk/client/models/api_error_data_type_0.py +47 -0
- shellrent_sdk/client/models/api_error_meta_type_0.py +47 -0
- shellrent_sdk/client/models/api_upload.py +107 -0
- shellrent_sdk/client/models/api_upload_response.py +112 -0
- shellrent_sdk/client/models/api_upload_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/billing_data.py +89 -0
- shellrent_sdk/client/models/buy_prepaid_credit_topup_request.py +59 -0
- shellrent_sdk/client/models/buy_prepaid_credit_topup_request_amount.py +17 -0
- shellrent_sdk/client/models/buy_service_active_monitoring_request.py +94 -0
- shellrent_sdk/client/models/buy_service_active_monitoring_request_data.py +85 -0
- shellrent_sdk/client/models/buy_service_cloud_storage_request.py +77 -0
- shellrent_sdk/client/models/buy_service_cloud_vps_request.py +95 -0
- shellrent_sdk/client/models/buy_service_cloud_vps_request_data.py +77 -0
- shellrent_sdk/client/models/buy_service_cloud_vps_request_data_diskquantity.py +24 -0
- shellrent_sdk/client/models/buy_service_cpanel_license_request.py +84 -0
- shellrent_sdk/client/models/buy_service_cpanel_license_request_data.py +72 -0
- shellrent_sdk/client/models/buy_service_cpanel_license_request_data_installation_type.py +9 -0
- shellrent_sdk/client/models/buy_service_dedicated_server_request.py +95 -0
- shellrent_sdk/client/models/buy_service_dedicated_server_request_data.py +49 -0
- shellrent_sdk/client/models/buy_service_domain_request.py +89 -0
- shellrent_sdk/client/models/buy_service_domain_request_configuration.py +49 -0
- shellrent_sdk/client/models/buy_service_domain_request_data.py +70 -0
- shellrent_sdk/client/models/buy_service_domain_request_data_contact_data.py +47 -0
- shellrent_sdk/client/models/buy_service_microsoft_365_request.py +93 -0
- shellrent_sdk/client/models/buy_service_microsoft_365_request_data.py +325 -0
- shellrent_sdk/client/models/buy_service_microsoft_365_request_data_locale.py +10 -0
- shellrent_sdk/client/models/buy_service_microsoft_365_request_data_tenant_choice.py +10 -0
- shellrent_sdk/client/models/buy_service_object_storage_request.py +80 -0
- shellrent_sdk/client/models/buy_service_object_storage_request_configuration.py +52 -0
- shellrent_sdk/client/models/buy_service_object_storage_request_configuration_tb_size.py +21 -0
- shellrent_sdk/client/models/buy_service_pec_domain_request.py +75 -0
- shellrent_sdk/client/models/buy_service_pec_domain_request_data.py +282 -0
- shellrent_sdk/client/models/buy_service_pec_domain_request_data_legal_entity.py +13 -0
- shellrent_sdk/client/models/buy_service_pec_request.py +81 -0
- shellrent_sdk/client/models/buy_service_pec_request_data.py +298 -0
- shellrent_sdk/client/models/buy_service_pec_request_data_legal_entity.py +13 -0
- shellrent_sdk/client/models/buy_service_plesk_license_request.py +84 -0
- shellrent_sdk/client/models/buy_service_plesk_license_request_data.py +72 -0
- shellrent_sdk/client/models/buy_service_plesk_license_request_data_installation_type.py +9 -0
- shellrent_sdk/client/models/buy_service_private_cloud_sv_request.py +94 -0
- shellrent_sdk/client/models/buy_service_private_cloud_sv_request_data.py +64 -0
- shellrent_sdk/client/models/buy_service_private_cloud_sv_request_data_additionalbackupdiskservicequantity.py +9 -0
- shellrent_sdk/client/models/buy_service_securemail_for_google_workspace_request.py +93 -0
- shellrent_sdk/client/models/buy_service_securemail_for_google_workspace_request_configuration.py +40 -0
- shellrent_sdk/client/models/buy_service_securemail_for_google_workspace_request_data.py +62 -0
- shellrent_sdk/client/models/buy_service_securemail_for_microsoft_365_request.py +93 -0
- shellrent_sdk/client/models/buy_service_securemail_for_microsoft_365_request_configuration.py +40 -0
- shellrent_sdk/client/models/buy_service_securemail_for_microsoft_365_request_data.py +70 -0
- shellrent_sdk/client/models/buy_service_securemail_request.py +78 -0
- shellrent_sdk/client/models/buy_service_securemail_request_configuration.py +40 -0
- shellrent_sdk/client/models/buy_service_sms_request.py +68 -0
- shellrent_sdk/client/models/buy_service_ssl_certificate_request.py +86 -0
- shellrent_sdk/client/models/buy_service_ssl_certificate_request_data.py +194 -0
- shellrent_sdk/client/models/buy_service_ssl_certificate_request_data_admin_role.py +11 -0
- shellrent_sdk/client/models/buy_service_ssl_certificate_request_data_admin_title.py +13 -0
- shellrent_sdk/client/models/buy_service_veeam_baas_request.py +78 -0
- shellrent_sdk/client/models/buy_service_veeam_baas_request_configuration.py +149 -0
- shellrent_sdk/client/models/cloud_storage.py +159 -0
- shellrent_sdk/client/models/cloud_storage_access.py +89 -0
- shellrent_sdk/client/models/cloud_storage_access_create_request.py +64 -0
- shellrent_sdk/client/models/cloud_storage_access_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/cloud_storage_access_response.py +116 -0
- shellrent_sdk/client/models/cloud_storage_access_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/cloud_storage_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/cloud_storage_response.py +112 -0
- shellrent_sdk/client/models/cloud_storage_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/cloud_storage_user.py +231 -0
- shellrent_sdk/client/models/cloud_storage_user_list_response.py +124 -0
- shellrent_sdk/client/models/cloud_storage_user_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/cloud_storage_user_response.py +114 -0
- shellrent_sdk/client/models/cloud_storage_user_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/cloud_storage_user_size_update_request.py +56 -0
- shellrent_sdk/client/models/complete_task_data_body.py +62 -0
- shellrent_sdk/client/models/complete_task_data_body_data.py +45 -0
- shellrent_sdk/client/models/country.py +103 -0
- shellrent_sdk/client/models/cpanel_license.py +223 -0
- shellrent_sdk/client/models/cpanel_license_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/cpanel_license_response.py +112 -0
- shellrent_sdk/client/models/cpanel_license_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/creditnote.py +212 -0
- shellrent_sdk/client/models/creditnote_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/creditnote_response.py +112 -0
- shellrent_sdk/client/models/creditnote_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/creditnote_row.py +161 -0
- shellrent_sdk/client/models/creditnote_row_list_response.py +122 -0
- shellrent_sdk/client/models/creditnote_row_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/creditnote_row_response.py +112 -0
- shellrent_sdk/client/models/creditnote_row_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/dns_record.py +215 -0
- shellrent_sdk/client/models/dns_record_caa_data.py +89 -0
- shellrent_sdk/client/models/dns_record_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/dns_record_response.py +112 -0
- shellrent_sdk/client/models/dns_record_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/dns_record_tlsa_data.py +89 -0
- shellrent_sdk/client/models/dns_type.py +63 -0
- shellrent_sdk/client/models/dns_zone.py +77 -0
- shellrent_sdk/client/models/dns_zone_response.py +110 -0
- shellrent_sdk/client/models/dns_zone_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/dnssec_ds_data.py +84 -0
- shellrent_sdk/client/models/dnssec_key_data.py +84 -0
- shellrent_sdk/client/models/domain.py +203 -0
- shellrent_sdk/client/models/domain_availability.py +69 -0
- shellrent_sdk/client/models/domain_availability_response.py +116 -0
- shellrent_sdk/client/models/domain_availability_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_can_change_nameservers.py +77 -0
- shellrent_sdk/client/models/domain_can_change_nameservers_response.py +118 -0
- shellrent_sdk/client/models/domain_can_change_nameservers_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_contact.py +98 -0
- shellrent_sdk/client/models/domain_contact_data.py +63 -0
- shellrent_sdk/client/models/domain_contact_list_response.py +122 -0
- shellrent_sdk/client/models/domain_contact_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_contact_request.py +76 -0
- shellrent_sdk/client/models/domain_contact_request_contact_data_item.py +63 -0
- shellrent_sdk/client/models/domain_contact_response.py +112 -0
- shellrent_sdk/client/models/domain_contact_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_data.py +266 -0
- shellrent_sdk/client/models/domain_dns_nameservers_change_request.py +121 -0
- shellrent_sdk/client/models/domain_dns_nameservers_cloudflare_request.py +63 -0
- shellrent_sdk/client/models/domain_dns_record_change_request.py +169 -0
- shellrent_sdk/client/models/domain_dns_record_change_request_caa_data.py +72 -0
- shellrent_sdk/client/models/domain_dns_record_change_request_tlsa_data.py +72 -0
- shellrent_sdk/client/models/domain_dns_record_request.py +172 -0
- shellrent_sdk/client/models/domain_dns_record_request_caa_data.py +72 -0
- shellrent_sdk/client/models/domain_dns_record_request_tlsa_data.py +72 -0
- shellrent_sdk/client/models/domain_dns_zone_request.py +56 -0
- shellrent_sdk/client/models/domain_dnssec.py +87 -0
- shellrent_sdk/client/models/domain_dnssec_can_activate.py +63 -0
- shellrent_sdk/client/models/domain_dnssec_can_activate_response.py +116 -0
- shellrent_sdk/client/models/domain_dnssec_can_activate_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_dnssec_can_deactivate.py +63 -0
- shellrent_sdk/client/models/domain_dnssec_can_deactivate_response.py +116 -0
- shellrent_sdk/client/models/domain_dnssec_can_deactivate_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_dnssec_request.py +140 -0
- shellrent_sdk/client/models/domain_dnssec_request_ds_data_1.py +83 -0
- shellrent_sdk/client/models/domain_dnssec_request_ds_data_1_digest_type.py +10 -0
- shellrent_sdk/client/models/domain_dnssec_request_ds_data_2.py +83 -0
- shellrent_sdk/client/models/domain_dnssec_request_ds_data_2_digest_type.py +10 -0
- shellrent_sdk/client/models/domain_dnssec_request_key_data_256_item.py +74 -0
- shellrent_sdk/client/models/domain_dnssec_request_key_data_256_item_algorithm.py +9 -0
- shellrent_sdk/client/models/domain_dnssec_request_key_data_257_item.py +74 -0
- shellrent_sdk/client/models/domain_dnssec_request_key_data_257_item_algorithm.py +9 -0
- shellrent_sdk/client/models/domain_dnssec_response.py +112 -0
- shellrent_sdk/client/models/domain_dnssec_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/domain_name.py +128 -0
- shellrent_sdk/client/models/domain_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/domain_response.py +110 -0
- shellrent_sdk/client/models/domain_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/empty_response.py +128 -0
- shellrent_sdk/client/models/empty_response_data_type_0.py +45 -0
- shellrent_sdk/client/models/empty_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/get_hosting_antivirus_response_200.py +134 -0
- shellrent_sdk/client/models/get_hosting_antivirus_response_200_meta_type_0.py +45 -0
- shellrent_sdk/client/models/health_status.py +56 -0
- shellrent_sdk/client/models/health_status_response.py +112 -0
- shellrent_sdk/client/models/health_status_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting.py +187 -0
- shellrent_sdk/client/models/hosting_antivirus.py +221 -0
- shellrent_sdk/client/models/hosting_antivirus_removal_scan.py +110 -0
- shellrent_sdk/client/models/hosting_antivirus_removal_scan_paginated_list_response.py +101 -0
- shellrent_sdk/client/models/hosting_antivirus_removal_scan_response.py +118 -0
- shellrent_sdk/client/models/hosting_antivirus_removal_scan_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_antivirus_scan.py +241 -0
- shellrent_sdk/client/models/hosting_antivirus_scan_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_antivirus_scan_response.py +116 -0
- shellrent_sdk/client/models/hosting_antivirus_scan_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_backup.py +236 -0
- shellrent_sdk/client/models/hosting_backup_expose_request.py +87 -0
- shellrent_sdk/client/models/hosting_backup_list_response.py +122 -0
- shellrent_sdk/client/models/hosting_backup_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_backup_response.py +112 -0
- shellrent_sdk/client/models/hosting_backup_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_credential.py +97 -0
- shellrent_sdk/client/models/hosting_credential_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_credential_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_cronjob.py +211 -0
- shellrent_sdk/client/models/hosting_cronjob_create_request.py +169 -0
- shellrent_sdk/client/models/hosting_cronjob_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_cronjob_response.py +112 -0
- shellrent_sdk/client/models/hosting_cronjob_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_database.py +122 -0
- shellrent_sdk/client/models/hosting_database_create_request.py +89 -0
- shellrent_sdk/client/models/hosting_database_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_database_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_database_response.py +112 -0
- shellrent_sdk/client/models/hosting_database_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_dns_record.py +222 -0
- shellrent_sdk/client/models/hosting_dns_record_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_dns_record_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_alias.py +124 -0
- shellrent_sdk/client/models/hosting_email_alias_create_request.py +67 -0
- shellrent_sdk/client/models/hosting_email_alias_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_email_alias_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_alias_response.py +114 -0
- shellrent_sdk/client/models/hosting_email_alias_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_allow_list.py +96 -0
- shellrent_sdk/client/models/hosting_email_allow_list_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_email_allow_list_response.py +116 -0
- shellrent_sdk/client/models/hosting_email_allow_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_bloc_list.py +96 -0
- shellrent_sdk/client/models/hosting_email_bloc_list_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_email_bloc_list_response.py +116 -0
- shellrent_sdk/client/models/hosting_email_bloc_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_catch_all.py +77 -0
- shellrent_sdk/client/models/hosting_email_catch_all_request.py +58 -0
- shellrent_sdk/client/models/hosting_email_catch_all_response.py +116 -0
- shellrent_sdk/client/models/hosting_email_catch_all_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_email_wblist_request.py +87 -0
- shellrent_sdk/client/models/hosting_file_protection_update_request.py +56 -0
- shellrent_sdk/client/models/hosting_http_version_update_request.py +57 -0
- shellrent_sdk/client/models/hosting_mod_security.py +140 -0
- shellrent_sdk/client/models/hosting_mod_security_response.py +116 -0
- shellrent_sdk/client/models/hosting_mod_security_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_mod_security_rule.py +90 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_bulk_request.py +58 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_create_request.py +75 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_response.py +116 -0
- shellrent_sdk/client/models/hosting_mod_security_rule_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_mod_security_scan.py +98 -0
- shellrent_sdk/client/models/hosting_mod_security_scan_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_mod_security_scan_response.py +116 -0
- shellrent_sdk/client/models/hosting_mod_security_scan_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_mod_security_update_request.py +56 -0
- shellrent_sdk/client/models/hosting_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/hosting_php_settings_update_request.py +66 -0
- shellrent_sdk/client/models/hosting_php_version.py +70 -0
- shellrent_sdk/client/models/hosting_php_version_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_php_version_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_php_version_update_request.py +57 -0
- shellrent_sdk/client/models/hosting_response.py +110 -0
- shellrent_sdk/client/models/hosting_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_ssl_certificate.py +166 -0
- shellrent_sdk/client/models/hosting_ssl_certificate_install_request.py +84 -0
- shellrent_sdk/client/models/hosting_ssl_certificate_list_response.py +124 -0
- shellrent_sdk/client/models/hosting_ssl_certificate_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_ssl_certificate_response.py +116 -0
- shellrent_sdk/client/models/hosting_ssl_certificate_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/hosting_subdomain_create_request.py +68 -0
- shellrent_sdk/client/models/invoice.py +264 -0
- shellrent_sdk/client/models/invoice_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/invoice_response.py +110 -0
- shellrent_sdk/client/models/invoice_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/invoice_row.py +249 -0
- shellrent_sdk/client/models/invoice_row_list_response.py +120 -0
- shellrent_sdk/client/models/invoice_row_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/invoice_row_response.py +112 -0
- shellrent_sdk/client/models/invoice_row_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ip_address.py +161 -0
- shellrent_sdk/client/models/ip_address_list_response.py +120 -0
- shellrent_sdk/client/models/ip_address_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ip_address_response.py +112 -0
- shellrent_sdk/client/models/ip_address_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/jwk_key.py +114 -0
- shellrent_sdk/client/models/jwks_response.py +70 -0
- shellrent_sdk/client/models/legal_entity.py +85 -0
- shellrent_sdk/client/models/legal_entity_group.py +63 -0
- shellrent_sdk/client/models/list_orders_type.py +9 -0
- shellrent_sdk/client/models/list_sms_sms_status.py +11 -0
- shellrent_sdk/client/models/microsoft_365.py +273 -0
- shellrent_sdk/client/models/microsoft_365_domain_available.py +87 -0
- shellrent_sdk/client/models/microsoft_365_domain_available_response.py +118 -0
- shellrent_sdk/client/models/microsoft_365_domain_available_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/microsoft_365_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/microsoft_365_partner_link.py +56 -0
- shellrent_sdk/client/models/microsoft_365_partner_link_response.py +116 -0
- shellrent_sdk/client/models/microsoft_365_partner_link_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/microsoft_365_response.py +112 -0
- shellrent_sdk/client/models/microsoft_365_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/microsoft_365_subscription_quantity_request.py +57 -0
- shellrent_sdk/client/models/microsoft_365_tenant.py +329 -0
- shellrent_sdk/client/models/microsoft_365_tenant_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/microsoft_365_tenant_response.py +116 -0
- shellrent_sdk/client/models/microsoft_365_tenant_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/o_auth_audience.py +9 -0
- shellrent_sdk/client/models/o_auth_error.py +96 -0
- shellrent_sdk/client/models/o_auth_token_response.py +86 -0
- shellrent_sdk/client/models/object_storage.py +276 -0
- shellrent_sdk/client/models/object_storage_bucket.py +359 -0
- shellrent_sdk/client/models/object_storage_bucket_chart.py +93 -0
- shellrent_sdk/client/models/object_storage_bucket_chart_points_item.py +129 -0
- shellrent_sdk/client/models/object_storage_bucket_chart_response.py +116 -0
- shellrent_sdk/client/models/object_storage_bucket_chart_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_bucket_firewall_entry.py +121 -0
- shellrent_sdk/client/models/object_storage_bucket_firewall_entry_create_request.py +56 -0
- shellrent_sdk/client/models/object_storage_bucket_firewall_entry_paginated_list_response.py +101 -0
- shellrent_sdk/client/models/object_storage_bucket_firewall_entry_response.py +118 -0
- shellrent_sdk/client/models/object_storage_bucket_firewall_entry_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_bucket_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/object_storage_bucket_response.py +116 -0
- shellrent_sdk/client/models/object_storage_bucket_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_iam_user.py +173 -0
- shellrent_sdk/client/models/object_storage_iam_user_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/object_storage_iam_user_response.py +116 -0
- shellrent_sdk/client/models/object_storage_iam_user_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_iam_user_s3_key.py +147 -0
- shellrent_sdk/client/models/object_storage_iam_user_s3_key_list_response.py +126 -0
- shellrent_sdk/client/models/object_storage_iam_user_s3_key_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_iam_user_s3_key_response.py +118 -0
- shellrent_sdk/client/models/object_storage_iam_user_s3_key_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/object_storage_response.py +112 -0
- shellrent_sdk/client/models/object_storage_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/object_storage_s3_key.py +128 -0
- shellrent_sdk/client/models/object_storage_s3_key_response.py +116 -0
- shellrent_sdk/client/models/object_storage_s3_key_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/one_click.py +150 -0
- shellrent_sdk/client/models/one_click_autorenew.py +70 -0
- shellrent_sdk/client/models/one_click_autorenew_response.py +114 -0
- shellrent_sdk/client/models/one_click_autorenew_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/one_click_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/one_click_response.py +112 -0
- shellrent_sdk/client/models/one_click_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order.py +248 -0
- shellrent_sdk/client/models/order_can_cancel.py +63 -0
- shellrent_sdk/client/models/order_can_cancel_response.py +112 -0
- shellrent_sdk/client/models/order_can_cancel_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_can_pay.py +108 -0
- shellrent_sdk/client/models/order_can_pay_response.py +112 -0
- shellrent_sdk/client/models/order_can_pay_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_invoice_status.py +63 -0
- shellrent_sdk/client/models/order_list_response.py +120 -0
- shellrent_sdk/client/models/order_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/order_pay_request.py +98 -0
- shellrent_sdk/client/models/order_payment_status.py +63 -0
- shellrent_sdk/client/models/order_response.py +110 -0
- shellrent_sdk/client/models/order_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_row.py +122 -0
- shellrent_sdk/client/models/order_row_list_response.py +120 -0
- shellrent_sdk/client/models/order_row_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_row_response.py +112 -0
- shellrent_sdk/client/models/order_row_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/order_status.py +63 -0
- shellrent_sdk/client/models/pagination_meta.py +84 -0
- shellrent_sdk/client/models/pay_orders_response_200.py +133 -0
- shellrent_sdk/client/models/pay_orders_response_200_meta_type_0.py +45 -0
- shellrent_sdk/client/models/payment.py +169 -0
- shellrent_sdk/client/models/payment_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/payment_provider_data_type_0.py +45 -0
- shellrent_sdk/client/models/payment_response.py +110 -0
- shellrent_sdk/client/models/payment_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/pec.py +246 -0
- shellrent_sdk/client/models/pec_domain.py +169 -0
- shellrent_sdk/client/models/pec_domain_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/pec_domain_response.py +112 -0
- shellrent_sdk/client/models/pec_domain_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/pec_mailbox_owner_change_create_request.py +81 -0
- shellrent_sdk/client/models/pec_mailbox_update_request.py +75 -0
- shellrent_sdk/client/models/pec_owner_change.py +279 -0
- shellrent_sdk/client/models/pec_owner_change_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/pec_owner_change_response.py +112 -0
- shellrent_sdk/client/models/pec_owner_change_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/pec_owner_summary.py +180 -0
- shellrent_sdk/client/models/pec_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/pec_response.py +110 -0
- shellrent_sdk/client/models/pec_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/plesk_license.py +223 -0
- shellrent_sdk/client/models/plesk_license_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/plesk_license_response.py +112 -0
- shellrent_sdk/client/models/plesk_license_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/prepaid_credit.py +101 -0
- shellrent_sdk/client/models/prepaid_credit_operation.py +129 -0
- shellrent_sdk/client/models/prepaid_credit_operation_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/prepaid_credit_operation_response.py +116 -0
- shellrent_sdk/client/models/prepaid_credit_operation_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/prepaid_credit_operation_type.py +63 -0
- shellrent_sdk/client/models/prepaid_credit_response.py +112 -0
- shellrent_sdk/client/models/prepaid_credit_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/prepaid_credit_topup.py +160 -0
- shellrent_sdk/client/models/prepaid_credit_topup_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/prepaid_credit_topup_response.py +116 -0
- shellrent_sdk/client/models/prepaid_credit_topup_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/private_cloud.py +251 -0
- shellrent_sdk/client/models/private_cloud_response.py +112 -0
- shellrent_sdk/client/models/private_cloud_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/private_cloud_vm_create_request.py +135 -0
- shellrent_sdk/client/models/private_cloud_vm_update_request.py +80 -0
- shellrent_sdk/client/models/promotion.py +208 -0
- shellrent_sdk/client/models/purchase.py +595 -0
- shellrent_sdk/client/models/purchase_billing_info_change_request.py +72 -0
- shellrent_sdk/client/models/purchase_can_add_additional.py +85 -0
- shellrent_sdk/client/models/purchase_can_add_additional_response.py +116 -0
- shellrent_sdk/client/models/purchase_can_add_additional_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_can_cancel.py +63 -0
- shellrent_sdk/client/models/purchase_can_cancel_response.py +114 -0
- shellrent_sdk/client/models/purchase_can_cancel_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_can_change_recurrence.py +63 -0
- shellrent_sdk/client/models/purchase_can_change_recurrence_response.py +118 -0
- shellrent_sdk/client/models/purchase_can_change_recurrence_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_can_change_renew_status.py +63 -0
- shellrent_sdk/client/models/purchase_can_change_renew_status_response.py +118 -0
- shellrent_sdk/client/models/purchase_can_change_renew_status_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_can_change_service.py +85 -0
- shellrent_sdk/client/models/purchase_can_change_service_response.py +116 -0
- shellrent_sdk/client/models/purchase_can_change_service_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_can_renew.py +63 -0
- shellrent_sdk/client/models/purchase_can_renew_response.py +114 -0
- shellrent_sdk/client/models/purchase_can_renew_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_comment_change_request.py +56 -0
- shellrent_sdk/client/models/purchase_name.py +73 -0
- shellrent_sdk/client/models/purchase_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/purchase_provisioning_status.py +63 -0
- shellrent_sdk/client/models/purchase_recurrence_change_request.py +57 -0
- shellrent_sdk/client/models/purchase_renew_status_change_request.py +57 -0
- shellrent_sdk/client/models/purchase_response.py +112 -0
- shellrent_sdk/client/models/purchase_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/purchase_status.py +63 -0
- shellrent_sdk/client/models/recurrence.py +180 -0
- shellrent_sdk/client/models/recurrence_frequency.py +63 -0
- shellrent_sdk/client/models/request_access_token_body.py +150 -0
- shellrent_sdk/client/models/request_access_token_body_grant_type.py +8 -0
- shellrent_sdk/client/models/sdi_document_status.py +63 -0
- shellrent_sdk/client/models/sdi_document_type.py +63 -0
- shellrent_sdk/client/models/securemail.py +168 -0
- shellrent_sdk/client/models/securemail_mailbox.py +109 -0
- shellrent_sdk/client/models/securemail_mailbox_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/securemail_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/securemail_quantity_request.py +57 -0
- shellrent_sdk/client/models/securemail_response.py +112 -0
- shellrent_sdk/client/models/securemail_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/securemail_statistics.py +91 -0
- shellrent_sdk/client/models/securemail_statistics_response.py +116 -0
- shellrent_sdk/client/models/securemail_statistics_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server.py +173 -0
- shellrent_sdk/client/models/server_automatic_snapshot.py +91 -0
- shellrent_sdk/client/models/server_automatic_snapshot_request.py +72 -0
- shellrent_sdk/client/models/server_automatic_snapshot_response.py +116 -0
- shellrent_sdk/client/models/server_automatic_snapshot_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_backup.py +337 -0
- shellrent_sdk/client/models/server_backup_exhibit_request.py +57 -0
- shellrent_sdk/client/models/server_backup_list_response.py +122 -0
- shellrent_sdk/client/models/server_backup_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_backup_response.py +112 -0
- shellrent_sdk/client/models/server_backup_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_can_action.py +63 -0
- shellrent_sdk/client/models/server_can_action_response.py +112 -0
- shellrent_sdk/client/models/server_can_action_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_credential.py +89 -0
- shellrent_sdk/client/models/server_credential_response.py +114 -0
- shellrent_sdk/client/models/server_credential_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_ip_address_reverse_update_request.py +68 -0
- shellrent_sdk/client/models/server_monitoring.py +227 -0
- shellrent_sdk/client/models/server_monitoring_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/server_monitoring_probe.py +245 -0
- shellrent_sdk/client/models/server_monitoring_probe_chart.py +95 -0
- shellrent_sdk/client/models/server_monitoring_probe_chart_points_item.py +66 -0
- shellrent_sdk/client/models/server_monitoring_probe_chart_response.py +118 -0
- shellrent_sdk/client/models/server_monitoring_probe_chart_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_monitoring_probe_create_request.py +103 -0
- shellrent_sdk/client/models/server_monitoring_probe_create_request_parameters.py +47 -0
- shellrent_sdk/client/models/server_monitoring_probe_list_response.py +124 -0
- shellrent_sdk/client/models/server_monitoring_probe_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_monitoring_probe_response.py +116 -0
- shellrent_sdk/client/models/server_monitoring_probe_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_monitoring_probe_update_request.py +66 -0
- shellrent_sdk/client/models/server_monitoring_response.py +114 -0
- shellrent_sdk/client/models/server_monitoring_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_network_interface.py +231 -0
- shellrent_sdk/client/models/server_network_interface_create_request.py +66 -0
- shellrent_sdk/client/models/server_network_interface_list_response.py +124 -0
- shellrent_sdk/client/models/server_network_interface_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_network_interface_response.py +116 -0
- shellrent_sdk/client/models/server_network_interface_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_os.py +105 -0
- shellrent_sdk/client/models/server_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/server_reinstall_request.py +57 -0
- shellrent_sdk/client/models/server_response.py +110 -0
- shellrent_sdk/client/models/server_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_snapshot.py +145 -0
- shellrent_sdk/client/models/server_snapshot_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/server_snapshot_response.py +112 -0
- shellrent_sdk/client/models/server_snapshot_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/server_template.py +142 -0
- shellrent_sdk/client/models/service.py +301 -0
- shellrent_sdk/client/models/service_category.py +77 -0
- shellrent_sdk/client/models/service_change.py +71 -0
- shellrent_sdk/client/models/service_list_response.py +120 -0
- shellrent_sdk/client/models/service_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/service_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/service_server.py +318 -0
- shellrent_sdk/client/models/service_server_list_response.py +122 -0
- shellrent_sdk/client/models/service_server_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/simple_pagination_meta.py +78 -0
- shellrent_sdk/client/models/sms.py +189 -0
- shellrent_sdk/client/models/sms_account.py +78 -0
- shellrent_sdk/client/models/sms_account_response.py +112 -0
- shellrent_sdk/client/models/sms_account_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_can_cancel.py +63 -0
- shellrent_sdk/client/models/sms_can_cancel_response.py +112 -0
- shellrent_sdk/client/models/sms_can_cancel_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_can_delete.py +63 -0
- shellrent_sdk/client/models/sms_can_delete_response.py +112 -0
- shellrent_sdk/client/models/sms_can_delete_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_create_request.py +127 -0
- shellrent_sdk/client/models/sms_create_request_quality.py +9 -0
- shellrent_sdk/client/models/sms_message.py +169 -0
- shellrent_sdk/client/models/sms_message_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/sms_message_response.py +112 -0
- shellrent_sdk/client/models/sms_message_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/sms_phonebook.py +76 -0
- shellrent_sdk/client/models/sms_phonebook_add_contacts_request.py +77 -0
- shellrent_sdk/client/models/sms_phonebook_add_contacts_request_phone_numbers_item.py +92 -0
- shellrent_sdk/client/models/sms_phonebook_contact.py +134 -0
- shellrent_sdk/client/models/sms_phonebook_contact_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/sms_phonebook_create_request.py +92 -0
- shellrent_sdk/client/models/sms_phonebook_create_request_phone_numbers_item.py +92 -0
- shellrent_sdk/client/models/sms_phonebook_edit_request.py +57 -0
- shellrent_sdk/client/models/sms_phonebook_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/sms_phonebook_response.py +112 -0
- shellrent_sdk/client/models/sms_phonebook_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_price.py +103 -0
- shellrent_sdk/client/models/sms_price_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/sms_price_response.py +112 -0
- shellrent_sdk/client/models/sms_price_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sms_response.py +110 -0
- shellrent_sdk/client/models/sms_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate.py +362 -0
- shellrent_sdk/client/models/ssl_certificate_approver_emails.py +63 -0
- shellrent_sdk/client/models/ssl_certificate_approver_emails_response.py +118 -0
- shellrent_sdk/client/models/ssl_certificate_approver_emails_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_can_reemit.py +63 -0
- shellrent_sdk/client/models/ssl_certificate_can_reemit_response.py +116 -0
- shellrent_sdk/client/models/ssl_certificate_can_reemit_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_change_csr_request.py +56 -0
- shellrent_sdk/client/models/ssl_certificate_export.py +70 -0
- shellrent_sdk/client/models/ssl_certificate_export_format.py +97 -0
- shellrent_sdk/client/models/ssl_certificate_export_format_list_response.py +126 -0
- shellrent_sdk/client/models/ssl_certificate_export_format_list_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_export_response.py +116 -0
- shellrent_sdk/client/models/ssl_certificate_export_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_key.py +69 -0
- shellrent_sdk/client/models/ssl_certificate_key_response.py +114 -0
- shellrent_sdk/client/models/ssl_certificate_key_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_keys.py +108 -0
- shellrent_sdk/client/models/ssl_certificate_keys_response.py +116 -0
- shellrent_sdk/client/models/ssl_certificate_keys_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/ssl_certificate_owner_request.py +296 -0
- shellrent_sdk/client/models/ssl_certificate_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/ssl_certificate_reemit_request.py +87 -0
- shellrent_sdk/client/models/ssl_certificate_response.py +112 -0
- shellrent_sdk/client/models/ssl_certificate_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/sub_account_create_request.py +151 -0
- shellrent_sdk/client/models/sub_account_update_request.py +173 -0
- shellrent_sdk/client/models/task.py +138 -0
- shellrent_sdk/client/models/task_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/task_response.py +110 -0
- shellrent_sdk/client/models/task_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/task_status.py +63 -0
- shellrent_sdk/client/models/tax_regime.py +83 -0
- shellrent_sdk/client/models/tld.py +236 -0
- shellrent_sdk/client/models/tld_contact_specification.py +93 -0
- shellrent_sdk/client/models/tld_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/tld_response.py +110 -0
- shellrent_sdk/client/models/tld_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/upload_file_body.py +45 -0
- shellrent_sdk/client/models/web_monitoring.py +277 -0
- shellrent_sdk/client/models/web_monitoring_availability_chart.py +108 -0
- shellrent_sdk/client/models/web_monitoring_availability_chart_legend.py +72 -0
- shellrent_sdk/client/models/web_monitoring_availability_chart_points_item.py +66 -0
- shellrent_sdk/client/models/web_monitoring_availability_chart_response.py +118 -0
- shellrent_sdk/client/models/web_monitoring_availability_chart_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/web_monitoring_download_speed_chart.py +95 -0
- shellrent_sdk/client/models/web_monitoring_download_speed_chart_points_item.py +66 -0
- shellrent_sdk/client/models/web_monitoring_download_speed_chart_response.py +118 -0
- shellrent_sdk/client/models/web_monitoring_download_speed_chart_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/web_monitoring_notices.py +89 -0
- shellrent_sdk/client/models/web_monitoring_notices_response.py +116 -0
- shellrent_sdk/client/models/web_monitoring_notices_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/web_monitoring_notices_update_request.py +75 -0
- shellrent_sdk/client/models/web_monitoring_paginated_list_response.py +99 -0
- shellrent_sdk/client/models/web_monitoring_response.py +112 -0
- shellrent_sdk/client/models/web_monitoring_response_meta_type_0.py +45 -0
- shellrent_sdk/client/models/web_monitoring_response_time_chart.py +95 -0
- shellrent_sdk/client/models/web_monitoring_response_time_chart_points_item.py +66 -0
- shellrent_sdk/client/models/web_monitoring_response_time_chart_response.py +118 -0
- shellrent_sdk/client/models/web_monitoring_response_time_chart_response_meta_type_0.py +45 -0
- shellrent_sdk/client/types.py +54 -0
- shellrent_sdk/http.py +237 -0
- shellrent_sdk/py.typed +0 -0
- shellrent_sdk-0.1.0.dist-info/METADATA +335 -0
- shellrent_sdk-0.1.0.dist-info/RECORD +949 -0
- shellrent_sdk-0.1.0.dist-info/WHEEL +4 -0
- shellrent_sdk-0.1.0.dist-info/entry_points.txt +2 -0
- shellrent_sdk-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""Official Python SDK for the Shellrent public API.
|
|
2
|
+
|
|
3
|
+
The functions of the operations are generated in ``shellrent_sdk.client.api``, one module per tag and
|
|
4
|
+
one module per operationId; the models in ``shellrent_sdk.client.models``.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from ._errors import ApiException, unwrap
|
|
8
|
+
from ._factory import create_client
|
|
9
|
+
from .auth import ClientCredentials, FileTokenStore, MemoryTokenStore, TokenError, TokenStore
|
|
10
|
+
from .client.errors import UnexpectedStatus
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"ApiException",
|
|
14
|
+
"ClientCredentials",
|
|
15
|
+
"FileTokenStore",
|
|
16
|
+
"MemoryTokenStore",
|
|
17
|
+
"TokenError",
|
|
18
|
+
"TokenStore",
|
|
19
|
+
"UnexpectedStatus",
|
|
20
|
+
"create_client",
|
|
21
|
+
"unwrap",
|
|
22
|
+
]
|
shellrent_sdk/_errors.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import TYPE_CHECKING, TypeVar
|
|
5
|
+
|
|
6
|
+
from .client.errors import UnexpectedStatus
|
|
7
|
+
from .client.types import Response
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from .client.models.api_error import ApiError
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ApiException(Exception):
|
|
16
|
+
"""The API answered with an error response documented in the specification.
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
status_code: HTTP status, such as 404.
|
|
20
|
+
error: The error envelope, with ``message``.
|
|
21
|
+
headers: Headers of the response, such as ``Retry-After``.
|
|
22
|
+
content: Body of the response.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def __init__(
|
|
26
|
+
self, status_code: int, error: ApiError, headers: Mapping[str, str], content: bytes
|
|
27
|
+
) -> None:
|
|
28
|
+
super().__init__(f"HTTP {status_code}: {error.message}")
|
|
29
|
+
self.status_code = status_code
|
|
30
|
+
self.error = error
|
|
31
|
+
self.headers = headers
|
|
32
|
+
self.content = content
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def unwrap(response: Response[T | ApiError]) -> T:
|
|
36
|
+
"""Returns the parsed body of a successful response and raises an exception for the others.
|
|
37
|
+
|
|
38
|
+
Takes the result of the ``sync_detailed()`` and ``asyncio_detailed()`` functions::
|
|
39
|
+
|
|
40
|
+
purchase = unwrap(get_purchase.sync_detailed(123, client=client))
|
|
41
|
+
|
|
42
|
+
Raises:
|
|
43
|
+
ApiException: An error response documented in the specification (``ApiError``).
|
|
44
|
+
UnexpectedStatus: Any other response outside 2xx, or without a parsed body.
|
|
45
|
+
"""
|
|
46
|
+
# Imported here: importing the models takes a while, and the CLI does not need them.
|
|
47
|
+
from .client.models.api_error import ApiError
|
|
48
|
+
|
|
49
|
+
parsed = response.parsed
|
|
50
|
+
if isinstance(parsed, ApiError):
|
|
51
|
+
raise ApiException(response.status_code, parsed, response.headers, response.content)
|
|
52
|
+
if parsed is None or not 200 <= response.status_code < 300:
|
|
53
|
+
raise UnexpectedStatus(response.status_code, response.content)
|
|
54
|
+
return parsed
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
|
|
5
|
+
from .auth import ClientCredentials, MemoryTokenStore, TokenStore
|
|
6
|
+
from .client import AuthenticatedClient
|
|
7
|
+
from .http import client_args
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def create_client(
|
|
11
|
+
credentials: ClientCredentials | None = None,
|
|
12
|
+
*,
|
|
13
|
+
token_store: TokenStore | None = None,
|
|
14
|
+
retry: bool = True,
|
|
15
|
+
timeout: float | httpx.Timeout | None = 30.0,
|
|
16
|
+
) -> AuthenticatedClient:
|
|
17
|
+
"""Creates the client of the Shellrent API, to pass to the functions of ``shellrent_sdk.client.api``.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
credentials: Default ``ClientCredentials.from_env()``.
|
|
21
|
+
token_store: Cache of the access token; default a ``MemoryTokenStore``. Pass a
|
|
22
|
+
``FileTokenStore`` (or a shared cache) to reuse the token across processes.
|
|
23
|
+
retry: Retry the requests rejected with 429 Too Many Requests, see ``RetryTransport``.
|
|
24
|
+
timeout: Timeout of the requests, in seconds.
|
|
25
|
+
|
|
26
|
+
Documented error responses are returned as ``ApiError`` (see ``unwrap()``); undocumented status
|
|
27
|
+
codes raise ``UnexpectedStatus``.
|
|
28
|
+
"""
|
|
29
|
+
if credentials is None:
|
|
30
|
+
credentials = ClientCredentials.from_env()
|
|
31
|
+
|
|
32
|
+
args = client_args(
|
|
33
|
+
credentials,
|
|
34
|
+
token_store=token_store if token_store is not None else MemoryTokenStore(),
|
|
35
|
+
retry=retry,
|
|
36
|
+
timeout=timeout,
|
|
37
|
+
)
|
|
38
|
+
return AuthenticatedClient(
|
|
39
|
+
base_url=args.pop("base_url"),
|
|
40
|
+
# The generated client would send a fixed token: the header is set by OAuth2Auth instead,
|
|
41
|
+
# which replaces this empty default in every request.
|
|
42
|
+
token="",
|
|
43
|
+
prefix="",
|
|
44
|
+
headers=args.pop("headers"),
|
|
45
|
+
timeout=args.pop("timeout"),
|
|
46
|
+
httpx_args=args,
|
|
47
|
+
raise_on_unexpected_status=True,
|
|
48
|
+
)
|
shellrent_sdk/auth.py
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
"""OAuth2 client credentials authentication for the Shellrent APIs.
|
|
2
|
+
|
|
3
|
+
This module does not depend on the generated client: other SDKs, with clients of their own, use it too.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import asyncio
|
|
9
|
+
import contextlib
|
|
10
|
+
import hashlib
|
|
11
|
+
import json
|
|
12
|
+
import logging
|
|
13
|
+
import os
|
|
14
|
+
import re
|
|
15
|
+
import tempfile
|
|
16
|
+
import threading
|
|
17
|
+
import time
|
|
18
|
+
import weakref
|
|
19
|
+
from collections.abc import AsyncGenerator, Callable, Generator, Iterable, Iterator, Mapping
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
from typing import Any, Final, NamedTuple, Protocol
|
|
22
|
+
|
|
23
|
+
import httpx
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"DEFAULT_API_URL",
|
|
27
|
+
"EXPIRY_MARGIN",
|
|
28
|
+
"ClientCredentials",
|
|
29
|
+
"FileTokenStore",
|
|
30
|
+
"MemoryTokenStore",
|
|
31
|
+
"OAuth2Auth",
|
|
32
|
+
"TokenError",
|
|
33
|
+
"TokenStore",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
DEFAULT_API_URL: Final = "https://api.shellrent.com"
|
|
37
|
+
|
|
38
|
+
#: Seconds before its expiry after which an access token is no longer used.
|
|
39
|
+
EXPIRY_MARGIN: Final = 60
|
|
40
|
+
|
|
41
|
+
logger = logging.getLogger(__name__)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ClientCredentials:
|
|
45
|
+
"""OAuth2 client credentials of a Shellrent API client.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
client_id: ID of the API client.
|
|
49
|
+
client_secret: Secret of the API client. It is never cached and never shown by ``repr()``.
|
|
50
|
+
scopes: Scopes to request; ``None`` (or an empty list) lets the server grant every scope
|
|
51
|
+
of the client.
|
|
52
|
+
audience: Audience to request; ``None`` lets the server use the only audience of the client.
|
|
53
|
+
api_url: Base URL of the API, to change only to use another environment such as staging.
|
|
54
|
+
token_url: Token endpoint; ``None`` means ``{api_url}/oauth/token``.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
def __init__(
|
|
58
|
+
self,
|
|
59
|
+
client_id: str,
|
|
60
|
+
client_secret: str,
|
|
61
|
+
*,
|
|
62
|
+
scopes: Iterable[str] | None = None,
|
|
63
|
+
audience: str | None = None,
|
|
64
|
+
api_url: str = DEFAULT_API_URL,
|
|
65
|
+
token_url: str | None = None,
|
|
66
|
+
) -> None:
|
|
67
|
+
if not client_id or not client_secret:
|
|
68
|
+
raise ValueError("The client ID and the client secret must not be empty.")
|
|
69
|
+
if isinstance(scopes, str):
|
|
70
|
+
raise TypeError("scopes must be a list of strings, not a string.")
|
|
71
|
+
|
|
72
|
+
scope_list = tuple(scopes or ())
|
|
73
|
+
api_url = api_url.rstrip("/")
|
|
74
|
+
|
|
75
|
+
self.client_id: Final = client_id
|
|
76
|
+
self._client_secret = client_secret
|
|
77
|
+
self.scopes: Final = scope_list or None
|
|
78
|
+
self.audience: Final = audience
|
|
79
|
+
self.api_url: Final = api_url
|
|
80
|
+
self.token_url: Final = token_url or f"{api_url}/oauth/token"
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_env(cls) -> ClientCredentials:
|
|
84
|
+
"""Reads the credentials from the environment.
|
|
85
|
+
|
|
86
|
+
``SHELLRENT_CLIENT_ID`` and ``SHELLRENT_CLIENT_SECRET`` are required; ``SHELLRENT_SCOPES``
|
|
87
|
+
(separated by spaces or commas) and ``SHELLRENT_API_URL`` are optional.
|
|
88
|
+
|
|
89
|
+
Raises:
|
|
90
|
+
ValueError: The client ID or the client secret is not set.
|
|
91
|
+
"""
|
|
92
|
+
client_id = _env("SHELLRENT_CLIENT_ID")
|
|
93
|
+
client_secret = _env("SHELLRENT_CLIENT_SECRET")
|
|
94
|
+
if client_id is None or client_secret is None:
|
|
95
|
+
raise ValueError(
|
|
96
|
+
"The SHELLRENT_CLIENT_ID and SHELLRENT_CLIENT_SECRET environment variables must be set."
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
scopes = _env("SHELLRENT_SCOPES")
|
|
100
|
+
return cls(
|
|
101
|
+
client_id,
|
|
102
|
+
client_secret,
|
|
103
|
+
scopes=[scope for scope in re.split(r"[\s,]+", scopes) if scope] if scopes else None,
|
|
104
|
+
api_url=_env("SHELLRENT_API_URL") or DEFAULT_API_URL,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def client_secret(self) -> str:
|
|
109
|
+
return self._client_secret
|
|
110
|
+
|
|
111
|
+
def __repr__(self) -> str:
|
|
112
|
+
return (
|
|
113
|
+
f"{type(self).__name__}(client_id={self.client_id!r}, scopes={self.scopes!r}, "
|
|
114
|
+
f"audience={self.audience!r}, api_url={self.api_url!r}, token_url={self.token_url!r})"
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class TokenError(Exception):
|
|
119
|
+
"""The token endpoint did not issue an access token.
|
|
120
|
+
|
|
121
|
+
Attributes:
|
|
122
|
+
error: OAuth2 error code, such as ``invalid_client`` or ``invalid_scope``, if any.
|
|
123
|
+
error_description: OAuth2 error description, if any.
|
|
124
|
+
status_code: HTTP status of the response of the token endpoint.
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
def __init__(
|
|
128
|
+
self,
|
|
129
|
+
message: str,
|
|
130
|
+
*,
|
|
131
|
+
error: str | None = None,
|
|
132
|
+
error_description: str | None = None,
|
|
133
|
+
status_code: int,
|
|
134
|
+
) -> None:
|
|
135
|
+
super().__init__(message)
|
|
136
|
+
self.error = error
|
|
137
|
+
self.error_description = error_description
|
|
138
|
+
self.status_code = status_code
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class TokenStore(Protocol):
|
|
142
|
+
"""Cache of access tokens, shared by the clients (and the processes) that use it.
|
|
143
|
+
|
|
144
|
+
The semantics are those of PSR-16 and of Django's cache: ``get`` returns ``None`` for missing
|
|
145
|
+
and expired keys, ``set`` stores a value for ``ttl`` seconds, ``delete`` ignores missing keys.
|
|
146
|
+
Values are opaque strings; the client secret is never stored.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
def get(self, key: str, /) -> str | None: ...
|
|
150
|
+
|
|
151
|
+
def set(self, key: str, value: str, ttl: int, /) -> object: ...
|
|
152
|
+
|
|
153
|
+
def delete(self, key: str, /) -> object: ...
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class MemoryTokenStore:
|
|
157
|
+
"""Keeps the tokens in memory, for the life of the process."""
|
|
158
|
+
|
|
159
|
+
def __init__(self, *, clock: Callable[[], float] = time.monotonic) -> None:
|
|
160
|
+
self._clock = clock
|
|
161
|
+
self._items: dict[str, tuple[str, float]] = {}
|
|
162
|
+
self._lock = threading.Lock()
|
|
163
|
+
|
|
164
|
+
def get(self, key: str) -> str | None:
|
|
165
|
+
with self._lock:
|
|
166
|
+
item = self._items.get(key)
|
|
167
|
+
if item is None:
|
|
168
|
+
return None
|
|
169
|
+
if item[1] <= self._clock():
|
|
170
|
+
del self._items[key]
|
|
171
|
+
return None
|
|
172
|
+
return item[0]
|
|
173
|
+
|
|
174
|
+
def set(self, key: str, value: str, ttl: int) -> None:
|
|
175
|
+
with self._lock:
|
|
176
|
+
if ttl > 0:
|
|
177
|
+
self._items[key] = (value, self._clock() + ttl)
|
|
178
|
+
else:
|
|
179
|
+
self._items.pop(key, None)
|
|
180
|
+
|
|
181
|
+
def delete(self, key: str) -> None:
|
|
182
|
+
with self._lock:
|
|
183
|
+
self._items.pop(key, None)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class FileTokenStore:
|
|
187
|
+
"""Keeps the tokens in files, one per key, shared by the processes of the same user.
|
|
188
|
+
|
|
189
|
+
The directory defaults to ``$XDG_CACHE_HOME/shellrent-sdk``, or ``~/.cache/shellrent-sdk``.
|
|
190
|
+
When it does not exist it is created readable by its owner only (0700); the files are always
|
|
191
|
+
written with mode 0600, through a temporary file and an atomic rename.
|
|
192
|
+
"""
|
|
193
|
+
|
|
194
|
+
_KEY_PATTERN: Final = re.compile(r"[A-Za-z0-9_-][A-Za-z0-9_.-]*")
|
|
195
|
+
|
|
196
|
+
def __init__(
|
|
197
|
+
self,
|
|
198
|
+
directory: str | os.PathLike[str] | None = None,
|
|
199
|
+
*,
|
|
200
|
+
clock: Callable[[], float] = time.time,
|
|
201
|
+
) -> None:
|
|
202
|
+
self.directory: Final = Path(directory) if directory is not None else _default_cache_dir()
|
|
203
|
+
self._clock = clock
|
|
204
|
+
|
|
205
|
+
def get(self, key: str) -> str | None:
|
|
206
|
+
try:
|
|
207
|
+
data = json.loads(self._path(key).read_text(encoding="utf-8"))
|
|
208
|
+
except FileNotFoundError:
|
|
209
|
+
return None
|
|
210
|
+
except ValueError: # Not JSON: a file of someone else, or damaged.
|
|
211
|
+
return None
|
|
212
|
+
|
|
213
|
+
if not isinstance(data, dict):
|
|
214
|
+
return None
|
|
215
|
+
value, expires_at = data.get("value"), data.get("expires_at")
|
|
216
|
+
if not isinstance(value, str) or not isinstance(expires_at, int | float):
|
|
217
|
+
return None
|
|
218
|
+
return value if expires_at > self._clock() else None
|
|
219
|
+
|
|
220
|
+
def set(self, key: str, value: str, ttl: int) -> None:
|
|
221
|
+
path = self._path(key)
|
|
222
|
+
if ttl <= 0:
|
|
223
|
+
self.delete(key)
|
|
224
|
+
return
|
|
225
|
+
|
|
226
|
+
self._create_directory()
|
|
227
|
+
content = json.dumps({"value": value, "expires_at": self._clock() + ttl})
|
|
228
|
+
# mkstemp creates the file with mode 0600; the rename makes the new content visible at once.
|
|
229
|
+
fd, temp_path = tempfile.mkstemp(dir=self.directory, prefix=".", suffix=".tmp")
|
|
230
|
+
try:
|
|
231
|
+
with os.fdopen(fd, "w", encoding="utf-8") as file:
|
|
232
|
+
file.write(content)
|
|
233
|
+
os.replace(temp_path, path)
|
|
234
|
+
except BaseException:
|
|
235
|
+
Path(temp_path).unlink(missing_ok=True)
|
|
236
|
+
raise
|
|
237
|
+
|
|
238
|
+
def delete(self, key: str) -> None:
|
|
239
|
+
self._path(key).unlink(missing_ok=True)
|
|
240
|
+
|
|
241
|
+
def _path(self, key: str) -> Path:
|
|
242
|
+
if not self._KEY_PATTERN.fullmatch(key):
|
|
243
|
+
raise ValueError(f"Invalid key for FileTokenStore: {key!r}")
|
|
244
|
+
return self.directory / f"{key}.json"
|
|
245
|
+
|
|
246
|
+
def _create_directory(self) -> None:
|
|
247
|
+
try:
|
|
248
|
+
self.directory.mkdir(mode=0o700, parents=True)
|
|
249
|
+
except FileExistsError:
|
|
250
|
+
return
|
|
251
|
+
# The mode given to mkdir is reduced by the umask.
|
|
252
|
+
self.directory.chmod(0o700)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
class _Token(NamedTuple):
|
|
256
|
+
access_token: str
|
|
257
|
+
expires_at: float
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class OAuth2Auth(httpx.Auth):
|
|
261
|
+
"""httpx authentication with the OAuth2 client credentials grant.
|
|
262
|
+
|
|
263
|
+
The access token is requested by the authentication flow itself, through the client that sends
|
|
264
|
+
the request (its transport, timeouts and retries included), so it works with both
|
|
265
|
+
``httpx.Client`` and ``httpx.AsyncClient``. The token is reused until ``EXPIRY_MARGIN`` seconds
|
|
266
|
+
before it expires, and shared with the other clients and processes through ``token_store``.
|
|
267
|
+
When the API answers 401 the token is discarded and the request is sent once more with a new one.
|
|
268
|
+
|
|
269
|
+
The instance can be shared by threads and tasks: while one of them requests a token, the others
|
|
270
|
+
wait for it instead of requesting their own.
|
|
271
|
+
|
|
272
|
+
Raises (from the requests of the client):
|
|
273
|
+
TokenError: The token endpoint did not issue an access token.
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
def __init__(
|
|
277
|
+
self,
|
|
278
|
+
credentials: ClientCredentials,
|
|
279
|
+
token_store: TokenStore | None = None,
|
|
280
|
+
*,
|
|
281
|
+
clock: Callable[[], float] = time.time,
|
|
282
|
+
) -> None:
|
|
283
|
+
self._credentials = credentials
|
|
284
|
+
self._store: TokenStore = token_store if token_store is not None else MemoryTokenStore()
|
|
285
|
+
self._clock = clock
|
|
286
|
+
self._cache_key = _cache_key(credentials)
|
|
287
|
+
self._token: _Token | None = None
|
|
288
|
+
self._state_lock = threading.Lock()
|
|
289
|
+
self._sync_request_lock = threading.Lock()
|
|
290
|
+
# An asyncio.Lock works only in the event loop that first waits on it: one per loop.
|
|
291
|
+
self._async_request_locks: weakref.WeakKeyDictionary[
|
|
292
|
+
asyncio.AbstractEventLoop, asyncio.Lock
|
|
293
|
+
] = weakref.WeakKeyDictionary()
|
|
294
|
+
|
|
295
|
+
def sync_auth_flow(
|
|
296
|
+
self, request: httpx.Request
|
|
297
|
+
) -> Generator[httpx.Request, httpx.Response, None]:
|
|
298
|
+
request.read() # Sent twice after a 401.
|
|
299
|
+
rejected: str | None = None
|
|
300
|
+
while True:
|
|
301
|
+
token = self._current_token(rejected)
|
|
302
|
+
if token is None:
|
|
303
|
+
with self._sync_request_lock:
|
|
304
|
+
token = self._current_token(rejected)
|
|
305
|
+
if token is None:
|
|
306
|
+
token_response = yield self._token_request(
|
|
307
|
+
request.headers, request.extensions
|
|
308
|
+
)
|
|
309
|
+
token_response.read()
|
|
310
|
+
token = self._save_token(token_response)
|
|
311
|
+
|
|
312
|
+
request.headers["Authorization"] = f"Bearer {token}"
|
|
313
|
+
response = yield request
|
|
314
|
+
if response.status_code != 401 or rejected is not None:
|
|
315
|
+
return
|
|
316
|
+
self._discard(token)
|
|
317
|
+
rejected = token
|
|
318
|
+
|
|
319
|
+
async def async_auth_flow(
|
|
320
|
+
self, request: httpx.Request
|
|
321
|
+
) -> AsyncGenerator[httpx.Request, httpx.Response]:
|
|
322
|
+
await request.aread() # Sent twice after a 401.
|
|
323
|
+
rejected: str | None = None
|
|
324
|
+
while True:
|
|
325
|
+
token = self._current_token(rejected)
|
|
326
|
+
if token is None:
|
|
327
|
+
async with self._async_request_lock():
|
|
328
|
+
token = self._current_token(rejected)
|
|
329
|
+
if token is None:
|
|
330
|
+
token_response = yield self._token_request(
|
|
331
|
+
request.headers, request.extensions
|
|
332
|
+
)
|
|
333
|
+
await token_response.aread()
|
|
334
|
+
token = self._save_token(token_response)
|
|
335
|
+
|
|
336
|
+
request.headers["Authorization"] = f"Bearer {token}"
|
|
337
|
+
response = yield request
|
|
338
|
+
if response.status_code != 401 or rejected is not None:
|
|
339
|
+
return
|
|
340
|
+
self._discard(token)
|
|
341
|
+
rejected = token
|
|
342
|
+
|
|
343
|
+
def get_token(self, client: httpx.Client) -> str:
|
|
344
|
+
"""Returns a valid access token, requesting a new one through ``client`` when needed.
|
|
345
|
+
|
|
346
|
+
Raises:
|
|
347
|
+
TokenError: The token endpoint did not issue an access token.
|
|
348
|
+
"""
|
|
349
|
+
token = self._current_token(None)
|
|
350
|
+
if token is not None:
|
|
351
|
+
return token
|
|
352
|
+
with self._sync_request_lock:
|
|
353
|
+
token = self._current_token(None)
|
|
354
|
+
if token is not None:
|
|
355
|
+
return token
|
|
356
|
+
request = self._token_request(client.headers, {"timeout": client.timeout.as_dict()})
|
|
357
|
+
return self._save_token(client.send(request, auth=None))
|
|
358
|
+
|
|
359
|
+
async def aget_token(self, client: httpx.AsyncClient) -> str:
|
|
360
|
+
"""Returns a valid access token, requesting a new one through ``client`` when needed.
|
|
361
|
+
|
|
362
|
+
Raises:
|
|
363
|
+
TokenError: The token endpoint did not issue an access token.
|
|
364
|
+
"""
|
|
365
|
+
token = self._current_token(None)
|
|
366
|
+
if token is not None:
|
|
367
|
+
return token
|
|
368
|
+
async with self._async_request_lock():
|
|
369
|
+
token = self._current_token(None)
|
|
370
|
+
if token is not None:
|
|
371
|
+
return token
|
|
372
|
+
request = self._token_request(client.headers, {"timeout": client.timeout.as_dict()})
|
|
373
|
+
return self._save_token(await client.send(request, auth=None))
|
|
374
|
+
|
|
375
|
+
def _async_request_lock(self) -> asyncio.Lock:
|
|
376
|
+
loop = asyncio.get_running_loop()
|
|
377
|
+
with self._state_lock:
|
|
378
|
+
lock = self._async_request_locks.get(loop)
|
|
379
|
+
if lock is None:
|
|
380
|
+
lock = self._async_request_locks[loop] = asyncio.Lock()
|
|
381
|
+
return lock
|
|
382
|
+
|
|
383
|
+
def _current_token(self, rejected: str | None) -> str | None:
|
|
384
|
+
"""The token in memory or else in the store, if still valid and not the rejected one."""
|
|
385
|
+
with self._state_lock:
|
|
386
|
+
now = self._clock()
|
|
387
|
+
token = self._token
|
|
388
|
+
if token is None or token.expires_at <= now or token.access_token == rejected:
|
|
389
|
+
token = self._stored_token()
|
|
390
|
+
if token is not None and (
|
|
391
|
+
token.expires_at <= now or token.access_token == rejected
|
|
392
|
+
):
|
|
393
|
+
token = None
|
|
394
|
+
self._token = token
|
|
395
|
+
return token.access_token if token is not None else None
|
|
396
|
+
|
|
397
|
+
def _token_request(
|
|
398
|
+
self, headers: httpx.Headers, extensions: Mapping[str, Any]
|
|
399
|
+
) -> httpx.Request:
|
|
400
|
+
credentials = self._credentials
|
|
401
|
+
form = {
|
|
402
|
+
"grant_type": "client_credentials",
|
|
403
|
+
"client_id": credentials.client_id,
|
|
404
|
+
"client_secret": credentials.client_secret,
|
|
405
|
+
}
|
|
406
|
+
if credentials.scopes is not None:
|
|
407
|
+
form["scope"] = " ".join(credentials.scopes)
|
|
408
|
+
if credentials.audience is not None:
|
|
409
|
+
form["audience"] = credentials.audience
|
|
410
|
+
|
|
411
|
+
token_headers = {"Accept": "application/json"}
|
|
412
|
+
if "User-Agent" in headers:
|
|
413
|
+
token_headers["User-Agent"] = headers["User-Agent"]
|
|
414
|
+
token_extensions = {"timeout": extensions["timeout"]} if "timeout" in extensions else {}
|
|
415
|
+
|
|
416
|
+
return httpx.Request(
|
|
417
|
+
"POST",
|
|
418
|
+
credentials.token_url,
|
|
419
|
+
headers=token_headers,
|
|
420
|
+
data=form,
|
|
421
|
+
extensions=token_extensions,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
def _save_token(self, response: httpx.Response) -> str:
|
|
425
|
+
"""Reads the token from the response of the token endpoint and keeps it."""
|
|
426
|
+
try:
|
|
427
|
+
body = response.json()
|
|
428
|
+
except ValueError:
|
|
429
|
+
body = None
|
|
430
|
+
if not isinstance(body, dict):
|
|
431
|
+
body = {}
|
|
432
|
+
|
|
433
|
+
access_token = body.get("access_token")
|
|
434
|
+
expires_in = body.get("expires_in")
|
|
435
|
+
if (
|
|
436
|
+
response.status_code != 200
|
|
437
|
+
or not isinstance(access_token, str)
|
|
438
|
+
or not access_token
|
|
439
|
+
or not isinstance(expires_in, int | float)
|
|
440
|
+
or isinstance(expires_in, bool)
|
|
441
|
+
):
|
|
442
|
+
raise self._token_error(response, body)
|
|
443
|
+
|
|
444
|
+
now = self._clock()
|
|
445
|
+
token = _Token(access_token, now + expires_in - EXPIRY_MARGIN)
|
|
446
|
+
with self._state_lock:
|
|
447
|
+
self._token = token
|
|
448
|
+
ttl = int(token.expires_at - now)
|
|
449
|
+
if ttl > 0:
|
|
450
|
+
value = json.dumps(
|
|
451
|
+
{"access_token": token.access_token, "expires_at": token.expires_at}
|
|
452
|
+
)
|
|
453
|
+
with self._store_errors_logged():
|
|
454
|
+
self._store.set(self._cache_key, value, ttl)
|
|
455
|
+
return access_token
|
|
456
|
+
|
|
457
|
+
def _discard(self, token: str) -> None:
|
|
458
|
+
"""Forgets a token rejected by the API, unless another request has replaced it already."""
|
|
459
|
+
with self._state_lock:
|
|
460
|
+
if self._token is not None and self._token.access_token == token:
|
|
461
|
+
self._token = None
|
|
462
|
+
stored = self._stored_token()
|
|
463
|
+
if stored is not None and stored.access_token == token:
|
|
464
|
+
with self._store_errors_logged():
|
|
465
|
+
self._store.delete(self._cache_key)
|
|
466
|
+
|
|
467
|
+
def _stored_token(self) -> _Token | None:
|
|
468
|
+
value: object = None
|
|
469
|
+
with self._store_errors_logged():
|
|
470
|
+
value = self._store.get(self._cache_key)
|
|
471
|
+
if not isinstance(value, str):
|
|
472
|
+
return None
|
|
473
|
+
try:
|
|
474
|
+
data = json.loads(value)
|
|
475
|
+
return _Token(str(data["access_token"]), float(data["expires_at"]))
|
|
476
|
+
except (ValueError, TypeError, KeyError):
|
|
477
|
+
return None
|
|
478
|
+
|
|
479
|
+
@contextlib.contextmanager
|
|
480
|
+
def _store_errors_logged(self) -> Iterator[None]:
|
|
481
|
+
# Without the store the token is still reused in memory; other processes request their own.
|
|
482
|
+
try:
|
|
483
|
+
yield
|
|
484
|
+
except Exception as exc: # noqa: BLE001 - any failure of a third-party cache.
|
|
485
|
+
logger.warning("The token store %s failed: %s", type(self._store).__name__, exc)
|
|
486
|
+
|
|
487
|
+
def _token_error(self, response: httpx.Response, body: dict[str, Any]) -> TokenError:
|
|
488
|
+
error = body.get("error")
|
|
489
|
+
description = body.get("error_description")
|
|
490
|
+
error = error if isinstance(error, str) else None
|
|
491
|
+
description = description if isinstance(description, str) else None
|
|
492
|
+
|
|
493
|
+
message = (
|
|
494
|
+
f"The token endpoint {self._credentials.token_url} answered HTTP {response.status_code}"
|
|
495
|
+
)
|
|
496
|
+
if error is not None:
|
|
497
|
+
message += f": {error}" + (f" ({description})" if description is not None else "")
|
|
498
|
+
elif response.status_code == 200:
|
|
499
|
+
message += " without a valid access token"
|
|
500
|
+
|
|
501
|
+
return TokenError(
|
|
502
|
+
message, error=error, error_description=description, status_code=response.status_code
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
def _cache_key(credentials: ClientCredentials) -> str:
|
|
507
|
+
"""Key of the token of these credentials: it identifies them without the secret."""
|
|
508
|
+
identity = [
|
|
509
|
+
credentials.token_url,
|
|
510
|
+
credentials.client_id,
|
|
511
|
+
credentials.audience,
|
|
512
|
+
sorted(credentials.scopes) if credentials.scopes is not None else None,
|
|
513
|
+
]
|
|
514
|
+
digest = hashlib.sha256(json.dumps(identity).encode()).hexdigest()
|
|
515
|
+
return f"shellrent_sdk.token.{digest}"
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
def _default_cache_dir() -> Path:
|
|
519
|
+
# The XDG specification says to ignore relative paths.
|
|
520
|
+
xdg_cache_home = os.environ.get("XDG_CACHE_HOME", "")
|
|
521
|
+
base = Path(xdg_cache_home) if os.path.isabs(xdg_cache_home) else Path.home() / ".cache"
|
|
522
|
+
return base / "shellrent-sdk"
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
def _env(name: str) -> str | None:
|
|
526
|
+
value = os.environ.get(name)
|
|
527
|
+
return value if value else None
|