appwrite 28.4.0 → 30.0.0
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 +19 -19
- data/lib/appwrite/enums/billing_plan_group.rb +0 -1
- data/lib/appwrite/enums/execution_trigger.rb +1 -0
- data/lib/appwrite/enums/proxy_rule_protocol.rb +8 -0
- data/lib/appwrite/models/account.rb +8 -8
- data/lib/appwrite/models/activity_event.rb +1 -0
- data/lib/appwrite/models/activity_event_list.rb +1 -0
- data/lib/appwrite/models/additional_resource.rb +1 -0
- data/lib/appwrite/models/algo_argon2.rb +1 -0
- data/lib/appwrite/models/algo_bcrypt.rb +1 -0
- data/lib/appwrite/models/algo_md5.rb +1 -0
- data/lib/appwrite/models/algo_phpass.rb +1 -0
- data/lib/appwrite/models/algo_scrypt.rb +1 -0
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -0
- data/lib/appwrite/models/algo_sha.rb +1 -0
- data/lib/appwrite/models/app.rb +1 -0
- data/lib/appwrite/models/app_installation.rb +2 -1
- data/lib/appwrite/models/app_installation_list.rb +1 -0
- data/lib/appwrite/models/app_key.rb +2 -1
- data/lib/appwrite/models/app_key_list.rb +1 -0
- data/lib/appwrite/models/app_scope.rb +1 -0
- data/lib/appwrite/models/app_scope_list.rb +1 -0
- data/lib/appwrite/models/app_secret.rb +2 -1
- data/lib/appwrite/models/app_secret_list.rb +1 -0
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -1
- data/lib/appwrite/models/apps_list.rb +1 -0
- data/lib/appwrite/models/attribute_bigint.rb +10 -4
- data/lib/appwrite/models/attribute_boolean.rb +8 -2
- data/lib/appwrite/models/attribute_datetime.rb +8 -2
- data/lib/appwrite/models/attribute_email.rb +8 -2
- data/lib/appwrite/models/attribute_enum.rb +8 -2
- data/lib/appwrite/models/attribute_float.rb +10 -4
- data/lib/appwrite/models/attribute_integer.rb +10 -4
- data/lib/appwrite/models/attribute_ip.rb +8 -2
- data/lib/appwrite/models/attribute_line.rb +8 -2
- data/lib/appwrite/models/attribute_list.rb +1 -0
- data/lib/appwrite/models/attribute_longtext.rb +9 -3
- data/lib/appwrite/models/attribute_mediumtext.rb +9 -3
- data/lib/appwrite/models/attribute_object.rb +7 -1
- data/lib/appwrite/models/attribute_point.rb +8 -2
- data/lib/appwrite/models/attribute_polygon.rb +8 -2
- data/lib/appwrite/models/attribute_relationship.rb +7 -1
- data/lib/appwrite/models/attribute_string.rb +9 -3
- data/lib/appwrite/models/attribute_text.rb +9 -3
- data/lib/appwrite/models/attribute_url.rb +8 -2
- data/lib/appwrite/models/attribute_varchar.rb +9 -3
- data/lib/appwrite/models/attribute_vector.rb +7 -1
- data/lib/appwrite/models/backup_archive.rb +5 -4
- data/lib/appwrite/models/backup_archive_list.rb +1 -0
- data/lib/appwrite/models/backup_policy.rb +3 -2
- data/lib/appwrite/models/backup_policy_list.rb +1 -0
- data/lib/appwrite/models/backup_restoration.rb +2 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -0
- data/lib/appwrite/models/billing_limits.rb +8 -8
- data/lib/appwrite/models/billing_plan.rb +19 -14
- data/lib/appwrite/models/billing_plan_addon.rb +2 -2
- data/lib/appwrite/models/billing_plan_addon_details.rb +2 -1
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +19 -19
- data/lib/appwrite/models/billing_plan_limits.rb +2 -2
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -0
- data/lib/appwrite/models/block.rb +4 -33
- data/lib/appwrite/models/bucket.rb +11 -0
- data/lib/appwrite/models/bucket_list.rb +1 -0
- data/lib/appwrite/models/collection.rb +6 -0
- data/lib/appwrite/models/collection_list.rb +1 -0
- data/lib/appwrite/models/column_bigint.rb +10 -4
- data/lib/appwrite/models/column_boolean.rb +8 -2
- data/lib/appwrite/models/column_datetime.rb +8 -2
- data/lib/appwrite/models/column_email.rb +8 -2
- data/lib/appwrite/models/column_enum.rb +8 -2
- data/lib/appwrite/models/column_float.rb +10 -4
- data/lib/appwrite/models/column_index.rb +7 -1
- data/lib/appwrite/models/column_index_list.rb +1 -0
- data/lib/appwrite/models/column_integer.rb +10 -4
- data/lib/appwrite/models/column_ip.rb +8 -2
- data/lib/appwrite/models/column_line.rb +8 -2
- data/lib/appwrite/models/column_list.rb +1 -0
- data/lib/appwrite/models/column_longtext.rb +9 -3
- data/lib/appwrite/models/column_mediumtext.rb +9 -3
- data/lib/appwrite/models/column_point.rb +8 -2
- data/lib/appwrite/models/column_polygon.rb +8 -2
- data/lib/appwrite/models/column_relationship.rb +7 -1
- data/lib/appwrite/models/column_string.rb +9 -3
- data/lib/appwrite/models/column_text.rb +9 -3
- data/lib/appwrite/models/column_url.rb +8 -2
- data/lib/appwrite/models/column_varchar.rb +9 -3
- data/lib/appwrite/models/continent.rb +1 -0
- data/lib/appwrite/models/continent_list.rb +1 -0
- data/lib/appwrite/models/country.rb +1 -0
- data/lib/appwrite/models/country_list.rb +1 -0
- data/lib/appwrite/models/currency.rb +1 -0
- data/lib/appwrite/models/currency_list.rb +1 -0
- data/lib/appwrite/models/database.rb +15 -9
- data/lib/appwrite/models/database_list.rb +1 -0
- data/lib/appwrite/models/database_migration.rb +1 -0
- data/lib/appwrite/models/database_migration_list.rb +1 -0
- data/lib/appwrite/models/database_status.rb +6 -5
- data/lib/appwrite/models/database_status_connections.rb +1 -0
- data/lib/appwrite/models/database_status_replica.rb +3 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -0
- data/lib/appwrite/models/dedicated_database.rb +8 -7
- data/lib/appwrite/models/dedicated_database_backup.rb +6 -5
- data/lib/appwrite/models/dedicated_database_backup_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +1 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +2 -1
- data/lib/appwrite/models/dedicated_database_branch_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +1 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +1 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +1 -0
- data/lib/appwrite/models/dedicated_database_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_member.rb +3 -2
- data/lib/appwrite/models/dedicated_database_operation.rb +4 -3
- data/lib/appwrite/models/dedicated_database_operation_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +1 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +1 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +3 -2
- data/lib/appwrite/models/dedicated_database_restoration.rb +11 -5
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +1 -0
- data/lib/appwrite/models/dedicated_database_specification_list.rb +4 -8
- data/lib/appwrite/models/deployment.rb +1 -0
- data/lib/appwrite/models/deployment_list.rb +1 -0
- data/lib/appwrite/models/document.rb +1 -0
- data/lib/appwrite/models/document_list.rb +1 -0
- data/lib/appwrite/models/domain.rb +1 -1
- data/lib/appwrite/models/domain_price.rb +2 -2
- data/lib/appwrite/models/email_template.rb +1 -0
- data/lib/appwrite/models/email_template_list.rb +1 -0
- data/lib/appwrite/models/embedding.rb +1 -0
- data/lib/appwrite/models/embedding_list.rb +1 -0
- data/lib/appwrite/models/ephemeral_key.rb +6 -0
- data/lib/appwrite/models/execution.rb +3 -1
- data/lib/appwrite/models/execution_list.rb +1 -0
- data/lib/appwrite/models/file.rb +1 -0
- data/lib/appwrite/models/file_list.rb +1 -0
- data/lib/appwrite/models/framework.rb +1 -0
- data/lib/appwrite/models/framework_adapter.rb +2 -1
- data/lib/appwrite/models/framework_list.rb +1 -0
- data/lib/appwrite/models/function.rb +15 -4
- data/lib/appwrite/models/function_list.rb +1 -0
- data/lib/appwrite/models/headers.rb +1 -0
- data/lib/appwrite/models/identity.rb +1 -0
- data/lib/appwrite/models/identity_list.rb +1 -0
- data/lib/appwrite/models/index.rb +7 -1
- data/lib/appwrite/models/index_list.rb +1 -0
- data/lib/appwrite/models/insight.rb +4 -3
- data/lib/appwrite/models/insight_cta.rb +1 -0
- data/lib/appwrite/models/insight_list.rb +1 -0
- data/lib/appwrite/models/jwt.rb +1 -0
- data/lib/appwrite/models/key.rb +6 -0
- data/lib/appwrite/models/key_list.rb +1 -0
- data/lib/appwrite/models/language.rb +1 -0
- data/lib/appwrite/models/language_list.rb +1 -0
- data/lib/appwrite/models/locale.rb +12 -11
- data/lib/appwrite/models/locale_code.rb +1 -0
- data/lib/appwrite/models/locale_code_list.rb +1 -0
- data/lib/appwrite/models/membership.rb +1 -0
- data/lib/appwrite/models/membership_list.rb +1 -0
- data/lib/appwrite/models/message.rb +4 -3
- data/lib/appwrite/models/message_list.rb +1 -0
- data/lib/appwrite/models/mfa_challenge.rb +1 -0
- data/lib/appwrite/models/mfa_challenge_secret.rb +1 -0
- data/lib/appwrite/models/mfa_factors.rb +1 -0
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -0
- data/lib/appwrite/models/mfa_type.rb +1 -0
- data/lib/appwrite/models/mock_number.rb +1 -0
- data/lib/appwrite/models/mock_number_list.rb +1 -0
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -0
- data/lib/appwrite/models/o_auth2_apple.rb +1 -0
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -0
- data/lib/appwrite/models/o_auth2_auth0.rb +2 -1
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -0
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -0
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -0
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -0
- data/lib/appwrite/models/o_auth2_box.rb +1 -0
- data/lib/appwrite/models/o_auth2_cloudflare.rb +1 -0
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -0
- data/lib/appwrite/models/o_auth2_discord.rb +2 -1
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -0
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -0
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -0
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -0
- data/lib/appwrite/models/o_auth2_figma.rb +1 -0
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -0
- data/lib/appwrite/models/o_auth2_github.rb +2 -1
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -0
- data/lib/appwrite/models/o_auth2_google.rb +1 -0
- data/lib/appwrite/models/o_auth2_hugging_face.rb +1 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -0
- data/lib/appwrite/models/o_auth2_kick.rb +1 -0
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -0
- data/lib/appwrite/models/o_auth2_microsoft.rb +2 -1
- data/lib/appwrite/models/o_auth2_notion.rb +1 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +7 -6
- data/lib/appwrite/models/o_auth2_okta.rb +2 -1
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -0
- data/lib/appwrite/models/o_auth2_podio.rb +1 -0
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -0
- data/lib/appwrite/models/o_auth2_resend.rb +1 -0
- data/lib/appwrite/models/o_auth2_salesforce.rb +2 -1
- data/lib/appwrite/models/o_auth2_slack.rb +1 -0
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -0
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -0
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -0
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -0
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -0
- data/lib/appwrite/models/o_auth2_x.rb +1 -0
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -0
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -0
- data/lib/appwrite/models/o_auth2_zoho.rb +2 -1
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -0
- data/lib/appwrite/models/oauth2_approve.rb +1 -0
- data/lib/appwrite/models/oauth2_authorize.rb +1 -0
- data/lib/appwrite/models/oauth2_consent.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -0
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -0
- data/lib/appwrite/models/oauth2_grant.rb +1 -0
- data/lib/appwrite/models/oauth2_introspection.rb +11 -11
- data/lib/appwrite/models/oauth2_organization.rb +1 -0
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -0
- data/lib/appwrite/models/oauth2_par.rb +1 -0
- data/lib/appwrite/models/oauth2_project.rb +1 -0
- data/lib/appwrite/models/oauth2_project_list.rb +1 -0
- data/lib/appwrite/models/oauth2_reject.rb +1 -0
- data/lib/appwrite/models/oauth2_token.rb +3 -2
- data/lib/appwrite/models/organization.rb +21 -20
- data/lib/appwrite/models/passkey.rb +1 -0
- data/lib/appwrite/models/passkey_challenge.rb +1 -0
- data/lib/appwrite/models/passkey_list.rb +1 -0
- data/lib/appwrite/models/phone.rb +1 -0
- data/lib/appwrite/models/phone_list.rb +1 -0
- data/lib/appwrite/models/platform_android.rb +1 -0
- data/lib/appwrite/models/platform_apple.rb +1 -0
- data/lib/appwrite/models/platform_linux.rb +1 -0
- data/lib/appwrite/models/platform_list.rb +1 -0
- data/lib/appwrite/models/platform_web.rb +1 -0
- data/lib/appwrite/models/platform_windows.rb +1 -0
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -0
- data/lib/appwrite/models/policy_list.rb +1 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -0
- data/lib/appwrite/models/policy_mfa_factors.rb +1 -0
- data/lib/appwrite/models/policy_passkey.rb +1 -0
- data/lib/appwrite/models/policy_password_dictionary.rb +9 -3
- data/lib/appwrite/models/policy_password_history.rb +1 -0
- data/lib/appwrite/models/policy_password_personal_data.rb +9 -3
- data/lib/appwrite/models/policy_password_strength.rb +1 -0
- data/lib/appwrite/models/policy_session_alert.rb +1 -0
- data/lib/appwrite/models/policy_session_duration.rb +1 -0
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -0
- data/lib/appwrite/models/policy_session_limit.rb +1 -0
- data/lib/appwrite/models/policy_user_limit.rb +1 -0
- data/lib/appwrite/models/postgres_extension.rb +1 -0
- data/lib/appwrite/models/presence.rb +4 -3
- data/lib/appwrite/models/presence_list.rb +1 -0
- data/lib/appwrite/models/program.rb +1 -0
- data/lib/appwrite/models/project.rb +23 -27
- data/lib/appwrite/models/project_auth_method.rb +1 -0
- data/lib/appwrite/models/project_list.rb +1 -0
- data/lib/appwrite/models/project_protocol.rb +1 -0
- data/lib/appwrite/models/project_service.rb +1 -0
- data/lib/appwrite/models/provider.rb +2 -1
- data/lib/appwrite/models/provider_list.rb +1 -0
- data/lib/appwrite/models/proxy_invalidation.rb +1 -0
- data/lib/appwrite/models/proxy_rule.rb +23 -4
- data/lib/appwrite/models/proxy_rule_list.rb +1 -0
- data/lib/appwrite/models/report.rb +2 -1
- data/lib/appwrite/models/report_list.rb +1 -0
- data/lib/appwrite/models/resource_token.rb +1 -0
- data/lib/appwrite/models/resource_token_list.rb +1 -0
- data/lib/appwrite/models/row.rb +1 -0
- data/lib/appwrite/models/row_list.rb +1 -0
- data/lib/appwrite/models/runtime.rb +1 -0
- data/lib/appwrite/models/runtime_list.rb +1 -0
- data/lib/appwrite/models/session.rb +1 -0
- data/lib/appwrite/models/session_list.rb +1 -0
- data/lib/appwrite/models/site.rb +6 -0
- data/lib/appwrite/models/site_list.rb +1 -0
- data/lib/appwrite/models/specification.rb +1 -0
- data/lib/appwrite/models/specification_list.rb +1 -0
- data/lib/appwrite/models/subscriber.rb +1 -0
- data/lib/appwrite/models/subscriber_list.rb +1 -0
- data/lib/appwrite/models/table.rb +6 -0
- data/lib/appwrite/models/table_list.rb +1 -0
- data/lib/appwrite/models/target.rb +2 -1
- data/lib/appwrite/models/target_list.rb +1 -0
- data/lib/appwrite/models/team.rb +1 -0
- data/lib/appwrite/models/team_list.rb +1 -0
- data/lib/appwrite/models/token.rb +1 -0
- data/lib/appwrite/models/token_secret.rb +1 -0
- data/lib/appwrite/models/topic.rb +8 -2
- data/lib/appwrite/models/topic_list.rb +1 -0
- data/lib/appwrite/models/transaction.rb +1 -0
- data/lib/appwrite/models/transaction_list.rb +1 -0
- data/lib/appwrite/models/usage_billing_plan.rb +27 -27
- data/lib/appwrite/models/user.rb +12 -11
- data/lib/appwrite/models/user_list.rb +1 -0
- data/lib/appwrite/models/variable.rb +6 -0
- data/lib/appwrite/models/variable_list.rb +1 -0
- data/lib/appwrite/models/vectorsdb_collection.rb +6 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +1 -0
- data/lib/appwrite/models/webhook.rb +6 -0
- data/lib/appwrite/models/webhook_list.rb +1 -0
- data/lib/appwrite/query/builder.rb +361 -0
- data/lib/appwrite/query.rb +190 -0
- data/lib/appwrite/services/account.rb +135 -107
- data/lib/appwrite/services/activities.rb +8 -5
- data/lib/appwrite/services/advisor.rb +19 -18
- data/lib/appwrite/services/apps.rb +89 -89
- data/lib/appwrite/services/avatars.rb +21 -21
- data/lib/appwrite/services/backups.rb +42 -33
- data/lib/appwrite/services/databases.rb +727 -488
- data/lib/appwrite/services/documents_db.rb +266 -190
- data/lib/appwrite/services/domains.rb +63 -57
- data/lib/appwrite/services/embeddings.rb +2 -2
- data/lib/appwrite/services/functions.rb +132 -112
- data/lib/appwrite/services/graphql.rb +4 -4
- data/lib/appwrite/services/messaging.rb +172 -156
- data/lib/appwrite/services/mongo.rb +206 -133
- data/lib/appwrite/services/mysql.rb +224 -147
- data/lib/appwrite/services/oauth2.rb +27 -27
- data/lib/appwrite/services/organization.rb +59 -247
- data/lib/appwrite/services/postgresql.rb +238 -161
- data/lib/appwrite/services/presences.rb +17 -16
- data/lib/appwrite/services/project.rb +187 -147
- data/lib/appwrite/services/proxy.rb +70 -23
- data/lib/appwrite/services/sites.rb +124 -108
- data/lib/appwrite/services/storage.rb +77 -62
- data/lib/appwrite/services/tables_db.rb +832 -589
- data/lib/appwrite/services/teams.rb +83 -81
- data/lib/appwrite/services/tokens.rb +25 -24
- data/lib/appwrite/services/users.rb +170 -199
- data/lib/appwrite/services/vectors_db.rb +199 -179
- data/lib/appwrite/services/waf.rb +7 -7
- data/lib/appwrite/services/webhooks.rb +31 -24
- data/lib/appwrite/topic.rb +53 -0
- data/lib/appwrite.rb +6 -9
- metadata +6 -8
- data/lib/appwrite/enums/organization_key_scopes.rb +0 -22
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +0 -42
- data/lib/appwrite/models/dev_key.rb +0 -62
- data/lib/appwrite/models/log.rb +0 -132
- data/lib/appwrite/models/log_list.rb +0 -32
|
@@ -53,15 +53,15 @@ module Appwrite
|
|
|
53
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.
|
|
54
54
|
# @param [String] name Database name. Max length: 128 chars.
|
|
55
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.
|
|
56
|
+
# @param [String] description Optional description for the database.
|
|
56
57
|
#
|
|
57
58
|
# @return [Database]
|
|
58
59
|
def create(
|
|
59
60
|
database_id:,
|
|
60
61
|
name:,
|
|
61
|
-
enabled: nil
|
|
62
|
+
enabled: nil,
|
|
63
|
+
description: nil
|
|
62
64
|
)
|
|
63
|
-
api_path = '/databases'
|
|
64
|
-
|
|
65
65
|
if database_id.nil?
|
|
66
66
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
67
67
|
end
|
|
@@ -70,10 +70,13 @@ module Appwrite
|
|
|
70
70
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
api_path = '/databases'
|
|
74
|
+
|
|
73
75
|
api_params = {
|
|
74
76
|
databaseId: database_id,
|
|
75
77
|
name: name,
|
|
76
78
|
enabled: enabled,
|
|
79
|
+
description: description,
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
api_headers = {
|
|
@@ -168,13 +171,13 @@ module Appwrite
|
|
|
168
171
|
def get_transaction(
|
|
169
172
|
transaction_id:
|
|
170
173
|
)
|
|
171
|
-
|
|
172
|
-
.gsub('{transactionId}', transaction_id)
|
|
173
|
-
|
|
174
|
-
if transaction_id.nil?
|
|
174
|
+
if transaction_id.nil? || transaction_id == ''
|
|
175
175
|
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
+
api_path = '/databases/transactions/{transactionId}'
|
|
179
|
+
.gsub('{transactionId}', transaction_id)
|
|
180
|
+
|
|
178
181
|
api_params = {}
|
|
179
182
|
|
|
180
183
|
api_headers = {
|
|
@@ -206,13 +209,13 @@ module Appwrite
|
|
|
206
209
|
commit: nil,
|
|
207
210
|
rollback: nil
|
|
208
211
|
)
|
|
209
|
-
|
|
210
|
-
.gsub('{transactionId}', transaction_id)
|
|
211
|
-
|
|
212
|
-
if transaction_id.nil?
|
|
212
|
+
if transaction_id.nil? || transaction_id == ''
|
|
213
213
|
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
+
api_path = '/databases/transactions/{transactionId}'
|
|
217
|
+
.gsub('{transactionId}', transaction_id)
|
|
218
|
+
|
|
216
219
|
api_params = {
|
|
217
220
|
commit: commit,
|
|
218
221
|
rollback: rollback,
|
|
@@ -244,18 +247,19 @@ module Appwrite
|
|
|
244
247
|
def delete_transaction(
|
|
245
248
|
transaction_id:
|
|
246
249
|
)
|
|
247
|
-
|
|
248
|
-
.gsub('{transactionId}', transaction_id)
|
|
249
|
-
|
|
250
|
-
if transaction_id.nil?
|
|
250
|
+
if transaction_id.nil? || transaction_id == ''
|
|
251
251
|
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
252
252
|
end
|
|
253
253
|
|
|
254
|
+
api_path = '/databases/transactions/{transactionId}'
|
|
255
|
+
.gsub('{transactionId}', transaction_id)
|
|
256
|
+
|
|
254
257
|
api_params = {}
|
|
255
258
|
|
|
256
259
|
api_headers = {
|
|
257
260
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
258
261
|
"content-type": 'application/json',
|
|
262
|
+
"accept": 'application/json',
|
|
259
263
|
}
|
|
260
264
|
|
|
261
265
|
@client.call(
|
|
@@ -279,13 +283,13 @@ module Appwrite
|
|
|
279
283
|
transaction_id:,
|
|
280
284
|
operations: nil
|
|
281
285
|
)
|
|
282
|
-
|
|
283
|
-
.gsub('{transactionId}', transaction_id)
|
|
284
|
-
|
|
285
|
-
if transaction_id.nil?
|
|
286
|
+
if transaction_id.nil? || transaction_id == ''
|
|
286
287
|
raise Appwrite::Exception.new('Missing required parameter: "transactionId"')
|
|
287
288
|
end
|
|
288
289
|
|
|
290
|
+
api_path = '/databases/transactions/{transactionId}/operations'
|
|
291
|
+
.gsub('{transactionId}', transaction_id)
|
|
292
|
+
|
|
289
293
|
api_params = {
|
|
290
294
|
operations: operations,
|
|
291
295
|
}
|
|
@@ -317,13 +321,13 @@ module Appwrite
|
|
|
317
321
|
def get(
|
|
318
322
|
database_id:
|
|
319
323
|
)
|
|
320
|
-
|
|
321
|
-
.gsub('{databaseId}', database_id)
|
|
322
|
-
|
|
323
|
-
if database_id.nil?
|
|
324
|
+
if database_id.nil? || database_id == ''
|
|
324
325
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
325
326
|
end
|
|
326
327
|
|
|
328
|
+
api_path = '/databases/{databaseId}'
|
|
329
|
+
.gsub('{databaseId}', database_id)
|
|
330
|
+
|
|
327
331
|
api_params = {}
|
|
328
332
|
|
|
329
333
|
api_headers = {
|
|
@@ -348,23 +352,26 @@ module Appwrite
|
|
|
348
352
|
# @param [String] database_id Database ID.
|
|
349
353
|
# @param [String] name Database name. Max length: 128 chars.
|
|
350
354
|
# @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.
|
|
355
|
+
# @param [String] description Optional description for the database.
|
|
351
356
|
#
|
|
352
357
|
# @return [Database]
|
|
353
358
|
def update(
|
|
354
359
|
database_id:,
|
|
355
360
|
name: nil,
|
|
356
|
-
enabled: nil
|
|
361
|
+
enabled: nil,
|
|
362
|
+
description: nil
|
|
357
363
|
)
|
|
358
|
-
|
|
359
|
-
.gsub('{databaseId}', database_id)
|
|
360
|
-
|
|
361
|
-
if database_id.nil?
|
|
364
|
+
if database_id.nil? || database_id == ''
|
|
362
365
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
363
366
|
end
|
|
364
367
|
|
|
368
|
+
api_path = '/databases/{databaseId}'
|
|
369
|
+
.gsub('{databaseId}', database_id)
|
|
370
|
+
|
|
365
371
|
api_params = {
|
|
366
372
|
name: name,
|
|
367
373
|
enabled: enabled,
|
|
374
|
+
description: description,
|
|
368
375
|
}
|
|
369
376
|
|
|
370
377
|
api_headers = {
|
|
@@ -394,18 +401,19 @@ module Appwrite
|
|
|
394
401
|
def delete(
|
|
395
402
|
database_id:
|
|
396
403
|
)
|
|
397
|
-
|
|
398
|
-
.gsub('{databaseId}', database_id)
|
|
399
|
-
|
|
400
|
-
if database_id.nil?
|
|
404
|
+
if database_id.nil? || database_id == ''
|
|
401
405
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
402
406
|
end
|
|
403
407
|
|
|
408
|
+
api_path = '/databases/{databaseId}'
|
|
409
|
+
.gsub('{databaseId}', database_id)
|
|
410
|
+
|
|
404
411
|
api_params = {}
|
|
405
412
|
|
|
406
413
|
api_headers = {
|
|
407
414
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
408
415
|
"content-type": 'application/json',
|
|
416
|
+
"accept": 'application/json',
|
|
409
417
|
}
|
|
410
418
|
|
|
411
419
|
@client.call(
|
|
@@ -434,13 +442,13 @@ module Appwrite
|
|
|
434
442
|
search: nil,
|
|
435
443
|
total: nil
|
|
436
444
|
)
|
|
437
|
-
|
|
438
|
-
.gsub('{databaseId}', database_id)
|
|
439
|
-
|
|
440
|
-
if database_id.nil?
|
|
445
|
+
if database_id.nil? || database_id == ''
|
|
441
446
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
442
447
|
end
|
|
443
448
|
|
|
449
|
+
api_path = '/databases/{databaseId}/collections'
|
|
450
|
+
.gsub('{databaseId}', database_id)
|
|
451
|
+
|
|
444
452
|
api_params = {
|
|
445
453
|
queries: queries,
|
|
446
454
|
search: search,
|
|
@@ -476,7 +484,8 @@ module Appwrite
|
|
|
476
484
|
# @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).
|
|
477
485
|
# @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.
|
|
478
486
|
# @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.
|
|
479
|
-
# @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).
|
|
487
|
+
# @param [Array] indexes Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial, trigram), attributes (array of attribute keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
|
|
488
|
+
# @param [String] description Optional description for the collection.
|
|
480
489
|
#
|
|
481
490
|
# @return [Collection]
|
|
482
491
|
def create_collection(
|
|
@@ -487,12 +496,10 @@ module Appwrite
|
|
|
487
496
|
document_security: nil,
|
|
488
497
|
enabled: nil,
|
|
489
498
|
attributes: nil,
|
|
490
|
-
indexes: nil
|
|
499
|
+
indexes: nil,
|
|
500
|
+
description: nil
|
|
491
501
|
)
|
|
492
|
-
|
|
493
|
-
.gsub('{databaseId}', database_id)
|
|
494
|
-
|
|
495
|
-
if database_id.nil?
|
|
502
|
+
if database_id.nil? || database_id == ''
|
|
496
503
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
497
504
|
end
|
|
498
505
|
|
|
@@ -504,6 +511,9 @@ module Appwrite
|
|
|
504
511
|
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
505
512
|
end
|
|
506
513
|
|
|
514
|
+
api_path = '/databases/{databaseId}/collections'
|
|
515
|
+
.gsub('{databaseId}', database_id)
|
|
516
|
+
|
|
507
517
|
api_params = {
|
|
508
518
|
collectionId: collection_id,
|
|
509
519
|
name: name,
|
|
@@ -512,6 +522,7 @@ module Appwrite
|
|
|
512
522
|
enabled: enabled,
|
|
513
523
|
attributes: attributes,
|
|
514
524
|
indexes: indexes,
|
|
525
|
+
description: description,
|
|
515
526
|
}
|
|
516
527
|
|
|
517
528
|
api_headers = {
|
|
@@ -543,18 +554,18 @@ module Appwrite
|
|
|
543
554
|
database_id:,
|
|
544
555
|
collection_id:
|
|
545
556
|
)
|
|
546
|
-
|
|
547
|
-
.gsub('{databaseId}', database_id)
|
|
548
|
-
.gsub('{collectionId}', collection_id)
|
|
549
|
-
|
|
550
|
-
if database_id.nil?
|
|
557
|
+
if database_id.nil? || database_id == ''
|
|
551
558
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
552
559
|
end
|
|
553
560
|
|
|
554
|
-
if collection_id.nil?
|
|
561
|
+
if collection_id.nil? || collection_id == ''
|
|
555
562
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
556
563
|
end
|
|
557
564
|
|
|
565
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
566
|
+
.gsub('{databaseId}', database_id)
|
|
567
|
+
.gsub('{collectionId}', collection_id)
|
|
568
|
+
|
|
558
569
|
api_params = {}
|
|
559
570
|
|
|
560
571
|
api_headers = {
|
|
@@ -583,6 +594,7 @@ module Appwrite
|
|
|
583
594
|
# @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).
|
|
584
595
|
# @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.
|
|
585
596
|
# @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.
|
|
597
|
+
# @param [String] description Optional description for the collection.
|
|
586
598
|
#
|
|
587
599
|
# @return [Collection]
|
|
588
600
|
def update_collection(
|
|
@@ -592,26 +604,28 @@ module Appwrite
|
|
|
592
604
|
permissions: nil,
|
|
593
605
|
document_security: nil,
|
|
594
606
|
enabled: nil,
|
|
595
|
-
purge: nil
|
|
607
|
+
purge: nil,
|
|
608
|
+
description: nil
|
|
596
609
|
)
|
|
597
|
-
|
|
598
|
-
.gsub('{databaseId}', database_id)
|
|
599
|
-
.gsub('{collectionId}', collection_id)
|
|
600
|
-
|
|
601
|
-
if database_id.nil?
|
|
610
|
+
if database_id.nil? || database_id == ''
|
|
602
611
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
603
612
|
end
|
|
604
613
|
|
|
605
|
-
if collection_id.nil?
|
|
614
|
+
if collection_id.nil? || collection_id == ''
|
|
606
615
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
607
616
|
end
|
|
608
617
|
|
|
618
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
619
|
+
.gsub('{databaseId}', database_id)
|
|
620
|
+
.gsub('{collectionId}', collection_id)
|
|
621
|
+
|
|
609
622
|
api_params = {
|
|
610
623
|
name: name,
|
|
611
624
|
permissions: permissions,
|
|
612
625
|
documentSecurity: document_security,
|
|
613
626
|
enabled: enabled,
|
|
614
627
|
purge: purge,
|
|
628
|
+
description: description,
|
|
615
629
|
}
|
|
616
630
|
|
|
617
631
|
api_headers = {
|
|
@@ -643,23 +657,24 @@ module Appwrite
|
|
|
643
657
|
database_id:,
|
|
644
658
|
collection_id:
|
|
645
659
|
)
|
|
646
|
-
|
|
647
|
-
.gsub('{databaseId}', database_id)
|
|
648
|
-
.gsub('{collectionId}', collection_id)
|
|
649
|
-
|
|
650
|
-
if database_id.nil?
|
|
660
|
+
if database_id.nil? || database_id == ''
|
|
651
661
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
652
662
|
end
|
|
653
663
|
|
|
654
|
-
if collection_id.nil?
|
|
664
|
+
if collection_id.nil? || collection_id == ''
|
|
655
665
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
656
666
|
end
|
|
657
667
|
|
|
668
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}'
|
|
669
|
+
.gsub('{databaseId}', database_id)
|
|
670
|
+
.gsub('{collectionId}', collection_id)
|
|
671
|
+
|
|
658
672
|
api_params = {}
|
|
659
673
|
|
|
660
674
|
api_headers = {
|
|
661
675
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
662
676
|
"content-type": 'application/json',
|
|
677
|
+
"accept": 'application/json',
|
|
663
678
|
}
|
|
664
679
|
|
|
665
680
|
@client.call(
|
|
@@ -687,18 +702,18 @@ module Appwrite
|
|
|
687
702
|
queries: nil,
|
|
688
703
|
total: nil
|
|
689
704
|
)
|
|
690
|
-
|
|
691
|
-
.gsub('{databaseId}', database_id)
|
|
692
|
-
.gsub('{collectionId}', collection_id)
|
|
693
|
-
|
|
694
|
-
if database_id.nil?
|
|
705
|
+
if database_id.nil? || database_id == ''
|
|
695
706
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
696
707
|
end
|
|
697
708
|
|
|
698
|
-
if collection_id.nil?
|
|
709
|
+
if collection_id.nil? || collection_id == ''
|
|
699
710
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
700
711
|
end
|
|
701
712
|
|
|
713
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes'
|
|
714
|
+
.gsub('{databaseId}', database_id)
|
|
715
|
+
.gsub('{collectionId}', collection_id)
|
|
716
|
+
|
|
702
717
|
api_params = {
|
|
703
718
|
queries: queries,
|
|
704
719
|
total: total,
|
|
@@ -733,6 +748,7 @@ module Appwrite
|
|
|
733
748
|
# @param [Integer] max Maximum value
|
|
734
749
|
# @param [Integer] default Default value. Cannot be set when attribute is required.
|
|
735
750
|
# @param [] array Is attribute an array?
|
|
751
|
+
# @param [String] description Optional description for the attribute.
|
|
736
752
|
#
|
|
737
753
|
# @return [AttributeBigint]
|
|
738
754
|
def create_big_int_attribute(
|
|
@@ -743,17 +759,14 @@ module Appwrite
|
|
|
743
759
|
min: nil,
|
|
744
760
|
max: nil,
|
|
745
761
|
default: nil,
|
|
746
|
-
array: nil
|
|
762
|
+
array: nil,
|
|
763
|
+
description: nil
|
|
747
764
|
)
|
|
748
|
-
|
|
749
|
-
.gsub('{databaseId}', database_id)
|
|
750
|
-
.gsub('{collectionId}', collection_id)
|
|
751
|
-
|
|
752
|
-
if database_id.nil?
|
|
765
|
+
if database_id.nil? || database_id == ''
|
|
753
766
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
754
767
|
end
|
|
755
768
|
|
|
756
|
-
if collection_id.nil?
|
|
769
|
+
if collection_id.nil? || collection_id == ''
|
|
757
770
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
758
771
|
end
|
|
759
772
|
|
|
@@ -765,6 +778,10 @@ module Appwrite
|
|
|
765
778
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
766
779
|
end
|
|
767
780
|
|
|
781
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint'
|
|
782
|
+
.gsub('{databaseId}', database_id)
|
|
783
|
+
.gsub('{collectionId}', collection_id)
|
|
784
|
+
|
|
768
785
|
api_params = {
|
|
769
786
|
key: key,
|
|
770
787
|
required: required,
|
|
@@ -772,6 +789,7 @@ module Appwrite
|
|
|
772
789
|
max: max,
|
|
773
790
|
default: default,
|
|
774
791
|
array: array,
|
|
792
|
+
description: description,
|
|
775
793
|
}
|
|
776
794
|
|
|
777
795
|
api_headers = {
|
|
@@ -804,6 +822,7 @@ module Appwrite
|
|
|
804
822
|
# @param [Integer] min Minimum value
|
|
805
823
|
# @param [Integer] max Maximum value
|
|
806
824
|
# @param [String] new_key New Attribute Key.
|
|
825
|
+
# @param [String] description Optional description for the attribute.
|
|
807
826
|
#
|
|
808
827
|
# @return [AttributeBigint]
|
|
809
828
|
def update_big_int_attribute(
|
|
@@ -814,22 +833,18 @@ module Appwrite
|
|
|
814
833
|
default:,
|
|
815
834
|
min: nil,
|
|
816
835
|
max: nil,
|
|
817
|
-
new_key: nil
|
|
836
|
+
new_key: nil,
|
|
837
|
+
description: nil
|
|
818
838
|
)
|
|
819
|
-
|
|
820
|
-
.gsub('{databaseId}', database_id)
|
|
821
|
-
.gsub('{collectionId}', collection_id)
|
|
822
|
-
.gsub('{key}', key)
|
|
823
|
-
|
|
824
|
-
if database_id.nil?
|
|
839
|
+
if database_id.nil? || database_id == ''
|
|
825
840
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
826
841
|
end
|
|
827
842
|
|
|
828
|
-
if collection_id.nil?
|
|
843
|
+
if collection_id.nil? || collection_id == ''
|
|
829
844
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
830
845
|
end
|
|
831
846
|
|
|
832
|
-
if key.nil?
|
|
847
|
+
if key.nil? || key == ''
|
|
833
848
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
834
849
|
end
|
|
835
850
|
|
|
@@ -841,12 +856,18 @@ module Appwrite
|
|
|
841
856
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
842
857
|
end
|
|
843
858
|
|
|
859
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/bigint/{key}'
|
|
860
|
+
.gsub('{databaseId}', database_id)
|
|
861
|
+
.gsub('{collectionId}', collection_id)
|
|
862
|
+
.gsub('{key}', key)
|
|
863
|
+
|
|
844
864
|
api_params = {
|
|
845
865
|
required: required,
|
|
846
866
|
min: min,
|
|
847
867
|
max: max,
|
|
848
868
|
default: default,
|
|
849
869
|
newKey: new_key,
|
|
870
|
+
description: description,
|
|
850
871
|
}
|
|
851
872
|
|
|
852
873
|
api_headers = {
|
|
@@ -876,6 +897,7 @@ module Appwrite
|
|
|
876
897
|
# @param [] required Is attribute required?
|
|
877
898
|
# @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
878
899
|
# @param [] array Is attribute an array?
|
|
900
|
+
# @param [String] description Optional description for the attribute.
|
|
879
901
|
#
|
|
880
902
|
# @return [AttributeBoolean]
|
|
881
903
|
def create_boolean_attribute(
|
|
@@ -884,17 +906,14 @@ module Appwrite
|
|
|
884
906
|
key:,
|
|
885
907
|
required:,
|
|
886
908
|
default: nil,
|
|
887
|
-
array: nil
|
|
909
|
+
array: nil,
|
|
910
|
+
description: nil
|
|
888
911
|
)
|
|
889
|
-
|
|
890
|
-
.gsub('{databaseId}', database_id)
|
|
891
|
-
.gsub('{collectionId}', collection_id)
|
|
892
|
-
|
|
893
|
-
if database_id.nil?
|
|
912
|
+
if database_id.nil? || database_id == ''
|
|
894
913
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
895
914
|
end
|
|
896
915
|
|
|
897
|
-
if collection_id.nil?
|
|
916
|
+
if collection_id.nil? || collection_id == ''
|
|
898
917
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
899
918
|
end
|
|
900
919
|
|
|
@@ -906,11 +925,16 @@ module Appwrite
|
|
|
906
925
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
907
926
|
end
|
|
908
927
|
|
|
928
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'
|
|
929
|
+
.gsub('{databaseId}', database_id)
|
|
930
|
+
.gsub('{collectionId}', collection_id)
|
|
931
|
+
|
|
909
932
|
api_params = {
|
|
910
933
|
key: key,
|
|
911
934
|
required: required,
|
|
912
935
|
default: default,
|
|
913
936
|
array: array,
|
|
937
|
+
description: description,
|
|
914
938
|
}
|
|
915
939
|
|
|
916
940
|
api_headers = {
|
|
@@ -940,6 +964,7 @@ module Appwrite
|
|
|
940
964
|
# @param [] required Is attribute required?
|
|
941
965
|
# @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
942
966
|
# @param [String] new_key New attribute key.
|
|
967
|
+
# @param [String] description Optional description for the attribute.
|
|
943
968
|
#
|
|
944
969
|
# @return [AttributeBoolean]
|
|
945
970
|
def update_boolean_attribute(
|
|
@@ -948,22 +973,18 @@ module Appwrite
|
|
|
948
973
|
key:,
|
|
949
974
|
required:,
|
|
950
975
|
default:,
|
|
951
|
-
new_key: nil
|
|
976
|
+
new_key: nil,
|
|
977
|
+
description: nil
|
|
952
978
|
)
|
|
953
|
-
|
|
954
|
-
.gsub('{databaseId}', database_id)
|
|
955
|
-
.gsub('{collectionId}', collection_id)
|
|
956
|
-
.gsub('{key}', key)
|
|
957
|
-
|
|
958
|
-
if database_id.nil?
|
|
979
|
+
if database_id.nil? || database_id == ''
|
|
959
980
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
960
981
|
end
|
|
961
982
|
|
|
962
|
-
if collection_id.nil?
|
|
983
|
+
if collection_id.nil? || collection_id == ''
|
|
963
984
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
964
985
|
end
|
|
965
986
|
|
|
966
|
-
if key.nil?
|
|
987
|
+
if key.nil? || key == ''
|
|
967
988
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
968
989
|
end
|
|
969
990
|
|
|
@@ -975,10 +996,16 @@ module Appwrite
|
|
|
975
996
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
976
997
|
end
|
|
977
998
|
|
|
999
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'
|
|
1000
|
+
.gsub('{databaseId}', database_id)
|
|
1001
|
+
.gsub('{collectionId}', collection_id)
|
|
1002
|
+
.gsub('{key}', key)
|
|
1003
|
+
|
|
978
1004
|
api_params = {
|
|
979
1005
|
required: required,
|
|
980
1006
|
default: default,
|
|
981
1007
|
newKey: new_key,
|
|
1008
|
+
description: description,
|
|
982
1009
|
}
|
|
983
1010
|
|
|
984
1011
|
api_headers = {
|
|
@@ -1007,6 +1034,7 @@ module Appwrite
|
|
|
1007
1034
|
# @param [] required Is attribute required?
|
|
1008
1035
|
# @param [String] default Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
|
1009
1036
|
# @param [] array Is attribute an array?
|
|
1037
|
+
# @param [String] description Optional description for the attribute.
|
|
1010
1038
|
#
|
|
1011
1039
|
# @return [AttributeDatetime]
|
|
1012
1040
|
def create_datetime_attribute(
|
|
@@ -1015,17 +1043,14 @@ module Appwrite
|
|
|
1015
1043
|
key:,
|
|
1016
1044
|
required:,
|
|
1017
1045
|
default: nil,
|
|
1018
|
-
array: nil
|
|
1046
|
+
array: nil,
|
|
1047
|
+
description: nil
|
|
1019
1048
|
)
|
|
1020
|
-
|
|
1021
|
-
.gsub('{databaseId}', database_id)
|
|
1022
|
-
.gsub('{collectionId}', collection_id)
|
|
1023
|
-
|
|
1024
|
-
if database_id.nil?
|
|
1049
|
+
if database_id.nil? || database_id == ''
|
|
1025
1050
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1026
1051
|
end
|
|
1027
1052
|
|
|
1028
|
-
if collection_id.nil?
|
|
1053
|
+
if collection_id.nil? || collection_id == ''
|
|
1029
1054
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1030
1055
|
end
|
|
1031
1056
|
|
|
@@ -1037,11 +1062,16 @@ module Appwrite
|
|
|
1037
1062
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1038
1063
|
end
|
|
1039
1064
|
|
|
1065
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'
|
|
1066
|
+
.gsub('{databaseId}', database_id)
|
|
1067
|
+
.gsub('{collectionId}', collection_id)
|
|
1068
|
+
|
|
1040
1069
|
api_params = {
|
|
1041
1070
|
key: key,
|
|
1042
1071
|
required: required,
|
|
1043
1072
|
default: default,
|
|
1044
1073
|
array: array,
|
|
1074
|
+
description: description,
|
|
1045
1075
|
}
|
|
1046
1076
|
|
|
1047
1077
|
api_headers = {
|
|
@@ -1071,6 +1101,7 @@ module Appwrite
|
|
|
1071
1101
|
# @param [] required Is attribute required?
|
|
1072
1102
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1073
1103
|
# @param [String] new_key New attribute key.
|
|
1104
|
+
# @param [String] description Optional description for the attribute.
|
|
1074
1105
|
#
|
|
1075
1106
|
# @return [AttributeDatetime]
|
|
1076
1107
|
def update_datetime_attribute(
|
|
@@ -1079,22 +1110,18 @@ module Appwrite
|
|
|
1079
1110
|
key:,
|
|
1080
1111
|
required:,
|
|
1081
1112
|
default:,
|
|
1082
|
-
new_key: nil
|
|
1113
|
+
new_key: nil,
|
|
1114
|
+
description: nil
|
|
1083
1115
|
)
|
|
1084
|
-
|
|
1085
|
-
.gsub('{databaseId}', database_id)
|
|
1086
|
-
.gsub('{collectionId}', collection_id)
|
|
1087
|
-
.gsub('{key}', key)
|
|
1088
|
-
|
|
1089
|
-
if database_id.nil?
|
|
1116
|
+
if database_id.nil? || database_id == ''
|
|
1090
1117
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1091
1118
|
end
|
|
1092
1119
|
|
|
1093
|
-
if collection_id.nil?
|
|
1120
|
+
if collection_id.nil? || collection_id == ''
|
|
1094
1121
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1095
1122
|
end
|
|
1096
1123
|
|
|
1097
|
-
if key.nil?
|
|
1124
|
+
if key.nil? || key == ''
|
|
1098
1125
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1099
1126
|
end
|
|
1100
1127
|
|
|
@@ -1106,10 +1133,16 @@ module Appwrite
|
|
|
1106
1133
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1107
1134
|
end
|
|
1108
1135
|
|
|
1136
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'
|
|
1137
|
+
.gsub('{databaseId}', database_id)
|
|
1138
|
+
.gsub('{collectionId}', collection_id)
|
|
1139
|
+
.gsub('{key}', key)
|
|
1140
|
+
|
|
1109
1141
|
api_params = {
|
|
1110
1142
|
required: required,
|
|
1111
1143
|
default: default,
|
|
1112
1144
|
newKey: new_key,
|
|
1145
|
+
description: description,
|
|
1113
1146
|
}
|
|
1114
1147
|
|
|
1115
1148
|
api_headers = {
|
|
@@ -1139,6 +1172,7 @@ module Appwrite
|
|
|
1139
1172
|
# @param [] required Is attribute required?
|
|
1140
1173
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1141
1174
|
# @param [] array Is attribute an array?
|
|
1175
|
+
# @param [String] description Optional description for the attribute.
|
|
1142
1176
|
#
|
|
1143
1177
|
# @return [AttributeEmail]
|
|
1144
1178
|
def create_email_attribute(
|
|
@@ -1147,17 +1181,14 @@ module Appwrite
|
|
|
1147
1181
|
key:,
|
|
1148
1182
|
required:,
|
|
1149
1183
|
default: nil,
|
|
1150
|
-
array: nil
|
|
1184
|
+
array: nil,
|
|
1185
|
+
description: nil
|
|
1151
1186
|
)
|
|
1152
|
-
|
|
1153
|
-
.gsub('{databaseId}', database_id)
|
|
1154
|
-
.gsub('{collectionId}', collection_id)
|
|
1155
|
-
|
|
1156
|
-
if database_id.nil?
|
|
1187
|
+
if database_id.nil? || database_id == ''
|
|
1157
1188
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1158
1189
|
end
|
|
1159
1190
|
|
|
1160
|
-
if collection_id.nil?
|
|
1191
|
+
if collection_id.nil? || collection_id == ''
|
|
1161
1192
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1162
1193
|
end
|
|
1163
1194
|
|
|
@@ -1169,11 +1200,16 @@ module Appwrite
|
|
|
1169
1200
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1170
1201
|
end
|
|
1171
1202
|
|
|
1203
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email'
|
|
1204
|
+
.gsub('{databaseId}', database_id)
|
|
1205
|
+
.gsub('{collectionId}', collection_id)
|
|
1206
|
+
|
|
1172
1207
|
api_params = {
|
|
1173
1208
|
key: key,
|
|
1174
1209
|
required: required,
|
|
1175
1210
|
default: default,
|
|
1176
1211
|
array: array,
|
|
1212
|
+
description: description,
|
|
1177
1213
|
}
|
|
1178
1214
|
|
|
1179
1215
|
api_headers = {
|
|
@@ -1204,6 +1240,7 @@ module Appwrite
|
|
|
1204
1240
|
# @param [] required Is attribute required?
|
|
1205
1241
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1206
1242
|
# @param [String] new_key New Attribute Key.
|
|
1243
|
+
# @param [String] description Optional description for the attribute.
|
|
1207
1244
|
#
|
|
1208
1245
|
# @return [AttributeEmail]
|
|
1209
1246
|
def update_email_attribute(
|
|
@@ -1212,22 +1249,18 @@ module Appwrite
|
|
|
1212
1249
|
key:,
|
|
1213
1250
|
required:,
|
|
1214
1251
|
default:,
|
|
1215
|
-
new_key: nil
|
|
1252
|
+
new_key: nil,
|
|
1253
|
+
description: nil
|
|
1216
1254
|
)
|
|
1217
|
-
|
|
1218
|
-
.gsub('{databaseId}', database_id)
|
|
1219
|
-
.gsub('{collectionId}', collection_id)
|
|
1220
|
-
.gsub('{key}', key)
|
|
1221
|
-
|
|
1222
|
-
if database_id.nil?
|
|
1255
|
+
if database_id.nil? || database_id == ''
|
|
1223
1256
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1224
1257
|
end
|
|
1225
1258
|
|
|
1226
|
-
if collection_id.nil?
|
|
1259
|
+
if collection_id.nil? || collection_id == ''
|
|
1227
1260
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1228
1261
|
end
|
|
1229
1262
|
|
|
1230
|
-
if key.nil?
|
|
1263
|
+
if key.nil? || key == ''
|
|
1231
1264
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1232
1265
|
end
|
|
1233
1266
|
|
|
@@ -1239,10 +1272,16 @@ module Appwrite
|
|
|
1239
1272
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1240
1273
|
end
|
|
1241
1274
|
|
|
1275
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'
|
|
1276
|
+
.gsub('{databaseId}', database_id)
|
|
1277
|
+
.gsub('{collectionId}', collection_id)
|
|
1278
|
+
.gsub('{key}', key)
|
|
1279
|
+
|
|
1242
1280
|
api_params = {
|
|
1243
1281
|
required: required,
|
|
1244
1282
|
default: default,
|
|
1245
1283
|
newKey: new_key,
|
|
1284
|
+
description: description,
|
|
1246
1285
|
}
|
|
1247
1286
|
|
|
1248
1287
|
api_headers = {
|
|
@@ -1274,6 +1313,7 @@ module Appwrite
|
|
|
1274
1313
|
# @param [] required Is attribute required?
|
|
1275
1314
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1276
1315
|
# @param [] array Is attribute an array?
|
|
1316
|
+
# @param [String] description Optional description for the attribute.
|
|
1277
1317
|
#
|
|
1278
1318
|
# @return [AttributeEnum]
|
|
1279
1319
|
def create_enum_attribute(
|
|
@@ -1283,17 +1323,14 @@ module Appwrite
|
|
|
1283
1323
|
elements:,
|
|
1284
1324
|
required:,
|
|
1285
1325
|
default: nil,
|
|
1286
|
-
array: nil
|
|
1326
|
+
array: nil,
|
|
1327
|
+
description: nil
|
|
1287
1328
|
)
|
|
1288
|
-
|
|
1289
|
-
.gsub('{databaseId}', database_id)
|
|
1290
|
-
.gsub('{collectionId}', collection_id)
|
|
1291
|
-
|
|
1292
|
-
if database_id.nil?
|
|
1329
|
+
if database_id.nil? || database_id == ''
|
|
1293
1330
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1294
1331
|
end
|
|
1295
1332
|
|
|
1296
|
-
if collection_id.nil?
|
|
1333
|
+
if collection_id.nil? || collection_id == ''
|
|
1297
1334
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1298
1335
|
end
|
|
1299
1336
|
|
|
@@ -1309,12 +1346,17 @@ module Appwrite
|
|
|
1309
1346
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1310
1347
|
end
|
|
1311
1348
|
|
|
1349
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'
|
|
1350
|
+
.gsub('{databaseId}', database_id)
|
|
1351
|
+
.gsub('{collectionId}', collection_id)
|
|
1352
|
+
|
|
1312
1353
|
api_params = {
|
|
1313
1354
|
key: key,
|
|
1314
1355
|
elements: elements,
|
|
1315
1356
|
required: required,
|
|
1316
1357
|
default: default,
|
|
1317
1358
|
array: array,
|
|
1359
|
+
description: description,
|
|
1318
1360
|
}
|
|
1319
1361
|
|
|
1320
1362
|
api_headers = {
|
|
@@ -1346,6 +1388,7 @@ module Appwrite
|
|
|
1346
1388
|
# @param [] required Is attribute required?
|
|
1347
1389
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1348
1390
|
# @param [String] new_key New Attribute Key.
|
|
1391
|
+
# @param [String] description Optional description for the attribute.
|
|
1349
1392
|
#
|
|
1350
1393
|
# @return [AttributeEnum]
|
|
1351
1394
|
def update_enum_attribute(
|
|
@@ -1355,22 +1398,18 @@ module Appwrite
|
|
|
1355
1398
|
elements:,
|
|
1356
1399
|
required:,
|
|
1357
1400
|
default:,
|
|
1358
|
-
new_key: nil
|
|
1401
|
+
new_key: nil,
|
|
1402
|
+
description: nil
|
|
1359
1403
|
)
|
|
1360
|
-
|
|
1361
|
-
.gsub('{databaseId}', database_id)
|
|
1362
|
-
.gsub('{collectionId}', collection_id)
|
|
1363
|
-
.gsub('{key}', key)
|
|
1364
|
-
|
|
1365
|
-
if database_id.nil?
|
|
1404
|
+
if database_id.nil? || database_id == ''
|
|
1366
1405
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1367
1406
|
end
|
|
1368
1407
|
|
|
1369
|
-
if collection_id.nil?
|
|
1408
|
+
if collection_id.nil? || collection_id == ''
|
|
1370
1409
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1371
1410
|
end
|
|
1372
1411
|
|
|
1373
|
-
if key.nil?
|
|
1412
|
+
if key.nil? || key == ''
|
|
1374
1413
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1375
1414
|
end
|
|
1376
1415
|
|
|
@@ -1386,11 +1425,17 @@ module Appwrite
|
|
|
1386
1425
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1387
1426
|
end
|
|
1388
1427
|
|
|
1428
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'
|
|
1429
|
+
.gsub('{databaseId}', database_id)
|
|
1430
|
+
.gsub('{collectionId}', collection_id)
|
|
1431
|
+
.gsub('{key}', key)
|
|
1432
|
+
|
|
1389
1433
|
api_params = {
|
|
1390
1434
|
elements: elements,
|
|
1391
1435
|
required: required,
|
|
1392
1436
|
default: default,
|
|
1393
1437
|
newKey: new_key,
|
|
1438
|
+
description: description,
|
|
1394
1439
|
}
|
|
1395
1440
|
|
|
1396
1441
|
api_headers = {
|
|
@@ -1423,6 +1468,7 @@ module Appwrite
|
|
|
1423
1468
|
# @param [Float] max Maximum value.
|
|
1424
1469
|
# @param [Float] default Default value. Cannot be set when required.
|
|
1425
1470
|
# @param [] array Is attribute an array?
|
|
1471
|
+
# @param [String] description Optional description for the attribute.
|
|
1426
1472
|
#
|
|
1427
1473
|
# @return [AttributeFloat]
|
|
1428
1474
|
def create_float_attribute(
|
|
@@ -1433,17 +1479,14 @@ module Appwrite
|
|
|
1433
1479
|
min: nil,
|
|
1434
1480
|
max: nil,
|
|
1435
1481
|
default: nil,
|
|
1436
|
-
array: nil
|
|
1482
|
+
array: nil,
|
|
1483
|
+
description: nil
|
|
1437
1484
|
)
|
|
1438
|
-
|
|
1439
|
-
.gsub('{databaseId}', database_id)
|
|
1440
|
-
.gsub('{collectionId}', collection_id)
|
|
1441
|
-
|
|
1442
|
-
if database_id.nil?
|
|
1485
|
+
if database_id.nil? || database_id == ''
|
|
1443
1486
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1444
1487
|
end
|
|
1445
1488
|
|
|
1446
|
-
if collection_id.nil?
|
|
1489
|
+
if collection_id.nil? || collection_id == ''
|
|
1447
1490
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1448
1491
|
end
|
|
1449
1492
|
|
|
@@ -1455,6 +1498,10 @@ module Appwrite
|
|
|
1455
1498
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1456
1499
|
end
|
|
1457
1500
|
|
|
1501
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float'
|
|
1502
|
+
.gsub('{databaseId}', database_id)
|
|
1503
|
+
.gsub('{collectionId}', collection_id)
|
|
1504
|
+
|
|
1458
1505
|
api_params = {
|
|
1459
1506
|
key: key,
|
|
1460
1507
|
required: required,
|
|
@@ -1462,6 +1509,7 @@ module Appwrite
|
|
|
1462
1509
|
max: max,
|
|
1463
1510
|
default: default,
|
|
1464
1511
|
array: array,
|
|
1512
|
+
description: description,
|
|
1465
1513
|
}
|
|
1466
1514
|
|
|
1467
1515
|
api_headers = {
|
|
@@ -1494,6 +1542,7 @@ module Appwrite
|
|
|
1494
1542
|
# @param [Float] min Minimum value.
|
|
1495
1543
|
# @param [Float] max Maximum value.
|
|
1496
1544
|
# @param [String] new_key New Attribute Key.
|
|
1545
|
+
# @param [String] description Optional description for the attribute.
|
|
1497
1546
|
#
|
|
1498
1547
|
# @return [AttributeFloat]
|
|
1499
1548
|
def update_float_attribute(
|
|
@@ -1504,22 +1553,18 @@ module Appwrite
|
|
|
1504
1553
|
default:,
|
|
1505
1554
|
min: nil,
|
|
1506
1555
|
max: nil,
|
|
1507
|
-
new_key: nil
|
|
1556
|
+
new_key: nil,
|
|
1557
|
+
description: nil
|
|
1508
1558
|
)
|
|
1509
|
-
|
|
1510
|
-
.gsub('{databaseId}', database_id)
|
|
1511
|
-
.gsub('{collectionId}', collection_id)
|
|
1512
|
-
.gsub('{key}', key)
|
|
1513
|
-
|
|
1514
|
-
if database_id.nil?
|
|
1559
|
+
if database_id.nil? || database_id == ''
|
|
1515
1560
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1516
1561
|
end
|
|
1517
1562
|
|
|
1518
|
-
if collection_id.nil?
|
|
1563
|
+
if collection_id.nil? || collection_id == ''
|
|
1519
1564
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1520
1565
|
end
|
|
1521
1566
|
|
|
1522
|
-
if key.nil?
|
|
1567
|
+
if key.nil? || key == ''
|
|
1523
1568
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1524
1569
|
end
|
|
1525
1570
|
|
|
@@ -1531,12 +1576,18 @@ module Appwrite
|
|
|
1531
1576
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1532
1577
|
end
|
|
1533
1578
|
|
|
1579
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'
|
|
1580
|
+
.gsub('{databaseId}', database_id)
|
|
1581
|
+
.gsub('{collectionId}', collection_id)
|
|
1582
|
+
.gsub('{key}', key)
|
|
1583
|
+
|
|
1534
1584
|
api_params = {
|
|
1535
1585
|
required: required,
|
|
1536
1586
|
min: min,
|
|
1537
1587
|
max: max,
|
|
1538
1588
|
default: default,
|
|
1539
1589
|
newKey: new_key,
|
|
1590
|
+
description: description,
|
|
1540
1591
|
}
|
|
1541
1592
|
|
|
1542
1593
|
api_headers = {
|
|
@@ -1569,6 +1620,7 @@ module Appwrite
|
|
|
1569
1620
|
# @param [Integer] max Maximum value
|
|
1570
1621
|
# @param [Integer] default Default value. Cannot be set when attribute is required.
|
|
1571
1622
|
# @param [] array Is attribute an array?
|
|
1623
|
+
# @param [String] description Optional description for the attribute.
|
|
1572
1624
|
#
|
|
1573
1625
|
# @return [AttributeInteger]
|
|
1574
1626
|
def create_integer_attribute(
|
|
@@ -1579,17 +1631,14 @@ module Appwrite
|
|
|
1579
1631
|
min: nil,
|
|
1580
1632
|
max: nil,
|
|
1581
1633
|
default: nil,
|
|
1582
|
-
array: nil
|
|
1634
|
+
array: nil,
|
|
1635
|
+
description: nil
|
|
1583
1636
|
)
|
|
1584
|
-
|
|
1585
|
-
.gsub('{databaseId}', database_id)
|
|
1586
|
-
.gsub('{collectionId}', collection_id)
|
|
1587
|
-
|
|
1588
|
-
if database_id.nil?
|
|
1637
|
+
if database_id.nil? || database_id == ''
|
|
1589
1638
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1590
1639
|
end
|
|
1591
1640
|
|
|
1592
|
-
if collection_id.nil?
|
|
1641
|
+
if collection_id.nil? || collection_id == ''
|
|
1593
1642
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1594
1643
|
end
|
|
1595
1644
|
|
|
@@ -1601,6 +1650,10 @@ module Appwrite
|
|
|
1601
1650
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1602
1651
|
end
|
|
1603
1652
|
|
|
1653
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'
|
|
1654
|
+
.gsub('{databaseId}', database_id)
|
|
1655
|
+
.gsub('{collectionId}', collection_id)
|
|
1656
|
+
|
|
1604
1657
|
api_params = {
|
|
1605
1658
|
key: key,
|
|
1606
1659
|
required: required,
|
|
@@ -1608,6 +1661,7 @@ module Appwrite
|
|
|
1608
1661
|
max: max,
|
|
1609
1662
|
default: default,
|
|
1610
1663
|
array: array,
|
|
1664
|
+
description: description,
|
|
1611
1665
|
}
|
|
1612
1666
|
|
|
1613
1667
|
api_headers = {
|
|
@@ -1640,6 +1694,7 @@ module Appwrite
|
|
|
1640
1694
|
# @param [Integer] min Minimum value
|
|
1641
1695
|
# @param [Integer] max Maximum value
|
|
1642
1696
|
# @param [String] new_key New Attribute Key.
|
|
1697
|
+
# @param [String] description Optional description for the attribute.
|
|
1643
1698
|
#
|
|
1644
1699
|
# @return [AttributeInteger]
|
|
1645
1700
|
def update_integer_attribute(
|
|
@@ -1650,22 +1705,18 @@ module Appwrite
|
|
|
1650
1705
|
default:,
|
|
1651
1706
|
min: nil,
|
|
1652
1707
|
max: nil,
|
|
1653
|
-
new_key: nil
|
|
1708
|
+
new_key: nil,
|
|
1709
|
+
description: nil
|
|
1654
1710
|
)
|
|
1655
|
-
|
|
1656
|
-
.gsub('{databaseId}', database_id)
|
|
1657
|
-
.gsub('{collectionId}', collection_id)
|
|
1658
|
-
.gsub('{key}', key)
|
|
1659
|
-
|
|
1660
|
-
if database_id.nil?
|
|
1711
|
+
if database_id.nil? || database_id == ''
|
|
1661
1712
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1662
1713
|
end
|
|
1663
1714
|
|
|
1664
|
-
if collection_id.nil?
|
|
1715
|
+
if collection_id.nil? || collection_id == ''
|
|
1665
1716
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1666
1717
|
end
|
|
1667
1718
|
|
|
1668
|
-
if key.nil?
|
|
1719
|
+
if key.nil? || key == ''
|
|
1669
1720
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1670
1721
|
end
|
|
1671
1722
|
|
|
@@ -1677,12 +1728,18 @@ module Appwrite
|
|
|
1677
1728
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1678
1729
|
end
|
|
1679
1730
|
|
|
1731
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'
|
|
1732
|
+
.gsub('{databaseId}', database_id)
|
|
1733
|
+
.gsub('{collectionId}', collection_id)
|
|
1734
|
+
.gsub('{key}', key)
|
|
1735
|
+
|
|
1680
1736
|
api_params = {
|
|
1681
1737
|
required: required,
|
|
1682
1738
|
min: min,
|
|
1683
1739
|
max: max,
|
|
1684
1740
|
default: default,
|
|
1685
1741
|
newKey: new_key,
|
|
1742
|
+
description: description,
|
|
1686
1743
|
}
|
|
1687
1744
|
|
|
1688
1745
|
api_headers = {
|
|
@@ -1712,6 +1769,7 @@ module Appwrite
|
|
|
1712
1769
|
# @param [] required Is attribute required?
|
|
1713
1770
|
# @param [String] default Default value. Cannot be set when attribute is required.
|
|
1714
1771
|
# @param [] array Is attribute an array?
|
|
1772
|
+
# @param [String] description Optional description for the attribute.
|
|
1715
1773
|
#
|
|
1716
1774
|
# @return [AttributeIp]
|
|
1717
1775
|
def create_ip_attribute(
|
|
@@ -1720,17 +1778,14 @@ module Appwrite
|
|
|
1720
1778
|
key:,
|
|
1721
1779
|
required:,
|
|
1722
1780
|
default: nil,
|
|
1723
|
-
array: nil
|
|
1781
|
+
array: nil,
|
|
1782
|
+
description: nil
|
|
1724
1783
|
)
|
|
1725
|
-
|
|
1726
|
-
.gsub('{databaseId}', database_id)
|
|
1727
|
-
.gsub('{collectionId}', collection_id)
|
|
1728
|
-
|
|
1729
|
-
if database_id.nil?
|
|
1784
|
+
if database_id.nil? || database_id == ''
|
|
1730
1785
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1731
1786
|
end
|
|
1732
1787
|
|
|
1733
|
-
if collection_id.nil?
|
|
1788
|
+
if collection_id.nil? || collection_id == ''
|
|
1734
1789
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1735
1790
|
end
|
|
1736
1791
|
|
|
@@ -1742,11 +1797,16 @@ module Appwrite
|
|
|
1742
1797
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1743
1798
|
end
|
|
1744
1799
|
|
|
1800
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'
|
|
1801
|
+
.gsub('{databaseId}', database_id)
|
|
1802
|
+
.gsub('{collectionId}', collection_id)
|
|
1803
|
+
|
|
1745
1804
|
api_params = {
|
|
1746
1805
|
key: key,
|
|
1747
1806
|
required: required,
|
|
1748
1807
|
default: default,
|
|
1749
1808
|
array: array,
|
|
1809
|
+
description: description,
|
|
1750
1810
|
}
|
|
1751
1811
|
|
|
1752
1812
|
api_headers = {
|
|
@@ -1777,6 +1837,7 @@ module Appwrite
|
|
|
1777
1837
|
# @param [] required Is attribute required?
|
|
1778
1838
|
# @param [String] default Default value. Cannot be set when attribute is required.
|
|
1779
1839
|
# @param [String] new_key New Attribute Key.
|
|
1840
|
+
# @param [String] description Optional description for the attribute.
|
|
1780
1841
|
#
|
|
1781
1842
|
# @return [AttributeIp]
|
|
1782
1843
|
def update_ip_attribute(
|
|
@@ -1785,22 +1846,18 @@ module Appwrite
|
|
|
1785
1846
|
key:,
|
|
1786
1847
|
required:,
|
|
1787
1848
|
default:,
|
|
1788
|
-
new_key: nil
|
|
1849
|
+
new_key: nil,
|
|
1850
|
+
description: nil
|
|
1789
1851
|
)
|
|
1790
|
-
|
|
1791
|
-
.gsub('{databaseId}', database_id)
|
|
1792
|
-
.gsub('{collectionId}', collection_id)
|
|
1793
|
-
.gsub('{key}', key)
|
|
1794
|
-
|
|
1795
|
-
if database_id.nil?
|
|
1852
|
+
if database_id.nil? || database_id == ''
|
|
1796
1853
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1797
1854
|
end
|
|
1798
1855
|
|
|
1799
|
-
if collection_id.nil?
|
|
1856
|
+
if collection_id.nil? || collection_id == ''
|
|
1800
1857
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1801
1858
|
end
|
|
1802
1859
|
|
|
1803
|
-
if key.nil?
|
|
1860
|
+
if key.nil? || key == ''
|
|
1804
1861
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1805
1862
|
end
|
|
1806
1863
|
|
|
@@ -1812,10 +1869,16 @@ module Appwrite
|
|
|
1812
1869
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
1813
1870
|
end
|
|
1814
1871
|
|
|
1872
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'
|
|
1873
|
+
.gsub('{databaseId}', database_id)
|
|
1874
|
+
.gsub('{collectionId}', collection_id)
|
|
1875
|
+
.gsub('{key}', key)
|
|
1876
|
+
|
|
1815
1877
|
api_params = {
|
|
1816
1878
|
required: required,
|
|
1817
1879
|
default: default,
|
|
1818
1880
|
newKey: new_key,
|
|
1881
|
+
description: description,
|
|
1819
1882
|
}
|
|
1820
1883
|
|
|
1821
1884
|
api_headers = {
|
|
@@ -1843,6 +1906,7 @@ module Appwrite
|
|
|
1843
1906
|
# @param [String] key Attribute Key.
|
|
1844
1907
|
# @param [] required Is attribute required?
|
|
1845
1908
|
# @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.
|
|
1909
|
+
# @param [String] description Optional description for the attribute.
|
|
1846
1910
|
#
|
|
1847
1911
|
# @return [AttributeLine]
|
|
1848
1912
|
def create_line_attribute(
|
|
@@ -1850,17 +1914,14 @@ module Appwrite
|
|
|
1850
1914
|
collection_id:,
|
|
1851
1915
|
key:,
|
|
1852
1916
|
required:,
|
|
1853
|
-
default: nil
|
|
1917
|
+
default: nil,
|
|
1918
|
+
description: nil
|
|
1854
1919
|
)
|
|
1855
|
-
|
|
1856
|
-
.gsub('{databaseId}', database_id)
|
|
1857
|
-
.gsub('{collectionId}', collection_id)
|
|
1858
|
-
|
|
1859
|
-
if database_id.nil?
|
|
1920
|
+
if database_id.nil? || database_id == ''
|
|
1860
1921
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1861
1922
|
end
|
|
1862
1923
|
|
|
1863
|
-
if collection_id.nil?
|
|
1924
|
+
if collection_id.nil? || collection_id == ''
|
|
1864
1925
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1865
1926
|
end
|
|
1866
1927
|
|
|
@@ -1872,10 +1933,15 @@ module Appwrite
|
|
|
1872
1933
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1873
1934
|
end
|
|
1874
1935
|
|
|
1936
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line'
|
|
1937
|
+
.gsub('{databaseId}', database_id)
|
|
1938
|
+
.gsub('{collectionId}', collection_id)
|
|
1939
|
+
|
|
1875
1940
|
api_params = {
|
|
1876
1941
|
key: key,
|
|
1877
1942
|
required: required,
|
|
1878
1943
|
default: default,
|
|
1944
|
+
description: description,
|
|
1879
1945
|
}
|
|
1880
1946
|
|
|
1881
1947
|
api_headers = {
|
|
@@ -1905,6 +1971,7 @@ module Appwrite
|
|
|
1905
1971
|
# @param [] required Is attribute required?
|
|
1906
1972
|
# @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.
|
|
1907
1973
|
# @param [String] new_key New attribute key.
|
|
1974
|
+
# @param [String] description Optional description for the attribute.
|
|
1908
1975
|
#
|
|
1909
1976
|
# @return [AttributeLine]
|
|
1910
1977
|
def update_line_attribute(
|
|
@@ -1913,22 +1980,18 @@ module Appwrite
|
|
|
1913
1980
|
key:,
|
|
1914
1981
|
required:,
|
|
1915
1982
|
default: nil,
|
|
1916
|
-
new_key: nil
|
|
1983
|
+
new_key: nil,
|
|
1984
|
+
description: nil
|
|
1917
1985
|
)
|
|
1918
|
-
|
|
1919
|
-
.gsub('{databaseId}', database_id)
|
|
1920
|
-
.gsub('{collectionId}', collection_id)
|
|
1921
|
-
.gsub('{key}', key)
|
|
1922
|
-
|
|
1923
|
-
if database_id.nil?
|
|
1986
|
+
if database_id.nil? || database_id == ''
|
|
1924
1987
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1925
1988
|
end
|
|
1926
1989
|
|
|
1927
|
-
if collection_id.nil?
|
|
1990
|
+
if collection_id.nil? || collection_id == ''
|
|
1928
1991
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1929
1992
|
end
|
|
1930
1993
|
|
|
1931
|
-
if key.nil?
|
|
1994
|
+
if key.nil? || key == ''
|
|
1932
1995
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
1933
1996
|
end
|
|
1934
1997
|
|
|
@@ -1936,10 +1999,16 @@ module Appwrite
|
|
|
1936
1999
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
1937
2000
|
end
|
|
1938
2001
|
|
|
2002
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'
|
|
2003
|
+
.gsub('{databaseId}', database_id)
|
|
2004
|
+
.gsub('{collectionId}', collection_id)
|
|
2005
|
+
.gsub('{key}', key)
|
|
2006
|
+
|
|
1939
2007
|
api_params = {
|
|
1940
2008
|
required: required,
|
|
1941
2009
|
default: default,
|
|
1942
2010
|
newKey: new_key,
|
|
2011
|
+
description: description,
|
|
1943
2012
|
}
|
|
1944
2013
|
|
|
1945
2014
|
api_headers = {
|
|
@@ -1970,6 +2039,7 @@ module Appwrite
|
|
|
1970
2039
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1971
2040
|
# @param [] array Is attribute an array?
|
|
1972
2041
|
# @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.
|
|
2042
|
+
# @param [String] description Optional description for the attribute.
|
|
1973
2043
|
#
|
|
1974
2044
|
# @return [AttributeLongtext]
|
|
1975
2045
|
def create_longtext_attribute(
|
|
@@ -1979,17 +2049,14 @@ module Appwrite
|
|
|
1979
2049
|
required:,
|
|
1980
2050
|
default: nil,
|
|
1981
2051
|
array: nil,
|
|
1982
|
-
encrypt: nil
|
|
2052
|
+
encrypt: nil,
|
|
2053
|
+
description: nil
|
|
1983
2054
|
)
|
|
1984
|
-
|
|
1985
|
-
.gsub('{databaseId}', database_id)
|
|
1986
|
-
.gsub('{collectionId}', collection_id)
|
|
1987
|
-
|
|
1988
|
-
if database_id.nil?
|
|
2055
|
+
if database_id.nil? || database_id == ''
|
|
1989
2056
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
1990
2057
|
end
|
|
1991
2058
|
|
|
1992
|
-
if collection_id.nil?
|
|
2059
|
+
if collection_id.nil? || collection_id == ''
|
|
1993
2060
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
1994
2061
|
end
|
|
1995
2062
|
|
|
@@ -2001,12 +2068,17 @@ module Appwrite
|
|
|
2001
2068
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2002
2069
|
end
|
|
2003
2070
|
|
|
2071
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext'
|
|
2072
|
+
.gsub('{databaseId}', database_id)
|
|
2073
|
+
.gsub('{collectionId}', collection_id)
|
|
2074
|
+
|
|
2004
2075
|
api_params = {
|
|
2005
2076
|
key: key,
|
|
2006
2077
|
required: required,
|
|
2007
2078
|
default: default,
|
|
2008
2079
|
array: array,
|
|
2009
2080
|
encrypt: encrypt,
|
|
2081
|
+
description: description,
|
|
2010
2082
|
}
|
|
2011
2083
|
|
|
2012
2084
|
api_headers = {
|
|
@@ -2037,6 +2109,7 @@ module Appwrite
|
|
|
2037
2109
|
# @param [] required Is attribute required?
|
|
2038
2110
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2039
2111
|
# @param [String] new_key New Attribute Key.
|
|
2112
|
+
# @param [String] description Optional description for the attribute.
|
|
2040
2113
|
#
|
|
2041
2114
|
# @return [AttributeLongtext]
|
|
2042
2115
|
def update_longtext_attribute(
|
|
@@ -2045,22 +2118,18 @@ module Appwrite
|
|
|
2045
2118
|
key:,
|
|
2046
2119
|
required:,
|
|
2047
2120
|
default:,
|
|
2048
|
-
new_key: nil
|
|
2121
|
+
new_key: nil,
|
|
2122
|
+
description: nil
|
|
2049
2123
|
)
|
|
2050
|
-
|
|
2051
|
-
.gsub('{databaseId}', database_id)
|
|
2052
|
-
.gsub('{collectionId}', collection_id)
|
|
2053
|
-
.gsub('{key}', key)
|
|
2054
|
-
|
|
2055
|
-
if database_id.nil?
|
|
2124
|
+
if database_id.nil? || database_id == ''
|
|
2056
2125
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2057
2126
|
end
|
|
2058
2127
|
|
|
2059
|
-
if collection_id.nil?
|
|
2128
|
+
if collection_id.nil? || collection_id == ''
|
|
2060
2129
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2061
2130
|
end
|
|
2062
2131
|
|
|
2063
|
-
if key.nil?
|
|
2132
|
+
if key.nil? || key == ''
|
|
2064
2133
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2065
2134
|
end
|
|
2066
2135
|
|
|
@@ -2072,10 +2141,16 @@ module Appwrite
|
|
|
2072
2141
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2073
2142
|
end
|
|
2074
2143
|
|
|
2144
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/longtext/{key}'
|
|
2145
|
+
.gsub('{databaseId}', database_id)
|
|
2146
|
+
.gsub('{collectionId}', collection_id)
|
|
2147
|
+
.gsub('{key}', key)
|
|
2148
|
+
|
|
2075
2149
|
api_params = {
|
|
2076
2150
|
required: required,
|
|
2077
2151
|
default: default,
|
|
2078
2152
|
newKey: new_key,
|
|
2153
|
+
description: description,
|
|
2079
2154
|
}
|
|
2080
2155
|
|
|
2081
2156
|
api_headers = {
|
|
@@ -2106,6 +2181,7 @@ module Appwrite
|
|
|
2106
2181
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2107
2182
|
# @param [] array Is attribute an array?
|
|
2108
2183
|
# @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.
|
|
2184
|
+
# @param [String] description Optional description for the attribute.
|
|
2109
2185
|
#
|
|
2110
2186
|
# @return [AttributeMediumtext]
|
|
2111
2187
|
def create_mediumtext_attribute(
|
|
@@ -2115,17 +2191,14 @@ module Appwrite
|
|
|
2115
2191
|
required:,
|
|
2116
2192
|
default: nil,
|
|
2117
2193
|
array: nil,
|
|
2118
|
-
encrypt: nil
|
|
2194
|
+
encrypt: nil,
|
|
2195
|
+
description: nil
|
|
2119
2196
|
)
|
|
2120
|
-
|
|
2121
|
-
.gsub('{databaseId}', database_id)
|
|
2122
|
-
.gsub('{collectionId}', collection_id)
|
|
2123
|
-
|
|
2124
|
-
if database_id.nil?
|
|
2197
|
+
if database_id.nil? || database_id == ''
|
|
2125
2198
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2126
2199
|
end
|
|
2127
2200
|
|
|
2128
|
-
if collection_id.nil?
|
|
2201
|
+
if collection_id.nil? || collection_id == ''
|
|
2129
2202
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2130
2203
|
end
|
|
2131
2204
|
|
|
@@ -2137,12 +2210,17 @@ module Appwrite
|
|
|
2137
2210
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2138
2211
|
end
|
|
2139
2212
|
|
|
2213
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext'
|
|
2214
|
+
.gsub('{databaseId}', database_id)
|
|
2215
|
+
.gsub('{collectionId}', collection_id)
|
|
2216
|
+
|
|
2140
2217
|
api_params = {
|
|
2141
2218
|
key: key,
|
|
2142
2219
|
required: required,
|
|
2143
2220
|
default: default,
|
|
2144
2221
|
array: array,
|
|
2145
2222
|
encrypt: encrypt,
|
|
2223
|
+
description: description,
|
|
2146
2224
|
}
|
|
2147
2225
|
|
|
2148
2226
|
api_headers = {
|
|
@@ -2173,6 +2251,7 @@ module Appwrite
|
|
|
2173
2251
|
# @param [] required Is attribute required?
|
|
2174
2252
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2175
2253
|
# @param [String] new_key New Attribute Key.
|
|
2254
|
+
# @param [String] description Optional description for the attribute.
|
|
2176
2255
|
#
|
|
2177
2256
|
# @return [AttributeMediumtext]
|
|
2178
2257
|
def update_mediumtext_attribute(
|
|
@@ -2181,22 +2260,18 @@ module Appwrite
|
|
|
2181
2260
|
key:,
|
|
2182
2261
|
required:,
|
|
2183
2262
|
default:,
|
|
2184
|
-
new_key: nil
|
|
2263
|
+
new_key: nil,
|
|
2264
|
+
description: nil
|
|
2185
2265
|
)
|
|
2186
|
-
|
|
2187
|
-
.gsub('{databaseId}', database_id)
|
|
2188
|
-
.gsub('{collectionId}', collection_id)
|
|
2189
|
-
.gsub('{key}', key)
|
|
2190
|
-
|
|
2191
|
-
if database_id.nil?
|
|
2266
|
+
if database_id.nil? || database_id == ''
|
|
2192
2267
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2193
2268
|
end
|
|
2194
2269
|
|
|
2195
|
-
if collection_id.nil?
|
|
2270
|
+
if collection_id.nil? || collection_id == ''
|
|
2196
2271
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2197
2272
|
end
|
|
2198
2273
|
|
|
2199
|
-
if key.nil?
|
|
2274
|
+
if key.nil? || key == ''
|
|
2200
2275
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2201
2276
|
end
|
|
2202
2277
|
|
|
@@ -2208,10 +2283,16 @@ module Appwrite
|
|
|
2208
2283
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2209
2284
|
end
|
|
2210
2285
|
|
|
2286
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/mediumtext/{key}'
|
|
2287
|
+
.gsub('{databaseId}', database_id)
|
|
2288
|
+
.gsub('{collectionId}', collection_id)
|
|
2289
|
+
.gsub('{key}', key)
|
|
2290
|
+
|
|
2211
2291
|
api_params = {
|
|
2212
2292
|
required: required,
|
|
2213
2293
|
default: default,
|
|
2214
2294
|
newKey: new_key,
|
|
2295
|
+
description: description,
|
|
2215
2296
|
}
|
|
2216
2297
|
|
|
2217
2298
|
api_headers = {
|
|
@@ -2239,6 +2320,7 @@ module Appwrite
|
|
|
2239
2320
|
# @param [String] key Attribute Key.
|
|
2240
2321
|
# @param [] required Is attribute required?
|
|
2241
2322
|
# @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.
|
|
2323
|
+
# @param [String] description Optional description for the attribute.
|
|
2242
2324
|
#
|
|
2243
2325
|
# @return [AttributePoint]
|
|
2244
2326
|
def create_point_attribute(
|
|
@@ -2246,17 +2328,14 @@ module Appwrite
|
|
|
2246
2328
|
collection_id:,
|
|
2247
2329
|
key:,
|
|
2248
2330
|
required:,
|
|
2249
|
-
default: nil
|
|
2331
|
+
default: nil,
|
|
2332
|
+
description: nil
|
|
2250
2333
|
)
|
|
2251
|
-
|
|
2252
|
-
.gsub('{databaseId}', database_id)
|
|
2253
|
-
.gsub('{collectionId}', collection_id)
|
|
2254
|
-
|
|
2255
|
-
if database_id.nil?
|
|
2334
|
+
if database_id.nil? || database_id == ''
|
|
2256
2335
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2257
2336
|
end
|
|
2258
2337
|
|
|
2259
|
-
if collection_id.nil?
|
|
2338
|
+
if collection_id.nil? || collection_id == ''
|
|
2260
2339
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2261
2340
|
end
|
|
2262
2341
|
|
|
@@ -2268,10 +2347,15 @@ module Appwrite
|
|
|
2268
2347
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2269
2348
|
end
|
|
2270
2349
|
|
|
2350
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point'
|
|
2351
|
+
.gsub('{databaseId}', database_id)
|
|
2352
|
+
.gsub('{collectionId}', collection_id)
|
|
2353
|
+
|
|
2271
2354
|
api_params = {
|
|
2272
2355
|
key: key,
|
|
2273
2356
|
required: required,
|
|
2274
2357
|
default: default,
|
|
2358
|
+
description: description,
|
|
2275
2359
|
}
|
|
2276
2360
|
|
|
2277
2361
|
api_headers = {
|
|
@@ -2301,6 +2385,7 @@ module Appwrite
|
|
|
2301
2385
|
# @param [] required Is attribute required?
|
|
2302
2386
|
# @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.
|
|
2303
2387
|
# @param [String] new_key New attribute key.
|
|
2388
|
+
# @param [String] description Optional description for the attribute.
|
|
2304
2389
|
#
|
|
2305
2390
|
# @return [AttributePoint]
|
|
2306
2391
|
def update_point_attribute(
|
|
@@ -2309,22 +2394,18 @@ module Appwrite
|
|
|
2309
2394
|
key:,
|
|
2310
2395
|
required:,
|
|
2311
2396
|
default: nil,
|
|
2312
|
-
new_key: nil
|
|
2397
|
+
new_key: nil,
|
|
2398
|
+
description: nil
|
|
2313
2399
|
)
|
|
2314
|
-
|
|
2315
|
-
.gsub('{databaseId}', database_id)
|
|
2316
|
-
.gsub('{collectionId}', collection_id)
|
|
2317
|
-
.gsub('{key}', key)
|
|
2318
|
-
|
|
2319
|
-
if database_id.nil?
|
|
2400
|
+
if database_id.nil? || database_id == ''
|
|
2320
2401
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2321
2402
|
end
|
|
2322
2403
|
|
|
2323
|
-
if collection_id.nil?
|
|
2404
|
+
if collection_id.nil? || collection_id == ''
|
|
2324
2405
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2325
2406
|
end
|
|
2326
2407
|
|
|
2327
|
-
if key.nil?
|
|
2408
|
+
if key.nil? || key == ''
|
|
2328
2409
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2329
2410
|
end
|
|
2330
2411
|
|
|
@@ -2332,10 +2413,16 @@ module Appwrite
|
|
|
2332
2413
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2333
2414
|
end
|
|
2334
2415
|
|
|
2416
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'
|
|
2417
|
+
.gsub('{databaseId}', database_id)
|
|
2418
|
+
.gsub('{collectionId}', collection_id)
|
|
2419
|
+
.gsub('{key}', key)
|
|
2420
|
+
|
|
2335
2421
|
api_params = {
|
|
2336
2422
|
required: required,
|
|
2337
2423
|
default: default,
|
|
2338
2424
|
newKey: new_key,
|
|
2425
|
+
description: description,
|
|
2339
2426
|
}
|
|
2340
2427
|
|
|
2341
2428
|
api_headers = {
|
|
@@ -2363,6 +2450,7 @@ module Appwrite
|
|
|
2363
2450
|
# @param [String] key Attribute Key.
|
|
2364
2451
|
# @param [] required Is attribute required?
|
|
2365
2452
|
# @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.
|
|
2453
|
+
# @param [String] description Optional description for the attribute.
|
|
2366
2454
|
#
|
|
2367
2455
|
# @return [AttributePolygon]
|
|
2368
2456
|
def create_polygon_attribute(
|
|
@@ -2370,17 +2458,14 @@ module Appwrite
|
|
|
2370
2458
|
collection_id:,
|
|
2371
2459
|
key:,
|
|
2372
2460
|
required:,
|
|
2373
|
-
default: nil
|
|
2461
|
+
default: nil,
|
|
2462
|
+
description: nil
|
|
2374
2463
|
)
|
|
2375
|
-
|
|
2376
|
-
.gsub('{databaseId}', database_id)
|
|
2377
|
-
.gsub('{collectionId}', collection_id)
|
|
2378
|
-
|
|
2379
|
-
if database_id.nil?
|
|
2464
|
+
if database_id.nil? || database_id == ''
|
|
2380
2465
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2381
2466
|
end
|
|
2382
2467
|
|
|
2383
|
-
if collection_id.nil?
|
|
2468
|
+
if collection_id.nil? || collection_id == ''
|
|
2384
2469
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2385
2470
|
end
|
|
2386
2471
|
|
|
@@ -2392,10 +2477,15 @@ module Appwrite
|
|
|
2392
2477
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2393
2478
|
end
|
|
2394
2479
|
|
|
2480
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'
|
|
2481
|
+
.gsub('{databaseId}', database_id)
|
|
2482
|
+
.gsub('{collectionId}', collection_id)
|
|
2483
|
+
|
|
2395
2484
|
api_params = {
|
|
2396
2485
|
key: key,
|
|
2397
2486
|
required: required,
|
|
2398
2487
|
default: default,
|
|
2488
|
+
description: description,
|
|
2399
2489
|
}
|
|
2400
2490
|
|
|
2401
2491
|
api_headers = {
|
|
@@ -2425,6 +2515,7 @@ module Appwrite
|
|
|
2425
2515
|
# @param [] required Is attribute required?
|
|
2426
2516
|
# @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.
|
|
2427
2517
|
# @param [String] new_key New attribute key.
|
|
2518
|
+
# @param [String] description Optional description for the attribute.
|
|
2428
2519
|
#
|
|
2429
2520
|
# @return [AttributePolygon]
|
|
2430
2521
|
def update_polygon_attribute(
|
|
@@ -2433,22 +2524,18 @@ module Appwrite
|
|
|
2433
2524
|
key:,
|
|
2434
2525
|
required:,
|
|
2435
2526
|
default: nil,
|
|
2436
|
-
new_key: nil
|
|
2527
|
+
new_key: nil,
|
|
2528
|
+
description: nil
|
|
2437
2529
|
)
|
|
2438
|
-
|
|
2439
|
-
.gsub('{databaseId}', database_id)
|
|
2440
|
-
.gsub('{collectionId}', collection_id)
|
|
2441
|
-
.gsub('{key}', key)
|
|
2442
|
-
|
|
2443
|
-
if database_id.nil?
|
|
2530
|
+
if database_id.nil? || database_id == ''
|
|
2444
2531
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2445
2532
|
end
|
|
2446
2533
|
|
|
2447
|
-
if collection_id.nil?
|
|
2534
|
+
if collection_id.nil? || collection_id == ''
|
|
2448
2535
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2449
2536
|
end
|
|
2450
2537
|
|
|
2451
|
-
if key.nil?
|
|
2538
|
+
if key.nil? || key == ''
|
|
2452
2539
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2453
2540
|
end
|
|
2454
2541
|
|
|
@@ -2456,10 +2543,16 @@ module Appwrite
|
|
|
2456
2543
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2457
2544
|
end
|
|
2458
2545
|
|
|
2546
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'
|
|
2547
|
+
.gsub('{databaseId}', database_id)
|
|
2548
|
+
.gsub('{collectionId}', collection_id)
|
|
2549
|
+
.gsub('{key}', key)
|
|
2550
|
+
|
|
2459
2551
|
api_params = {
|
|
2460
2552
|
required: required,
|
|
2461
2553
|
default: default,
|
|
2462
2554
|
newKey: new_key,
|
|
2555
|
+
description: description,
|
|
2463
2556
|
}
|
|
2464
2557
|
|
|
2465
2558
|
api_headers = {
|
|
@@ -2492,6 +2585,7 @@ module Appwrite
|
|
|
2492
2585
|
# @param [String] key Attribute Key.
|
|
2493
2586
|
# @param [String] two_way_key Two Way Attribute Key.
|
|
2494
2587
|
# @param [RelationMutate] on_delete Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2588
|
+
# @param [String] description Optional description for the attribute.
|
|
2495
2589
|
#
|
|
2496
2590
|
# @return [AttributeRelationship]
|
|
2497
2591
|
def create_relationship_attribute(
|
|
@@ -2502,17 +2596,14 @@ module Appwrite
|
|
|
2502
2596
|
two_way: nil,
|
|
2503
2597
|
key: nil,
|
|
2504
2598
|
two_way_key: nil,
|
|
2505
|
-
on_delete: nil
|
|
2599
|
+
on_delete: nil,
|
|
2600
|
+
description: nil
|
|
2506
2601
|
)
|
|
2507
|
-
|
|
2508
|
-
.gsub('{databaseId}', database_id)
|
|
2509
|
-
.gsub('{collectionId}', collection_id)
|
|
2510
|
-
|
|
2511
|
-
if database_id.nil?
|
|
2602
|
+
if database_id.nil? || database_id == ''
|
|
2512
2603
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2513
2604
|
end
|
|
2514
2605
|
|
|
2515
|
-
if collection_id.nil?
|
|
2606
|
+
if collection_id.nil? || collection_id == ''
|
|
2516
2607
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2517
2608
|
end
|
|
2518
2609
|
|
|
@@ -2524,6 +2615,10 @@ module Appwrite
|
|
|
2524
2615
|
raise Appwrite::Exception.new('Missing required parameter: "type"')
|
|
2525
2616
|
end
|
|
2526
2617
|
|
|
2618
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'
|
|
2619
|
+
.gsub('{databaseId}', database_id)
|
|
2620
|
+
.gsub('{collectionId}', collection_id)
|
|
2621
|
+
|
|
2527
2622
|
api_params = {
|
|
2528
2623
|
relatedCollectionId: related_collection_id,
|
|
2529
2624
|
type: type,
|
|
@@ -2531,6 +2626,7 @@ module Appwrite
|
|
|
2531
2626
|
key: key,
|
|
2532
2627
|
twoWayKey: two_way_key,
|
|
2533
2628
|
onDelete: on_delete,
|
|
2629
|
+
description: description,
|
|
2534
2630
|
}
|
|
2535
2631
|
|
|
2536
2632
|
api_headers = {
|
|
@@ -2560,6 +2656,7 @@ module Appwrite
|
|
|
2560
2656
|
# @param [String] key Attribute Key.
|
|
2561
2657
|
# @param [RelationMutate] on_delete Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2562
2658
|
# @param [String] new_key New Attribute Key.
|
|
2659
|
+
# @param [String] description Optional description for the attribute.
|
|
2563
2660
|
#
|
|
2564
2661
|
# @return [AttributeRelationship]
|
|
2565
2662
|
def update_relationship_attribute(
|
|
@@ -2567,28 +2664,30 @@ module Appwrite
|
|
|
2567
2664
|
collection_id:,
|
|
2568
2665
|
key:,
|
|
2569
2666
|
on_delete: nil,
|
|
2570
|
-
new_key: nil
|
|
2667
|
+
new_key: nil,
|
|
2668
|
+
description: nil
|
|
2571
2669
|
)
|
|
2572
|
-
|
|
2573
|
-
.gsub('{databaseId}', database_id)
|
|
2574
|
-
.gsub('{collectionId}', collection_id)
|
|
2575
|
-
.gsub('{key}', key)
|
|
2576
|
-
|
|
2577
|
-
if database_id.nil?
|
|
2670
|
+
if database_id.nil? || database_id == ''
|
|
2578
2671
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2579
2672
|
end
|
|
2580
2673
|
|
|
2581
|
-
if collection_id.nil?
|
|
2674
|
+
if collection_id.nil? || collection_id == ''
|
|
2582
2675
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2583
2676
|
end
|
|
2584
2677
|
|
|
2585
|
-
if key.nil?
|
|
2678
|
+
if key.nil? || key == ''
|
|
2586
2679
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2587
2680
|
end
|
|
2588
2681
|
|
|
2682
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'
|
|
2683
|
+
.gsub('{databaseId}', database_id)
|
|
2684
|
+
.gsub('{collectionId}', collection_id)
|
|
2685
|
+
.gsub('{key}', key)
|
|
2686
|
+
|
|
2589
2687
|
api_params = {
|
|
2590
2688
|
onDelete: on_delete,
|
|
2591
2689
|
newKey: new_key,
|
|
2690
|
+
description: description,
|
|
2592
2691
|
}
|
|
2593
2692
|
|
|
2594
2693
|
api_headers = {
|
|
@@ -2620,6 +2719,7 @@ module Appwrite
|
|
|
2620
2719
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2621
2720
|
# @param [] array Is attribute an array?
|
|
2622
2721
|
# @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.
|
|
2722
|
+
# @param [String] description Optional description for the attribute.
|
|
2623
2723
|
#
|
|
2624
2724
|
# @return [AttributeString]
|
|
2625
2725
|
def create_string_attribute(
|
|
@@ -2630,17 +2730,14 @@ module Appwrite
|
|
|
2630
2730
|
required:,
|
|
2631
2731
|
default: nil,
|
|
2632
2732
|
array: nil,
|
|
2633
|
-
encrypt: nil
|
|
2733
|
+
encrypt: nil,
|
|
2734
|
+
description: nil
|
|
2634
2735
|
)
|
|
2635
|
-
|
|
2636
|
-
.gsub('{databaseId}', database_id)
|
|
2637
|
-
.gsub('{collectionId}', collection_id)
|
|
2638
|
-
|
|
2639
|
-
if database_id.nil?
|
|
2736
|
+
if database_id.nil? || database_id == ''
|
|
2640
2737
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2641
2738
|
end
|
|
2642
2739
|
|
|
2643
|
-
if collection_id.nil?
|
|
2740
|
+
if collection_id.nil? || collection_id == ''
|
|
2644
2741
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2645
2742
|
end
|
|
2646
2743
|
|
|
@@ -2656,6 +2753,10 @@ module Appwrite
|
|
|
2656
2753
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2657
2754
|
end
|
|
2658
2755
|
|
|
2756
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string'
|
|
2757
|
+
.gsub('{databaseId}', database_id)
|
|
2758
|
+
.gsub('{collectionId}', collection_id)
|
|
2759
|
+
|
|
2659
2760
|
api_params = {
|
|
2660
2761
|
key: key,
|
|
2661
2762
|
size: size,
|
|
@@ -2663,6 +2764,7 @@ module Appwrite
|
|
|
2663
2764
|
default: default,
|
|
2664
2765
|
array: array,
|
|
2665
2766
|
encrypt: encrypt,
|
|
2767
|
+
description: description,
|
|
2666
2768
|
}
|
|
2667
2769
|
|
|
2668
2770
|
api_headers = {
|
|
@@ -2694,6 +2796,7 @@ module Appwrite
|
|
|
2694
2796
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2695
2797
|
# @param [Integer] size Maximum size of the string attribute.
|
|
2696
2798
|
# @param [String] new_key New Attribute Key.
|
|
2799
|
+
# @param [String] description Optional description for the attribute.
|
|
2697
2800
|
#
|
|
2698
2801
|
# @return [AttributeString]
|
|
2699
2802
|
def update_string_attribute(
|
|
@@ -2703,22 +2806,18 @@ module Appwrite
|
|
|
2703
2806
|
required:,
|
|
2704
2807
|
default:,
|
|
2705
2808
|
size: nil,
|
|
2706
|
-
new_key: nil
|
|
2809
|
+
new_key: nil,
|
|
2810
|
+
description: nil
|
|
2707
2811
|
)
|
|
2708
|
-
|
|
2709
|
-
.gsub('{databaseId}', database_id)
|
|
2710
|
-
.gsub('{collectionId}', collection_id)
|
|
2711
|
-
.gsub('{key}', key)
|
|
2712
|
-
|
|
2713
|
-
if database_id.nil?
|
|
2812
|
+
if database_id.nil? || database_id == ''
|
|
2714
2813
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2715
2814
|
end
|
|
2716
2815
|
|
|
2717
|
-
if collection_id.nil?
|
|
2816
|
+
if collection_id.nil? || collection_id == ''
|
|
2718
2817
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2719
2818
|
end
|
|
2720
2819
|
|
|
2721
|
-
if key.nil?
|
|
2820
|
+
if key.nil? || key == ''
|
|
2722
2821
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2723
2822
|
end
|
|
2724
2823
|
|
|
@@ -2730,11 +2829,17 @@ module Appwrite
|
|
|
2730
2829
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2731
2830
|
end
|
|
2732
2831
|
|
|
2832
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'
|
|
2833
|
+
.gsub('{databaseId}', database_id)
|
|
2834
|
+
.gsub('{collectionId}', collection_id)
|
|
2835
|
+
.gsub('{key}', key)
|
|
2836
|
+
|
|
2733
2837
|
api_params = {
|
|
2734
2838
|
required: required,
|
|
2735
2839
|
default: default,
|
|
2736
2840
|
size: size,
|
|
2737
2841
|
newKey: new_key,
|
|
2842
|
+
description: description,
|
|
2738
2843
|
}
|
|
2739
2844
|
|
|
2740
2845
|
api_headers = {
|
|
@@ -2765,6 +2870,7 @@ module Appwrite
|
|
|
2765
2870
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2766
2871
|
# @param [] array Is attribute an array?
|
|
2767
2872
|
# @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.
|
|
2873
|
+
# @param [String] description Optional description for the attribute.
|
|
2768
2874
|
#
|
|
2769
2875
|
# @return [AttributeText]
|
|
2770
2876
|
def create_text_attribute(
|
|
@@ -2774,17 +2880,14 @@ module Appwrite
|
|
|
2774
2880
|
required:,
|
|
2775
2881
|
default: nil,
|
|
2776
2882
|
array: nil,
|
|
2777
|
-
encrypt: nil
|
|
2883
|
+
encrypt: nil,
|
|
2884
|
+
description: nil
|
|
2778
2885
|
)
|
|
2779
|
-
|
|
2780
|
-
.gsub('{databaseId}', database_id)
|
|
2781
|
-
.gsub('{collectionId}', collection_id)
|
|
2782
|
-
|
|
2783
|
-
if database_id.nil?
|
|
2886
|
+
if database_id.nil? || database_id == ''
|
|
2784
2887
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2785
2888
|
end
|
|
2786
2889
|
|
|
2787
|
-
if collection_id.nil?
|
|
2890
|
+
if collection_id.nil? || collection_id == ''
|
|
2788
2891
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2789
2892
|
end
|
|
2790
2893
|
|
|
@@ -2796,12 +2899,17 @@ module Appwrite
|
|
|
2796
2899
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2797
2900
|
end
|
|
2798
2901
|
|
|
2902
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text'
|
|
2903
|
+
.gsub('{databaseId}', database_id)
|
|
2904
|
+
.gsub('{collectionId}', collection_id)
|
|
2905
|
+
|
|
2799
2906
|
api_params = {
|
|
2800
2907
|
key: key,
|
|
2801
2908
|
required: required,
|
|
2802
2909
|
default: default,
|
|
2803
2910
|
array: array,
|
|
2804
2911
|
encrypt: encrypt,
|
|
2912
|
+
description: description,
|
|
2805
2913
|
}
|
|
2806
2914
|
|
|
2807
2915
|
api_headers = {
|
|
@@ -2832,6 +2940,7 @@ module Appwrite
|
|
|
2832
2940
|
# @param [] required Is attribute required?
|
|
2833
2941
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2834
2942
|
# @param [String] new_key New Attribute Key.
|
|
2943
|
+
# @param [String] description Optional description for the attribute.
|
|
2835
2944
|
#
|
|
2836
2945
|
# @return [AttributeText]
|
|
2837
2946
|
def update_text_attribute(
|
|
@@ -2840,22 +2949,18 @@ module Appwrite
|
|
|
2840
2949
|
key:,
|
|
2841
2950
|
required:,
|
|
2842
2951
|
default:,
|
|
2843
|
-
new_key: nil
|
|
2952
|
+
new_key: nil,
|
|
2953
|
+
description: nil
|
|
2844
2954
|
)
|
|
2845
|
-
|
|
2846
|
-
.gsub('{databaseId}', database_id)
|
|
2847
|
-
.gsub('{collectionId}', collection_id)
|
|
2848
|
-
.gsub('{key}', key)
|
|
2849
|
-
|
|
2850
|
-
if database_id.nil?
|
|
2955
|
+
if database_id.nil? || database_id == ''
|
|
2851
2956
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2852
2957
|
end
|
|
2853
2958
|
|
|
2854
|
-
if collection_id.nil?
|
|
2959
|
+
if collection_id.nil? || collection_id == ''
|
|
2855
2960
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2856
2961
|
end
|
|
2857
2962
|
|
|
2858
|
-
if key.nil?
|
|
2963
|
+
if key.nil? || key == ''
|
|
2859
2964
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2860
2965
|
end
|
|
2861
2966
|
|
|
@@ -2867,10 +2972,16 @@ module Appwrite
|
|
|
2867
2972
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
2868
2973
|
end
|
|
2869
2974
|
|
|
2975
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/text/{key}'
|
|
2976
|
+
.gsub('{databaseId}', database_id)
|
|
2977
|
+
.gsub('{collectionId}', collection_id)
|
|
2978
|
+
.gsub('{key}', key)
|
|
2979
|
+
|
|
2870
2980
|
api_params = {
|
|
2871
2981
|
required: required,
|
|
2872
2982
|
default: default,
|
|
2873
2983
|
newKey: new_key,
|
|
2984
|
+
description: description,
|
|
2874
2985
|
}
|
|
2875
2986
|
|
|
2876
2987
|
api_headers = {
|
|
@@ -2900,6 +3011,7 @@ module Appwrite
|
|
|
2900
3011
|
# @param [] required Is attribute required?
|
|
2901
3012
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2902
3013
|
# @param [] array Is attribute an array?
|
|
3014
|
+
# @param [String] description Optional description for the attribute.
|
|
2903
3015
|
#
|
|
2904
3016
|
# @return [AttributeUrl]
|
|
2905
3017
|
def create_url_attribute(
|
|
@@ -2908,17 +3020,14 @@ module Appwrite
|
|
|
2908
3020
|
key:,
|
|
2909
3021
|
required:,
|
|
2910
3022
|
default: nil,
|
|
2911
|
-
array: nil
|
|
3023
|
+
array: nil,
|
|
3024
|
+
description: nil
|
|
2912
3025
|
)
|
|
2913
|
-
|
|
2914
|
-
.gsub('{databaseId}', database_id)
|
|
2915
|
-
.gsub('{collectionId}', collection_id)
|
|
2916
|
-
|
|
2917
|
-
if database_id.nil?
|
|
3026
|
+
if database_id.nil? || database_id == ''
|
|
2918
3027
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2919
3028
|
end
|
|
2920
3029
|
|
|
2921
|
-
if collection_id.nil?
|
|
3030
|
+
if collection_id.nil? || collection_id == ''
|
|
2922
3031
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2923
3032
|
end
|
|
2924
3033
|
|
|
@@ -2930,11 +3039,16 @@ module Appwrite
|
|
|
2930
3039
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
2931
3040
|
end
|
|
2932
3041
|
|
|
3042
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url'
|
|
3043
|
+
.gsub('{databaseId}', database_id)
|
|
3044
|
+
.gsub('{collectionId}', collection_id)
|
|
3045
|
+
|
|
2933
3046
|
api_params = {
|
|
2934
3047
|
key: key,
|
|
2935
3048
|
required: required,
|
|
2936
3049
|
default: default,
|
|
2937
3050
|
array: array,
|
|
3051
|
+
description: description,
|
|
2938
3052
|
}
|
|
2939
3053
|
|
|
2940
3054
|
api_headers = {
|
|
@@ -2965,6 +3079,7 @@ module Appwrite
|
|
|
2965
3079
|
# @param [] required Is attribute required?
|
|
2966
3080
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2967
3081
|
# @param [String] new_key New Attribute Key.
|
|
3082
|
+
# @param [String] description Optional description for the attribute.
|
|
2968
3083
|
#
|
|
2969
3084
|
# @return [AttributeUrl]
|
|
2970
3085
|
def update_url_attribute(
|
|
@@ -2973,22 +3088,18 @@ module Appwrite
|
|
|
2973
3088
|
key:,
|
|
2974
3089
|
required:,
|
|
2975
3090
|
default:,
|
|
2976
|
-
new_key: nil
|
|
3091
|
+
new_key: nil,
|
|
3092
|
+
description: nil
|
|
2977
3093
|
)
|
|
2978
|
-
|
|
2979
|
-
.gsub('{databaseId}', database_id)
|
|
2980
|
-
.gsub('{collectionId}', collection_id)
|
|
2981
|
-
.gsub('{key}', key)
|
|
2982
|
-
|
|
2983
|
-
if database_id.nil?
|
|
3094
|
+
if database_id.nil? || database_id == ''
|
|
2984
3095
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
2985
3096
|
end
|
|
2986
3097
|
|
|
2987
|
-
if collection_id.nil?
|
|
3098
|
+
if collection_id.nil? || collection_id == ''
|
|
2988
3099
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
2989
3100
|
end
|
|
2990
3101
|
|
|
2991
|
-
if key.nil?
|
|
3102
|
+
if key.nil? || key == ''
|
|
2992
3103
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
2993
3104
|
end
|
|
2994
3105
|
|
|
@@ -3000,10 +3111,16 @@ module Appwrite
|
|
|
3000
3111
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
3001
3112
|
end
|
|
3002
3113
|
|
|
3114
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'
|
|
3115
|
+
.gsub('{databaseId}', database_id)
|
|
3116
|
+
.gsub('{collectionId}', collection_id)
|
|
3117
|
+
.gsub('{key}', key)
|
|
3118
|
+
|
|
3003
3119
|
api_params = {
|
|
3004
3120
|
required: required,
|
|
3005
3121
|
default: default,
|
|
3006
3122
|
newKey: new_key,
|
|
3123
|
+
description: description,
|
|
3007
3124
|
}
|
|
3008
3125
|
|
|
3009
3126
|
api_headers = {
|
|
@@ -3035,6 +3152,7 @@ module Appwrite
|
|
|
3035
3152
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3036
3153
|
# @param [] array Is attribute an array?
|
|
3037
3154
|
# @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.
|
|
3155
|
+
# @param [String] description Optional description for the attribute.
|
|
3038
3156
|
#
|
|
3039
3157
|
# @return [AttributeVarchar]
|
|
3040
3158
|
def create_varchar_attribute(
|
|
@@ -3045,17 +3163,14 @@ module Appwrite
|
|
|
3045
3163
|
required:,
|
|
3046
3164
|
default: nil,
|
|
3047
3165
|
array: nil,
|
|
3048
|
-
encrypt: nil
|
|
3166
|
+
encrypt: nil,
|
|
3167
|
+
description: nil
|
|
3049
3168
|
)
|
|
3050
|
-
|
|
3051
|
-
.gsub('{databaseId}', database_id)
|
|
3052
|
-
.gsub('{collectionId}', collection_id)
|
|
3053
|
-
|
|
3054
|
-
if database_id.nil?
|
|
3169
|
+
if database_id.nil? || database_id == ''
|
|
3055
3170
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3056
3171
|
end
|
|
3057
3172
|
|
|
3058
|
-
if collection_id.nil?
|
|
3173
|
+
if collection_id.nil? || collection_id == ''
|
|
3059
3174
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3060
3175
|
end
|
|
3061
3176
|
|
|
@@ -3071,6 +3186,10 @@ module Appwrite
|
|
|
3071
3186
|
raise Appwrite::Exception.new('Missing required parameter: "required"')
|
|
3072
3187
|
end
|
|
3073
3188
|
|
|
3189
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar'
|
|
3190
|
+
.gsub('{databaseId}', database_id)
|
|
3191
|
+
.gsub('{collectionId}', collection_id)
|
|
3192
|
+
|
|
3074
3193
|
api_params = {
|
|
3075
3194
|
key: key,
|
|
3076
3195
|
size: size,
|
|
@@ -3078,6 +3197,7 @@ module Appwrite
|
|
|
3078
3197
|
default: default,
|
|
3079
3198
|
array: array,
|
|
3080
3199
|
encrypt: encrypt,
|
|
3200
|
+
description: description,
|
|
3081
3201
|
}
|
|
3082
3202
|
|
|
3083
3203
|
api_headers = {
|
|
@@ -3109,6 +3229,7 @@ module Appwrite
|
|
|
3109
3229
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3110
3230
|
# @param [Integer] size Maximum size of the varchar attribute.
|
|
3111
3231
|
# @param [String] new_key New Attribute Key.
|
|
3232
|
+
# @param [String] description Optional description for the attribute.
|
|
3112
3233
|
#
|
|
3113
3234
|
# @return [AttributeVarchar]
|
|
3114
3235
|
def update_varchar_attribute(
|
|
@@ -3118,22 +3239,18 @@ module Appwrite
|
|
|
3118
3239
|
required:,
|
|
3119
3240
|
default:,
|
|
3120
3241
|
size: nil,
|
|
3121
|
-
new_key: nil
|
|
3242
|
+
new_key: nil,
|
|
3243
|
+
description: nil
|
|
3122
3244
|
)
|
|
3123
|
-
|
|
3124
|
-
.gsub('{databaseId}', database_id)
|
|
3125
|
-
.gsub('{collectionId}', collection_id)
|
|
3126
|
-
.gsub('{key}', key)
|
|
3127
|
-
|
|
3128
|
-
if database_id.nil?
|
|
3245
|
+
if database_id.nil? || database_id == ''
|
|
3129
3246
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3130
3247
|
end
|
|
3131
3248
|
|
|
3132
|
-
if collection_id.nil?
|
|
3249
|
+
if collection_id.nil? || collection_id == ''
|
|
3133
3250
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3134
3251
|
end
|
|
3135
3252
|
|
|
3136
|
-
if key.nil?
|
|
3253
|
+
if key.nil? || key == ''
|
|
3137
3254
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3138
3255
|
end
|
|
3139
3256
|
|
|
@@ -3145,11 +3262,17 @@ module Appwrite
|
|
|
3145
3262
|
raise Appwrite::Exception.new('Missing required parameter: "default"')
|
|
3146
3263
|
end
|
|
3147
3264
|
|
|
3265
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/varchar/{key}'
|
|
3266
|
+
.gsub('{databaseId}', database_id)
|
|
3267
|
+
.gsub('{collectionId}', collection_id)
|
|
3268
|
+
.gsub('{key}', key)
|
|
3269
|
+
|
|
3148
3270
|
api_params = {
|
|
3149
3271
|
required: required,
|
|
3150
3272
|
default: default,
|
|
3151
3273
|
size: size,
|
|
3152
3274
|
newKey: new_key,
|
|
3275
|
+
description: description,
|
|
3153
3276
|
}
|
|
3154
3277
|
|
|
3155
3278
|
api_headers = {
|
|
@@ -3176,29 +3299,29 @@ module Appwrite
|
|
|
3176
3299
|
# @param [String] collection_id Collection ID.
|
|
3177
3300
|
# @param [String] key Attribute Key.
|
|
3178
3301
|
#
|
|
3179
|
-
# @return [AttributeBoolean, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributeString]
|
|
3302
|
+
# @return [AttributeBoolean, AttributeBigint, AttributeInteger, AttributeFloat, AttributeEmail, AttributeEnum, AttributeUrl, AttributeIp, AttributeDatetime, AttributeRelationship, AttributePoint, AttributeLine, AttributePolygon, AttributeVarchar, AttributeText, AttributeMediumtext, AttributeLongtext, AttributeString]
|
|
3180
3303
|
def get_attribute(
|
|
3181
3304
|
database_id:,
|
|
3182
3305
|
collection_id:,
|
|
3183
3306
|
key:
|
|
3184
3307
|
)
|
|
3185
|
-
|
|
3186
|
-
.gsub('{databaseId}', database_id)
|
|
3187
|
-
.gsub('{collectionId}', collection_id)
|
|
3188
|
-
.gsub('{key}', key)
|
|
3189
|
-
|
|
3190
|
-
if database_id.nil?
|
|
3308
|
+
if database_id.nil? || database_id == ''
|
|
3191
3309
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3192
3310
|
end
|
|
3193
3311
|
|
|
3194
|
-
if collection_id.nil?
|
|
3312
|
+
if collection_id.nil? || collection_id == ''
|
|
3195
3313
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3196
3314
|
end
|
|
3197
3315
|
|
|
3198
|
-
if key.nil?
|
|
3316
|
+
if key.nil? || key == ''
|
|
3199
3317
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3200
3318
|
end
|
|
3201
3319
|
|
|
3320
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
|
|
3321
|
+
.gsub('{databaseId}', database_id)
|
|
3322
|
+
.gsub('{collectionId}', collection_id)
|
|
3323
|
+
.gsub('{key}', key)
|
|
3324
|
+
|
|
3202
3325
|
api_params = {}
|
|
3203
3326
|
|
|
3204
3327
|
api_headers = {
|
|
@@ -3242,6 +3365,11 @@ module Appwrite
|
|
|
3242
3365
|
return Models::AttributeBoolean.from(map: response)
|
|
3243
3366
|
end
|
|
3244
3367
|
|
|
3368
|
+
if response['type'] == 'bigint'
|
|
3369
|
+
|
|
3370
|
+
return Models::AttributeBigint.from(map: response)
|
|
3371
|
+
end
|
|
3372
|
+
|
|
3245
3373
|
if response['type'] == 'integer'
|
|
3246
3374
|
|
|
3247
3375
|
return Models::AttributeInteger.from(map: response)
|
|
@@ -3262,6 +3390,41 @@ module Appwrite
|
|
|
3262
3390
|
return Models::AttributeRelationship.from(map: response)
|
|
3263
3391
|
end
|
|
3264
3392
|
|
|
3393
|
+
if response['type'] == 'point'
|
|
3394
|
+
|
|
3395
|
+
return Models::AttributePoint.from(map: response)
|
|
3396
|
+
end
|
|
3397
|
+
|
|
3398
|
+
if response['type'] == 'linestring'
|
|
3399
|
+
|
|
3400
|
+
return Models::AttributeLine.from(map: response)
|
|
3401
|
+
end
|
|
3402
|
+
|
|
3403
|
+
if response['type'] == 'polygon'
|
|
3404
|
+
|
|
3405
|
+
return Models::AttributePolygon.from(map: response)
|
|
3406
|
+
end
|
|
3407
|
+
|
|
3408
|
+
if response['type'] == 'varchar'
|
|
3409
|
+
|
|
3410
|
+
return Models::AttributeVarchar.from(map: response)
|
|
3411
|
+
end
|
|
3412
|
+
|
|
3413
|
+
if response['type'] == 'text'
|
|
3414
|
+
|
|
3415
|
+
return Models::AttributeText.from(map: response)
|
|
3416
|
+
end
|
|
3417
|
+
|
|
3418
|
+
if response['type'] == 'mediumtext'
|
|
3419
|
+
|
|
3420
|
+
return Models::AttributeMediumtext.from(map: response)
|
|
3421
|
+
end
|
|
3422
|
+
|
|
3423
|
+
if response['type'] == 'longtext'
|
|
3424
|
+
|
|
3425
|
+
return Models::AttributeLongtext.from(map: response)
|
|
3426
|
+
end
|
|
3427
|
+
|
|
3265
3428
|
if response['type'] == 'string'
|
|
3266
3429
|
|
|
3267
3430
|
return Models::AttributeString.from(map: response)
|
|
@@ -3285,28 +3448,29 @@ module Appwrite
|
|
|
3285
3448
|
collection_id:,
|
|
3286
3449
|
key:
|
|
3287
3450
|
)
|
|
3288
|
-
|
|
3289
|
-
.gsub('{databaseId}', database_id)
|
|
3290
|
-
.gsub('{collectionId}', collection_id)
|
|
3291
|
-
.gsub('{key}', key)
|
|
3292
|
-
|
|
3293
|
-
if database_id.nil?
|
|
3451
|
+
if database_id.nil? || database_id == ''
|
|
3294
3452
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3295
3453
|
end
|
|
3296
3454
|
|
|
3297
|
-
if collection_id.nil?
|
|
3455
|
+
if collection_id.nil? || collection_id == ''
|
|
3298
3456
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3299
3457
|
end
|
|
3300
3458
|
|
|
3301
|
-
if key.nil?
|
|
3459
|
+
if key.nil? || key == ''
|
|
3302
3460
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3303
3461
|
end
|
|
3304
3462
|
|
|
3463
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'
|
|
3464
|
+
.gsub('{databaseId}', database_id)
|
|
3465
|
+
.gsub('{collectionId}', collection_id)
|
|
3466
|
+
.gsub('{key}', key)
|
|
3467
|
+
|
|
3305
3468
|
api_params = {}
|
|
3306
3469
|
|
|
3307
3470
|
api_headers = {
|
|
3308
3471
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3309
3472
|
"content-type": 'application/json',
|
|
3473
|
+
"accept": 'application/json',
|
|
3310
3474
|
}
|
|
3311
3475
|
|
|
3312
3476
|
@client.call(
|
|
@@ -3323,12 +3487,21 @@ module Appwrite
|
|
|
3323
3487
|
# Get a list of all the user's documents in a given collection. You can use
|
|
3324
3488
|
# the query params to filter your results.
|
|
3325
3489
|
#
|
|
3490
|
+
# Documents returned by aggregate, groupBy or distinct queries hold only the
|
|
3491
|
+
# attributes they select, group or aggregate, typed as a document types them,
|
|
3492
|
+
# with a joined attribute named by its join alias (`alias.attribute`). The
|
|
3493
|
+
# response omits their `$id`, `$sequence`, `$createdAt`, `$updatedAt`,
|
|
3494
|
+
# `$permissions`, `$databaseId` and `$collectionId` unless they select or
|
|
3495
|
+
# group it, and those of a right or full join document that no document of
|
|
3496
|
+
# this collection matched. SDK document models fill omitted system attributes
|
|
3497
|
+
# with empty values.
|
|
3498
|
+
#
|
|
3326
3499
|
# @param [String] database_id Database ID.
|
|
3327
3500
|
# @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).
|
|
3328
3501
|
# @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). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
3329
3502
|
# @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
|
|
3330
3503
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3331
|
-
# @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).
|
|
3504
|
+
# @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours).
|
|
3332
3505
|
#
|
|
3333
3506
|
# @return [DocumentList]
|
|
3334
3507
|
def list_documents(
|
|
@@ -3339,18 +3512,18 @@ module Appwrite
|
|
|
3339
3512
|
total: nil,
|
|
3340
3513
|
ttl: nil
|
|
3341
3514
|
)
|
|
3342
|
-
|
|
3343
|
-
.gsub('{databaseId}', database_id)
|
|
3344
|
-
.gsub('{collectionId}', collection_id)
|
|
3345
|
-
|
|
3346
|
-
if database_id.nil?
|
|
3515
|
+
if database_id.nil? || database_id == ''
|
|
3347
3516
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3348
3517
|
end
|
|
3349
3518
|
|
|
3350
|
-
if collection_id.nil?
|
|
3519
|
+
if collection_id.nil? || collection_id == ''
|
|
3351
3520
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3352
3521
|
end
|
|
3353
3522
|
|
|
3523
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3524
|
+
.gsub('{databaseId}', database_id)
|
|
3525
|
+
.gsub('{collectionId}', collection_id)
|
|
3526
|
+
|
|
3354
3527
|
api_params = {
|
|
3355
3528
|
queries: queries,
|
|
3356
3529
|
transactionId: transaction_id,
|
|
@@ -3396,15 +3569,11 @@ module Appwrite
|
|
|
3396
3569
|
permissions: nil,
|
|
3397
3570
|
transaction_id: nil
|
|
3398
3571
|
)
|
|
3399
|
-
|
|
3400
|
-
.gsub('{databaseId}', database_id)
|
|
3401
|
-
.gsub('{collectionId}', collection_id)
|
|
3402
|
-
|
|
3403
|
-
if database_id.nil?
|
|
3572
|
+
if database_id.nil? || database_id == ''
|
|
3404
3573
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3405
3574
|
end
|
|
3406
3575
|
|
|
3407
|
-
if collection_id.nil?
|
|
3576
|
+
if collection_id.nil? || collection_id == ''
|
|
3408
3577
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3409
3578
|
end
|
|
3410
3579
|
|
|
@@ -3416,6 +3585,10 @@ module Appwrite
|
|
|
3416
3585
|
raise Appwrite::Exception.new('Missing required parameter: "data"')
|
|
3417
3586
|
end
|
|
3418
3587
|
|
|
3588
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3589
|
+
.gsub('{databaseId}', database_id)
|
|
3590
|
+
.gsub('{collectionId}', collection_id)
|
|
3591
|
+
|
|
3419
3592
|
api_params = {
|
|
3420
3593
|
documentId: document_id,
|
|
3421
3594
|
data: data,
|
|
@@ -3458,15 +3631,11 @@ module Appwrite
|
|
|
3458
3631
|
documents:,
|
|
3459
3632
|
transaction_id: nil
|
|
3460
3633
|
)
|
|
3461
|
-
|
|
3462
|
-
.gsub('{databaseId}', database_id)
|
|
3463
|
-
.gsub('{collectionId}', collection_id)
|
|
3464
|
-
|
|
3465
|
-
if database_id.nil?
|
|
3634
|
+
if database_id.nil? || database_id == ''
|
|
3466
3635
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3467
3636
|
end
|
|
3468
3637
|
|
|
3469
|
-
if collection_id.nil?
|
|
3638
|
+
if collection_id.nil? || collection_id == ''
|
|
3470
3639
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3471
3640
|
end
|
|
3472
3641
|
|
|
@@ -3474,6 +3643,10 @@ module Appwrite
|
|
|
3474
3643
|
raise Appwrite::Exception.new('Missing required parameter: "documents"')
|
|
3475
3644
|
end
|
|
3476
3645
|
|
|
3646
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3647
|
+
.gsub('{databaseId}', database_id)
|
|
3648
|
+
.gsub('{collectionId}', collection_id)
|
|
3649
|
+
|
|
3477
3650
|
api_params = {
|
|
3478
3651
|
documents: documents,
|
|
3479
3652
|
transactionId: transaction_id,
|
|
@@ -3515,15 +3688,11 @@ module Appwrite
|
|
|
3515
3688
|
documents:,
|
|
3516
3689
|
transaction_id: nil
|
|
3517
3690
|
)
|
|
3518
|
-
|
|
3519
|
-
.gsub('{databaseId}', database_id)
|
|
3520
|
-
.gsub('{collectionId}', collection_id)
|
|
3521
|
-
|
|
3522
|
-
if database_id.nil?
|
|
3691
|
+
if database_id.nil? || database_id == ''
|
|
3523
3692
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3524
3693
|
end
|
|
3525
3694
|
|
|
3526
|
-
if collection_id.nil?
|
|
3695
|
+
if collection_id.nil? || collection_id == ''
|
|
3527
3696
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3528
3697
|
end
|
|
3529
3698
|
|
|
@@ -3531,6 +3700,10 @@ module Appwrite
|
|
|
3531
3700
|
raise Appwrite::Exception.new('Missing required parameter: "documents"')
|
|
3532
3701
|
end
|
|
3533
3702
|
|
|
3703
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3704
|
+
.gsub('{databaseId}', database_id)
|
|
3705
|
+
.gsub('{collectionId}', collection_id)
|
|
3706
|
+
|
|
3534
3707
|
api_params = {
|
|
3535
3708
|
documents: documents,
|
|
3536
3709
|
transactionId: transaction_id,
|
|
@@ -3572,18 +3745,18 @@ module Appwrite
|
|
|
3572
3745
|
queries: nil,
|
|
3573
3746
|
transaction_id: nil
|
|
3574
3747
|
)
|
|
3575
|
-
|
|
3576
|
-
.gsub('{databaseId}', database_id)
|
|
3577
|
-
.gsub('{collectionId}', collection_id)
|
|
3578
|
-
|
|
3579
|
-
if database_id.nil?
|
|
3748
|
+
if database_id.nil? || database_id == ''
|
|
3580
3749
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3581
3750
|
end
|
|
3582
3751
|
|
|
3583
|
-
if collection_id.nil?
|
|
3752
|
+
if collection_id.nil? || collection_id == ''
|
|
3584
3753
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3585
3754
|
end
|
|
3586
3755
|
|
|
3756
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3757
|
+
.gsub('{databaseId}', database_id)
|
|
3758
|
+
.gsub('{collectionId}', collection_id)
|
|
3759
|
+
|
|
3587
3760
|
api_params = {
|
|
3588
3761
|
data: data,
|
|
3589
3762
|
queries: queries,
|
|
@@ -3623,21 +3796,80 @@ module Appwrite
|
|
|
3623
3796
|
queries: nil,
|
|
3624
3797
|
transaction_id: nil
|
|
3625
3798
|
)
|
|
3799
|
+
if database_id.nil? || database_id == ''
|
|
3800
|
+
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3801
|
+
end
|
|
3802
|
+
|
|
3803
|
+
if collection_id.nil? || collection_id == ''
|
|
3804
|
+
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3805
|
+
end
|
|
3806
|
+
|
|
3626
3807
|
api_path = '/databases/{databaseId}/collections/{collectionId}/documents'
|
|
3627
3808
|
.gsub('{databaseId}', database_id)
|
|
3628
3809
|
.gsub('{collectionId}', collection_id)
|
|
3629
3810
|
|
|
3630
|
-
|
|
3811
|
+
api_params = {
|
|
3812
|
+
queries: queries,
|
|
3813
|
+
transactionId: transaction_id,
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
api_headers = {
|
|
3817
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
3818
|
+
"content-type": 'application/json',
|
|
3819
|
+
"accept": 'application/json',
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
@client.call(
|
|
3823
|
+
method: 'DELETE',
|
|
3824
|
+
path: api_path,
|
|
3825
|
+
headers: api_headers,
|
|
3826
|
+
params: api_params,
|
|
3827
|
+
response_type: Models::DocumentList
|
|
3828
|
+
)
|
|
3829
|
+
end
|
|
3830
|
+
|
|
3831
|
+
#
|
|
3832
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createQuery` instead.
|
|
3833
|
+
#
|
|
3834
|
+
# Get a list of all the user's documents in a given collection using a POST
|
|
3835
|
+
# request. This behaves identically to the list documents endpoint but
|
|
3836
|
+
# accepts the queries in the request body, allowing much larger `queries`
|
|
3837
|
+
# arrays than can fit in a URL query string.
|
|
3838
|
+
#
|
|
3839
|
+
#
|
|
3840
|
+
# @param [String] database_id Database ID.
|
|
3841
|
+
# @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).
|
|
3842
|
+
# @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). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
3843
|
+
# @param [String] transaction_id Transaction ID to read uncommitted changes within the transaction.
|
|
3844
|
+
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3845
|
+
# @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. Lists with join queries are not cached. Must be between 0 and 86400 (24 hours).
|
|
3846
|
+
#
|
|
3847
|
+
# @return [DocumentList]
|
|
3848
|
+
def create_query(
|
|
3849
|
+
database_id:,
|
|
3850
|
+
collection_id:,
|
|
3851
|
+
queries: nil,
|
|
3852
|
+
transaction_id: nil,
|
|
3853
|
+
total: nil,
|
|
3854
|
+
ttl: nil
|
|
3855
|
+
)
|
|
3856
|
+
if database_id.nil? || database_id == ''
|
|
3631
3857
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3632
3858
|
end
|
|
3633
3859
|
|
|
3634
|
-
if collection_id.nil?
|
|
3860
|
+
if collection_id.nil? || collection_id == ''
|
|
3635
3861
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3636
3862
|
end
|
|
3637
3863
|
|
|
3864
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/query'
|
|
3865
|
+
.gsub('{databaseId}', database_id)
|
|
3866
|
+
.gsub('{collectionId}', collection_id)
|
|
3867
|
+
|
|
3638
3868
|
api_params = {
|
|
3639
3869
|
queries: queries,
|
|
3640
3870
|
transactionId: transaction_id,
|
|
3871
|
+
total: total,
|
|
3872
|
+
ttl: ttl,
|
|
3641
3873
|
}
|
|
3642
3874
|
|
|
3643
3875
|
api_headers = {
|
|
@@ -3647,7 +3879,7 @@ module Appwrite
|
|
|
3647
3879
|
}
|
|
3648
3880
|
|
|
3649
3881
|
@client.call(
|
|
3650
|
-
method: '
|
|
3882
|
+
method: 'POST',
|
|
3651
3883
|
path: api_path,
|
|
3652
3884
|
headers: api_headers,
|
|
3653
3885
|
params: api_params,
|
|
@@ -3675,23 +3907,23 @@ module Appwrite
|
|
|
3675
3907
|
queries: nil,
|
|
3676
3908
|
transaction_id: nil
|
|
3677
3909
|
)
|
|
3678
|
-
|
|
3679
|
-
.gsub('{databaseId}', database_id)
|
|
3680
|
-
.gsub('{collectionId}', collection_id)
|
|
3681
|
-
.gsub('{documentId}', document_id)
|
|
3682
|
-
|
|
3683
|
-
if database_id.nil?
|
|
3910
|
+
if database_id.nil? || database_id == ''
|
|
3684
3911
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3685
3912
|
end
|
|
3686
3913
|
|
|
3687
|
-
if collection_id.nil?
|
|
3914
|
+
if collection_id.nil? || collection_id == ''
|
|
3688
3915
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3689
3916
|
end
|
|
3690
3917
|
|
|
3691
|
-
if document_id.nil?
|
|
3918
|
+
if document_id.nil? || document_id == ''
|
|
3692
3919
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3693
3920
|
end
|
|
3694
3921
|
|
|
3922
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3923
|
+
.gsub('{databaseId}', database_id)
|
|
3924
|
+
.gsub('{collectionId}', collection_id)
|
|
3925
|
+
.gsub('{documentId}', document_id)
|
|
3926
|
+
|
|
3695
3927
|
api_params = {
|
|
3696
3928
|
queries: queries,
|
|
3697
3929
|
transactionId: transaction_id,
|
|
@@ -3735,23 +3967,23 @@ module Appwrite
|
|
|
3735
3967
|
permissions: nil,
|
|
3736
3968
|
transaction_id: nil
|
|
3737
3969
|
)
|
|
3738
|
-
|
|
3739
|
-
.gsub('{databaseId}', database_id)
|
|
3740
|
-
.gsub('{collectionId}', collection_id)
|
|
3741
|
-
.gsub('{documentId}', document_id)
|
|
3742
|
-
|
|
3743
|
-
if database_id.nil?
|
|
3970
|
+
if database_id.nil? || database_id == ''
|
|
3744
3971
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3745
3972
|
end
|
|
3746
3973
|
|
|
3747
|
-
if collection_id.nil?
|
|
3974
|
+
if collection_id.nil? || collection_id == ''
|
|
3748
3975
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3749
3976
|
end
|
|
3750
3977
|
|
|
3751
|
-
if document_id.nil?
|
|
3978
|
+
if document_id.nil? || document_id == ''
|
|
3752
3979
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3753
3980
|
end
|
|
3754
3981
|
|
|
3982
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
3983
|
+
.gsub('{databaseId}', database_id)
|
|
3984
|
+
.gsub('{collectionId}', collection_id)
|
|
3985
|
+
.gsub('{documentId}', document_id)
|
|
3986
|
+
|
|
3755
3987
|
api_params = {
|
|
3756
3988
|
data: data,
|
|
3757
3989
|
permissions: permissions,
|
|
@@ -3795,23 +4027,23 @@ module Appwrite
|
|
|
3795
4027
|
permissions: nil,
|
|
3796
4028
|
transaction_id: nil
|
|
3797
4029
|
)
|
|
3798
|
-
|
|
3799
|
-
.gsub('{databaseId}', database_id)
|
|
3800
|
-
.gsub('{collectionId}', collection_id)
|
|
3801
|
-
.gsub('{documentId}', document_id)
|
|
3802
|
-
|
|
3803
|
-
if database_id.nil?
|
|
4030
|
+
if database_id.nil? || database_id == ''
|
|
3804
4031
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3805
4032
|
end
|
|
3806
4033
|
|
|
3807
|
-
if collection_id.nil?
|
|
4034
|
+
if collection_id.nil? || collection_id == ''
|
|
3808
4035
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3809
4036
|
end
|
|
3810
4037
|
|
|
3811
|
-
if document_id.nil?
|
|
4038
|
+
if document_id.nil? || document_id == ''
|
|
3812
4039
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3813
4040
|
end
|
|
3814
4041
|
|
|
4042
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
4043
|
+
.gsub('{databaseId}', database_id)
|
|
4044
|
+
.gsub('{collectionId}', collection_id)
|
|
4045
|
+
.gsub('{documentId}', document_id)
|
|
4046
|
+
|
|
3815
4047
|
api_params = {
|
|
3816
4048
|
data: data,
|
|
3817
4049
|
permissions: permissions,
|
|
@@ -3850,23 +4082,23 @@ module Appwrite
|
|
|
3850
4082
|
document_id:,
|
|
3851
4083
|
transaction_id: nil
|
|
3852
4084
|
)
|
|
3853
|
-
|
|
3854
|
-
.gsub('{databaseId}', database_id)
|
|
3855
|
-
.gsub('{collectionId}', collection_id)
|
|
3856
|
-
.gsub('{documentId}', document_id)
|
|
3857
|
-
|
|
3858
|
-
if database_id.nil?
|
|
4085
|
+
if database_id.nil? || database_id == ''
|
|
3859
4086
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3860
4087
|
end
|
|
3861
4088
|
|
|
3862
|
-
if collection_id.nil?
|
|
4089
|
+
if collection_id.nil? || collection_id == ''
|
|
3863
4090
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3864
4091
|
end
|
|
3865
4092
|
|
|
3866
|
-
if document_id.nil?
|
|
4093
|
+
if document_id.nil? || document_id == ''
|
|
3867
4094
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3868
4095
|
end
|
|
3869
4096
|
|
|
4097
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'
|
|
4098
|
+
.gsub('{databaseId}', database_id)
|
|
4099
|
+
.gsub('{collectionId}', collection_id)
|
|
4100
|
+
.gsub('{documentId}', document_id)
|
|
4101
|
+
|
|
3870
4102
|
api_params = {
|
|
3871
4103
|
transactionId: transaction_id,
|
|
3872
4104
|
}
|
|
@@ -3874,6 +4106,7 @@ module Appwrite
|
|
|
3874
4106
|
api_headers = {
|
|
3875
4107
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3876
4108
|
"content-type": 'application/json',
|
|
4109
|
+
"accept": 'application/json',
|
|
3877
4110
|
}
|
|
3878
4111
|
|
|
3879
4112
|
@client.call(
|
|
@@ -3907,28 +4140,28 @@ module Appwrite
|
|
|
3907
4140
|
min: nil,
|
|
3908
4141
|
transaction_id: nil
|
|
3909
4142
|
)
|
|
3910
|
-
|
|
3911
|
-
.gsub('{databaseId}', database_id)
|
|
3912
|
-
.gsub('{collectionId}', collection_id)
|
|
3913
|
-
.gsub('{documentId}', document_id)
|
|
3914
|
-
.gsub('{attribute}', attribute)
|
|
3915
|
-
|
|
3916
|
-
if database_id.nil?
|
|
4143
|
+
if database_id.nil? || database_id == ''
|
|
3917
4144
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3918
4145
|
end
|
|
3919
4146
|
|
|
3920
|
-
if collection_id.nil?
|
|
4147
|
+
if collection_id.nil? || collection_id == ''
|
|
3921
4148
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3922
4149
|
end
|
|
3923
4150
|
|
|
3924
|
-
if document_id.nil?
|
|
4151
|
+
if document_id.nil? || document_id == ''
|
|
3925
4152
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3926
4153
|
end
|
|
3927
4154
|
|
|
3928
|
-
if attribute.nil?
|
|
4155
|
+
if attribute.nil? || attribute == ''
|
|
3929
4156
|
raise Appwrite::Exception.new('Missing required parameter: "attribute"')
|
|
3930
4157
|
end
|
|
3931
4158
|
|
|
4159
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'
|
|
4160
|
+
.gsub('{databaseId}', database_id)
|
|
4161
|
+
.gsub('{collectionId}', collection_id)
|
|
4162
|
+
.gsub('{documentId}', document_id)
|
|
4163
|
+
.gsub('{attribute}', attribute)
|
|
4164
|
+
|
|
3932
4165
|
api_params = {
|
|
3933
4166
|
value: value,
|
|
3934
4167
|
min: min,
|
|
@@ -3973,28 +4206,28 @@ module Appwrite
|
|
|
3973
4206
|
max: nil,
|
|
3974
4207
|
transaction_id: nil
|
|
3975
4208
|
)
|
|
3976
|
-
|
|
3977
|
-
.gsub('{databaseId}', database_id)
|
|
3978
|
-
.gsub('{collectionId}', collection_id)
|
|
3979
|
-
.gsub('{documentId}', document_id)
|
|
3980
|
-
.gsub('{attribute}', attribute)
|
|
3981
|
-
|
|
3982
|
-
if database_id.nil?
|
|
4209
|
+
if database_id.nil? || database_id == ''
|
|
3983
4210
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
3984
4211
|
end
|
|
3985
4212
|
|
|
3986
|
-
if collection_id.nil?
|
|
4213
|
+
if collection_id.nil? || collection_id == ''
|
|
3987
4214
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
3988
4215
|
end
|
|
3989
4216
|
|
|
3990
|
-
if document_id.nil?
|
|
4217
|
+
if document_id.nil? || document_id == ''
|
|
3991
4218
|
raise Appwrite::Exception.new('Missing required parameter: "documentId"')
|
|
3992
4219
|
end
|
|
3993
4220
|
|
|
3994
|
-
if attribute.nil?
|
|
4221
|
+
if attribute.nil? || attribute == ''
|
|
3995
4222
|
raise Appwrite::Exception.new('Missing required parameter: "attribute"')
|
|
3996
4223
|
end
|
|
3997
4224
|
|
|
4225
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'
|
|
4226
|
+
.gsub('{databaseId}', database_id)
|
|
4227
|
+
.gsub('{collectionId}', collection_id)
|
|
4228
|
+
.gsub('{documentId}', document_id)
|
|
4229
|
+
.gsub('{attribute}', attribute)
|
|
4230
|
+
|
|
3998
4231
|
api_params = {
|
|
3999
4232
|
value: value,
|
|
4000
4233
|
max: max,
|
|
@@ -4033,18 +4266,18 @@ module Appwrite
|
|
|
4033
4266
|
queries: nil,
|
|
4034
4267
|
total: nil
|
|
4035
4268
|
)
|
|
4036
|
-
|
|
4037
|
-
.gsub('{databaseId}', database_id)
|
|
4038
|
-
.gsub('{collectionId}', collection_id)
|
|
4039
|
-
|
|
4040
|
-
if database_id.nil?
|
|
4269
|
+
if database_id.nil? || database_id == ''
|
|
4041
4270
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
4042
4271
|
end
|
|
4043
4272
|
|
|
4044
|
-
if collection_id.nil?
|
|
4273
|
+
if collection_id.nil? || collection_id == ''
|
|
4045
4274
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
4046
4275
|
end
|
|
4047
4276
|
|
|
4277
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
|
|
4278
|
+
.gsub('{databaseId}', database_id)
|
|
4279
|
+
.gsub('{collectionId}', collection_id)
|
|
4280
|
+
|
|
4048
4281
|
api_params = {
|
|
4049
4282
|
queries: queries,
|
|
4050
4283
|
total: total,
|
|
@@ -4069,7 +4302,9 @@ module Appwrite
|
|
|
4069
4302
|
#
|
|
4070
4303
|
# Creates an index on the attributes listed. Your index should include all
|
|
4071
4304
|
# the attributes you will query in a single request.
|
|
4072
|
-
# Attributes can be `key`, `fulltext`, and `
|
|
4305
|
+
# Attributes can be `key`, `fulltext`, `unique`, `spatial`, and `trigram`.
|
|
4306
|
+
# `trigram` is only available on PostgreSQL and lets `contains`,
|
|
4307
|
+
# `startsWith`, and `endsWith` queries on string attributes use an index.
|
|
4073
4308
|
#
|
|
4074
4309
|
# @param [String] database_id Database ID.
|
|
4075
4310
|
# @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).
|
|
@@ -4078,6 +4313,7 @@ module Appwrite
|
|
|
4078
4313
|
# @param [Array] attributes Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
4079
4314
|
# @param [Array] orders Array of index orders. Maximum of 100 orders are allowed.
|
|
4080
4315
|
# @param [Array] lengths Length of index. Maximum of 100
|
|
4316
|
+
# @param [String] description Optional description for the index.
|
|
4081
4317
|
#
|
|
4082
4318
|
# @return [Index]
|
|
4083
4319
|
def create_index(
|
|
@@ -4087,17 +4323,14 @@ module Appwrite
|
|
|
4087
4323
|
type:,
|
|
4088
4324
|
attributes:,
|
|
4089
4325
|
orders: nil,
|
|
4090
|
-
lengths: nil
|
|
4326
|
+
lengths: nil,
|
|
4327
|
+
description: nil
|
|
4091
4328
|
)
|
|
4092
|
-
|
|
4093
|
-
.gsub('{databaseId}', database_id)
|
|
4094
|
-
.gsub('{collectionId}', collection_id)
|
|
4095
|
-
|
|
4096
|
-
if database_id.nil?
|
|
4329
|
+
if database_id.nil? || database_id == ''
|
|
4097
4330
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
4098
4331
|
end
|
|
4099
4332
|
|
|
4100
|
-
if collection_id.nil?
|
|
4333
|
+
if collection_id.nil? || collection_id == ''
|
|
4101
4334
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
4102
4335
|
end
|
|
4103
4336
|
|
|
@@ -4113,12 +4346,17 @@ module Appwrite
|
|
|
4113
4346
|
raise Appwrite::Exception.new('Missing required parameter: "attributes"')
|
|
4114
4347
|
end
|
|
4115
4348
|
|
|
4349
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes'
|
|
4350
|
+
.gsub('{databaseId}', database_id)
|
|
4351
|
+
.gsub('{collectionId}', collection_id)
|
|
4352
|
+
|
|
4116
4353
|
api_params = {
|
|
4117
4354
|
key: key,
|
|
4118
4355
|
type: type,
|
|
4119
4356
|
attributes: attributes,
|
|
4120
4357
|
orders: orders,
|
|
4121
4358
|
lengths: lengths,
|
|
4359
|
+
description: description,
|
|
4122
4360
|
}
|
|
4123
4361
|
|
|
4124
4362
|
api_headers = {
|
|
@@ -4151,23 +4389,23 @@ module Appwrite
|
|
|
4151
4389
|
collection_id:,
|
|
4152
4390
|
key:
|
|
4153
4391
|
)
|
|
4154
|
-
|
|
4155
|
-
.gsub('{databaseId}', database_id)
|
|
4156
|
-
.gsub('{collectionId}', collection_id)
|
|
4157
|
-
.gsub('{key}', key)
|
|
4158
|
-
|
|
4159
|
-
if database_id.nil?
|
|
4392
|
+
if database_id.nil? || database_id == ''
|
|
4160
4393
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
4161
4394
|
end
|
|
4162
4395
|
|
|
4163
|
-
if collection_id.nil?
|
|
4396
|
+
if collection_id.nil? || collection_id == ''
|
|
4164
4397
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
4165
4398
|
end
|
|
4166
4399
|
|
|
4167
|
-
if key.nil?
|
|
4400
|
+
if key.nil? || key == ''
|
|
4168
4401
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
4169
4402
|
end
|
|
4170
4403
|
|
|
4404
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
4405
|
+
.gsub('{databaseId}', database_id)
|
|
4406
|
+
.gsub('{collectionId}', collection_id)
|
|
4407
|
+
.gsub('{key}', key)
|
|
4408
|
+
|
|
4171
4409
|
api_params = {}
|
|
4172
4410
|
|
|
4173
4411
|
api_headers = {
|
|
@@ -4199,28 +4437,29 @@ module Appwrite
|
|
|
4199
4437
|
collection_id:,
|
|
4200
4438
|
key:
|
|
4201
4439
|
)
|
|
4202
|
-
|
|
4203
|
-
.gsub('{databaseId}', database_id)
|
|
4204
|
-
.gsub('{collectionId}', collection_id)
|
|
4205
|
-
.gsub('{key}', key)
|
|
4206
|
-
|
|
4207
|
-
if database_id.nil?
|
|
4440
|
+
if database_id.nil? || database_id == ''
|
|
4208
4441
|
raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
|
|
4209
4442
|
end
|
|
4210
4443
|
|
|
4211
|
-
if collection_id.nil?
|
|
4444
|
+
if collection_id.nil? || collection_id == ''
|
|
4212
4445
|
raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
|
|
4213
4446
|
end
|
|
4214
4447
|
|
|
4215
|
-
if key.nil?
|
|
4448
|
+
if key.nil? || key == ''
|
|
4216
4449
|
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
4217
4450
|
end
|
|
4218
4451
|
|
|
4452
|
+
api_path = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'
|
|
4453
|
+
.gsub('{databaseId}', database_id)
|
|
4454
|
+
.gsub('{collectionId}', collection_id)
|
|
4455
|
+
.gsub('{key}', key)
|
|
4456
|
+
|
|
4219
4457
|
api_params = {}
|
|
4220
4458
|
|
|
4221
4459
|
api_headers = {
|
|
4222
4460
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
4223
4461
|
"content-type": 'application/json',
|
|
4462
|
+
"accept": 'application/json',
|
|
4224
4463
|
}
|
|
4225
4464
|
|
|
4226
4465
|
@client.call(
|