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,1036 @@
|
|
|
1
|
+
from ..service import Service
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
from typing import Any, Dict, List, Optional, Union
|
|
4
|
+
from ..exception import AppwriteException
|
|
5
|
+
from appwrite_console.utils.deprecated import deprecated
|
|
6
|
+
from ..models.migration_list import MigrationList
|
|
7
|
+
from ..enums.appwrite_migration_resource import AppwriteMigrationResource
|
|
8
|
+
from ..enums.on_duplicate import OnDuplicate
|
|
9
|
+
from ..models.migration import Migration
|
|
10
|
+
from ..models.migration_report import MigrationReport
|
|
11
|
+
from ..enums.firebase_migration_resource import FirebaseMigrationResource
|
|
12
|
+
from ..enums.n_host_migration_resource import NHostMigrationResource
|
|
13
|
+
from ..enums.supabase_migration_resource import SupabaseMigrationResource
|
|
14
|
+
|
|
15
|
+
class Migrations(Service):
|
|
16
|
+
|
|
17
|
+
def __init__(self, client) -> None:
|
|
18
|
+
super(Migrations, self).__init__(client)
|
|
19
|
+
|
|
20
|
+
def list(
|
|
21
|
+
self,
|
|
22
|
+
queries: Optional[List[str]] = None,
|
|
23
|
+
search: Optional[str] = None,
|
|
24
|
+
total: Optional[bool] = None
|
|
25
|
+
) -> MigrationList:
|
|
26
|
+
"""
|
|
27
|
+
List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.
|
|
28
|
+
|
|
29
|
+
Parameters
|
|
30
|
+
----------
|
|
31
|
+
queries : Optional[List[str]]
|
|
32
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceInternalId, resourceType, parentResourceId, parentResourceInternalId, parentResourceType, destinationResourceId, destinationResourceInternalId, destinationResourceType, statusCounters, resourceData, errors
|
|
33
|
+
search : Optional[str]
|
|
34
|
+
Search term to filter your list results. Max length: 256 chars.
|
|
35
|
+
total : Optional[bool]
|
|
36
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
MigrationList
|
|
41
|
+
API response as a typed Pydantic model
|
|
42
|
+
|
|
43
|
+
Raises
|
|
44
|
+
------
|
|
45
|
+
AppwriteException
|
|
46
|
+
If API request fails
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
api_path = '/migrations'
|
|
50
|
+
api_params = {}
|
|
51
|
+
|
|
52
|
+
if queries is not None:
|
|
53
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
54
|
+
if search is not None:
|
|
55
|
+
api_params['search'] = self._normalize_value(search)
|
|
56
|
+
if total is not None:
|
|
57
|
+
api_params['total'] = self._normalize_value(total)
|
|
58
|
+
|
|
59
|
+
response = self.client.call('get', api_path, {
|
|
60
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
61
|
+
'accept': 'application/json',
|
|
62
|
+
}, api_params)
|
|
63
|
+
|
|
64
|
+
return self._parse_response(response, model=MigrationList)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def create_appwrite_migration(
|
|
68
|
+
self,
|
|
69
|
+
resources: List[AppwriteMigrationResource],
|
|
70
|
+
endpoint: str,
|
|
71
|
+
project_id: str,
|
|
72
|
+
api_key: str,
|
|
73
|
+
on_duplicate: Optional[OnDuplicate] = None
|
|
74
|
+
) -> Migration:
|
|
75
|
+
"""
|
|
76
|
+
Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
|
|
77
|
+
|
|
78
|
+
Parameters
|
|
79
|
+
----------
|
|
80
|
+
resources : List[AppwriteMigrationResource]
|
|
81
|
+
List of resources to migrate
|
|
82
|
+
endpoint : str
|
|
83
|
+
Source Appwrite endpoint
|
|
84
|
+
project_id : str
|
|
85
|
+
Source Project ID
|
|
86
|
+
api_key : str
|
|
87
|
+
Source API Key
|
|
88
|
+
on_duplicate : Optional[OnDuplicate]
|
|
89
|
+
Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
90
|
+
|
|
91
|
+
Returns
|
|
92
|
+
-------
|
|
93
|
+
Migration
|
|
94
|
+
API response as a typed Pydantic model
|
|
95
|
+
|
|
96
|
+
Raises
|
|
97
|
+
------
|
|
98
|
+
AppwriteException
|
|
99
|
+
If API request fails
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
api_path = '/migrations/appwrite'
|
|
103
|
+
api_params = {}
|
|
104
|
+
if resources is None:
|
|
105
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
106
|
+
|
|
107
|
+
if endpoint is None:
|
|
108
|
+
raise AppwriteException('Missing required parameter: "endpoint"')
|
|
109
|
+
|
|
110
|
+
if project_id is None:
|
|
111
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
112
|
+
|
|
113
|
+
if api_key is None:
|
|
114
|
+
raise AppwriteException('Missing required parameter: "api_key"')
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
118
|
+
api_params['endpoint'] = self._normalize_value(endpoint)
|
|
119
|
+
api_params['projectId'] = self._normalize_value(project_id)
|
|
120
|
+
api_params['apiKey'] = self._normalize_value(api_key)
|
|
121
|
+
if on_duplicate is not None:
|
|
122
|
+
api_params['onDuplicate'] = self._normalize_value(on_duplicate)
|
|
123
|
+
|
|
124
|
+
response = self.client.call('post', api_path, {
|
|
125
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
126
|
+
'content-type': 'application/json',
|
|
127
|
+
'accept': 'application/json',
|
|
128
|
+
}, api_params)
|
|
129
|
+
|
|
130
|
+
return self._parse_response(response, model=Migration)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def get_appwrite_report(
|
|
134
|
+
self,
|
|
135
|
+
resources: List[AppwriteMigrationResource],
|
|
136
|
+
endpoint: str,
|
|
137
|
+
project_id: str,
|
|
138
|
+
key: str
|
|
139
|
+
) -> MigrationReport:
|
|
140
|
+
"""
|
|
141
|
+
Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
142
|
+
|
|
143
|
+
Parameters
|
|
144
|
+
----------
|
|
145
|
+
resources : List[AppwriteMigrationResource]
|
|
146
|
+
List of resources to migrate
|
|
147
|
+
endpoint : str
|
|
148
|
+
Source's Appwrite Endpoint
|
|
149
|
+
project_id : str
|
|
150
|
+
Source's Project ID
|
|
151
|
+
key : str
|
|
152
|
+
Source's API Key
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
MigrationReport
|
|
157
|
+
API response as a typed Pydantic model
|
|
158
|
+
|
|
159
|
+
Raises
|
|
160
|
+
------
|
|
161
|
+
AppwriteException
|
|
162
|
+
If API request fails
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
api_path = '/migrations/appwrite/report'
|
|
166
|
+
api_params = {}
|
|
167
|
+
if resources is None:
|
|
168
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
169
|
+
|
|
170
|
+
if endpoint is None:
|
|
171
|
+
raise AppwriteException('Missing required parameter: "endpoint"')
|
|
172
|
+
|
|
173
|
+
if project_id is None:
|
|
174
|
+
raise AppwriteException('Missing required parameter: "project_id"')
|
|
175
|
+
|
|
176
|
+
if key is None:
|
|
177
|
+
raise AppwriteException('Missing required parameter: "key"')
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
181
|
+
api_params['endpoint'] = self._normalize_value(endpoint)
|
|
182
|
+
api_params['projectID'] = self._normalize_value(project_id)
|
|
183
|
+
api_params['key'] = self._normalize_value(key)
|
|
184
|
+
|
|
185
|
+
response = self.client.call('get', api_path, {
|
|
186
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
187
|
+
'accept': 'application/json',
|
|
188
|
+
}, api_params)
|
|
189
|
+
|
|
190
|
+
return self._parse_response(response, model=MigrationReport)
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def create_csv_export(
|
|
194
|
+
self,
|
|
195
|
+
database_id: str,
|
|
196
|
+
collection_id: str,
|
|
197
|
+
filename: str,
|
|
198
|
+
columns: Optional[List[str]] = None,
|
|
199
|
+
queries: Optional[List[str]] = None,
|
|
200
|
+
delimiter: Optional[str] = None,
|
|
201
|
+
enclosure: Optional[str] = None,
|
|
202
|
+
escape: Optional[str] = None,
|
|
203
|
+
header: Optional[bool] = None,
|
|
204
|
+
notify: Optional[bool] = None
|
|
205
|
+
) -> Migration:
|
|
206
|
+
"""
|
|
207
|
+
Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
|
|
208
|
+
|
|
209
|
+
Parameters
|
|
210
|
+
----------
|
|
211
|
+
database_id : str
|
|
212
|
+
Database ID containing the source collection.
|
|
213
|
+
collection_id : str
|
|
214
|
+
Collection ID to export documents from.
|
|
215
|
+
filename : str
|
|
216
|
+
The name of the file to be created for the export, excluding the .csv extension.
|
|
217
|
+
columns : Optional[List[str]]
|
|
218
|
+
List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.
|
|
219
|
+
queries : Optional[List[str]]
|
|
220
|
+
Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
221
|
+
delimiter : Optional[str]
|
|
222
|
+
The character that separates each column value. Default is comma.
|
|
223
|
+
enclosure : Optional[str]
|
|
224
|
+
The character that encloses each column value. Default is double quotes.
|
|
225
|
+
escape : Optional[str]
|
|
226
|
+
The escape character for the enclosure character. Default is double quotes.
|
|
227
|
+
header : Optional[bool]
|
|
228
|
+
Whether to include the header row with column names. Default is true.
|
|
229
|
+
notify : Optional[bool]
|
|
230
|
+
Set to true to receive an email when the export is complete. Default is true.
|
|
231
|
+
|
|
232
|
+
Returns
|
|
233
|
+
-------
|
|
234
|
+
Migration
|
|
235
|
+
API response as a typed Pydantic model
|
|
236
|
+
|
|
237
|
+
Raises
|
|
238
|
+
------
|
|
239
|
+
AppwriteException
|
|
240
|
+
If API request fails
|
|
241
|
+
"""
|
|
242
|
+
|
|
243
|
+
api_path = '/migrations/csv/exports'
|
|
244
|
+
api_params = {}
|
|
245
|
+
if database_id is None:
|
|
246
|
+
raise AppwriteException('Missing required parameter: "database_id"')
|
|
247
|
+
|
|
248
|
+
if collection_id is None:
|
|
249
|
+
raise AppwriteException('Missing required parameter: "collection_id"')
|
|
250
|
+
|
|
251
|
+
if filename is None:
|
|
252
|
+
raise AppwriteException('Missing required parameter: "filename"')
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
api_params['databaseId'] = self._normalize_value(database_id)
|
|
256
|
+
api_params['collectionId'] = self._normalize_value(collection_id)
|
|
257
|
+
api_params['filename'] = self._normalize_value(filename)
|
|
258
|
+
if columns is not None:
|
|
259
|
+
api_params['columns'] = self._normalize_value(columns)
|
|
260
|
+
if queries is not None:
|
|
261
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
262
|
+
if delimiter is not None:
|
|
263
|
+
api_params['delimiter'] = self._normalize_value(delimiter)
|
|
264
|
+
if enclosure is not None:
|
|
265
|
+
api_params['enclosure'] = self._normalize_value(enclosure)
|
|
266
|
+
if escape is not None:
|
|
267
|
+
api_params['escape'] = self._normalize_value(escape)
|
|
268
|
+
if header is not None:
|
|
269
|
+
api_params['header'] = self._normalize_value(header)
|
|
270
|
+
if notify is not None:
|
|
271
|
+
api_params['notify'] = self._normalize_value(notify)
|
|
272
|
+
|
|
273
|
+
response = self.client.call('post', api_path, {
|
|
274
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
275
|
+
'content-type': 'application/json',
|
|
276
|
+
'accept': 'application/json',
|
|
277
|
+
}, api_params)
|
|
278
|
+
|
|
279
|
+
return self._parse_response(response, model=Migration)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def create_csv_import(
|
|
283
|
+
self,
|
|
284
|
+
bucket_id: str,
|
|
285
|
+
file_id: str,
|
|
286
|
+
database_id: str,
|
|
287
|
+
collection_id: str,
|
|
288
|
+
internal_file: Optional[bool] = None,
|
|
289
|
+
on_duplicate: Optional[OnDuplicate] = None
|
|
290
|
+
) -> Migration:
|
|
291
|
+
"""
|
|
292
|
+
Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.
|
|
293
|
+
|
|
294
|
+
Parameters
|
|
295
|
+
----------
|
|
296
|
+
bucket_id : str
|
|
297
|
+
Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
298
|
+
file_id : str
|
|
299
|
+
File ID.
|
|
300
|
+
database_id : str
|
|
301
|
+
Database ID containing the target collection.
|
|
302
|
+
collection_id : str
|
|
303
|
+
Collection ID to import documents into.
|
|
304
|
+
internal_file : Optional[bool]
|
|
305
|
+
Is the file stored in an internal bucket?
|
|
306
|
+
on_duplicate : Optional[OnDuplicate]
|
|
307
|
+
Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
308
|
+
|
|
309
|
+
Returns
|
|
310
|
+
-------
|
|
311
|
+
Migration
|
|
312
|
+
API response as a typed Pydantic model
|
|
313
|
+
|
|
314
|
+
Raises
|
|
315
|
+
------
|
|
316
|
+
AppwriteException
|
|
317
|
+
If API request fails
|
|
318
|
+
"""
|
|
319
|
+
|
|
320
|
+
api_path = '/migrations/csv/imports'
|
|
321
|
+
api_params = {}
|
|
322
|
+
if bucket_id is None:
|
|
323
|
+
raise AppwriteException('Missing required parameter: "bucket_id"')
|
|
324
|
+
|
|
325
|
+
if file_id is None:
|
|
326
|
+
raise AppwriteException('Missing required parameter: "file_id"')
|
|
327
|
+
|
|
328
|
+
if database_id is None:
|
|
329
|
+
raise AppwriteException('Missing required parameter: "database_id"')
|
|
330
|
+
|
|
331
|
+
if collection_id is None:
|
|
332
|
+
raise AppwriteException('Missing required parameter: "collection_id"')
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
api_params['bucketId'] = self._normalize_value(bucket_id)
|
|
336
|
+
api_params['fileId'] = self._normalize_value(file_id)
|
|
337
|
+
api_params['databaseId'] = self._normalize_value(database_id)
|
|
338
|
+
api_params['collectionId'] = self._normalize_value(collection_id)
|
|
339
|
+
if internal_file is not None:
|
|
340
|
+
api_params['internalFile'] = self._normalize_value(internal_file)
|
|
341
|
+
if on_duplicate is not None:
|
|
342
|
+
api_params['onDuplicate'] = self._normalize_value(on_duplicate)
|
|
343
|
+
|
|
344
|
+
response = self.client.call('post', api_path, {
|
|
345
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
346
|
+
'content-type': 'application/json',
|
|
347
|
+
'accept': 'application/json',
|
|
348
|
+
}, api_params)
|
|
349
|
+
|
|
350
|
+
return self._parse_response(response, model=Migration)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
def create_firebase_migration(
|
|
354
|
+
self,
|
|
355
|
+
resources: List[FirebaseMigrationResource],
|
|
356
|
+
service_account: str
|
|
357
|
+
) -> Migration:
|
|
358
|
+
"""
|
|
359
|
+
Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
|
|
360
|
+
|
|
361
|
+
Parameters
|
|
362
|
+
----------
|
|
363
|
+
resources : List[FirebaseMigrationResource]
|
|
364
|
+
List of resources to migrate
|
|
365
|
+
service_account : str
|
|
366
|
+
JSON of the Firebase service account credentials
|
|
367
|
+
|
|
368
|
+
Returns
|
|
369
|
+
-------
|
|
370
|
+
Migration
|
|
371
|
+
API response as a typed Pydantic model
|
|
372
|
+
|
|
373
|
+
Raises
|
|
374
|
+
------
|
|
375
|
+
AppwriteException
|
|
376
|
+
If API request fails
|
|
377
|
+
"""
|
|
378
|
+
|
|
379
|
+
api_path = '/migrations/firebase'
|
|
380
|
+
api_params = {}
|
|
381
|
+
if resources is None:
|
|
382
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
383
|
+
|
|
384
|
+
if service_account is None:
|
|
385
|
+
raise AppwriteException('Missing required parameter: "service_account"')
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
389
|
+
api_params['serviceAccount'] = self._normalize_value(service_account)
|
|
390
|
+
|
|
391
|
+
response = self.client.call('post', api_path, {
|
|
392
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
393
|
+
'content-type': 'application/json',
|
|
394
|
+
'accept': 'application/json',
|
|
395
|
+
}, api_params)
|
|
396
|
+
|
|
397
|
+
return self._parse_response(response, model=Migration)
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def get_firebase_report(
|
|
401
|
+
self,
|
|
402
|
+
resources: List[FirebaseMigrationResource],
|
|
403
|
+
service_account: str
|
|
404
|
+
) -> MigrationReport:
|
|
405
|
+
"""
|
|
406
|
+
Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
407
|
+
|
|
408
|
+
Parameters
|
|
409
|
+
----------
|
|
410
|
+
resources : List[FirebaseMigrationResource]
|
|
411
|
+
List of resources to migrate
|
|
412
|
+
service_account : str
|
|
413
|
+
JSON of the Firebase service account credentials
|
|
414
|
+
|
|
415
|
+
Returns
|
|
416
|
+
-------
|
|
417
|
+
MigrationReport
|
|
418
|
+
API response as a typed Pydantic model
|
|
419
|
+
|
|
420
|
+
Raises
|
|
421
|
+
------
|
|
422
|
+
AppwriteException
|
|
423
|
+
If API request fails
|
|
424
|
+
"""
|
|
425
|
+
|
|
426
|
+
api_path = '/migrations/firebase/report'
|
|
427
|
+
api_params = {}
|
|
428
|
+
if resources is None:
|
|
429
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
430
|
+
|
|
431
|
+
if service_account is None:
|
|
432
|
+
raise AppwriteException('Missing required parameter: "service_account"')
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
436
|
+
api_params['serviceAccount'] = self._normalize_value(service_account)
|
|
437
|
+
|
|
438
|
+
response = self.client.call('get', api_path, {
|
|
439
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
440
|
+
'accept': 'application/json',
|
|
441
|
+
}, api_params)
|
|
442
|
+
|
|
443
|
+
return self._parse_response(response, model=MigrationReport)
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
def create_json_export(
|
|
447
|
+
self,
|
|
448
|
+
database_id: str,
|
|
449
|
+
collection_id: str,
|
|
450
|
+
filename: str,
|
|
451
|
+
columns: Optional[List[str]] = None,
|
|
452
|
+
queries: Optional[List[str]] = None,
|
|
453
|
+
notify: Optional[bool] = None
|
|
454
|
+
) -> Migration:
|
|
455
|
+
"""
|
|
456
|
+
Export documents to a JSON file from your Appwrite database. This endpoint allows you to export documents to a JSON file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
Parameters
|
|
460
|
+
----------
|
|
461
|
+
database_id : str
|
|
462
|
+
Database ID containing the source collection.
|
|
463
|
+
collection_id : str
|
|
464
|
+
Collection ID to export documents from.
|
|
465
|
+
filename : str
|
|
466
|
+
The name of the file to be created for the export, excluding the .json extension.
|
|
467
|
+
columns : Optional[List[str]]
|
|
468
|
+
List of attributes to export. If empty, all attributes will be exported. You can use the `*` wildcard to export all attributes from the collection.
|
|
469
|
+
queries : Optional[List[str]]
|
|
470
|
+
Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
471
|
+
notify : Optional[bool]
|
|
472
|
+
Set to true to receive an email when the export is complete. Default is true.
|
|
473
|
+
|
|
474
|
+
Returns
|
|
475
|
+
-------
|
|
476
|
+
Migration
|
|
477
|
+
API response as a typed Pydantic model
|
|
478
|
+
|
|
479
|
+
Raises
|
|
480
|
+
------
|
|
481
|
+
AppwriteException
|
|
482
|
+
If API request fails
|
|
483
|
+
"""
|
|
484
|
+
|
|
485
|
+
api_path = '/migrations/json/exports'
|
|
486
|
+
api_params = {}
|
|
487
|
+
if database_id is None:
|
|
488
|
+
raise AppwriteException('Missing required parameter: "database_id"')
|
|
489
|
+
|
|
490
|
+
if collection_id is None:
|
|
491
|
+
raise AppwriteException('Missing required parameter: "collection_id"')
|
|
492
|
+
|
|
493
|
+
if filename is None:
|
|
494
|
+
raise AppwriteException('Missing required parameter: "filename"')
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
api_params['databaseId'] = self._normalize_value(database_id)
|
|
498
|
+
api_params['collectionId'] = self._normalize_value(collection_id)
|
|
499
|
+
api_params['filename'] = self._normalize_value(filename)
|
|
500
|
+
if columns is not None:
|
|
501
|
+
api_params['columns'] = self._normalize_value(columns)
|
|
502
|
+
if queries is not None:
|
|
503
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
504
|
+
if notify is not None:
|
|
505
|
+
api_params['notify'] = self._normalize_value(notify)
|
|
506
|
+
|
|
507
|
+
response = self.client.call('post', api_path, {
|
|
508
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
509
|
+
'content-type': 'application/json',
|
|
510
|
+
'accept': 'application/json',
|
|
511
|
+
}, api_params)
|
|
512
|
+
|
|
513
|
+
return self._parse_response(response, model=Migration)
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
def create_json_import(
|
|
517
|
+
self,
|
|
518
|
+
bucket_id: str,
|
|
519
|
+
file_id: str,
|
|
520
|
+
database_id: str,
|
|
521
|
+
collection_id: str,
|
|
522
|
+
internal_file: Optional[bool] = None,
|
|
523
|
+
on_duplicate: Optional[OnDuplicate] = None
|
|
524
|
+
) -> Migration:
|
|
525
|
+
"""
|
|
526
|
+
Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
Parameters
|
|
530
|
+
----------
|
|
531
|
+
bucket_id : str
|
|
532
|
+
Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
533
|
+
file_id : str
|
|
534
|
+
File ID.
|
|
535
|
+
database_id : str
|
|
536
|
+
Database ID containing the target collection.
|
|
537
|
+
collection_id : str
|
|
538
|
+
Collection ID to import documents into.
|
|
539
|
+
internal_file : Optional[bool]
|
|
540
|
+
Is the file stored in an internal bucket?
|
|
541
|
+
on_duplicate : Optional[OnDuplicate]
|
|
542
|
+
Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
543
|
+
|
|
544
|
+
Returns
|
|
545
|
+
-------
|
|
546
|
+
Migration
|
|
547
|
+
API response as a typed Pydantic model
|
|
548
|
+
|
|
549
|
+
Raises
|
|
550
|
+
------
|
|
551
|
+
AppwriteException
|
|
552
|
+
If API request fails
|
|
553
|
+
"""
|
|
554
|
+
|
|
555
|
+
api_path = '/migrations/json/imports'
|
|
556
|
+
api_params = {}
|
|
557
|
+
if bucket_id is None:
|
|
558
|
+
raise AppwriteException('Missing required parameter: "bucket_id"')
|
|
559
|
+
|
|
560
|
+
if file_id is None:
|
|
561
|
+
raise AppwriteException('Missing required parameter: "file_id"')
|
|
562
|
+
|
|
563
|
+
if database_id is None:
|
|
564
|
+
raise AppwriteException('Missing required parameter: "database_id"')
|
|
565
|
+
|
|
566
|
+
if collection_id is None:
|
|
567
|
+
raise AppwriteException('Missing required parameter: "collection_id"')
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
api_params['bucketId'] = self._normalize_value(bucket_id)
|
|
571
|
+
api_params['fileId'] = self._normalize_value(file_id)
|
|
572
|
+
api_params['databaseId'] = self._normalize_value(database_id)
|
|
573
|
+
api_params['collectionId'] = self._normalize_value(collection_id)
|
|
574
|
+
if internal_file is not None:
|
|
575
|
+
api_params['internalFile'] = self._normalize_value(internal_file)
|
|
576
|
+
if on_duplicate is not None:
|
|
577
|
+
api_params['onDuplicate'] = self._normalize_value(on_duplicate)
|
|
578
|
+
|
|
579
|
+
response = self.client.call('post', api_path, {
|
|
580
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
581
|
+
'content-type': 'application/json',
|
|
582
|
+
'accept': 'application/json',
|
|
583
|
+
}, api_params)
|
|
584
|
+
|
|
585
|
+
return self._parse_response(response, model=Migration)
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
def create_n_host_migration(
|
|
589
|
+
self,
|
|
590
|
+
resources: List[NHostMigrationResource],
|
|
591
|
+
subdomain: str,
|
|
592
|
+
region: str,
|
|
593
|
+
admin_secret: str,
|
|
594
|
+
database: str,
|
|
595
|
+
username: str,
|
|
596
|
+
password: str,
|
|
597
|
+
port: Optional[float] = None
|
|
598
|
+
) -> Migration:
|
|
599
|
+
"""
|
|
600
|
+
Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
|
|
601
|
+
|
|
602
|
+
Parameters
|
|
603
|
+
----------
|
|
604
|
+
resources : List[NHostMigrationResource]
|
|
605
|
+
List of resources to migrate
|
|
606
|
+
subdomain : str
|
|
607
|
+
Source's Subdomain
|
|
608
|
+
region : str
|
|
609
|
+
Source's Region
|
|
610
|
+
admin_secret : str
|
|
611
|
+
Source's Admin Secret
|
|
612
|
+
database : str
|
|
613
|
+
Source's Database Name
|
|
614
|
+
username : str
|
|
615
|
+
Source's Database Username
|
|
616
|
+
password : str
|
|
617
|
+
Source's Database Password
|
|
618
|
+
port : Optional[float]
|
|
619
|
+
Source's Database Port
|
|
620
|
+
|
|
621
|
+
Returns
|
|
622
|
+
-------
|
|
623
|
+
Migration
|
|
624
|
+
API response as a typed Pydantic model
|
|
625
|
+
|
|
626
|
+
Raises
|
|
627
|
+
------
|
|
628
|
+
AppwriteException
|
|
629
|
+
If API request fails
|
|
630
|
+
"""
|
|
631
|
+
|
|
632
|
+
api_path = '/migrations/nhost'
|
|
633
|
+
api_params = {}
|
|
634
|
+
if resources is None:
|
|
635
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
636
|
+
|
|
637
|
+
if subdomain is None:
|
|
638
|
+
raise AppwriteException('Missing required parameter: "subdomain"')
|
|
639
|
+
|
|
640
|
+
if region is None:
|
|
641
|
+
raise AppwriteException('Missing required parameter: "region"')
|
|
642
|
+
|
|
643
|
+
if admin_secret is None:
|
|
644
|
+
raise AppwriteException('Missing required parameter: "admin_secret"')
|
|
645
|
+
|
|
646
|
+
if database is None:
|
|
647
|
+
raise AppwriteException('Missing required parameter: "database"')
|
|
648
|
+
|
|
649
|
+
if username is None:
|
|
650
|
+
raise AppwriteException('Missing required parameter: "username"')
|
|
651
|
+
|
|
652
|
+
if password is None:
|
|
653
|
+
raise AppwriteException('Missing required parameter: "password"')
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
657
|
+
api_params['subdomain'] = self._normalize_value(subdomain)
|
|
658
|
+
api_params['region'] = self._normalize_value(region)
|
|
659
|
+
api_params['adminSecret'] = self._normalize_value(admin_secret)
|
|
660
|
+
api_params['database'] = self._normalize_value(database)
|
|
661
|
+
api_params['username'] = self._normalize_value(username)
|
|
662
|
+
api_params['password'] = self._normalize_value(password)
|
|
663
|
+
if port is not None:
|
|
664
|
+
api_params['port'] = self._normalize_value(port)
|
|
665
|
+
|
|
666
|
+
response = self.client.call('post', api_path, {
|
|
667
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
668
|
+
'content-type': 'application/json',
|
|
669
|
+
'accept': 'application/json',
|
|
670
|
+
}, api_params)
|
|
671
|
+
|
|
672
|
+
return self._parse_response(response, model=Migration)
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
def get_n_host_report(
|
|
676
|
+
self,
|
|
677
|
+
resources: List[NHostMigrationResource],
|
|
678
|
+
subdomain: str,
|
|
679
|
+
region: str,
|
|
680
|
+
admin_secret: str,
|
|
681
|
+
database: str,
|
|
682
|
+
username: str,
|
|
683
|
+
password: str,
|
|
684
|
+
port: Optional[float] = None
|
|
685
|
+
) -> MigrationReport:
|
|
686
|
+
"""
|
|
687
|
+
Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
688
|
+
|
|
689
|
+
Parameters
|
|
690
|
+
----------
|
|
691
|
+
resources : List[NHostMigrationResource]
|
|
692
|
+
List of resources to migrate.
|
|
693
|
+
subdomain : str
|
|
694
|
+
Source's Subdomain.
|
|
695
|
+
region : str
|
|
696
|
+
Source's Region.
|
|
697
|
+
admin_secret : str
|
|
698
|
+
Source's Admin Secret.
|
|
699
|
+
database : str
|
|
700
|
+
Source's Database Name.
|
|
701
|
+
username : str
|
|
702
|
+
Source's Database Username.
|
|
703
|
+
password : str
|
|
704
|
+
Source's Database Password.
|
|
705
|
+
port : Optional[float]
|
|
706
|
+
Source's Database Port.
|
|
707
|
+
|
|
708
|
+
Returns
|
|
709
|
+
-------
|
|
710
|
+
MigrationReport
|
|
711
|
+
API response as a typed Pydantic model
|
|
712
|
+
|
|
713
|
+
Raises
|
|
714
|
+
------
|
|
715
|
+
AppwriteException
|
|
716
|
+
If API request fails
|
|
717
|
+
"""
|
|
718
|
+
|
|
719
|
+
api_path = '/migrations/nhost/report'
|
|
720
|
+
api_params = {}
|
|
721
|
+
if resources is None:
|
|
722
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
723
|
+
|
|
724
|
+
if subdomain is None:
|
|
725
|
+
raise AppwriteException('Missing required parameter: "subdomain"')
|
|
726
|
+
|
|
727
|
+
if region is None:
|
|
728
|
+
raise AppwriteException('Missing required parameter: "region"')
|
|
729
|
+
|
|
730
|
+
if admin_secret is None:
|
|
731
|
+
raise AppwriteException('Missing required parameter: "admin_secret"')
|
|
732
|
+
|
|
733
|
+
if database is None:
|
|
734
|
+
raise AppwriteException('Missing required parameter: "database"')
|
|
735
|
+
|
|
736
|
+
if username is None:
|
|
737
|
+
raise AppwriteException('Missing required parameter: "username"')
|
|
738
|
+
|
|
739
|
+
if password is None:
|
|
740
|
+
raise AppwriteException('Missing required parameter: "password"')
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
744
|
+
api_params['subdomain'] = self._normalize_value(subdomain)
|
|
745
|
+
api_params['region'] = self._normalize_value(region)
|
|
746
|
+
api_params['adminSecret'] = self._normalize_value(admin_secret)
|
|
747
|
+
api_params['database'] = self._normalize_value(database)
|
|
748
|
+
api_params['username'] = self._normalize_value(username)
|
|
749
|
+
api_params['password'] = self._normalize_value(password)
|
|
750
|
+
if port is not None:
|
|
751
|
+
api_params['port'] = self._normalize_value(port)
|
|
752
|
+
|
|
753
|
+
response = self.client.call('get', api_path, {
|
|
754
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
755
|
+
'accept': 'application/json',
|
|
756
|
+
}, api_params)
|
|
757
|
+
|
|
758
|
+
return self._parse_response(response, model=MigrationReport)
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
def create_supabase_migration(
|
|
762
|
+
self,
|
|
763
|
+
resources: List[SupabaseMigrationResource],
|
|
764
|
+
endpoint: str,
|
|
765
|
+
api_key: str,
|
|
766
|
+
database_host: str,
|
|
767
|
+
username: str,
|
|
768
|
+
password: str,
|
|
769
|
+
port: Optional[float] = None
|
|
770
|
+
) -> Migration:
|
|
771
|
+
"""
|
|
772
|
+
Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
|
|
773
|
+
|
|
774
|
+
Parameters
|
|
775
|
+
----------
|
|
776
|
+
resources : List[SupabaseMigrationResource]
|
|
777
|
+
List of resources to migrate
|
|
778
|
+
endpoint : str
|
|
779
|
+
Source's Supabase Endpoint
|
|
780
|
+
api_key : str
|
|
781
|
+
Source's API Key
|
|
782
|
+
database_host : str
|
|
783
|
+
Source's Database Host
|
|
784
|
+
username : str
|
|
785
|
+
Source's Database Username
|
|
786
|
+
password : str
|
|
787
|
+
Source's Database Password
|
|
788
|
+
port : Optional[float]
|
|
789
|
+
Source's Database Port
|
|
790
|
+
|
|
791
|
+
Returns
|
|
792
|
+
-------
|
|
793
|
+
Migration
|
|
794
|
+
API response as a typed Pydantic model
|
|
795
|
+
|
|
796
|
+
Raises
|
|
797
|
+
------
|
|
798
|
+
AppwriteException
|
|
799
|
+
If API request fails
|
|
800
|
+
"""
|
|
801
|
+
|
|
802
|
+
api_path = '/migrations/supabase'
|
|
803
|
+
api_params = {}
|
|
804
|
+
if resources is None:
|
|
805
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
806
|
+
|
|
807
|
+
if endpoint is None:
|
|
808
|
+
raise AppwriteException('Missing required parameter: "endpoint"')
|
|
809
|
+
|
|
810
|
+
if api_key is None:
|
|
811
|
+
raise AppwriteException('Missing required parameter: "api_key"')
|
|
812
|
+
|
|
813
|
+
if database_host is None:
|
|
814
|
+
raise AppwriteException('Missing required parameter: "database_host"')
|
|
815
|
+
|
|
816
|
+
if username is None:
|
|
817
|
+
raise AppwriteException('Missing required parameter: "username"')
|
|
818
|
+
|
|
819
|
+
if password is None:
|
|
820
|
+
raise AppwriteException('Missing required parameter: "password"')
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
824
|
+
api_params['endpoint'] = self._normalize_value(endpoint)
|
|
825
|
+
api_params['apiKey'] = self._normalize_value(api_key)
|
|
826
|
+
api_params['databaseHost'] = self._normalize_value(database_host)
|
|
827
|
+
api_params['username'] = self._normalize_value(username)
|
|
828
|
+
api_params['password'] = self._normalize_value(password)
|
|
829
|
+
if port is not None:
|
|
830
|
+
api_params['port'] = self._normalize_value(port)
|
|
831
|
+
|
|
832
|
+
response = self.client.call('post', api_path, {
|
|
833
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
834
|
+
'content-type': 'application/json',
|
|
835
|
+
'accept': 'application/json',
|
|
836
|
+
}, api_params)
|
|
837
|
+
|
|
838
|
+
return self._parse_response(response, model=Migration)
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
def get_supabase_report(
|
|
842
|
+
self,
|
|
843
|
+
resources: List[SupabaseMigrationResource],
|
|
844
|
+
endpoint: str,
|
|
845
|
+
api_key: str,
|
|
846
|
+
database_host: str,
|
|
847
|
+
username: str,
|
|
848
|
+
password: str,
|
|
849
|
+
port: Optional[float] = None
|
|
850
|
+
) -> MigrationReport:
|
|
851
|
+
"""
|
|
852
|
+
Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
853
|
+
|
|
854
|
+
Parameters
|
|
855
|
+
----------
|
|
856
|
+
resources : List[SupabaseMigrationResource]
|
|
857
|
+
List of resources to migrate
|
|
858
|
+
endpoint : str
|
|
859
|
+
Source's Supabase Endpoint.
|
|
860
|
+
api_key : str
|
|
861
|
+
Source's API Key.
|
|
862
|
+
database_host : str
|
|
863
|
+
Source's Database Host.
|
|
864
|
+
username : str
|
|
865
|
+
Source's Database Username.
|
|
866
|
+
password : str
|
|
867
|
+
Source's Database Password.
|
|
868
|
+
port : Optional[float]
|
|
869
|
+
Source's Database Port.
|
|
870
|
+
|
|
871
|
+
Returns
|
|
872
|
+
-------
|
|
873
|
+
MigrationReport
|
|
874
|
+
API response as a typed Pydantic model
|
|
875
|
+
|
|
876
|
+
Raises
|
|
877
|
+
------
|
|
878
|
+
AppwriteException
|
|
879
|
+
If API request fails
|
|
880
|
+
"""
|
|
881
|
+
|
|
882
|
+
api_path = '/migrations/supabase/report'
|
|
883
|
+
api_params = {}
|
|
884
|
+
if resources is None:
|
|
885
|
+
raise AppwriteException('Missing required parameter: "resources"')
|
|
886
|
+
|
|
887
|
+
if endpoint is None:
|
|
888
|
+
raise AppwriteException('Missing required parameter: "endpoint"')
|
|
889
|
+
|
|
890
|
+
if api_key is None:
|
|
891
|
+
raise AppwriteException('Missing required parameter: "api_key"')
|
|
892
|
+
|
|
893
|
+
if database_host is None:
|
|
894
|
+
raise AppwriteException('Missing required parameter: "database_host"')
|
|
895
|
+
|
|
896
|
+
if username is None:
|
|
897
|
+
raise AppwriteException('Missing required parameter: "username"')
|
|
898
|
+
|
|
899
|
+
if password is None:
|
|
900
|
+
raise AppwriteException('Missing required parameter: "password"')
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
api_params['resources'] = self._normalize_value(resources)
|
|
904
|
+
api_params['endpoint'] = self._normalize_value(endpoint)
|
|
905
|
+
api_params['apiKey'] = self._normalize_value(api_key)
|
|
906
|
+
api_params['databaseHost'] = self._normalize_value(database_host)
|
|
907
|
+
api_params['username'] = self._normalize_value(username)
|
|
908
|
+
api_params['password'] = self._normalize_value(password)
|
|
909
|
+
if port is not None:
|
|
910
|
+
api_params['port'] = self._normalize_value(port)
|
|
911
|
+
|
|
912
|
+
response = self.client.call('get', api_path, {
|
|
913
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
914
|
+
'accept': 'application/json',
|
|
915
|
+
}, api_params)
|
|
916
|
+
|
|
917
|
+
return self._parse_response(response, model=MigrationReport)
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
def get(
|
|
921
|
+
self,
|
|
922
|
+
migration_id: str
|
|
923
|
+
) -> Migration:
|
|
924
|
+
"""
|
|
925
|
+
Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process.
|
|
926
|
+
|
|
927
|
+
Parameters
|
|
928
|
+
----------
|
|
929
|
+
migration_id : str
|
|
930
|
+
Migration unique ID.
|
|
931
|
+
|
|
932
|
+
Returns
|
|
933
|
+
-------
|
|
934
|
+
Migration
|
|
935
|
+
API response as a typed Pydantic model
|
|
936
|
+
|
|
937
|
+
Raises
|
|
938
|
+
------
|
|
939
|
+
AppwriteException
|
|
940
|
+
If API request fails
|
|
941
|
+
"""
|
|
942
|
+
|
|
943
|
+
api_path = '/migrations/{migrationId}'
|
|
944
|
+
api_params = {}
|
|
945
|
+
if migration_id is None:
|
|
946
|
+
raise AppwriteException('Missing required parameter: "migration_id"')
|
|
947
|
+
|
|
948
|
+
api_path = api_path.replace('{migrationId}', str(self._normalize_value(migration_id)))
|
|
949
|
+
|
|
950
|
+
|
|
951
|
+
response = self.client.call('get', api_path, {
|
|
952
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
953
|
+
'accept': 'application/json',
|
|
954
|
+
}, api_params)
|
|
955
|
+
|
|
956
|
+
return self._parse_response(response, model=Migration)
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
def retry(
|
|
960
|
+
self,
|
|
961
|
+
migration_id: str
|
|
962
|
+
) -> Migration:
|
|
963
|
+
"""
|
|
964
|
+
Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.
|
|
965
|
+
|
|
966
|
+
Parameters
|
|
967
|
+
----------
|
|
968
|
+
migration_id : str
|
|
969
|
+
Migration unique ID.
|
|
970
|
+
|
|
971
|
+
Returns
|
|
972
|
+
-------
|
|
973
|
+
Migration
|
|
974
|
+
API response as a typed Pydantic model
|
|
975
|
+
|
|
976
|
+
Raises
|
|
977
|
+
------
|
|
978
|
+
AppwriteException
|
|
979
|
+
If API request fails
|
|
980
|
+
"""
|
|
981
|
+
|
|
982
|
+
api_path = '/migrations/{migrationId}'
|
|
983
|
+
api_params = {}
|
|
984
|
+
if migration_id is None:
|
|
985
|
+
raise AppwriteException('Missing required parameter: "migration_id"')
|
|
986
|
+
|
|
987
|
+
api_path = api_path.replace('{migrationId}', str(self._normalize_value(migration_id)))
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
response = self.client.call('patch', api_path, {
|
|
991
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
992
|
+
'content-type': 'application/json',
|
|
993
|
+
'accept': 'application/json',
|
|
994
|
+
}, api_params)
|
|
995
|
+
|
|
996
|
+
return self._parse_response(response, model=Migration)
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
def delete(
|
|
1000
|
+
self,
|
|
1001
|
+
migration_id: str
|
|
1002
|
+
) -> Dict[str, Any]:
|
|
1003
|
+
"""
|
|
1004
|
+
Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project's migration history.
|
|
1005
|
+
|
|
1006
|
+
Parameters
|
|
1007
|
+
----------
|
|
1008
|
+
migration_id : str
|
|
1009
|
+
Migration ID.
|
|
1010
|
+
|
|
1011
|
+
Returns
|
|
1012
|
+
-------
|
|
1013
|
+
Dict[str, Any]
|
|
1014
|
+
API response as a dictionary
|
|
1015
|
+
|
|
1016
|
+
Raises
|
|
1017
|
+
------
|
|
1018
|
+
AppwriteException
|
|
1019
|
+
If API request fails
|
|
1020
|
+
"""
|
|
1021
|
+
|
|
1022
|
+
api_path = '/migrations/{migrationId}'
|
|
1023
|
+
api_params = {}
|
|
1024
|
+
if migration_id is None:
|
|
1025
|
+
raise AppwriteException('Missing required parameter: "migration_id"')
|
|
1026
|
+
|
|
1027
|
+
api_path = api_path.replace('{migrationId}', str(self._normalize_value(migration_id)))
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
response = self.client.call('delete', api_path, {
|
|
1031
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
1032
|
+
'content-type': 'application/json',
|
|
1033
|
+
}, api_params)
|
|
1034
|
+
|
|
1035
|
+
return response
|
|
1036
|
+
|