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