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,1039 @@
|
|
|
1
|
+
from ..service import Service
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
from typing import Any, Dict, List, Optional, Union, Type, TypeVar
|
|
4
|
+
from ..exception import AppwriteException
|
|
5
|
+
from appwrite_console.utils.deprecated import deprecated
|
|
6
|
+
from ..models.organization import Organization as OrganizationModel
|
|
7
|
+
from ..models.app_installation_list import AppInstallationList
|
|
8
|
+
from ..models.app_installation import AppInstallation
|
|
9
|
+
from ..models.key_list import KeyList
|
|
10
|
+
from ..enums.organization_key_scopes import OrganizationKeyScopes
|
|
11
|
+
from ..models.key import Key
|
|
12
|
+
from ..models.membership_list import MembershipList
|
|
13
|
+
from ..models.membership import Membership
|
|
14
|
+
from ..models.project_list import ProjectList
|
|
15
|
+
from ..enums.region import Region
|
|
16
|
+
from ..models.project import Project
|
|
17
|
+
|
|
18
|
+
T = TypeVar('T')
|
|
19
|
+
|
|
20
|
+
class Organization(Service):
|
|
21
|
+
|
|
22
|
+
def __init__(self, client) -> None:
|
|
23
|
+
super(Organization, self).__init__(client)
|
|
24
|
+
|
|
25
|
+
def get(
|
|
26
|
+
self,
|
|
27
|
+
model_type: Type[T] = dict
|
|
28
|
+
) -> OrganizationModel[T]:
|
|
29
|
+
"""
|
|
30
|
+
Get the current organization.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
|
|
35
|
+
model_type : Type[T], optional
|
|
36
|
+
Pydantic model class for the user-defined data. Defaults to dict for backward compatibility.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
OrganizationModel[T]
|
|
41
|
+
API response as a typed Pydantic model
|
|
42
|
+
|
|
43
|
+
Raises
|
|
44
|
+
------
|
|
45
|
+
AppwriteException
|
|
46
|
+
If API request fails
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
api_path = '/organization'
|
|
50
|
+
api_params = {}
|
|
51
|
+
|
|
52
|
+
response = self.client.call('get', api_path, {
|
|
53
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
54
|
+
'accept': 'application/json',
|
|
55
|
+
}, api_params)
|
|
56
|
+
|
|
57
|
+
return OrganizationModel.with_data(response, model_type)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def update(
|
|
61
|
+
self,
|
|
62
|
+
name: str,
|
|
63
|
+
model_type: Type[T] = dict
|
|
64
|
+
) -> OrganizationModel[T]:
|
|
65
|
+
"""
|
|
66
|
+
Update the current organization's name.
|
|
67
|
+
|
|
68
|
+
Parameters
|
|
69
|
+
----------
|
|
70
|
+
name : str
|
|
71
|
+
New organization name. Max length: 128 chars.
|
|
72
|
+
|
|
73
|
+
model_type : Type[T], optional
|
|
74
|
+
Pydantic model class for the user-defined data. Defaults to dict for backward compatibility.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
OrganizationModel[T]
|
|
79
|
+
API response as a typed Pydantic model
|
|
80
|
+
|
|
81
|
+
Raises
|
|
82
|
+
------
|
|
83
|
+
AppwriteException
|
|
84
|
+
If API request fails
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
api_path = '/organization'
|
|
88
|
+
api_params = {}
|
|
89
|
+
if name is None:
|
|
90
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
api_params['name'] = self._normalize_value(name)
|
|
94
|
+
|
|
95
|
+
response = self.client.call('put', api_path, {
|
|
96
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
97
|
+
'content-type': 'application/json',
|
|
98
|
+
'accept': 'application/json',
|
|
99
|
+
}, api_params)
|
|
100
|
+
|
|
101
|
+
return OrganizationModel.with_data(response, model_type)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def delete(
|
|
105
|
+
self
|
|
106
|
+
) -> Dict[str, Any]:
|
|
107
|
+
"""
|
|
108
|
+
Delete the current organization. All projects that belong to the organization are deleted as well.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
Dict[str, Any]
|
|
113
|
+
API response as a dictionary
|
|
114
|
+
|
|
115
|
+
Raises
|
|
116
|
+
------
|
|
117
|
+
AppwriteException
|
|
118
|
+
If API request fails
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
api_path = '/organization'
|
|
122
|
+
api_params = {}
|
|
123
|
+
|
|
124
|
+
response = self.client.call('delete', api_path, {
|
|
125
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
126
|
+
'content-type': 'application/json',
|
|
127
|
+
}, api_params)
|
|
128
|
+
|
|
129
|
+
return response
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def list_installations(
|
|
133
|
+
self,
|
|
134
|
+
queries: Optional[List[str]] = None,
|
|
135
|
+
total: Optional[bool] = None
|
|
136
|
+
) -> AppInstallationList:
|
|
137
|
+
"""
|
|
138
|
+
List app installations on the organization. Any organization member can read installations.
|
|
139
|
+
|
|
140
|
+
Parameters
|
|
141
|
+
----------
|
|
142
|
+
queries : Optional[List[str]]
|
|
143
|
+
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.
|
|
144
|
+
total : Optional[bool]
|
|
145
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
146
|
+
|
|
147
|
+
Returns
|
|
148
|
+
-------
|
|
149
|
+
AppInstallationList
|
|
150
|
+
API response as a typed Pydantic model
|
|
151
|
+
|
|
152
|
+
Raises
|
|
153
|
+
------
|
|
154
|
+
AppwriteException
|
|
155
|
+
If API request fails
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
api_path = '/organization/installations'
|
|
159
|
+
api_params = {}
|
|
160
|
+
|
|
161
|
+
if queries is not None:
|
|
162
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
163
|
+
if total is not None:
|
|
164
|
+
api_params['total'] = self._normalize_value(total)
|
|
165
|
+
|
|
166
|
+
response = self.client.call('get', api_path, {
|
|
167
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
168
|
+
'accept': 'application/json',
|
|
169
|
+
}, api_params)
|
|
170
|
+
|
|
171
|
+
return self._parse_response(response, model=AppInstallationList)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def create_installation(
|
|
175
|
+
self,
|
|
176
|
+
app_id: str,
|
|
177
|
+
authorization_details: Optional[str] = None
|
|
178
|
+
) -> AppInstallation:
|
|
179
|
+
"""
|
|
180
|
+
Install an app on the organization. Only organization members with the owner role can install apps. The installation is granted the scopes the app currently requests.
|
|
181
|
+
|
|
182
|
+
Parameters
|
|
183
|
+
----------
|
|
184
|
+
app_id : str
|
|
185
|
+
Application unique ID.
|
|
186
|
+
authorization_details : Optional[str]
|
|
187
|
+
Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.
|
|
188
|
+
|
|
189
|
+
Returns
|
|
190
|
+
-------
|
|
191
|
+
AppInstallation
|
|
192
|
+
API response as a typed Pydantic model
|
|
193
|
+
|
|
194
|
+
Raises
|
|
195
|
+
------
|
|
196
|
+
AppwriteException
|
|
197
|
+
If API request fails
|
|
198
|
+
"""
|
|
199
|
+
|
|
200
|
+
api_path = '/organization/installations'
|
|
201
|
+
api_params = {}
|
|
202
|
+
if app_id is None:
|
|
203
|
+
raise AppwriteException('Missing required parameter: "app_id"')
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
api_params['appId'] = self._normalize_value(app_id)
|
|
207
|
+
if authorization_details is not None:
|
|
208
|
+
api_params['authorizationDetails'] = self._normalize_value(authorization_details)
|
|
209
|
+
|
|
210
|
+
response = self.client.call('post', api_path, {
|
|
211
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
212
|
+
'content-type': 'application/json',
|
|
213
|
+
'accept': 'application/json',
|
|
214
|
+
}, api_params)
|
|
215
|
+
|
|
216
|
+
return self._parse_response(response, model=AppInstallation)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def get_installation(
|
|
220
|
+
self,
|
|
221
|
+
installation_id: str
|
|
222
|
+
) -> AppInstallation:
|
|
223
|
+
"""
|
|
224
|
+
Get an app installation on the organization by its unique ID. Any organization member can read installations.
|
|
225
|
+
|
|
226
|
+
Parameters
|
|
227
|
+
----------
|
|
228
|
+
installation_id : str
|
|
229
|
+
Installation unique ID.
|
|
230
|
+
|
|
231
|
+
Returns
|
|
232
|
+
-------
|
|
233
|
+
AppInstallation
|
|
234
|
+
API response as a typed Pydantic model
|
|
235
|
+
|
|
236
|
+
Raises
|
|
237
|
+
------
|
|
238
|
+
AppwriteException
|
|
239
|
+
If API request fails
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
api_path = '/organization/installations/{installationId}'
|
|
243
|
+
api_params = {}
|
|
244
|
+
if installation_id is None:
|
|
245
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
246
|
+
|
|
247
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
response = self.client.call('get', api_path, {
|
|
251
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
252
|
+
'accept': 'application/json',
|
|
253
|
+
}, api_params)
|
|
254
|
+
|
|
255
|
+
return self._parse_response(response, model=AppInstallation)
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def update_installation(
|
|
259
|
+
self,
|
|
260
|
+
installation_id: str,
|
|
261
|
+
authorization_details: Optional[str] = None
|
|
262
|
+
) -> AppInstallation:
|
|
263
|
+
"""
|
|
264
|
+
Update an app installation on the organization. Only organization members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
|
|
265
|
+
|
|
266
|
+
Parameters
|
|
267
|
+
----------
|
|
268
|
+
installation_id : str
|
|
269
|
+
Installation unique ID.
|
|
270
|
+
authorization_details : Optional[str]
|
|
271
|
+
Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.
|
|
272
|
+
|
|
273
|
+
Returns
|
|
274
|
+
-------
|
|
275
|
+
AppInstallation
|
|
276
|
+
API response as a typed Pydantic model
|
|
277
|
+
|
|
278
|
+
Raises
|
|
279
|
+
------
|
|
280
|
+
AppwriteException
|
|
281
|
+
If API request fails
|
|
282
|
+
"""
|
|
283
|
+
|
|
284
|
+
api_path = '/organization/installations/{installationId}'
|
|
285
|
+
api_params = {}
|
|
286
|
+
if installation_id is None:
|
|
287
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
288
|
+
|
|
289
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
290
|
+
|
|
291
|
+
if authorization_details is not None:
|
|
292
|
+
api_params['authorizationDetails'] = self._normalize_value(authorization_details)
|
|
293
|
+
|
|
294
|
+
response = self.client.call('put', api_path, {
|
|
295
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
296
|
+
'content-type': 'application/json',
|
|
297
|
+
'accept': 'application/json',
|
|
298
|
+
}, api_params)
|
|
299
|
+
|
|
300
|
+
return self._parse_response(response, model=AppInstallation)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def delete_installation(
|
|
304
|
+
self,
|
|
305
|
+
installation_id: str
|
|
306
|
+
) -> Dict[str, Any]:
|
|
307
|
+
"""
|
|
308
|
+
Uninstall an app from the organization by its installation ID. Only organization members with the owner role can remove installations. Previously issued installation access tokens are revoked.
|
|
309
|
+
|
|
310
|
+
Parameters
|
|
311
|
+
----------
|
|
312
|
+
installation_id : str
|
|
313
|
+
Installation unique ID.
|
|
314
|
+
|
|
315
|
+
Returns
|
|
316
|
+
-------
|
|
317
|
+
Dict[str, Any]
|
|
318
|
+
API response as a dictionary
|
|
319
|
+
|
|
320
|
+
Raises
|
|
321
|
+
------
|
|
322
|
+
AppwriteException
|
|
323
|
+
If API request fails
|
|
324
|
+
"""
|
|
325
|
+
|
|
326
|
+
api_path = '/organization/installations/{installationId}'
|
|
327
|
+
api_params = {}
|
|
328
|
+
if installation_id is None:
|
|
329
|
+
raise AppwriteException('Missing required parameter: "installation_id"')
|
|
330
|
+
|
|
331
|
+
api_path = api_path.replace('{installationId}', str(self._normalize_value(installation_id)))
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
response = self.client.call('delete', api_path, {
|
|
335
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
336
|
+
'content-type': 'application/json',
|
|
337
|
+
'accept': 'application/json',
|
|
338
|
+
}, api_params)
|
|
339
|
+
|
|
340
|
+
return response
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
def list_keys(
|
|
344
|
+
self,
|
|
345
|
+
queries: Optional[List[str]] = None,
|
|
346
|
+
total: Optional[bool] = None
|
|
347
|
+
) -> KeyList:
|
|
348
|
+
"""
|
|
349
|
+
Get a list of all API keys from the current organization.
|
|
350
|
+
|
|
351
|
+
Parameters
|
|
352
|
+
----------
|
|
353
|
+
queries : Optional[List[str]]
|
|
354
|
+
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. You may filter on the following attributes: expire, accessedAt, name, scopes
|
|
355
|
+
total : Optional[bool]
|
|
356
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
357
|
+
|
|
358
|
+
Returns
|
|
359
|
+
-------
|
|
360
|
+
KeyList
|
|
361
|
+
API response as a typed Pydantic model
|
|
362
|
+
|
|
363
|
+
Raises
|
|
364
|
+
------
|
|
365
|
+
AppwriteException
|
|
366
|
+
If API request fails
|
|
367
|
+
"""
|
|
368
|
+
|
|
369
|
+
api_path = '/organization/keys'
|
|
370
|
+
api_params = {}
|
|
371
|
+
|
|
372
|
+
if queries is not None:
|
|
373
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
374
|
+
if total is not None:
|
|
375
|
+
api_params['total'] = self._normalize_value(total)
|
|
376
|
+
|
|
377
|
+
response = self.client.call('get', api_path, {
|
|
378
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
379
|
+
'accept': 'application/json',
|
|
380
|
+
}, api_params)
|
|
381
|
+
|
|
382
|
+
return self._parse_response(response, model=KeyList)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
def create_key(
|
|
386
|
+
self,
|
|
387
|
+
key_id: str,
|
|
388
|
+
name: str,
|
|
389
|
+
scopes: List[OrganizationKeyScopes],
|
|
390
|
+
expire: Optional[str] = None
|
|
391
|
+
) -> Key:
|
|
392
|
+
"""
|
|
393
|
+
Create a new organization API key.
|
|
394
|
+
|
|
395
|
+
Parameters
|
|
396
|
+
----------
|
|
397
|
+
key_id : str
|
|
398
|
+
Key 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.
|
|
399
|
+
name : str
|
|
400
|
+
Key name. Max length: 128 chars.
|
|
401
|
+
scopes : List[OrganizationKeyScopes]
|
|
402
|
+
Key scopes list. Maximum of 200 scopes are allowed.
|
|
403
|
+
expire : Optional[str]
|
|
404
|
+
Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
405
|
+
|
|
406
|
+
Returns
|
|
407
|
+
-------
|
|
408
|
+
Key
|
|
409
|
+
API response as a typed Pydantic model
|
|
410
|
+
|
|
411
|
+
Raises
|
|
412
|
+
------
|
|
413
|
+
AppwriteException
|
|
414
|
+
If API request fails
|
|
415
|
+
"""
|
|
416
|
+
|
|
417
|
+
api_path = '/organization/keys'
|
|
418
|
+
api_params = {}
|
|
419
|
+
if key_id is None:
|
|
420
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
421
|
+
|
|
422
|
+
if name is None:
|
|
423
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
424
|
+
|
|
425
|
+
if scopes is None:
|
|
426
|
+
raise AppwriteException('Missing required parameter: "scopes"')
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
api_params['keyId'] = self._normalize_value(key_id)
|
|
430
|
+
api_params['name'] = self._normalize_value(name)
|
|
431
|
+
api_params['scopes'] = self._normalize_value(scopes)
|
|
432
|
+
if expire is not None:
|
|
433
|
+
api_params['expire'] = self._normalize_value(expire)
|
|
434
|
+
|
|
435
|
+
response = self.client.call('post', api_path, {
|
|
436
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
437
|
+
'content-type': 'application/json',
|
|
438
|
+
'accept': 'application/json',
|
|
439
|
+
}, api_params)
|
|
440
|
+
|
|
441
|
+
return self._parse_response(response, model=Key)
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
def get_key(
|
|
445
|
+
self,
|
|
446
|
+
key_id: str
|
|
447
|
+
) -> Key:
|
|
448
|
+
"""
|
|
449
|
+
Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.
|
|
450
|
+
|
|
451
|
+
Parameters
|
|
452
|
+
----------
|
|
453
|
+
key_id : str
|
|
454
|
+
Key unique ID.
|
|
455
|
+
|
|
456
|
+
Returns
|
|
457
|
+
-------
|
|
458
|
+
Key
|
|
459
|
+
API response as a typed Pydantic model
|
|
460
|
+
|
|
461
|
+
Raises
|
|
462
|
+
------
|
|
463
|
+
AppwriteException
|
|
464
|
+
If API request fails
|
|
465
|
+
"""
|
|
466
|
+
|
|
467
|
+
api_path = '/organization/keys/{keyId}'
|
|
468
|
+
api_params = {}
|
|
469
|
+
if key_id is None:
|
|
470
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
471
|
+
|
|
472
|
+
api_path = api_path.replace('{keyId}', str(self._normalize_value(key_id)))
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
response = self.client.call('get', api_path, {
|
|
476
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
477
|
+
'accept': 'application/json',
|
|
478
|
+
}, api_params)
|
|
479
|
+
|
|
480
|
+
return self._parse_response(response, model=Key)
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
def update_key(
|
|
484
|
+
self,
|
|
485
|
+
key_id: str,
|
|
486
|
+
name: str,
|
|
487
|
+
scopes: List[OrganizationKeyScopes],
|
|
488
|
+
expire: Optional[str] = None
|
|
489
|
+
) -> Key:
|
|
490
|
+
"""
|
|
491
|
+
Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
492
|
+
|
|
493
|
+
Parameters
|
|
494
|
+
----------
|
|
495
|
+
key_id : str
|
|
496
|
+
Key unique ID.
|
|
497
|
+
name : str
|
|
498
|
+
Key name. Max length: 128 chars.
|
|
499
|
+
scopes : List[OrganizationKeyScopes]
|
|
500
|
+
Key scopes list. Maximum of 200 scopes are allowed.
|
|
501
|
+
expire : Optional[str]
|
|
502
|
+
Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
503
|
+
|
|
504
|
+
Returns
|
|
505
|
+
-------
|
|
506
|
+
Key
|
|
507
|
+
API response as a typed Pydantic model
|
|
508
|
+
|
|
509
|
+
Raises
|
|
510
|
+
------
|
|
511
|
+
AppwriteException
|
|
512
|
+
If API request fails
|
|
513
|
+
"""
|
|
514
|
+
|
|
515
|
+
api_path = '/organization/keys/{keyId}'
|
|
516
|
+
api_params = {}
|
|
517
|
+
if key_id is None:
|
|
518
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
519
|
+
|
|
520
|
+
if name is None:
|
|
521
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
522
|
+
|
|
523
|
+
if scopes is None:
|
|
524
|
+
raise AppwriteException('Missing required parameter: "scopes"')
|
|
525
|
+
|
|
526
|
+
api_path = api_path.replace('{keyId}', str(self._normalize_value(key_id)))
|
|
527
|
+
|
|
528
|
+
api_params['name'] = self._normalize_value(name)
|
|
529
|
+
api_params['scopes'] = self._normalize_value(scopes)
|
|
530
|
+
if expire is not None:
|
|
531
|
+
api_params['expire'] = self._normalize_value(expire)
|
|
532
|
+
|
|
533
|
+
response = self.client.call('put', api_path, {
|
|
534
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
535
|
+
'content-type': 'application/json',
|
|
536
|
+
'accept': 'application/json',
|
|
537
|
+
}, api_params)
|
|
538
|
+
|
|
539
|
+
return self._parse_response(response, model=Key)
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
def delete_key(
|
|
543
|
+
self,
|
|
544
|
+
key_id: str
|
|
545
|
+
) -> Dict[str, Any]:
|
|
546
|
+
"""
|
|
547
|
+
Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
548
|
+
|
|
549
|
+
Parameters
|
|
550
|
+
----------
|
|
551
|
+
key_id : str
|
|
552
|
+
Key unique ID.
|
|
553
|
+
|
|
554
|
+
Returns
|
|
555
|
+
-------
|
|
556
|
+
Dict[str, Any]
|
|
557
|
+
API response as a dictionary
|
|
558
|
+
|
|
559
|
+
Raises
|
|
560
|
+
------
|
|
561
|
+
AppwriteException
|
|
562
|
+
If API request fails
|
|
563
|
+
"""
|
|
564
|
+
|
|
565
|
+
api_path = '/organization/keys/{keyId}'
|
|
566
|
+
api_params = {}
|
|
567
|
+
if key_id is None:
|
|
568
|
+
raise AppwriteException('Missing required parameter: "key_id"')
|
|
569
|
+
|
|
570
|
+
api_path = api_path.replace('{keyId}', str(self._normalize_value(key_id)))
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
response = self.client.call('delete', api_path, {
|
|
574
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
575
|
+
'content-type': 'application/json',
|
|
576
|
+
}, api_params)
|
|
577
|
+
|
|
578
|
+
return response
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
def list_memberships(
|
|
582
|
+
self,
|
|
583
|
+
queries: Optional[List[str]] = None,
|
|
584
|
+
search: Optional[str] = None,
|
|
585
|
+
total: Optional[bool] = None
|
|
586
|
+
) -> MembershipList:
|
|
587
|
+
"""
|
|
588
|
+
Get a list of all memberships from the current organization.
|
|
589
|
+
|
|
590
|
+
Parameters
|
|
591
|
+
----------
|
|
592
|
+
queries : Optional[List[str]]
|
|
593
|
+
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. You may filter on the following attributes: userId, teamId, invited, joined, confirm, roles
|
|
594
|
+
search : Optional[str]
|
|
595
|
+
Search term to filter your list results. Max length: 256 chars.
|
|
596
|
+
total : Optional[bool]
|
|
597
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
598
|
+
|
|
599
|
+
Returns
|
|
600
|
+
-------
|
|
601
|
+
MembershipList
|
|
602
|
+
API response as a typed Pydantic model
|
|
603
|
+
|
|
604
|
+
Raises
|
|
605
|
+
------
|
|
606
|
+
AppwriteException
|
|
607
|
+
If API request fails
|
|
608
|
+
"""
|
|
609
|
+
|
|
610
|
+
api_path = '/organization/memberships'
|
|
611
|
+
api_params = {}
|
|
612
|
+
|
|
613
|
+
if queries is not None:
|
|
614
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
615
|
+
if search is not None:
|
|
616
|
+
api_params['search'] = self._normalize_value(search)
|
|
617
|
+
if total is not None:
|
|
618
|
+
api_params['total'] = self._normalize_value(total)
|
|
619
|
+
|
|
620
|
+
response = self.client.call('get', api_path, {
|
|
621
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
622
|
+
'accept': 'application/json',
|
|
623
|
+
}, api_params)
|
|
624
|
+
|
|
625
|
+
return self._parse_response(response, model=MembershipList)
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
def create_membership(
|
|
629
|
+
self,
|
|
630
|
+
roles: List[str],
|
|
631
|
+
email: Optional[str] = None,
|
|
632
|
+
user_id: Optional[str] = None,
|
|
633
|
+
phone: Optional[str] = None,
|
|
634
|
+
url: Optional[str] = None,
|
|
635
|
+
name: Optional[str] = None
|
|
636
|
+
) -> Membership:
|
|
637
|
+
"""
|
|
638
|
+
Invite a new member to join the current organization. An email with a link to join the organization will be sent to the new member's email address. If member doesn't exist in the project it will be automatically created.
|
|
639
|
+
|
|
640
|
+
Parameters
|
|
641
|
+
----------
|
|
642
|
+
roles : List[str]
|
|
643
|
+
Array of strings. Use this param to set the user roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
644
|
+
email : Optional[str]
|
|
645
|
+
Email of the new organization member.
|
|
646
|
+
user_id : Optional[str]
|
|
647
|
+
ID of the user to be added to the organization.
|
|
648
|
+
phone : Optional[str]
|
|
649
|
+
Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
650
|
+
url : Optional[str]
|
|
651
|
+
URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied.
|
|
652
|
+
name : Optional[str]
|
|
653
|
+
Name of the new organization member. Max length: 128 chars.
|
|
654
|
+
|
|
655
|
+
Returns
|
|
656
|
+
-------
|
|
657
|
+
Membership
|
|
658
|
+
API response as a typed Pydantic model
|
|
659
|
+
|
|
660
|
+
Raises
|
|
661
|
+
------
|
|
662
|
+
AppwriteException
|
|
663
|
+
If API request fails
|
|
664
|
+
"""
|
|
665
|
+
|
|
666
|
+
api_path = '/organization/memberships'
|
|
667
|
+
api_params = {}
|
|
668
|
+
if roles is None:
|
|
669
|
+
raise AppwriteException('Missing required parameter: "roles"')
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
if email is not None:
|
|
673
|
+
api_params['email'] = self._normalize_value(email)
|
|
674
|
+
if user_id is not None:
|
|
675
|
+
api_params['userId'] = self._normalize_value(user_id)
|
|
676
|
+
if phone is not None:
|
|
677
|
+
api_params['phone'] = self._normalize_value(phone)
|
|
678
|
+
api_params['roles'] = self._normalize_value(roles)
|
|
679
|
+
if url is not None:
|
|
680
|
+
api_params['url'] = self._normalize_value(url)
|
|
681
|
+
if name is not None:
|
|
682
|
+
api_params['name'] = self._normalize_value(name)
|
|
683
|
+
|
|
684
|
+
response = self.client.call('post', api_path, {
|
|
685
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
686
|
+
'content-type': 'application/json',
|
|
687
|
+
'accept': 'application/json',
|
|
688
|
+
}, api_params)
|
|
689
|
+
|
|
690
|
+
return self._parse_response(response, model=Membership)
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
def get_membership(
|
|
694
|
+
self,
|
|
695
|
+
membership_id: str
|
|
696
|
+
) -> Membership:
|
|
697
|
+
"""
|
|
698
|
+
Get a membership from the current organization by its unique ID.
|
|
699
|
+
|
|
700
|
+
Parameters
|
|
701
|
+
----------
|
|
702
|
+
membership_id : str
|
|
703
|
+
Membership ID.
|
|
704
|
+
|
|
705
|
+
Returns
|
|
706
|
+
-------
|
|
707
|
+
Membership
|
|
708
|
+
API response as a typed Pydantic model
|
|
709
|
+
|
|
710
|
+
Raises
|
|
711
|
+
------
|
|
712
|
+
AppwriteException
|
|
713
|
+
If API request fails
|
|
714
|
+
"""
|
|
715
|
+
|
|
716
|
+
api_path = '/organization/memberships/{membershipId}'
|
|
717
|
+
api_params = {}
|
|
718
|
+
if membership_id is None:
|
|
719
|
+
raise AppwriteException('Missing required parameter: "membership_id"')
|
|
720
|
+
|
|
721
|
+
api_path = api_path.replace('{membershipId}', str(self._normalize_value(membership_id)))
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
response = self.client.call('get', api_path, {
|
|
725
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
726
|
+
'accept': 'application/json',
|
|
727
|
+
}, api_params)
|
|
728
|
+
|
|
729
|
+
return self._parse_response(response, model=Membership)
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
def update_membership(
|
|
733
|
+
self,
|
|
734
|
+
membership_id: str,
|
|
735
|
+
roles: List[str]
|
|
736
|
+
) -> Membership:
|
|
737
|
+
"""
|
|
738
|
+
Modify the roles of a member in the current organization.
|
|
739
|
+
|
|
740
|
+
Parameters
|
|
741
|
+
----------
|
|
742
|
+
membership_id : str
|
|
743
|
+
Membership ID.
|
|
744
|
+
roles : List[str]
|
|
745
|
+
An array of strings. Use this param to set the user's roles in the organization. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
746
|
+
|
|
747
|
+
Returns
|
|
748
|
+
-------
|
|
749
|
+
Membership
|
|
750
|
+
API response as a typed Pydantic model
|
|
751
|
+
|
|
752
|
+
Raises
|
|
753
|
+
------
|
|
754
|
+
AppwriteException
|
|
755
|
+
If API request fails
|
|
756
|
+
"""
|
|
757
|
+
|
|
758
|
+
api_path = '/organization/memberships/{membershipId}'
|
|
759
|
+
api_params = {}
|
|
760
|
+
if membership_id is None:
|
|
761
|
+
raise AppwriteException('Missing required parameter: "membership_id"')
|
|
762
|
+
|
|
763
|
+
if roles is None:
|
|
764
|
+
raise AppwriteException('Missing required parameter: "roles"')
|
|
765
|
+
|
|
766
|
+
api_path = api_path.replace('{membershipId}', str(self._normalize_value(membership_id)))
|
|
767
|
+
|
|
768
|
+
api_params['roles'] = self._normalize_value(roles)
|
|
769
|
+
|
|
770
|
+
response = self.client.call('patch', api_path, {
|
|
771
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
772
|
+
'content-type': 'application/json',
|
|
773
|
+
'accept': 'application/json',
|
|
774
|
+
}, api_params)
|
|
775
|
+
|
|
776
|
+
return self._parse_response(response, model=Membership)
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
def delete_membership(
|
|
780
|
+
self,
|
|
781
|
+
membership_id: str
|
|
782
|
+
) -> Dict[str, Any]:
|
|
783
|
+
"""
|
|
784
|
+
Remove a member from the current organization. The member is removed whether they accepted the invitation or not; a pending invitation is revoked.
|
|
785
|
+
|
|
786
|
+
Parameters
|
|
787
|
+
----------
|
|
788
|
+
membership_id : str
|
|
789
|
+
Membership ID.
|
|
790
|
+
|
|
791
|
+
Returns
|
|
792
|
+
-------
|
|
793
|
+
Dict[str, Any]
|
|
794
|
+
API response as a dictionary
|
|
795
|
+
|
|
796
|
+
Raises
|
|
797
|
+
------
|
|
798
|
+
AppwriteException
|
|
799
|
+
If API request fails
|
|
800
|
+
"""
|
|
801
|
+
|
|
802
|
+
api_path = '/organization/memberships/{membershipId}'
|
|
803
|
+
api_params = {}
|
|
804
|
+
if membership_id is None:
|
|
805
|
+
raise AppwriteException('Missing required parameter: "membership_id"')
|
|
806
|
+
|
|
807
|
+
api_path = api_path.replace('{membershipId}', str(self._normalize_value(membership_id)))
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
response = self.client.call('delete', api_path, {
|
|
811
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
812
|
+
'content-type': 'application/json',
|
|
813
|
+
}, api_params)
|
|
814
|
+
|
|
815
|
+
return response
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
def list_projects(
|
|
819
|
+
self,
|
|
820
|
+
queries: Optional[List[str]] = None,
|
|
821
|
+
search: Optional[str] = None,
|
|
822
|
+
total: Optional[bool] = None
|
|
823
|
+
) -> ProjectList:
|
|
824
|
+
"""
|
|
825
|
+
Get a list of all projects. You can use the query params to filter your results.
|
|
826
|
+
|
|
827
|
+
Parameters
|
|
828
|
+
----------
|
|
829
|
+
queries : Optional[List[str]]
|
|
830
|
+
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. You may filter on the following attributes: name, teamId, labels, search, accessedAt
|
|
831
|
+
search : Optional[str]
|
|
832
|
+
Search term to filter your list results. Max length: 256 chars.
|
|
833
|
+
total : Optional[bool]
|
|
834
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
835
|
+
|
|
836
|
+
Returns
|
|
837
|
+
-------
|
|
838
|
+
ProjectList
|
|
839
|
+
API response as a typed Pydantic model
|
|
840
|
+
|
|
841
|
+
Raises
|
|
842
|
+
------
|
|
843
|
+
AppwriteException
|
|
844
|
+
If API request fails
|
|
845
|
+
"""
|
|
846
|
+
|
|
847
|
+
api_path = '/organization/projects'
|
|
848
|
+
api_params = {}
|
|
849
|
+
|
|
850
|
+
if queries is not None:
|
|
851
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
852
|
+
if search is not None:
|
|
853
|
+
api_params['search'] = self._normalize_value(search)
|
|
854
|
+
if total is not None:
|
|
855
|
+
api_params['total'] = self._normalize_value(total)
|
|
856
|
+
|
|
857
|
+
response = self.client.call('get', api_path, {
|
|
858
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
859
|
+
'accept': 'application/json',
|
|
860
|
+
}, api_params)
|
|
861
|
+
|
|
862
|
+
return self._parse_response(response, model=ProjectList)
|
|
863
|
+
|
|
864
|
+
|
|
865
|
+
def create_project(
|
|
866
|
+
self,
|
|
867
|
+
project_id: str,
|
|
868
|
+
name: str,
|
|
869
|
+
region: Optional[Region] = None
|
|
870
|
+
) -> Project:
|
|
871
|
+
"""
|
|
872
|
+
Create a new project.
|
|
873
|
+
|
|
874
|
+
Parameters
|
|
875
|
+
----------
|
|
876
|
+
project_id : str
|
|
877
|
+
Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
878
|
+
name : str
|
|
879
|
+
Project name. Max length: 128 chars.
|
|
880
|
+
region : Optional[Region]
|
|
881
|
+
Project Region.
|
|
882
|
+
|
|
883
|
+
Returns
|
|
884
|
+
-------
|
|
885
|
+
Project
|
|
886
|
+
API response as a typed Pydantic model
|
|
887
|
+
|
|
888
|
+
Raises
|
|
889
|
+
------
|
|
890
|
+
AppwriteException
|
|
891
|
+
If API request fails
|
|
892
|
+
"""
|
|
893
|
+
|
|
894
|
+
api_path = '/organization/projects'
|
|
895
|
+
api_params = {}
|
|
896
|
+
if project_id is None:
|
|
897
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
898
|
+
|
|
899
|
+
if name is None:
|
|
900
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
api_params['projectId'] = self._normalize_value(project_id)
|
|
904
|
+
api_params['name'] = self._normalize_value(name)
|
|
905
|
+
if region is not None:
|
|
906
|
+
api_params['region'] = self._normalize_value(region)
|
|
907
|
+
|
|
908
|
+
response = self.client.call('post', api_path, {
|
|
909
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
910
|
+
'content-type': 'application/json',
|
|
911
|
+
'accept': 'application/json',
|
|
912
|
+
}, api_params)
|
|
913
|
+
|
|
914
|
+
return self._parse_response(response, model=Project)
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
def get_project(
|
|
918
|
+
self,
|
|
919
|
+
project_id: str
|
|
920
|
+
) -> Project:
|
|
921
|
+
"""
|
|
922
|
+
Get a project.
|
|
923
|
+
|
|
924
|
+
Parameters
|
|
925
|
+
----------
|
|
926
|
+
project_id : str
|
|
927
|
+
Project unique ID.
|
|
928
|
+
|
|
929
|
+
Returns
|
|
930
|
+
-------
|
|
931
|
+
Project
|
|
932
|
+
API response as a typed Pydantic model
|
|
933
|
+
|
|
934
|
+
Raises
|
|
935
|
+
------
|
|
936
|
+
AppwriteException
|
|
937
|
+
If API request fails
|
|
938
|
+
"""
|
|
939
|
+
|
|
940
|
+
api_path = '/organization/projects/{projectId}'
|
|
941
|
+
api_params = {}
|
|
942
|
+
if project_id is None:
|
|
943
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
944
|
+
|
|
945
|
+
api_path = api_path.replace('{projectId}', str(self._normalize_value(project_id)))
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
response = self.client.call('get', api_path, {
|
|
949
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
950
|
+
}, api_params)
|
|
951
|
+
|
|
952
|
+
return self._parse_response(response, model=Project)
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
def update_project(
|
|
956
|
+
self,
|
|
957
|
+
project_id: str,
|
|
958
|
+
name: str
|
|
959
|
+
) -> Project:
|
|
960
|
+
"""
|
|
961
|
+
Update a project by its unique ID.
|
|
962
|
+
|
|
963
|
+
Parameters
|
|
964
|
+
----------
|
|
965
|
+
project_id : str
|
|
966
|
+
Project unique ID.
|
|
967
|
+
name : str
|
|
968
|
+
Project name. Max length: 128 chars.
|
|
969
|
+
|
|
970
|
+
Returns
|
|
971
|
+
-------
|
|
972
|
+
Project
|
|
973
|
+
API response as a typed Pydantic model
|
|
974
|
+
|
|
975
|
+
Raises
|
|
976
|
+
------
|
|
977
|
+
AppwriteException
|
|
978
|
+
If API request fails
|
|
979
|
+
"""
|
|
980
|
+
|
|
981
|
+
api_path = '/organization/projects/{projectId}'
|
|
982
|
+
api_params = {}
|
|
983
|
+
if project_id is None:
|
|
984
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
985
|
+
|
|
986
|
+
if name is None:
|
|
987
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
988
|
+
|
|
989
|
+
api_path = api_path.replace('{projectId}', str(self._normalize_value(project_id)))
|
|
990
|
+
|
|
991
|
+
api_params['name'] = self._normalize_value(name)
|
|
992
|
+
|
|
993
|
+
response = self.client.call('patch', api_path, {
|
|
994
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
995
|
+
'content-type': 'application/json',
|
|
996
|
+
'accept': 'application/json',
|
|
997
|
+
}, api_params)
|
|
998
|
+
|
|
999
|
+
return self._parse_response(response, model=Project)
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
def delete_project(
|
|
1003
|
+
self,
|
|
1004
|
+
project_id: str
|
|
1005
|
+
) -> Dict[str, Any]:
|
|
1006
|
+
"""
|
|
1007
|
+
Delete a project by its unique ID.
|
|
1008
|
+
|
|
1009
|
+
Parameters
|
|
1010
|
+
----------
|
|
1011
|
+
project_id : str
|
|
1012
|
+
Project unique ID.
|
|
1013
|
+
|
|
1014
|
+
Returns
|
|
1015
|
+
-------
|
|
1016
|
+
Dict[str, Any]
|
|
1017
|
+
API response as a dictionary
|
|
1018
|
+
|
|
1019
|
+
Raises
|
|
1020
|
+
------
|
|
1021
|
+
AppwriteException
|
|
1022
|
+
If API request fails
|
|
1023
|
+
"""
|
|
1024
|
+
|
|
1025
|
+
api_path = '/organization/projects/{projectId}'
|
|
1026
|
+
api_params = {}
|
|
1027
|
+
if project_id is None:
|
|
1028
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
1029
|
+
|
|
1030
|
+
api_path = api_path.replace('{projectId}', str(self._normalize_value(project_id)))
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
response = self.client.call('delete', api_path, {
|
|
1034
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1035
|
+
'content-type': 'application/json',
|
|
1036
|
+
}, api_params)
|
|
1037
|
+
|
|
1038
|
+
return response
|
|
1039
|
+
|