appwrite-console 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.
- appwrite_console/__init__.py +1 -0
- appwrite_console/client.py +371 -0
- appwrite_console/encoders/__init__.py +1 -0
- appwrite_console/encoders/value_class_encoder.py +373 -0
- appwrite_console/enums/__init__.py +1 -0
- appwrite_console/enums/account_key_scopes.py +6 -0
- appwrite_console/enums/adapter.py +5 -0
- appwrite_console/enums/addon.py +7 -0
- appwrite_console/enums/appwrite_migration_resource.py +42 -0
- appwrite_console/enums/attribute_status.py +8 -0
- appwrite_console/enums/authentication_factor.py +7 -0
- appwrite_console/enums/authenticator_type.py +4 -0
- appwrite_console/enums/backup_services.py +10 -0
- appwrite_console/enums/billing_plan_group.py +6 -0
- appwrite_console/enums/block_mode.py +5 -0
- appwrite_console/enums/block_resource_type.py +12 -0
- appwrite_console/enums/browser.py +17 -0
- appwrite_console/enums/browser_permission.py +23 -0
- appwrite_console/enums/browser_theme.py +5 -0
- appwrite_console/enums/build_runtime.py +95 -0
- appwrite_console/enums/cache_database.py +6 -0
- appwrite_console/enums/cache_target.py +9 -0
- appwrite_console/enums/column_status.py +8 -0
- appwrite_console/enums/compression.py +6 -0
- appwrite_console/enums/console_resource_type.py +4 -0
- appwrite_console/enums/credit_card.py +20 -0
- appwrite_console/enums/database_status.py +17 -0
- appwrite_console/enums/database_type.py +10 -0
- appwrite_console/enums/databases_index_type.py +7 -0
- appwrite_console/enums/deployment_download_type.py +5 -0
- appwrite_console/enums/deployment_status.py +9 -0
- appwrite_console/enums/detection_framework_type.py +4 -0
- appwrite_console/enums/detection_runtime_type.py +4 -0
- appwrite_console/enums/documents_db_index_type.py +6 -0
- appwrite_console/enums/domain_purchase_status.py +7 -0
- appwrite_console/enums/domain_registration_type.py +7 -0
- appwrite_console/enums/domain_suggestion_type.py +5 -0
- appwrite_console/enums/domain_transfer_status_enum.py +11 -0
- appwrite_console/enums/embedding_model.py +7 -0
- appwrite_console/enums/execution_method.py +10 -0
- appwrite_console/enums/execution_status.py +8 -0
- appwrite_console/enums/execution_trigger.py +6 -0
- appwrite_console/enums/firebase_migration_resource.py +13 -0
- appwrite_console/enums/flag.py +198 -0
- appwrite_console/enums/framework.py +18 -0
- appwrite_console/enums/function_template_use_case.py +10 -0
- appwrite_console/enums/image_format.py +10 -0
- appwrite_console/enums/image_gravity.py +12 -0
- appwrite_console/enums/index_status.py +8 -0
- appwrite_console/enums/message_priority.py +5 -0
- appwrite_console/enums/message_status.py +8 -0
- appwrite_console/enums/messaging_provider_type.py +6 -0
- appwrite_console/enums/n_host_migration_resource.py +14 -0
- appwrite_console/enums/o_auth2_google_prompt.py +6 -0
- appwrite_console/enums/o_auth2_oidc_prompt.py +7 -0
- appwrite_console/enums/o_auth_provider.py +47 -0
- appwrite_console/enums/on_duplicate.py +6 -0
- appwrite_console/enums/order_by.py +5 -0
- appwrite_console/enums/organization_key_scopes.py +19 -0
- appwrite_console/enums/password_hash.py +14 -0
- appwrite_console/enums/platform.py +5 -0
- appwrite_console/enums/platform_type.py +8 -0
- appwrite_console/enums/project_auth_method_id.py +10 -0
- appwrite_console/enums/project_email_template_id.py +10 -0
- appwrite_console/enums/project_email_template_locale.py +134 -0
- appwrite_console/enums/project_key_scopes.py +107 -0
- appwrite_console/enums/project_o_auth2_google_prompt.py +6 -0
- appwrite_console/enums/project_o_auth2_oidc_prompt.py +7 -0
- appwrite_console/enums/project_o_auth_provider_id.py +47 -0
- appwrite_console/enums/project_policy_id.py +17 -0
- appwrite_console/enums/project_protocol_id.py +6 -0
- appwrite_console/enums/project_service_id.py +22 -0
- appwrite_console/enums/project_smtp_secure.py +5 -0
- appwrite_console/enums/project_usage_range.py +5 -0
- appwrite_console/enums/proxy_resource_type.py +5 -0
- appwrite_console/enums/proxy_rule_deployment_resource_type.py +5 -0
- appwrite_console/enums/proxy_rule_status.py +6 -0
- appwrite_console/enums/query_suggestion_resource.py +97 -0
- appwrite_console/enums/region.py +9 -0
- appwrite_console/enums/relation_mutate.py +6 -0
- appwrite_console/enums/relationship_type.py +7 -0
- appwrite_console/enums/runtime.py +95 -0
- appwrite_console/enums/schedule_resource_type.py +7 -0
- appwrite_console/enums/site_template_use_case.py +12 -0
- appwrite_console/enums/smtp_encryption.py +6 -0
- appwrite_console/enums/status.py +4 -0
- appwrite_console/enums/status_code.py +7 -0
- appwrite_console/enums/supabase_migration_resource.py +14 -0
- appwrite_console/enums/tables_db_index_type.py +7 -0
- appwrite_console/enums/template_reference_type.py +6 -0
- appwrite_console/enums/timezone.py +422 -0
- appwrite_console/enums/usage_range.py +6 -0
- appwrite_console/enums/vcs_detection_type.py +5 -0
- appwrite_console/enums/vcs_reference_type.py +6 -0
- appwrite_console/enums/vectors_db_index_type.py +9 -0
- appwrite_console/enums/waf_rule_action.py +8 -0
- appwrite_console/exception.py +7 -0
- appwrite_console/id.py +26 -0
- appwrite_console/input_file.py +21 -0
- appwrite_console/models/__init__.py +803 -0
- appwrite_console/models/activity_event.py +99 -0
- appwrite_console/models/activity_event_list.py +19 -0
- appwrite_console/models/additional_resource.py +30 -0
- appwrite_console/models/addon.py +42 -0
- appwrite_console/models/addon_list.py +19 -0
- appwrite_console/models/addon_price.py +36 -0
- appwrite_console/models/aggregation_breakdown.py +28 -0
- appwrite_console/models/aggregation_team.py +101 -0
- appwrite_console/models/aggregation_team_list.py +19 -0
- appwrite_console/models/algo_argon2.py +24 -0
- appwrite_console/models/algo_bcrypt.py +15 -0
- appwrite_console/models/algo_md5.py +15 -0
- appwrite_console/models/algo_phpass.py +15 -0
- appwrite_console/models/algo_scrypt.py +27 -0
- appwrite_console/models/algo_scrypt_modified.py +24 -0
- appwrite_console/models/algo_sha.py +15 -0
- appwrite_console/models/app.py +91 -0
- appwrite_console/models/app_installation.py +42 -0
- appwrite_console/models/app_installation_list.py +19 -0
- appwrite_console/models/app_key.py +39 -0
- appwrite_console/models/app_key_list.py +19 -0
- appwrite_console/models/app_scope.py +27 -0
- appwrite_console/models/app_scope_list.py +19 -0
- appwrite_console/models/app_secret.py +39 -0
- appwrite_console/models/app_secret_list.py +19 -0
- appwrite_console/models/app_secret_plaintext.py +39 -0
- appwrite_console/models/apps_list.py +19 -0
- appwrite_console/models/attribute_bigint.py +46 -0
- appwrite_console/models/attribute_boolean.py +40 -0
- appwrite_console/models/attribute_datetime.py +43 -0
- appwrite_console/models/attribute_email.py +43 -0
- appwrite_console/models/attribute_enum.py +46 -0
- appwrite_console/models/attribute_float.py +46 -0
- appwrite_console/models/attribute_integer.py +46 -0
- appwrite_console/models/attribute_ip.py +43 -0
- appwrite_console/models/attribute_line.py +40 -0
- appwrite_console/models/attribute_list.py +36 -0
- appwrite_console/models/attribute_longtext.py +43 -0
- appwrite_console/models/attribute_mediumtext.py +43 -0
- appwrite_console/models/attribute_object.py +37 -0
- appwrite_console/models/attribute_point.py +40 -0
- appwrite_console/models/attribute_polygon.py +40 -0
- appwrite_console/models/attribute_relationship.py +55 -0
- appwrite_console/models/attribute_string.py +46 -0
- appwrite_console/models/attribute_text.py +43 -0
- appwrite_console/models/attribute_url.py +43 -0
- appwrite_console/models/attribute_varchar.py +46 -0
- appwrite_console/models/attribute_vector.py +40 -0
- appwrite_console/models/backup_archive.py +48 -0
- appwrite_console/models/backup_archive_list.py +19 -0
- appwrite_console/models/backup_policy.py +48 -0
- appwrite_console/models/backup_policy_list.py +19 -0
- appwrite_console/models/backup_restoration.py +45 -0
- appwrite_console/models/backup_restoration_list.py +19 -0
- appwrite_console/models/base_model.py +27 -0
- appwrite_console/models/billing_address.py +36 -0
- appwrite_console/models/billing_address_list.py +19 -0
- appwrite_console/models/billing_limits.py +36 -0
- appwrite_console/models/billing_plan.py +226 -0
- appwrite_console/models/billing_plan_addon.py +19 -0
- appwrite_console/models/billing_plan_addon_details.py +36 -0
- appwrite_console/models/billing_plan_dedicated_database_limits.py +69 -0
- appwrite_console/models/billing_plan_limits.py +18 -0
- appwrite_console/models/billing_plan_list.py +19 -0
- appwrite_console/models/billing_plan_supported_addons.py +21 -0
- appwrite_console/models/block.py +45 -0
- appwrite_console/models/block_delete.py +19 -0
- appwrite_console/models/block_list.py +19 -0
- appwrite_console/models/branch.py +15 -0
- appwrite_console/models/branch_list.py +19 -0
- appwrite_console/models/bucket.py +54 -0
- appwrite_console/models/bucket_list.py +19 -0
- appwrite_console/models/campaign.py +49 -0
- appwrite_console/models/collection.py +67 -0
- appwrite_console/models/collection_list.py +19 -0
- appwrite_console/models/column_bigint.py +46 -0
- appwrite_console/models/column_boolean.py +40 -0
- appwrite_console/models/column_datetime.py +43 -0
- appwrite_console/models/column_email.py +43 -0
- appwrite_console/models/column_enum.py +46 -0
- appwrite_console/models/column_float.py +46 -0
- appwrite_console/models/column_index.py +42 -0
- appwrite_console/models/column_index_list.py +19 -0
- appwrite_console/models/column_integer.py +46 -0
- appwrite_console/models/column_ip.py +43 -0
- appwrite_console/models/column_line.py +40 -0
- appwrite_console/models/column_list.py +36 -0
- appwrite_console/models/column_longtext.py +43 -0
- appwrite_console/models/column_mediumtext.py +43 -0
- appwrite_console/models/column_point.py +40 -0
- appwrite_console/models/column_polygon.py +40 -0
- appwrite_console/models/column_relationship.py +55 -0
- appwrite_console/models/column_string.py +46 -0
- appwrite_console/models/column_text.py +43 -0
- appwrite_console/models/column_url.py +43 -0
- appwrite_console/models/column_varchar.py +46 -0
- appwrite_console/models/console_key_scope.py +24 -0
- appwrite_console/models/console_key_scope_list.py +19 -0
- appwrite_console/models/console_o_auth2_provider.py +19 -0
- appwrite_console/models/console_o_auth2_provider_list.py +19 -0
- appwrite_console/models/console_o_auth2_provider_parameter.py +24 -0
- appwrite_console/models/console_region.py +30 -0
- appwrite_console/models/console_region_list.py +19 -0
- appwrite_console/models/console_variables.py +96 -0
- appwrite_console/models/continent.py +18 -0
- appwrite_console/models/continent_list.py +19 -0
- appwrite_console/models/country.py +18 -0
- appwrite_console/models/country_list.py +19 -0
- appwrite_console/models/coupon.py +36 -0
- appwrite_console/models/credit.py +45 -0
- appwrite_console/models/credit_available.py +15 -0
- appwrite_console/models/credit_list.py +22 -0
- appwrite_console/models/currency.py +33 -0
- appwrite_console/models/currency_list.py +19 -0
- appwrite_console/models/database.py +52 -0
- appwrite_console/models/database_list.py +19 -0
- appwrite_console/models/database_migration.py +57 -0
- appwrite_console/models/database_migration_list.py +19 -0
- appwrite_console/models/database_status.py +57 -0
- appwrite_console/models/database_status_connections.py +18 -0
- appwrite_console/models/database_status_replica.py +24 -0
- appwrite_console/models/database_status_volume.py +24 -0
- appwrite_console/models/dedicated_database.py +159 -0
- appwrite_console/models/dedicated_database_backup.py +63 -0
- appwrite_console/models/dedicated_database_backup_list.py +19 -0
- appwrite_console/models/dedicated_database_backup_storage.py +27 -0
- appwrite_console/models/dedicated_database_branch.py +48 -0
- appwrite_console/models/dedicated_database_branch_list.py +16 -0
- appwrite_console/models/dedicated_database_execution.py +31 -0
- appwrite_console/models/dedicated_database_execution_column.py +18 -0
- appwrite_console/models/dedicated_database_extensions.py +22 -0
- appwrite_console/models/dedicated_database_list.py +19 -0
- appwrite_console/models/dedicated_database_member.py +24 -0
- appwrite_console/models/dedicated_database_operation.py +45 -0
- appwrite_console/models/dedicated_database_operation_list.py +19 -0
- appwrite_console/models/dedicated_database_pitr_windows.py +18 -0
- appwrite_console/models/dedicated_database_pooler.py +42 -0
- appwrite_console/models/dedicated_database_replicas.py +37 -0
- appwrite_console/models/dedicated_database_restoration.py +45 -0
- appwrite_console/models/dedicated_database_restoration_list.py +19 -0
- appwrite_console/models/dedicated_database_specification.py +39 -0
- appwrite_console/models/dedicated_database_specification_list.py +23 -0
- appwrite_console/models/dedicated_database_specification_pricing.py +27 -0
- appwrite_console/models/deployment.py +94 -0
- appwrite_console/models/deployment_list.py +19 -0
- appwrite_console/models/detection_framework.py +32 -0
- appwrite_console/models/detection_runtime.py +29 -0
- appwrite_console/models/detection_variable.py +18 -0
- appwrite_console/models/dev_key.py +36 -0
- appwrite_console/models/dev_key_list.py +19 -0
- appwrite_console/models/dns_record.py +48 -0
- appwrite_console/models/dns_records_list.py +19 -0
- appwrite_console/models/document.py +80 -0
- appwrite_console/models/document_list.py +32 -0
- appwrite_console/models/domain.py +53 -0
- appwrite_console/models/domain_price.py +30 -0
- appwrite_console/models/domain_purchase.py +43 -0
- appwrite_console/models/domain_suggestion.py +24 -0
- appwrite_console/models/domain_suggestions_list.py +19 -0
- appwrite_console/models/domain_transfer_out.py +15 -0
- appwrite_console/models/domain_transfer_status.py +22 -0
- appwrite_console/models/domains_list.py +19 -0
- appwrite_console/models/downgrade_feedback.py +42 -0
- appwrite_console/models/email_template.py +36 -0
- appwrite_console/models/email_template_list.py +19 -0
- appwrite_console/models/embedding.py +24 -0
- appwrite_console/models/embedding_list.py +19 -0
- appwrite_console/models/ephemeral_key.py +39 -0
- appwrite_console/models/estimation.py +37 -0
- appwrite_console/models/estimation_delete_organization.py +16 -0
- appwrite_console/models/estimation_item.py +18 -0
- appwrite_console/models/estimation_plan_change.py +29 -0
- appwrite_console/models/estimation_update_plan.py +40 -0
- appwrite_console/models/execution.py +69 -0
- appwrite_console/models/execution_list.py +19 -0
- appwrite_console/models/file.py +60 -0
- appwrite_console/models/file_list.py +19 -0
- appwrite_console/models/framework.py +28 -0
- appwrite_console/models/framework_adapter.py +27 -0
- appwrite_console/models/framework_list.py +19 -0
- appwrite_console/models/function.py +109 -0
- appwrite_console/models/function_list.py +19 -0
- appwrite_console/models/headers.py +18 -0
- appwrite_console/models/identity.py +42 -0
- appwrite_console/models/identity_list.py +19 -0
- appwrite_console/models/index.py +43 -0
- appwrite_console/models/index_list.py +19 -0
- appwrite_console/models/insight.py +64 -0
- appwrite_console/models/insight_cta.py +24 -0
- appwrite_console/models/insight_list.py +19 -0
- appwrite_console/models/installation.py +30 -0
- appwrite_console/models/installation_list.py +19 -0
- appwrite_console/models/invoice.py +82 -0
- appwrite_console/models/invoice_list.py +19 -0
- appwrite_console/models/jwt.py +15 -0
- appwrite_console/models/key.py +39 -0
- appwrite_console/models/key_list.py +19 -0
- appwrite_console/models/language.py +21 -0
- appwrite_console/models/language_list.py +19 -0
- appwrite_console/models/locale.py +66 -0
- appwrite_console/models/locale_code.py +18 -0
- appwrite_console/models/locale_code_list.py +19 -0
- appwrite_console/models/log.py +78 -0
- appwrite_console/models/log_list.py +19 -0
- appwrite_console/models/membership.py +57 -0
- appwrite_console/models/membership_list.py +19 -0
- appwrite_console/models/message.py +52 -0
- appwrite_console/models/message_list.py +19 -0
- appwrite_console/models/metric.py +18 -0
- appwrite_console/models/metric_breakdown.py +24 -0
- appwrite_console/models/mfa_challenge.py +24 -0
- appwrite_console/models/mfa_factors.py +24 -0
- appwrite_console/models/mfa_recovery_codes.py +15 -0
- appwrite_console/models/mfa_type.py +18 -0
- appwrite_console/models/migration.py +75 -0
- appwrite_console/models/migration_list.py +19 -0
- appwrite_console/models/migration_report.py +96 -0
- appwrite_console/models/mock_number.py +24 -0
- appwrite_console/models/mock_number_list.py +19 -0
- appwrite_console/models/notification.py +60 -0
- appwrite_console/models/notification_list.py +19 -0
- appwrite_console/models/o_auth2_amazon.py +24 -0
- appwrite_console/models/o_auth2_apple.py +30 -0
- appwrite_console/models/o_auth2_appwrite.py +24 -0
- appwrite_console/models/o_auth2_auth0.py +27 -0
- appwrite_console/models/o_auth2_authentik.py +27 -0
- appwrite_console/models/o_auth2_autodesk.py +24 -0
- appwrite_console/models/o_auth2_bitbucket.py +24 -0
- appwrite_console/models/o_auth2_bitly.py +24 -0
- appwrite_console/models/o_auth2_box.py +24 -0
- appwrite_console/models/o_auth2_dailymotion.py +24 -0
- appwrite_console/models/o_auth2_discord.py +24 -0
- appwrite_console/models/o_auth2_disqus.py +24 -0
- appwrite_console/models/o_auth2_dropbox.py +24 -0
- appwrite_console/models/o_auth2_etsy.py +24 -0
- appwrite_console/models/o_auth2_facebook.py +24 -0
- appwrite_console/models/o_auth2_figma.py +24 -0
- appwrite_console/models/o_auth2_fusion_auth.py +27 -0
- appwrite_console/models/o_auth2_github.py +24 -0
- appwrite_console/models/o_auth2_gitlab.py +27 -0
- appwrite_console/models/o_auth2_google.py +28 -0
- appwrite_console/models/o_auth2_keycloak.py +30 -0
- appwrite_console/models/o_auth2_kick.py +24 -0
- appwrite_console/models/o_auth2_linkedin.py +24 -0
- appwrite_console/models/o_auth2_microsoft.py +27 -0
- appwrite_console/models/o_auth2_notion.py +24 -0
- appwrite_console/models/o_auth2_oidc.py +43 -0
- appwrite_console/models/o_auth2_okta.py +30 -0
- appwrite_console/models/o_auth2_paypal.py +24 -0
- appwrite_console/models/o_auth2_podio.py +24 -0
- appwrite_console/models/o_auth2_provider_list.py +59 -0
- appwrite_console/models/o_auth2_salesforce.py +24 -0
- appwrite_console/models/o_auth2_slack.py +24 -0
- appwrite_console/models/o_auth2_spotify.py +24 -0
- appwrite_console/models/o_auth2_stripe.py +24 -0
- appwrite_console/models/o_auth2_tradeshift.py +24 -0
- appwrite_console/models/o_auth2_twitch.py +24 -0
- appwrite_console/models/o_auth2_word_press.py +24 -0
- appwrite_console/models/o_auth2_x.py +24 -0
- appwrite_console/models/o_auth2_yahoo.py +24 -0
- appwrite_console/models/o_auth2_yandex.py +24 -0
- appwrite_console/models/o_auth2_zoho.py +24 -0
- appwrite_console/models/o_auth2_zoom.py +24 -0
- appwrite_console/models/oauth2_approve.py +15 -0
- appwrite_console/models/oauth2_authorize.py +18 -0
- appwrite_console/models/oauth2_consent.py +42 -0
- appwrite_console/models/oauth2_consent_list.py +19 -0
- appwrite_console/models/oauth2_consent_token.py +45 -0
- appwrite_console/models/oauth2_consent_token_list.py +19 -0
- appwrite_console/models/oauth2_device_authorization.py +30 -0
- appwrite_console/models/oauth2_grant.py +48 -0
- appwrite_console/models/oauth2_organization.py +15 -0
- appwrite_console/models/oauth2_organization_list.py +19 -0
- appwrite_console/models/oauth2_par.py +18 -0
- appwrite_console/models/oauth2_project.py +21 -0
- appwrite_console/models/oauth2_project_list.py +19 -0
- appwrite_console/models/oauth2_reject.py +15 -0
- appwrite_console/models/oauth2_token.py +33 -0
- appwrite_console/models/organization.py +132 -0
- appwrite_console/models/organization_list.py +32 -0
- appwrite_console/models/payment_authentication.py +30 -0
- appwrite_console/models/payment_method.py +72 -0
- appwrite_console/models/payment_method_list.py +19 -0
- appwrite_console/models/phone.py +21 -0
- appwrite_console/models/phone_list.py +19 -0
- appwrite_console/models/plan_change_estimation_details.py +39 -0
- appwrite_console/models/plan_change_limits.py +28 -0
- appwrite_console/models/plan_change_project_compliance.py +28 -0
- appwrite_console/models/plan_change_resource_compliance.py +30 -0
- appwrite_console/models/platform_android.py +31 -0
- appwrite_console/models/platform_apple.py +31 -0
- appwrite_console/models/platform_linux.py +31 -0
- appwrite_console/models/platform_list.py +23 -0
- appwrite_console/models/platform_web.py +31 -0
- appwrite_console/models/platform_windows.py +31 -0
- appwrite_console/models/policy_deny_aliased_email.py +18 -0
- appwrite_console/models/policy_deny_corporate_email.py +18 -0
- appwrite_console/models/policy_deny_disposable_email.py +18 -0
- appwrite_console/models/policy_deny_free_email.py +18 -0
- appwrite_console/models/policy_list.py +32 -0
- appwrite_console/models/policy_membership_privacy.py +33 -0
- appwrite_console/models/policy_password_dictionary.py +18 -0
- appwrite_console/models/policy_password_history.py +18 -0
- appwrite_console/models/policy_password_personal_data.py +18 -0
- appwrite_console/models/policy_password_strength.py +30 -0
- appwrite_console/models/policy_session_alert.py +18 -0
- appwrite_console/models/policy_session_duration.py +18 -0
- appwrite_console/models/policy_session_invalidation.py +18 -0
- appwrite_console/models/policy_session_limit.py +18 -0
- appwrite_console/models/policy_user_limit.py +18 -0
- appwrite_console/models/postgres_extension.py +24 -0
- appwrite_console/models/postgres_extension_list.py +19 -0
- appwrite_console/models/preferences.py +52 -0
- appwrite_console/models/presence.py +39 -0
- appwrite_console/models/presence_list.py +19 -0
- appwrite_console/models/program.py +39 -0
- appwrite_console/models/project.py +153 -0
- appwrite_console/models/project_auth_method.py +19 -0
- appwrite_console/models/project_list.py +19 -0
- appwrite_console/models/project_protocol.py +19 -0
- appwrite_console/models/project_service.py +19 -0
- appwrite_console/models/provider.py +39 -0
- appwrite_console/models/provider_list.py +19 -0
- appwrite_console/models/provider_repository.py +42 -0
- appwrite_console/models/provider_repository_framework.py +45 -0
- appwrite_console/models/provider_repository_framework_list.py +22 -0
- appwrite_console/models/provider_repository_runtime.py +45 -0
- appwrite_console/models/provider_repository_runtime_list.py +22 -0
- appwrite_console/models/proxy_rule.py +59 -0
- appwrite_console/models/proxy_rule_list.py +19 -0
- appwrite_console/models/report.py +49 -0
- appwrite_console/models/report_list.py +19 -0
- appwrite_console/models/resource_token.py +33 -0
- appwrite_console/models/resource_token_list.py +19 -0
- appwrite_console/models/review.py +24 -0
- appwrite_console/models/roles.py +18 -0
- appwrite_console/models/row.py +80 -0
- appwrite_console/models/row_list.py +32 -0
- appwrite_console/models/runtime.py +36 -0
- appwrite_console/models/runtime_list.py +19 -0
- appwrite_console/models/schedule.py +45 -0
- appwrite_console/models/schedule_list.py +19 -0
- appwrite_console/models/session.py +99 -0
- appwrite_console/models/session_list.py +19 -0
- appwrite_console/models/site.py +115 -0
- appwrite_console/models/site_list.py +19 -0
- appwrite_console/models/specification.py +24 -0
- appwrite_console/models/specification_list.py +19 -0
- appwrite_console/models/stage.py +27 -0
- appwrite_console/models/stage_list.py +16 -0
- appwrite_console/models/subscriber.py +40 -0
- appwrite_console/models/subscriber_list.py +19 -0
- appwrite_console/models/table.py +67 -0
- appwrite_console/models/table_list.py +19 -0
- appwrite_console/models/target.py +39 -0
- appwrite_console/models/target_list.py +19 -0
- appwrite_console/models/team.py +43 -0
- appwrite_console/models/team_list.py +32 -0
- appwrite_console/models/template_framework.py +39 -0
- appwrite_console/models/template_function.py +65 -0
- appwrite_console/models/template_function_list.py +19 -0
- appwrite_console/models/template_runtime.py +24 -0
- appwrite_console/models/template_site.py +53 -0
- appwrite_console/models/template_site_list.py +19 -0
- appwrite_console/models/template_variable.py +33 -0
- appwrite_console/models/token.py +30 -0
- appwrite_console/models/topic.py +36 -0
- appwrite_console/models/topic_list.py +19 -0
- appwrite_console/models/transaction.py +30 -0
- appwrite_console/models/transaction_list.py +19 -0
- appwrite_console/models/usage_billing_plan.py +46 -0
- appwrite_console/models/usage_data_point.py +99 -0
- appwrite_console/models/usage_event_list.py +19 -0
- appwrite_console/models/usage_gauge_list.py +19 -0
- appwrite_console/models/usage_metric.py +19 -0
- appwrite_console/models/usage_organization.py +104 -0
- appwrite_console/models/usage_organization_project.py +73 -0
- appwrite_console/models/usage_presence.py +22 -0
- appwrite_console/models/usage_project.py +218 -0
- appwrite_console/models/usage_resources.py +36 -0
- appwrite_console/models/usage_users.py +28 -0
- appwrite_console/models/user.py +111 -0
- appwrite_console/models/user_list.py +32 -0
- appwrite_console/models/variable.py +36 -0
- appwrite_console/models/variable_list.py +19 -0
- appwrite_console/models/vcs_content.py +21 -0
- appwrite_console/models/vcs_content_list.py +19 -0
- appwrite_console/models/vcs_namespace.py +27 -0
- appwrite_console/models/vcs_namespace_list.py +19 -0
- appwrite_console/models/vectorsdb_collection.py +54 -0
- appwrite_console/models/vectorsdb_collection_list.py +19 -0
- appwrite_console/models/waf_rule.py +55 -0
- appwrite_console/models/waf_rule_bypass.py +55 -0
- appwrite_console/models/waf_rule_challenge.py +64 -0
- appwrite_console/models/waf_rule_deny.py +55 -0
- appwrite_console/models/waf_rule_list.py +19 -0
- appwrite_console/models/waf_rule_rate_limit.py +64 -0
- appwrite_console/models/waf_rule_redirect.py +61 -0
- appwrite_console/models/webhook.py +51 -0
- appwrite_console/models/webhook_list.py +19 -0
- appwrite_console/operator.py +150 -0
- appwrite_console/permission.py +21 -0
- appwrite_console/query.py +293 -0
- appwrite_console/role.py +111 -0
- appwrite_console/service.py +50 -0
- appwrite_console/services/__init__.py +1 -0
- appwrite_console/services/account.py +3328 -0
- appwrite_console/services/activities.py +89 -0
- appwrite_console/services/advisor.py +234 -0
- appwrite_console/services/apps.py +1156 -0
- appwrite_console/services/assistant.py +50 -0
- appwrite_console/services/avatars.py +531 -0
- appwrite_console/services/backups.py +572 -0
- appwrite_console/services/console.py +807 -0
- appwrite_console/services/databases.py +4976 -0
- appwrite_console/services/documents_db.py +2052 -0
- appwrite_console/services/domains.py +3047 -0
- appwrite_console/services/functions.py +1659 -0
- appwrite_console/services/graphql.py +92 -0
- appwrite_console/services/locale.py +243 -0
- appwrite_console/services/manager.py +301 -0
- appwrite_console/services/messaging.py +3137 -0
- appwrite_console/services/migrations.py +1036 -0
- appwrite_console/services/mongo.py +1683 -0
- appwrite_console/services/mysql.py +1861 -0
- appwrite_console/services/notifications.py +98 -0
- appwrite_console/services/oauth2.py +914 -0
- appwrite_console/services/organization.py +1039 -0
- appwrite_console/services/organizations.py +2245 -0
- appwrite_console/services/postgresql.py +1995 -0
- appwrite_console/services/presences.py +309 -0
- appwrite_console/services/project.py +5271 -0
- appwrite_console/services/projects.py +885 -0
- appwrite_console/services/proxy.py +394 -0
- appwrite_console/services/sites.py +1593 -0
- appwrite_console/services/storage.py +818 -0
- appwrite_console/services/tables_db.py +5189 -0
- appwrite_console/services/teams.py +993 -0
- appwrite_console/services/tokens.py +243 -0
- appwrite_console/services/usage.py +194 -0
- appwrite_console/services/users.py +2314 -0
- appwrite_console/services/vcs.py +599 -0
- appwrite_console/services/vectors_db.py +2054 -0
- appwrite_console/services/waf.py +1014 -0
- appwrite_console/services/webhooks.py +344 -0
- appwrite_console/utils/__init__.py +1 -0
- appwrite_console/utils/deprecated.py +51 -0
- appwrite_console-0.1.0.dist-info/METADATA +189 -0
- appwrite_console-0.1.0.dist-info/RECORD +552 -0
- appwrite_console-0.1.0.dist-info/WHEEL +5 -0
- appwrite_console-0.1.0.dist-info/licenses/LICENSE +12 -0
- appwrite_console-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1156 @@
|
|
|
1
|
+
from ..service import Service
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
from typing import Any, Dict, List, Optional, Union
|
|
4
|
+
from ..exception import AppwriteException
|
|
5
|
+
from appwrite_console.utils.deprecated import deprecated
|
|
6
|
+
from ..models.apps_list import AppsList
|
|
7
|
+
from ..models.app import App
|
|
8
|
+
from ..models.app_scope_list import AppScopeList
|
|
9
|
+
from ..models.app_installation_list import AppInstallationList
|
|
10
|
+
from ..models.app_installation import AppInstallation
|
|
11
|
+
from ..models.oauth2_token import Oauth2Token
|
|
12
|
+
from ..models.app_key_list import AppKeyList
|
|
13
|
+
from ..models.app_key import AppKey
|
|
14
|
+
from ..models.app_secret_list import AppSecretList
|
|
15
|
+
from ..models.app_secret_plaintext import AppSecretPlaintext
|
|
16
|
+
from ..models.app_secret import AppSecret
|
|
17
|
+
|
|
18
|
+
class Apps(Service):
|
|
19
|
+
|
|
20
|
+
def __init__(self, client) -> None:
|
|
21
|
+
super(Apps, self).__init__(client)
|
|
22
|
+
|
|
23
|
+
def list(
|
|
24
|
+
self,
|
|
25
|
+
queries: Optional[List[str]] = None,
|
|
26
|
+
total: Optional[bool] = None
|
|
27
|
+
) -> AppsList:
|
|
28
|
+
"""
|
|
29
|
+
List applications.
|
|
30
|
+
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
queries : Optional[List[str]]
|
|
34
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
35
|
+
total : Optional[bool]
|
|
36
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
AppsList
|
|
41
|
+
API response as a typed Pydantic model
|
|
42
|
+
|
|
43
|
+
Raises
|
|
44
|
+
------
|
|
45
|
+
AppwriteException
|
|
46
|
+
If API request fails
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
api_path = '/apps'
|
|
50
|
+
api_params = {}
|
|
51
|
+
|
|
52
|
+
if queries is not None:
|
|
53
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
54
|
+
if total is not None:
|
|
55
|
+
api_params['total'] = self._normalize_value(total)
|
|
56
|
+
|
|
57
|
+
response = self.client.call('get', api_path, {
|
|
58
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
59
|
+
'accept': 'application/json',
|
|
60
|
+
}, api_params)
|
|
61
|
+
|
|
62
|
+
return self._parse_response(response, model=AppsList)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def create(
|
|
66
|
+
self,
|
|
67
|
+
app_id: str,
|
|
68
|
+
name: str,
|
|
69
|
+
redirect_uris: List[str],
|
|
70
|
+
description: Optional[str] = None,
|
|
71
|
+
client_uri: Optional[str] = None,
|
|
72
|
+
logo_uri: Optional[str] = None,
|
|
73
|
+
privacy_policy_url: Optional[str] = None,
|
|
74
|
+
terms_url: Optional[str] = None,
|
|
75
|
+
contacts: Optional[List[str]] = None,
|
|
76
|
+
tagline: Optional[str] = None,
|
|
77
|
+
tags: Optional[List[str]] = None,
|
|
78
|
+
images: Optional[List[str]] = None,
|
|
79
|
+
support_url: Optional[str] = None,
|
|
80
|
+
data_deletion_url: Optional[str] = None,
|
|
81
|
+
post_logout_redirect_uris: Optional[List[str]] = None,
|
|
82
|
+
enabled: Optional[bool] = None,
|
|
83
|
+
type: Optional[str] = None,
|
|
84
|
+
device_flow: Optional[bool] = None,
|
|
85
|
+
team_id: Optional[str] = None
|
|
86
|
+
) -> App:
|
|
87
|
+
"""
|
|
88
|
+
Create a new application.
|
|
89
|
+
|
|
90
|
+
Parameters
|
|
91
|
+
----------
|
|
92
|
+
app_id : str
|
|
93
|
+
Application ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
94
|
+
name : str
|
|
95
|
+
Application name.
|
|
96
|
+
redirect_uris : List[str]
|
|
97
|
+
Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
98
|
+
description : Optional[str]
|
|
99
|
+
Application description shown to users during OAuth2 consent.
|
|
100
|
+
client_uri : Optional[str]
|
|
101
|
+
Application homepage URL shown to users during OAuth2 consent.
|
|
102
|
+
logo_uri : Optional[str]
|
|
103
|
+
Application logo URL shown to users during OAuth2 consent.
|
|
104
|
+
privacy_policy_url : Optional[str]
|
|
105
|
+
Application privacy policy URL shown to users during OAuth2 consent.
|
|
106
|
+
terms_url : Optional[str]
|
|
107
|
+
Application terms of service URL shown to users during OAuth2 consent.
|
|
108
|
+
contacts : Optional[List[str]]
|
|
109
|
+
Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
110
|
+
tagline : Optional[str]
|
|
111
|
+
Application tagline shown to users during OAuth2 consent.
|
|
112
|
+
tags : Optional[List[str]]
|
|
113
|
+
Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
114
|
+
images : Optional[List[str]]
|
|
115
|
+
Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
116
|
+
support_url : Optional[str]
|
|
117
|
+
Application support URL shown to users during OAuth2 consent.
|
|
118
|
+
data_deletion_url : Optional[str]
|
|
119
|
+
Application data deletion URL shown to users during OAuth2 consent.
|
|
120
|
+
post_logout_redirect_uris : Optional[List[str]]
|
|
121
|
+
Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
122
|
+
enabled : Optional[bool]
|
|
123
|
+
Is application enabled?
|
|
124
|
+
type : Optional[str]
|
|
125
|
+
OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
126
|
+
device_flow : Optional[bool]
|
|
127
|
+
Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
128
|
+
team_id : Optional[str]
|
|
129
|
+
Team unique ID.
|
|
130
|
+
|
|
131
|
+
Returns
|
|
132
|
+
-------
|
|
133
|
+
App
|
|
134
|
+
API response as a typed Pydantic model
|
|
135
|
+
|
|
136
|
+
Raises
|
|
137
|
+
------
|
|
138
|
+
AppwriteException
|
|
139
|
+
If API request fails
|
|
140
|
+
"""
|
|
141
|
+
|
|
142
|
+
api_path = '/apps'
|
|
143
|
+
api_params = {}
|
|
144
|
+
if app_id is None:
|
|
145
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
146
|
+
|
|
147
|
+
if name is None:
|
|
148
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
149
|
+
|
|
150
|
+
if redirect_uris is None:
|
|
151
|
+
raise AppwriteException('Missing required parameter: "redirect_uris"')
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
api_params['appId'] = self._normalize_value(app_id)
|
|
155
|
+
api_params['name'] = self._normalize_value(name)
|
|
156
|
+
if description is not None:
|
|
157
|
+
api_params['description'] = self._normalize_value(description)
|
|
158
|
+
if client_uri is not None:
|
|
159
|
+
api_params['clientUri'] = self._normalize_value(client_uri)
|
|
160
|
+
if logo_uri is not None:
|
|
161
|
+
api_params['logoUri'] = self._normalize_value(logo_uri)
|
|
162
|
+
if privacy_policy_url is not None:
|
|
163
|
+
api_params['privacyPolicyUrl'] = self._normalize_value(privacy_policy_url)
|
|
164
|
+
if terms_url is not None:
|
|
165
|
+
api_params['termsUrl'] = self._normalize_value(terms_url)
|
|
166
|
+
if contacts is not None:
|
|
167
|
+
api_params['contacts'] = self._normalize_value(contacts)
|
|
168
|
+
if tagline is not None:
|
|
169
|
+
api_params['tagline'] = self._normalize_value(tagline)
|
|
170
|
+
if tags is not None:
|
|
171
|
+
api_params['tags'] = self._normalize_value(tags)
|
|
172
|
+
if images is not None:
|
|
173
|
+
api_params['images'] = self._normalize_value(images)
|
|
174
|
+
if support_url is not None:
|
|
175
|
+
api_params['supportUrl'] = self._normalize_value(support_url)
|
|
176
|
+
if data_deletion_url is not None:
|
|
177
|
+
api_params['dataDeletionUrl'] = self._normalize_value(data_deletion_url)
|
|
178
|
+
api_params['redirectUris'] = self._normalize_value(redirect_uris)
|
|
179
|
+
if post_logout_redirect_uris is not None:
|
|
180
|
+
api_params['postLogoutRedirectUris'] = self._normalize_value(post_logout_redirect_uris)
|
|
181
|
+
if enabled is not None:
|
|
182
|
+
api_params['enabled'] = self._normalize_value(enabled)
|
|
183
|
+
if type is not None:
|
|
184
|
+
api_params['type'] = self._normalize_value(type)
|
|
185
|
+
if device_flow is not None:
|
|
186
|
+
api_params['deviceFlow'] = self._normalize_value(device_flow)
|
|
187
|
+
if team_id is not None:
|
|
188
|
+
api_params['teamId'] = self._normalize_value(team_id)
|
|
189
|
+
|
|
190
|
+
response = self.client.call('post', api_path, {
|
|
191
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
192
|
+
'content-type': 'application/json',
|
|
193
|
+
'accept': 'application/json',
|
|
194
|
+
}, api_params)
|
|
195
|
+
|
|
196
|
+
return self._parse_response(response, model=App)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def list_installation_scopes(
|
|
200
|
+
self
|
|
201
|
+
) -> AppScopeList:
|
|
202
|
+
"""
|
|
203
|
+
List scopes an application can request when installed on a team.
|
|
204
|
+
|
|
205
|
+
Returns
|
|
206
|
+
-------
|
|
207
|
+
AppScopeList
|
|
208
|
+
API response as a typed Pydantic model
|
|
209
|
+
|
|
210
|
+
Raises
|
|
211
|
+
------
|
|
212
|
+
AppwriteException
|
|
213
|
+
If API request fails
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
api_path = '/apps/scopes/installations'
|
|
217
|
+
api_params = {}
|
|
218
|
+
|
|
219
|
+
response = self.client.call('get', api_path, {
|
|
220
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
221
|
+
'accept': 'application/json',
|
|
222
|
+
}, api_params)
|
|
223
|
+
|
|
224
|
+
return self._parse_response(response, model=AppScopeList)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def list_o_auth2_scopes(
|
|
228
|
+
self
|
|
229
|
+
) -> AppScopeList:
|
|
230
|
+
"""
|
|
231
|
+
List scopes an application can request during the OAuth2 flow.
|
|
232
|
+
|
|
233
|
+
Returns
|
|
234
|
+
-------
|
|
235
|
+
AppScopeList
|
|
236
|
+
API response as a typed Pydantic model
|
|
237
|
+
|
|
238
|
+
Raises
|
|
239
|
+
------
|
|
240
|
+
AppwriteException
|
|
241
|
+
If API request fails
|
|
242
|
+
"""
|
|
243
|
+
|
|
244
|
+
api_path = '/apps/scopes/oauth2'
|
|
245
|
+
api_params = {}
|
|
246
|
+
|
|
247
|
+
response = self.client.call('get', api_path, {
|
|
248
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
249
|
+
'accept': 'application/json',
|
|
250
|
+
}, api_params)
|
|
251
|
+
|
|
252
|
+
return self._parse_response(response, model=AppScopeList)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def get(
|
|
256
|
+
self,
|
|
257
|
+
app_id: str
|
|
258
|
+
) -> App:
|
|
259
|
+
"""
|
|
260
|
+
Get an application by its unique ID.
|
|
261
|
+
|
|
262
|
+
Parameters
|
|
263
|
+
----------
|
|
264
|
+
app_id : str
|
|
265
|
+
Application unique ID or HTTPS client ID metadata document URL.
|
|
266
|
+
|
|
267
|
+
Returns
|
|
268
|
+
-------
|
|
269
|
+
App
|
|
270
|
+
API response as a typed Pydantic model
|
|
271
|
+
|
|
272
|
+
Raises
|
|
273
|
+
------
|
|
274
|
+
AppwriteException
|
|
275
|
+
If API request fails
|
|
276
|
+
"""
|
|
277
|
+
|
|
278
|
+
api_path = '/apps/{appId}'
|
|
279
|
+
api_params = {}
|
|
280
|
+
if app_id is None:
|
|
281
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
282
|
+
|
|
283
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
response = self.client.call('get', api_path, {
|
|
287
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
288
|
+
'accept': 'application/json',
|
|
289
|
+
}, api_params)
|
|
290
|
+
|
|
291
|
+
return self._parse_response(response, model=App)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def update(
|
|
295
|
+
self,
|
|
296
|
+
app_id: str,
|
|
297
|
+
name: str,
|
|
298
|
+
description: Optional[str] = None,
|
|
299
|
+
client_uri: Optional[str] = None,
|
|
300
|
+
logo_uri: Optional[str] = None,
|
|
301
|
+
privacy_policy_url: Optional[str] = None,
|
|
302
|
+
terms_url: Optional[str] = None,
|
|
303
|
+
contacts: Optional[List[str]] = None,
|
|
304
|
+
tagline: Optional[str] = None,
|
|
305
|
+
tags: Optional[List[str]] = None,
|
|
306
|
+
images: Optional[List[str]] = None,
|
|
307
|
+
support_url: Optional[str] = None,
|
|
308
|
+
data_deletion_url: Optional[str] = None,
|
|
309
|
+
enabled: Optional[bool] = None,
|
|
310
|
+
redirect_uris: Optional[List[str]] = None,
|
|
311
|
+
post_logout_redirect_uris: Optional[List[str]] = None,
|
|
312
|
+
type: Optional[str] = None,
|
|
313
|
+
device_flow: Optional[bool] = None,
|
|
314
|
+
installation_scopes: Optional[List[str]] = None,
|
|
315
|
+
installation_redirect_url: Optional[str] = None
|
|
316
|
+
) -> App:
|
|
317
|
+
"""
|
|
318
|
+
Update an application by its unique ID.
|
|
319
|
+
|
|
320
|
+
Parameters
|
|
321
|
+
----------
|
|
322
|
+
app_id : str
|
|
323
|
+
Application unique ID.
|
|
324
|
+
name : str
|
|
325
|
+
Application name.
|
|
326
|
+
description : Optional[str]
|
|
327
|
+
Application description shown to users during OAuth2 consent.
|
|
328
|
+
client_uri : Optional[str]
|
|
329
|
+
Application homepage URL shown to users during OAuth2 consent.
|
|
330
|
+
logo_uri : Optional[str]
|
|
331
|
+
Application logo URL shown to users during OAuth2 consent.
|
|
332
|
+
privacy_policy_url : Optional[str]
|
|
333
|
+
Application privacy policy URL shown to users during OAuth2 consent.
|
|
334
|
+
terms_url : Optional[str]
|
|
335
|
+
Application terms of service URL shown to users during OAuth2 consent.
|
|
336
|
+
contacts : Optional[List[str]]
|
|
337
|
+
Application support or security contact emails. Maximum of 100 contacts are allowed.
|
|
338
|
+
tagline : Optional[str]
|
|
339
|
+
Application tagline shown to users during OAuth2 consent.
|
|
340
|
+
tags : Optional[List[str]]
|
|
341
|
+
Application tags shown to users during OAuth2 consent. Maximum of 100 tags are allowed, each up to 64 characters long.
|
|
342
|
+
images : Optional[List[str]]
|
|
343
|
+
Application image URLs shown to users during OAuth2 consent. Maximum of 100 images are allowed.
|
|
344
|
+
support_url : Optional[str]
|
|
345
|
+
Application support URL shown to users during OAuth2 consent.
|
|
346
|
+
data_deletion_url : Optional[str]
|
|
347
|
+
Application data deletion URL shown to users during OAuth2 consent.
|
|
348
|
+
enabled : Optional[bool]
|
|
349
|
+
Is application enabled?
|
|
350
|
+
redirect_uris : Optional[List[str]]
|
|
351
|
+
Redirect URIs. Each must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI (e.g. com.example.app:/oauth), and must not contain a fragment.
|
|
352
|
+
post_logout_redirect_uris : Optional[List[str]]
|
|
353
|
+
Post-logout redirect URIs for OpenID Connect RP-Initiated Logout. Each must be an https URL, an http loopback URL, or a private-use scheme URI, and must not contain a fragment. After ending the user session, the logout endpoint only redirects to URIs in this list.
|
|
354
|
+
type : Optional[str]
|
|
355
|
+
OAuth2 client type. Use `public` for SPAs, mobile, and native apps that cannot keep a `client_secret` — PKCE is then required at the token endpoint. Use `confidential` for server-side clients that present a `client_secret`. Defaults to `confidential`.
|
|
356
|
+
device_flow : Optional[bool]
|
|
357
|
+
Allow this client to use the OAuth2 Device Authorization Grant (RFC 8628) for input-constrained devices such as TVs and CLIs. Defaults to false.
|
|
358
|
+
installation_scopes : Optional[List[str]]
|
|
359
|
+
Scopes the application requests when installed on a team. Organization-level and project-level scopes only; use the list scopes endpoint with `type=installation` to discover available values. Maximum of 100 scopes are allowed.
|
|
360
|
+
installation_redirect_url : Optional[str]
|
|
361
|
+
URL users are redirected to after creating or updating an installation of this application. Must be an https URL, an http loopback URL (localhost, 127.0.0.1, [::1]), or a private-use scheme URI, and must not contain a fragment. Leave empty for no redirect.
|
|
362
|
+
|
|
363
|
+
Returns
|
|
364
|
+
-------
|
|
365
|
+
App
|
|
366
|
+
API response as a typed Pydantic model
|
|
367
|
+
|
|
368
|
+
Raises
|
|
369
|
+
------
|
|
370
|
+
AppwriteException
|
|
371
|
+
If API request fails
|
|
372
|
+
"""
|
|
373
|
+
|
|
374
|
+
api_path = '/apps/{appId}'
|
|
375
|
+
api_params = {}
|
|
376
|
+
if app_id is None:
|
|
377
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
378
|
+
|
|
379
|
+
if name is None:
|
|
380
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
381
|
+
|
|
382
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
383
|
+
|
|
384
|
+
api_params['name'] = self._normalize_value(name)
|
|
385
|
+
if description is not None:
|
|
386
|
+
api_params['description'] = self._normalize_value(description)
|
|
387
|
+
if client_uri is not None:
|
|
388
|
+
api_params['clientUri'] = self._normalize_value(client_uri)
|
|
389
|
+
if logo_uri is not None:
|
|
390
|
+
api_params['logoUri'] = self._normalize_value(logo_uri)
|
|
391
|
+
if privacy_policy_url is not None:
|
|
392
|
+
api_params['privacyPolicyUrl'] = self._normalize_value(privacy_policy_url)
|
|
393
|
+
if terms_url is not None:
|
|
394
|
+
api_params['termsUrl'] = self._normalize_value(terms_url)
|
|
395
|
+
if contacts is not None:
|
|
396
|
+
api_params['contacts'] = self._normalize_value(contacts)
|
|
397
|
+
if tagline is not None:
|
|
398
|
+
api_params['tagline'] = self._normalize_value(tagline)
|
|
399
|
+
if tags is not None:
|
|
400
|
+
api_params['tags'] = self._normalize_value(tags)
|
|
401
|
+
if images is not None:
|
|
402
|
+
api_params['images'] = self._normalize_value(images)
|
|
403
|
+
if support_url is not None:
|
|
404
|
+
api_params['supportUrl'] = self._normalize_value(support_url)
|
|
405
|
+
if data_deletion_url is not None:
|
|
406
|
+
api_params['dataDeletionUrl'] = self._normalize_value(data_deletion_url)
|
|
407
|
+
if enabled is not None:
|
|
408
|
+
api_params['enabled'] = self._normalize_value(enabled)
|
|
409
|
+
if redirect_uris is not None:
|
|
410
|
+
api_params['redirectUris'] = self._normalize_value(redirect_uris)
|
|
411
|
+
if post_logout_redirect_uris is not None:
|
|
412
|
+
api_params['postLogoutRedirectUris'] = self._normalize_value(post_logout_redirect_uris)
|
|
413
|
+
if type is not None:
|
|
414
|
+
api_params['type'] = self._normalize_value(type)
|
|
415
|
+
if device_flow is not None:
|
|
416
|
+
api_params['deviceFlow'] = self._normalize_value(device_flow)
|
|
417
|
+
if installation_scopes is not None:
|
|
418
|
+
api_params['installationScopes'] = self._normalize_value(installation_scopes)
|
|
419
|
+
if installation_redirect_url is not None:
|
|
420
|
+
api_params['installationRedirectUrl'] = self._normalize_value(installation_redirect_url)
|
|
421
|
+
|
|
422
|
+
response = self.client.call('put', api_path, {
|
|
423
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
424
|
+
'content-type': 'application/json',
|
|
425
|
+
'accept': 'application/json',
|
|
426
|
+
}, api_params)
|
|
427
|
+
|
|
428
|
+
return self._parse_response(response, model=App)
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
def delete(
|
|
432
|
+
self,
|
|
433
|
+
app_id: str
|
|
434
|
+
) -> Dict[str, Any]:
|
|
435
|
+
"""
|
|
436
|
+
Delete an application by its unique ID.
|
|
437
|
+
|
|
438
|
+
Parameters
|
|
439
|
+
----------
|
|
440
|
+
app_id : str
|
|
441
|
+
Application unique ID.
|
|
442
|
+
|
|
443
|
+
Returns
|
|
444
|
+
-------
|
|
445
|
+
Dict[str, Any]
|
|
446
|
+
API response as a dictionary
|
|
447
|
+
|
|
448
|
+
Raises
|
|
449
|
+
------
|
|
450
|
+
AppwriteException
|
|
451
|
+
If API request fails
|
|
452
|
+
"""
|
|
453
|
+
|
|
454
|
+
api_path = '/apps/{appId}'
|
|
455
|
+
api_params = {}
|
|
456
|
+
if app_id is None:
|
|
457
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
458
|
+
|
|
459
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
response = self.client.call('delete', api_path, {
|
|
463
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
464
|
+
'content-type': 'application/json',
|
|
465
|
+
'accept': 'application/json',
|
|
466
|
+
}, api_params)
|
|
467
|
+
|
|
468
|
+
return response
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
def list_installations(
|
|
472
|
+
self,
|
|
473
|
+
app_id: str,
|
|
474
|
+
queries: Optional[List[str]] = None,
|
|
475
|
+
total: Optional[bool] = None
|
|
476
|
+
) -> AppInstallationList:
|
|
477
|
+
"""
|
|
478
|
+
List installations of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.
|
|
479
|
+
|
|
480
|
+
Parameters
|
|
481
|
+
----------
|
|
482
|
+
app_id : str
|
|
483
|
+
Application unique ID.
|
|
484
|
+
queries : Optional[List[str]]
|
|
485
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
486
|
+
total : Optional[bool]
|
|
487
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
488
|
+
|
|
489
|
+
Returns
|
|
490
|
+
-------
|
|
491
|
+
AppInstallationList
|
|
492
|
+
API response as a typed Pydantic model
|
|
493
|
+
|
|
494
|
+
Raises
|
|
495
|
+
------
|
|
496
|
+
AppwriteException
|
|
497
|
+
If API request fails
|
|
498
|
+
"""
|
|
499
|
+
|
|
500
|
+
api_path = '/apps/{appId}/installations'
|
|
501
|
+
api_params = {}
|
|
502
|
+
if app_id is None:
|
|
503
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
504
|
+
|
|
505
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
506
|
+
|
|
507
|
+
if queries is not None:
|
|
508
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
509
|
+
if total is not None:
|
|
510
|
+
api_params['total'] = self._normalize_value(total)
|
|
511
|
+
|
|
512
|
+
response = self.client.call('get', api_path, {
|
|
513
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
514
|
+
'accept': 'application/json',
|
|
515
|
+
}, api_params)
|
|
516
|
+
|
|
517
|
+
return self._parse_response(response, model=AppInstallationList)
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
def get_installation(
|
|
521
|
+
self,
|
|
522
|
+
app_id: str,
|
|
523
|
+
installation_id: str
|
|
524
|
+
) -> AppInstallation:
|
|
525
|
+
"""
|
|
526
|
+
Get an installation of an application by its unique ID. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app.
|
|
527
|
+
|
|
528
|
+
Parameters
|
|
529
|
+
----------
|
|
530
|
+
app_id : str
|
|
531
|
+
Application unique ID.
|
|
532
|
+
installation_id : str
|
|
533
|
+
Installation unique ID.
|
|
534
|
+
|
|
535
|
+
Returns
|
|
536
|
+
-------
|
|
537
|
+
AppInstallation
|
|
538
|
+
API response as a typed Pydantic model
|
|
539
|
+
|
|
540
|
+
Raises
|
|
541
|
+
------
|
|
542
|
+
AppwriteException
|
|
543
|
+
If API request fails
|
|
544
|
+
"""
|
|
545
|
+
|
|
546
|
+
api_path = '/apps/{appId}/installations/{installationId}'
|
|
547
|
+
api_params = {}
|
|
548
|
+
if app_id is None:
|
|
549
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
550
|
+
|
|
551
|
+
if installation_id is None:
|
|
552
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
553
|
+
|
|
554
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
555
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
response = self.client.call('get', api_path, {
|
|
559
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
560
|
+
'accept': 'application/json',
|
|
561
|
+
}, api_params)
|
|
562
|
+
|
|
563
|
+
return self._parse_response(response, model=AppInstallation)
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
def delete_installation(
|
|
567
|
+
self,
|
|
568
|
+
app_id: str,
|
|
569
|
+
installation_id: str
|
|
570
|
+
) -> Dict[str, Any]:
|
|
571
|
+
"""
|
|
572
|
+
Delete an installation of an application by its unique ID. Requires a caller with update access to the app. Previously issued installation access tokens are revoked.
|
|
573
|
+
|
|
574
|
+
Parameters
|
|
575
|
+
----------
|
|
576
|
+
app_id : str
|
|
577
|
+
Application unique ID.
|
|
578
|
+
installation_id : str
|
|
579
|
+
Installation unique ID.
|
|
580
|
+
|
|
581
|
+
Returns
|
|
582
|
+
-------
|
|
583
|
+
Dict[str, Any]
|
|
584
|
+
API response as a dictionary
|
|
585
|
+
|
|
586
|
+
Raises
|
|
587
|
+
------
|
|
588
|
+
AppwriteException
|
|
589
|
+
If API request fails
|
|
590
|
+
"""
|
|
591
|
+
|
|
592
|
+
api_path = '/apps/{appId}/installations/{installationId}'
|
|
593
|
+
api_params = {}
|
|
594
|
+
if app_id is None:
|
|
595
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
596
|
+
|
|
597
|
+
if installation_id is None:
|
|
598
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
599
|
+
|
|
600
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
601
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
response = self.client.call('delete', api_path, {
|
|
605
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
606
|
+
'content-type': 'application/json',
|
|
607
|
+
'accept': 'application/json',
|
|
608
|
+
}, api_params)
|
|
609
|
+
|
|
610
|
+
return response
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
def create_installation_token(
|
|
614
|
+
self,
|
|
615
|
+
app_id: str,
|
|
616
|
+
installation_id: str
|
|
617
|
+
) -> Oauth2Token:
|
|
618
|
+
"""
|
|
619
|
+
Create a token for an installation of an application. Requires an app key sent in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header, or a caller with update access to the app. The returned token carries the scopes and authorization details granted to the installation, and can be used as an `Authorization: Bearer` header everywhere OAuth2 access tokens are accepted. Multiple tokens can be active for the same installation at once; each token stays valid until it expires or the installation is updated or deleted.
|
|
620
|
+
|
|
621
|
+
Parameters
|
|
622
|
+
----------
|
|
623
|
+
app_id : str
|
|
624
|
+
Application unique ID.
|
|
625
|
+
installation_id : str
|
|
626
|
+
Installation unique ID.
|
|
627
|
+
|
|
628
|
+
Returns
|
|
629
|
+
-------
|
|
630
|
+
Oauth2Token
|
|
631
|
+
API response as a typed Pydantic model
|
|
632
|
+
|
|
633
|
+
Raises
|
|
634
|
+
------
|
|
635
|
+
AppwriteException
|
|
636
|
+
If API request fails
|
|
637
|
+
"""
|
|
638
|
+
|
|
639
|
+
api_path = '/apps/{appId}/installations/{installationId}/tokens'
|
|
640
|
+
api_params = {}
|
|
641
|
+
if app_id is None:
|
|
642
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
643
|
+
|
|
644
|
+
if installation_id is None:
|
|
645
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
646
|
+
|
|
647
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
648
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
response = self.client.call('post', api_path, {
|
|
652
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
653
|
+
'content-type': 'application/json',
|
|
654
|
+
'accept': 'application/json',
|
|
655
|
+
}, api_params)
|
|
656
|
+
|
|
657
|
+
return self._parse_response(response, model=Oauth2Token)
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
def list_keys(
|
|
661
|
+
self,
|
|
662
|
+
app_id: str,
|
|
663
|
+
queries: Optional[List[str]] = None,
|
|
664
|
+
total: Optional[bool] = None
|
|
665
|
+
) -> AppKeyList:
|
|
666
|
+
"""
|
|
667
|
+
List app keys for an application.
|
|
668
|
+
|
|
669
|
+
Parameters
|
|
670
|
+
----------
|
|
671
|
+
app_id : str
|
|
672
|
+
Application unique ID.
|
|
673
|
+
queries : Optional[List[str]]
|
|
674
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
675
|
+
total : Optional[bool]
|
|
676
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
677
|
+
|
|
678
|
+
Returns
|
|
679
|
+
-------
|
|
680
|
+
AppKeyList
|
|
681
|
+
API response as a typed Pydantic model
|
|
682
|
+
|
|
683
|
+
Raises
|
|
684
|
+
------
|
|
685
|
+
AppwriteException
|
|
686
|
+
If API request fails
|
|
687
|
+
"""
|
|
688
|
+
|
|
689
|
+
api_path = '/apps/{appId}/keys'
|
|
690
|
+
api_params = {}
|
|
691
|
+
if app_id is None:
|
|
692
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
693
|
+
|
|
694
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
695
|
+
|
|
696
|
+
if queries is not None:
|
|
697
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
698
|
+
if total is not None:
|
|
699
|
+
api_params['total'] = self._normalize_value(total)
|
|
700
|
+
|
|
701
|
+
response = self.client.call('get', api_path, {
|
|
702
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
703
|
+
'accept': 'application/json',
|
|
704
|
+
}, api_params)
|
|
705
|
+
|
|
706
|
+
return self._parse_response(response, model=AppKeyList)
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
def create_key(
|
|
710
|
+
self,
|
|
711
|
+
app_id: str
|
|
712
|
+
) -> AppKey:
|
|
713
|
+
"""
|
|
714
|
+
Create a new app key for an application. App keys carry no scopes; send one in the `X-Appwrite-Key` header alongside the `X-Appwrite-App` header to list the application's installations and create installation access tokens.
|
|
715
|
+
|
|
716
|
+
Parameters
|
|
717
|
+
----------
|
|
718
|
+
app_id : str
|
|
719
|
+
Application unique ID.
|
|
720
|
+
|
|
721
|
+
Returns
|
|
722
|
+
-------
|
|
723
|
+
AppKey
|
|
724
|
+
API response as a typed Pydantic model
|
|
725
|
+
|
|
726
|
+
Raises
|
|
727
|
+
------
|
|
728
|
+
AppwriteException
|
|
729
|
+
If API request fails
|
|
730
|
+
"""
|
|
731
|
+
|
|
732
|
+
api_path = '/apps/{appId}/keys'
|
|
733
|
+
api_params = {}
|
|
734
|
+
if app_id is None:
|
|
735
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
736
|
+
|
|
737
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
response = self.client.call('post', api_path, {
|
|
741
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
742
|
+
'content-type': 'application/json',
|
|
743
|
+
'accept': 'application/json',
|
|
744
|
+
}, api_params)
|
|
745
|
+
|
|
746
|
+
return self._parse_response(response, model=AppKey)
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
def get_key(
|
|
750
|
+
self,
|
|
751
|
+
app_id: str,
|
|
752
|
+
key_id: str
|
|
753
|
+
) -> AppKey:
|
|
754
|
+
"""
|
|
755
|
+
Get an app key by its unique ID.
|
|
756
|
+
|
|
757
|
+
Parameters
|
|
758
|
+
----------
|
|
759
|
+
app_id : str
|
|
760
|
+
Application unique ID.
|
|
761
|
+
key_id : str
|
|
762
|
+
App key unique ID.
|
|
763
|
+
|
|
764
|
+
Returns
|
|
765
|
+
-------
|
|
766
|
+
AppKey
|
|
767
|
+
API response as a typed Pydantic model
|
|
768
|
+
|
|
769
|
+
Raises
|
|
770
|
+
------
|
|
771
|
+
AppwriteException
|
|
772
|
+
If API request fails
|
|
773
|
+
"""
|
|
774
|
+
|
|
775
|
+
api_path = '/apps/{appId}/keys/{keyId}'
|
|
776
|
+
api_params = {}
|
|
777
|
+
if app_id is None:
|
|
778
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
779
|
+
|
|
780
|
+
if key_id is None:
|
|
781
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
782
|
+
|
|
783
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
784
|
+
api_path = api_path.replace('{keyId}', str(self._normalize_value(key_id)))
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
response = self.client.call('get', api_path, {
|
|
788
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
789
|
+
'accept': 'application/json',
|
|
790
|
+
}, api_params)
|
|
791
|
+
|
|
792
|
+
return self._parse_response(response, model=AppKey)
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
def delete_key(
|
|
796
|
+
self,
|
|
797
|
+
app_id: str,
|
|
798
|
+
key_id: str
|
|
799
|
+
) -> Dict[str, Any]:
|
|
800
|
+
"""
|
|
801
|
+
Delete an app key by its unique ID.
|
|
802
|
+
|
|
803
|
+
Parameters
|
|
804
|
+
----------
|
|
805
|
+
app_id : str
|
|
806
|
+
Application unique ID.
|
|
807
|
+
key_id : str
|
|
808
|
+
App key unique ID.
|
|
809
|
+
|
|
810
|
+
Returns
|
|
811
|
+
-------
|
|
812
|
+
Dict[str, Any]
|
|
813
|
+
API response as a dictionary
|
|
814
|
+
|
|
815
|
+
Raises
|
|
816
|
+
------
|
|
817
|
+
AppwriteException
|
|
818
|
+
If API request fails
|
|
819
|
+
"""
|
|
820
|
+
|
|
821
|
+
api_path = '/apps/{appId}/keys/{keyId}'
|
|
822
|
+
api_params = {}
|
|
823
|
+
if app_id is None:
|
|
824
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
825
|
+
|
|
826
|
+
if key_id is None:
|
|
827
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
828
|
+
|
|
829
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
830
|
+
api_path = api_path.replace('{keyId}', str(self._normalize_value(key_id)))
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
response = self.client.call('delete', api_path, {
|
|
834
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
835
|
+
'content-type': 'application/json',
|
|
836
|
+
'accept': 'application/json',
|
|
837
|
+
}, api_params)
|
|
838
|
+
|
|
839
|
+
return response
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
def update_labels(
|
|
843
|
+
self,
|
|
844
|
+
app_id: str,
|
|
845
|
+
labels: List[str]
|
|
846
|
+
) -> App:
|
|
847
|
+
"""
|
|
848
|
+
Update the labels of an application. Labels are read-only for clients; only a server SDK using a project API key can set them. Replaces the previous labels.
|
|
849
|
+
|
|
850
|
+
Parameters
|
|
851
|
+
----------
|
|
852
|
+
app_id : str
|
|
853
|
+
Application unique ID.
|
|
854
|
+
labels : List[str]
|
|
855
|
+
Array of application labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
856
|
+
|
|
857
|
+
Returns
|
|
858
|
+
-------
|
|
859
|
+
App
|
|
860
|
+
API response as a typed Pydantic model
|
|
861
|
+
|
|
862
|
+
Raises
|
|
863
|
+
------
|
|
864
|
+
AppwriteException
|
|
865
|
+
If API request fails
|
|
866
|
+
"""
|
|
867
|
+
|
|
868
|
+
api_path = '/apps/{appId}/labels'
|
|
869
|
+
api_params = {}
|
|
870
|
+
if app_id is None:
|
|
871
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
872
|
+
|
|
873
|
+
if labels is None:
|
|
874
|
+
raise AppwriteException('Missing required parameter: "labels"')
|
|
875
|
+
|
|
876
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
877
|
+
|
|
878
|
+
api_params['labels'] = self._normalize_value(labels)
|
|
879
|
+
|
|
880
|
+
response = self.client.call('put', api_path, {
|
|
881
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
882
|
+
'content-type': 'application/json',
|
|
883
|
+
'accept': 'application/json',
|
|
884
|
+
}, api_params)
|
|
885
|
+
|
|
886
|
+
return self._parse_response(response, model=App)
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
def list_secrets(
|
|
890
|
+
self,
|
|
891
|
+
app_id: str,
|
|
892
|
+
queries: Optional[List[str]] = None,
|
|
893
|
+
total: Optional[bool] = None
|
|
894
|
+
) -> AppSecretList:
|
|
895
|
+
"""
|
|
896
|
+
List client secrets for an application.
|
|
897
|
+
|
|
898
|
+
Parameters
|
|
899
|
+
----------
|
|
900
|
+
app_id : str
|
|
901
|
+
Application unique ID.
|
|
902
|
+
queries : Optional[List[str]]
|
|
903
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
904
|
+
total : Optional[bool]
|
|
905
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
906
|
+
|
|
907
|
+
Returns
|
|
908
|
+
-------
|
|
909
|
+
AppSecretList
|
|
910
|
+
API response as a typed Pydantic model
|
|
911
|
+
|
|
912
|
+
Raises
|
|
913
|
+
------
|
|
914
|
+
AppwriteException
|
|
915
|
+
If API request fails
|
|
916
|
+
"""
|
|
917
|
+
|
|
918
|
+
api_path = '/apps/{appId}/secrets'
|
|
919
|
+
api_params = {}
|
|
920
|
+
if app_id is None:
|
|
921
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
922
|
+
|
|
923
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
924
|
+
|
|
925
|
+
if queries is not None:
|
|
926
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
927
|
+
if total is not None:
|
|
928
|
+
api_params['total'] = self._normalize_value(total)
|
|
929
|
+
|
|
930
|
+
response = self.client.call('get', api_path, {
|
|
931
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
932
|
+
'accept': 'application/json',
|
|
933
|
+
}, api_params)
|
|
934
|
+
|
|
935
|
+
return self._parse_response(response, model=AppSecretList)
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
def create_secret(
|
|
939
|
+
self,
|
|
940
|
+
app_id: str
|
|
941
|
+
) -> AppSecretPlaintext:
|
|
942
|
+
"""
|
|
943
|
+
Create a new client secret for an application.
|
|
944
|
+
|
|
945
|
+
Parameters
|
|
946
|
+
----------
|
|
947
|
+
app_id : str
|
|
948
|
+
Application unique ID.
|
|
949
|
+
|
|
950
|
+
Returns
|
|
951
|
+
-------
|
|
952
|
+
AppSecretPlaintext
|
|
953
|
+
API response as a typed Pydantic model
|
|
954
|
+
|
|
955
|
+
Raises
|
|
956
|
+
------
|
|
957
|
+
AppwriteException
|
|
958
|
+
If API request fails
|
|
959
|
+
"""
|
|
960
|
+
|
|
961
|
+
api_path = '/apps/{appId}/secrets'
|
|
962
|
+
api_params = {}
|
|
963
|
+
if app_id is None:
|
|
964
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
965
|
+
|
|
966
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
response = self.client.call('post', api_path, {
|
|
970
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
971
|
+
'content-type': 'application/json',
|
|
972
|
+
'accept': 'application/json',
|
|
973
|
+
}, api_params)
|
|
974
|
+
|
|
975
|
+
return self._parse_response(response, model=AppSecretPlaintext)
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
def get_secret(
|
|
979
|
+
self,
|
|
980
|
+
app_id: str,
|
|
981
|
+
secret_id: str
|
|
982
|
+
) -> AppSecret:
|
|
983
|
+
"""
|
|
984
|
+
Get an application client secret by its unique ID.
|
|
985
|
+
|
|
986
|
+
Parameters
|
|
987
|
+
----------
|
|
988
|
+
app_id : str
|
|
989
|
+
Application unique ID.
|
|
990
|
+
secret_id : str
|
|
991
|
+
Secret unique ID.
|
|
992
|
+
|
|
993
|
+
Returns
|
|
994
|
+
-------
|
|
995
|
+
AppSecret
|
|
996
|
+
API response as a typed Pydantic model
|
|
997
|
+
|
|
998
|
+
Raises
|
|
999
|
+
------
|
|
1000
|
+
AppwriteException
|
|
1001
|
+
If API request fails
|
|
1002
|
+
"""
|
|
1003
|
+
|
|
1004
|
+
api_path = '/apps/{appId}/secrets/{secretId}'
|
|
1005
|
+
api_params = {}
|
|
1006
|
+
if app_id is None:
|
|
1007
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
1008
|
+
|
|
1009
|
+
if secret_id is None:
|
|
1010
|
+
raise AppwriteException('Missing required parameter: "secret_id"')
|
|
1011
|
+
|
|
1012
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
1013
|
+
api_path = api_path.replace('{secretId}', str(self._normalize_value(secret_id)))
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
response = self.client.call('get', api_path, {
|
|
1017
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1018
|
+
'accept': 'application/json',
|
|
1019
|
+
}, api_params)
|
|
1020
|
+
|
|
1021
|
+
return self._parse_response(response, model=AppSecret)
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
def delete_secret(
|
|
1025
|
+
self,
|
|
1026
|
+
app_id: str,
|
|
1027
|
+
secret_id: str
|
|
1028
|
+
) -> Dict[str, Any]:
|
|
1029
|
+
"""
|
|
1030
|
+
Delete an application client secret by its unique ID.
|
|
1031
|
+
|
|
1032
|
+
Parameters
|
|
1033
|
+
----------
|
|
1034
|
+
app_id : str
|
|
1035
|
+
Application unique ID.
|
|
1036
|
+
secret_id : str
|
|
1037
|
+
Secret unique ID.
|
|
1038
|
+
|
|
1039
|
+
Returns
|
|
1040
|
+
-------
|
|
1041
|
+
Dict[str, Any]
|
|
1042
|
+
API response as a dictionary
|
|
1043
|
+
|
|
1044
|
+
Raises
|
|
1045
|
+
------
|
|
1046
|
+
AppwriteException
|
|
1047
|
+
If API request fails
|
|
1048
|
+
"""
|
|
1049
|
+
|
|
1050
|
+
api_path = '/apps/{appId}/secrets/{secretId}'
|
|
1051
|
+
api_params = {}
|
|
1052
|
+
if app_id is None:
|
|
1053
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
1054
|
+
|
|
1055
|
+
if secret_id is None:
|
|
1056
|
+
raise AppwriteException('Missing required parameter: "secret_id"')
|
|
1057
|
+
|
|
1058
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
1059
|
+
api_path = api_path.replace('{secretId}', str(self._normalize_value(secret_id)))
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
response = self.client.call('delete', api_path, {
|
|
1063
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1064
|
+
'content-type': 'application/json',
|
|
1065
|
+
'accept': 'application/json',
|
|
1066
|
+
}, api_params)
|
|
1067
|
+
|
|
1068
|
+
return response
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
def update_team(
|
|
1072
|
+
self,
|
|
1073
|
+
app_id: str,
|
|
1074
|
+
team_id: str
|
|
1075
|
+
) -> App:
|
|
1076
|
+
"""
|
|
1077
|
+
Transfer an application to another team by its unique ID.
|
|
1078
|
+
|
|
1079
|
+
Parameters
|
|
1080
|
+
----------
|
|
1081
|
+
app_id : str
|
|
1082
|
+
Application unique ID.
|
|
1083
|
+
team_id : str
|
|
1084
|
+
Team ID of the team to transfer application to.
|
|
1085
|
+
|
|
1086
|
+
Returns
|
|
1087
|
+
-------
|
|
1088
|
+
App
|
|
1089
|
+
API response as a typed Pydantic model
|
|
1090
|
+
|
|
1091
|
+
Raises
|
|
1092
|
+
------
|
|
1093
|
+
AppwriteException
|
|
1094
|
+
If API request fails
|
|
1095
|
+
"""
|
|
1096
|
+
|
|
1097
|
+
api_path = '/apps/{appId}/team'
|
|
1098
|
+
api_params = {}
|
|
1099
|
+
if app_id is None:
|
|
1100
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
1101
|
+
|
|
1102
|
+
if team_id is None:
|
|
1103
|
+
raise AppwriteException('Missing required parameter: "team_id"')
|
|
1104
|
+
|
|
1105
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
1106
|
+
|
|
1107
|
+
api_params['teamId'] = self._normalize_value(team_id)
|
|
1108
|
+
|
|
1109
|
+
response = self.client.call('patch', api_path, {
|
|
1110
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1111
|
+
'content-type': 'application/json',
|
|
1112
|
+
'accept': 'application/json',
|
|
1113
|
+
}, api_params)
|
|
1114
|
+
|
|
1115
|
+
return self._parse_response(response, model=App)
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
def delete_tokens(
|
|
1119
|
+
self,
|
|
1120
|
+
app_id: str
|
|
1121
|
+
) -> Dict[str, Any]:
|
|
1122
|
+
"""
|
|
1123
|
+
Revoke all tokens for an application by its unique ID.
|
|
1124
|
+
|
|
1125
|
+
Parameters
|
|
1126
|
+
----------
|
|
1127
|
+
app_id : str
|
|
1128
|
+
Application unique ID.
|
|
1129
|
+
|
|
1130
|
+
Returns
|
|
1131
|
+
-------
|
|
1132
|
+
Dict[str, Any]
|
|
1133
|
+
API response as a dictionary
|
|
1134
|
+
|
|
1135
|
+
Raises
|
|
1136
|
+
------
|
|
1137
|
+
AppwriteException
|
|
1138
|
+
If API request fails
|
|
1139
|
+
"""
|
|
1140
|
+
|
|
1141
|
+
api_path = '/apps/{appId}/tokens'
|
|
1142
|
+
api_params = {}
|
|
1143
|
+
if app_id is None:
|
|
1144
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
1145
|
+
|
|
1146
|
+
api_path = api_path.replace('{appId}', str(self._normalize_value(app_id)))
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
response = self.client.call('delete', api_path, {
|
|
1150
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1151
|
+
'content-type': 'application/json',
|
|
1152
|
+
'accept': 'application/json',
|
|
1153
|
+
}, api_params)
|
|
1154
|
+
|
|
1155
|
+
return response
|
|
1156
|
+
|