appwrite 27.0.0 → 28.0.0.rc1
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.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +27 -24
- data/lib/appwrite/enums/adapter.rb +1 -1
- data/lib/appwrite/enums/attribute_status.rb +1 -1
- data/lib/appwrite/enums/authentication_factor.rb +1 -1
- data/lib/appwrite/enums/authenticator_type.rb +1 -1
- data/lib/appwrite/enums/backup_services.rb +1 -1
- data/lib/appwrite/enums/billing_plan_group.rb +1 -1
- data/lib/appwrite/enums/browser.rb +1 -1
- data/lib/appwrite/enums/browser_permission.rb +1 -1
- data/lib/appwrite/enums/browser_theme.rb +1 -1
- data/lib/appwrite/enums/build_runtime.rb +2 -1
- data/lib/appwrite/enums/column_status.rb +1 -1
- data/lib/appwrite/enums/compression.rb +1 -1
- data/lib/appwrite/enums/credit_card.rb +1 -1
- data/lib/appwrite/enums/database_status.rb +1 -1
- data/lib/appwrite/enums/database_type.rb +1 -1
- data/lib/appwrite/enums/databases_index_type.rb +1 -1
- data/lib/appwrite/enums/deployment_download_type.rb +1 -1
- data/lib/appwrite/enums/deployment_status.rb +1 -1
- data/lib/appwrite/enums/documents_db_index_type.rb +9 -0
- data/lib/appwrite/enums/embedding_model.rb +1 -3
- data/lib/appwrite/enums/execution_method.rb +1 -1
- data/lib/appwrite/enums/execution_resource_type.rb +8 -0
- data/lib/appwrite/enums/execution_status.rb +1 -1
- data/lib/appwrite/enums/execution_trigger.rb +1 -1
- data/lib/appwrite/enums/flag.rb +1 -1
- data/lib/appwrite/enums/framework.rb +1 -1
- data/lib/appwrite/enums/image_format.rb +1 -1
- data/lib/appwrite/enums/image_gravity.rb +1 -1
- data/lib/appwrite/enums/index_status.rb +1 -1
- data/lib/appwrite/enums/invalidation_type.rb +1 -1
- data/lib/appwrite/enums/message_priority.rb +1 -1
- data/lib/appwrite/enums/message_status.rb +1 -1
- data/lib/appwrite/enums/messaging_provider_type.rb +1 -1
- data/lib/appwrite/enums/o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth_provider.rb +2 -1
- data/lib/appwrite/enums/order_by.rb +1 -1
- data/lib/appwrite/enums/organization_key_scopes.rb +1 -1
- data/lib/appwrite/enums/password_hash.rb +1 -1
- data/lib/appwrite/enums/platform_type.rb +1 -1
- data/lib/appwrite/enums/project_auth_method_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_locale.rb +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +14 -3
- data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -1
- data/lib/appwrite/enums/project_policy_id.rb +1 -1
- data/lib/appwrite/enums/project_protocol_id.rb +1 -1
- data/lib/appwrite/enums/project_service_id.rb +1 -1
- data/lib/appwrite/enums/project_smtp_secure.rb +1 -1
- data/lib/appwrite/enums/proxy_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_status.rb +1 -1
- data/lib/appwrite/enums/region.rb +1 -1
- data/lib/appwrite/enums/relation_mutate.rb +1 -1
- data/lib/appwrite/enums/relationship_type.rb +1 -1
- data/lib/appwrite/enums/runtime.rb +2 -1
- data/lib/appwrite/enums/smtp_encryption.rb +1 -1
- data/lib/appwrite/enums/status_code.rb +1 -1
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -1
- data/lib/appwrite/enums/template_reference_type.rb +1 -1
- data/lib/appwrite/enums/timezone.rb +1 -1
- data/lib/appwrite/enums/vcs_reference_type.rb +1 -1
- data/lib/appwrite/enums/vectors_db_index_type.rb +12 -0
- data/lib/appwrite/exception.rb +1 -1
- data/lib/appwrite/id.rb +3 -3
- data/lib/appwrite/input_file.rb +1 -1
- data/lib/appwrite/models/activity_event.rb +1 -1
- data/lib/appwrite/models/activity_event_list.rb +1 -1
- data/lib/appwrite/models/additional_resource.rb +1 -1
- data/lib/appwrite/models/algo_argon2.rb +1 -1
- data/lib/appwrite/models/algo_bcrypt.rb +1 -1
- data/lib/appwrite/models/algo_md5.rb +1 -1
- data/lib/appwrite/models/algo_phpass.rb +1 -1
- data/lib/appwrite/models/algo_scrypt.rb +1 -1
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -1
- data/lib/appwrite/models/algo_sha.rb +1 -1
- data/lib/appwrite/models/app.rb +1 -1
- data/lib/appwrite/models/app_installation.rb +2 -2
- data/lib/appwrite/models/app_installation_list.rb +1 -1
- data/lib/appwrite/models/app_key.rb +2 -2
- data/lib/appwrite/models/app_key_list.rb +1 -1
- data/lib/appwrite/models/app_scope.rb +1 -1
- data/lib/appwrite/models/app_scope_list.rb +1 -1
- data/lib/appwrite/models/app_secret.rb +2 -2
- data/lib/appwrite/models/app_secret_list.rb +1 -1
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -2
- data/lib/appwrite/models/apps_list.rb +1 -1
- data/lib/appwrite/models/attribute_bigint.rb +5 -6
- data/lib/appwrite/models/attribute_boolean.rb +3 -4
- data/lib/appwrite/models/attribute_datetime.rb +3 -4
- data/lib/appwrite/models/attribute_email.rb +3 -4
- data/lib/appwrite/models/attribute_enum.rb +3 -4
- data/lib/appwrite/models/attribute_float.rb +5 -6
- data/lib/appwrite/models/attribute_integer.rb +5 -6
- data/lib/appwrite/models/attribute_ip.rb +3 -4
- data/lib/appwrite/models/attribute_line.rb +3 -4
- data/lib/appwrite/models/attribute_list.rb +1 -1
- data/lib/appwrite/models/attribute_longtext.rb +4 -5
- data/lib/appwrite/models/attribute_mediumtext.rb +4 -5
- data/lib/appwrite/models/attribute_object.rb +80 -0
- data/lib/appwrite/models/attribute_point.rb +3 -4
- data/lib/appwrite/models/attribute_polygon.rb +3 -4
- data/lib/appwrite/models/attribute_relationship.rb +2 -3
- data/lib/appwrite/models/attribute_string.rb +4 -5
- data/lib/appwrite/models/attribute_text.rb +4 -5
- data/lib/appwrite/models/attribute_url.rb +3 -4
- data/lib/appwrite/models/attribute_varchar.rb +4 -5
- data/lib/appwrite/models/attribute_vector.rb +85 -0
- data/lib/appwrite/models/backup_archive.rb +3 -3
- data/lib/appwrite/models/backup_archive_list.rb +1 -1
- data/lib/appwrite/models/backup_policy.rb +3 -3
- data/lib/appwrite/models/backup_policy_list.rb +1 -1
- data/lib/appwrite/models/backup_restoration.rb +1 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -1
- data/lib/appwrite/models/billing_limits.rb +9 -9
- data/lib/appwrite/models/billing_plan.rb +19 -10
- data/lib/appwrite/models/billing_plan_addon.rb +3 -3
- data/lib/appwrite/models/billing_plan_addon_details.rb +2 -2
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +20 -20
- data/lib/appwrite/models/billing_plan_limits.rb +3 -3
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -1
- data/lib/appwrite/models/block.rb +3 -3
- data/lib/appwrite/models/bucket.rb +1 -1
- data/lib/appwrite/models/bucket_list.rb +1 -1
- data/lib/appwrite/models/collection.rb +1 -1
- data/lib/appwrite/models/collection_list.rb +1 -1
- data/lib/appwrite/models/column_bigint.rb +5 -6
- data/lib/appwrite/models/column_boolean.rb +3 -4
- data/lib/appwrite/models/column_datetime.rb +3 -4
- data/lib/appwrite/models/column_email.rb +3 -4
- data/lib/appwrite/models/column_enum.rb +3 -4
- data/lib/appwrite/models/column_float.rb +5 -6
- data/lib/appwrite/models/column_index.rb +2 -2
- data/lib/appwrite/models/column_index_list.rb +1 -1
- data/lib/appwrite/models/column_integer.rb +5 -6
- data/lib/appwrite/models/column_ip.rb +3 -4
- data/lib/appwrite/models/column_line.rb +3 -4
- data/lib/appwrite/models/column_list.rb +1 -1
- data/lib/appwrite/models/column_longtext.rb +4 -5
- data/lib/appwrite/models/column_mediumtext.rb +4 -5
- data/lib/appwrite/models/column_point.rb +3 -4
- data/lib/appwrite/models/column_polygon.rb +3 -4
- data/lib/appwrite/models/column_relationship.rb +2 -3
- data/lib/appwrite/models/column_string.rb +4 -5
- data/lib/appwrite/models/column_text.rb +4 -5
- data/lib/appwrite/models/column_url.rb +3 -4
- data/lib/appwrite/models/column_varchar.rb +4 -5
- data/lib/appwrite/models/continent.rb +1 -1
- data/lib/appwrite/models/continent_list.rb +1 -1
- data/lib/appwrite/models/country.rb +1 -1
- data/lib/appwrite/models/country_list.rb +1 -1
- data/lib/appwrite/models/currency.rb +1 -1
- data/lib/appwrite/models/currency_list.rb +1 -1
- data/lib/appwrite/models/database.rb +22 -8
- data/lib/appwrite/models/database_list.rb +1 -1
- data/lib/appwrite/models/database_migration.rb +6 -1
- data/lib/appwrite/models/database_migration_list.rb +1 -1
- data/lib/appwrite/models/database_status.rb +3 -3
- data/lib/appwrite/models/database_status_connections.rb +1 -1
- data/lib/appwrite/models/database_status_replica.rb +7 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -1
- data/lib/appwrite/models/dedicated_database.rb +3 -3
- data/lib/appwrite/models/dedicated_database_backup.rb +107 -0
- data/lib/appwrite/models/dedicated_database_backup_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +47 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +82 -0
- data/lib/appwrite/models/dedicated_database_branch_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +52 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +32 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +37 -0
- data/lib/appwrite/models/dedicated_database_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_member.rb +7 -2
- data/lib/appwrite/models/dedicated_database_operation.rb +4 -4
- data/lib/appwrite/models/dedicated_database_operation_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +72 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +3 -3
- data/lib/appwrite/models/dedicated_database_restoration.rb +82 -0
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +1 -1
- data/lib/appwrite/models/deployment.rb +1 -2
- data/lib/appwrite/models/deployment_list.rb +1 -1
- data/lib/appwrite/models/dev_key.rb +1 -1
- data/lib/appwrite/models/document.rb +1 -1
- data/lib/appwrite/models/document_list.rb +1 -1
- data/lib/appwrite/models/email_template.rb +1 -1
- data/lib/appwrite/models/email_template_list.rb +1 -1
- data/lib/appwrite/models/embedding.rb +1 -1
- data/lib/appwrite/models/embedding_list.rb +1 -1
- data/lib/appwrite/models/ephemeral_key.rb +1 -1
- data/lib/appwrite/models/execution.rb +25 -8
- data/lib/appwrite/models/execution_list.rb +1 -1
- data/lib/appwrite/models/file.rb +1 -1
- data/lib/appwrite/models/file_list.rb +1 -1
- data/lib/appwrite/models/framework.rb +1 -1
- data/lib/appwrite/models/framework_adapter.rb +1 -1
- data/lib/appwrite/models/framework_list.rb +1 -1
- data/lib/appwrite/models/function.rb +1 -1
- data/lib/appwrite/models/function_list.rb +1 -1
- data/lib/appwrite/models/headers.rb +1 -1
- data/lib/appwrite/models/identity.rb +1 -1
- data/lib/appwrite/models/identity_list.rb +1 -1
- data/lib/appwrite/models/index.rb +2 -3
- data/lib/appwrite/models/index_list.rb +1 -1
- data/lib/appwrite/models/insight.rb +4 -4
- data/lib/appwrite/models/insight_cta.rb +1 -1
- data/lib/appwrite/models/insight_list.rb +1 -1
- data/lib/appwrite/models/jwt.rb +1 -1
- data/lib/appwrite/models/key.rb +1 -1
- data/lib/appwrite/models/key_list.rb +1 -1
- data/lib/appwrite/models/language.rb +1 -1
- data/lib/appwrite/models/language_list.rb +1 -1
- data/lib/appwrite/models/locale.rb +12 -12
- data/lib/appwrite/models/locale_code.rb +1 -1
- data/lib/appwrite/models/locale_code_list.rb +1 -1
- data/lib/appwrite/models/log.rb +1 -1
- data/lib/appwrite/models/log_list.rb +1 -1
- data/lib/appwrite/models/membership.rb +1 -1
- data/lib/appwrite/models/membership_list.rb +1 -1
- data/lib/appwrite/models/message.rb +4 -5
- data/lib/appwrite/models/message_list.rb +1 -1
- data/lib/appwrite/models/mfa_challenge.rb +1 -1
- data/lib/appwrite/models/mfa_challenge_secret.rb +1 -1
- data/lib/appwrite/models/mfa_factors.rb +1 -1
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -1
- data/lib/appwrite/models/mfa_type.rb +1 -1
- data/lib/appwrite/models/mock_number.rb +1 -1
- data/lib/appwrite/models/mock_number_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -1
- data/lib/appwrite/models/o_auth2_apple.rb +1 -1
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -1
- data/lib/appwrite/models/o_auth2_auth0.rb +1 -1
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -1
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -1
- data/lib/appwrite/models/o_auth2_box.rb +1 -1
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -1
- data/lib/appwrite/models/o_auth2_discord.rb +1 -1
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -1
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -1
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -1
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -1
- data/lib/appwrite/models/o_auth2_figma.rb +1 -1
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -1
- data/lib/appwrite/models/o_auth2_github.rb +1 -1
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -1
- data/lib/appwrite/models/o_auth2_google.rb +18 -2
- data/lib/appwrite/models/o_auth2_hugging_face.rb +42 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -1
- data/lib/appwrite/models/o_auth2_kick.rb +1 -1
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -1
- data/lib/appwrite/models/o_auth2_microsoft.rb +1 -1
- data/lib/appwrite/models/o_auth2_notion.rb +1 -1
- data/lib/appwrite/models/o_auth2_oidc.rb +20 -3
- data/lib/appwrite/models/o_auth2_okta.rb +1 -1
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -1
- data/lib/appwrite/models/o_auth2_podio.rb +1 -1
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_salesforce.rb +1 -1
- data/lib/appwrite/models/o_auth2_slack.rb +1 -1
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -1
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -1
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -1
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -1
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -1
- data/lib/appwrite/models/o_auth2_x.rb +1 -1
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -1
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoho.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -1
- data/lib/appwrite/models/oauth2_approve.rb +1 -1
- data/lib/appwrite/models/oauth2_authorize.rb +1 -1
- data/lib/appwrite/models/oauth2_consent.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -1
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -1
- data/lib/appwrite/models/oauth2_grant.rb +1 -1
- data/lib/appwrite/models/oauth2_organization.rb +1 -1
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -1
- data/lib/appwrite/models/oauth2_par.rb +1 -1
- data/lib/appwrite/models/oauth2_project.rb +1 -1
- data/lib/appwrite/models/oauth2_project_list.rb +1 -1
- data/lib/appwrite/models/oauth2_reject.rb +1 -1
- data/lib/appwrite/models/oauth2_token.rb +3 -3
- data/lib/appwrite/models/organization.rb +14 -14
- data/lib/appwrite/models/phone.rb +1 -1
- data/lib/appwrite/models/phone_list.rb +1 -1
- data/lib/appwrite/models/platform_android.rb +1 -2
- data/lib/appwrite/models/platform_apple.rb +1 -2
- data/lib/appwrite/models/platform_linux.rb +1 -2
- data/lib/appwrite/models/platform_list.rb +1 -1
- data/lib/appwrite/models/platform_web.rb +1 -2
- data/lib/appwrite/models/platform_windows.rb +1 -2
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -1
- data/lib/appwrite/models/policy_list.rb +1 -1
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -1
- data/lib/appwrite/models/policy_mfa_factors.rb +1 -1
- data/lib/appwrite/models/policy_password_dictionary.rb +1 -1
- data/lib/appwrite/models/policy_password_history.rb +1 -1
- data/lib/appwrite/models/policy_password_personal_data.rb +1 -1
- data/lib/appwrite/models/policy_password_strength.rb +1 -1
- data/lib/appwrite/models/policy_session_alert.rb +1 -1
- data/lib/appwrite/models/policy_session_duration.rb +1 -1
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -1
- data/lib/appwrite/models/policy_session_limit.rb +1 -1
- data/lib/appwrite/models/policy_user_limit.rb +1 -1
- data/lib/appwrite/models/postgres_extension.rb +42 -0
- data/lib/appwrite/models/preferences.rb +1 -1
- data/lib/appwrite/models/presence.rb +4 -4
- data/lib/appwrite/models/presence_list.rb +1 -1
- data/lib/appwrite/models/program.rb +1 -1
- data/lib/appwrite/models/project.rb +19 -19
- data/lib/appwrite/models/project_auth_method.rb +1 -2
- data/lib/appwrite/models/project_list.rb +1 -1
- data/lib/appwrite/models/project_protocol.rb +1 -2
- data/lib/appwrite/models/project_service.rb +1 -2
- data/lib/appwrite/models/provider.rb +2 -2
- data/lib/appwrite/models/provider_list.rb +1 -1
- data/lib/appwrite/models/proxy_invalidation.rb +1 -1
- data/lib/appwrite/models/proxy_rule.rb +2 -3
- data/lib/appwrite/models/proxy_rule_list.rb +1 -1
- data/lib/appwrite/models/report.rb +2 -2
- data/lib/appwrite/models/report_list.rb +1 -1
- data/lib/appwrite/models/resource_token.rb +1 -1
- data/lib/appwrite/models/resource_token_list.rb +1 -1
- data/lib/appwrite/models/row.rb +1 -1
- data/lib/appwrite/models/row_list.rb +1 -1
- data/lib/appwrite/models/runtime.rb +1 -1
- data/lib/appwrite/models/runtime_list.rb +1 -1
- data/lib/appwrite/models/session.rb +1 -1
- data/lib/appwrite/models/session_list.rb +1 -1
- data/lib/appwrite/models/site.rb +6 -1
- data/lib/appwrite/models/site_list.rb +1 -1
- data/lib/appwrite/models/specification.rb +1 -1
- data/lib/appwrite/models/specification_list.rb +1 -1
- data/lib/appwrite/models/subscriber.rb +1 -1
- data/lib/appwrite/models/subscriber_list.rb +1 -1
- data/lib/appwrite/models/table.rb +1 -1
- data/lib/appwrite/models/table_list.rb +1 -1
- data/lib/appwrite/models/target.rb +2 -2
- data/lib/appwrite/models/target_list.rb +1 -1
- data/lib/appwrite/models/team.rb +1 -1
- data/lib/appwrite/models/team_list.rb +1 -1
- data/lib/appwrite/models/token.rb +1 -1
- data/lib/appwrite/models/topic.rb +1 -1
- data/lib/appwrite/models/topic_list.rb +1 -1
- data/lib/appwrite/models/transaction.rb +1 -1
- data/lib/appwrite/models/transaction_list.rb +1 -1
- data/lib/appwrite/models/usage_billing_plan.rb +4 -4
- data/lib/appwrite/models/user.rb +11 -11
- data/lib/appwrite/models/user_list.rb +1 -1
- data/lib/appwrite/models/variable.rb +1 -1
- data/lib/appwrite/models/variable_list.rb +1 -1
- data/lib/appwrite/models/vectorsdb_collection.rb +87 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +32 -0
- data/lib/appwrite/models/webhook.rb +1 -1
- data/lib/appwrite/models/webhook_list.rb +1 -1
- data/lib/appwrite/operator.rb +6 -0
- data/lib/appwrite/permission.rb +4 -0
- data/lib/appwrite/query.rb +4 -4
- data/lib/appwrite/role.rb +12 -14
- data/lib/appwrite/service.rb +1 -1
- data/lib/appwrite/services/account.rb +328 -289
- data/lib/appwrite/services/activities.rb +13 -14
- data/lib/appwrite/services/advisor.rb +41 -37
- data/lib/appwrite/services/apps.rb +185 -130
- data/lib/appwrite/services/avatars.rb +156 -55
- data/lib/appwrite/services/backups.rb +102 -83
- data/lib/appwrite/services/databases.rb +871 -512
- data/lib/appwrite/services/documents_db.rb +1683 -0
- data/lib/appwrite/services/embeddings.rb +9 -9
- data/lib/appwrite/services/functions.rb +276 -172
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/locale.rb +19 -37
- data/lib/appwrite/services/messaging.rb +544 -259
- data/lib/appwrite/services/mongo.rb +1359 -0
- data/lib/appwrite/services/mysql.rb +1503 -0
- data/lib/appwrite/services/oauth2.rb +122 -53
- data/lib/appwrite/services/organization.rb +153 -123
- data/lib/appwrite/services/postgresql.rb +1615 -0
- data/lib/appwrite/services/presences.rb +49 -35
- data/lib/appwrite/services/project.rb +842 -528
- data/lib/appwrite/services/proxy.rb +73 -58
- data/lib/appwrite/services/sites.rb +269 -164
- data/lib/appwrite/services/storage.rb +151 -92
- data/lib/appwrite/services/tables_db.rb +947 -568
- data/lib/appwrite/services/teams.rb +161 -122
- data/lib/appwrite/services/tokens.rb +38 -31
- data/lib/appwrite/services/users.rb +376 -274
- data/lib/appwrite/services/vectors_db.rb +1614 -0
- data/lib/appwrite/services/webhooks.rb +59 -40
- data/lib/appwrite.rb +27 -0
- metadata +31 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#frozen_string_literal: true
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Appwrite
|
|
4
4
|
class Databases < Service
|
|
5
|
-
|
|
6
5
|
def initialize(client)
|
|
7
6
|
@client = client
|
|
8
7
|
end
|
|
@@ -18,7 +17,11 @@ module Appwrite
|
|
|
18
17
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
19
18
|
#
|
|
20
19
|
# @return [DatabaseList]
|
|
21
|
-
def list(
|
|
20
|
+
def list(
|
|
21
|
+
queries: nil,
|
|
22
|
+
search: nil,
|
|
23
|
+
total: nil
|
|
24
|
+
)
|
|
22
25
|
api_path = '/databases'
|
|
23
26
|
|
|
24
27
|
api_params = {
|
|
@@ -26,7 +29,7 @@ module Appwrite
|
|
|
26
29
|
search: search,
|
|
27
30
|
total: total,
|
|
28
31
|
}
|
|
29
|
-
|
|
32
|
+
|
|
30
33
|
api_headers = {
|
|
31
34
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
32
35
|
"accept": 'application/json',
|
|
@@ -39,29 +42,32 @@ module Appwrite
|
|
|
39
42
|
params: api_params,
|
|
40
43
|
response_type: Models::DatabaseList
|
|
41
44
|
)
|
|
42
|
-
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
#
|
|
46
48
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.create` instead.
|
|
47
49
|
#
|
|
48
50
|
# Create a new Database.
|
|
49
|
-
#
|
|
50
51
|
#
|
|
51
|
-
#
|
|
52
|
+
#
|
|
53
|
+
# @param [String] database_id Unique 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.
|
|
52
54
|
# @param [String] name Database name. Max length: 128 chars.
|
|
53
|
-
# @param [] enabled Is the database enabled? When set to
|
|
55
|
+
# @param [] enabled Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
54
56
|
#
|
|
55
57
|
# @return [Database]
|
|
56
|
-
def create(
|
|
58
|
+
def create(
|
|
59
|
+
database_id:,
|
|
60
|
+
name:,
|
|
61
|
+
enabled: nil
|
|
62
|
+
)
|
|
57
63
|
api_path = '/databases'
|
|
58
64
|
|
|
59
65
|
if database_id.nil?
|
|
60
|
-
|
|
66
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
61
67
|
end
|
|
62
68
|
|
|
63
69
|
if name.nil?
|
|
64
|
-
|
|
70
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
65
71
|
end
|
|
66
72
|
|
|
67
73
|
api_params = {
|
|
@@ -69,7 +75,7 @@ module Appwrite
|
|
|
69
75
|
name: name,
|
|
70
76
|
enabled: enabled,
|
|
71
77
|
}
|
|
72
|
-
|
|
78
|
+
|
|
73
79
|
api_headers = {
|
|
74
80
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
75
81
|
"content-type": 'application/json',
|
|
@@ -83,7 +89,6 @@ module Appwrite
|
|
|
83
89
|
params: api_params,
|
|
84
90
|
response_type: Models::Database
|
|
85
91
|
)
|
|
86
|
-
|
|
87
92
|
end
|
|
88
93
|
|
|
89
94
|
#
|
|
@@ -94,13 +99,15 @@ module Appwrite
|
|
|
94
99
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries).
|
|
95
100
|
#
|
|
96
101
|
# @return [TransactionList]
|
|
97
|
-
def list_transactions(
|
|
102
|
+
def list_transactions(
|
|
103
|
+
queries: nil
|
|
104
|
+
)
|
|
98
105
|
api_path = '/databases/transactions'
|
|
99
106
|
|
|
100
107
|
api_params = {
|
|
101
108
|
queries: queries,
|
|
102
109
|
}
|
|
103
|
-
|
|
110
|
+
|
|
104
111
|
api_headers = {
|
|
105
112
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
106
113
|
"accept": 'application/json',
|
|
@@ -113,7 +120,6 @@ module Appwrite
|
|
|
113
120
|
params: api_params,
|
|
114
121
|
response_type: Models::TransactionList
|
|
115
122
|
)
|
|
116
|
-
|
|
117
123
|
end
|
|
118
124
|
|
|
119
125
|
#
|
|
@@ -124,13 +130,15 @@ module Appwrite
|
|
|
124
130
|
# @param [Integer] ttl Seconds before the transaction expires.
|
|
125
131
|
#
|
|
126
132
|
# @return [Transaction]
|
|
127
|
-
def create_transaction(
|
|
133
|
+
def create_transaction(
|
|
134
|
+
ttl: nil
|
|
135
|
+
)
|
|
128
136
|
api_path = '/databases/transactions'
|
|
129
137
|
|
|
130
138
|
api_params = {
|
|
131
139
|
ttl: ttl,
|
|
132
140
|
}
|
|
133
|
-
|
|
141
|
+
|
|
134
142
|
api_headers = {
|
|
135
143
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
136
144
|
"content-type": 'application/json',
|
|
@@ -144,7 +152,6 @@ module Appwrite
|
|
|
144
152
|
params: api_params,
|
|
145
153
|
response_type: Models::Transaction
|
|
146
154
|
)
|
|
147
|
-
|
|
148
155
|
end
|
|
149
156
|
|
|
150
157
|
#
|
|
@@ -155,17 +162,18 @@ module Appwrite
|
|
|
155
162
|
# @param [String] transaction_id Transaction ID.
|
|
156
163
|
#
|
|
157
164
|
# @return [Transaction]
|
|
158
|
-
def get_transaction(
|
|
165
|
+
def get_transaction(
|
|
166
|
+
transaction_id:
|
|
167
|
+
)
|
|
159
168
|
api_path = '/databases/transactions/{transactionId}'
|
|
160
169
|
.gsub('{transactionId}', transaction_id)
|
|
161
170
|
|
|
162
171
|
if transaction_id.nil?
|
|
163
|
-
|
|
172
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
164
173
|
end
|
|
165
174
|
|
|
166
|
-
api_params = {
|
|
167
|
-
|
|
168
|
-
|
|
175
|
+
api_params = {}
|
|
176
|
+
|
|
169
177
|
api_headers = {
|
|
170
178
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
171
179
|
"accept": 'application/json',
|
|
@@ -178,7 +186,6 @@ module Appwrite
|
|
|
178
186
|
params: api_params,
|
|
179
187
|
response_type: Models::Transaction
|
|
180
188
|
)
|
|
181
|
-
|
|
182
189
|
end
|
|
183
190
|
|
|
184
191
|
#
|
|
@@ -191,19 +198,23 @@ module Appwrite
|
|
|
191
198
|
# @param [] rollback Rollback transaction?
|
|
192
199
|
#
|
|
193
200
|
# @return [Transaction]
|
|
194
|
-
def update_transaction(
|
|
201
|
+
def update_transaction(
|
|
202
|
+
transaction_id:,
|
|
203
|
+
commit: nil,
|
|
204
|
+
rollback: nil
|
|
205
|
+
)
|
|
195
206
|
api_path = '/databases/transactions/{transactionId}'
|
|
196
207
|
.gsub('{transactionId}', transaction_id)
|
|
197
208
|
|
|
198
209
|
if transaction_id.nil?
|
|
199
|
-
|
|
210
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
200
211
|
end
|
|
201
212
|
|
|
202
213
|
api_params = {
|
|
203
214
|
commit: commit,
|
|
204
215
|
rollback: rollback,
|
|
205
216
|
}
|
|
206
|
-
|
|
217
|
+
|
|
207
218
|
api_headers = {
|
|
208
219
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
209
220
|
"content-type": 'application/json',
|
|
@@ -217,7 +228,6 @@ module Appwrite
|
|
|
217
228
|
params: api_params,
|
|
218
229
|
response_type: Models::Transaction
|
|
219
230
|
)
|
|
220
|
-
|
|
221
231
|
end
|
|
222
232
|
|
|
223
233
|
#
|
|
@@ -228,17 +238,18 @@ module Appwrite
|
|
|
228
238
|
# @param [String] transaction_id Transaction ID.
|
|
229
239
|
#
|
|
230
240
|
# @return []
|
|
231
|
-
def delete_transaction(
|
|
241
|
+
def delete_transaction(
|
|
242
|
+
transaction_id:
|
|
243
|
+
)
|
|
232
244
|
api_path = '/databases/transactions/{transactionId}'
|
|
233
245
|
.gsub('{transactionId}', transaction_id)
|
|
234
246
|
|
|
235
247
|
if transaction_id.nil?
|
|
236
|
-
|
|
248
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
237
249
|
end
|
|
238
250
|
|
|
239
|
-
api_params = {
|
|
240
|
-
|
|
241
|
-
|
|
251
|
+
api_params = {}
|
|
252
|
+
|
|
242
253
|
api_headers = {
|
|
243
254
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
244
255
|
"content-type": 'application/json',
|
|
@@ -250,7 +261,6 @@ module Appwrite
|
|
|
250
261
|
headers: api_headers,
|
|
251
262
|
params: api_params,
|
|
252
263
|
)
|
|
253
|
-
|
|
254
264
|
end
|
|
255
265
|
|
|
256
266
|
#
|
|
@@ -262,18 +272,21 @@ module Appwrite
|
|
|
262
272
|
# @param [Array] operations Array of staged operations.
|
|
263
273
|
#
|
|
264
274
|
# @return [Transaction]
|
|
265
|
-
def create_operations(
|
|
275
|
+
def create_operations(
|
|
276
|
+
transaction_id:,
|
|
277
|
+
operations: nil
|
|
278
|
+
)
|
|
266
279
|
api_path = '/databases/transactions/{transactionId}/operations'
|
|
267
280
|
.gsub('{transactionId}', transaction_id)
|
|
268
281
|
|
|
269
282
|
if transaction_id.nil?
|
|
270
|
-
|
|
283
|
+
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
271
284
|
end
|
|
272
285
|
|
|
273
286
|
api_params = {
|
|
274
287
|
operations: operations,
|
|
275
288
|
}
|
|
276
|
-
|
|
289
|
+
|
|
277
290
|
api_headers = {
|
|
278
291
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
279
292
|
"content-type": 'application/json',
|
|
@@ -287,7 +300,6 @@ module Appwrite
|
|
|
287
300
|
params: api_params,
|
|
288
301
|
response_type: Models::Transaction
|
|
289
302
|
)
|
|
290
|
-
|
|
291
303
|
end
|
|
292
304
|
|
|
293
305
|
#
|
|
@@ -299,17 +311,18 @@ module Appwrite
|
|
|
299
311
|
# @param [String] database_id Database ID.
|
|
300
312
|
#
|
|
301
313
|
# @return [Database]
|
|
302
|
-
def get(
|
|
314
|
+
def get(
|
|
315
|
+
database_id:
|
|
316
|
+
)
|
|
303
317
|
api_path = '/databases/{databaseId}'
|
|
304
318
|
.gsub('{databaseId}', database_id)
|
|
305
319
|
|
|
306
320
|
if database_id.nil?
|
|
307
|
-
|
|
321
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
308
322
|
end
|
|
309
323
|
|
|
310
|
-
api_params = {
|
|
311
|
-
|
|
312
|
-
|
|
324
|
+
api_params = {}
|
|
325
|
+
|
|
313
326
|
api_headers = {
|
|
314
327
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
315
328
|
"accept": 'application/json',
|
|
@@ -322,7 +335,6 @@ module Appwrite
|
|
|
322
335
|
params: api_params,
|
|
323
336
|
response_type: Models::Database
|
|
324
337
|
)
|
|
325
|
-
|
|
326
338
|
end
|
|
327
339
|
|
|
328
340
|
#
|
|
@@ -332,22 +344,26 @@ module Appwrite
|
|
|
332
344
|
#
|
|
333
345
|
# @param [String] database_id Database ID.
|
|
334
346
|
# @param [String] name Database name. Max length: 128 chars.
|
|
335
|
-
# @param [] enabled Is database enabled? When set to
|
|
347
|
+
# @param [] enabled Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
|
|
336
348
|
#
|
|
337
349
|
# @return [Database]
|
|
338
|
-
def update(
|
|
350
|
+
def update(
|
|
351
|
+
database_id:,
|
|
352
|
+
name: nil,
|
|
353
|
+
enabled: nil
|
|
354
|
+
)
|
|
339
355
|
api_path = '/databases/{databaseId}'
|
|
340
356
|
.gsub('{databaseId}', database_id)
|
|
341
357
|
|
|
342
358
|
if database_id.nil?
|
|
343
|
-
|
|
359
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
344
360
|
end
|
|
345
361
|
|
|
346
362
|
api_params = {
|
|
347
363
|
name: name,
|
|
348
364
|
enabled: enabled,
|
|
349
365
|
}
|
|
350
|
-
|
|
366
|
+
|
|
351
367
|
api_headers = {
|
|
352
368
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
353
369
|
"content-type": 'application/json',
|
|
@@ -361,7 +377,6 @@ module Appwrite
|
|
|
361
377
|
params: api_params,
|
|
362
378
|
response_type: Models::Database
|
|
363
379
|
)
|
|
364
|
-
|
|
365
380
|
end
|
|
366
381
|
|
|
367
382
|
#
|
|
@@ -373,17 +388,18 @@ module Appwrite
|
|
|
373
388
|
# @param [String] database_id Database ID.
|
|
374
389
|
#
|
|
375
390
|
# @return []
|
|
376
|
-
def delete(
|
|
391
|
+
def delete(
|
|
392
|
+
database_id:
|
|
393
|
+
)
|
|
377
394
|
api_path = '/databases/{databaseId}'
|
|
378
395
|
.gsub('{databaseId}', database_id)
|
|
379
396
|
|
|
380
397
|
if database_id.nil?
|
|
381
|
-
|
|
398
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
382
399
|
end
|
|
383
400
|
|
|
384
|
-
api_params = {
|
|
385
|
-
|
|
386
|
-
|
|
401
|
+
api_params = {}
|
|
402
|
+
|
|
387
403
|
api_headers = {
|
|
388
404
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
389
405
|
"content-type": 'application/json',
|
|
@@ -395,7 +411,6 @@ module Appwrite
|
|
|
395
411
|
headers: api_headers,
|
|
396
412
|
params: api_params,
|
|
397
413
|
)
|
|
398
|
-
|
|
399
414
|
end
|
|
400
415
|
|
|
401
416
|
#
|
|
@@ -410,12 +425,17 @@ module Appwrite
|
|
|
410
425
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
411
426
|
#
|
|
412
427
|
# @return [CollectionList]
|
|
413
|
-
def list_collections(
|
|
428
|
+
def list_collections(
|
|
429
|
+
database_id:,
|
|
430
|
+
queries: nil,
|
|
431
|
+
search: nil,
|
|
432
|
+
total: nil
|
|
433
|
+
)
|
|
414
434
|
api_path = '/databases/{databaseId}/collections'
|
|
415
435
|
.gsub('{databaseId}', database_id)
|
|
416
436
|
|
|
417
437
|
if database_id.nil?
|
|
418
|
-
|
|
438
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
419
439
|
end
|
|
420
440
|
|
|
421
441
|
api_params = {
|
|
@@ -423,7 +443,7 @@ module Appwrite
|
|
|
423
443
|
search: search,
|
|
424
444
|
total: total,
|
|
425
445
|
}
|
|
426
|
-
|
|
446
|
+
|
|
427
447
|
api_headers = {
|
|
428
448
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
429
449
|
"accept": 'application/json',
|
|
@@ -436,7 +456,6 @@ module Appwrite
|
|
|
436
456
|
params: api_params,
|
|
437
457
|
response_type: Models::CollectionList
|
|
438
458
|
)
|
|
439
|
-
|
|
440
459
|
end
|
|
441
460
|
|
|
442
461
|
#
|
|
@@ -448,29 +467,38 @@ module Appwrite
|
|
|
448
467
|
# API or directly from your database console.
|
|
449
468
|
#
|
|
450
469
|
# @param [String] database_id Database ID.
|
|
451
|
-
# @param [String] collection_id Unique 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
|
|
470
|
+
# @param [String] collection_id Unique 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.
|
|
452
471
|
# @param [String] name Collection name. Max length: 128 chars.
|
|
453
472
|
# @param [Array] permissions An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
454
473
|
# @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
455
|
-
# @param [] enabled Is collection enabled? When set to
|
|
474
|
+
# @param [] enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
456
475
|
# @param [Array] attributes Array of attribute definitions to create. Each attribute should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
|
|
457
476
|
# @param [Array] indexes Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
458
477
|
#
|
|
459
478
|
# @return [Collection]
|
|
460
|
-
def create_collection(
|
|
479
|
+
def create_collection(
|
|
480
|
+
database_id:,
|
|
481
|
+
collection_id:,
|
|
482
|
+
name:,
|
|
483
|
+
permissions: nil,
|
|
484
|
+
document_security: nil,
|
|
485
|
+
enabled: nil,
|
|
486
|
+
attributes: nil,
|
|
487
|
+
indexes: nil
|
|
488
|
+
)
|
|
461
489
|
api_path = '/databases/{databaseId}/collections'
|
|
462
490
|
.gsub('{databaseId}', database_id)
|
|
463
491
|
|
|
464
492
|
if database_id.nil?
|
|
465
|
-
|
|
493
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
466
494
|
end
|
|
467
495
|
|
|
468
496
|
if collection_id.nil?
|
|
469
|
-
|
|
497
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
470
498
|
end
|
|
471
499
|
|
|
472
500
|
if name.nil?
|
|
473
|
-
|
|
501
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
474
502
|
end
|
|
475
503
|
|
|
476
504
|
api_params = {
|
|
@@ -482,7 +510,7 @@ module Appwrite
|
|
|
482
510
|
attributes: attributes,
|
|
483
511
|
indexes: indexes,
|
|
484
512
|
}
|
|
485
|
-
|
|
513
|
+
|
|
486
514
|
api_headers = {
|
|
487
515
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
488
516
|
"content-type": 'application/json',
|
|
@@ -496,7 +524,6 @@ module Appwrite
|
|
|
496
524
|
params: api_params,
|
|
497
525
|
response_type: Models::Collection
|
|
498
526
|
)
|
|
499
|
-
|
|
500
527
|
end
|
|
501
528
|
|
|
502
529
|
#
|
|
@@ -509,22 +536,24 @@ module Appwrite
|
|
|
509
536
|
# @param [String] collection_id Collection ID.
|
|
510
537
|
#
|
|
511
538
|
# @return [Collection]
|
|
512
|
-
def get_collection(
|
|
539
|
+
def get_collection(
|
|
540
|
+
database_id:,
|
|
541
|
+
collection_id:
|
|
542
|
+
)
|
|
513
543
|
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
514
544
|
.gsub('{databaseId}', database_id)
|
|
515
545
|
.gsub('{collectionId}', collection_id)
|
|
516
546
|
|
|
517
547
|
if database_id.nil?
|
|
518
|
-
|
|
548
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
519
549
|
end
|
|
520
550
|
|
|
521
551
|
if collection_id.nil?
|
|
522
|
-
|
|
552
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
523
553
|
end
|
|
524
554
|
|
|
525
|
-
api_params = {
|
|
526
|
-
|
|
527
|
-
|
|
555
|
+
api_params = {}
|
|
556
|
+
|
|
528
557
|
api_headers = {
|
|
529
558
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
530
559
|
"accept": 'application/json',
|
|
@@ -537,7 +566,6 @@ module Appwrite
|
|
|
537
566
|
params: api_params,
|
|
538
567
|
response_type: Models::Collection
|
|
539
568
|
)
|
|
540
|
-
|
|
541
569
|
end
|
|
542
570
|
|
|
543
571
|
#
|
|
@@ -550,21 +578,29 @@ module Appwrite
|
|
|
550
578
|
# @param [String] name Collection name. Max length: 128 chars.
|
|
551
579
|
# @param [Array] permissions An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
552
580
|
# @param [] document_security Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
553
|
-
# @param [] enabled Is collection enabled? When set to
|
|
581
|
+
# @param [] enabled Is collection enabled? When set to 'disabled', users cannot access the collection but Server SDKs with and API key can still read and write to the collection. No data is lost when this is toggled.
|
|
554
582
|
# @param [] purge When true, purge all cached list responses for this collection as part of the update. Use this to force readers to see fresh data immediately instead of waiting for the cache TTL to expire.
|
|
555
583
|
#
|
|
556
584
|
# @return [Collection]
|
|
557
|
-
def update_collection(
|
|
585
|
+
def update_collection(
|
|
586
|
+
database_id:,
|
|
587
|
+
collection_id:,
|
|
588
|
+
name: nil,
|
|
589
|
+
permissions: nil,
|
|
590
|
+
document_security: nil,
|
|
591
|
+
enabled: nil,
|
|
592
|
+
purge: nil
|
|
593
|
+
)
|
|
558
594
|
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
559
595
|
.gsub('{databaseId}', database_id)
|
|
560
596
|
.gsub('{collectionId}', collection_id)
|
|
561
597
|
|
|
562
598
|
if database_id.nil?
|
|
563
|
-
|
|
599
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
564
600
|
end
|
|
565
601
|
|
|
566
602
|
if collection_id.nil?
|
|
567
|
-
|
|
603
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
568
604
|
end
|
|
569
605
|
|
|
570
606
|
api_params = {
|
|
@@ -574,7 +610,7 @@ module Appwrite
|
|
|
574
610
|
enabled: enabled,
|
|
575
611
|
purge: purge,
|
|
576
612
|
}
|
|
577
|
-
|
|
613
|
+
|
|
578
614
|
api_headers = {
|
|
579
615
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
580
616
|
"content-type": 'application/json',
|
|
@@ -588,7 +624,6 @@ module Appwrite
|
|
|
588
624
|
params: api_params,
|
|
589
625
|
response_type: Models::Collection
|
|
590
626
|
)
|
|
591
|
-
|
|
592
627
|
end
|
|
593
628
|
|
|
594
629
|
#
|
|
@@ -601,22 +636,24 @@ module Appwrite
|
|
|
601
636
|
# @param [String] collection_id Collection ID.
|
|
602
637
|
#
|
|
603
638
|
# @return []
|
|
604
|
-
def delete_collection(
|
|
639
|
+
def delete_collection(
|
|
640
|
+
database_id:,
|
|
641
|
+
collection_id:
|
|
642
|
+
)
|
|
605
643
|
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
606
644
|
.gsub('{databaseId}', database_id)
|
|
607
645
|
.gsub('{collectionId}', collection_id)
|
|
608
646
|
|
|
609
647
|
if database_id.nil?
|
|
610
|
-
|
|
648
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
611
649
|
end
|
|
612
650
|
|
|
613
651
|
if collection_id.nil?
|
|
614
|
-
|
|
652
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
615
653
|
end
|
|
616
654
|
|
|
617
|
-
api_params = {
|
|
618
|
-
|
|
619
|
-
|
|
655
|
+
api_params = {}
|
|
656
|
+
|
|
620
657
|
api_headers = {
|
|
621
658
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
622
659
|
"content-type": 'application/json',
|
|
@@ -628,7 +665,6 @@ module Appwrite
|
|
|
628
665
|
headers: api_headers,
|
|
629
666
|
params: api_params,
|
|
630
667
|
)
|
|
631
|
-
|
|
632
668
|
end
|
|
633
669
|
|
|
634
670
|
#
|
|
@@ -642,24 +678,29 @@ module Appwrite
|
|
|
642
678
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
643
679
|
#
|
|
644
680
|
# @return [AttributeList]
|
|
645
|
-
def list_attributes(
|
|
681
|
+
def list_attributes(
|
|
682
|
+
database_id:,
|
|
683
|
+
collection_id:,
|
|
684
|
+
queries: nil,
|
|
685
|
+
total: nil
|
|
686
|
+
)
|
|
646
687
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes'
|
|
647
688
|
.gsub('{databaseId}', database_id)
|
|
648
689
|
.gsub('{collectionId}', collection_id)
|
|
649
690
|
|
|
650
691
|
if database_id.nil?
|
|
651
|
-
|
|
692
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
652
693
|
end
|
|
653
694
|
|
|
654
695
|
if collection_id.nil?
|
|
655
|
-
|
|
696
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
656
697
|
end
|
|
657
698
|
|
|
658
699
|
api_params = {
|
|
659
700
|
queries: queries,
|
|
660
701
|
total: total,
|
|
661
702
|
}
|
|
662
|
-
|
|
703
|
+
|
|
663
704
|
api_headers = {
|
|
664
705
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
665
706
|
"accept": 'application/json',
|
|
@@ -672,7 +713,6 @@ module Appwrite
|
|
|
672
713
|
params: api_params,
|
|
673
714
|
response_type: Models::AttributeList
|
|
674
715
|
)
|
|
675
|
-
|
|
676
716
|
end
|
|
677
717
|
|
|
678
718
|
#
|
|
@@ -680,7 +720,7 @@ module Appwrite
|
|
|
680
720
|
#
|
|
681
721
|
# Create a bigint attribute. Optionally, minimum and maximum values can be
|
|
682
722
|
# provided.
|
|
683
|
-
#
|
|
723
|
+
#
|
|
684
724
|
#
|
|
685
725
|
# @param [String] database_id Database ID.
|
|
686
726
|
# @param [String] collection_id Collection ID.
|
|
@@ -692,25 +732,34 @@ module Appwrite
|
|
|
692
732
|
# @param [] array Is attribute an array?
|
|
693
733
|
#
|
|
694
734
|
# @return [AttributeBigint]
|
|
695
|
-
def create_big_int_attribute(
|
|
735
|
+
def create_big_int_attribute(
|
|
736
|
+
database_id:,
|
|
737
|
+
collection_id:,
|
|
738
|
+
key:,
|
|
739
|
+
required:,
|
|
740
|
+
min: nil,
|
|
741
|
+
max: nil,
|
|
742
|
+
default: nil,
|
|
743
|
+
array: nil
|
|
744
|
+
)
|
|
696
745
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'
|
|
697
746
|
.gsub('{databaseId}', database_id)
|
|
698
747
|
.gsub('{collectionId}', collection_id)
|
|
699
748
|
|
|
700
749
|
if database_id.nil?
|
|
701
|
-
|
|
750
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
702
751
|
end
|
|
703
752
|
|
|
704
753
|
if collection_id.nil?
|
|
705
|
-
|
|
754
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
706
755
|
end
|
|
707
756
|
|
|
708
757
|
if key.nil?
|
|
709
|
-
|
|
758
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
710
759
|
end
|
|
711
760
|
|
|
712
761
|
if required.nil?
|
|
713
|
-
|
|
762
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
714
763
|
end
|
|
715
764
|
|
|
716
765
|
api_params = {
|
|
@@ -721,7 +770,7 @@ module Appwrite
|
|
|
721
770
|
default: default,
|
|
722
771
|
array: array,
|
|
723
772
|
}
|
|
724
|
-
|
|
773
|
+
|
|
725
774
|
api_headers = {
|
|
726
775
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
727
776
|
"content-type": 'application/json',
|
|
@@ -735,7 +784,6 @@ module Appwrite
|
|
|
735
784
|
params: api_params,
|
|
736
785
|
response_type: Models::AttributeBigint
|
|
737
786
|
)
|
|
738
|
-
|
|
739
787
|
end
|
|
740
788
|
|
|
741
789
|
#
|
|
@@ -743,7 +791,7 @@ module Appwrite
|
|
|
743
791
|
#
|
|
744
792
|
# Update a bigint attribute. Changing the `default` value will not update
|
|
745
793
|
# already existing documents.
|
|
746
|
-
#
|
|
794
|
+
#
|
|
747
795
|
#
|
|
748
796
|
# @param [String] database_id Database ID.
|
|
749
797
|
# @param [String] collection_id Collection ID.
|
|
@@ -755,30 +803,39 @@ module Appwrite
|
|
|
755
803
|
# @param [String] new_key New Attribute Key.
|
|
756
804
|
#
|
|
757
805
|
# @return [AttributeBigint]
|
|
758
|
-
def update_big_int_attribute(
|
|
806
|
+
def update_big_int_attribute(
|
|
807
|
+
database_id:,
|
|
808
|
+
collection_id:,
|
|
809
|
+
key:,
|
|
810
|
+
required:,
|
|
811
|
+
default:,
|
|
812
|
+
min: nil,
|
|
813
|
+
max: nil,
|
|
814
|
+
new_key: nil
|
|
815
|
+
)
|
|
759
816
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'
|
|
760
817
|
.gsub('{databaseId}', database_id)
|
|
761
818
|
.gsub('{collectionId}', collection_id)
|
|
762
819
|
.gsub('{key}', key)
|
|
763
820
|
|
|
764
821
|
if database_id.nil?
|
|
765
|
-
|
|
822
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
766
823
|
end
|
|
767
824
|
|
|
768
825
|
if collection_id.nil?
|
|
769
|
-
|
|
826
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
770
827
|
end
|
|
771
828
|
|
|
772
829
|
if key.nil?
|
|
773
|
-
|
|
830
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
774
831
|
end
|
|
775
832
|
|
|
776
833
|
if required.nil?
|
|
777
|
-
|
|
834
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
778
835
|
end
|
|
779
836
|
|
|
780
837
|
if default.nil?
|
|
781
|
-
|
|
838
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
782
839
|
end
|
|
783
840
|
|
|
784
841
|
api_params = {
|
|
@@ -788,7 +845,7 @@ module Appwrite
|
|
|
788
845
|
default: default,
|
|
789
846
|
newKey: new_key,
|
|
790
847
|
}
|
|
791
|
-
|
|
848
|
+
|
|
792
849
|
api_headers = {
|
|
793
850
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
794
851
|
"content-type": 'application/json',
|
|
@@ -802,14 +859,13 @@ module Appwrite
|
|
|
802
859
|
params: api_params,
|
|
803
860
|
response_type: Models::AttributeBigint
|
|
804
861
|
)
|
|
805
|
-
|
|
806
862
|
end
|
|
807
863
|
|
|
808
864
|
#
|
|
809
865
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.
|
|
810
866
|
#
|
|
811
867
|
# Create a boolean attribute.
|
|
812
|
-
#
|
|
868
|
+
#
|
|
813
869
|
#
|
|
814
870
|
# @param [String] database_id Database ID.
|
|
815
871
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -819,25 +875,32 @@ module Appwrite
|
|
|
819
875
|
# @param [] array Is attribute an array?
|
|
820
876
|
#
|
|
821
877
|
# @return [AttributeBoolean]
|
|
822
|
-
def create_boolean_attribute(
|
|
878
|
+
def create_boolean_attribute(
|
|
879
|
+
database_id:,
|
|
880
|
+
collection_id:,
|
|
881
|
+
key:,
|
|
882
|
+
required:,
|
|
883
|
+
default: nil,
|
|
884
|
+
array: nil
|
|
885
|
+
)
|
|
823
886
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'
|
|
824
887
|
.gsub('{databaseId}', database_id)
|
|
825
888
|
.gsub('{collectionId}', collection_id)
|
|
826
889
|
|
|
827
890
|
if database_id.nil?
|
|
828
|
-
|
|
891
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
829
892
|
end
|
|
830
893
|
|
|
831
894
|
if collection_id.nil?
|
|
832
|
-
|
|
895
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
833
896
|
end
|
|
834
897
|
|
|
835
898
|
if key.nil?
|
|
836
|
-
|
|
899
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
837
900
|
end
|
|
838
901
|
|
|
839
902
|
if required.nil?
|
|
840
|
-
|
|
903
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
841
904
|
end
|
|
842
905
|
|
|
843
906
|
api_params = {
|
|
@@ -846,7 +909,7 @@ module Appwrite
|
|
|
846
909
|
default: default,
|
|
847
910
|
array: array,
|
|
848
911
|
}
|
|
849
|
-
|
|
912
|
+
|
|
850
913
|
api_headers = {
|
|
851
914
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
852
915
|
"content-type": 'application/json',
|
|
@@ -860,7 +923,6 @@ module Appwrite
|
|
|
860
923
|
params: api_params,
|
|
861
924
|
response_type: Models::AttributeBoolean
|
|
862
925
|
)
|
|
863
|
-
|
|
864
926
|
end
|
|
865
927
|
|
|
866
928
|
#
|
|
@@ -877,30 +939,37 @@ module Appwrite
|
|
|
877
939
|
# @param [String] new_key New attribute key.
|
|
878
940
|
#
|
|
879
941
|
# @return [AttributeBoolean]
|
|
880
|
-
def update_boolean_attribute(
|
|
942
|
+
def update_boolean_attribute(
|
|
943
|
+
database_id:,
|
|
944
|
+
collection_id:,
|
|
945
|
+
key:,
|
|
946
|
+
required:,
|
|
947
|
+
default:,
|
|
948
|
+
new_key: nil
|
|
949
|
+
)
|
|
881
950
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'
|
|
882
951
|
.gsub('{databaseId}', database_id)
|
|
883
952
|
.gsub('{collectionId}', collection_id)
|
|
884
953
|
.gsub('{key}', key)
|
|
885
954
|
|
|
886
955
|
if database_id.nil?
|
|
887
|
-
|
|
956
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
888
957
|
end
|
|
889
958
|
|
|
890
959
|
if collection_id.nil?
|
|
891
|
-
|
|
960
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
892
961
|
end
|
|
893
962
|
|
|
894
963
|
if key.nil?
|
|
895
|
-
|
|
964
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
896
965
|
end
|
|
897
966
|
|
|
898
967
|
if required.nil?
|
|
899
|
-
|
|
968
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
900
969
|
end
|
|
901
970
|
|
|
902
971
|
if default.nil?
|
|
903
|
-
|
|
972
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
904
973
|
end
|
|
905
974
|
|
|
906
975
|
api_params = {
|
|
@@ -908,7 +977,7 @@ module Appwrite
|
|
|
908
977
|
default: default,
|
|
909
978
|
newKey: new_key,
|
|
910
979
|
}
|
|
911
|
-
|
|
980
|
+
|
|
912
981
|
api_headers = {
|
|
913
982
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
914
983
|
"content-type": 'application/json',
|
|
@@ -922,7 +991,6 @@ module Appwrite
|
|
|
922
991
|
params: api_params,
|
|
923
992
|
response_type: Models::AttributeBoolean
|
|
924
993
|
)
|
|
925
|
-
|
|
926
994
|
end
|
|
927
995
|
|
|
928
996
|
#
|
|
@@ -938,25 +1006,32 @@ module Appwrite
|
|
|
938
1006
|
# @param [] array Is attribute an array?
|
|
939
1007
|
#
|
|
940
1008
|
# @return [AttributeDatetime]
|
|
941
|
-
def create_datetime_attribute(
|
|
1009
|
+
def create_datetime_attribute(
|
|
1010
|
+
database_id:,
|
|
1011
|
+
collection_id:,
|
|
1012
|
+
key:,
|
|
1013
|
+
required:,
|
|
1014
|
+
default: nil,
|
|
1015
|
+
array: nil
|
|
1016
|
+
)
|
|
942
1017
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'
|
|
943
1018
|
.gsub('{databaseId}', database_id)
|
|
944
1019
|
.gsub('{collectionId}', collection_id)
|
|
945
1020
|
|
|
946
1021
|
if database_id.nil?
|
|
947
|
-
|
|
1022
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
948
1023
|
end
|
|
949
1024
|
|
|
950
1025
|
if collection_id.nil?
|
|
951
|
-
|
|
1026
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
952
1027
|
end
|
|
953
1028
|
|
|
954
1029
|
if key.nil?
|
|
955
|
-
|
|
1030
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
956
1031
|
end
|
|
957
1032
|
|
|
958
1033
|
if required.nil?
|
|
959
|
-
|
|
1034
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
960
1035
|
end
|
|
961
1036
|
|
|
962
1037
|
api_params = {
|
|
@@ -965,7 +1040,7 @@ module Appwrite
|
|
|
965
1040
|
default: default,
|
|
966
1041
|
array: array,
|
|
967
1042
|
}
|
|
968
|
-
|
|
1043
|
+
|
|
969
1044
|
api_headers = {
|
|
970
1045
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
971
1046
|
"content-type": 'application/json',
|
|
@@ -979,7 +1054,6 @@ module Appwrite
|
|
|
979
1054
|
params: api_params,
|
|
980
1055
|
response_type: Models::AttributeDatetime
|
|
981
1056
|
)
|
|
982
|
-
|
|
983
1057
|
end
|
|
984
1058
|
|
|
985
1059
|
#
|
|
@@ -996,30 +1070,37 @@ module Appwrite
|
|
|
996
1070
|
# @param [String] new_key New attribute key.
|
|
997
1071
|
#
|
|
998
1072
|
# @return [AttributeDatetime]
|
|
999
|
-
def update_datetime_attribute(
|
|
1073
|
+
def update_datetime_attribute(
|
|
1074
|
+
database_id:,
|
|
1075
|
+
collection_id:,
|
|
1076
|
+
key:,
|
|
1077
|
+
required:,
|
|
1078
|
+
default:,
|
|
1079
|
+
new_key: nil
|
|
1080
|
+
)
|
|
1000
1081
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'
|
|
1001
1082
|
.gsub('{databaseId}', database_id)
|
|
1002
1083
|
.gsub('{collectionId}', collection_id)
|
|
1003
1084
|
.gsub('{key}', key)
|
|
1004
1085
|
|
|
1005
1086
|
if database_id.nil?
|
|
1006
|
-
|
|
1087
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1007
1088
|
end
|
|
1008
1089
|
|
|
1009
1090
|
if collection_id.nil?
|
|
1010
|
-
|
|
1091
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1011
1092
|
end
|
|
1012
1093
|
|
|
1013
1094
|
if key.nil?
|
|
1014
|
-
|
|
1095
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1015
1096
|
end
|
|
1016
1097
|
|
|
1017
1098
|
if required.nil?
|
|
1018
|
-
|
|
1099
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1019
1100
|
end
|
|
1020
1101
|
|
|
1021
1102
|
if default.nil?
|
|
1022
|
-
|
|
1103
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1023
1104
|
end
|
|
1024
1105
|
|
|
1025
1106
|
api_params = {
|
|
@@ -1027,7 +1108,7 @@ module Appwrite
|
|
|
1027
1108
|
default: default,
|
|
1028
1109
|
newKey: new_key,
|
|
1029
1110
|
}
|
|
1030
|
-
|
|
1111
|
+
|
|
1031
1112
|
api_headers = {
|
|
1032
1113
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1033
1114
|
"content-type": 'application/json',
|
|
@@ -1041,14 +1122,13 @@ module Appwrite
|
|
|
1041
1122
|
params: api_params,
|
|
1042
1123
|
response_type: Models::AttributeDatetime
|
|
1043
1124
|
)
|
|
1044
|
-
|
|
1045
1125
|
end
|
|
1046
1126
|
|
|
1047
1127
|
#
|
|
1048
1128
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.
|
|
1049
1129
|
#
|
|
1050
1130
|
# Create an email attribute.
|
|
1051
|
-
#
|
|
1131
|
+
#
|
|
1052
1132
|
#
|
|
1053
1133
|
# @param [String] database_id Database ID.
|
|
1054
1134
|
# @param [String] collection_id Collection ID.
|
|
@@ -1058,25 +1138,32 @@ module Appwrite
|
|
|
1058
1138
|
# @param [] array Is attribute an array?
|
|
1059
1139
|
#
|
|
1060
1140
|
# @return [AttributeEmail]
|
|
1061
|
-
def create_email_attribute(
|
|
1141
|
+
def create_email_attribute(
|
|
1142
|
+
database_id:,
|
|
1143
|
+
collection_id:,
|
|
1144
|
+
key:,
|
|
1145
|
+
required:,
|
|
1146
|
+
default: nil,
|
|
1147
|
+
array: nil
|
|
1148
|
+
)
|
|
1062
1149
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email'
|
|
1063
1150
|
.gsub('{databaseId}', database_id)
|
|
1064
1151
|
.gsub('{collectionId}', collection_id)
|
|
1065
1152
|
|
|
1066
1153
|
if database_id.nil?
|
|
1067
|
-
|
|
1154
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1068
1155
|
end
|
|
1069
1156
|
|
|
1070
1157
|
if collection_id.nil?
|
|
1071
|
-
|
|
1158
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1072
1159
|
end
|
|
1073
1160
|
|
|
1074
1161
|
if key.nil?
|
|
1075
|
-
|
|
1162
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1076
1163
|
end
|
|
1077
1164
|
|
|
1078
1165
|
if required.nil?
|
|
1079
|
-
|
|
1166
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1080
1167
|
end
|
|
1081
1168
|
|
|
1082
1169
|
api_params = {
|
|
@@ -1085,7 +1172,7 @@ module Appwrite
|
|
|
1085
1172
|
default: default,
|
|
1086
1173
|
array: array,
|
|
1087
1174
|
}
|
|
1088
|
-
|
|
1175
|
+
|
|
1089
1176
|
api_headers = {
|
|
1090
1177
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1091
1178
|
"content-type": 'application/json',
|
|
@@ -1099,7 +1186,6 @@ module Appwrite
|
|
|
1099
1186
|
params: api_params,
|
|
1100
1187
|
response_type: Models::AttributeEmail
|
|
1101
1188
|
)
|
|
1102
|
-
|
|
1103
1189
|
end
|
|
1104
1190
|
|
|
1105
1191
|
#
|
|
@@ -1107,7 +1193,7 @@ module Appwrite
|
|
|
1107
1193
|
#
|
|
1108
1194
|
# Update an email attribute. Changing the `default` value will not update
|
|
1109
1195
|
# already existing documents.
|
|
1110
|
-
#
|
|
1196
|
+
#
|
|
1111
1197
|
#
|
|
1112
1198
|
# @param [String] database_id Database ID.
|
|
1113
1199
|
# @param [String] collection_id Collection ID.
|
|
@@ -1117,30 +1203,37 @@ module Appwrite
|
|
|
1117
1203
|
# @param [String] new_key New Attribute Key.
|
|
1118
1204
|
#
|
|
1119
1205
|
# @return [AttributeEmail]
|
|
1120
|
-
def update_email_attribute(
|
|
1206
|
+
def update_email_attribute(
|
|
1207
|
+
database_id:,
|
|
1208
|
+
collection_id:,
|
|
1209
|
+
key:,
|
|
1210
|
+
required:,
|
|
1211
|
+
default:,
|
|
1212
|
+
new_key: nil
|
|
1213
|
+
)
|
|
1121
1214
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'
|
|
1122
1215
|
.gsub('{databaseId}', database_id)
|
|
1123
1216
|
.gsub('{collectionId}', collection_id)
|
|
1124
1217
|
.gsub('{key}', key)
|
|
1125
1218
|
|
|
1126
1219
|
if database_id.nil?
|
|
1127
|
-
|
|
1220
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1128
1221
|
end
|
|
1129
1222
|
|
|
1130
1223
|
if collection_id.nil?
|
|
1131
|
-
|
|
1224
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1132
1225
|
end
|
|
1133
1226
|
|
|
1134
1227
|
if key.nil?
|
|
1135
|
-
|
|
1228
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1136
1229
|
end
|
|
1137
1230
|
|
|
1138
1231
|
if required.nil?
|
|
1139
|
-
|
|
1232
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1140
1233
|
end
|
|
1141
1234
|
|
|
1142
1235
|
if default.nil?
|
|
1143
|
-
|
|
1236
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1144
1237
|
end
|
|
1145
1238
|
|
|
1146
1239
|
api_params = {
|
|
@@ -1148,7 +1241,7 @@ module Appwrite
|
|
|
1148
1241
|
default: default,
|
|
1149
1242
|
newKey: new_key,
|
|
1150
1243
|
}
|
|
1151
|
-
|
|
1244
|
+
|
|
1152
1245
|
api_headers = {
|
|
1153
1246
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1154
1247
|
"content-type": 'application/json',
|
|
@@ -1162,15 +1255,14 @@ module Appwrite
|
|
|
1162
1255
|
params: api_params,
|
|
1163
1256
|
response_type: Models::AttributeEmail
|
|
1164
1257
|
)
|
|
1165
|
-
|
|
1166
1258
|
end
|
|
1167
1259
|
|
|
1168
1260
|
#
|
|
1169
1261
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.
|
|
1170
1262
|
#
|
|
1171
1263
|
# Create an enum attribute. The `elements` param acts as a white-list of
|
|
1172
|
-
# accepted values for this attribute.
|
|
1173
|
-
#
|
|
1264
|
+
# accepted values for this attribute.
|
|
1265
|
+
#
|
|
1174
1266
|
#
|
|
1175
1267
|
# @param [String] database_id Database ID.
|
|
1176
1268
|
# @param [String] collection_id Collection ID.
|
|
@@ -1181,29 +1273,37 @@ module Appwrite
|
|
|
1181
1273
|
# @param [] array Is attribute an array?
|
|
1182
1274
|
#
|
|
1183
1275
|
# @return [AttributeEnum]
|
|
1184
|
-
def create_enum_attribute(
|
|
1276
|
+
def create_enum_attribute(
|
|
1277
|
+
database_id:,
|
|
1278
|
+
collection_id:,
|
|
1279
|
+
key:,
|
|
1280
|
+
elements:,
|
|
1281
|
+
required:,
|
|
1282
|
+
default: nil,
|
|
1283
|
+
array: nil
|
|
1284
|
+
)
|
|
1185
1285
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'
|
|
1186
1286
|
.gsub('{databaseId}', database_id)
|
|
1187
1287
|
.gsub('{collectionId}', collection_id)
|
|
1188
1288
|
|
|
1189
1289
|
if database_id.nil?
|
|
1190
|
-
|
|
1290
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1191
1291
|
end
|
|
1192
1292
|
|
|
1193
1293
|
if collection_id.nil?
|
|
1194
|
-
|
|
1294
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1195
1295
|
end
|
|
1196
1296
|
|
|
1197
1297
|
if key.nil?
|
|
1198
|
-
|
|
1298
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1199
1299
|
end
|
|
1200
1300
|
|
|
1201
1301
|
if elements.nil?
|
|
1202
|
-
|
|
1302
|
+
raise Appwrite::Exception.new('Missing required parameter: "elements"')
|
|
1203
1303
|
end
|
|
1204
1304
|
|
|
1205
1305
|
if required.nil?
|
|
1206
|
-
|
|
1306
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1207
1307
|
end
|
|
1208
1308
|
|
|
1209
1309
|
api_params = {
|
|
@@ -1213,7 +1313,7 @@ module Appwrite
|
|
|
1213
1313
|
default: default,
|
|
1214
1314
|
array: array,
|
|
1215
1315
|
}
|
|
1216
|
-
|
|
1316
|
+
|
|
1217
1317
|
api_headers = {
|
|
1218
1318
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1219
1319
|
"content-type": 'application/json',
|
|
@@ -1227,7 +1327,6 @@ module Appwrite
|
|
|
1227
1327
|
params: api_params,
|
|
1228
1328
|
response_type: Models::AttributeEnum
|
|
1229
1329
|
)
|
|
1230
|
-
|
|
1231
1330
|
end
|
|
1232
1331
|
|
|
1233
1332
|
#
|
|
@@ -1235,7 +1334,7 @@ module Appwrite
|
|
|
1235
1334
|
#
|
|
1236
1335
|
# Update an enum attribute. Changing the `default` value will not update
|
|
1237
1336
|
# already existing documents.
|
|
1238
|
-
#
|
|
1337
|
+
#
|
|
1239
1338
|
#
|
|
1240
1339
|
# @param [String] database_id Database ID.
|
|
1241
1340
|
# @param [String] collection_id Collection ID.
|
|
@@ -1246,34 +1345,42 @@ module Appwrite
|
|
|
1246
1345
|
# @param [String] new_key New Attribute Key.
|
|
1247
1346
|
#
|
|
1248
1347
|
# @return [AttributeEnum]
|
|
1249
|
-
def update_enum_attribute(
|
|
1348
|
+
def update_enum_attribute(
|
|
1349
|
+
database_id:,
|
|
1350
|
+
collection_id:,
|
|
1351
|
+
key:,
|
|
1352
|
+
elements:,
|
|
1353
|
+
required:,
|
|
1354
|
+
default:,
|
|
1355
|
+
new_key: nil
|
|
1356
|
+
)
|
|
1250
1357
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'
|
|
1251
1358
|
.gsub('{databaseId}', database_id)
|
|
1252
1359
|
.gsub('{collectionId}', collection_id)
|
|
1253
1360
|
.gsub('{key}', key)
|
|
1254
1361
|
|
|
1255
1362
|
if database_id.nil?
|
|
1256
|
-
|
|
1363
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1257
1364
|
end
|
|
1258
1365
|
|
|
1259
1366
|
if collection_id.nil?
|
|
1260
|
-
|
|
1367
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1261
1368
|
end
|
|
1262
1369
|
|
|
1263
1370
|
if key.nil?
|
|
1264
|
-
|
|
1371
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1265
1372
|
end
|
|
1266
1373
|
|
|
1267
1374
|
if elements.nil?
|
|
1268
|
-
|
|
1375
|
+
raise Appwrite::Exception.new('Missing required parameter: "elements"')
|
|
1269
1376
|
end
|
|
1270
1377
|
|
|
1271
1378
|
if required.nil?
|
|
1272
|
-
|
|
1379
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1273
1380
|
end
|
|
1274
1381
|
|
|
1275
1382
|
if default.nil?
|
|
1276
|
-
|
|
1383
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1277
1384
|
end
|
|
1278
1385
|
|
|
1279
1386
|
api_params = {
|
|
@@ -1282,7 +1389,7 @@ module Appwrite
|
|
|
1282
1389
|
default: default,
|
|
1283
1390
|
newKey: new_key,
|
|
1284
1391
|
}
|
|
1285
|
-
|
|
1392
|
+
|
|
1286
1393
|
api_headers = {
|
|
1287
1394
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1288
1395
|
"content-type": 'application/json',
|
|
@@ -1296,7 +1403,6 @@ module Appwrite
|
|
|
1296
1403
|
params: api_params,
|
|
1297
1404
|
response_type: Models::AttributeEnum
|
|
1298
1405
|
)
|
|
1299
|
-
|
|
1300
1406
|
end
|
|
1301
1407
|
|
|
1302
1408
|
#
|
|
@@ -1304,7 +1410,7 @@ module Appwrite
|
|
|
1304
1410
|
#
|
|
1305
1411
|
# Create a float attribute. Optionally, minimum and maximum values can be
|
|
1306
1412
|
# provided.
|
|
1307
|
-
#
|
|
1413
|
+
#
|
|
1308
1414
|
#
|
|
1309
1415
|
# @param [String] database_id Database ID.
|
|
1310
1416
|
# @param [String] collection_id Collection ID.
|
|
@@ -1316,25 +1422,34 @@ module Appwrite
|
|
|
1316
1422
|
# @param [] array Is attribute an array?
|
|
1317
1423
|
#
|
|
1318
1424
|
# @return [AttributeFloat]
|
|
1319
|
-
def create_float_attribute(
|
|
1425
|
+
def create_float_attribute(
|
|
1426
|
+
database_id:,
|
|
1427
|
+
collection_id:,
|
|
1428
|
+
key:,
|
|
1429
|
+
required:,
|
|
1430
|
+
min: nil,
|
|
1431
|
+
max: nil,
|
|
1432
|
+
default: nil,
|
|
1433
|
+
array: nil
|
|
1434
|
+
)
|
|
1320
1435
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float'
|
|
1321
1436
|
.gsub('{databaseId}', database_id)
|
|
1322
1437
|
.gsub('{collectionId}', collection_id)
|
|
1323
1438
|
|
|
1324
1439
|
if database_id.nil?
|
|
1325
|
-
|
|
1440
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1326
1441
|
end
|
|
1327
1442
|
|
|
1328
1443
|
if collection_id.nil?
|
|
1329
|
-
|
|
1444
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1330
1445
|
end
|
|
1331
1446
|
|
|
1332
1447
|
if key.nil?
|
|
1333
|
-
|
|
1448
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1334
1449
|
end
|
|
1335
1450
|
|
|
1336
1451
|
if required.nil?
|
|
1337
|
-
|
|
1452
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1338
1453
|
end
|
|
1339
1454
|
|
|
1340
1455
|
api_params = {
|
|
@@ -1345,7 +1460,7 @@ module Appwrite
|
|
|
1345
1460
|
default: default,
|
|
1346
1461
|
array: array,
|
|
1347
1462
|
}
|
|
1348
|
-
|
|
1463
|
+
|
|
1349
1464
|
api_headers = {
|
|
1350
1465
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1351
1466
|
"content-type": 'application/json',
|
|
@@ -1359,7 +1474,6 @@ module Appwrite
|
|
|
1359
1474
|
params: api_params,
|
|
1360
1475
|
response_type: Models::AttributeFloat
|
|
1361
1476
|
)
|
|
1362
|
-
|
|
1363
1477
|
end
|
|
1364
1478
|
|
|
1365
1479
|
#
|
|
@@ -1367,7 +1481,7 @@ module Appwrite
|
|
|
1367
1481
|
#
|
|
1368
1482
|
# Update a float attribute. Changing the `default` value will not update
|
|
1369
1483
|
# already existing documents.
|
|
1370
|
-
#
|
|
1484
|
+
#
|
|
1371
1485
|
#
|
|
1372
1486
|
# @param [String] database_id Database ID.
|
|
1373
1487
|
# @param [String] collection_id Collection ID.
|
|
@@ -1379,30 +1493,39 @@ module Appwrite
|
|
|
1379
1493
|
# @param [String] new_key New Attribute Key.
|
|
1380
1494
|
#
|
|
1381
1495
|
# @return [AttributeFloat]
|
|
1382
|
-
def update_float_attribute(
|
|
1496
|
+
def update_float_attribute(
|
|
1497
|
+
database_id:,
|
|
1498
|
+
collection_id:,
|
|
1499
|
+
key:,
|
|
1500
|
+
required:,
|
|
1501
|
+
default:,
|
|
1502
|
+
min: nil,
|
|
1503
|
+
max: nil,
|
|
1504
|
+
new_key: nil
|
|
1505
|
+
)
|
|
1383
1506
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'
|
|
1384
1507
|
.gsub('{databaseId}', database_id)
|
|
1385
1508
|
.gsub('{collectionId}', collection_id)
|
|
1386
1509
|
.gsub('{key}', key)
|
|
1387
1510
|
|
|
1388
1511
|
if database_id.nil?
|
|
1389
|
-
|
|
1512
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1390
1513
|
end
|
|
1391
1514
|
|
|
1392
1515
|
if collection_id.nil?
|
|
1393
|
-
|
|
1516
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1394
1517
|
end
|
|
1395
1518
|
|
|
1396
1519
|
if key.nil?
|
|
1397
|
-
|
|
1520
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1398
1521
|
end
|
|
1399
1522
|
|
|
1400
1523
|
if required.nil?
|
|
1401
|
-
|
|
1524
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1402
1525
|
end
|
|
1403
1526
|
|
|
1404
1527
|
if default.nil?
|
|
1405
|
-
|
|
1528
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1406
1529
|
end
|
|
1407
1530
|
|
|
1408
1531
|
api_params = {
|
|
@@ -1412,7 +1535,7 @@ module Appwrite
|
|
|
1412
1535
|
default: default,
|
|
1413
1536
|
newKey: new_key,
|
|
1414
1537
|
}
|
|
1415
|
-
|
|
1538
|
+
|
|
1416
1539
|
api_headers = {
|
|
1417
1540
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1418
1541
|
"content-type": 'application/json',
|
|
@@ -1426,7 +1549,6 @@ module Appwrite
|
|
|
1426
1549
|
params: api_params,
|
|
1427
1550
|
response_type: Models::AttributeFloat
|
|
1428
1551
|
)
|
|
1429
|
-
|
|
1430
1552
|
end
|
|
1431
1553
|
|
|
1432
1554
|
#
|
|
@@ -1434,7 +1556,7 @@ module Appwrite
|
|
|
1434
1556
|
#
|
|
1435
1557
|
# Create an integer attribute. Optionally, minimum and maximum values can be
|
|
1436
1558
|
# provided.
|
|
1437
|
-
#
|
|
1559
|
+
#
|
|
1438
1560
|
#
|
|
1439
1561
|
# @param [String] database_id Database ID.
|
|
1440
1562
|
# @param [String] collection_id Collection ID.
|
|
@@ -1446,25 +1568,34 @@ module Appwrite
|
|
|
1446
1568
|
# @param [] array Is attribute an array?
|
|
1447
1569
|
#
|
|
1448
1570
|
# @return [AttributeInteger]
|
|
1449
|
-
def create_integer_attribute(
|
|
1571
|
+
def create_integer_attribute(
|
|
1572
|
+
database_id:,
|
|
1573
|
+
collection_id:,
|
|
1574
|
+
key:,
|
|
1575
|
+
required:,
|
|
1576
|
+
min: nil,
|
|
1577
|
+
max: nil,
|
|
1578
|
+
default: nil,
|
|
1579
|
+
array: nil
|
|
1580
|
+
)
|
|
1450
1581
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'
|
|
1451
1582
|
.gsub('{databaseId}', database_id)
|
|
1452
1583
|
.gsub('{collectionId}', collection_id)
|
|
1453
1584
|
|
|
1454
1585
|
if database_id.nil?
|
|
1455
|
-
|
|
1586
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1456
1587
|
end
|
|
1457
1588
|
|
|
1458
1589
|
if collection_id.nil?
|
|
1459
|
-
|
|
1590
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1460
1591
|
end
|
|
1461
1592
|
|
|
1462
1593
|
if key.nil?
|
|
1463
|
-
|
|
1594
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1464
1595
|
end
|
|
1465
1596
|
|
|
1466
1597
|
if required.nil?
|
|
1467
|
-
|
|
1598
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1468
1599
|
end
|
|
1469
1600
|
|
|
1470
1601
|
api_params = {
|
|
@@ -1475,7 +1606,7 @@ module Appwrite
|
|
|
1475
1606
|
default: default,
|
|
1476
1607
|
array: array,
|
|
1477
1608
|
}
|
|
1478
|
-
|
|
1609
|
+
|
|
1479
1610
|
api_headers = {
|
|
1480
1611
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1481
1612
|
"content-type": 'application/json',
|
|
@@ -1489,7 +1620,6 @@ module Appwrite
|
|
|
1489
1620
|
params: api_params,
|
|
1490
1621
|
response_type: Models::AttributeInteger
|
|
1491
1622
|
)
|
|
1492
|
-
|
|
1493
1623
|
end
|
|
1494
1624
|
|
|
1495
1625
|
#
|
|
@@ -1497,7 +1627,7 @@ module Appwrite
|
|
|
1497
1627
|
#
|
|
1498
1628
|
# Update an integer attribute. Changing the `default` value will not update
|
|
1499
1629
|
# already existing documents.
|
|
1500
|
-
#
|
|
1630
|
+
#
|
|
1501
1631
|
#
|
|
1502
1632
|
# @param [String] database_id Database ID.
|
|
1503
1633
|
# @param [String] collection_id Collection ID.
|
|
@@ -1509,30 +1639,39 @@ module Appwrite
|
|
|
1509
1639
|
# @param [String] new_key New Attribute Key.
|
|
1510
1640
|
#
|
|
1511
1641
|
# @return [AttributeInteger]
|
|
1512
|
-
def update_integer_attribute(
|
|
1642
|
+
def update_integer_attribute(
|
|
1643
|
+
database_id:,
|
|
1644
|
+
collection_id:,
|
|
1645
|
+
key:,
|
|
1646
|
+
required:,
|
|
1647
|
+
default:,
|
|
1648
|
+
min: nil,
|
|
1649
|
+
max: nil,
|
|
1650
|
+
new_key: nil
|
|
1651
|
+
)
|
|
1513
1652
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'
|
|
1514
1653
|
.gsub('{databaseId}', database_id)
|
|
1515
1654
|
.gsub('{collectionId}', collection_id)
|
|
1516
1655
|
.gsub('{key}', key)
|
|
1517
1656
|
|
|
1518
1657
|
if database_id.nil?
|
|
1519
|
-
|
|
1658
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1520
1659
|
end
|
|
1521
1660
|
|
|
1522
1661
|
if collection_id.nil?
|
|
1523
|
-
|
|
1662
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1524
1663
|
end
|
|
1525
1664
|
|
|
1526
1665
|
if key.nil?
|
|
1527
|
-
|
|
1666
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1528
1667
|
end
|
|
1529
1668
|
|
|
1530
1669
|
if required.nil?
|
|
1531
|
-
|
|
1670
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1532
1671
|
end
|
|
1533
1672
|
|
|
1534
1673
|
if default.nil?
|
|
1535
|
-
|
|
1674
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1536
1675
|
end
|
|
1537
1676
|
|
|
1538
1677
|
api_params = {
|
|
@@ -1542,7 +1681,7 @@ module Appwrite
|
|
|
1542
1681
|
default: default,
|
|
1543
1682
|
newKey: new_key,
|
|
1544
1683
|
}
|
|
1545
|
-
|
|
1684
|
+
|
|
1546
1685
|
api_headers = {
|
|
1547
1686
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1548
1687
|
"content-type": 'application/json',
|
|
@@ -1556,14 +1695,13 @@ module Appwrite
|
|
|
1556
1695
|
params: api_params,
|
|
1557
1696
|
response_type: Models::AttributeInteger
|
|
1558
1697
|
)
|
|
1559
|
-
|
|
1560
1698
|
end
|
|
1561
1699
|
|
|
1562
1700
|
#
|
|
1563
1701
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.
|
|
1564
1702
|
#
|
|
1565
1703
|
# Create IP address attribute.
|
|
1566
|
-
#
|
|
1704
|
+
#
|
|
1567
1705
|
#
|
|
1568
1706
|
# @param [String] database_id Database ID.
|
|
1569
1707
|
# @param [String] collection_id Collection ID.
|
|
@@ -1573,25 +1711,32 @@ module Appwrite
|
|
|
1573
1711
|
# @param [] array Is attribute an array?
|
|
1574
1712
|
#
|
|
1575
1713
|
# @return [AttributeIp]
|
|
1576
|
-
def create_ip_attribute(
|
|
1714
|
+
def create_ip_attribute(
|
|
1715
|
+
database_id:,
|
|
1716
|
+
collection_id:,
|
|
1717
|
+
key:,
|
|
1718
|
+
required:,
|
|
1719
|
+
default: nil,
|
|
1720
|
+
array: nil
|
|
1721
|
+
)
|
|
1577
1722
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'
|
|
1578
1723
|
.gsub('{databaseId}', database_id)
|
|
1579
1724
|
.gsub('{collectionId}', collection_id)
|
|
1580
1725
|
|
|
1581
1726
|
if database_id.nil?
|
|
1582
|
-
|
|
1727
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1583
1728
|
end
|
|
1584
1729
|
|
|
1585
1730
|
if collection_id.nil?
|
|
1586
|
-
|
|
1731
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1587
1732
|
end
|
|
1588
1733
|
|
|
1589
1734
|
if key.nil?
|
|
1590
|
-
|
|
1735
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1591
1736
|
end
|
|
1592
1737
|
|
|
1593
1738
|
if required.nil?
|
|
1594
|
-
|
|
1739
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1595
1740
|
end
|
|
1596
1741
|
|
|
1597
1742
|
api_params = {
|
|
@@ -1600,7 +1745,7 @@ module Appwrite
|
|
|
1600
1745
|
default: default,
|
|
1601
1746
|
array: array,
|
|
1602
1747
|
}
|
|
1603
|
-
|
|
1748
|
+
|
|
1604
1749
|
api_headers = {
|
|
1605
1750
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1606
1751
|
"content-type": 'application/json',
|
|
@@ -1614,7 +1759,6 @@ module Appwrite
|
|
|
1614
1759
|
params: api_params,
|
|
1615
1760
|
response_type: Models::AttributeIp
|
|
1616
1761
|
)
|
|
1617
|
-
|
|
1618
1762
|
end
|
|
1619
1763
|
|
|
1620
1764
|
#
|
|
@@ -1622,7 +1766,7 @@ module Appwrite
|
|
|
1622
1766
|
#
|
|
1623
1767
|
# Update an ip attribute. Changing the `default` value will not update
|
|
1624
1768
|
# already existing documents.
|
|
1625
|
-
#
|
|
1769
|
+
#
|
|
1626
1770
|
#
|
|
1627
1771
|
# @param [String] database_id Database ID.
|
|
1628
1772
|
# @param [String] collection_id Collection ID.
|
|
@@ -1632,30 +1776,37 @@ module Appwrite
|
|
|
1632
1776
|
# @param [String] new_key New Attribute Key.
|
|
1633
1777
|
#
|
|
1634
1778
|
# @return [AttributeIp]
|
|
1635
|
-
def update_ip_attribute(
|
|
1779
|
+
def update_ip_attribute(
|
|
1780
|
+
database_id:,
|
|
1781
|
+
collection_id:,
|
|
1782
|
+
key:,
|
|
1783
|
+
required:,
|
|
1784
|
+
default:,
|
|
1785
|
+
new_key: nil
|
|
1786
|
+
)
|
|
1636
1787
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'
|
|
1637
1788
|
.gsub('{databaseId}', database_id)
|
|
1638
1789
|
.gsub('{collectionId}', collection_id)
|
|
1639
1790
|
.gsub('{key}', key)
|
|
1640
1791
|
|
|
1641
1792
|
if database_id.nil?
|
|
1642
|
-
|
|
1793
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1643
1794
|
end
|
|
1644
1795
|
|
|
1645
1796
|
if collection_id.nil?
|
|
1646
|
-
|
|
1797
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1647
1798
|
end
|
|
1648
1799
|
|
|
1649
1800
|
if key.nil?
|
|
1650
|
-
|
|
1801
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1651
1802
|
end
|
|
1652
1803
|
|
|
1653
1804
|
if required.nil?
|
|
1654
|
-
|
|
1805
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1655
1806
|
end
|
|
1656
1807
|
|
|
1657
1808
|
if default.nil?
|
|
1658
|
-
|
|
1809
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1659
1810
|
end
|
|
1660
1811
|
|
|
1661
1812
|
api_params = {
|
|
@@ -1663,7 +1814,7 @@ module Appwrite
|
|
|
1663
1814
|
default: default,
|
|
1664
1815
|
newKey: new_key,
|
|
1665
1816
|
}
|
|
1666
|
-
|
|
1817
|
+
|
|
1667
1818
|
api_headers = {
|
|
1668
1819
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1669
1820
|
"content-type": 'application/json',
|
|
@@ -1677,7 +1828,6 @@ module Appwrite
|
|
|
1677
1828
|
params: api_params,
|
|
1678
1829
|
response_type: Models::AttributeIp
|
|
1679
1830
|
)
|
|
1680
|
-
|
|
1681
1831
|
end
|
|
1682
1832
|
|
|
1683
1833
|
#
|
|
@@ -1692,25 +1842,31 @@ module Appwrite
|
|
|
1692
1842
|
# @param [Array] default Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
|
|
1693
1843
|
#
|
|
1694
1844
|
# @return [AttributeLine]
|
|
1695
|
-
def create_line_attribute(
|
|
1845
|
+
def create_line_attribute(
|
|
1846
|
+
database_id:,
|
|
1847
|
+
collection_id:,
|
|
1848
|
+
key:,
|
|
1849
|
+
required:,
|
|
1850
|
+
default: nil
|
|
1851
|
+
)
|
|
1696
1852
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line'
|
|
1697
1853
|
.gsub('{databaseId}', database_id)
|
|
1698
1854
|
.gsub('{collectionId}', collection_id)
|
|
1699
1855
|
|
|
1700
1856
|
if database_id.nil?
|
|
1701
|
-
|
|
1857
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1702
1858
|
end
|
|
1703
1859
|
|
|
1704
1860
|
if collection_id.nil?
|
|
1705
|
-
|
|
1861
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1706
1862
|
end
|
|
1707
1863
|
|
|
1708
1864
|
if key.nil?
|
|
1709
|
-
|
|
1865
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1710
1866
|
end
|
|
1711
1867
|
|
|
1712
1868
|
if required.nil?
|
|
1713
|
-
|
|
1869
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1714
1870
|
end
|
|
1715
1871
|
|
|
1716
1872
|
api_params = {
|
|
@@ -1718,7 +1874,7 @@ module Appwrite
|
|
|
1718
1874
|
required: required,
|
|
1719
1875
|
default: default,
|
|
1720
1876
|
}
|
|
1721
|
-
|
|
1877
|
+
|
|
1722
1878
|
api_headers = {
|
|
1723
1879
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1724
1880
|
"content-type": 'application/json',
|
|
@@ -1732,7 +1888,6 @@ module Appwrite
|
|
|
1732
1888
|
params: api_params,
|
|
1733
1889
|
response_type: Models::AttributeLine
|
|
1734
1890
|
)
|
|
1735
|
-
|
|
1736
1891
|
end
|
|
1737
1892
|
|
|
1738
1893
|
#
|
|
@@ -1749,26 +1904,33 @@ module Appwrite
|
|
|
1749
1904
|
# @param [String] new_key New attribute key.
|
|
1750
1905
|
#
|
|
1751
1906
|
# @return [AttributeLine]
|
|
1752
|
-
def update_line_attribute(
|
|
1907
|
+
def update_line_attribute(
|
|
1908
|
+
database_id:,
|
|
1909
|
+
collection_id:,
|
|
1910
|
+
key:,
|
|
1911
|
+
required:,
|
|
1912
|
+
default: nil,
|
|
1913
|
+
new_key: nil
|
|
1914
|
+
)
|
|
1753
1915
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'
|
|
1754
1916
|
.gsub('{databaseId}', database_id)
|
|
1755
1917
|
.gsub('{collectionId}', collection_id)
|
|
1756
1918
|
.gsub('{key}', key)
|
|
1757
1919
|
|
|
1758
1920
|
if database_id.nil?
|
|
1759
|
-
|
|
1921
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1760
1922
|
end
|
|
1761
1923
|
|
|
1762
1924
|
if collection_id.nil?
|
|
1763
|
-
|
|
1925
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1764
1926
|
end
|
|
1765
1927
|
|
|
1766
1928
|
if key.nil?
|
|
1767
|
-
|
|
1929
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1768
1930
|
end
|
|
1769
1931
|
|
|
1770
1932
|
if required.nil?
|
|
1771
|
-
|
|
1933
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1772
1934
|
end
|
|
1773
1935
|
|
|
1774
1936
|
api_params = {
|
|
@@ -1776,7 +1938,7 @@ module Appwrite
|
|
|
1776
1938
|
default: default,
|
|
1777
1939
|
newKey: new_key,
|
|
1778
1940
|
}
|
|
1779
|
-
|
|
1941
|
+
|
|
1780
1942
|
api_headers = {
|
|
1781
1943
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1782
1944
|
"content-type": 'application/json',
|
|
@@ -1790,14 +1952,13 @@ module Appwrite
|
|
|
1790
1952
|
params: api_params,
|
|
1791
1953
|
response_type: Models::AttributeLine
|
|
1792
1954
|
)
|
|
1793
|
-
|
|
1794
1955
|
end
|
|
1795
1956
|
|
|
1796
1957
|
#
|
|
1797
1958
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLongtextColumn` instead.
|
|
1798
1959
|
#
|
|
1799
1960
|
# Create a longtext attribute.
|
|
1800
|
-
#
|
|
1961
|
+
#
|
|
1801
1962
|
#
|
|
1802
1963
|
# @param [String] database_id Database ID.
|
|
1803
1964
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -1808,25 +1969,33 @@ module Appwrite
|
|
|
1808
1969
|
# @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1809
1970
|
#
|
|
1810
1971
|
# @return [AttributeLongtext]
|
|
1811
|
-
def create_longtext_attribute(
|
|
1972
|
+
def create_longtext_attribute(
|
|
1973
|
+
database_id:,
|
|
1974
|
+
collection_id:,
|
|
1975
|
+
key:,
|
|
1976
|
+
required:,
|
|
1977
|
+
default: nil,
|
|
1978
|
+
array: nil,
|
|
1979
|
+
encrypt: nil
|
|
1980
|
+
)
|
|
1812
1981
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'
|
|
1813
1982
|
.gsub('{databaseId}', database_id)
|
|
1814
1983
|
.gsub('{collectionId}', collection_id)
|
|
1815
1984
|
|
|
1816
1985
|
if database_id.nil?
|
|
1817
|
-
|
|
1986
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1818
1987
|
end
|
|
1819
1988
|
|
|
1820
1989
|
if collection_id.nil?
|
|
1821
|
-
|
|
1990
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1822
1991
|
end
|
|
1823
1992
|
|
|
1824
1993
|
if key.nil?
|
|
1825
|
-
|
|
1994
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1826
1995
|
end
|
|
1827
1996
|
|
|
1828
1997
|
if required.nil?
|
|
1829
|
-
|
|
1998
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1830
1999
|
end
|
|
1831
2000
|
|
|
1832
2001
|
api_params = {
|
|
@@ -1836,7 +2005,7 @@ module Appwrite
|
|
|
1836
2005
|
array: array,
|
|
1837
2006
|
encrypt: encrypt,
|
|
1838
2007
|
}
|
|
1839
|
-
|
|
2008
|
+
|
|
1840
2009
|
api_headers = {
|
|
1841
2010
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1842
2011
|
"content-type": 'application/json',
|
|
@@ -1850,7 +2019,6 @@ module Appwrite
|
|
|
1850
2019
|
params: api_params,
|
|
1851
2020
|
response_type: Models::AttributeLongtext
|
|
1852
2021
|
)
|
|
1853
|
-
|
|
1854
2022
|
end
|
|
1855
2023
|
|
|
1856
2024
|
#
|
|
@@ -1858,7 +2026,7 @@ module Appwrite
|
|
|
1858
2026
|
#
|
|
1859
2027
|
# Update a longtext attribute. Changing the `default` value will not update
|
|
1860
2028
|
# already existing documents.
|
|
1861
|
-
#
|
|
2029
|
+
#
|
|
1862
2030
|
#
|
|
1863
2031
|
# @param [String] database_id Database ID.
|
|
1864
2032
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -1868,30 +2036,37 @@ module Appwrite
|
|
|
1868
2036
|
# @param [String] new_key New Attribute Key.
|
|
1869
2037
|
#
|
|
1870
2038
|
# @return [AttributeLongtext]
|
|
1871
|
-
def update_longtext_attribute(
|
|
2039
|
+
def update_longtext_attribute(
|
|
2040
|
+
database_id:,
|
|
2041
|
+
collection_id:,
|
|
2042
|
+
key:,
|
|
2043
|
+
required:,
|
|
2044
|
+
default:,
|
|
2045
|
+
new_key: nil
|
|
2046
|
+
)
|
|
1872
2047
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'
|
|
1873
2048
|
.gsub('{databaseId}', database_id)
|
|
1874
2049
|
.gsub('{collectionId}', collection_id)
|
|
1875
2050
|
.gsub('{key}', key)
|
|
1876
2051
|
|
|
1877
2052
|
if database_id.nil?
|
|
1878
|
-
|
|
2053
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1879
2054
|
end
|
|
1880
2055
|
|
|
1881
2056
|
if collection_id.nil?
|
|
1882
|
-
|
|
2057
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1883
2058
|
end
|
|
1884
2059
|
|
|
1885
2060
|
if key.nil?
|
|
1886
|
-
|
|
2061
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1887
2062
|
end
|
|
1888
2063
|
|
|
1889
2064
|
if required.nil?
|
|
1890
|
-
|
|
2065
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1891
2066
|
end
|
|
1892
2067
|
|
|
1893
2068
|
if default.nil?
|
|
1894
|
-
|
|
2069
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1895
2070
|
end
|
|
1896
2071
|
|
|
1897
2072
|
api_params = {
|
|
@@ -1899,7 +2074,7 @@ module Appwrite
|
|
|
1899
2074
|
default: default,
|
|
1900
2075
|
newKey: new_key,
|
|
1901
2076
|
}
|
|
1902
|
-
|
|
2077
|
+
|
|
1903
2078
|
api_headers = {
|
|
1904
2079
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1905
2080
|
"content-type": 'application/json',
|
|
@@ -1913,14 +2088,13 @@ module Appwrite
|
|
|
1913
2088
|
params: api_params,
|
|
1914
2089
|
response_type: Models::AttributeLongtext
|
|
1915
2090
|
)
|
|
1916
|
-
|
|
1917
2091
|
end
|
|
1918
2092
|
|
|
1919
2093
|
#
|
|
1920
2094
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createMediumtextColumn` instead.
|
|
1921
2095
|
#
|
|
1922
2096
|
# Create a mediumtext attribute.
|
|
1923
|
-
#
|
|
2097
|
+
#
|
|
1924
2098
|
#
|
|
1925
2099
|
# @param [String] database_id Database ID.
|
|
1926
2100
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -1931,25 +2105,33 @@ module Appwrite
|
|
|
1931
2105
|
# @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
1932
2106
|
#
|
|
1933
2107
|
# @return [AttributeMediumtext]
|
|
1934
|
-
def create_mediumtext_attribute(
|
|
2108
|
+
def create_mediumtext_attribute(
|
|
2109
|
+
database_id:,
|
|
2110
|
+
collection_id:,
|
|
2111
|
+
key:,
|
|
2112
|
+
required:,
|
|
2113
|
+
default: nil,
|
|
2114
|
+
array: nil,
|
|
2115
|
+
encrypt: nil
|
|
2116
|
+
)
|
|
1935
2117
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'
|
|
1936
2118
|
.gsub('{databaseId}', database_id)
|
|
1937
2119
|
.gsub('{collectionId}', collection_id)
|
|
1938
2120
|
|
|
1939
2121
|
if database_id.nil?
|
|
1940
|
-
|
|
2122
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1941
2123
|
end
|
|
1942
2124
|
|
|
1943
2125
|
if collection_id.nil?
|
|
1944
|
-
|
|
2126
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1945
2127
|
end
|
|
1946
2128
|
|
|
1947
2129
|
if key.nil?
|
|
1948
|
-
|
|
2130
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1949
2131
|
end
|
|
1950
2132
|
|
|
1951
2133
|
if required.nil?
|
|
1952
|
-
|
|
2134
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1953
2135
|
end
|
|
1954
2136
|
|
|
1955
2137
|
api_params = {
|
|
@@ -1959,7 +2141,7 @@ module Appwrite
|
|
|
1959
2141
|
array: array,
|
|
1960
2142
|
encrypt: encrypt,
|
|
1961
2143
|
}
|
|
1962
|
-
|
|
2144
|
+
|
|
1963
2145
|
api_headers = {
|
|
1964
2146
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1965
2147
|
"content-type": 'application/json',
|
|
@@ -1973,7 +2155,6 @@ module Appwrite
|
|
|
1973
2155
|
params: api_params,
|
|
1974
2156
|
response_type: Models::AttributeMediumtext
|
|
1975
2157
|
)
|
|
1976
|
-
|
|
1977
2158
|
end
|
|
1978
2159
|
|
|
1979
2160
|
#
|
|
@@ -1981,7 +2162,7 @@ module Appwrite
|
|
|
1981
2162
|
#
|
|
1982
2163
|
# Update a mediumtext attribute. Changing the `default` value will not update
|
|
1983
2164
|
# already existing documents.
|
|
1984
|
-
#
|
|
2165
|
+
#
|
|
1985
2166
|
#
|
|
1986
2167
|
# @param [String] database_id Database ID.
|
|
1987
2168
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -1991,30 +2172,37 @@ module Appwrite
|
|
|
1991
2172
|
# @param [String] new_key New Attribute Key.
|
|
1992
2173
|
#
|
|
1993
2174
|
# @return [AttributeMediumtext]
|
|
1994
|
-
def update_mediumtext_attribute(
|
|
2175
|
+
def update_mediumtext_attribute(
|
|
2176
|
+
database_id:,
|
|
2177
|
+
collection_id:,
|
|
2178
|
+
key:,
|
|
2179
|
+
required:,
|
|
2180
|
+
default:,
|
|
2181
|
+
new_key: nil
|
|
2182
|
+
)
|
|
1995
2183
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'
|
|
1996
2184
|
.gsub('{databaseId}', database_id)
|
|
1997
2185
|
.gsub('{collectionId}', collection_id)
|
|
1998
2186
|
.gsub('{key}', key)
|
|
1999
2187
|
|
|
2000
2188
|
if database_id.nil?
|
|
2001
|
-
|
|
2189
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2002
2190
|
end
|
|
2003
2191
|
|
|
2004
2192
|
if collection_id.nil?
|
|
2005
|
-
|
|
2193
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2006
2194
|
end
|
|
2007
2195
|
|
|
2008
2196
|
if key.nil?
|
|
2009
|
-
|
|
2197
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2010
2198
|
end
|
|
2011
2199
|
|
|
2012
2200
|
if required.nil?
|
|
2013
|
-
|
|
2201
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2014
2202
|
end
|
|
2015
2203
|
|
|
2016
2204
|
if default.nil?
|
|
2017
|
-
|
|
2205
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2018
2206
|
end
|
|
2019
2207
|
|
|
2020
2208
|
api_params = {
|
|
@@ -2022,7 +2210,7 @@ module Appwrite
|
|
|
2022
2210
|
default: default,
|
|
2023
2211
|
newKey: new_key,
|
|
2024
2212
|
}
|
|
2025
|
-
|
|
2213
|
+
|
|
2026
2214
|
api_headers = {
|
|
2027
2215
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2028
2216
|
"content-type": 'application/json',
|
|
@@ -2036,7 +2224,6 @@ module Appwrite
|
|
|
2036
2224
|
params: api_params,
|
|
2037
2225
|
response_type: Models::AttributeMediumtext
|
|
2038
2226
|
)
|
|
2039
|
-
|
|
2040
2227
|
end
|
|
2041
2228
|
|
|
2042
2229
|
#
|
|
@@ -2051,25 +2238,31 @@ module Appwrite
|
|
|
2051
2238
|
# @param [Array] default Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
|
|
2052
2239
|
#
|
|
2053
2240
|
# @return [AttributePoint]
|
|
2054
|
-
def create_point_attribute(
|
|
2241
|
+
def create_point_attribute(
|
|
2242
|
+
database_id:,
|
|
2243
|
+
collection_id:,
|
|
2244
|
+
key:,
|
|
2245
|
+
required:,
|
|
2246
|
+
default: nil
|
|
2247
|
+
)
|
|
2055
2248
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point'
|
|
2056
2249
|
.gsub('{databaseId}', database_id)
|
|
2057
2250
|
.gsub('{collectionId}', collection_id)
|
|
2058
2251
|
|
|
2059
2252
|
if database_id.nil?
|
|
2060
|
-
|
|
2253
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2061
2254
|
end
|
|
2062
2255
|
|
|
2063
2256
|
if collection_id.nil?
|
|
2064
|
-
|
|
2257
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2065
2258
|
end
|
|
2066
2259
|
|
|
2067
2260
|
if key.nil?
|
|
2068
|
-
|
|
2261
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2069
2262
|
end
|
|
2070
2263
|
|
|
2071
2264
|
if required.nil?
|
|
2072
|
-
|
|
2265
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2073
2266
|
end
|
|
2074
2267
|
|
|
2075
2268
|
api_params = {
|
|
@@ -2077,7 +2270,7 @@ module Appwrite
|
|
|
2077
2270
|
required: required,
|
|
2078
2271
|
default: default,
|
|
2079
2272
|
}
|
|
2080
|
-
|
|
2273
|
+
|
|
2081
2274
|
api_headers = {
|
|
2082
2275
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2083
2276
|
"content-type": 'application/json',
|
|
@@ -2091,7 +2284,6 @@ module Appwrite
|
|
|
2091
2284
|
params: api_params,
|
|
2092
2285
|
response_type: Models::AttributePoint
|
|
2093
2286
|
)
|
|
2094
|
-
|
|
2095
2287
|
end
|
|
2096
2288
|
|
|
2097
2289
|
#
|
|
@@ -2108,26 +2300,33 @@ module Appwrite
|
|
|
2108
2300
|
# @param [String] new_key New attribute key.
|
|
2109
2301
|
#
|
|
2110
2302
|
# @return [AttributePoint]
|
|
2111
|
-
def update_point_attribute(
|
|
2303
|
+
def update_point_attribute(
|
|
2304
|
+
database_id:,
|
|
2305
|
+
collection_id:,
|
|
2306
|
+
key:,
|
|
2307
|
+
required:,
|
|
2308
|
+
default: nil,
|
|
2309
|
+
new_key: nil
|
|
2310
|
+
)
|
|
2112
2311
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'
|
|
2113
2312
|
.gsub('{databaseId}', database_id)
|
|
2114
2313
|
.gsub('{collectionId}', collection_id)
|
|
2115
2314
|
.gsub('{key}', key)
|
|
2116
2315
|
|
|
2117
2316
|
if database_id.nil?
|
|
2118
|
-
|
|
2317
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2119
2318
|
end
|
|
2120
2319
|
|
|
2121
2320
|
if collection_id.nil?
|
|
2122
|
-
|
|
2321
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2123
2322
|
end
|
|
2124
2323
|
|
|
2125
2324
|
if key.nil?
|
|
2126
|
-
|
|
2325
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2127
2326
|
end
|
|
2128
2327
|
|
|
2129
2328
|
if required.nil?
|
|
2130
|
-
|
|
2329
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2131
2330
|
end
|
|
2132
2331
|
|
|
2133
2332
|
api_params = {
|
|
@@ -2135,7 +2334,7 @@ module Appwrite
|
|
|
2135
2334
|
default: default,
|
|
2136
2335
|
newKey: new_key,
|
|
2137
2336
|
}
|
|
2138
|
-
|
|
2337
|
+
|
|
2139
2338
|
api_headers = {
|
|
2140
2339
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2141
2340
|
"content-type": 'application/json',
|
|
@@ -2149,7 +2348,6 @@ module Appwrite
|
|
|
2149
2348
|
params: api_params,
|
|
2150
2349
|
response_type: Models::AttributePoint
|
|
2151
2350
|
)
|
|
2152
|
-
|
|
2153
2351
|
end
|
|
2154
2352
|
|
|
2155
2353
|
#
|
|
@@ -2164,25 +2362,31 @@ module Appwrite
|
|
|
2164
2362
|
# @param [Array] default Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
|
|
2165
2363
|
#
|
|
2166
2364
|
# @return [AttributePolygon]
|
|
2167
|
-
def create_polygon_attribute(
|
|
2365
|
+
def create_polygon_attribute(
|
|
2366
|
+
database_id:,
|
|
2367
|
+
collection_id:,
|
|
2368
|
+
key:,
|
|
2369
|
+
required:,
|
|
2370
|
+
default: nil
|
|
2371
|
+
)
|
|
2168
2372
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'
|
|
2169
2373
|
.gsub('{databaseId}', database_id)
|
|
2170
2374
|
.gsub('{collectionId}', collection_id)
|
|
2171
2375
|
|
|
2172
2376
|
if database_id.nil?
|
|
2173
|
-
|
|
2377
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2174
2378
|
end
|
|
2175
2379
|
|
|
2176
2380
|
if collection_id.nil?
|
|
2177
|
-
|
|
2381
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2178
2382
|
end
|
|
2179
2383
|
|
|
2180
2384
|
if key.nil?
|
|
2181
|
-
|
|
2385
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2182
2386
|
end
|
|
2183
2387
|
|
|
2184
2388
|
if required.nil?
|
|
2185
|
-
|
|
2389
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2186
2390
|
end
|
|
2187
2391
|
|
|
2188
2392
|
api_params = {
|
|
@@ -2190,7 +2394,7 @@ module Appwrite
|
|
|
2190
2394
|
required: required,
|
|
2191
2395
|
default: default,
|
|
2192
2396
|
}
|
|
2193
|
-
|
|
2397
|
+
|
|
2194
2398
|
api_headers = {
|
|
2195
2399
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2196
2400
|
"content-type": 'application/json',
|
|
@@ -2204,7 +2408,6 @@ module Appwrite
|
|
|
2204
2408
|
params: api_params,
|
|
2205
2409
|
response_type: Models::AttributePolygon
|
|
2206
2410
|
)
|
|
2207
|
-
|
|
2208
2411
|
end
|
|
2209
2412
|
|
|
2210
2413
|
#
|
|
@@ -2221,26 +2424,33 @@ module Appwrite
|
|
|
2221
2424
|
# @param [String] new_key New attribute key.
|
|
2222
2425
|
#
|
|
2223
2426
|
# @return [AttributePolygon]
|
|
2224
|
-
def update_polygon_attribute(
|
|
2427
|
+
def update_polygon_attribute(
|
|
2428
|
+
database_id:,
|
|
2429
|
+
collection_id:,
|
|
2430
|
+
key:,
|
|
2431
|
+
required:,
|
|
2432
|
+
default: nil,
|
|
2433
|
+
new_key: nil
|
|
2434
|
+
)
|
|
2225
2435
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'
|
|
2226
2436
|
.gsub('{databaseId}', database_id)
|
|
2227
2437
|
.gsub('{collectionId}', collection_id)
|
|
2228
2438
|
.gsub('{key}', key)
|
|
2229
2439
|
|
|
2230
2440
|
if database_id.nil?
|
|
2231
|
-
|
|
2441
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2232
2442
|
end
|
|
2233
2443
|
|
|
2234
2444
|
if collection_id.nil?
|
|
2235
|
-
|
|
2445
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2236
2446
|
end
|
|
2237
2447
|
|
|
2238
2448
|
if key.nil?
|
|
2239
|
-
|
|
2449
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2240
2450
|
end
|
|
2241
2451
|
|
|
2242
2452
|
if required.nil?
|
|
2243
|
-
|
|
2453
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2244
2454
|
end
|
|
2245
2455
|
|
|
2246
2456
|
api_params = {
|
|
@@ -2248,7 +2458,7 @@ module Appwrite
|
|
|
2248
2458
|
default: default,
|
|
2249
2459
|
newKey: new_key,
|
|
2250
2460
|
}
|
|
2251
|
-
|
|
2461
|
+
|
|
2252
2462
|
api_headers = {
|
|
2253
2463
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2254
2464
|
"content-type": 'application/json',
|
|
@@ -2262,7 +2472,6 @@ module Appwrite
|
|
|
2262
2472
|
params: api_params,
|
|
2263
2473
|
response_type: Models::AttributePolygon
|
|
2264
2474
|
)
|
|
2265
|
-
|
|
2266
2475
|
end
|
|
2267
2476
|
|
|
2268
2477
|
#
|
|
@@ -2270,7 +2479,7 @@ module Appwrite
|
|
|
2270
2479
|
#
|
|
2271
2480
|
# Create relationship attribute. [Learn more about relationship
|
|
2272
2481
|
# attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
2273
|
-
#
|
|
2482
|
+
#
|
|
2274
2483
|
#
|
|
2275
2484
|
# @param [String] database_id Database ID.
|
|
2276
2485
|
# @param [String] collection_id Collection ID.
|
|
@@ -2282,25 +2491,34 @@ module Appwrite
|
|
|
2282
2491
|
# @param [RelationMutate] on_delete Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2283
2492
|
#
|
|
2284
2493
|
# @return [AttributeRelationship]
|
|
2285
|
-
def create_relationship_attribute(
|
|
2494
|
+
def create_relationship_attribute(
|
|
2495
|
+
database_id:,
|
|
2496
|
+
collection_id:,
|
|
2497
|
+
related_collection_id:,
|
|
2498
|
+
type:,
|
|
2499
|
+
two_way: nil,
|
|
2500
|
+
key: nil,
|
|
2501
|
+
two_way_key: nil,
|
|
2502
|
+
on_delete: nil
|
|
2503
|
+
)
|
|
2286
2504
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'
|
|
2287
2505
|
.gsub('{databaseId}', database_id)
|
|
2288
2506
|
.gsub('{collectionId}', collection_id)
|
|
2289
2507
|
|
|
2290
2508
|
if database_id.nil?
|
|
2291
|
-
|
|
2509
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2292
2510
|
end
|
|
2293
2511
|
|
|
2294
2512
|
if collection_id.nil?
|
|
2295
|
-
|
|
2513
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2296
2514
|
end
|
|
2297
2515
|
|
|
2298
2516
|
if related_collection_id.nil?
|
|
2299
|
-
|
|
2517
|
+
raise Appwrite::Exception.new('Missing required parameter: "relatedCollectionId"')
|
|
2300
2518
|
end
|
|
2301
2519
|
|
|
2302
2520
|
if type.nil?
|
|
2303
|
-
|
|
2521
|
+
raise Appwrite::Exception.new('Missing required parameter: "type"')
|
|
2304
2522
|
end
|
|
2305
2523
|
|
|
2306
2524
|
api_params = {
|
|
@@ -2311,7 +2529,7 @@ module Appwrite
|
|
|
2311
2529
|
twoWayKey: two_way_key,
|
|
2312
2530
|
onDelete: on_delete,
|
|
2313
2531
|
}
|
|
2314
|
-
|
|
2532
|
+
|
|
2315
2533
|
api_headers = {
|
|
2316
2534
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2317
2535
|
"content-type": 'application/json',
|
|
@@ -2325,7 +2543,6 @@ module Appwrite
|
|
|
2325
2543
|
params: api_params,
|
|
2326
2544
|
response_type: Models::AttributeRelationship
|
|
2327
2545
|
)
|
|
2328
|
-
|
|
2329
2546
|
end
|
|
2330
2547
|
|
|
2331
2548
|
#
|
|
@@ -2333,7 +2550,7 @@ module Appwrite
|
|
|
2333
2550
|
#
|
|
2334
2551
|
# Update relationship attribute. [Learn more about relationship
|
|
2335
2552
|
# attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
2336
|
-
#
|
|
2553
|
+
#
|
|
2337
2554
|
#
|
|
2338
2555
|
# @param [String] database_id Database ID.
|
|
2339
2556
|
# @param [String] collection_id Collection ID.
|
|
@@ -2342,29 +2559,35 @@ module Appwrite
|
|
|
2342
2559
|
# @param [String] new_key New Attribute Key.
|
|
2343
2560
|
#
|
|
2344
2561
|
# @return [AttributeRelationship]
|
|
2345
|
-
def update_relationship_attribute(
|
|
2562
|
+
def update_relationship_attribute(
|
|
2563
|
+
database_id:,
|
|
2564
|
+
collection_id:,
|
|
2565
|
+
key:,
|
|
2566
|
+
on_delete: nil,
|
|
2567
|
+
new_key: nil
|
|
2568
|
+
)
|
|
2346
2569
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'
|
|
2347
2570
|
.gsub('{databaseId}', database_id)
|
|
2348
2571
|
.gsub('{collectionId}', collection_id)
|
|
2349
2572
|
.gsub('{key}', key)
|
|
2350
2573
|
|
|
2351
2574
|
if database_id.nil?
|
|
2352
|
-
|
|
2575
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2353
2576
|
end
|
|
2354
2577
|
|
|
2355
2578
|
if collection_id.nil?
|
|
2356
|
-
|
|
2579
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2357
2580
|
end
|
|
2358
2581
|
|
|
2359
2582
|
if key.nil?
|
|
2360
|
-
|
|
2583
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2361
2584
|
end
|
|
2362
2585
|
|
|
2363
2586
|
api_params = {
|
|
2364
2587
|
onDelete: on_delete,
|
|
2365
2588
|
newKey: new_key,
|
|
2366
2589
|
}
|
|
2367
|
-
|
|
2590
|
+
|
|
2368
2591
|
api_headers = {
|
|
2369
2592
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2370
2593
|
"content-type": 'application/json',
|
|
@@ -2378,14 +2601,13 @@ module Appwrite
|
|
|
2378
2601
|
params: api_params,
|
|
2379
2602
|
response_type: Models::AttributeRelationship
|
|
2380
2603
|
)
|
|
2381
|
-
|
|
2382
2604
|
end
|
|
2383
2605
|
|
|
2384
2606
|
#
|
|
2385
2607
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
|
2386
2608
|
#
|
|
2387
2609
|
# Create a string attribute.
|
|
2388
|
-
#
|
|
2610
|
+
#
|
|
2389
2611
|
#
|
|
2390
2612
|
# @param [String] database_id Database ID.
|
|
2391
2613
|
# @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2397,29 +2619,38 @@ module Appwrite
|
|
|
2397
2619
|
# @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2398
2620
|
#
|
|
2399
2621
|
# @return [AttributeString]
|
|
2400
|
-
def create_string_attribute(
|
|
2622
|
+
def create_string_attribute(
|
|
2623
|
+
database_id:,
|
|
2624
|
+
collection_id:,
|
|
2625
|
+
key:,
|
|
2626
|
+
size:,
|
|
2627
|
+
required:,
|
|
2628
|
+
default: nil,
|
|
2629
|
+
array: nil,
|
|
2630
|
+
encrypt: nil
|
|
2631
|
+
)
|
|
2401
2632
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string'
|
|
2402
2633
|
.gsub('{databaseId}', database_id)
|
|
2403
2634
|
.gsub('{collectionId}', collection_id)
|
|
2404
2635
|
|
|
2405
2636
|
if database_id.nil?
|
|
2406
|
-
|
|
2637
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2407
2638
|
end
|
|
2408
2639
|
|
|
2409
2640
|
if collection_id.nil?
|
|
2410
|
-
|
|
2641
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2411
2642
|
end
|
|
2412
2643
|
|
|
2413
2644
|
if key.nil?
|
|
2414
|
-
|
|
2645
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2415
2646
|
end
|
|
2416
2647
|
|
|
2417
2648
|
if size.nil?
|
|
2418
|
-
|
|
2649
|
+
raise Appwrite::Exception.new('Missing required parameter: "size"')
|
|
2419
2650
|
end
|
|
2420
2651
|
|
|
2421
2652
|
if required.nil?
|
|
2422
|
-
|
|
2653
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2423
2654
|
end
|
|
2424
2655
|
|
|
2425
2656
|
api_params = {
|
|
@@ -2430,7 +2661,7 @@ module Appwrite
|
|
|
2430
2661
|
array: array,
|
|
2431
2662
|
encrypt: encrypt,
|
|
2432
2663
|
}
|
|
2433
|
-
|
|
2664
|
+
|
|
2434
2665
|
api_headers = {
|
|
2435
2666
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2436
2667
|
"content-type": 'application/json',
|
|
@@ -2444,7 +2675,6 @@ module Appwrite
|
|
|
2444
2675
|
params: api_params,
|
|
2445
2676
|
response_type: Models::AttributeString
|
|
2446
2677
|
)
|
|
2447
|
-
|
|
2448
2678
|
end
|
|
2449
2679
|
|
|
2450
2680
|
#
|
|
@@ -2452,7 +2682,7 @@ module Appwrite
|
|
|
2452
2682
|
#
|
|
2453
2683
|
# Update a string attribute. Changing the `default` value will not update
|
|
2454
2684
|
# already existing documents.
|
|
2455
|
-
#
|
|
2685
|
+
#
|
|
2456
2686
|
#
|
|
2457
2687
|
# @param [String] database_id Database ID.
|
|
2458
2688
|
# @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2463,30 +2693,38 @@ module Appwrite
|
|
|
2463
2693
|
# @param [String] new_key New Attribute Key.
|
|
2464
2694
|
#
|
|
2465
2695
|
# @return [AttributeString]
|
|
2466
|
-
def update_string_attribute(
|
|
2696
|
+
def update_string_attribute(
|
|
2697
|
+
database_id:,
|
|
2698
|
+
collection_id:,
|
|
2699
|
+
key:,
|
|
2700
|
+
required:,
|
|
2701
|
+
default:,
|
|
2702
|
+
size: nil,
|
|
2703
|
+
new_key: nil
|
|
2704
|
+
)
|
|
2467
2705
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'
|
|
2468
2706
|
.gsub('{databaseId}', database_id)
|
|
2469
2707
|
.gsub('{collectionId}', collection_id)
|
|
2470
2708
|
.gsub('{key}', key)
|
|
2471
2709
|
|
|
2472
2710
|
if database_id.nil?
|
|
2473
|
-
|
|
2711
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2474
2712
|
end
|
|
2475
2713
|
|
|
2476
2714
|
if collection_id.nil?
|
|
2477
|
-
|
|
2715
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2478
2716
|
end
|
|
2479
2717
|
|
|
2480
2718
|
if key.nil?
|
|
2481
|
-
|
|
2719
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2482
2720
|
end
|
|
2483
2721
|
|
|
2484
2722
|
if required.nil?
|
|
2485
|
-
|
|
2723
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2486
2724
|
end
|
|
2487
2725
|
|
|
2488
2726
|
if default.nil?
|
|
2489
|
-
|
|
2727
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2490
2728
|
end
|
|
2491
2729
|
|
|
2492
2730
|
api_params = {
|
|
@@ -2495,7 +2733,7 @@ module Appwrite
|
|
|
2495
2733
|
size: size,
|
|
2496
2734
|
newKey: new_key,
|
|
2497
2735
|
}
|
|
2498
|
-
|
|
2736
|
+
|
|
2499
2737
|
api_headers = {
|
|
2500
2738
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2501
2739
|
"content-type": 'application/json',
|
|
@@ -2509,14 +2747,13 @@ module Appwrite
|
|
|
2509
2747
|
params: api_params,
|
|
2510
2748
|
response_type: Models::AttributeString
|
|
2511
2749
|
)
|
|
2512
|
-
|
|
2513
2750
|
end
|
|
2514
2751
|
|
|
2515
2752
|
#
|
|
2516
2753
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTextColumn` instead.
|
|
2517
2754
|
#
|
|
2518
2755
|
# Create a text attribute.
|
|
2519
|
-
#
|
|
2756
|
+
#
|
|
2520
2757
|
#
|
|
2521
2758
|
# @param [String] database_id Database ID.
|
|
2522
2759
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2527,25 +2764,33 @@ module Appwrite
|
|
|
2527
2764
|
# @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2528
2765
|
#
|
|
2529
2766
|
# @return [AttributeText]
|
|
2530
|
-
def create_text_attribute(
|
|
2767
|
+
def create_text_attribute(
|
|
2768
|
+
database_id:,
|
|
2769
|
+
collection_id:,
|
|
2770
|
+
key:,
|
|
2771
|
+
required:,
|
|
2772
|
+
default: nil,
|
|
2773
|
+
array: nil,
|
|
2774
|
+
encrypt: nil
|
|
2775
|
+
)
|
|
2531
2776
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text'
|
|
2532
2777
|
.gsub('{databaseId}', database_id)
|
|
2533
2778
|
.gsub('{collectionId}', collection_id)
|
|
2534
2779
|
|
|
2535
2780
|
if database_id.nil?
|
|
2536
|
-
|
|
2781
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2537
2782
|
end
|
|
2538
2783
|
|
|
2539
2784
|
if collection_id.nil?
|
|
2540
|
-
|
|
2785
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2541
2786
|
end
|
|
2542
2787
|
|
|
2543
2788
|
if key.nil?
|
|
2544
|
-
|
|
2789
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2545
2790
|
end
|
|
2546
2791
|
|
|
2547
2792
|
if required.nil?
|
|
2548
|
-
|
|
2793
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2549
2794
|
end
|
|
2550
2795
|
|
|
2551
2796
|
api_params = {
|
|
@@ -2555,7 +2800,7 @@ module Appwrite
|
|
|
2555
2800
|
array: array,
|
|
2556
2801
|
encrypt: encrypt,
|
|
2557
2802
|
}
|
|
2558
|
-
|
|
2803
|
+
|
|
2559
2804
|
api_headers = {
|
|
2560
2805
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2561
2806
|
"content-type": 'application/json',
|
|
@@ -2569,7 +2814,6 @@ module Appwrite
|
|
|
2569
2814
|
params: api_params,
|
|
2570
2815
|
response_type: Models::AttributeText
|
|
2571
2816
|
)
|
|
2572
|
-
|
|
2573
2817
|
end
|
|
2574
2818
|
|
|
2575
2819
|
#
|
|
@@ -2577,7 +2821,7 @@ module Appwrite
|
|
|
2577
2821
|
#
|
|
2578
2822
|
# Update a text attribute. Changing the `default` value will not update
|
|
2579
2823
|
# already existing documents.
|
|
2580
|
-
#
|
|
2824
|
+
#
|
|
2581
2825
|
#
|
|
2582
2826
|
# @param [String] database_id Database ID.
|
|
2583
2827
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2587,30 +2831,37 @@ module Appwrite
|
|
|
2587
2831
|
# @param [String] new_key New Attribute Key.
|
|
2588
2832
|
#
|
|
2589
2833
|
# @return [AttributeText]
|
|
2590
|
-
def update_text_attribute(
|
|
2834
|
+
def update_text_attribute(
|
|
2835
|
+
database_id:,
|
|
2836
|
+
collection_id:,
|
|
2837
|
+
key:,
|
|
2838
|
+
required:,
|
|
2839
|
+
default:,
|
|
2840
|
+
new_key: nil
|
|
2841
|
+
)
|
|
2591
2842
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'
|
|
2592
2843
|
.gsub('{databaseId}', database_id)
|
|
2593
2844
|
.gsub('{collectionId}', collection_id)
|
|
2594
2845
|
.gsub('{key}', key)
|
|
2595
2846
|
|
|
2596
2847
|
if database_id.nil?
|
|
2597
|
-
|
|
2848
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2598
2849
|
end
|
|
2599
2850
|
|
|
2600
2851
|
if collection_id.nil?
|
|
2601
|
-
|
|
2852
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2602
2853
|
end
|
|
2603
2854
|
|
|
2604
2855
|
if key.nil?
|
|
2605
|
-
|
|
2856
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2606
2857
|
end
|
|
2607
2858
|
|
|
2608
2859
|
if required.nil?
|
|
2609
|
-
|
|
2860
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2610
2861
|
end
|
|
2611
2862
|
|
|
2612
2863
|
if default.nil?
|
|
2613
|
-
|
|
2864
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2614
2865
|
end
|
|
2615
2866
|
|
|
2616
2867
|
api_params = {
|
|
@@ -2618,7 +2869,7 @@ module Appwrite
|
|
|
2618
2869
|
default: default,
|
|
2619
2870
|
newKey: new_key,
|
|
2620
2871
|
}
|
|
2621
|
-
|
|
2872
|
+
|
|
2622
2873
|
api_headers = {
|
|
2623
2874
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2624
2875
|
"content-type": 'application/json',
|
|
@@ -2632,14 +2883,13 @@ module Appwrite
|
|
|
2632
2883
|
params: api_params,
|
|
2633
2884
|
response_type: Models::AttributeText
|
|
2634
2885
|
)
|
|
2635
|
-
|
|
2636
2886
|
end
|
|
2637
2887
|
|
|
2638
2888
|
#
|
|
2639
2889
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.
|
|
2640
2890
|
#
|
|
2641
2891
|
# Create a URL attribute.
|
|
2642
|
-
#
|
|
2892
|
+
#
|
|
2643
2893
|
#
|
|
2644
2894
|
# @param [String] database_id Database ID.
|
|
2645
2895
|
# @param [String] collection_id Collection ID.
|
|
@@ -2649,25 +2899,32 @@ module Appwrite
|
|
|
2649
2899
|
# @param [] array Is attribute an array?
|
|
2650
2900
|
#
|
|
2651
2901
|
# @return [AttributeUrl]
|
|
2652
|
-
def create_url_attribute(
|
|
2902
|
+
def create_url_attribute(
|
|
2903
|
+
database_id:,
|
|
2904
|
+
collection_id:,
|
|
2905
|
+
key:,
|
|
2906
|
+
required:,
|
|
2907
|
+
default: nil,
|
|
2908
|
+
array: nil
|
|
2909
|
+
)
|
|
2653
2910
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url'
|
|
2654
2911
|
.gsub('{databaseId}', database_id)
|
|
2655
2912
|
.gsub('{collectionId}', collection_id)
|
|
2656
2913
|
|
|
2657
2914
|
if database_id.nil?
|
|
2658
|
-
|
|
2915
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2659
2916
|
end
|
|
2660
2917
|
|
|
2661
2918
|
if collection_id.nil?
|
|
2662
|
-
|
|
2919
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2663
2920
|
end
|
|
2664
2921
|
|
|
2665
2922
|
if key.nil?
|
|
2666
|
-
|
|
2923
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2667
2924
|
end
|
|
2668
2925
|
|
|
2669
2926
|
if required.nil?
|
|
2670
|
-
|
|
2927
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2671
2928
|
end
|
|
2672
2929
|
|
|
2673
2930
|
api_params = {
|
|
@@ -2676,7 +2933,7 @@ module Appwrite
|
|
|
2676
2933
|
default: default,
|
|
2677
2934
|
array: array,
|
|
2678
2935
|
}
|
|
2679
|
-
|
|
2936
|
+
|
|
2680
2937
|
api_headers = {
|
|
2681
2938
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2682
2939
|
"content-type": 'application/json',
|
|
@@ -2690,7 +2947,6 @@ module Appwrite
|
|
|
2690
2947
|
params: api_params,
|
|
2691
2948
|
response_type: Models::AttributeUrl
|
|
2692
2949
|
)
|
|
2693
|
-
|
|
2694
2950
|
end
|
|
2695
2951
|
|
|
2696
2952
|
#
|
|
@@ -2698,7 +2954,7 @@ module Appwrite
|
|
|
2698
2954
|
#
|
|
2699
2955
|
# Update an url attribute. Changing the `default` value will not update
|
|
2700
2956
|
# already existing documents.
|
|
2701
|
-
#
|
|
2957
|
+
#
|
|
2702
2958
|
#
|
|
2703
2959
|
# @param [String] database_id Database ID.
|
|
2704
2960
|
# @param [String] collection_id Collection ID.
|
|
@@ -2708,30 +2964,37 @@ module Appwrite
|
|
|
2708
2964
|
# @param [String] new_key New Attribute Key.
|
|
2709
2965
|
#
|
|
2710
2966
|
# @return [AttributeUrl]
|
|
2711
|
-
def update_url_attribute(
|
|
2967
|
+
def update_url_attribute(
|
|
2968
|
+
database_id:,
|
|
2969
|
+
collection_id:,
|
|
2970
|
+
key:,
|
|
2971
|
+
required:,
|
|
2972
|
+
default:,
|
|
2973
|
+
new_key: nil
|
|
2974
|
+
)
|
|
2712
2975
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'
|
|
2713
2976
|
.gsub('{databaseId}', database_id)
|
|
2714
2977
|
.gsub('{collectionId}', collection_id)
|
|
2715
2978
|
.gsub('{key}', key)
|
|
2716
2979
|
|
|
2717
2980
|
if database_id.nil?
|
|
2718
|
-
|
|
2981
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2719
2982
|
end
|
|
2720
2983
|
|
|
2721
2984
|
if collection_id.nil?
|
|
2722
|
-
|
|
2985
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2723
2986
|
end
|
|
2724
2987
|
|
|
2725
2988
|
if key.nil?
|
|
2726
|
-
|
|
2989
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2727
2990
|
end
|
|
2728
2991
|
|
|
2729
2992
|
if required.nil?
|
|
2730
|
-
|
|
2993
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2731
2994
|
end
|
|
2732
2995
|
|
|
2733
2996
|
if default.nil?
|
|
2734
|
-
|
|
2997
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2735
2998
|
end
|
|
2736
2999
|
|
|
2737
3000
|
api_params = {
|
|
@@ -2739,7 +3002,7 @@ module Appwrite
|
|
|
2739
3002
|
default: default,
|
|
2740
3003
|
newKey: new_key,
|
|
2741
3004
|
}
|
|
2742
|
-
|
|
3005
|
+
|
|
2743
3006
|
api_headers = {
|
|
2744
3007
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2745
3008
|
"content-type": 'application/json',
|
|
@@ -2753,14 +3016,13 @@ module Appwrite
|
|
|
2753
3016
|
params: api_params,
|
|
2754
3017
|
response_type: Models::AttributeUrl
|
|
2755
3018
|
)
|
|
2756
|
-
|
|
2757
3019
|
end
|
|
2758
3020
|
|
|
2759
3021
|
#
|
|
2760
3022
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createVarcharColumn` instead.
|
|
2761
3023
|
#
|
|
2762
3024
|
# Create a varchar attribute.
|
|
2763
|
-
#
|
|
3025
|
+
#
|
|
2764
3026
|
#
|
|
2765
3027
|
# @param [String] database_id Database ID.
|
|
2766
3028
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2772,29 +3034,38 @@ module Appwrite
|
|
|
2772
3034
|
# @param [] encrypt Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2773
3035
|
#
|
|
2774
3036
|
# @return [AttributeVarchar]
|
|
2775
|
-
def create_varchar_attribute(
|
|
3037
|
+
def create_varchar_attribute(
|
|
3038
|
+
database_id:,
|
|
3039
|
+
collection_id:,
|
|
3040
|
+
key:,
|
|
3041
|
+
size:,
|
|
3042
|
+
required:,
|
|
3043
|
+
default: nil,
|
|
3044
|
+
array: nil,
|
|
3045
|
+
encrypt: nil
|
|
3046
|
+
)
|
|
2776
3047
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'
|
|
2777
3048
|
.gsub('{databaseId}', database_id)
|
|
2778
3049
|
.gsub('{collectionId}', collection_id)
|
|
2779
3050
|
|
|
2780
3051
|
if database_id.nil?
|
|
2781
|
-
|
|
3052
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2782
3053
|
end
|
|
2783
3054
|
|
|
2784
3055
|
if collection_id.nil?
|
|
2785
|
-
|
|
3056
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2786
3057
|
end
|
|
2787
3058
|
|
|
2788
3059
|
if key.nil?
|
|
2789
|
-
|
|
3060
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2790
3061
|
end
|
|
2791
3062
|
|
|
2792
3063
|
if size.nil?
|
|
2793
|
-
|
|
3064
|
+
raise Appwrite::Exception.new('Missing required parameter: "size"')
|
|
2794
3065
|
end
|
|
2795
3066
|
|
|
2796
3067
|
if required.nil?
|
|
2797
|
-
|
|
3068
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2798
3069
|
end
|
|
2799
3070
|
|
|
2800
3071
|
api_params = {
|
|
@@ -2805,7 +3076,7 @@ module Appwrite
|
|
|
2805
3076
|
array: array,
|
|
2806
3077
|
encrypt: encrypt,
|
|
2807
3078
|
}
|
|
2808
|
-
|
|
3079
|
+
|
|
2809
3080
|
api_headers = {
|
|
2810
3081
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2811
3082
|
"content-type": 'application/json',
|
|
@@ -2819,7 +3090,6 @@ module Appwrite
|
|
|
2819
3090
|
params: api_params,
|
|
2820
3091
|
response_type: Models::AttributeVarchar
|
|
2821
3092
|
)
|
|
2822
|
-
|
|
2823
3093
|
end
|
|
2824
3094
|
|
|
2825
3095
|
#
|
|
@@ -2827,7 +3097,7 @@ module Appwrite
|
|
|
2827
3097
|
#
|
|
2828
3098
|
# Update a varchar attribute. Changing the `default` value will not update
|
|
2829
3099
|
# already existing documents.
|
|
2830
|
-
#
|
|
3100
|
+
#
|
|
2831
3101
|
#
|
|
2832
3102
|
# @param [String] database_id Database ID.
|
|
2833
3103
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
@@ -2838,30 +3108,38 @@ module Appwrite
|
|
|
2838
3108
|
# @param [String] new_key New Attribute Key.
|
|
2839
3109
|
#
|
|
2840
3110
|
# @return [AttributeVarchar]
|
|
2841
|
-
def update_varchar_attribute(
|
|
3111
|
+
def update_varchar_attribute(
|
|
3112
|
+
database_id:,
|
|
3113
|
+
collection_id:,
|
|
3114
|
+
key:,
|
|
3115
|
+
required:,
|
|
3116
|
+
default:,
|
|
3117
|
+
size: nil,
|
|
3118
|
+
new_key: nil
|
|
3119
|
+
)
|
|
2842
3120
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'
|
|
2843
3121
|
.gsub('{databaseId}', database_id)
|
|
2844
3122
|
.gsub('{collectionId}', collection_id)
|
|
2845
3123
|
.gsub('{key}', key)
|
|
2846
3124
|
|
|
2847
3125
|
if database_id.nil?
|
|
2848
|
-
|
|
3126
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2849
3127
|
end
|
|
2850
3128
|
|
|
2851
3129
|
if collection_id.nil?
|
|
2852
|
-
|
|
3130
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2853
3131
|
end
|
|
2854
3132
|
|
|
2855
3133
|
if key.nil?
|
|
2856
|
-
|
|
3134
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2857
3135
|
end
|
|
2858
3136
|
|
|
2859
3137
|
if required.nil?
|
|
2860
|
-
|
|
3138
|
+
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2861
3139
|
end
|
|
2862
3140
|
|
|
2863
3141
|
if default.nil?
|
|
2864
|
-
|
|
3142
|
+
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2865
3143
|
end
|
|
2866
3144
|
|
|
2867
3145
|
api_params = {
|
|
@@ -2870,7 +3148,7 @@ module Appwrite
|
|
|
2870
3148
|
size: size,
|
|
2871
3149
|
newKey: new_key,
|
|
2872
3150
|
}
|
|
2873
|
-
|
|
3151
|
+
|
|
2874
3152
|
api_headers = {
|
|
2875
3153
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2876
3154
|
"content-type": 'application/json',
|
|
@@ -2884,7 +3162,6 @@ module Appwrite
|
|
|
2884
3162
|
params: api_params,
|
|
2885
3163
|
response_type: Models::AttributeVarchar
|
|
2886
3164
|
)
|
|
2887
|
-
|
|
2888
3165
|
end
|
|
2889
3166
|
|
|
2890
3167
|
#
|
|
@@ -2897,27 +3174,30 @@ module Appwrite
|
|
|
2897
3174
|
# @param [String] key Attribute Key.
|
|
2898
3175
|
#
|
|
2899
3176
|
# @return [AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString]
|
|
2900
|
-
def get_attribute(
|
|
3177
|
+
def get_attribute(
|
|
3178
|
+
database_id:,
|
|
3179
|
+
collection_id:,
|
|
3180
|
+
key:
|
|
3181
|
+
)
|
|
2901
3182
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
|
|
2902
3183
|
.gsub('{databaseId}', database_id)
|
|
2903
3184
|
.gsub('{collectionId}', collection_id)
|
|
2904
3185
|
.gsub('{key}', key)
|
|
2905
3186
|
|
|
2906
3187
|
if database_id.nil?
|
|
2907
|
-
|
|
3188
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2908
3189
|
end
|
|
2909
3190
|
|
|
2910
3191
|
if collection_id.nil?
|
|
2911
|
-
|
|
3192
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2912
3193
|
end
|
|
2913
3194
|
|
|
2914
3195
|
if key.nil?
|
|
2915
|
-
|
|
3196
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2916
3197
|
end
|
|
2917
3198
|
|
|
2918
|
-
api_params = {
|
|
2919
|
-
|
|
2920
|
-
|
|
3199
|
+
api_params = {}
|
|
3200
|
+
|
|
2921
3201
|
api_headers = {
|
|
2922
3202
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2923
3203
|
"accept": 'application/json',
|
|
@@ -2985,7 +3265,6 @@ module Appwrite
|
|
|
2985
3265
|
end
|
|
2986
3266
|
|
|
2987
3267
|
raise Exception, "Unable to match response to any expected response model"
|
|
2988
|
-
|
|
2989
3268
|
end
|
|
2990
3269
|
|
|
2991
3270
|
#
|
|
@@ -2998,27 +3277,30 @@ module Appwrite
|
|
|
2998
3277
|
# @param [String] key Attribute Key.
|
|
2999
3278
|
#
|
|
3000
3279
|
# @return []
|
|
3001
|
-
def delete_attribute(
|
|
3280
|
+
def delete_attribute(
|
|
3281
|
+
database_id:,
|
|
3282
|
+
collection_id:,
|
|
3283
|
+
key:
|
|
3284
|
+
)
|
|
3002
3285
|
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
|
|
3003
3286
|
.gsub('{databaseId}', database_id)
|
|
3004
3287
|
.gsub('{collectionId}', collection_id)
|
|
3005
3288
|
.gsub('{key}', key)
|
|
3006
3289
|
|
|
3007
3290
|
if database_id.nil?
|
|
3008
|
-
|
|
3291
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3009
3292
|
end
|
|
3010
3293
|
|
|
3011
3294
|
if collection_id.nil?
|
|
3012
|
-
|
|
3295
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3013
3296
|
end
|
|
3014
3297
|
|
|
3015
3298
|
if key.nil?
|
|
3016
|
-
|
|
3299
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3017
3300
|
end
|
|
3018
3301
|
|
|
3019
|
-
api_params = {
|
|
3020
|
-
|
|
3021
|
-
|
|
3302
|
+
api_params = {}
|
|
3303
|
+
|
|
3022
3304
|
api_headers = {
|
|
3023
3305
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3024
3306
|
"content-type": 'application/json',
|
|
@@ -3030,13 +3312,12 @@ module Appwrite
|
|
|
3030
3312
|
headers: api_headers,
|
|
3031
3313
|
params: api_params,
|
|
3032
3314
|
)
|
|
3033
|
-
|
|
3034
3315
|
end
|
|
3035
3316
|
|
|
3036
3317
|
#
|
|
3037
3318
|
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
3038
3319
|
#
|
|
3039
|
-
# Get a list of all the user
|
|
3320
|
+
# Get a list of all the user's documents in a given collection. You can use
|
|
3040
3321
|
# the query params to filter your results.
|
|
3041
3322
|
#
|
|
3042
3323
|
# @param [String] database_id Database ID.
|
|
@@ -3047,17 +3328,24 @@ module Appwrite
|
|
|
3047
3328
|
# @param [Integer] ttl TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
|
|
3048
3329
|
#
|
|
3049
3330
|
# @return [DocumentList]
|
|
3050
|
-
def list_documents(
|
|
3331
|
+
def list_documents(
|
|
3332
|
+
database_id:,
|
|
3333
|
+
collection_id:,
|
|
3334
|
+
queries: nil,
|
|
3335
|
+
transaction_id: nil,
|
|
3336
|
+
total: nil,
|
|
3337
|
+
ttl: nil
|
|
3338
|
+
)
|
|
3051
3339
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3052
3340
|
.gsub('{databaseId}', database_id)
|
|
3053
3341
|
.gsub('{collectionId}', collection_id)
|
|
3054
3342
|
|
|
3055
3343
|
if database_id.nil?
|
|
3056
|
-
|
|
3344
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3057
3345
|
end
|
|
3058
3346
|
|
|
3059
3347
|
if collection_id.nil?
|
|
3060
|
-
|
|
3348
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3061
3349
|
end
|
|
3062
3350
|
|
|
3063
3351
|
api_params = {
|
|
@@ -3066,7 +3354,7 @@ module Appwrite
|
|
|
3066
3354
|
total: total,
|
|
3067
3355
|
ttl: ttl,
|
|
3068
3356
|
}
|
|
3069
|
-
|
|
3357
|
+
|
|
3070
3358
|
api_headers = {
|
|
3071
3359
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3072
3360
|
"accept": 'application/json',
|
|
@@ -3079,7 +3367,6 @@ module Appwrite
|
|
|
3079
3367
|
params: api_params,
|
|
3080
3368
|
response_type: Models::DocumentList
|
|
3081
3369
|
)
|
|
3082
|
-
|
|
3083
3370
|
end
|
|
3084
3371
|
|
|
3085
3372
|
#
|
|
@@ -3092,31 +3379,38 @@ module Appwrite
|
|
|
3092
3379
|
#
|
|
3093
3380
|
# @param [String] database_id Database ID.
|
|
3094
3381
|
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
|
|
3095
|
-
# @param [String] document_id Document 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
|
|
3382
|
+
# @param [String] document_id Document 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.
|
|
3096
3383
|
# @param [Hash] data Document data as JSON object.
|
|
3097
3384
|
# @param [Array] permissions An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
3098
3385
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3099
3386
|
#
|
|
3100
3387
|
# @return [Document]
|
|
3101
|
-
def create_document(
|
|
3388
|
+
def create_document(
|
|
3389
|
+
database_id:,
|
|
3390
|
+
collection_id:,
|
|
3391
|
+
document_id:,
|
|
3392
|
+
data:,
|
|
3393
|
+
permissions: nil,
|
|
3394
|
+
transaction_id: nil
|
|
3395
|
+
)
|
|
3102
3396
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3103
3397
|
.gsub('{databaseId}', database_id)
|
|
3104
3398
|
.gsub('{collectionId}', collection_id)
|
|
3105
3399
|
|
|
3106
3400
|
if database_id.nil?
|
|
3107
|
-
|
|
3401
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3108
3402
|
end
|
|
3109
3403
|
|
|
3110
3404
|
if collection_id.nil?
|
|
3111
|
-
|
|
3405
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3112
3406
|
end
|
|
3113
3407
|
|
|
3114
3408
|
if document_id.nil?
|
|
3115
|
-
|
|
3409
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3116
3410
|
end
|
|
3117
3411
|
|
|
3118
3412
|
if data.nil?
|
|
3119
|
-
|
|
3413
|
+
raise Appwrite::Exception.new('Missing required parameter: "data"')
|
|
3120
3414
|
end
|
|
3121
3415
|
|
|
3122
3416
|
api_params = {
|
|
@@ -3125,7 +3419,7 @@ module Appwrite
|
|
|
3125
3419
|
permissions: permissions,
|
|
3126
3420
|
transactionId: transaction_id,
|
|
3127
3421
|
}
|
|
3128
|
-
|
|
3422
|
+
|
|
3129
3423
|
api_headers = {
|
|
3130
3424
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3131
3425
|
"content-type": 'application/json',
|
|
@@ -3139,7 +3433,6 @@ module Appwrite
|
|
|
3139
3433
|
params: api_params,
|
|
3140
3434
|
response_type: Models::Document
|
|
3141
3435
|
)
|
|
3142
|
-
|
|
3143
3436
|
end
|
|
3144
3437
|
|
|
3145
3438
|
#
|
|
@@ -3156,28 +3449,33 @@ module Appwrite
|
|
|
3156
3449
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3157
3450
|
#
|
|
3158
3451
|
# @return [DocumentList]
|
|
3159
|
-
def create_documents(
|
|
3452
|
+
def create_documents(
|
|
3453
|
+
database_id:,
|
|
3454
|
+
collection_id:,
|
|
3455
|
+
documents:,
|
|
3456
|
+
transaction_id: nil
|
|
3457
|
+
)
|
|
3160
3458
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3161
3459
|
.gsub('{databaseId}', database_id)
|
|
3162
3460
|
.gsub('{collectionId}', collection_id)
|
|
3163
3461
|
|
|
3164
3462
|
if database_id.nil?
|
|
3165
|
-
|
|
3463
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3166
3464
|
end
|
|
3167
3465
|
|
|
3168
3466
|
if collection_id.nil?
|
|
3169
|
-
|
|
3467
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3170
3468
|
end
|
|
3171
3469
|
|
|
3172
3470
|
if documents.nil?
|
|
3173
|
-
|
|
3471
|
+
raise Appwrite::Exception.new('Missing required parameter: "documents"')
|
|
3174
3472
|
end
|
|
3175
3473
|
|
|
3176
3474
|
api_params = {
|
|
3177
3475
|
documents: documents,
|
|
3178
3476
|
transactionId: transaction_id,
|
|
3179
3477
|
}
|
|
3180
|
-
|
|
3478
|
+
|
|
3181
3479
|
api_headers = {
|
|
3182
3480
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3183
3481
|
"content-type": 'application/json',
|
|
@@ -3191,7 +3489,6 @@ module Appwrite
|
|
|
3191
3489
|
params: api_params,
|
|
3192
3490
|
response_type: Models::DocumentList
|
|
3193
3491
|
)
|
|
3194
|
-
|
|
3195
3492
|
end
|
|
3196
3493
|
|
|
3197
3494
|
#
|
|
@@ -3201,7 +3498,7 @@ module Appwrite
|
|
|
3201
3498
|
# new collection resource using either a [server
|
|
3202
3499
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
|
3203
3500
|
# API or directly from your database console.
|
|
3204
|
-
#
|
|
3501
|
+
#
|
|
3205
3502
|
#
|
|
3206
3503
|
# @param [String] database_id Database ID.
|
|
3207
3504
|
# @param [String] collection_id Collection ID.
|
|
@@ -3209,28 +3506,33 @@ module Appwrite
|
|
|
3209
3506
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3210
3507
|
#
|
|
3211
3508
|
# @return [DocumentList]
|
|
3212
|
-
def upsert_documents(
|
|
3509
|
+
def upsert_documents(
|
|
3510
|
+
database_id:,
|
|
3511
|
+
collection_id:,
|
|
3512
|
+
documents:,
|
|
3513
|
+
transaction_id: nil
|
|
3514
|
+
)
|
|
3213
3515
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3214
3516
|
.gsub('{databaseId}', database_id)
|
|
3215
3517
|
.gsub('{collectionId}', collection_id)
|
|
3216
3518
|
|
|
3217
3519
|
if database_id.nil?
|
|
3218
|
-
|
|
3520
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3219
3521
|
end
|
|
3220
3522
|
|
|
3221
3523
|
if collection_id.nil?
|
|
3222
|
-
|
|
3524
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3223
3525
|
end
|
|
3224
3526
|
|
|
3225
3527
|
if documents.nil?
|
|
3226
|
-
|
|
3528
|
+
raise Appwrite::Exception.new('Missing required parameter: "documents"')
|
|
3227
3529
|
end
|
|
3228
3530
|
|
|
3229
3531
|
api_params = {
|
|
3230
3532
|
documents: documents,
|
|
3231
3533
|
transactionId: transaction_id,
|
|
3232
3534
|
}
|
|
3233
|
-
|
|
3535
|
+
|
|
3234
3536
|
api_headers = {
|
|
3235
3537
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3236
3538
|
"content-type": 'application/json',
|
|
@@ -3244,7 +3546,6 @@ module Appwrite
|
|
|
3244
3546
|
params: api_params,
|
|
3245
3547
|
response_type: Models::DocumentList
|
|
3246
3548
|
)
|
|
3247
|
-
|
|
3248
3549
|
end
|
|
3249
3550
|
|
|
3250
3551
|
#
|
|
@@ -3261,17 +3562,23 @@ module Appwrite
|
|
|
3261
3562
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3262
3563
|
#
|
|
3263
3564
|
# @return [DocumentList]
|
|
3264
|
-
def update_documents(
|
|
3565
|
+
def update_documents(
|
|
3566
|
+
database_id:,
|
|
3567
|
+
collection_id:,
|
|
3568
|
+
data: nil,
|
|
3569
|
+
queries: nil,
|
|
3570
|
+
transaction_id: nil
|
|
3571
|
+
)
|
|
3265
3572
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3266
3573
|
.gsub('{databaseId}', database_id)
|
|
3267
3574
|
.gsub('{collectionId}', collection_id)
|
|
3268
3575
|
|
|
3269
3576
|
if database_id.nil?
|
|
3270
|
-
|
|
3577
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3271
3578
|
end
|
|
3272
3579
|
|
|
3273
3580
|
if collection_id.nil?
|
|
3274
|
-
|
|
3581
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3275
3582
|
end
|
|
3276
3583
|
|
|
3277
3584
|
api_params = {
|
|
@@ -3279,7 +3586,7 @@ module Appwrite
|
|
|
3279
3586
|
queries: queries,
|
|
3280
3587
|
transactionId: transaction_id,
|
|
3281
3588
|
}
|
|
3282
|
-
|
|
3589
|
+
|
|
3283
3590
|
api_headers = {
|
|
3284
3591
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3285
3592
|
"content-type": 'application/json',
|
|
@@ -3293,7 +3600,6 @@ module Appwrite
|
|
|
3293
3600
|
params: api_params,
|
|
3294
3601
|
response_type: Models::DocumentList
|
|
3295
3602
|
)
|
|
3296
|
-
|
|
3297
3603
|
end
|
|
3298
3604
|
|
|
3299
3605
|
#
|
|
@@ -3308,24 +3614,29 @@ module Appwrite
|
|
|
3308
3614
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3309
3615
|
#
|
|
3310
3616
|
# @return [DocumentList]
|
|
3311
|
-
def delete_documents(
|
|
3617
|
+
def delete_documents(
|
|
3618
|
+
database_id:,
|
|
3619
|
+
collection_id:,
|
|
3620
|
+
queries: nil,
|
|
3621
|
+
transaction_id: nil
|
|
3622
|
+
)
|
|
3312
3623
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3313
3624
|
.gsub('{databaseId}', database_id)
|
|
3314
3625
|
.gsub('{collectionId}', collection_id)
|
|
3315
3626
|
|
|
3316
3627
|
if database_id.nil?
|
|
3317
|
-
|
|
3628
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3318
3629
|
end
|
|
3319
3630
|
|
|
3320
3631
|
if collection_id.nil?
|
|
3321
|
-
|
|
3632
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3322
3633
|
end
|
|
3323
3634
|
|
|
3324
3635
|
api_params = {
|
|
3325
3636
|
queries: queries,
|
|
3326
3637
|
transactionId: transaction_id,
|
|
3327
3638
|
}
|
|
3328
|
-
|
|
3639
|
+
|
|
3329
3640
|
api_headers = {
|
|
3330
3641
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3331
3642
|
"content-type": 'application/json',
|
|
@@ -3339,7 +3650,6 @@ module Appwrite
|
|
|
3339
3650
|
params: api_params,
|
|
3340
3651
|
response_type: Models::DocumentList
|
|
3341
3652
|
)
|
|
3342
|
-
|
|
3343
3653
|
end
|
|
3344
3654
|
|
|
3345
3655
|
#
|
|
@@ -3355,29 +3665,35 @@ module Appwrite
|
|
|
3355
3665
|
# @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
|
|
3356
3666
|
#
|
|
3357
3667
|
# @return [Document]
|
|
3358
|
-
def get_document(
|
|
3668
|
+
def get_document(
|
|
3669
|
+
database_id:,
|
|
3670
|
+
collection_id:,
|
|
3671
|
+
document_id:,
|
|
3672
|
+
queries: nil,
|
|
3673
|
+
transaction_id: nil
|
|
3674
|
+
)
|
|
3359
3675
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3360
3676
|
.gsub('{databaseId}', database_id)
|
|
3361
3677
|
.gsub('{collectionId}', collection_id)
|
|
3362
3678
|
.gsub('{documentId}', document_id)
|
|
3363
3679
|
|
|
3364
3680
|
if database_id.nil?
|
|
3365
|
-
|
|
3681
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3366
3682
|
end
|
|
3367
3683
|
|
|
3368
3684
|
if collection_id.nil?
|
|
3369
|
-
|
|
3685
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3370
3686
|
end
|
|
3371
3687
|
|
|
3372
3688
|
if document_id.nil?
|
|
3373
|
-
|
|
3689
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3374
3690
|
end
|
|
3375
3691
|
|
|
3376
3692
|
api_params = {
|
|
3377
3693
|
queries: queries,
|
|
3378
3694
|
transactionId: transaction_id,
|
|
3379
3695
|
}
|
|
3380
|
-
|
|
3696
|
+
|
|
3381
3697
|
api_headers = {
|
|
3382
3698
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3383
3699
|
"accept": 'application/json',
|
|
@@ -3390,7 +3706,6 @@ module Appwrite
|
|
|
3390
3706
|
params: api_params,
|
|
3391
3707
|
response_type: Models::Document
|
|
3392
3708
|
)
|
|
3393
|
-
|
|
3394
3709
|
end
|
|
3395
3710
|
|
|
3396
3711
|
#
|
|
@@ -3409,22 +3724,29 @@ module Appwrite
|
|
|
3409
3724
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3410
3725
|
#
|
|
3411
3726
|
# @return [Document]
|
|
3412
|
-
def upsert_document(
|
|
3727
|
+
def upsert_document(
|
|
3728
|
+
database_id:,
|
|
3729
|
+
collection_id:,
|
|
3730
|
+
document_id:,
|
|
3731
|
+
data: nil,
|
|
3732
|
+
permissions: nil,
|
|
3733
|
+
transaction_id: nil
|
|
3734
|
+
)
|
|
3413
3735
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3414
3736
|
.gsub('{databaseId}', database_id)
|
|
3415
3737
|
.gsub('{collectionId}', collection_id)
|
|
3416
3738
|
.gsub('{documentId}', document_id)
|
|
3417
3739
|
|
|
3418
3740
|
if database_id.nil?
|
|
3419
|
-
|
|
3741
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3420
3742
|
end
|
|
3421
3743
|
|
|
3422
3744
|
if collection_id.nil?
|
|
3423
|
-
|
|
3745
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3424
3746
|
end
|
|
3425
3747
|
|
|
3426
3748
|
if document_id.nil?
|
|
3427
|
-
|
|
3749
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3428
3750
|
end
|
|
3429
3751
|
|
|
3430
3752
|
api_params = {
|
|
@@ -3432,7 +3754,7 @@ module Appwrite
|
|
|
3432
3754
|
permissions: permissions,
|
|
3433
3755
|
transactionId: transaction_id,
|
|
3434
3756
|
}
|
|
3435
|
-
|
|
3757
|
+
|
|
3436
3758
|
api_headers = {
|
|
3437
3759
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3438
3760
|
"content-type": 'application/json',
|
|
@@ -3446,7 +3768,6 @@ module Appwrite
|
|
|
3446
3768
|
params: api_params,
|
|
3447
3769
|
response_type: Models::Document
|
|
3448
3770
|
)
|
|
3449
|
-
|
|
3450
3771
|
end
|
|
3451
3772
|
|
|
3452
3773
|
#
|
|
@@ -3463,22 +3784,29 @@ module Appwrite
|
|
|
3463
3784
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3464
3785
|
#
|
|
3465
3786
|
# @return [Document]
|
|
3466
|
-
def update_document(
|
|
3787
|
+
def update_document(
|
|
3788
|
+
database_id:,
|
|
3789
|
+
collection_id:,
|
|
3790
|
+
document_id:,
|
|
3791
|
+
data: nil,
|
|
3792
|
+
permissions: nil,
|
|
3793
|
+
transaction_id: nil
|
|
3794
|
+
)
|
|
3467
3795
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3468
3796
|
.gsub('{databaseId}', database_id)
|
|
3469
3797
|
.gsub('{collectionId}', collection_id)
|
|
3470
3798
|
.gsub('{documentId}', document_id)
|
|
3471
3799
|
|
|
3472
3800
|
if database_id.nil?
|
|
3473
|
-
|
|
3801
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3474
3802
|
end
|
|
3475
3803
|
|
|
3476
3804
|
if collection_id.nil?
|
|
3477
|
-
|
|
3805
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3478
3806
|
end
|
|
3479
3807
|
|
|
3480
3808
|
if document_id.nil?
|
|
3481
|
-
|
|
3809
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3482
3810
|
end
|
|
3483
3811
|
|
|
3484
3812
|
api_params = {
|
|
@@ -3486,7 +3814,7 @@ module Appwrite
|
|
|
3486
3814
|
permissions: permissions,
|
|
3487
3815
|
transactionId: transaction_id,
|
|
3488
3816
|
}
|
|
3489
|
-
|
|
3817
|
+
|
|
3490
3818
|
api_headers = {
|
|
3491
3819
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3492
3820
|
"content-type": 'application/json',
|
|
@@ -3500,7 +3828,6 @@ module Appwrite
|
|
|
3500
3828
|
params: api_params,
|
|
3501
3829
|
response_type: Models::Document
|
|
3502
3830
|
)
|
|
3503
|
-
|
|
3504
3831
|
end
|
|
3505
3832
|
|
|
3506
3833
|
#
|
|
@@ -3514,28 +3841,33 @@ module Appwrite
|
|
|
3514
3841
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3515
3842
|
#
|
|
3516
3843
|
# @return []
|
|
3517
|
-
def delete_document(
|
|
3844
|
+
def delete_document(
|
|
3845
|
+
database_id:,
|
|
3846
|
+
collection_id:,
|
|
3847
|
+
document_id:,
|
|
3848
|
+
transaction_id: nil
|
|
3849
|
+
)
|
|
3518
3850
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3519
3851
|
.gsub('{databaseId}', database_id)
|
|
3520
3852
|
.gsub('{collectionId}', collection_id)
|
|
3521
3853
|
.gsub('{documentId}', document_id)
|
|
3522
3854
|
|
|
3523
3855
|
if database_id.nil?
|
|
3524
|
-
|
|
3856
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3525
3857
|
end
|
|
3526
3858
|
|
|
3527
3859
|
if collection_id.nil?
|
|
3528
|
-
|
|
3860
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3529
3861
|
end
|
|
3530
3862
|
|
|
3531
3863
|
if document_id.nil?
|
|
3532
|
-
|
|
3864
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3533
3865
|
end
|
|
3534
3866
|
|
|
3535
3867
|
api_params = {
|
|
3536
3868
|
transactionId: transaction_id,
|
|
3537
3869
|
}
|
|
3538
|
-
|
|
3870
|
+
|
|
3539
3871
|
api_headers = {
|
|
3540
3872
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3541
3873
|
"content-type": 'application/json',
|
|
@@ -3547,7 +3879,6 @@ module Appwrite
|
|
|
3547
3879
|
headers: api_headers,
|
|
3548
3880
|
params: api_params,
|
|
3549
3881
|
)
|
|
3550
|
-
|
|
3551
3882
|
end
|
|
3552
3883
|
|
|
3553
3884
|
#
|
|
@@ -3564,7 +3895,15 @@ module Appwrite
|
|
|
3564
3895
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3565
3896
|
#
|
|
3566
3897
|
# @return [Document]
|
|
3567
|
-
def decrement_document_attribute(
|
|
3898
|
+
def decrement_document_attribute(
|
|
3899
|
+
database_id:,
|
|
3900
|
+
collection_id:,
|
|
3901
|
+
document_id:,
|
|
3902
|
+
attribute:,
|
|
3903
|
+
value: nil,
|
|
3904
|
+
min: nil,
|
|
3905
|
+
transaction_id: nil
|
|
3906
|
+
)
|
|
3568
3907
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'
|
|
3569
3908
|
.gsub('{databaseId}', database_id)
|
|
3570
3909
|
.gsub('{collectionId}', collection_id)
|
|
@@ -3572,19 +3911,19 @@ module Appwrite
|
|
|
3572
3911
|
.gsub('{attribute}', attribute)
|
|
3573
3912
|
|
|
3574
3913
|
if database_id.nil?
|
|
3575
|
-
|
|
3914
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3576
3915
|
end
|
|
3577
3916
|
|
|
3578
3917
|
if collection_id.nil?
|
|
3579
|
-
|
|
3918
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3580
3919
|
end
|
|
3581
3920
|
|
|
3582
3921
|
if document_id.nil?
|
|
3583
|
-
|
|
3922
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3584
3923
|
end
|
|
3585
3924
|
|
|
3586
3925
|
if attribute.nil?
|
|
3587
|
-
|
|
3926
|
+
raise Appwrite::Exception.new('Missing required parameter: "attribute"')
|
|
3588
3927
|
end
|
|
3589
3928
|
|
|
3590
3929
|
api_params = {
|
|
@@ -3592,7 +3931,7 @@ module Appwrite
|
|
|
3592
3931
|
min: min,
|
|
3593
3932
|
transactionId: transaction_id,
|
|
3594
3933
|
}
|
|
3595
|
-
|
|
3934
|
+
|
|
3596
3935
|
api_headers = {
|
|
3597
3936
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3598
3937
|
"content-type": 'application/json',
|
|
@@ -3606,7 +3945,6 @@ module Appwrite
|
|
|
3606
3945
|
params: api_params,
|
|
3607
3946
|
response_type: Models::Document
|
|
3608
3947
|
)
|
|
3609
|
-
|
|
3610
3948
|
end
|
|
3611
3949
|
|
|
3612
3950
|
#
|
|
@@ -3623,7 +3961,15 @@ module Appwrite
|
|
|
3623
3961
|
# @param [String] transaction_id Transaction ID for staging the operation.
|
|
3624
3962
|
#
|
|
3625
3963
|
# @return [Document]
|
|
3626
|
-
def increment_document_attribute(
|
|
3964
|
+
def increment_document_attribute(
|
|
3965
|
+
database_id:,
|
|
3966
|
+
collection_id:,
|
|
3967
|
+
document_id:,
|
|
3968
|
+
attribute:,
|
|
3969
|
+
value: nil,
|
|
3970
|
+
max: nil,
|
|
3971
|
+
transaction_id: nil
|
|
3972
|
+
)
|
|
3627
3973
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'
|
|
3628
3974
|
.gsub('{databaseId}', database_id)
|
|
3629
3975
|
.gsub('{collectionId}', collection_id)
|
|
@@ -3631,19 +3977,19 @@ module Appwrite
|
|
|
3631
3977
|
.gsub('{attribute}', attribute)
|
|
3632
3978
|
|
|
3633
3979
|
if database_id.nil?
|
|
3634
|
-
|
|
3980
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3635
3981
|
end
|
|
3636
3982
|
|
|
3637
3983
|
if collection_id.nil?
|
|
3638
|
-
|
|
3984
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3639
3985
|
end
|
|
3640
3986
|
|
|
3641
3987
|
if document_id.nil?
|
|
3642
|
-
|
|
3988
|
+
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3643
3989
|
end
|
|
3644
3990
|
|
|
3645
3991
|
if attribute.nil?
|
|
3646
|
-
|
|
3992
|
+
raise Appwrite::Exception.new('Missing required parameter: "attribute"')
|
|
3647
3993
|
end
|
|
3648
3994
|
|
|
3649
3995
|
api_params = {
|
|
@@ -3651,7 +3997,7 @@ module Appwrite
|
|
|
3651
3997
|
max: max,
|
|
3652
3998
|
transactionId: transaction_id,
|
|
3653
3999
|
}
|
|
3654
|
-
|
|
4000
|
+
|
|
3655
4001
|
api_headers = {
|
|
3656
4002
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3657
4003
|
"content-type": 'application/json',
|
|
@@ -3665,7 +4011,6 @@ module Appwrite
|
|
|
3665
4011
|
params: api_params,
|
|
3666
4012
|
response_type: Models::Document
|
|
3667
4013
|
)
|
|
3668
|
-
|
|
3669
4014
|
end
|
|
3670
4015
|
|
|
3671
4016
|
#
|
|
@@ -3679,24 +4024,29 @@ module Appwrite
|
|
|
3679
4024
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3680
4025
|
#
|
|
3681
4026
|
# @return [IndexList]
|
|
3682
|
-
def list_indexes(
|
|
4027
|
+
def list_indexes(
|
|
4028
|
+
database_id:,
|
|
4029
|
+
collection_id:,
|
|
4030
|
+
queries: nil,
|
|
4031
|
+
total: nil
|
|
4032
|
+
)
|
|
3683
4033
|
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
|
|
3684
4034
|
.gsub('{databaseId}', database_id)
|
|
3685
4035
|
.gsub('{collectionId}', collection_id)
|
|
3686
4036
|
|
|
3687
4037
|
if database_id.nil?
|
|
3688
|
-
|
|
4038
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3689
4039
|
end
|
|
3690
4040
|
|
|
3691
4041
|
if collection_id.nil?
|
|
3692
|
-
|
|
4042
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3693
4043
|
end
|
|
3694
4044
|
|
|
3695
4045
|
api_params = {
|
|
3696
4046
|
queries: queries,
|
|
3697
4047
|
total: total,
|
|
3698
4048
|
}
|
|
3699
|
-
|
|
4049
|
+
|
|
3700
4050
|
api_headers = {
|
|
3701
4051
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3702
4052
|
"accept": 'application/json',
|
|
@@ -3709,7 +4059,6 @@ module Appwrite
|
|
|
3709
4059
|
params: api_params,
|
|
3710
4060
|
response_type: Models::IndexList
|
|
3711
4061
|
)
|
|
3712
|
-
|
|
3713
4062
|
end
|
|
3714
4063
|
|
|
3715
4064
|
#
|
|
@@ -3728,29 +4077,37 @@ module Appwrite
|
|
|
3728
4077
|
# @param [Array] lengths Length of index. Maximum of 100
|
|
3729
4078
|
#
|
|
3730
4079
|
# @return [Index]
|
|
3731
|
-
def create_index(
|
|
4080
|
+
def create_index(
|
|
4081
|
+
database_id:,
|
|
4082
|
+
collection_id:,
|
|
4083
|
+
key:,
|
|
4084
|
+
type:,
|
|
4085
|
+
attributes:,
|
|
4086
|
+
orders: nil,
|
|
4087
|
+
lengths: nil
|
|
4088
|
+
)
|
|
3732
4089
|
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
|
|
3733
4090
|
.gsub('{databaseId}', database_id)
|
|
3734
4091
|
.gsub('{collectionId}', collection_id)
|
|
3735
4092
|
|
|
3736
4093
|
if database_id.nil?
|
|
3737
|
-
|
|
4094
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3738
4095
|
end
|
|
3739
4096
|
|
|
3740
4097
|
if collection_id.nil?
|
|
3741
|
-
|
|
4098
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3742
4099
|
end
|
|
3743
4100
|
|
|
3744
4101
|
if key.nil?
|
|
3745
|
-
|
|
4102
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3746
4103
|
end
|
|
3747
4104
|
|
|
3748
4105
|
if type.nil?
|
|
3749
|
-
|
|
4106
|
+
raise Appwrite::Exception.new('Missing required parameter: "type"')
|
|
3750
4107
|
end
|
|
3751
4108
|
|
|
3752
4109
|
if attributes.nil?
|
|
3753
|
-
|
|
4110
|
+
raise Appwrite::Exception.new('Missing required parameter: "attributes"')
|
|
3754
4111
|
end
|
|
3755
4112
|
|
|
3756
4113
|
api_params = {
|
|
@@ -3760,7 +4117,7 @@ module Appwrite
|
|
|
3760
4117
|
orders: orders,
|
|
3761
4118
|
lengths: lengths,
|
|
3762
4119
|
}
|
|
3763
|
-
|
|
4120
|
+
|
|
3764
4121
|
api_headers = {
|
|
3765
4122
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3766
4123
|
"content-type": 'application/json',
|
|
@@ -3774,7 +4131,6 @@ module Appwrite
|
|
|
3774
4131
|
params: api_params,
|
|
3775
4132
|
response_type: Models::Index
|
|
3776
4133
|
)
|
|
3777
|
-
|
|
3778
4134
|
end
|
|
3779
4135
|
|
|
3780
4136
|
#
|
|
@@ -3787,27 +4143,30 @@ module Appwrite
|
|
|
3787
4143
|
# @param [String] key Index Key.
|
|
3788
4144
|
#
|
|
3789
4145
|
# @return [Index]
|
|
3790
|
-
def get_index(
|
|
4146
|
+
def get_index(
|
|
4147
|
+
database_id:,
|
|
4148
|
+
collection_id:,
|
|
4149
|
+
key:
|
|
4150
|
+
)
|
|
3791
4151
|
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
3792
4152
|
.gsub('{databaseId}', database_id)
|
|
3793
4153
|
.gsub('{collectionId}', collection_id)
|
|
3794
4154
|
.gsub('{key}', key)
|
|
3795
4155
|
|
|
3796
4156
|
if database_id.nil?
|
|
3797
|
-
|
|
4157
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3798
4158
|
end
|
|
3799
4159
|
|
|
3800
4160
|
if collection_id.nil?
|
|
3801
|
-
|
|
4161
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3802
4162
|
end
|
|
3803
4163
|
|
|
3804
4164
|
if key.nil?
|
|
3805
|
-
|
|
4165
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3806
4166
|
end
|
|
3807
4167
|
|
|
3808
|
-
api_params = {
|
|
3809
|
-
|
|
3810
|
-
|
|
4168
|
+
api_params = {}
|
|
4169
|
+
|
|
3811
4170
|
api_headers = {
|
|
3812
4171
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3813
4172
|
"accept": 'application/json',
|
|
@@ -3820,7 +4179,6 @@ module Appwrite
|
|
|
3820
4179
|
params: api_params,
|
|
3821
4180
|
response_type: Models::Index
|
|
3822
4181
|
)
|
|
3823
|
-
|
|
3824
4182
|
end
|
|
3825
4183
|
|
|
3826
4184
|
#
|
|
@@ -3833,27 +4191,30 @@ module Appwrite
|
|
|
3833
4191
|
# @param [String] key Index Key.
|
|
3834
4192
|
#
|
|
3835
4193
|
# @return []
|
|
3836
|
-
def delete_index(
|
|
4194
|
+
def delete_index(
|
|
4195
|
+
database_id:,
|
|
4196
|
+
collection_id:,
|
|
4197
|
+
key:
|
|
4198
|
+
)
|
|
3837
4199
|
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
3838
4200
|
.gsub('{databaseId}', database_id)
|
|
3839
4201
|
.gsub('{collectionId}', collection_id)
|
|
3840
4202
|
.gsub('{key}', key)
|
|
3841
4203
|
|
|
3842
4204
|
if database_id.nil?
|
|
3843
|
-
|
|
4205
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3844
4206
|
end
|
|
3845
4207
|
|
|
3846
4208
|
if collection_id.nil?
|
|
3847
|
-
|
|
4209
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3848
4210
|
end
|
|
3849
4211
|
|
|
3850
4212
|
if key.nil?
|
|
3851
|
-
|
|
4213
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3852
4214
|
end
|
|
3853
4215
|
|
|
3854
|
-
api_params = {
|
|
3855
|
-
|
|
3856
|
-
|
|
4216
|
+
api_params = {}
|
|
4217
|
+
|
|
3857
4218
|
api_headers = {
|
|
3858
4219
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3859
4220
|
"content-type": 'application/json',
|
|
@@ -3865,8 +4226,6 @@ module Appwrite
|
|
|
3865
4226
|
headers: api_headers,
|
|
3866
4227
|
params: api_params,
|
|
3867
4228
|
)
|
|
3868
|
-
|
|
3869
4229
|
end
|
|
3870
|
-
|
|
3871
|
-
end
|
|
4230
|
+
end
|
|
3872
4231
|
end
|