appwrite 26.1.0 → 28.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +42 -25
- data/lib/appwrite/enums/adapter.rb +1 -1
- data/lib/appwrite/enums/attribute_status.rb +1 -1
- data/lib/appwrite/enums/authentication_factor.rb +2 -1
- data/lib/appwrite/enums/authenticator_type.rb +1 -1
- data/lib/appwrite/enums/backup_services.rb +1 -1
- data/lib/appwrite/enums/billing_plan_group.rb +1 -1
- data/lib/appwrite/enums/browser.rb +1 -1
- data/lib/appwrite/enums/browser_permission.rb +1 -1
- data/lib/appwrite/enums/browser_theme.rb +1 -1
- data/lib/appwrite/enums/build_runtime.rb +3 -1
- data/lib/appwrite/enums/column_status.rb +1 -1
- data/lib/appwrite/enums/compression.rb +1 -1
- data/lib/appwrite/enums/credit_card.rb +1 -1
- data/lib/appwrite/enums/database_status.rb +1 -1
- data/lib/appwrite/enums/database_type.rb +1 -1
- data/lib/appwrite/enums/databases_index_type.rb +1 -1
- data/lib/appwrite/enums/deployment_download_type.rb +1 -1
- data/lib/appwrite/enums/deployment_status.rb +1 -1
- data/lib/appwrite/enums/documents_db_index_type.rb +9 -0
- data/lib/appwrite/enums/embedding_model.rb +8 -0
- data/lib/appwrite/enums/execution_method.rb +1 -1
- data/lib/appwrite/enums/execution_resource_type.rb +8 -0
- data/lib/appwrite/enums/execution_status.rb +1 -1
- data/lib/appwrite/enums/execution_trigger.rb +1 -1
- data/lib/appwrite/enums/flag.rb +1 -1
- data/lib/appwrite/enums/framework.rb +1 -1
- data/lib/appwrite/enums/image_format.rb +1 -1
- data/lib/appwrite/enums/image_gravity.rb +1 -1
- data/lib/appwrite/enums/index_status.rb +1 -1
- data/lib/appwrite/enums/invalidation_type.rb +9 -0
- data/lib/appwrite/enums/message_priority.rb +1 -1
- data/lib/appwrite/enums/message_status.rb +1 -1
- data/lib/appwrite/enums/messaging_provider_type.rb +1 -1
- data/lib/appwrite/enums/o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth_provider.rb +2 -1
- data/lib/appwrite/enums/order_by.rb +1 -1
- data/lib/appwrite/enums/organization_key_scopes.rb +1 -1
- data/lib/appwrite/enums/password_hash.rb +1 -1
- data/lib/appwrite/enums/platform_type.rb +1 -1
- data/lib/appwrite/enums/project_auth_method_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_locale.rb +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +16 -3
- data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -1
- data/lib/appwrite/enums/project_policy_id.rb +2 -1
- data/lib/appwrite/enums/project_protocol_id.rb +1 -1
- data/lib/appwrite/enums/project_service_id.rb +1 -1
- data/lib/appwrite/enums/project_smtp_secure.rb +1 -1
- data/lib/appwrite/enums/proxy_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_status.rb +1 -1
- data/lib/appwrite/enums/region.rb +1 -1
- data/lib/appwrite/enums/relation_mutate.rb +1 -1
- data/lib/appwrite/enums/relationship_type.rb +1 -1
- data/lib/appwrite/enums/runtime.rb +3 -1
- data/lib/appwrite/enums/smtp_encryption.rb +1 -1
- data/lib/appwrite/enums/status_code.rb +1 -1
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -1
- data/lib/appwrite/enums/template_reference_type.rb +1 -1
- data/lib/appwrite/enums/timezone.rb +1 -1
- data/lib/appwrite/enums/vcs_reference_type.rb +1 -1
- data/lib/appwrite/enums/vectors_db_index_type.rb +12 -0
- data/lib/appwrite/exception.rb +1 -1
- data/lib/appwrite/id.rb +3 -3
- data/lib/appwrite/input_file.rb +1 -1
- data/lib/appwrite/models/activity_event.rb +1 -1
- data/lib/appwrite/models/activity_event_list.rb +1 -1
- data/lib/appwrite/models/additional_resource.rb +1 -1
- data/lib/appwrite/models/algo_argon2.rb +1 -1
- data/lib/appwrite/models/algo_bcrypt.rb +1 -1
- data/lib/appwrite/models/algo_md5.rb +1 -1
- data/lib/appwrite/models/algo_phpass.rb +1 -1
- data/lib/appwrite/models/algo_scrypt.rb +1 -1
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -1
- data/lib/appwrite/models/algo_sha.rb +1 -1
- data/lib/appwrite/models/app.rb +1 -1
- data/lib/appwrite/models/app_installation.rb +2 -2
- data/lib/appwrite/models/app_installation_list.rb +1 -1
- data/lib/appwrite/models/app_key.rb +2 -2
- data/lib/appwrite/models/app_key_list.rb +1 -1
- data/lib/appwrite/models/app_scope.rb +1 -1
- data/lib/appwrite/models/app_scope_list.rb +1 -1
- data/lib/appwrite/models/app_secret.rb +2 -2
- data/lib/appwrite/models/app_secret_list.rb +1 -1
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -2
- data/lib/appwrite/models/apps_list.rb +1 -1
- data/lib/appwrite/models/attribute_bigint.rb +5 -6
- data/lib/appwrite/models/attribute_boolean.rb +3 -4
- data/lib/appwrite/models/attribute_datetime.rb +3 -4
- data/lib/appwrite/models/attribute_email.rb +3 -4
- data/lib/appwrite/models/attribute_enum.rb +3 -4
- data/lib/appwrite/models/attribute_float.rb +5 -6
- data/lib/appwrite/models/attribute_integer.rb +5 -6
- data/lib/appwrite/models/attribute_ip.rb +3 -4
- data/lib/appwrite/models/attribute_line.rb +3 -4
- data/lib/appwrite/models/attribute_list.rb +1 -1
- data/lib/appwrite/models/attribute_longtext.rb +4 -5
- data/lib/appwrite/models/attribute_mediumtext.rb +4 -5
- data/lib/appwrite/models/attribute_object.rb +80 -0
- data/lib/appwrite/models/attribute_point.rb +3 -4
- data/lib/appwrite/models/attribute_polygon.rb +3 -4
- data/lib/appwrite/models/attribute_relationship.rb +2 -3
- data/lib/appwrite/models/attribute_string.rb +4 -5
- data/lib/appwrite/models/attribute_text.rb +4 -5
- data/lib/appwrite/models/attribute_url.rb +3 -4
- data/lib/appwrite/models/attribute_varchar.rb +4 -5
- data/lib/appwrite/models/attribute_vector.rb +85 -0
- data/lib/appwrite/models/backup_archive.rb +3 -3
- data/lib/appwrite/models/backup_archive_list.rb +1 -1
- data/lib/appwrite/models/backup_policy.rb +3 -3
- data/lib/appwrite/models/backup_policy_list.rb +1 -1
- data/lib/appwrite/models/backup_restoration.rb +1 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -1
- data/lib/appwrite/models/billing_limits.rb +9 -9
- data/lib/appwrite/models/billing_plan.rb +15 -6
- data/lib/appwrite/models/billing_plan_addon.rb +5 -5
- data/lib/appwrite/models/billing_plan_addon_details.rb +1 -1
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +20 -20
- data/lib/appwrite/models/billing_plan_limits.rb +3 -3
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -1
- data/lib/appwrite/models/block.rb +3 -3
- data/lib/appwrite/models/bucket.rb +1 -1
- data/lib/appwrite/models/bucket_list.rb +1 -1
- data/lib/appwrite/models/collection.rb +1 -1
- data/lib/appwrite/models/collection_list.rb +1 -1
- data/lib/appwrite/models/column_bigint.rb +5 -6
- data/lib/appwrite/models/column_boolean.rb +3 -4
- data/lib/appwrite/models/column_datetime.rb +3 -4
- data/lib/appwrite/models/column_email.rb +3 -4
- data/lib/appwrite/models/column_enum.rb +3 -4
- data/lib/appwrite/models/column_float.rb +5 -6
- data/lib/appwrite/models/column_index.rb +2 -2
- data/lib/appwrite/models/column_index_list.rb +1 -1
- data/lib/appwrite/models/column_integer.rb +5 -6
- data/lib/appwrite/models/column_ip.rb +3 -4
- data/lib/appwrite/models/column_line.rb +3 -4
- data/lib/appwrite/models/column_list.rb +1 -1
- data/lib/appwrite/models/column_longtext.rb +4 -5
- data/lib/appwrite/models/column_mediumtext.rb +4 -5
- data/lib/appwrite/models/column_point.rb +3 -4
- data/lib/appwrite/models/column_polygon.rb +3 -4
- data/lib/appwrite/models/column_relationship.rb +2 -3
- data/lib/appwrite/models/column_string.rb +4 -5
- data/lib/appwrite/models/column_text.rb +4 -5
- data/lib/appwrite/models/column_url.rb +3 -4
- data/lib/appwrite/models/column_varchar.rb +4 -5
- data/lib/appwrite/models/continent.rb +1 -1
- data/lib/appwrite/models/continent_list.rb +1 -1
- data/lib/appwrite/models/country.rb +1 -1
- data/lib/appwrite/models/country_list.rb +1 -1
- data/lib/appwrite/models/currency.rb +1 -1
- data/lib/appwrite/models/currency_list.rb +1 -1
- data/lib/appwrite/models/database.rb +22 -8
- data/lib/appwrite/models/database_list.rb +1 -1
- data/lib/appwrite/models/database_migration.rb +107 -0
- data/lib/appwrite/models/database_migration_list.rb +32 -0
- data/lib/appwrite/models/database_status.rb +31 -1
- data/lib/appwrite/models/database_status_connections.rb +1 -1
- data/lib/appwrite/models/database_status_replica.rb +7 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -1
- data/lib/appwrite/models/dedicated_database.rb +3 -8
- data/lib/appwrite/models/dedicated_database_backup.rb +107 -0
- data/lib/appwrite/models/dedicated_database_backup_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +47 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +82 -0
- data/lib/appwrite/models/dedicated_database_branch_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +52 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +32 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +37 -0
- data/lib/appwrite/models/dedicated_database_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_member.rb +6 -1
- data/lib/appwrite/models/dedicated_database_operation.rb +77 -0
- data/lib/appwrite/models/dedicated_database_operation_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +72 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +26 -1
- data/lib/appwrite/models/dedicated_database_restoration.rb +82 -0
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +1 -6
- data/lib/appwrite/models/deployment.rb +1 -2
- data/lib/appwrite/models/deployment_list.rb +1 -1
- data/lib/appwrite/models/dev_key.rb +1 -1
- data/lib/appwrite/models/document.rb +1 -1
- data/lib/appwrite/models/document_list.rb +1 -1
- data/lib/appwrite/models/email_template.rb +1 -1
- data/lib/appwrite/models/email_template_list.rb +1 -1
- data/lib/appwrite/models/embedding.rb +42 -0
- data/lib/appwrite/models/embedding_list.rb +32 -0
- data/lib/appwrite/models/ephemeral_key.rb +1 -1
- data/lib/appwrite/models/execution.rb +25 -8
- data/lib/appwrite/models/execution_list.rb +1 -1
- data/lib/appwrite/models/file.rb +11 -1
- data/lib/appwrite/models/file_list.rb +1 -1
- data/lib/appwrite/models/framework.rb +1 -1
- data/lib/appwrite/models/framework_adapter.rb +1 -1
- data/lib/appwrite/models/framework_list.rb +1 -1
- data/lib/appwrite/models/function.rb +1 -1
- data/lib/appwrite/models/function_list.rb +1 -1
- data/lib/appwrite/models/headers.rb +1 -1
- data/lib/appwrite/models/identity.rb +1 -1
- data/lib/appwrite/models/identity_list.rb +1 -1
- data/lib/appwrite/models/index.rb +2 -3
- data/lib/appwrite/models/index_list.rb +1 -1
- data/lib/appwrite/models/insight.rb +4 -4
- data/lib/appwrite/models/insight_cta.rb +1 -1
- data/lib/appwrite/models/insight_list.rb +1 -1
- data/lib/appwrite/models/jwt.rb +1 -1
- data/lib/appwrite/models/key.rb +1 -1
- data/lib/appwrite/models/key_list.rb +1 -1
- data/lib/appwrite/models/language.rb +1 -1
- data/lib/appwrite/models/language_list.rb +1 -1
- data/lib/appwrite/models/locale.rb +12 -12
- data/lib/appwrite/models/locale_code.rb +1 -1
- data/lib/appwrite/models/locale_code_list.rb +1 -1
- data/lib/appwrite/models/log.rb +1 -1
- data/lib/appwrite/models/log_list.rb +1 -1
- data/lib/appwrite/models/membership.rb +1 -1
- data/lib/appwrite/models/membership_list.rb +1 -1
- data/lib/appwrite/models/message.rb +4 -5
- data/lib/appwrite/models/message_list.rb +1 -1
- data/lib/appwrite/models/mfa_challenge.rb +1 -1
- data/lib/appwrite/models/mfa_challenge_secret.rb +47 -0
- data/lib/appwrite/models/mfa_factors.rb +9 -4
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -1
- data/lib/appwrite/models/mfa_type.rb +1 -1
- data/lib/appwrite/models/mock_number.rb +1 -1
- data/lib/appwrite/models/mock_number_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -1
- data/lib/appwrite/models/o_auth2_apple.rb +1 -1
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -1
- data/lib/appwrite/models/o_auth2_auth0.rb +1 -1
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -1
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -1
- data/lib/appwrite/models/o_auth2_box.rb +1 -1
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -1
- data/lib/appwrite/models/o_auth2_discord.rb +1 -1
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -1
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -1
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -1
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -1
- data/lib/appwrite/models/o_auth2_figma.rb +1 -1
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -1
- data/lib/appwrite/models/o_auth2_github.rb +1 -1
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -1
- data/lib/appwrite/models/o_auth2_google.rb +18 -2
- data/lib/appwrite/models/o_auth2_hugging_face.rb +42 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -1
- data/lib/appwrite/models/o_auth2_kick.rb +1 -1
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -1
- data/lib/appwrite/models/o_auth2_microsoft.rb +1 -1
- data/lib/appwrite/models/o_auth2_notion.rb +1 -1
- data/lib/appwrite/models/o_auth2_oidc.rb +20 -3
- data/lib/appwrite/models/o_auth2_okta.rb +1 -1
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -1
- data/lib/appwrite/models/o_auth2_podio.rb +1 -1
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_salesforce.rb +1 -1
- data/lib/appwrite/models/o_auth2_slack.rb +1 -1
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -1
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -1
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -1
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -1
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -1
- data/lib/appwrite/models/o_auth2_x.rb +1 -1
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -1
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoho.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -1
- data/lib/appwrite/models/oauth2_approve.rb +1 -1
- data/lib/appwrite/models/oauth2_authorize.rb +1 -1
- data/lib/appwrite/models/oauth2_consent.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -1
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -1
- data/lib/appwrite/models/oauth2_grant.rb +1 -1
- data/lib/appwrite/models/oauth2_organization.rb +1 -1
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -1
- data/lib/appwrite/models/oauth2_par.rb +1 -1
- data/lib/appwrite/models/oauth2_project.rb +1 -1
- data/lib/appwrite/models/oauth2_project_list.rb +1 -1
- data/lib/appwrite/models/oauth2_reject.rb +1 -1
- data/lib/appwrite/models/oauth2_token.rb +3 -3
- data/lib/appwrite/models/organization.rb +2 -2
- data/lib/appwrite/models/phone.rb +1 -1
- data/lib/appwrite/models/phone_list.rb +1 -1
- data/lib/appwrite/models/platform_android.rb +1 -2
- data/lib/appwrite/models/platform_apple.rb +1 -2
- data/lib/appwrite/models/platform_linux.rb +1 -2
- data/lib/appwrite/models/platform_list.rb +1 -1
- data/lib/appwrite/models/platform_web.rb +1 -2
- data/lib/appwrite/models/platform_windows.rb +1 -2
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -1
- data/lib/appwrite/models/policy_list.rb +1 -1
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -1
- data/lib/appwrite/models/policy_mfa_factors.rb +47 -0
- data/lib/appwrite/models/policy_password_dictionary.rb +1 -1
- data/lib/appwrite/models/policy_password_history.rb +1 -1
- data/lib/appwrite/models/policy_password_personal_data.rb +1 -1
- data/lib/appwrite/models/policy_password_strength.rb +1 -1
- data/lib/appwrite/models/policy_session_alert.rb +1 -1
- data/lib/appwrite/models/policy_session_duration.rb +1 -1
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -1
- data/lib/appwrite/models/policy_session_limit.rb +1 -1
- data/lib/appwrite/models/policy_user_limit.rb +1 -1
- data/lib/appwrite/models/postgres_extension.rb +42 -0
- data/lib/appwrite/models/preferences.rb +1 -1
- data/lib/appwrite/models/presence.rb +4 -4
- data/lib/appwrite/models/presence_list.rb +1 -1
- data/lib/appwrite/models/program.rb +1 -1
- data/lib/appwrite/models/project.rb +23 -18
- data/lib/appwrite/models/project_auth_method.rb +1 -2
- data/lib/appwrite/models/project_list.rb +1 -1
- data/lib/appwrite/models/project_protocol.rb +1 -2
- data/lib/appwrite/models/project_service.rb +1 -2
- data/lib/appwrite/models/provider.rb +2 -2
- data/lib/appwrite/models/provider_list.rb +1 -1
- data/lib/appwrite/models/proxy_invalidation.rb +42 -0
- data/lib/appwrite/models/proxy_rule.rb +2 -3
- data/lib/appwrite/models/proxy_rule_list.rb +1 -1
- data/lib/appwrite/models/report.rb +2 -2
- data/lib/appwrite/models/report_list.rb +1 -1
- data/lib/appwrite/models/resource_token.rb +1 -1
- data/lib/appwrite/models/resource_token_list.rb +1 -1
- data/lib/appwrite/models/row.rb +1 -1
- data/lib/appwrite/models/row_list.rb +1 -1
- data/lib/appwrite/models/runtime.rb +1 -1
- data/lib/appwrite/models/runtime_list.rb +1 -1
- data/lib/appwrite/models/session.rb +1 -1
- data/lib/appwrite/models/session_list.rb +1 -1
- data/lib/appwrite/models/site.rb +6 -1
- data/lib/appwrite/models/site_list.rb +1 -1
- data/lib/appwrite/models/specification.rb +1 -1
- data/lib/appwrite/models/specification_list.rb +1 -1
- data/lib/appwrite/models/subscriber.rb +1 -1
- data/lib/appwrite/models/subscriber_list.rb +1 -1
- data/lib/appwrite/models/table.rb +1 -1
- data/lib/appwrite/models/table_list.rb +1 -1
- data/lib/appwrite/models/target.rb +2 -2
- data/lib/appwrite/models/target_list.rb +1 -1
- data/lib/appwrite/models/team.rb +1 -1
- data/lib/appwrite/models/team_list.rb +1 -1
- data/lib/appwrite/models/token.rb +1 -1
- data/lib/appwrite/models/topic.rb +1 -1
- data/lib/appwrite/models/topic_list.rb +1 -1
- data/lib/appwrite/models/transaction.rb +1 -1
- data/lib/appwrite/models/transaction_list.rb +1 -1
- data/lib/appwrite/models/usage_billing_plan.rb +7 -7
- data/lib/appwrite/models/user.rb +11 -11
- data/lib/appwrite/models/user_list.rb +1 -1
- data/lib/appwrite/models/variable.rb +1 -1
- data/lib/appwrite/models/variable_list.rb +1 -1
- data/lib/appwrite/models/vectorsdb_collection.rb +87 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +32 -0
- data/lib/appwrite/models/webhook.rb +1 -1
- data/lib/appwrite/models/webhook_list.rb +1 -1
- data/lib/appwrite/operator.rb +6 -0
- data/lib/appwrite/permission.rb +4 -0
- data/lib/appwrite/query.rb +4 -4
- data/lib/appwrite/role.rb +12 -14
- data/lib/appwrite/service.rb +1 -1
- data/lib/appwrite/services/account.rb +329 -322
- data/lib/appwrite/services/activities.rb +14 -15
- data/lib/appwrite/services/advisor.rb +41 -37
- data/lib/appwrite/services/apps.rb +228 -131
- data/lib/appwrite/services/avatars.rb +156 -55
- data/lib/appwrite/services/backups.rb +113 -88
- data/lib/appwrite/services/databases.rb +875 -516
- data/lib/appwrite/services/documents_db.rb +1683 -0
- data/lib/appwrite/services/embeddings.rb +48 -0
- data/lib/appwrite/services/functions.rb +277 -173
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/locale.rb +19 -37
- data/lib/appwrite/services/messaging.rb +544 -259
- data/lib/appwrite/services/mongo.rb +1359 -0
- data/lib/appwrite/services/mysql.rb +1503 -0
- data/lib/appwrite/services/oauth2.rb +122 -53
- data/lib/appwrite/services/organization.rb +153 -123
- data/lib/appwrite/services/postgresql.rb +1615 -0
- data/lib/appwrite/services/presences.rb +49 -35
- data/lib/appwrite/services/project.rb +889 -580
- data/lib/appwrite/services/proxy.rb +111 -52
- data/lib/appwrite/services/sites.rb +270 -165
- data/lib/appwrite/services/storage.rb +153 -92
- data/lib/appwrite/services/tables_db.rb +1153 -534
- data/lib/appwrite/services/teams.rb +161 -122
- data/lib/appwrite/services/tokens.rb +38 -31
- data/lib/appwrite/services/users.rb +406 -266
- data/lib/appwrite/services/vectors_db.rb +1614 -0
- data/lib/appwrite/services/webhooks.rb +59 -40
- data/lib/appwrite.rb +39 -0
- metadata +43 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#frozen_string_literal: true
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Appwrite
|
|
4
4
|
class Project < Service
|
|
5
|
-
|
|
6
5
|
def initialize(client)
|
|
7
6
|
@client = client
|
|
8
7
|
end
|
|
@@ -14,9 +13,8 @@ module Appwrite
|
|
|
14
13
|
def get()
|
|
15
14
|
api_path = '/project'
|
|
16
15
|
|
|
17
|
-
api_params = {
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
api_params = {}
|
|
17
|
+
|
|
20
18
|
api_headers = {
|
|
21
19
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
22
20
|
}
|
|
@@ -28,7 +26,6 @@ module Appwrite
|
|
|
28
26
|
params: api_params,
|
|
29
27
|
response_type: Models::Project
|
|
30
28
|
)
|
|
31
|
-
|
|
32
29
|
end
|
|
33
30
|
|
|
34
31
|
# Delete a project.
|
|
@@ -38,9 +35,8 @@ module Appwrite
|
|
|
38
35
|
def delete()
|
|
39
36
|
api_path = '/project'
|
|
40
37
|
|
|
41
|
-
api_params = {
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
api_params = {}
|
|
39
|
+
|
|
44
40
|
api_headers = {
|
|
45
41
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
46
42
|
"content-type": 'application/json',
|
|
@@ -52,32 +48,34 @@ module Appwrite
|
|
|
52
48
|
headers: api_headers,
|
|
53
49
|
params: api_params,
|
|
54
50
|
)
|
|
55
|
-
|
|
56
51
|
end
|
|
57
52
|
|
|
58
53
|
# Update properties of a specific auth method. Use this endpoint to enable or
|
|
59
|
-
# disable a method in your project.
|
|
54
|
+
# disable a method in your project.
|
|
60
55
|
#
|
|
61
56
|
# @param [ProjectAuthMethodId] method_id Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
62
57
|
# @param [] enabled Auth method status.
|
|
63
58
|
#
|
|
64
59
|
# @return [Project]
|
|
65
|
-
def update_auth_method(
|
|
60
|
+
def update_auth_method(
|
|
61
|
+
method_id:,
|
|
62
|
+
enabled:
|
|
63
|
+
)
|
|
66
64
|
api_path = '/project/auth-methods/{methodId}'
|
|
67
65
|
.gsub('{methodId}', method_id)
|
|
68
66
|
|
|
69
67
|
if method_id.nil?
|
|
70
|
-
|
|
68
|
+
raise Appwrite::Exception.new('Missing required parameter: "methodId"')
|
|
71
69
|
end
|
|
72
70
|
|
|
73
71
|
if enabled.nil?
|
|
74
|
-
|
|
72
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
75
73
|
end
|
|
76
74
|
|
|
77
75
|
api_params = {
|
|
78
76
|
enabled: enabled,
|
|
79
77
|
}
|
|
80
|
-
|
|
78
|
+
|
|
81
79
|
api_headers = {
|
|
82
80
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
83
81
|
"content-type": 'application/json',
|
|
@@ -91,7 +89,6 @@ module Appwrite
|
|
|
91
89
|
params: api_params,
|
|
92
90
|
response_type: Models::Project
|
|
93
91
|
)
|
|
94
|
-
|
|
95
92
|
end
|
|
96
93
|
|
|
97
94
|
# Get a list of all API keys from the current project.
|
|
@@ -100,14 +97,17 @@ module Appwrite
|
|
|
100
97
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
101
98
|
#
|
|
102
99
|
# @return [KeyList]
|
|
103
|
-
def list_keys(
|
|
100
|
+
def list_keys(
|
|
101
|
+
queries: nil,
|
|
102
|
+
total: nil
|
|
103
|
+
)
|
|
104
104
|
api_path = '/project/keys'
|
|
105
105
|
|
|
106
106
|
api_params = {
|
|
107
107
|
queries: queries,
|
|
108
108
|
total: total,
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
api_headers = {
|
|
112
112
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
113
113
|
"accept": 'application/json',
|
|
@@ -120,62 +120,11 @@ module Appwrite
|
|
|
120
120
|
params: api_params,
|
|
121
121
|
response_type: Models::KeyList
|
|
122
122
|
)
|
|
123
|
-
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# Create a new API key. It's recommended to have multiple API keys with
|
|
127
|
-
# strict scopes for separate functions within your project.
|
|
128
|
-
#
|
|
129
|
-
# You can also create an ephemeral API key if you need a short-lived key
|
|
130
|
-
# instead.
|
|
131
|
-
#
|
|
132
|
-
# @param [String] key_id Key ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
133
|
-
# @param [String] name Key name. Max length: 128 chars.
|
|
134
|
-
# @param [Array] scopes Key scopes list. Maximum of 200 scopes are allowed.
|
|
135
|
-
# @param [String] expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
136
|
-
#
|
|
137
|
-
# @return [Key]
|
|
138
|
-
def create_key(key_id:, name:, scopes:, expire: nil)
|
|
139
|
-
api_path = '/project/keys'
|
|
140
|
-
|
|
141
|
-
if key_id.nil?
|
|
142
|
-
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
143
|
-
end
|
|
144
|
-
|
|
145
|
-
if name.nil?
|
|
146
|
-
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
if scopes.nil?
|
|
150
|
-
raise Appwrite::Exception.new('Missing required parameter: "scopes"')
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
api_params = {
|
|
154
|
-
keyId: key_id,
|
|
155
|
-
name: name,
|
|
156
|
-
scopes: scopes,
|
|
157
|
-
expire: expire,
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
api_headers = {
|
|
161
|
-
"X-Appwrite-Project": @client.get_config('project'),
|
|
162
|
-
"content-type": 'application/json',
|
|
163
|
-
"accept": 'application/json',
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@client.call(
|
|
167
|
-
method: 'POST',
|
|
168
|
-
path: api_path,
|
|
169
|
-
headers: api_headers,
|
|
170
|
-
params: api_params,
|
|
171
|
-
response_type: Models::Key
|
|
172
|
-
)
|
|
173
|
-
|
|
174
123
|
end
|
|
175
124
|
|
|
176
|
-
# Create a new ephemeral API key. It
|
|
125
|
+
# Create a new ephemeral API key. It's recommended to have multiple API keys
|
|
177
126
|
# with strict scopes for separate functions within your project.
|
|
178
|
-
#
|
|
127
|
+
#
|
|
179
128
|
# You can also create a standard API key if you need a longer-lived key
|
|
180
129
|
# instead.
|
|
181
130
|
#
|
|
@@ -183,22 +132,25 @@ module Appwrite
|
|
|
183
132
|
# @param [Integer] duration Time in seconds before ephemeral key expires. Maximum duration is 3600 seconds.
|
|
184
133
|
#
|
|
185
134
|
# @return [EphemeralKey]
|
|
186
|
-
def create_ephemeral_key(
|
|
135
|
+
def create_ephemeral_key(
|
|
136
|
+
scopes:,
|
|
137
|
+
duration:
|
|
138
|
+
)
|
|
187
139
|
api_path = '/project/keys/ephemeral'
|
|
188
140
|
|
|
189
141
|
if scopes.nil?
|
|
190
|
-
|
|
142
|
+
raise Appwrite::Exception.new('Missing required parameter: "scopes"')
|
|
191
143
|
end
|
|
192
144
|
|
|
193
145
|
if duration.nil?
|
|
194
|
-
|
|
146
|
+
raise Appwrite::Exception.new('Missing required parameter: "duration"')
|
|
195
147
|
end
|
|
196
148
|
|
|
197
149
|
api_params = {
|
|
198
150
|
scopes: scopes,
|
|
199
151
|
duration: duration,
|
|
200
152
|
}
|
|
201
|
-
|
|
153
|
+
|
|
202
154
|
api_headers = {
|
|
203
155
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
204
156
|
"content-type": 'application/json',
|
|
@@ -212,25 +164,25 @@ module Appwrite
|
|
|
212
164
|
params: api_params,
|
|
213
165
|
response_type: Models::EphemeralKey
|
|
214
166
|
)
|
|
215
|
-
|
|
216
167
|
end
|
|
217
168
|
|
|
218
|
-
# Get a key by its unique ID.
|
|
169
|
+
# Get a key by its unique ID.
|
|
219
170
|
#
|
|
220
171
|
# @param [String] key_id Key ID.
|
|
221
172
|
#
|
|
222
173
|
# @return [Key]
|
|
223
|
-
def get_key(
|
|
174
|
+
def get_key(
|
|
175
|
+
key_id:
|
|
176
|
+
)
|
|
224
177
|
api_path = '/project/keys/{keyId}'
|
|
225
178
|
.gsub('{keyId}', key_id)
|
|
226
179
|
|
|
227
180
|
if key_id.nil?
|
|
228
|
-
|
|
181
|
+
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
229
182
|
end
|
|
230
183
|
|
|
231
|
-
api_params = {
|
|
232
|
-
|
|
233
|
-
|
|
184
|
+
api_params = {}
|
|
185
|
+
|
|
234
186
|
api_headers = {
|
|
235
187
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
236
188
|
"accept": 'application/json',
|
|
@@ -243,7 +195,6 @@ module Appwrite
|
|
|
243
195
|
params: api_params,
|
|
244
196
|
response_type: Models::Key
|
|
245
197
|
)
|
|
246
|
-
|
|
247
198
|
end
|
|
248
199
|
|
|
249
200
|
# Update a key by its unique ID. Use this endpoint to update the name,
|
|
@@ -255,20 +206,25 @@ module Appwrite
|
|
|
255
206
|
# @param [String] expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
256
207
|
#
|
|
257
208
|
# @return [Key]
|
|
258
|
-
def update_key(
|
|
209
|
+
def update_key(
|
|
210
|
+
key_id:,
|
|
211
|
+
name:,
|
|
212
|
+
scopes:,
|
|
213
|
+
expire: nil
|
|
214
|
+
)
|
|
259
215
|
api_path = '/project/keys/{keyId}'
|
|
260
216
|
.gsub('{keyId}', key_id)
|
|
261
217
|
|
|
262
218
|
if key_id.nil?
|
|
263
|
-
|
|
219
|
+
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
264
220
|
end
|
|
265
221
|
|
|
266
222
|
if name.nil?
|
|
267
|
-
|
|
223
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
268
224
|
end
|
|
269
225
|
|
|
270
226
|
if scopes.nil?
|
|
271
|
-
|
|
227
|
+
raise Appwrite::Exception.new('Missing required parameter: "scopes"')
|
|
272
228
|
end
|
|
273
229
|
|
|
274
230
|
api_params = {
|
|
@@ -276,7 +232,7 @@ module Appwrite
|
|
|
276
232
|
scopes: scopes,
|
|
277
233
|
expire: expire,
|
|
278
234
|
}
|
|
279
|
-
|
|
235
|
+
|
|
280
236
|
api_headers = {
|
|
281
237
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
282
238
|
"content-type": 'application/json',
|
|
@@ -290,7 +246,6 @@ module Appwrite
|
|
|
290
246
|
params: api_params,
|
|
291
247
|
response_type: Models::Key
|
|
292
248
|
)
|
|
293
|
-
|
|
294
249
|
end
|
|
295
250
|
|
|
296
251
|
# Delete a key by its unique ID. Once deleted, the key can no longer be used
|
|
@@ -299,17 +254,18 @@ module Appwrite
|
|
|
299
254
|
# @param [String] key_id Key ID.
|
|
300
255
|
#
|
|
301
256
|
# @return []
|
|
302
|
-
def delete_key(
|
|
257
|
+
def delete_key(
|
|
258
|
+
key_id:
|
|
259
|
+
)
|
|
303
260
|
api_path = '/project/keys/{keyId}'
|
|
304
261
|
.gsub('{keyId}', key_id)
|
|
305
262
|
|
|
306
263
|
if key_id.nil?
|
|
307
|
-
|
|
264
|
+
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
308
265
|
end
|
|
309
266
|
|
|
310
|
-
api_params = {
|
|
311
|
-
|
|
312
|
-
|
|
267
|
+
api_params = {}
|
|
268
|
+
|
|
313
269
|
api_headers = {
|
|
314
270
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
315
271
|
"content-type": 'application/json',
|
|
@@ -321,7 +277,6 @@ module Appwrite
|
|
|
321
277
|
headers: api_headers,
|
|
322
278
|
params: api_params,
|
|
323
279
|
)
|
|
324
|
-
|
|
325
280
|
end
|
|
326
281
|
|
|
327
282
|
# Update the project labels. Labels can be used to easily filter projects in
|
|
@@ -330,17 +285,19 @@ module Appwrite
|
|
|
330
285
|
# @param [Array] labels Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
331
286
|
#
|
|
332
287
|
# @return [Project]
|
|
333
|
-
def update_labels(
|
|
288
|
+
def update_labels(
|
|
289
|
+
labels:
|
|
290
|
+
)
|
|
334
291
|
api_path = '/project/labels'
|
|
335
292
|
|
|
336
293
|
if labels.nil?
|
|
337
|
-
|
|
294
|
+
raise Appwrite::Exception.new('Missing required parameter: "labels"')
|
|
338
295
|
end
|
|
339
296
|
|
|
340
297
|
api_params = {
|
|
341
298
|
labels: labels,
|
|
342
299
|
}
|
|
343
|
-
|
|
300
|
+
|
|
344
301
|
api_headers = {
|
|
345
302
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
346
303
|
"content-type": 'application/json',
|
|
@@ -354,7 +311,6 @@ module Appwrite
|
|
|
354
311
|
params: api_params,
|
|
355
312
|
response_type: Models::Project
|
|
356
313
|
)
|
|
357
|
-
|
|
358
314
|
end
|
|
359
315
|
|
|
360
316
|
# Get a list of all mock phones in the project. This endpoint returns an
|
|
@@ -364,14 +320,17 @@ module Appwrite
|
|
|
364
320
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
365
321
|
#
|
|
366
322
|
# @return [MockNumberList]
|
|
367
|
-
def list_mock_phones(
|
|
323
|
+
def list_mock_phones(
|
|
324
|
+
queries: nil,
|
|
325
|
+
total: nil
|
|
326
|
+
)
|
|
368
327
|
api_path = '/project/mock-phones'
|
|
369
328
|
|
|
370
329
|
api_params = {
|
|
371
330
|
queries: queries,
|
|
372
331
|
total: total,
|
|
373
332
|
}
|
|
374
|
-
|
|
333
|
+
|
|
375
334
|
api_headers = {
|
|
376
335
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
377
336
|
"accept": 'application/json',
|
|
@@ -384,7 +343,6 @@ module Appwrite
|
|
|
384
343
|
params: api_params,
|
|
385
344
|
response_type: Models::MockNumberList
|
|
386
345
|
)
|
|
387
|
-
|
|
388
346
|
end
|
|
389
347
|
|
|
390
348
|
# Create a new mock phone for your project. Use this endpoint to register a
|
|
@@ -394,22 +352,25 @@ module Appwrite
|
|
|
394
352
|
# @param [String] otp One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.
|
|
395
353
|
#
|
|
396
354
|
# @return [MockNumber]
|
|
397
|
-
def create_mock_phone(
|
|
355
|
+
def create_mock_phone(
|
|
356
|
+
number:,
|
|
357
|
+
otp:
|
|
358
|
+
)
|
|
398
359
|
api_path = '/project/mock-phones'
|
|
399
360
|
|
|
400
361
|
if number.nil?
|
|
401
|
-
|
|
362
|
+
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
402
363
|
end
|
|
403
364
|
|
|
404
365
|
if otp.nil?
|
|
405
|
-
|
|
366
|
+
raise Appwrite::Exception.new('Missing required parameter: "otp"')
|
|
406
367
|
end
|
|
407
368
|
|
|
408
369
|
api_params = {
|
|
409
370
|
number: number,
|
|
410
371
|
otp: otp,
|
|
411
372
|
}
|
|
412
|
-
|
|
373
|
+
|
|
413
374
|
api_headers = {
|
|
414
375
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
415
376
|
"content-type": 'application/json',
|
|
@@ -423,26 +384,26 @@ module Appwrite
|
|
|
423
384
|
params: api_params,
|
|
424
385
|
response_type: Models::MockNumber
|
|
425
386
|
)
|
|
426
|
-
|
|
427
387
|
end
|
|
428
388
|
|
|
429
389
|
# Get a mock phone by its unique number. This endpoint returns the mock
|
|
430
|
-
# phone
|
|
390
|
+
# phone's OTP.
|
|
431
391
|
#
|
|
432
392
|
# @param [String] number Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.
|
|
433
393
|
#
|
|
434
394
|
# @return [MockNumber]
|
|
435
|
-
def get_mock_phone(
|
|
395
|
+
def get_mock_phone(
|
|
396
|
+
number:
|
|
397
|
+
)
|
|
436
398
|
api_path = '/project/mock-phones/{number}'
|
|
437
399
|
.gsub('{number}', number)
|
|
438
400
|
|
|
439
401
|
if number.nil?
|
|
440
|
-
|
|
402
|
+
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
441
403
|
end
|
|
442
404
|
|
|
443
|
-
api_params = {
|
|
444
|
-
|
|
445
|
-
|
|
405
|
+
api_params = {}
|
|
406
|
+
|
|
446
407
|
api_headers = {
|
|
447
408
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
448
409
|
"accept": 'application/json',
|
|
@@ -455,32 +416,34 @@ module Appwrite
|
|
|
455
416
|
params: api_params,
|
|
456
417
|
response_type: Models::MockNumber
|
|
457
418
|
)
|
|
458
|
-
|
|
459
419
|
end
|
|
460
420
|
|
|
461
421
|
# Update a mock phone by its unique number. Use this endpoint to update the
|
|
462
|
-
# mock phone
|
|
422
|
+
# mock phone's OTP.
|
|
463
423
|
#
|
|
464
424
|
# @param [String] number Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.
|
|
465
425
|
# @param [String] otp One-time password (OTP) to associate with the mock phone. Must be a 6-digit numeric code.
|
|
466
426
|
#
|
|
467
427
|
# @return [MockNumber]
|
|
468
|
-
def update_mock_phone(
|
|
428
|
+
def update_mock_phone(
|
|
429
|
+
number:,
|
|
430
|
+
otp:
|
|
431
|
+
)
|
|
469
432
|
api_path = '/project/mock-phones/{number}'
|
|
470
433
|
.gsub('{number}', number)
|
|
471
434
|
|
|
472
435
|
if number.nil?
|
|
473
|
-
|
|
436
|
+
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
474
437
|
end
|
|
475
438
|
|
|
476
439
|
if otp.nil?
|
|
477
|
-
|
|
440
|
+
raise Appwrite::Exception.new('Missing required parameter: "otp"')
|
|
478
441
|
end
|
|
479
442
|
|
|
480
443
|
api_params = {
|
|
481
444
|
otp: otp,
|
|
482
445
|
}
|
|
483
|
-
|
|
446
|
+
|
|
484
447
|
api_headers = {
|
|
485
448
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
486
449
|
"content-type": 'application/json',
|
|
@@ -494,7 +457,6 @@ module Appwrite
|
|
|
494
457
|
params: api_params,
|
|
495
458
|
response_type: Models::MockNumber
|
|
496
459
|
)
|
|
497
|
-
|
|
498
460
|
end
|
|
499
461
|
|
|
500
462
|
# Delete a mock phone by its unique number. This endpoint removes the mock
|
|
@@ -503,17 +465,18 @@ module Appwrite
|
|
|
503
465
|
# @param [String] number Phone number associated with the mock phone. Must be a valid E.164 formatted phone number.
|
|
504
466
|
#
|
|
505
467
|
# @return []
|
|
506
|
-
def delete_mock_phone(
|
|
468
|
+
def delete_mock_phone(
|
|
469
|
+
number:
|
|
470
|
+
)
|
|
507
471
|
api_path = '/project/mock-phones/{number}'
|
|
508
472
|
.gsub('{number}', number)
|
|
509
473
|
|
|
510
474
|
if number.nil?
|
|
511
|
-
|
|
475
|
+
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
512
476
|
end
|
|
513
477
|
|
|
514
|
-
api_params = {
|
|
515
|
-
|
|
516
|
-
|
|
478
|
+
api_params = {}
|
|
479
|
+
|
|
517
480
|
api_headers = {
|
|
518
481
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
519
482
|
"content-type": 'application/json',
|
|
@@ -525,25 +488,27 @@ module Appwrite
|
|
|
525
488
|
headers: api_headers,
|
|
526
489
|
params: api_params,
|
|
527
490
|
)
|
|
528
|
-
|
|
529
491
|
end
|
|
530
492
|
|
|
531
493
|
# Get a list of all OAuth2 providers supported by the server, along with the
|
|
532
|
-
# project
|
|
494
|
+
# project's configuration for each. Credential fields are write-only and
|
|
533
495
|
# always returned empty.
|
|
534
496
|
#
|
|
535
497
|
# @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). Only supported methods are limit and offset
|
|
536
498
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
537
499
|
#
|
|
538
500
|
# @return [OAuth2ProviderList]
|
|
539
|
-
def list_o_auth2_providers(
|
|
501
|
+
def list_o_auth2_providers(
|
|
502
|
+
queries: nil,
|
|
503
|
+
total: nil
|
|
504
|
+
)
|
|
540
505
|
api_path = '/project/oauth2'
|
|
541
506
|
|
|
542
507
|
api_params = {
|
|
543
508
|
queries: queries,
|
|
544
509
|
total: total,
|
|
545
510
|
}
|
|
546
|
-
|
|
511
|
+
|
|
547
512
|
api_headers = {
|
|
548
513
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
549
514
|
"accept": 'application/json',
|
|
@@ -556,7 +521,6 @@ module Appwrite
|
|
|
556
521
|
params: api_params,
|
|
557
522
|
response_type: Models::OAuth2ProviderList
|
|
558
523
|
)
|
|
559
|
-
|
|
560
524
|
end
|
|
561
525
|
|
|
562
526
|
# Update the OAuth2 server (OIDC provider) configuration.
|
|
@@ -576,17 +540,35 @@ module Appwrite
|
|
|
576
540
|
# @param [String] user_code_format Character set for device flow user codes: `numeric` (digits only — best for numeric keypads and TV remotes), `alphabetic` (letters only), or `alphanumeric` (letters and digits — highest entropy per character). Defaults to `alphanumeric`.
|
|
577
541
|
# @param [Integer] device_code_duration Lifetime in seconds of device flow device codes and user codes. Device codes are intentionally short-lived. Leave empty to use default 600.
|
|
578
542
|
# @param [Array] default_scopes List of OAuth2 scopes used when an authorization request omits the scope parameter. Every default scope must also be allowed by the OAuth2 server. Maximum of 100 scopes are allowed, each up to 128 characters long.
|
|
543
|
+
# @param [Array] installation_scopes List of scopes an application may request when installed on a team. Omitting the parameter clears the list, so no installation scopes can be granted. Maximum of 100 scopes are allowed, each up to 128 characters long.
|
|
579
544
|
#
|
|
580
545
|
# @return [Project]
|
|
581
|
-
def update_o_auth2_server(
|
|
546
|
+
def update_o_auth2_server(
|
|
547
|
+
enabled:,
|
|
548
|
+
authorization_url:,
|
|
549
|
+
scopes: nil,
|
|
550
|
+
authorization_details_types: nil,
|
|
551
|
+
access_token_duration: nil,
|
|
552
|
+
refresh_token_duration: nil,
|
|
553
|
+
public_access_token_duration: nil,
|
|
554
|
+
public_refresh_token_duration: nil,
|
|
555
|
+
installation_access_token_duration: nil,
|
|
556
|
+
confidential_pkce: nil,
|
|
557
|
+
verification_url: nil,
|
|
558
|
+
user_code_length: nil,
|
|
559
|
+
user_code_format: nil,
|
|
560
|
+
device_code_duration: nil,
|
|
561
|
+
default_scopes: nil,
|
|
562
|
+
installation_scopes: nil
|
|
563
|
+
)
|
|
582
564
|
api_path = '/project/oauth2-server'
|
|
583
565
|
|
|
584
566
|
if enabled.nil?
|
|
585
|
-
|
|
567
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
586
568
|
end
|
|
587
569
|
|
|
588
570
|
if authorization_url.nil?
|
|
589
|
-
|
|
571
|
+
raise Appwrite::Exception.new('Missing required parameter: "authorizationUrl"')
|
|
590
572
|
end
|
|
591
573
|
|
|
592
574
|
api_params = {
|
|
@@ -605,8 +587,9 @@ module Appwrite
|
|
|
605
587
|
userCodeFormat: user_code_format,
|
|
606
588
|
deviceCodeDuration: device_code_duration,
|
|
607
589
|
defaultScopes: default_scopes,
|
|
590
|
+
installationScopes: installation_scopes,
|
|
608
591
|
}
|
|
609
|
-
|
|
592
|
+
|
|
610
593
|
api_headers = {
|
|
611
594
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
612
595
|
"content-type": 'application/json',
|
|
@@ -620,17 +603,20 @@ module Appwrite
|
|
|
620
603
|
params: api_params,
|
|
621
604
|
response_type: Models::Project
|
|
622
605
|
)
|
|
623
|
-
|
|
624
606
|
end
|
|
625
607
|
|
|
626
608
|
# Update the project OAuth2 Amazon configuration.
|
|
627
609
|
#
|
|
628
|
-
# @param [String] client_id
|
|
629
|
-
# @param [String] client_secret
|
|
610
|
+
# @param [String] client_id 'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2
|
|
611
|
+
# @param [String] client_secret 'Client Secret' of Amazon OAuth2 app. For example: 79ffe4000000000000000000000000000000000000000000000000000002de55
|
|
630
612
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
631
613
|
#
|
|
632
614
|
# @return [OAuth2Amazon]
|
|
633
|
-
def update_o_auth2_amazon(
|
|
615
|
+
def update_o_auth2_amazon(
|
|
616
|
+
client_id: nil,
|
|
617
|
+
client_secret: nil,
|
|
618
|
+
enabled: nil
|
|
619
|
+
)
|
|
634
620
|
api_path = '/project/oauth2/amazon'
|
|
635
621
|
|
|
636
622
|
api_params = {
|
|
@@ -638,7 +624,7 @@ module Appwrite
|
|
|
638
624
|
clientSecret: client_secret,
|
|
639
625
|
enabled: enabled,
|
|
640
626
|
}
|
|
641
|
-
|
|
627
|
+
|
|
642
628
|
api_headers = {
|
|
643
629
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
644
630
|
"content-type": 'application/json',
|
|
@@ -652,19 +638,24 @@ module Appwrite
|
|
|
652
638
|
params: api_params,
|
|
653
639
|
response_type: Models::OAuth2Amazon
|
|
654
640
|
)
|
|
655
|
-
|
|
656
641
|
end
|
|
657
642
|
|
|
658
643
|
# Update the project OAuth2 Apple configuration.
|
|
659
644
|
#
|
|
660
|
-
# @param [String] service_id
|
|
661
|
-
# @param [String] key_id
|
|
662
|
-
# @param [String] team_id
|
|
645
|
+
# @param [String] service_id 'Service ID' of Apple OAuth2 app. For example: ip.appwrite.app.web
|
|
646
|
+
# @param [String] key_id 'Key ID' of Apple OAuth2 app. For example: P4000000N8
|
|
647
|
+
# @param [String] team_id 'Team ID' of Apple OAuth2 app. For example: D4000000R6
|
|
663
648
|
# @param [String] p8_file Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: -----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----
|
|
664
649
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
665
650
|
#
|
|
666
651
|
# @return [OAuth2Apple]
|
|
667
|
-
def update_o_auth2_apple(
|
|
652
|
+
def update_o_auth2_apple(
|
|
653
|
+
service_id: nil,
|
|
654
|
+
key_id: nil,
|
|
655
|
+
team_id: nil,
|
|
656
|
+
p8_file: nil,
|
|
657
|
+
enabled: nil
|
|
658
|
+
)
|
|
668
659
|
api_path = '/project/oauth2/apple'
|
|
669
660
|
|
|
670
661
|
api_params = {
|
|
@@ -674,7 +665,7 @@ module Appwrite
|
|
|
674
665
|
p8File: p8_file,
|
|
675
666
|
enabled: enabled,
|
|
676
667
|
}
|
|
677
|
-
|
|
668
|
+
|
|
678
669
|
api_headers = {
|
|
679
670
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
680
671
|
"content-type": 'application/json',
|
|
@@ -688,17 +679,20 @@ module Appwrite
|
|
|
688
679
|
params: api_params,
|
|
689
680
|
response_type: Models::OAuth2Apple
|
|
690
681
|
)
|
|
691
|
-
|
|
692
682
|
end
|
|
693
683
|
|
|
694
684
|
# Update the project OAuth2 Appwrite configuration.
|
|
695
685
|
#
|
|
696
|
-
# @param [String] client_id
|
|
697
|
-
# @param [String] client_secret
|
|
686
|
+
# @param [String] client_id 'Client ID' of Appwrite OAuth2 app. For example: 6a42000000000000b5a0
|
|
687
|
+
# @param [String] client_secret 'Client Secret' of Appwrite OAuth2 app. For example: b86afd000000000000000000000000000000000000000000000000000ced5f93
|
|
698
688
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
699
689
|
#
|
|
700
690
|
# @return [OAuth2Appwrite]
|
|
701
|
-
def update_o_auth2_appwrite(
|
|
691
|
+
def update_o_auth2_appwrite(
|
|
692
|
+
client_id: nil,
|
|
693
|
+
client_secret: nil,
|
|
694
|
+
enabled: nil
|
|
695
|
+
)
|
|
702
696
|
api_path = '/project/oauth2/appwrite'
|
|
703
697
|
|
|
704
698
|
api_params = {
|
|
@@ -706,7 +700,7 @@ module Appwrite
|
|
|
706
700
|
clientSecret: client_secret,
|
|
707
701
|
enabled: enabled,
|
|
708
702
|
}
|
|
709
|
-
|
|
703
|
+
|
|
710
704
|
api_headers = {
|
|
711
705
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
712
706
|
"content-type": 'application/json',
|
|
@@ -720,18 +714,22 @@ module Appwrite
|
|
|
720
714
|
params: api_params,
|
|
721
715
|
response_type: Models::OAuth2Appwrite
|
|
722
716
|
)
|
|
723
|
-
|
|
724
717
|
end
|
|
725
718
|
|
|
726
719
|
# Update the project OAuth2 Auth0 configuration.
|
|
727
720
|
#
|
|
728
|
-
# @param [String] client_id
|
|
729
|
-
# @param [String] client_secret
|
|
721
|
+
# @param [String] client_id 'Client ID' of Auth0 OAuth2 app. For example: OaOkIA000000000000000000005KLSYq
|
|
722
|
+
# @param [String] client_secret 'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF
|
|
730
723
|
# @param [String] endpoint Domain of Auth0 instance. For example: example.us.auth0.com
|
|
731
724
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
732
725
|
#
|
|
733
726
|
# @return [OAuth2Auth0]
|
|
734
|
-
def update_o_auth2_auth0(
|
|
727
|
+
def update_o_auth2_auth0(
|
|
728
|
+
client_id: nil,
|
|
729
|
+
client_secret: nil,
|
|
730
|
+
endpoint: nil,
|
|
731
|
+
enabled: nil
|
|
732
|
+
)
|
|
735
733
|
api_path = '/project/oauth2/auth0'
|
|
736
734
|
|
|
737
735
|
api_params = {
|
|
@@ -740,7 +738,7 @@ module Appwrite
|
|
|
740
738
|
endpoint: endpoint,
|
|
741
739
|
enabled: enabled,
|
|
742
740
|
}
|
|
743
|
-
|
|
741
|
+
|
|
744
742
|
api_headers = {
|
|
745
743
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
746
744
|
"content-type": 'application/json',
|
|
@@ -754,18 +752,22 @@ module Appwrite
|
|
|
754
752
|
params: api_params,
|
|
755
753
|
response_type: Models::OAuth2Auth0
|
|
756
754
|
)
|
|
757
|
-
|
|
758
755
|
end
|
|
759
756
|
|
|
760
757
|
# Update the project OAuth2 Authentik configuration.
|
|
761
758
|
#
|
|
762
|
-
# @param [String] client_id
|
|
763
|
-
# @param [String] client_secret
|
|
759
|
+
# @param [String] client_id 'Client ID' of Authentik OAuth2 app. For example: dTKOPa0000000000000000000000000000e7G8hv
|
|
760
|
+
# @param [String] client_secret 'Client Secret' of Authentik OAuth2 app. For example: ntQadq000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Hp5WK
|
|
764
761
|
# @param [String] endpoint Domain of Authentik instance. For example: example.authentik.com
|
|
765
762
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
766
763
|
#
|
|
767
764
|
# @return [OAuth2Authentik]
|
|
768
|
-
def update_o_auth2_authentik(
|
|
765
|
+
def update_o_auth2_authentik(
|
|
766
|
+
client_id: nil,
|
|
767
|
+
client_secret: nil,
|
|
768
|
+
endpoint: nil,
|
|
769
|
+
enabled: nil
|
|
770
|
+
)
|
|
769
771
|
api_path = '/project/oauth2/authentik'
|
|
770
772
|
|
|
771
773
|
api_params = {
|
|
@@ -774,7 +776,7 @@ module Appwrite
|
|
|
774
776
|
endpoint: endpoint,
|
|
775
777
|
enabled: enabled,
|
|
776
778
|
}
|
|
777
|
-
|
|
779
|
+
|
|
778
780
|
api_headers = {
|
|
779
781
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
780
782
|
"content-type": 'application/json',
|
|
@@ -788,17 +790,20 @@ module Appwrite
|
|
|
788
790
|
params: api_params,
|
|
789
791
|
response_type: Models::OAuth2Authentik
|
|
790
792
|
)
|
|
791
|
-
|
|
792
793
|
end
|
|
793
794
|
|
|
794
795
|
# Update the project OAuth2 Autodesk configuration.
|
|
795
796
|
#
|
|
796
|
-
# @param [String] client_id
|
|
797
|
-
# @param [String] client_secret
|
|
797
|
+
# @param [String] client_id 'Client ID' of Autodesk OAuth2 app. For example: 5zw90v00000000000000000000kVYXN7
|
|
798
|
+
# @param [String] client_secret 'Client Secret' of Autodesk OAuth2 app. For example: 7I000000000000MW
|
|
798
799
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
799
800
|
#
|
|
800
801
|
# @return [OAuth2Autodesk]
|
|
801
|
-
def update_o_auth2_autodesk(
|
|
802
|
+
def update_o_auth2_autodesk(
|
|
803
|
+
client_id: nil,
|
|
804
|
+
client_secret: nil,
|
|
805
|
+
enabled: nil
|
|
806
|
+
)
|
|
802
807
|
api_path = '/project/oauth2/autodesk'
|
|
803
808
|
|
|
804
809
|
api_params = {
|
|
@@ -806,7 +811,7 @@ module Appwrite
|
|
|
806
811
|
clientSecret: client_secret,
|
|
807
812
|
enabled: enabled,
|
|
808
813
|
}
|
|
809
|
-
|
|
814
|
+
|
|
810
815
|
api_headers = {
|
|
811
816
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
812
817
|
"content-type": 'application/json',
|
|
@@ -820,17 +825,20 @@ module Appwrite
|
|
|
820
825
|
params: api_params,
|
|
821
826
|
response_type: Models::OAuth2Autodesk
|
|
822
827
|
)
|
|
823
|
-
|
|
824
828
|
end
|
|
825
829
|
|
|
826
830
|
# Update the project OAuth2 Bitbucket configuration.
|
|
827
831
|
#
|
|
828
|
-
# @param [String] key
|
|
829
|
-
# @param [String] secret
|
|
832
|
+
# @param [String] key 'Key' of Bitbucket OAuth2 app. For example: Knt70000000000ByRc
|
|
833
|
+
# @param [String] secret 'Secret' of Bitbucket OAuth2 app. For example: NMfLZJ00000000000000000000TLQdDx
|
|
830
834
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
831
835
|
#
|
|
832
836
|
# @return [OAuth2Bitbucket]
|
|
833
|
-
def update_o_auth2_bitbucket(
|
|
837
|
+
def update_o_auth2_bitbucket(
|
|
838
|
+
key: nil,
|
|
839
|
+
secret: nil,
|
|
840
|
+
enabled: nil
|
|
841
|
+
)
|
|
834
842
|
api_path = '/project/oauth2/bitbucket'
|
|
835
843
|
|
|
836
844
|
api_params = {
|
|
@@ -838,7 +846,7 @@ module Appwrite
|
|
|
838
846
|
secret: secret,
|
|
839
847
|
enabled: enabled,
|
|
840
848
|
}
|
|
841
|
-
|
|
849
|
+
|
|
842
850
|
api_headers = {
|
|
843
851
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
844
852
|
"content-type": 'application/json',
|
|
@@ -852,17 +860,20 @@ module Appwrite
|
|
|
852
860
|
params: api_params,
|
|
853
861
|
response_type: Models::OAuth2Bitbucket
|
|
854
862
|
)
|
|
855
|
-
|
|
856
863
|
end
|
|
857
864
|
|
|
858
865
|
# Update the project OAuth2 Bitly configuration.
|
|
859
866
|
#
|
|
860
|
-
# @param [String] client_id
|
|
861
|
-
# @param [String] client_secret
|
|
867
|
+
# @param [String] client_id 'Client ID' of Bitly OAuth2 app. For example: d95151000000000000000000000000000067af9b
|
|
868
|
+
# @param [String] client_secret 'Client Secret' of Bitly OAuth2 app. For example: a13e250000000000000000000000000000d73095
|
|
862
869
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
863
870
|
#
|
|
864
871
|
# @return [OAuth2Bitly]
|
|
865
|
-
def update_o_auth2_bitly(
|
|
872
|
+
def update_o_auth2_bitly(
|
|
873
|
+
client_id: nil,
|
|
874
|
+
client_secret: nil,
|
|
875
|
+
enabled: nil
|
|
876
|
+
)
|
|
866
877
|
api_path = '/project/oauth2/bitly'
|
|
867
878
|
|
|
868
879
|
api_params = {
|
|
@@ -870,7 +881,7 @@ module Appwrite
|
|
|
870
881
|
clientSecret: client_secret,
|
|
871
882
|
enabled: enabled,
|
|
872
883
|
}
|
|
873
|
-
|
|
884
|
+
|
|
874
885
|
api_headers = {
|
|
875
886
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
876
887
|
"content-type": 'application/json',
|
|
@@ -884,17 +895,20 @@ module Appwrite
|
|
|
884
895
|
params: api_params,
|
|
885
896
|
response_type: Models::OAuth2Bitly
|
|
886
897
|
)
|
|
887
|
-
|
|
888
898
|
end
|
|
889
899
|
|
|
890
900
|
# Update the project OAuth2 Box configuration.
|
|
891
901
|
#
|
|
892
|
-
# @param [String] client_id
|
|
893
|
-
# @param [String] client_secret
|
|
902
|
+
# @param [String] client_id 'Client ID' of Box OAuth2 app. For example: deglcs00000000000000000000x2og6y
|
|
903
|
+
# @param [String] client_secret 'Client Secret' of Box OAuth2 app. For example: OKM1f100000000000000000000eshEif
|
|
894
904
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
895
905
|
#
|
|
896
906
|
# @return [OAuth2Box]
|
|
897
|
-
def update_o_auth2_box(
|
|
907
|
+
def update_o_auth2_box(
|
|
908
|
+
client_id: nil,
|
|
909
|
+
client_secret: nil,
|
|
910
|
+
enabled: nil
|
|
911
|
+
)
|
|
898
912
|
api_path = '/project/oauth2/box'
|
|
899
913
|
|
|
900
914
|
api_params = {
|
|
@@ -902,7 +916,7 @@ module Appwrite
|
|
|
902
916
|
clientSecret: client_secret,
|
|
903
917
|
enabled: enabled,
|
|
904
918
|
}
|
|
905
|
-
|
|
919
|
+
|
|
906
920
|
api_headers = {
|
|
907
921
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
908
922
|
"content-type": 'application/json',
|
|
@@ -916,17 +930,20 @@ module Appwrite
|
|
|
916
930
|
params: api_params,
|
|
917
931
|
response_type: Models::OAuth2Box
|
|
918
932
|
)
|
|
919
|
-
|
|
920
933
|
end
|
|
921
934
|
|
|
922
935
|
# Update the project OAuth2 Dailymotion configuration.
|
|
923
936
|
#
|
|
924
|
-
# @param [String] api_key
|
|
925
|
-
# @param [String] api_secret
|
|
937
|
+
# @param [String] api_key 'API Key' of Dailymotion OAuth2 app. For example: 07a9000000000000067f
|
|
938
|
+
# @param [String] api_secret 'API Secret' of Dailymotion OAuth2 app. For example: a399a90000000000000000000000000000d90639
|
|
926
939
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
927
940
|
#
|
|
928
941
|
# @return [OAuth2Dailymotion]
|
|
929
|
-
def update_o_auth2_dailymotion(
|
|
942
|
+
def update_o_auth2_dailymotion(
|
|
943
|
+
api_key: nil,
|
|
944
|
+
api_secret: nil,
|
|
945
|
+
enabled: nil
|
|
946
|
+
)
|
|
930
947
|
api_path = '/project/oauth2/dailymotion'
|
|
931
948
|
|
|
932
949
|
api_params = {
|
|
@@ -934,7 +951,7 @@ module Appwrite
|
|
|
934
951
|
apiSecret: api_secret,
|
|
935
952
|
enabled: enabled,
|
|
936
953
|
}
|
|
937
|
-
|
|
954
|
+
|
|
938
955
|
api_headers = {
|
|
939
956
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
940
957
|
"content-type": 'application/json',
|
|
@@ -948,17 +965,20 @@ module Appwrite
|
|
|
948
965
|
params: api_params,
|
|
949
966
|
response_type: Models::OAuth2Dailymotion
|
|
950
967
|
)
|
|
951
|
-
|
|
952
968
|
end
|
|
953
969
|
|
|
954
970
|
# Update the project OAuth2 Discord configuration.
|
|
955
971
|
#
|
|
956
|
-
# @param [String] client_id
|
|
957
|
-
# @param [String] client_secret
|
|
972
|
+
# @param [String] client_id 'Client ID' of Discord OAuth2 app. For example: 950722000000343754
|
|
973
|
+
# @param [String] client_secret 'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D
|
|
958
974
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
959
975
|
#
|
|
960
976
|
# @return [OAuth2Discord]
|
|
961
|
-
def update_o_auth2_discord(
|
|
977
|
+
def update_o_auth2_discord(
|
|
978
|
+
client_id: nil,
|
|
979
|
+
client_secret: nil,
|
|
980
|
+
enabled: nil
|
|
981
|
+
)
|
|
962
982
|
api_path = '/project/oauth2/discord'
|
|
963
983
|
|
|
964
984
|
api_params = {
|
|
@@ -966,7 +986,7 @@ module Appwrite
|
|
|
966
986
|
clientSecret: client_secret,
|
|
967
987
|
enabled: enabled,
|
|
968
988
|
}
|
|
969
|
-
|
|
989
|
+
|
|
970
990
|
api_headers = {
|
|
971
991
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
972
992
|
"content-type": 'application/json',
|
|
@@ -980,17 +1000,20 @@ module Appwrite
|
|
|
980
1000
|
params: api_params,
|
|
981
1001
|
response_type: Models::OAuth2Discord
|
|
982
1002
|
)
|
|
983
|
-
|
|
984
1003
|
end
|
|
985
1004
|
|
|
986
1005
|
# Update the project OAuth2 Disqus configuration.
|
|
987
1006
|
#
|
|
988
|
-
# @param [String] public_key
|
|
989
|
-
# @param [String] secret_key
|
|
1007
|
+
# @param [String] public_key 'Public Key, also known as API Key' of Disqus OAuth2 app. For example: cgegH70000000000000000000000000000000000000000000000000000Hr1nYX
|
|
1008
|
+
# @param [String] secret_key 'Secret Key, also known as API Secret' of Disqus OAuth2 app. For example: W7Bykj00000000000000000000000000000000000000000000000000003o43w9
|
|
990
1009
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
991
1010
|
#
|
|
992
1011
|
# @return [OAuth2Disqus]
|
|
993
|
-
def update_o_auth2_disqus(
|
|
1012
|
+
def update_o_auth2_disqus(
|
|
1013
|
+
public_key: nil,
|
|
1014
|
+
secret_key: nil,
|
|
1015
|
+
enabled: nil
|
|
1016
|
+
)
|
|
994
1017
|
api_path = '/project/oauth2/disqus'
|
|
995
1018
|
|
|
996
1019
|
api_params = {
|
|
@@ -998,7 +1021,7 @@ module Appwrite
|
|
|
998
1021
|
secretKey: secret_key,
|
|
999
1022
|
enabled: enabled,
|
|
1000
1023
|
}
|
|
1001
|
-
|
|
1024
|
+
|
|
1002
1025
|
api_headers = {
|
|
1003
1026
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1004
1027
|
"content-type": 'application/json',
|
|
@@ -1012,17 +1035,20 @@ module Appwrite
|
|
|
1012
1035
|
params: api_params,
|
|
1013
1036
|
response_type: Models::OAuth2Disqus
|
|
1014
1037
|
)
|
|
1015
|
-
|
|
1016
1038
|
end
|
|
1017
1039
|
|
|
1018
1040
|
# Update the project OAuth2 Dropbox configuration.
|
|
1019
1041
|
#
|
|
1020
|
-
# @param [String] app_key
|
|
1021
|
-
# @param [String] app_secret
|
|
1042
|
+
# @param [String] app_key 'App Key' of Dropbox OAuth2 app. For example: jl000000000009t
|
|
1043
|
+
# @param [String] app_secret 'App Secret' of Dropbox OAuth2 app. For example: g200000000000vw
|
|
1022
1044
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1023
1045
|
#
|
|
1024
1046
|
# @return [OAuth2Dropbox]
|
|
1025
|
-
def update_o_auth2_dropbox(
|
|
1047
|
+
def update_o_auth2_dropbox(
|
|
1048
|
+
app_key: nil,
|
|
1049
|
+
app_secret: nil,
|
|
1050
|
+
enabled: nil
|
|
1051
|
+
)
|
|
1026
1052
|
api_path = '/project/oauth2/dropbox'
|
|
1027
1053
|
|
|
1028
1054
|
api_params = {
|
|
@@ -1030,7 +1056,7 @@ module Appwrite
|
|
|
1030
1056
|
appSecret: app_secret,
|
|
1031
1057
|
enabled: enabled,
|
|
1032
1058
|
}
|
|
1033
|
-
|
|
1059
|
+
|
|
1034
1060
|
api_headers = {
|
|
1035
1061
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1036
1062
|
"content-type": 'application/json',
|
|
@@ -1044,17 +1070,20 @@ module Appwrite
|
|
|
1044
1070
|
params: api_params,
|
|
1045
1071
|
response_type: Models::OAuth2Dropbox
|
|
1046
1072
|
)
|
|
1047
|
-
|
|
1048
1073
|
end
|
|
1049
1074
|
|
|
1050
1075
|
# Update the project OAuth2 Etsy configuration.
|
|
1051
1076
|
#
|
|
1052
|
-
# @param [String] key_string
|
|
1053
|
-
# @param [String] shared_secret
|
|
1077
|
+
# @param [String] key_string 'Keystring' of Etsy OAuth2 app. For example: nsgzxh0000000000008j85a2
|
|
1078
|
+
# @param [String] shared_secret 'Shared Secret' of Etsy OAuth2 app. For example: tp000000ru
|
|
1054
1079
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1055
1080
|
#
|
|
1056
1081
|
# @return [OAuth2Etsy]
|
|
1057
|
-
def update_o_auth2_etsy(
|
|
1082
|
+
def update_o_auth2_etsy(
|
|
1083
|
+
key_string: nil,
|
|
1084
|
+
shared_secret: nil,
|
|
1085
|
+
enabled: nil
|
|
1086
|
+
)
|
|
1058
1087
|
api_path = '/project/oauth2/etsy'
|
|
1059
1088
|
|
|
1060
1089
|
api_params = {
|
|
@@ -1062,7 +1091,7 @@ module Appwrite
|
|
|
1062
1091
|
sharedSecret: shared_secret,
|
|
1063
1092
|
enabled: enabled,
|
|
1064
1093
|
}
|
|
1065
|
-
|
|
1094
|
+
|
|
1066
1095
|
api_headers = {
|
|
1067
1096
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1068
1097
|
"content-type": 'application/json',
|
|
@@ -1076,17 +1105,20 @@ module Appwrite
|
|
|
1076
1105
|
params: api_params,
|
|
1077
1106
|
response_type: Models::OAuth2Etsy
|
|
1078
1107
|
)
|
|
1079
|
-
|
|
1080
1108
|
end
|
|
1081
1109
|
|
|
1082
1110
|
# Update the project OAuth2 Facebook configuration.
|
|
1083
1111
|
#
|
|
1084
|
-
# @param [String] app_id
|
|
1085
|
-
# @param [String] app_secret
|
|
1112
|
+
# @param [String] app_id 'App ID' of Facebook OAuth2 app. For example: 260600000007694
|
|
1113
|
+
# @param [String] app_secret 'App Secret' of Facebook OAuth2 app. For example: 2d0b2800000000000000000000d38af4
|
|
1086
1114
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1087
1115
|
#
|
|
1088
1116
|
# @return [OAuth2Facebook]
|
|
1089
|
-
def update_o_auth2_facebook(
|
|
1117
|
+
def update_o_auth2_facebook(
|
|
1118
|
+
app_id: nil,
|
|
1119
|
+
app_secret: nil,
|
|
1120
|
+
enabled: nil
|
|
1121
|
+
)
|
|
1090
1122
|
api_path = '/project/oauth2/facebook'
|
|
1091
1123
|
|
|
1092
1124
|
api_params = {
|
|
@@ -1094,7 +1126,7 @@ module Appwrite
|
|
|
1094
1126
|
appSecret: app_secret,
|
|
1095
1127
|
enabled: enabled,
|
|
1096
1128
|
}
|
|
1097
|
-
|
|
1129
|
+
|
|
1098
1130
|
api_headers = {
|
|
1099
1131
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1100
1132
|
"content-type": 'application/json',
|
|
@@ -1108,17 +1140,20 @@ module Appwrite
|
|
|
1108
1140
|
params: api_params,
|
|
1109
1141
|
response_type: Models::OAuth2Facebook
|
|
1110
1142
|
)
|
|
1111
|
-
|
|
1112
1143
|
end
|
|
1113
1144
|
|
|
1114
1145
|
# Update the project OAuth2 Figma configuration.
|
|
1115
1146
|
#
|
|
1116
|
-
# @param [String] client_id
|
|
1117
|
-
# @param [String] client_secret
|
|
1147
|
+
# @param [String] client_id 'Client ID' of Figma OAuth2 app. For example: byay5H0000000000VtiI40
|
|
1148
|
+
# @param [String] client_secret 'Client Secret' of Figma OAuth2 app. For example: yEpOYn0000000000000000004iIsU5
|
|
1118
1149
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1119
1150
|
#
|
|
1120
1151
|
# @return [OAuth2Figma]
|
|
1121
|
-
def update_o_auth2_figma(
|
|
1152
|
+
def update_o_auth2_figma(
|
|
1153
|
+
client_id: nil,
|
|
1154
|
+
client_secret: nil,
|
|
1155
|
+
enabled: nil
|
|
1156
|
+
)
|
|
1122
1157
|
api_path = '/project/oauth2/figma'
|
|
1123
1158
|
|
|
1124
1159
|
api_params = {
|
|
@@ -1126,7 +1161,7 @@ module Appwrite
|
|
|
1126
1161
|
clientSecret: client_secret,
|
|
1127
1162
|
enabled: enabled,
|
|
1128
1163
|
}
|
|
1129
|
-
|
|
1164
|
+
|
|
1130
1165
|
api_headers = {
|
|
1131
1166
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1132
1167
|
"content-type": 'application/json',
|
|
@@ -1140,18 +1175,22 @@ module Appwrite
|
|
|
1140
1175
|
params: api_params,
|
|
1141
1176
|
response_type: Models::OAuth2Figma
|
|
1142
1177
|
)
|
|
1143
|
-
|
|
1144
1178
|
end
|
|
1145
1179
|
|
|
1146
1180
|
# Update the project OAuth2 FusionAuth configuration.
|
|
1147
1181
|
#
|
|
1148
|
-
# @param [String] client_id
|
|
1149
|
-
# @param [String] client_secret
|
|
1182
|
+
# @param [String] client_id 'Client ID' of FusionAuth OAuth2 app. For example: b2222c00-0000-0000-0000-000000862097
|
|
1183
|
+
# @param [String] client_secret 'Client Secret' of FusionAuth OAuth2 app. For example: Jx4s0C0000000000000000000000000000000wGqLsc
|
|
1150
1184
|
# @param [String] endpoint Domain of FusionAuth instance. For example: example.fusionauth.io
|
|
1151
1185
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1152
1186
|
#
|
|
1153
1187
|
# @return [OAuth2FusionAuth]
|
|
1154
|
-
def update_o_auth2_fusion_auth(
|
|
1188
|
+
def update_o_auth2_fusion_auth(
|
|
1189
|
+
client_id: nil,
|
|
1190
|
+
client_secret: nil,
|
|
1191
|
+
endpoint: nil,
|
|
1192
|
+
enabled: nil
|
|
1193
|
+
)
|
|
1155
1194
|
api_path = '/project/oauth2/fusionauth'
|
|
1156
1195
|
|
|
1157
1196
|
api_params = {
|
|
@@ -1160,7 +1199,7 @@ module Appwrite
|
|
|
1160
1199
|
endpoint: endpoint,
|
|
1161
1200
|
enabled: enabled,
|
|
1162
1201
|
}
|
|
1163
|
-
|
|
1202
|
+
|
|
1164
1203
|
api_headers = {
|
|
1165
1204
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1166
1205
|
"content-type": 'application/json',
|
|
@@ -1174,17 +1213,20 @@ module Appwrite
|
|
|
1174
1213
|
params: api_params,
|
|
1175
1214
|
response_type: Models::OAuth2FusionAuth
|
|
1176
1215
|
)
|
|
1177
|
-
|
|
1178
1216
|
end
|
|
1179
1217
|
|
|
1180
1218
|
# Update the project OAuth2 GitHub configuration.
|
|
1181
1219
|
#
|
|
1182
|
-
# @param [String] client_id
|
|
1183
|
-
# @param [String] client_secret
|
|
1220
|
+
# @param [String] client_id 'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006
|
|
1221
|
+
# @param [String] client_secret 'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc
|
|
1184
1222
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1185
1223
|
#
|
|
1186
1224
|
# @return [OAuth2Github]
|
|
1187
|
-
def update_o_auth2_git_hub(
|
|
1225
|
+
def update_o_auth2_git_hub(
|
|
1226
|
+
client_id: nil,
|
|
1227
|
+
client_secret: nil,
|
|
1228
|
+
enabled: nil
|
|
1229
|
+
)
|
|
1188
1230
|
api_path = '/project/oauth2/github'
|
|
1189
1231
|
|
|
1190
1232
|
api_params = {
|
|
@@ -1192,7 +1234,7 @@ module Appwrite
|
|
|
1192
1234
|
clientSecret: client_secret,
|
|
1193
1235
|
enabled: enabled,
|
|
1194
1236
|
}
|
|
1195
|
-
|
|
1237
|
+
|
|
1196
1238
|
api_headers = {
|
|
1197
1239
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1198
1240
|
"content-type": 'application/json',
|
|
@@ -1206,18 +1248,22 @@ module Appwrite
|
|
|
1206
1248
|
params: api_params,
|
|
1207
1249
|
response_type: Models::OAuth2Github
|
|
1208
1250
|
)
|
|
1209
|
-
|
|
1210
1251
|
end
|
|
1211
1252
|
|
|
1212
1253
|
# Update the project OAuth2 Gitlab configuration.
|
|
1213
1254
|
#
|
|
1214
|
-
# @param [String] application_id
|
|
1215
|
-
# @param [String] secret
|
|
1255
|
+
# @param [String] application_id 'Application ID' of Gitlab OAuth2 app. For example: d41ffe0000000000000000000000000000000000000000000000000000d5e252
|
|
1256
|
+
# @param [String] secret 'Secret' of Gitlab OAuth2 app. For example: gloas-838cfa0000000000000000000000000000000000000000000000000000ecbb38
|
|
1216
1257
|
# @param [String] endpoint Endpoint URL of self-hosted GitLab instance. For example: https://gitlab.com
|
|
1217
1258
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1218
1259
|
#
|
|
1219
1260
|
# @return [OAuth2Gitlab]
|
|
1220
|
-
def update_o_auth2_gitlab(
|
|
1261
|
+
def update_o_auth2_gitlab(
|
|
1262
|
+
application_id: nil,
|
|
1263
|
+
secret: nil,
|
|
1264
|
+
endpoint: nil,
|
|
1265
|
+
enabled: nil
|
|
1266
|
+
)
|
|
1221
1267
|
api_path = '/project/oauth2/gitlab'
|
|
1222
1268
|
|
|
1223
1269
|
api_params = {
|
|
@@ -1226,7 +1272,7 @@ module Appwrite
|
|
|
1226
1272
|
endpoint: endpoint,
|
|
1227
1273
|
enabled: enabled,
|
|
1228
1274
|
}
|
|
1229
|
-
|
|
1275
|
+
|
|
1230
1276
|
api_headers = {
|
|
1231
1277
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1232
1278
|
"content-type": 'application/json',
|
|
@@ -1240,18 +1286,22 @@ module Appwrite
|
|
|
1240
1286
|
params: api_params,
|
|
1241
1287
|
response_type: Models::OAuth2Gitlab
|
|
1242
1288
|
)
|
|
1243
|
-
|
|
1244
1289
|
end
|
|
1245
1290
|
|
|
1246
1291
|
# Update the project OAuth2 Google configuration.
|
|
1247
1292
|
#
|
|
1248
|
-
# @param [String] client_id
|
|
1249
|
-
# @param [String] client_secret
|
|
1250
|
-
# @param [Array] prompt Array of Google OAuth2 prompt values. If
|
|
1293
|
+
# @param [String] client_id 'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com
|
|
1294
|
+
# @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj
|
|
1295
|
+
# @param [Array] prompt Array of Google OAuth2 prompt values. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. Must not be specified with other values. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account.
|
|
1251
1296
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1252
1297
|
#
|
|
1253
1298
|
# @return [OAuth2Google]
|
|
1254
|
-
def update_o_auth2_google(
|
|
1299
|
+
def update_o_auth2_google(
|
|
1300
|
+
client_id: nil,
|
|
1301
|
+
client_secret: nil,
|
|
1302
|
+
prompt: nil,
|
|
1303
|
+
enabled: nil
|
|
1304
|
+
)
|
|
1255
1305
|
api_path = '/project/oauth2/google'
|
|
1256
1306
|
|
|
1257
1307
|
api_params = {
|
|
@@ -1260,7 +1310,7 @@ module Appwrite
|
|
|
1260
1310
|
prompt: prompt,
|
|
1261
1311
|
enabled: enabled,
|
|
1262
1312
|
}
|
|
1263
|
-
|
|
1313
|
+
|
|
1264
1314
|
api_headers = {
|
|
1265
1315
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1266
1316
|
"content-type": 'application/json',
|
|
@@ -1274,19 +1324,59 @@ module Appwrite
|
|
|
1274
1324
|
params: api_params,
|
|
1275
1325
|
response_type: Models::OAuth2Google
|
|
1276
1326
|
)
|
|
1327
|
+
end
|
|
1328
|
+
|
|
1329
|
+
# Update the project OAuth2 Hugging Face configuration.
|
|
1330
|
+
#
|
|
1331
|
+
# @param [String] client_id 'Client ID' of Hugging Face OAuth2 app. For example: 2ab9cff9-d711-40ad-a91e-b08a49c42d24
|
|
1332
|
+
# @param [String] client_secret 'Client Secret' of Hugging Face OAuth2 app. For example: oauth_app_secret_wcLhRtl000000000000000000000xbNdLt
|
|
1333
|
+
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1334
|
+
#
|
|
1335
|
+
# @return [OAuth2HuggingFace]
|
|
1336
|
+
def update_o_auth2_hugging_face(
|
|
1337
|
+
client_id: nil,
|
|
1338
|
+
client_secret: nil,
|
|
1339
|
+
enabled: nil
|
|
1340
|
+
)
|
|
1341
|
+
api_path = '/project/oauth2/huggingface'
|
|
1277
1342
|
|
|
1343
|
+
api_params = {
|
|
1344
|
+
clientId: client_id,
|
|
1345
|
+
clientSecret: client_secret,
|
|
1346
|
+
enabled: enabled,
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
api_headers = {
|
|
1350
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
1351
|
+
"content-type": 'application/json',
|
|
1352
|
+
"accept": 'application/json',
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
@client.call(
|
|
1356
|
+
method: 'PATCH',
|
|
1357
|
+
path: api_path,
|
|
1358
|
+
headers: api_headers,
|
|
1359
|
+
params: api_params,
|
|
1360
|
+
response_type: Models::OAuth2HuggingFace
|
|
1361
|
+
)
|
|
1278
1362
|
end
|
|
1279
1363
|
|
|
1280
1364
|
# Update the project OAuth2 Keycloak configuration.
|
|
1281
1365
|
#
|
|
1282
|
-
# @param [String] client_id
|
|
1283
|
-
# @param [String] client_secret
|
|
1366
|
+
# @param [String] client_id 'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app
|
|
1367
|
+
# @param [String] client_secret 'Client Secret' of Keycloak OAuth2 app. For example: jdjrJd00000000000000000000HUsaZO
|
|
1284
1368
|
# @param [String] endpoint Domain of Keycloak instance. For example: keycloak.example.com
|
|
1285
1369
|
# @param [String] realm_name Keycloak realm name. For example: appwrite-realm
|
|
1286
1370
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1287
1371
|
#
|
|
1288
1372
|
# @return [OAuth2Keycloak]
|
|
1289
|
-
def update_o_auth2_keycloak(
|
|
1373
|
+
def update_o_auth2_keycloak(
|
|
1374
|
+
client_id: nil,
|
|
1375
|
+
client_secret: nil,
|
|
1376
|
+
endpoint: nil,
|
|
1377
|
+
realm_name: nil,
|
|
1378
|
+
enabled: nil
|
|
1379
|
+
)
|
|
1290
1380
|
api_path = '/project/oauth2/keycloak'
|
|
1291
1381
|
|
|
1292
1382
|
api_params = {
|
|
@@ -1296,7 +1386,7 @@ module Appwrite
|
|
|
1296
1386
|
realmName: realm_name,
|
|
1297
1387
|
enabled: enabled,
|
|
1298
1388
|
}
|
|
1299
|
-
|
|
1389
|
+
|
|
1300
1390
|
api_headers = {
|
|
1301
1391
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1302
1392
|
"content-type": 'application/json',
|
|
@@ -1310,17 +1400,20 @@ module Appwrite
|
|
|
1310
1400
|
params: api_params,
|
|
1311
1401
|
response_type: Models::OAuth2Keycloak
|
|
1312
1402
|
)
|
|
1313
|
-
|
|
1314
1403
|
end
|
|
1315
1404
|
|
|
1316
1405
|
# Update the project OAuth2 Kick configuration.
|
|
1317
1406
|
#
|
|
1318
|
-
# @param [String] client_id
|
|
1319
|
-
# @param [String] client_secret
|
|
1407
|
+
# @param [String] client_id 'Client ID' of Kick OAuth2 app. For example: 01KQ7C00000000000001MFHS32
|
|
1408
|
+
# @param [String] client_secret 'Client Secret' of Kick OAuth2 app. For example: 34ac5600000000000000000000000000000000000000000000000000e830c8b
|
|
1320
1409
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1321
1410
|
#
|
|
1322
1411
|
# @return [OAuth2Kick]
|
|
1323
|
-
def update_o_auth2_kick(
|
|
1412
|
+
def update_o_auth2_kick(
|
|
1413
|
+
client_id: nil,
|
|
1414
|
+
client_secret: nil,
|
|
1415
|
+
enabled: nil
|
|
1416
|
+
)
|
|
1324
1417
|
api_path = '/project/oauth2/kick'
|
|
1325
1418
|
|
|
1326
1419
|
api_params = {
|
|
@@ -1328,7 +1421,7 @@ module Appwrite
|
|
|
1328
1421
|
clientSecret: client_secret,
|
|
1329
1422
|
enabled: enabled,
|
|
1330
1423
|
}
|
|
1331
|
-
|
|
1424
|
+
|
|
1332
1425
|
api_headers = {
|
|
1333
1426
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1334
1427
|
"content-type": 'application/json',
|
|
@@ -1342,17 +1435,20 @@ module Appwrite
|
|
|
1342
1435
|
params: api_params,
|
|
1343
1436
|
response_type: Models::OAuth2Kick
|
|
1344
1437
|
)
|
|
1345
|
-
|
|
1346
1438
|
end
|
|
1347
1439
|
|
|
1348
1440
|
# Update the project OAuth2 Linkedin configuration.
|
|
1349
1441
|
#
|
|
1350
|
-
# @param [String] client_id
|
|
1351
|
-
# @param [String] primary_client_secret
|
|
1442
|
+
# @param [String] client_id 'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv
|
|
1443
|
+
# @param [String] primary_client_secret 'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000./HtlYw==
|
|
1352
1444
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1353
1445
|
#
|
|
1354
1446
|
# @return [OAuth2Linkedin]
|
|
1355
|
-
def update_o_auth2_linkedin(
|
|
1447
|
+
def update_o_auth2_linkedin(
|
|
1448
|
+
client_id: nil,
|
|
1449
|
+
primary_client_secret: nil,
|
|
1450
|
+
enabled: nil
|
|
1451
|
+
)
|
|
1356
1452
|
api_path = '/project/oauth2/linkedin'
|
|
1357
1453
|
|
|
1358
1454
|
api_params = {
|
|
@@ -1360,7 +1456,7 @@ module Appwrite
|
|
|
1360
1456
|
primaryClientSecret: primary_client_secret,
|
|
1361
1457
|
enabled: enabled,
|
|
1362
1458
|
}
|
|
1363
|
-
|
|
1459
|
+
|
|
1364
1460
|
api_headers = {
|
|
1365
1461
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1366
1462
|
"content-type": 'application/json',
|
|
@@ -1374,18 +1470,22 @@ module Appwrite
|
|
|
1374
1470
|
params: api_params,
|
|
1375
1471
|
response_type: Models::OAuth2Linkedin
|
|
1376
1472
|
)
|
|
1377
|
-
|
|
1378
1473
|
end
|
|
1379
1474
|
|
|
1380
1475
|
# Update the project OAuth2 Microsoft configuration.
|
|
1381
1476
|
#
|
|
1382
|
-
# @param [String] application_id
|
|
1383
|
-
# @param [String] application_secret
|
|
1384
|
-
# @param [String] tenant Microsoft Entra ID tenant identifier. Use
|
|
1477
|
+
# @param [String] application_id 'Entra ID Application ID, also known as Client ID' of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444
|
|
1478
|
+
# @param [String] application_secret 'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u
|
|
1479
|
+
# @param [String] tenant Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common
|
|
1385
1480
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1386
1481
|
#
|
|
1387
1482
|
# @return [OAuth2Microsoft]
|
|
1388
|
-
def update_o_auth2_microsoft(
|
|
1483
|
+
def update_o_auth2_microsoft(
|
|
1484
|
+
application_id: nil,
|
|
1485
|
+
application_secret: nil,
|
|
1486
|
+
tenant: nil,
|
|
1487
|
+
enabled: nil
|
|
1488
|
+
)
|
|
1389
1489
|
api_path = '/project/oauth2/microsoft'
|
|
1390
1490
|
|
|
1391
1491
|
api_params = {
|
|
@@ -1394,7 +1494,7 @@ module Appwrite
|
|
|
1394
1494
|
tenant: tenant,
|
|
1395
1495
|
enabled: enabled,
|
|
1396
1496
|
}
|
|
1397
|
-
|
|
1497
|
+
|
|
1398
1498
|
api_headers = {
|
|
1399
1499
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1400
1500
|
"content-type": 'application/json',
|
|
@@ -1408,17 +1508,20 @@ module Appwrite
|
|
|
1408
1508
|
params: api_params,
|
|
1409
1509
|
response_type: Models::OAuth2Microsoft
|
|
1410
1510
|
)
|
|
1411
|
-
|
|
1412
1511
|
end
|
|
1413
1512
|
|
|
1414
1513
|
# Update the project OAuth2 Notion configuration.
|
|
1415
1514
|
#
|
|
1416
|
-
# @param [String] oauth_client_id
|
|
1417
|
-
# @param [String] oauth_client_secret
|
|
1515
|
+
# @param [String] oauth_client_id 'OAuth Client ID' of Notion OAuth2 app. For example: 341d8700-0000-0000-0000-000000446ee3
|
|
1516
|
+
# @param [String] oauth_client_secret 'OAuth Client Secret' of Notion OAuth2 app. For example: secret_dLUr4b000000000000000000000000000000lFHAa9
|
|
1418
1517
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1419
1518
|
#
|
|
1420
1519
|
# @return [OAuth2Notion]
|
|
1421
|
-
def update_o_auth2_notion(
|
|
1520
|
+
def update_o_auth2_notion(
|
|
1521
|
+
oauth_client_id: nil,
|
|
1522
|
+
oauth_client_secret: nil,
|
|
1523
|
+
enabled: nil
|
|
1524
|
+
)
|
|
1422
1525
|
api_path = '/project/oauth2/notion'
|
|
1423
1526
|
|
|
1424
1527
|
api_params = {
|
|
@@ -1426,7 +1529,7 @@ module Appwrite
|
|
|
1426
1529
|
oauthClientSecret: oauth_client_secret,
|
|
1427
1530
|
enabled: enabled,
|
|
1428
1531
|
}
|
|
1429
|
-
|
|
1532
|
+
|
|
1430
1533
|
api_headers = {
|
|
1431
1534
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1432
1535
|
"content-type": 'application/json',
|
|
@@ -1440,23 +1543,32 @@ module Appwrite
|
|
|
1440
1543
|
params: api_params,
|
|
1441
1544
|
response_type: Models::OAuth2Notion
|
|
1442
1545
|
)
|
|
1443
|
-
|
|
1444
1546
|
end
|
|
1445
1547
|
|
|
1446
1548
|
# Update the project OAuth2 Oidc configuration.
|
|
1447
1549
|
#
|
|
1448
|
-
# @param [String] client_id
|
|
1449
|
-
# @param [String] client_secret
|
|
1550
|
+
# @param [String] client_id 'Client ID' of Oidc OAuth2 app. For example: qibI2x0000000000000000000000000006L2YFoG
|
|
1551
|
+
# @param [String] client_secret 'Client Secret' of Oidc OAuth2 app. For example: Ah68ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003qpcHV
|
|
1450
1552
|
# @param [String] well_known_url OpenID Connect well-known configuration URL. When provided, authorization, token, and user info endpoints can be discovered automatically. For example: https://myoauth.com/.well-known/openid-configuration
|
|
1451
1553
|
# @param [String] authorization_url OpenID Connect authorization endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/authorize
|
|
1452
1554
|
# @param [String] token_url OpenID Connect token endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/token
|
|
1453
1555
|
# @param [String] user_info_url OpenID Connect user info endpoint URL. Required when wellKnownURL is not provided. For example: https://myoauth.com/oauth2/userinfo
|
|
1454
|
-
# @param [Array] prompt Array of OpenID Connect prompt values controlling the authentication and consent screens. If
|
|
1556
|
+
# @param [Array] prompt Array of OpenID Connect prompt values controlling the authentication and consent screens. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. "login" means: prompt the user to re-authenticate. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account.
|
|
1455
1557
|
# @param [Integer] max_age Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds, otherwise they are prompted to re-authenticate.
|
|
1456
1558
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1457
1559
|
#
|
|
1458
1560
|
# @return [OAuth2Oidc]
|
|
1459
|
-
def update_o_auth2_oidc(
|
|
1561
|
+
def update_o_auth2_oidc(
|
|
1562
|
+
client_id: nil,
|
|
1563
|
+
client_secret: nil,
|
|
1564
|
+
well_known_url: nil,
|
|
1565
|
+
authorization_url: nil,
|
|
1566
|
+
token_url: nil,
|
|
1567
|
+
user_info_url: nil,
|
|
1568
|
+
prompt: nil,
|
|
1569
|
+
max_age: nil,
|
|
1570
|
+
enabled: nil
|
|
1571
|
+
)
|
|
1460
1572
|
api_path = '/project/oauth2/oidc'
|
|
1461
1573
|
|
|
1462
1574
|
api_params = {
|
|
@@ -1470,7 +1582,7 @@ module Appwrite
|
|
|
1470
1582
|
maxAge: max_age,
|
|
1471
1583
|
enabled: enabled,
|
|
1472
1584
|
}
|
|
1473
|
-
|
|
1585
|
+
|
|
1474
1586
|
api_headers = {
|
|
1475
1587
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1476
1588
|
"content-type": 'application/json',
|
|
@@ -1484,19 +1596,24 @@ module Appwrite
|
|
|
1484
1596
|
params: api_params,
|
|
1485
1597
|
response_type: Models::OAuth2Oidc
|
|
1486
1598
|
)
|
|
1487
|
-
|
|
1488
1599
|
end
|
|
1489
1600
|
|
|
1490
1601
|
# Update the project OAuth2 Okta configuration.
|
|
1491
1602
|
#
|
|
1492
|
-
# @param [String] client_id
|
|
1493
|
-
# @param [String] client_secret
|
|
1603
|
+
# @param [String] client_id 'Client ID' of Okta OAuth2 app. For example: 0oa00000000000000698
|
|
1604
|
+
# @param [String] client_secret 'Client Secret' of Okta OAuth2 app. For example: Kiq0000000000000000000000000000000000000-00000000000H2L5-3SJ-vRV
|
|
1494
1605
|
# @param [String] domain Okta company domain. Required when enabling the provider. For example: trial-6400025.okta.com. Example of wrong value: trial-6400025-admin.okta.com, or https://trial-6400025.okta.com/
|
|
1495
1606
|
# @param [String] authorization_server_id Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z
|
|
1496
1607
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1497
1608
|
#
|
|
1498
1609
|
# @return [OAuth2Okta]
|
|
1499
|
-
def update_o_auth2_okta(
|
|
1610
|
+
def update_o_auth2_okta(
|
|
1611
|
+
client_id: nil,
|
|
1612
|
+
client_secret: nil,
|
|
1613
|
+
domain: nil,
|
|
1614
|
+
authorization_server_id: nil,
|
|
1615
|
+
enabled: nil
|
|
1616
|
+
)
|
|
1500
1617
|
api_path = '/project/oauth2/okta'
|
|
1501
1618
|
|
|
1502
1619
|
api_params = {
|
|
@@ -1506,7 +1623,7 @@ module Appwrite
|
|
|
1506
1623
|
authorizationServerId: authorization_server_id,
|
|
1507
1624
|
enabled: enabled,
|
|
1508
1625
|
}
|
|
1509
|
-
|
|
1626
|
+
|
|
1510
1627
|
api_headers = {
|
|
1511
1628
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1512
1629
|
"content-type": 'application/json',
|
|
@@ -1520,17 +1637,20 @@ module Appwrite
|
|
|
1520
1637
|
params: api_params,
|
|
1521
1638
|
response_type: Models::OAuth2Okta
|
|
1522
1639
|
)
|
|
1523
|
-
|
|
1524
1640
|
end
|
|
1525
1641
|
|
|
1526
1642
|
# Update the project OAuth2 Paypal configuration.
|
|
1527
1643
|
#
|
|
1528
|
-
# @param [String] client_id
|
|
1529
|
-
# @param [String] secret_key
|
|
1644
|
+
# @param [String] client_id 'Client ID' of Paypal OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB
|
|
1645
|
+
# @param [String] secret_key 'Secret Key 1 or Secret Key 2' of Paypal OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp
|
|
1530
1646
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1531
1647
|
#
|
|
1532
1648
|
# @return [OAuth2Paypal]
|
|
1533
|
-
def update_o_auth2_paypal(
|
|
1649
|
+
def update_o_auth2_paypal(
|
|
1650
|
+
client_id: nil,
|
|
1651
|
+
secret_key: nil,
|
|
1652
|
+
enabled: nil
|
|
1653
|
+
)
|
|
1534
1654
|
api_path = '/project/oauth2/paypal'
|
|
1535
1655
|
|
|
1536
1656
|
api_params = {
|
|
@@ -1538,7 +1658,7 @@ module Appwrite
|
|
|
1538
1658
|
secretKey: secret_key,
|
|
1539
1659
|
enabled: enabled,
|
|
1540
1660
|
}
|
|
1541
|
-
|
|
1661
|
+
|
|
1542
1662
|
api_headers = {
|
|
1543
1663
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1544
1664
|
"content-type": 'application/json',
|
|
@@ -1552,17 +1672,20 @@ module Appwrite
|
|
|
1552
1672
|
params: api_params,
|
|
1553
1673
|
response_type: Models::OAuth2Paypal
|
|
1554
1674
|
)
|
|
1555
|
-
|
|
1556
1675
|
end
|
|
1557
1676
|
|
|
1558
1677
|
# Update the project OAuth2 PaypalSandbox configuration.
|
|
1559
1678
|
#
|
|
1560
|
-
# @param [String] client_id
|
|
1561
|
-
# @param [String] secret_key
|
|
1679
|
+
# @param [String] client_id 'Client ID' of PaypalSandbox OAuth2 app. For example: AdhIEG7-000000000000-0000000000000000000000000000000-0000000000000000000000-2pyB
|
|
1680
|
+
# @param [String] secret_key 'Secret Key 1 or Secret Key 2' of PaypalSandbox OAuth2 app. For example: EH8KCXtew--000000000000000000000000000000000000000_C-1_5UP_000000000000000CB7KDp
|
|
1562
1681
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1563
1682
|
#
|
|
1564
1683
|
# @return [OAuth2Paypal]
|
|
1565
|
-
def update_o_auth2_paypal_sandbox(
|
|
1684
|
+
def update_o_auth2_paypal_sandbox(
|
|
1685
|
+
client_id: nil,
|
|
1686
|
+
secret_key: nil,
|
|
1687
|
+
enabled: nil
|
|
1688
|
+
)
|
|
1566
1689
|
api_path = '/project/oauth2/paypalSandbox'
|
|
1567
1690
|
|
|
1568
1691
|
api_params = {
|
|
@@ -1570,7 +1693,7 @@ module Appwrite
|
|
|
1570
1693
|
secretKey: secret_key,
|
|
1571
1694
|
enabled: enabled,
|
|
1572
1695
|
}
|
|
1573
|
-
|
|
1696
|
+
|
|
1574
1697
|
api_headers = {
|
|
1575
1698
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1576
1699
|
"content-type": 'application/json',
|
|
@@ -1584,17 +1707,20 @@ module Appwrite
|
|
|
1584
1707
|
params: api_params,
|
|
1585
1708
|
response_type: Models::OAuth2Paypal
|
|
1586
1709
|
)
|
|
1587
|
-
|
|
1588
1710
|
end
|
|
1589
1711
|
|
|
1590
1712
|
# Update the project OAuth2 Podio configuration.
|
|
1591
1713
|
#
|
|
1592
|
-
# @param [String] client_id
|
|
1593
|
-
# @param [String] client_secret
|
|
1714
|
+
# @param [String] client_id 'Client ID' of Podio OAuth2 app. For example: appwrite-o0000000st-app
|
|
1715
|
+
# @param [String] client_secret 'Client Secret' of Podio OAuth2 app. For example: Rn247T0000000000000000000000000000000000000000000000000000W2zWTN
|
|
1594
1716
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1595
1717
|
#
|
|
1596
1718
|
# @return [OAuth2Podio]
|
|
1597
|
-
def update_o_auth2_podio(
|
|
1719
|
+
def update_o_auth2_podio(
|
|
1720
|
+
client_id: nil,
|
|
1721
|
+
client_secret: nil,
|
|
1722
|
+
enabled: nil
|
|
1723
|
+
)
|
|
1598
1724
|
api_path = '/project/oauth2/podio'
|
|
1599
1725
|
|
|
1600
1726
|
api_params = {
|
|
@@ -1602,7 +1728,7 @@ module Appwrite
|
|
|
1602
1728
|
clientSecret: client_secret,
|
|
1603
1729
|
enabled: enabled,
|
|
1604
1730
|
}
|
|
1605
|
-
|
|
1731
|
+
|
|
1606
1732
|
api_headers = {
|
|
1607
1733
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1608
1734
|
"content-type": 'application/json',
|
|
@@ -1616,17 +1742,20 @@ module Appwrite
|
|
|
1616
1742
|
params: api_params,
|
|
1617
1743
|
response_type: Models::OAuth2Podio
|
|
1618
1744
|
)
|
|
1619
|
-
|
|
1620
1745
|
end
|
|
1621
1746
|
|
|
1622
1747
|
# Update the project OAuth2 Salesforce configuration.
|
|
1623
1748
|
#
|
|
1624
|
-
# @param [String] customer_key
|
|
1625
|
-
# @param [String] customer_secret
|
|
1749
|
+
# @param [String] customer_key 'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq
|
|
1750
|
+
# @param [String] customer_secret 'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2
|
|
1626
1751
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1627
1752
|
#
|
|
1628
1753
|
# @return [OAuth2Salesforce]
|
|
1629
|
-
def update_o_auth2_salesforce(
|
|
1754
|
+
def update_o_auth2_salesforce(
|
|
1755
|
+
customer_key: nil,
|
|
1756
|
+
customer_secret: nil,
|
|
1757
|
+
enabled: nil
|
|
1758
|
+
)
|
|
1630
1759
|
api_path = '/project/oauth2/salesforce'
|
|
1631
1760
|
|
|
1632
1761
|
api_params = {
|
|
@@ -1634,7 +1763,7 @@ module Appwrite
|
|
|
1634
1763
|
customerSecret: customer_secret,
|
|
1635
1764
|
enabled: enabled,
|
|
1636
1765
|
}
|
|
1637
|
-
|
|
1766
|
+
|
|
1638
1767
|
api_headers = {
|
|
1639
1768
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1640
1769
|
"content-type": 'application/json',
|
|
@@ -1648,17 +1777,20 @@ module Appwrite
|
|
|
1648
1777
|
params: api_params,
|
|
1649
1778
|
response_type: Models::OAuth2Salesforce
|
|
1650
1779
|
)
|
|
1651
|
-
|
|
1652
1780
|
end
|
|
1653
1781
|
|
|
1654
1782
|
# Update the project OAuth2 Slack configuration.
|
|
1655
1783
|
#
|
|
1656
|
-
# @param [String] client_id
|
|
1657
|
-
# @param [String] client_secret
|
|
1784
|
+
# @param [String] client_id 'Client ID' of Slack OAuth2 app. For example: 23000000089.15000000000023
|
|
1785
|
+
# @param [String] client_secret 'Client Secret' of Slack OAuth2 app. For example: 81656000000000000000000000f3d2fd
|
|
1658
1786
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1659
1787
|
#
|
|
1660
1788
|
# @return [OAuth2Slack]
|
|
1661
|
-
def update_o_auth2_slack(
|
|
1789
|
+
def update_o_auth2_slack(
|
|
1790
|
+
client_id: nil,
|
|
1791
|
+
client_secret: nil,
|
|
1792
|
+
enabled: nil
|
|
1793
|
+
)
|
|
1662
1794
|
api_path = '/project/oauth2/slack'
|
|
1663
1795
|
|
|
1664
1796
|
api_params = {
|
|
@@ -1666,7 +1798,7 @@ module Appwrite
|
|
|
1666
1798
|
clientSecret: client_secret,
|
|
1667
1799
|
enabled: enabled,
|
|
1668
1800
|
}
|
|
1669
|
-
|
|
1801
|
+
|
|
1670
1802
|
api_headers = {
|
|
1671
1803
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1672
1804
|
"content-type": 'application/json',
|
|
@@ -1680,17 +1812,20 @@ module Appwrite
|
|
|
1680
1812
|
params: api_params,
|
|
1681
1813
|
response_type: Models::OAuth2Slack
|
|
1682
1814
|
)
|
|
1683
|
-
|
|
1684
1815
|
end
|
|
1685
1816
|
|
|
1686
1817
|
# Update the project OAuth2 Spotify configuration.
|
|
1687
1818
|
#
|
|
1688
|
-
# @param [String] client_id
|
|
1689
|
-
# @param [String] client_secret
|
|
1819
|
+
# @param [String] client_id 'Client ID' of Spotify OAuth2 app. For example: 6ec271000000000000000000009beace
|
|
1820
|
+
# @param [String] client_secret 'Client Secret' of Spotify OAuth2 app. For example: db068a000000000000000000008b5b9f
|
|
1690
1821
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1691
1822
|
#
|
|
1692
1823
|
# @return [OAuth2Spotify]
|
|
1693
|
-
def update_o_auth2_spotify(
|
|
1824
|
+
def update_o_auth2_spotify(
|
|
1825
|
+
client_id: nil,
|
|
1826
|
+
client_secret: nil,
|
|
1827
|
+
enabled: nil
|
|
1828
|
+
)
|
|
1694
1829
|
api_path = '/project/oauth2/spotify'
|
|
1695
1830
|
|
|
1696
1831
|
api_params = {
|
|
@@ -1698,7 +1833,7 @@ module Appwrite
|
|
|
1698
1833
|
clientSecret: client_secret,
|
|
1699
1834
|
enabled: enabled,
|
|
1700
1835
|
}
|
|
1701
|
-
|
|
1836
|
+
|
|
1702
1837
|
api_headers = {
|
|
1703
1838
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1704
1839
|
"content-type": 'application/json',
|
|
@@ -1712,17 +1847,20 @@ module Appwrite
|
|
|
1712
1847
|
params: api_params,
|
|
1713
1848
|
response_type: Models::OAuth2Spotify
|
|
1714
1849
|
)
|
|
1715
|
-
|
|
1716
1850
|
end
|
|
1717
1851
|
|
|
1718
1852
|
# Update the project OAuth2 Stripe configuration.
|
|
1719
1853
|
#
|
|
1720
|
-
# @param [String] client_id
|
|
1721
|
-
# @param [String] api_secret_key
|
|
1854
|
+
# @param [String] client_id 'Client ID' of Stripe OAuth2 app. For example: ca_UKibXX0000000000000000000006byvR
|
|
1855
|
+
# @param [String] api_secret_key 'API Secret Key' of Stripe OAuth2 app. For example: sk_51SfOd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000QGWYfp
|
|
1722
1856
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1723
1857
|
#
|
|
1724
1858
|
# @return [OAuth2Stripe]
|
|
1725
|
-
def update_o_auth2_stripe(
|
|
1859
|
+
def update_o_auth2_stripe(
|
|
1860
|
+
client_id: nil,
|
|
1861
|
+
api_secret_key: nil,
|
|
1862
|
+
enabled: nil
|
|
1863
|
+
)
|
|
1726
1864
|
api_path = '/project/oauth2/stripe'
|
|
1727
1865
|
|
|
1728
1866
|
api_params = {
|
|
@@ -1730,7 +1868,7 @@ module Appwrite
|
|
|
1730
1868
|
apiSecretKey: api_secret_key,
|
|
1731
1869
|
enabled: enabled,
|
|
1732
1870
|
}
|
|
1733
|
-
|
|
1871
|
+
|
|
1734
1872
|
api_headers = {
|
|
1735
1873
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1736
1874
|
"content-type": 'application/json',
|
|
@@ -1744,17 +1882,20 @@ module Appwrite
|
|
|
1744
1882
|
params: api_params,
|
|
1745
1883
|
response_type: Models::OAuth2Stripe
|
|
1746
1884
|
)
|
|
1747
|
-
|
|
1748
1885
|
end
|
|
1749
1886
|
|
|
1750
1887
|
# Update the project OAuth2 Tradeshift configuration.
|
|
1751
1888
|
#
|
|
1752
|
-
# @param [String] oauth2_client_id
|
|
1753
|
-
# @param [String] oauth2_client_secret
|
|
1889
|
+
# @param [String] oauth2_client_id 'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app
|
|
1890
|
+
# @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83
|
|
1754
1891
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1755
1892
|
#
|
|
1756
1893
|
# @return [OAuth2Tradeshift]
|
|
1757
|
-
def update_o_auth2_tradeshift(
|
|
1894
|
+
def update_o_auth2_tradeshift(
|
|
1895
|
+
oauth2_client_id: nil,
|
|
1896
|
+
oauth2_client_secret: nil,
|
|
1897
|
+
enabled: nil
|
|
1898
|
+
)
|
|
1758
1899
|
api_path = '/project/oauth2/tradeshift'
|
|
1759
1900
|
|
|
1760
1901
|
api_params = {
|
|
@@ -1762,7 +1903,7 @@ module Appwrite
|
|
|
1762
1903
|
oauth2ClientSecret: oauth2_client_secret,
|
|
1763
1904
|
enabled: enabled,
|
|
1764
1905
|
}
|
|
1765
|
-
|
|
1906
|
+
|
|
1766
1907
|
api_headers = {
|
|
1767
1908
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1768
1909
|
"content-type": 'application/json',
|
|
@@ -1776,17 +1917,20 @@ module Appwrite
|
|
|
1776
1917
|
params: api_params,
|
|
1777
1918
|
response_type: Models::OAuth2Tradeshift
|
|
1778
1919
|
)
|
|
1779
|
-
|
|
1780
1920
|
end
|
|
1781
1921
|
|
|
1782
1922
|
# Update the project OAuth2 Tradeshift Sandbox configuration.
|
|
1783
1923
|
#
|
|
1784
|
-
# @param [String] oauth2_client_id
|
|
1785
|
-
# @param [String] oauth2_client_secret
|
|
1924
|
+
# @param [String] oauth2_client_id 'OAuth2 Client ID' of Tradeshift Sandbox OAuth2 app. For example: appwrite-tes00000.0000000000est-app
|
|
1925
|
+
# @param [String] oauth2_client_secret 'OAuth2 Client Secret' of Tradeshift Sandbox OAuth2 app. For example: 7cb52700-0000-0000-0000-000000ca5b83
|
|
1786
1926
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1787
1927
|
#
|
|
1788
1928
|
# @return [OAuth2Tradeshift]
|
|
1789
|
-
def update_o_auth2_tradeshift_sandbox(
|
|
1929
|
+
def update_o_auth2_tradeshift_sandbox(
|
|
1930
|
+
oauth2_client_id: nil,
|
|
1931
|
+
oauth2_client_secret: nil,
|
|
1932
|
+
enabled: nil
|
|
1933
|
+
)
|
|
1790
1934
|
api_path = '/project/oauth2/tradeshiftBox'
|
|
1791
1935
|
|
|
1792
1936
|
api_params = {
|
|
@@ -1794,7 +1938,7 @@ module Appwrite
|
|
|
1794
1938
|
oauth2ClientSecret: oauth2_client_secret,
|
|
1795
1939
|
enabled: enabled,
|
|
1796
1940
|
}
|
|
1797
|
-
|
|
1941
|
+
|
|
1798
1942
|
api_headers = {
|
|
1799
1943
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1800
1944
|
"content-type": 'application/json',
|
|
@@ -1808,17 +1952,20 @@ module Appwrite
|
|
|
1808
1952
|
params: api_params,
|
|
1809
1953
|
response_type: Models::OAuth2Tradeshift
|
|
1810
1954
|
)
|
|
1811
|
-
|
|
1812
1955
|
end
|
|
1813
1956
|
|
|
1814
1957
|
# Update the project OAuth2 Twitch configuration.
|
|
1815
1958
|
#
|
|
1816
|
-
# @param [String] client_id
|
|
1817
|
-
# @param [String] client_secret
|
|
1959
|
+
# @param [String] client_id 'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p
|
|
1960
|
+
# @param [String] client_secret 'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v
|
|
1818
1961
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1819
1962
|
#
|
|
1820
1963
|
# @return [OAuth2Twitch]
|
|
1821
|
-
def update_o_auth2_twitch(
|
|
1964
|
+
def update_o_auth2_twitch(
|
|
1965
|
+
client_id: nil,
|
|
1966
|
+
client_secret: nil,
|
|
1967
|
+
enabled: nil
|
|
1968
|
+
)
|
|
1822
1969
|
api_path = '/project/oauth2/twitch'
|
|
1823
1970
|
|
|
1824
1971
|
api_params = {
|
|
@@ -1826,7 +1973,7 @@ module Appwrite
|
|
|
1826
1973
|
clientSecret: client_secret,
|
|
1827
1974
|
enabled: enabled,
|
|
1828
1975
|
}
|
|
1829
|
-
|
|
1976
|
+
|
|
1830
1977
|
api_headers = {
|
|
1831
1978
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1832
1979
|
"content-type": 'application/json',
|
|
@@ -1840,17 +1987,20 @@ module Appwrite
|
|
|
1840
1987
|
params: api_params,
|
|
1841
1988
|
response_type: Models::OAuth2Twitch
|
|
1842
1989
|
)
|
|
1843
|
-
|
|
1844
1990
|
end
|
|
1845
1991
|
|
|
1846
1992
|
# Update the project OAuth2 WordPress configuration.
|
|
1847
1993
|
#
|
|
1848
|
-
# @param [String] client_id
|
|
1849
|
-
# @param [String] client_secret
|
|
1994
|
+
# @param [String] client_id 'Client ID' of WordPress OAuth2 app. For example: 130005
|
|
1995
|
+
# @param [String] client_secret 'Client Secret' of WordPress OAuth2 app. For example: PlBfJS0000000000000000000000000000000000000000000000000000EdUZJk
|
|
1850
1996
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1851
1997
|
#
|
|
1852
1998
|
# @return [OAuth2WordPress]
|
|
1853
|
-
def update_o_auth2_word_press(
|
|
1999
|
+
def update_o_auth2_word_press(
|
|
2000
|
+
client_id: nil,
|
|
2001
|
+
client_secret: nil,
|
|
2002
|
+
enabled: nil
|
|
2003
|
+
)
|
|
1854
2004
|
api_path = '/project/oauth2/wordpress'
|
|
1855
2005
|
|
|
1856
2006
|
api_params = {
|
|
@@ -1858,7 +2008,7 @@ module Appwrite
|
|
|
1858
2008
|
clientSecret: client_secret,
|
|
1859
2009
|
enabled: enabled,
|
|
1860
2010
|
}
|
|
1861
|
-
|
|
2011
|
+
|
|
1862
2012
|
api_headers = {
|
|
1863
2013
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1864
2014
|
"content-type": 'application/json',
|
|
@@ -1872,17 +2022,20 @@ module Appwrite
|
|
|
1872
2022
|
params: api_params,
|
|
1873
2023
|
response_type: Models::OAuth2WordPress
|
|
1874
2024
|
)
|
|
1875
|
-
|
|
1876
2025
|
end
|
|
1877
2026
|
|
|
1878
2027
|
# Update the project OAuth2 X configuration.
|
|
1879
2028
|
#
|
|
1880
|
-
# @param [String] customer_key
|
|
1881
|
-
# @param [String] secret_key
|
|
2029
|
+
# @param [String] customer_key 'Customer Key' of X OAuth2 app. For example: slzZV0000000000000NFLaWT
|
|
2030
|
+
# @param [String] secret_key 'Secret Key' of X OAuth2 app. For example: tkEPkp00000000000000000000000000000000000000FTxbI9
|
|
1882
2031
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1883
2032
|
#
|
|
1884
2033
|
# @return [OAuth2X]
|
|
1885
|
-
def update_o_auth2_x(
|
|
2034
|
+
def update_o_auth2_x(
|
|
2035
|
+
customer_key: nil,
|
|
2036
|
+
secret_key: nil,
|
|
2037
|
+
enabled: nil
|
|
2038
|
+
)
|
|
1886
2039
|
api_path = '/project/oauth2/x'
|
|
1887
2040
|
|
|
1888
2041
|
api_params = {
|
|
@@ -1890,7 +2043,7 @@ module Appwrite
|
|
|
1890
2043
|
secretKey: secret_key,
|
|
1891
2044
|
enabled: enabled,
|
|
1892
2045
|
}
|
|
1893
|
-
|
|
2046
|
+
|
|
1894
2047
|
api_headers = {
|
|
1895
2048
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1896
2049
|
"content-type": 'application/json',
|
|
@@ -1904,17 +2057,20 @@ module Appwrite
|
|
|
1904
2057
|
params: api_params,
|
|
1905
2058
|
response_type: Models::OAuth2X
|
|
1906
2059
|
)
|
|
1907
|
-
|
|
1908
2060
|
end
|
|
1909
2061
|
|
|
1910
2062
|
# Update the project OAuth2 Yahoo configuration.
|
|
1911
2063
|
#
|
|
1912
|
-
# @param [String] client_id
|
|
1913
|
-
# @param [String] client_secret
|
|
2064
|
+
# @param [String] client_id 'Client ID, also known as Customer Key' of Yahoo OAuth2 app. For example: dj0yJm000000000000000000000000000000000000000000000000000000000000000000000000000000000000Z4PWRm
|
|
2065
|
+
# @param [String] client_secret 'Client Secret, also known as Customer Secret' of Yahoo OAuth2 app. For example: cf978f0000000000000000000000000000c5e2e9
|
|
1914
2066
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1915
2067
|
#
|
|
1916
2068
|
# @return [OAuth2Yahoo]
|
|
1917
|
-
def update_o_auth2_yahoo(
|
|
2069
|
+
def update_o_auth2_yahoo(
|
|
2070
|
+
client_id: nil,
|
|
2071
|
+
client_secret: nil,
|
|
2072
|
+
enabled: nil
|
|
2073
|
+
)
|
|
1918
2074
|
api_path = '/project/oauth2/yahoo'
|
|
1919
2075
|
|
|
1920
2076
|
api_params = {
|
|
@@ -1922,7 +2078,7 @@ module Appwrite
|
|
|
1922
2078
|
clientSecret: client_secret,
|
|
1923
2079
|
enabled: enabled,
|
|
1924
2080
|
}
|
|
1925
|
-
|
|
2081
|
+
|
|
1926
2082
|
api_headers = {
|
|
1927
2083
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1928
2084
|
"content-type": 'application/json',
|
|
@@ -1936,17 +2092,20 @@ module Appwrite
|
|
|
1936
2092
|
params: api_params,
|
|
1937
2093
|
response_type: Models::OAuth2Yahoo
|
|
1938
2094
|
)
|
|
1939
|
-
|
|
1940
2095
|
end
|
|
1941
2096
|
|
|
1942
2097
|
# Update the project OAuth2 Yandex configuration.
|
|
1943
2098
|
#
|
|
1944
|
-
# @param [String] client_id
|
|
1945
|
-
# @param [String] client_secret
|
|
2099
|
+
# @param [String] client_id 'Client ID' of Yandex OAuth2 app. For example: 6a8a6a0000000000000000000091483c
|
|
2100
|
+
# @param [String] client_secret 'Client Secret' of Yandex OAuth2 app. For example: bbf98500000000000000000000c75a63
|
|
1946
2101
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1947
2102
|
#
|
|
1948
2103
|
# @return [OAuth2Yandex]
|
|
1949
|
-
def update_o_auth2_yandex(
|
|
2104
|
+
def update_o_auth2_yandex(
|
|
2105
|
+
client_id: nil,
|
|
2106
|
+
client_secret: nil,
|
|
2107
|
+
enabled: nil
|
|
2108
|
+
)
|
|
1950
2109
|
api_path = '/project/oauth2/yandex'
|
|
1951
2110
|
|
|
1952
2111
|
api_params = {
|
|
@@ -1954,7 +2113,7 @@ module Appwrite
|
|
|
1954
2113
|
clientSecret: client_secret,
|
|
1955
2114
|
enabled: enabled,
|
|
1956
2115
|
}
|
|
1957
|
-
|
|
2116
|
+
|
|
1958
2117
|
api_headers = {
|
|
1959
2118
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1960
2119
|
"content-type": 'application/json',
|
|
@@ -1968,17 +2127,20 @@ module Appwrite
|
|
|
1968
2127
|
params: api_params,
|
|
1969
2128
|
response_type: Models::OAuth2Yandex
|
|
1970
2129
|
)
|
|
1971
|
-
|
|
1972
2130
|
end
|
|
1973
2131
|
|
|
1974
2132
|
# Update the project OAuth2 Zoho configuration.
|
|
1975
2133
|
#
|
|
1976
|
-
# @param [String] client_id
|
|
1977
|
-
# @param [String] client_secret
|
|
2134
|
+
# @param [String] client_id 'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B
|
|
2135
|
+
# @param [String] client_secret 'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e
|
|
1978
2136
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1979
2137
|
#
|
|
1980
2138
|
# @return [OAuth2Zoho]
|
|
1981
|
-
def update_o_auth2_zoho(
|
|
2139
|
+
def update_o_auth2_zoho(
|
|
2140
|
+
client_id: nil,
|
|
2141
|
+
client_secret: nil,
|
|
2142
|
+
enabled: nil
|
|
2143
|
+
)
|
|
1982
2144
|
api_path = '/project/oauth2/zoho'
|
|
1983
2145
|
|
|
1984
2146
|
api_params = {
|
|
@@ -1986,7 +2148,7 @@ module Appwrite
|
|
|
1986
2148
|
clientSecret: client_secret,
|
|
1987
2149
|
enabled: enabled,
|
|
1988
2150
|
}
|
|
1989
|
-
|
|
2151
|
+
|
|
1990
2152
|
api_headers = {
|
|
1991
2153
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1992
2154
|
"content-type": 'application/json',
|
|
@@ -2000,17 +2162,20 @@ module Appwrite
|
|
|
2000
2162
|
params: api_params,
|
|
2001
2163
|
response_type: Models::OAuth2Zoho
|
|
2002
2164
|
)
|
|
2003
|
-
|
|
2004
2165
|
end
|
|
2005
2166
|
|
|
2006
2167
|
# Update the project OAuth2 Zoom configuration.
|
|
2007
2168
|
#
|
|
2008
|
-
# @param [String] client_id
|
|
2009
|
-
# @param [String] client_secret
|
|
2169
|
+
# @param [String] client_id 'Client ID' of Zoom OAuth2 app. For example: QMAC00000000000000w0AQ
|
|
2170
|
+
# @param [String] client_secret 'Client Secret' of Zoom OAuth2 app. For example: GAWsG4000000000000000000007U01ON
|
|
2010
2171
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
2011
2172
|
#
|
|
2012
2173
|
# @return [OAuth2Zoom]
|
|
2013
|
-
def update_o_auth2_zoom(
|
|
2174
|
+
def update_o_auth2_zoom(
|
|
2175
|
+
client_id: nil,
|
|
2176
|
+
client_secret: nil,
|
|
2177
|
+
enabled: nil
|
|
2178
|
+
)
|
|
2014
2179
|
api_path = '/project/oauth2/zoom'
|
|
2015
2180
|
|
|
2016
2181
|
api_params = {
|
|
@@ -2018,7 +2183,7 @@ module Appwrite
|
|
|
2018
2183
|
clientSecret: client_secret,
|
|
2019
2184
|
enabled: enabled,
|
|
2020
2185
|
}
|
|
2021
|
-
|
|
2186
|
+
|
|
2022
2187
|
api_headers = {
|
|
2023
2188
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2024
2189
|
"content-type": 'application/json',
|
|
@@ -2032,7 +2197,6 @@ module Appwrite
|
|
|
2032
2197
|
params: api_params,
|
|
2033
2198
|
response_type: Models::OAuth2Zoom
|
|
2034
2199
|
)
|
|
2035
|
-
|
|
2036
2200
|
end
|
|
2037
2201
|
|
|
2038
2202
|
# Get a single OAuth2 provider configuration. Credential fields (client
|
|
@@ -2040,18 +2204,19 @@ module Appwrite
|
|
|
2040
2204
|
#
|
|
2041
2205
|
# @param [ProjectOAuthProviderId] provider_id OAuth2 provider key. For example: github, google, apple.
|
|
2042
2206
|
#
|
|
2043
|
-
# @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft]
|
|
2044
|
-
def get_o_auth2_provider(
|
|
2207
|
+
# @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Twitch, OAuth2Stripe, OAuth2Spotify, OAuth2Slack, OAuth2Podio, OAuth2Notion, OAuth2Salesforce, OAuth2Yahoo, OAuth2HuggingFace, OAuth2Linkedin, OAuth2Disqus, OAuth2Amazon, OAuth2Etsy, OAuth2Facebook, OAuth2Tradeshift, OAuth2Paypal, OAuth2Gitlab, OAuth2Authentik, OAuth2Auth0, OAuth2FusionAuth, OAuth2Keycloak, OAuth2Oidc, OAuth2Apple, OAuth2Okta, OAuth2Kick, OAuth2Microsoft]
|
|
2208
|
+
def get_o_auth2_provider(
|
|
2209
|
+
provider_id:
|
|
2210
|
+
)
|
|
2045
2211
|
api_path = '/project/oauth2/{providerId}'
|
|
2046
2212
|
.gsub('{providerId}', provider_id)
|
|
2047
2213
|
|
|
2048
2214
|
if provider_id.nil?
|
|
2049
|
-
|
|
2215
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
2050
2216
|
end
|
|
2051
2217
|
|
|
2052
|
-
api_params = {
|
|
2053
|
-
|
|
2054
|
-
|
|
2218
|
+
api_params = {}
|
|
2219
|
+
|
|
2055
2220
|
api_headers = {
|
|
2056
2221
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2057
2222
|
"accept": 'application/json',
|
|
@@ -2183,6 +2348,11 @@ module Appwrite
|
|
|
2183
2348
|
return Models::OAuth2Yahoo.from(map: response)
|
|
2184
2349
|
end
|
|
2185
2350
|
|
|
2351
|
+
if response['$id'] == 'huggingface'
|
|
2352
|
+
|
|
2353
|
+
return Models::OAuth2HuggingFace.from(map: response)
|
|
2354
|
+
end
|
|
2355
|
+
|
|
2186
2356
|
if response['$id'] == 'linkedin'
|
|
2187
2357
|
|
|
2188
2358
|
return Models::OAuth2Linkedin.from(map: response)
|
|
@@ -2269,7 +2439,6 @@ module Appwrite
|
|
|
2269
2439
|
end
|
|
2270
2440
|
|
|
2271
2441
|
raise Exception, "Unable to match response to any expected response model"
|
|
2272
|
-
|
|
2273
2442
|
end
|
|
2274
2443
|
|
|
2275
2444
|
# Get a list of all platforms in the project. This endpoint returns an array
|
|
@@ -2279,14 +2448,17 @@ module Appwrite
|
|
|
2279
2448
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2280
2449
|
#
|
|
2281
2450
|
# @return [PlatformList]
|
|
2282
|
-
def list_platforms(
|
|
2451
|
+
def list_platforms(
|
|
2452
|
+
queries: nil,
|
|
2453
|
+
total: nil
|
|
2454
|
+
)
|
|
2283
2455
|
api_path = '/project/platforms'
|
|
2284
2456
|
|
|
2285
2457
|
api_params = {
|
|
2286
2458
|
queries: queries,
|
|
2287
2459
|
total: total,
|
|
2288
2460
|
}
|
|
2289
|
-
|
|
2461
|
+
|
|
2290
2462
|
api_headers = {
|
|
2291
2463
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2292
2464
|
"accept": 'application/json',
|
|
@@ -2299,31 +2471,34 @@ module Appwrite
|
|
|
2299
2471
|
params: api_params,
|
|
2300
2472
|
response_type: Models::PlatformList
|
|
2301
2473
|
)
|
|
2302
|
-
|
|
2303
2474
|
end
|
|
2304
2475
|
|
|
2305
2476
|
# Create a new Android platform for your project. Use this endpoint to
|
|
2306
2477
|
# register a new Android platform where your users will run your application
|
|
2307
2478
|
# which will interact with the Appwrite API.
|
|
2308
2479
|
#
|
|
2309
|
-
# @param [String] platform_id Platform 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
|
|
2480
|
+
# @param [String] platform_id Platform 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.
|
|
2310
2481
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2311
2482
|
# @param [String] application_id Android application ID. Max length: 256 chars.
|
|
2312
2483
|
#
|
|
2313
2484
|
# @return [PlatformAndroid]
|
|
2314
|
-
def create_android_platform(
|
|
2485
|
+
def create_android_platform(
|
|
2486
|
+
platform_id:,
|
|
2487
|
+
name:,
|
|
2488
|
+
application_id:
|
|
2489
|
+
)
|
|
2315
2490
|
api_path = '/project/platforms/android'
|
|
2316
2491
|
|
|
2317
2492
|
if platform_id.nil?
|
|
2318
|
-
|
|
2493
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2319
2494
|
end
|
|
2320
2495
|
|
|
2321
2496
|
if name.nil?
|
|
2322
|
-
|
|
2497
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2323
2498
|
end
|
|
2324
2499
|
|
|
2325
2500
|
if application_id.nil?
|
|
2326
|
-
|
|
2501
|
+
raise Appwrite::Exception.new('Missing required parameter: "applicationId"')
|
|
2327
2502
|
end
|
|
2328
2503
|
|
|
2329
2504
|
api_params = {
|
|
@@ -2331,7 +2506,7 @@ module Appwrite
|
|
|
2331
2506
|
name: name,
|
|
2332
2507
|
applicationId: application_id,
|
|
2333
2508
|
}
|
|
2334
|
-
|
|
2509
|
+
|
|
2335
2510
|
api_headers = {
|
|
2336
2511
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2337
2512
|
"content-type": 'application/json',
|
|
@@ -2345,38 +2520,41 @@ module Appwrite
|
|
|
2345
2520
|
params: api_params,
|
|
2346
2521
|
response_type: Models::PlatformAndroid
|
|
2347
2522
|
)
|
|
2348
|
-
|
|
2349
2523
|
end
|
|
2350
2524
|
|
|
2351
2525
|
# Update an Android platform by its unique ID. Use this endpoint to update
|
|
2352
|
-
# the platform
|
|
2526
|
+
# the platform's name or application ID.
|
|
2353
2527
|
#
|
|
2354
2528
|
# @param [String] platform_id Platform ID.
|
|
2355
2529
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2356
2530
|
# @param [String] application_id Android application ID. Max length: 256 chars.
|
|
2357
2531
|
#
|
|
2358
2532
|
# @return [PlatformAndroid]
|
|
2359
|
-
def update_android_platform(
|
|
2533
|
+
def update_android_platform(
|
|
2534
|
+
platform_id:,
|
|
2535
|
+
name:,
|
|
2536
|
+
application_id:
|
|
2537
|
+
)
|
|
2360
2538
|
api_path = '/project/platforms/android/{platformId}'
|
|
2361
2539
|
.gsub('{platformId}', platform_id)
|
|
2362
2540
|
|
|
2363
2541
|
if platform_id.nil?
|
|
2364
|
-
|
|
2542
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2365
2543
|
end
|
|
2366
2544
|
|
|
2367
2545
|
if name.nil?
|
|
2368
|
-
|
|
2546
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2369
2547
|
end
|
|
2370
2548
|
|
|
2371
2549
|
if application_id.nil?
|
|
2372
|
-
|
|
2550
|
+
raise Appwrite::Exception.new('Missing required parameter: "applicationId"')
|
|
2373
2551
|
end
|
|
2374
2552
|
|
|
2375
2553
|
api_params = {
|
|
2376
2554
|
name: name,
|
|
2377
2555
|
applicationId: application_id,
|
|
2378
2556
|
}
|
|
2379
|
-
|
|
2557
|
+
|
|
2380
2558
|
api_headers = {
|
|
2381
2559
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2382
2560
|
"content-type": 'application/json',
|
|
@@ -2390,31 +2568,34 @@ module Appwrite
|
|
|
2390
2568
|
params: api_params,
|
|
2391
2569
|
response_type: Models::PlatformAndroid
|
|
2392
2570
|
)
|
|
2393
|
-
|
|
2394
2571
|
end
|
|
2395
2572
|
|
|
2396
2573
|
# Create a new Apple platform for your project. Use this endpoint to register
|
|
2397
2574
|
# a new Apple platform where your users will run your application which will
|
|
2398
2575
|
# interact with the Appwrite API.
|
|
2399
2576
|
#
|
|
2400
|
-
# @param [String] platform_id Platform 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
|
|
2577
|
+
# @param [String] platform_id Platform 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.
|
|
2401
2578
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2402
2579
|
# @param [String] bundle_identifier Apple bundle identifier. Max length: 256 chars.
|
|
2403
2580
|
#
|
|
2404
2581
|
# @return [PlatformApple]
|
|
2405
|
-
def create_apple_platform(
|
|
2582
|
+
def create_apple_platform(
|
|
2583
|
+
platform_id:,
|
|
2584
|
+
name:,
|
|
2585
|
+
bundle_identifier:
|
|
2586
|
+
)
|
|
2406
2587
|
api_path = '/project/platforms/apple'
|
|
2407
2588
|
|
|
2408
2589
|
if platform_id.nil?
|
|
2409
|
-
|
|
2590
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2410
2591
|
end
|
|
2411
2592
|
|
|
2412
2593
|
if name.nil?
|
|
2413
|
-
|
|
2594
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2414
2595
|
end
|
|
2415
2596
|
|
|
2416
2597
|
if bundle_identifier.nil?
|
|
2417
|
-
|
|
2598
|
+
raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"')
|
|
2418
2599
|
end
|
|
2419
2600
|
|
|
2420
2601
|
api_params = {
|
|
@@ -2422,7 +2603,7 @@ module Appwrite
|
|
|
2422
2603
|
name: name,
|
|
2423
2604
|
bundleIdentifier: bundle_identifier,
|
|
2424
2605
|
}
|
|
2425
|
-
|
|
2606
|
+
|
|
2426
2607
|
api_headers = {
|
|
2427
2608
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2428
2609
|
"content-type": 'application/json',
|
|
@@ -2436,38 +2617,41 @@ module Appwrite
|
|
|
2436
2617
|
params: api_params,
|
|
2437
2618
|
response_type: Models::PlatformApple
|
|
2438
2619
|
)
|
|
2439
|
-
|
|
2440
2620
|
end
|
|
2441
2621
|
|
|
2442
2622
|
# Update an Apple platform by its unique ID. Use this endpoint to update the
|
|
2443
|
-
# platform
|
|
2623
|
+
# platform's name or bundle identifier.
|
|
2444
2624
|
#
|
|
2445
2625
|
# @param [String] platform_id Platform ID.
|
|
2446
2626
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2447
2627
|
# @param [String] bundle_identifier Apple bundle identifier. Max length: 256 chars.
|
|
2448
2628
|
#
|
|
2449
2629
|
# @return [PlatformApple]
|
|
2450
|
-
def update_apple_platform(
|
|
2630
|
+
def update_apple_platform(
|
|
2631
|
+
platform_id:,
|
|
2632
|
+
name:,
|
|
2633
|
+
bundle_identifier:
|
|
2634
|
+
)
|
|
2451
2635
|
api_path = '/project/platforms/apple/{platformId}'
|
|
2452
2636
|
.gsub('{platformId}', platform_id)
|
|
2453
2637
|
|
|
2454
2638
|
if platform_id.nil?
|
|
2455
|
-
|
|
2639
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2456
2640
|
end
|
|
2457
2641
|
|
|
2458
2642
|
if name.nil?
|
|
2459
|
-
|
|
2643
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2460
2644
|
end
|
|
2461
2645
|
|
|
2462
2646
|
if bundle_identifier.nil?
|
|
2463
|
-
|
|
2647
|
+
raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"')
|
|
2464
2648
|
end
|
|
2465
2649
|
|
|
2466
2650
|
api_params = {
|
|
2467
2651
|
name: name,
|
|
2468
2652
|
bundleIdentifier: bundle_identifier,
|
|
2469
2653
|
}
|
|
2470
|
-
|
|
2654
|
+
|
|
2471
2655
|
api_headers = {
|
|
2472
2656
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2473
2657
|
"content-type": 'application/json',
|
|
@@ -2481,31 +2665,34 @@ module Appwrite
|
|
|
2481
2665
|
params: api_params,
|
|
2482
2666
|
response_type: Models::PlatformApple
|
|
2483
2667
|
)
|
|
2484
|
-
|
|
2485
2668
|
end
|
|
2486
2669
|
|
|
2487
2670
|
# Create a new Linux platform for your project. Use this endpoint to register
|
|
2488
2671
|
# a new Linux platform where your users will run your application which will
|
|
2489
2672
|
# interact with the Appwrite API.
|
|
2490
2673
|
#
|
|
2491
|
-
# @param [String] platform_id Platform 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
|
|
2674
|
+
# @param [String] platform_id Platform 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.
|
|
2492
2675
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2493
2676
|
# @param [String] package_name Linux package name. Max length: 256 chars.
|
|
2494
2677
|
#
|
|
2495
2678
|
# @return [PlatformLinux]
|
|
2496
|
-
def create_linux_platform(
|
|
2679
|
+
def create_linux_platform(
|
|
2680
|
+
platform_id:,
|
|
2681
|
+
name:,
|
|
2682
|
+
package_name:
|
|
2683
|
+
)
|
|
2497
2684
|
api_path = '/project/platforms/linux'
|
|
2498
2685
|
|
|
2499
2686
|
if platform_id.nil?
|
|
2500
|
-
|
|
2687
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2501
2688
|
end
|
|
2502
2689
|
|
|
2503
2690
|
if name.nil?
|
|
2504
|
-
|
|
2691
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2505
2692
|
end
|
|
2506
2693
|
|
|
2507
2694
|
if package_name.nil?
|
|
2508
|
-
|
|
2695
|
+
raise Appwrite::Exception.new('Missing required parameter: "packageName"')
|
|
2509
2696
|
end
|
|
2510
2697
|
|
|
2511
2698
|
api_params = {
|
|
@@ -2513,7 +2700,7 @@ module Appwrite
|
|
|
2513
2700
|
name: name,
|
|
2514
2701
|
packageName: package_name,
|
|
2515
2702
|
}
|
|
2516
|
-
|
|
2703
|
+
|
|
2517
2704
|
api_headers = {
|
|
2518
2705
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2519
2706
|
"content-type": 'application/json',
|
|
@@ -2527,38 +2714,41 @@ module Appwrite
|
|
|
2527
2714
|
params: api_params,
|
|
2528
2715
|
response_type: Models::PlatformLinux
|
|
2529
2716
|
)
|
|
2530
|
-
|
|
2531
2717
|
end
|
|
2532
2718
|
|
|
2533
2719
|
# Update a Linux platform by its unique ID. Use this endpoint to update the
|
|
2534
|
-
# platform
|
|
2720
|
+
# platform's name or package name.
|
|
2535
2721
|
#
|
|
2536
2722
|
# @param [String] platform_id Platform ID.
|
|
2537
2723
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2538
2724
|
# @param [String] package_name Linux package name. Max length: 256 chars.
|
|
2539
2725
|
#
|
|
2540
2726
|
# @return [PlatformLinux]
|
|
2541
|
-
def update_linux_platform(
|
|
2727
|
+
def update_linux_platform(
|
|
2728
|
+
platform_id:,
|
|
2729
|
+
name:,
|
|
2730
|
+
package_name:
|
|
2731
|
+
)
|
|
2542
2732
|
api_path = '/project/platforms/linux/{platformId}'
|
|
2543
2733
|
.gsub('{platformId}', platform_id)
|
|
2544
2734
|
|
|
2545
2735
|
if platform_id.nil?
|
|
2546
|
-
|
|
2736
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2547
2737
|
end
|
|
2548
2738
|
|
|
2549
2739
|
if name.nil?
|
|
2550
|
-
|
|
2740
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2551
2741
|
end
|
|
2552
2742
|
|
|
2553
2743
|
if package_name.nil?
|
|
2554
|
-
|
|
2744
|
+
raise Appwrite::Exception.new('Missing required parameter: "packageName"')
|
|
2555
2745
|
end
|
|
2556
2746
|
|
|
2557
2747
|
api_params = {
|
|
2558
2748
|
name: name,
|
|
2559
2749
|
packageName: package_name,
|
|
2560
2750
|
}
|
|
2561
|
-
|
|
2751
|
+
|
|
2562
2752
|
api_headers = {
|
|
2563
2753
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2564
2754
|
"content-type": 'application/json',
|
|
@@ -2572,31 +2762,34 @@ module Appwrite
|
|
|
2572
2762
|
params: api_params,
|
|
2573
2763
|
response_type: Models::PlatformLinux
|
|
2574
2764
|
)
|
|
2575
|
-
|
|
2576
2765
|
end
|
|
2577
2766
|
|
|
2578
2767
|
# Create a new web platform for your project. Use this endpoint to register a
|
|
2579
2768
|
# new platform where your users will run your application which will interact
|
|
2580
2769
|
# with the Appwrite API.
|
|
2581
2770
|
#
|
|
2582
|
-
# @param [String] platform_id Platform 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
|
|
2771
|
+
# @param [String] platform_id Platform 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.
|
|
2583
2772
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2584
2773
|
# @param [String] hostname Platform web hostname. Max length: 256 chars.
|
|
2585
2774
|
#
|
|
2586
2775
|
# @return [PlatformWeb]
|
|
2587
|
-
def create_web_platform(
|
|
2776
|
+
def create_web_platform(
|
|
2777
|
+
platform_id:,
|
|
2778
|
+
name:,
|
|
2779
|
+
hostname:
|
|
2780
|
+
)
|
|
2588
2781
|
api_path = '/project/platforms/web'
|
|
2589
2782
|
|
|
2590
2783
|
if platform_id.nil?
|
|
2591
|
-
|
|
2784
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2592
2785
|
end
|
|
2593
2786
|
|
|
2594
2787
|
if name.nil?
|
|
2595
|
-
|
|
2788
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2596
2789
|
end
|
|
2597
2790
|
|
|
2598
2791
|
if hostname.nil?
|
|
2599
|
-
|
|
2792
|
+
raise Appwrite::Exception.new('Missing required parameter: "hostname"')
|
|
2600
2793
|
end
|
|
2601
2794
|
|
|
2602
2795
|
api_params = {
|
|
@@ -2604,7 +2797,7 @@ module Appwrite
|
|
|
2604
2797
|
name: name,
|
|
2605
2798
|
hostname: hostname,
|
|
2606
2799
|
}
|
|
2607
|
-
|
|
2800
|
+
|
|
2608
2801
|
api_headers = {
|
|
2609
2802
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2610
2803
|
"content-type": 'application/json',
|
|
@@ -2618,38 +2811,41 @@ module Appwrite
|
|
|
2618
2811
|
params: api_params,
|
|
2619
2812
|
response_type: Models::PlatformWeb
|
|
2620
2813
|
)
|
|
2621
|
-
|
|
2622
2814
|
end
|
|
2623
2815
|
|
|
2624
2816
|
# Update a web platform by its unique ID. Use this endpoint to update the
|
|
2625
|
-
# platform
|
|
2817
|
+
# platform's name or hostname.
|
|
2626
2818
|
#
|
|
2627
2819
|
# @param [String] platform_id Platform ID.
|
|
2628
2820
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2629
2821
|
# @param [String] hostname Platform web hostname. Max length: 256 chars.
|
|
2630
2822
|
#
|
|
2631
2823
|
# @return [PlatformWeb]
|
|
2632
|
-
def update_web_platform(
|
|
2824
|
+
def update_web_platform(
|
|
2825
|
+
platform_id:,
|
|
2826
|
+
name:,
|
|
2827
|
+
hostname:
|
|
2828
|
+
)
|
|
2633
2829
|
api_path = '/project/platforms/web/{platformId}'
|
|
2634
2830
|
.gsub('{platformId}', platform_id)
|
|
2635
2831
|
|
|
2636
2832
|
if platform_id.nil?
|
|
2637
|
-
|
|
2833
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2638
2834
|
end
|
|
2639
2835
|
|
|
2640
2836
|
if name.nil?
|
|
2641
|
-
|
|
2837
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2642
2838
|
end
|
|
2643
2839
|
|
|
2644
2840
|
if hostname.nil?
|
|
2645
|
-
|
|
2841
|
+
raise Appwrite::Exception.new('Missing required parameter: "hostname"')
|
|
2646
2842
|
end
|
|
2647
2843
|
|
|
2648
2844
|
api_params = {
|
|
2649
2845
|
name: name,
|
|
2650
2846
|
hostname: hostname,
|
|
2651
2847
|
}
|
|
2652
|
-
|
|
2848
|
+
|
|
2653
2849
|
api_headers = {
|
|
2654
2850
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2655
2851
|
"content-type": 'application/json',
|
|
@@ -2663,31 +2859,34 @@ module Appwrite
|
|
|
2663
2859
|
params: api_params,
|
|
2664
2860
|
response_type: Models::PlatformWeb
|
|
2665
2861
|
)
|
|
2666
|
-
|
|
2667
2862
|
end
|
|
2668
2863
|
|
|
2669
2864
|
# Create a new Windows platform for your project. Use this endpoint to
|
|
2670
2865
|
# register a new Windows platform where your users will run your application
|
|
2671
2866
|
# which will interact with the Appwrite API.
|
|
2672
2867
|
#
|
|
2673
|
-
# @param [String] platform_id Platform 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
|
|
2868
|
+
# @param [String] platform_id Platform 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.
|
|
2674
2869
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2675
2870
|
# @param [String] package_identifier_name Windows package identifier name. Max length: 256 chars.
|
|
2676
2871
|
#
|
|
2677
2872
|
# @return [PlatformWindows]
|
|
2678
|
-
def create_windows_platform(
|
|
2873
|
+
def create_windows_platform(
|
|
2874
|
+
platform_id:,
|
|
2875
|
+
name:,
|
|
2876
|
+
package_identifier_name:
|
|
2877
|
+
)
|
|
2679
2878
|
api_path = '/project/platforms/windows'
|
|
2680
2879
|
|
|
2681
2880
|
if platform_id.nil?
|
|
2682
|
-
|
|
2881
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2683
2882
|
end
|
|
2684
2883
|
|
|
2685
2884
|
if name.nil?
|
|
2686
|
-
|
|
2885
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2687
2886
|
end
|
|
2688
2887
|
|
|
2689
2888
|
if package_identifier_name.nil?
|
|
2690
|
-
|
|
2889
|
+
raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"')
|
|
2691
2890
|
end
|
|
2692
2891
|
|
|
2693
2892
|
api_params = {
|
|
@@ -2695,7 +2894,7 @@ module Appwrite
|
|
|
2695
2894
|
name: name,
|
|
2696
2895
|
packageIdentifierName: package_identifier_name,
|
|
2697
2896
|
}
|
|
2698
|
-
|
|
2897
|
+
|
|
2699
2898
|
api_headers = {
|
|
2700
2899
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2701
2900
|
"content-type": 'application/json',
|
|
@@ -2709,38 +2908,41 @@ module Appwrite
|
|
|
2709
2908
|
params: api_params,
|
|
2710
2909
|
response_type: Models::PlatformWindows
|
|
2711
2910
|
)
|
|
2712
|
-
|
|
2713
2911
|
end
|
|
2714
2912
|
|
|
2715
2913
|
# Update a Windows platform by its unique ID. Use this endpoint to update the
|
|
2716
|
-
# platform
|
|
2914
|
+
# platform's name or package identifier name.
|
|
2717
2915
|
#
|
|
2718
2916
|
# @param [String] platform_id Platform ID.
|
|
2719
2917
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2720
2918
|
# @param [String] package_identifier_name Windows package identifier name. Max length: 256 chars.
|
|
2721
2919
|
#
|
|
2722
2920
|
# @return [PlatformWindows]
|
|
2723
|
-
def update_windows_platform(
|
|
2921
|
+
def update_windows_platform(
|
|
2922
|
+
platform_id:,
|
|
2923
|
+
name:,
|
|
2924
|
+
package_identifier_name:
|
|
2925
|
+
)
|
|
2724
2926
|
api_path = '/project/platforms/windows/{platformId}'
|
|
2725
2927
|
.gsub('{platformId}', platform_id)
|
|
2726
2928
|
|
|
2727
2929
|
if platform_id.nil?
|
|
2728
|
-
|
|
2930
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2729
2931
|
end
|
|
2730
2932
|
|
|
2731
2933
|
if name.nil?
|
|
2732
|
-
|
|
2934
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
2733
2935
|
end
|
|
2734
2936
|
|
|
2735
2937
|
if package_identifier_name.nil?
|
|
2736
|
-
|
|
2938
|
+
raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"')
|
|
2737
2939
|
end
|
|
2738
2940
|
|
|
2739
2941
|
api_params = {
|
|
2740
2942
|
name: name,
|
|
2741
2943
|
packageIdentifierName: package_identifier_name,
|
|
2742
2944
|
}
|
|
2743
|
-
|
|
2945
|
+
|
|
2744
2946
|
api_headers = {
|
|
2745
2947
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2746
2948
|
"content-type": 'application/json',
|
|
@@ -2754,26 +2956,26 @@ module Appwrite
|
|
|
2754
2956
|
params: api_params,
|
|
2755
2957
|
response_type: Models::PlatformWindows
|
|
2756
2958
|
)
|
|
2757
|
-
|
|
2758
2959
|
end
|
|
2759
2960
|
|
|
2760
|
-
# Get a platform by its unique ID. This endpoint returns the platform
|
|
2961
|
+
# Get a platform by its unique ID. This endpoint returns the platform's
|
|
2761
2962
|
# details, including its name, type, and key configurations.
|
|
2762
2963
|
#
|
|
2763
2964
|
# @param [String] platform_id Platform ID.
|
|
2764
2965
|
#
|
|
2765
2966
|
# @return [PlatformWeb, PlatformApple, PlatformAndroid, PlatformWindows, PlatformLinux]
|
|
2766
|
-
def get_platform(
|
|
2967
|
+
def get_platform(
|
|
2968
|
+
platform_id:
|
|
2969
|
+
)
|
|
2767
2970
|
api_path = '/project/platforms/{platformId}'
|
|
2768
2971
|
.gsub('{platformId}', platform_id)
|
|
2769
2972
|
|
|
2770
2973
|
if platform_id.nil?
|
|
2771
|
-
|
|
2974
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2772
2975
|
end
|
|
2773
2976
|
|
|
2774
|
-
api_params = {
|
|
2775
|
-
|
|
2776
|
-
|
|
2977
|
+
api_params = {}
|
|
2978
|
+
|
|
2777
2979
|
api_headers = {
|
|
2778
2980
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2779
2981
|
"accept": 'application/json',
|
|
@@ -2816,7 +3018,6 @@ module Appwrite
|
|
|
2816
3018
|
end
|
|
2817
3019
|
|
|
2818
3020
|
raise Exception, "Unable to match response to any expected response model"
|
|
2819
|
-
|
|
2820
3021
|
end
|
|
2821
3022
|
|
|
2822
3023
|
# Delete a platform by its unique ID. This endpoint removes the platform and
|
|
@@ -2825,17 +3026,18 @@ module Appwrite
|
|
|
2825
3026
|
# @param [String] platform_id Platform ID.
|
|
2826
3027
|
#
|
|
2827
3028
|
# @return []
|
|
2828
|
-
def delete_platform(
|
|
3029
|
+
def delete_platform(
|
|
3030
|
+
platform_id:
|
|
3031
|
+
)
|
|
2829
3032
|
api_path = '/project/platforms/{platformId}'
|
|
2830
3033
|
.gsub('{platformId}', platform_id)
|
|
2831
3034
|
|
|
2832
3035
|
if platform_id.nil?
|
|
2833
|
-
|
|
3036
|
+
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2834
3037
|
end
|
|
2835
3038
|
|
|
2836
|
-
api_params = {
|
|
2837
|
-
|
|
2838
|
-
|
|
3039
|
+
api_params = {}
|
|
3040
|
+
|
|
2839
3041
|
api_headers = {
|
|
2840
3042
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2841
3043
|
"content-type": 'application/json',
|
|
@@ -2847,7 +3049,6 @@ module Appwrite
|
|
|
2847
3049
|
headers: api_headers,
|
|
2848
3050
|
params: api_params,
|
|
2849
3051
|
)
|
|
2850
|
-
|
|
2851
3052
|
end
|
|
2852
3053
|
|
|
2853
3054
|
# Get a list of all project policies and their current configuration.
|
|
@@ -2856,14 +3057,17 @@ module Appwrite
|
|
|
2856
3057
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2857
3058
|
#
|
|
2858
3059
|
# @return [PolicyList]
|
|
2859
|
-
def list_policies(
|
|
3060
|
+
def list_policies(
|
|
3061
|
+
queries: nil,
|
|
3062
|
+
total: nil
|
|
3063
|
+
)
|
|
2860
3064
|
api_path = '/project/policies'
|
|
2861
3065
|
|
|
2862
3066
|
api_params = {
|
|
2863
3067
|
queries: queries,
|
|
2864
3068
|
total: total,
|
|
2865
3069
|
}
|
|
2866
|
-
|
|
3070
|
+
|
|
2867
3071
|
api_headers = {
|
|
2868
3072
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2869
3073
|
"accept": 'application/json',
|
|
@@ -2876,7 +3080,6 @@ module Appwrite
|
|
|
2876
3080
|
params: api_params,
|
|
2877
3081
|
response_type: Models::PolicyList
|
|
2878
3082
|
)
|
|
2879
|
-
|
|
2880
3083
|
end
|
|
2881
3084
|
|
|
2882
3085
|
# Configures if aliased emails such as subaddresses and emails with suffixes
|
|
@@ -2885,17 +3088,19 @@ module Appwrite
|
|
|
2885
3088
|
# @param [] enabled Set whether or not to block aliased emails during signup and email updates.
|
|
2886
3089
|
#
|
|
2887
3090
|
# @return [Project]
|
|
2888
|
-
def update_deny_aliased_email_policy(
|
|
3091
|
+
def update_deny_aliased_email_policy(
|
|
3092
|
+
enabled:
|
|
3093
|
+
)
|
|
2889
3094
|
api_path = '/project/policies/deny-aliased-email'
|
|
2890
3095
|
|
|
2891
3096
|
if enabled.nil?
|
|
2892
|
-
|
|
3097
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
2893
3098
|
end
|
|
2894
3099
|
|
|
2895
3100
|
api_params = {
|
|
2896
3101
|
enabled: enabled,
|
|
2897
3102
|
}
|
|
2898
|
-
|
|
3103
|
+
|
|
2899
3104
|
api_headers = {
|
|
2900
3105
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2901
3106
|
"content-type": 'application/json',
|
|
@@ -2909,7 +3114,6 @@ module Appwrite
|
|
|
2909
3114
|
params: api_params,
|
|
2910
3115
|
response_type: Models::Project
|
|
2911
3116
|
)
|
|
2912
|
-
|
|
2913
3117
|
end
|
|
2914
3118
|
|
|
2915
3119
|
# Configures if only corporate email addresses (non-free and non-disposable
|
|
@@ -2918,17 +3122,19 @@ module Appwrite
|
|
|
2918
3122
|
# @param [] enabled Set whether or not to restrict sign-ups and email updates to corporate email addresses only.
|
|
2919
3123
|
#
|
|
2920
3124
|
# @return [Project]
|
|
2921
|
-
def update_deny_corporate_email_policy(
|
|
3125
|
+
def update_deny_corporate_email_policy(
|
|
3126
|
+
enabled:
|
|
3127
|
+
)
|
|
2922
3128
|
api_path = '/project/policies/deny-corporate-email'
|
|
2923
3129
|
|
|
2924
3130
|
if enabled.nil?
|
|
2925
|
-
|
|
3131
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
2926
3132
|
end
|
|
2927
3133
|
|
|
2928
3134
|
api_params = {
|
|
2929
3135
|
enabled: enabled,
|
|
2930
3136
|
}
|
|
2931
|
-
|
|
3137
|
+
|
|
2932
3138
|
api_headers = {
|
|
2933
3139
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2934
3140
|
"content-type": 'application/json',
|
|
@@ -2942,7 +3148,6 @@ module Appwrite
|
|
|
2942
3148
|
params: api_params,
|
|
2943
3149
|
response_type: Models::Project
|
|
2944
3150
|
)
|
|
2945
|
-
|
|
2946
3151
|
end
|
|
2947
3152
|
|
|
2948
3153
|
# Configures if disposable emails from known temporary domains are denied
|
|
@@ -2951,17 +3156,19 @@ module Appwrite
|
|
|
2951
3156
|
# @param [] enabled Set whether or not to block disposable email addresses during signup and email updates.
|
|
2952
3157
|
#
|
|
2953
3158
|
# @return [Project]
|
|
2954
|
-
def update_deny_disposable_email_policy(
|
|
3159
|
+
def update_deny_disposable_email_policy(
|
|
3160
|
+
enabled:
|
|
3161
|
+
)
|
|
2955
3162
|
api_path = '/project/policies/deny-disposable-email'
|
|
2956
3163
|
|
|
2957
3164
|
if enabled.nil?
|
|
2958
|
-
|
|
3165
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
2959
3166
|
end
|
|
2960
3167
|
|
|
2961
3168
|
api_params = {
|
|
2962
3169
|
enabled: enabled,
|
|
2963
3170
|
}
|
|
2964
|
-
|
|
3171
|
+
|
|
2965
3172
|
api_headers = {
|
|
2966
3173
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2967
3174
|
"content-type": 'application/json',
|
|
@@ -2975,7 +3182,6 @@ module Appwrite
|
|
|
2975
3182
|
params: api_params,
|
|
2976
3183
|
response_type: Models::Project
|
|
2977
3184
|
)
|
|
2978
|
-
|
|
2979
3185
|
end
|
|
2980
3186
|
|
|
2981
3187
|
# Configures if emails from free providers such as Gmail or Yahoo are denied
|
|
@@ -2984,17 +3190,19 @@ module Appwrite
|
|
|
2984
3190
|
# @param [] enabled Set whether or not to block free email addresses during signup and email updates.
|
|
2985
3191
|
#
|
|
2986
3192
|
# @return [Project]
|
|
2987
|
-
def update_deny_free_email_policy(
|
|
3193
|
+
def update_deny_free_email_policy(
|
|
3194
|
+
enabled:
|
|
3195
|
+
)
|
|
2988
3196
|
api_path = '/project/policies/deny-free-email'
|
|
2989
3197
|
|
|
2990
3198
|
if enabled.nil?
|
|
2991
|
-
|
|
3199
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
2992
3200
|
end
|
|
2993
3201
|
|
|
2994
3202
|
api_params = {
|
|
2995
3203
|
enabled: enabled,
|
|
2996
3204
|
}
|
|
2997
|
-
|
|
3205
|
+
|
|
2998
3206
|
api_headers = {
|
|
2999
3207
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3000
3208
|
"content-type": 'application/json',
|
|
@@ -3008,7 +3216,6 @@ module Appwrite
|
|
|
3008
3216
|
params: api_params,
|
|
3009
3217
|
response_type: Models::Project
|
|
3010
3218
|
)
|
|
3011
|
-
|
|
3012
3219
|
end
|
|
3013
3220
|
|
|
3014
3221
|
# Updating this policy allows you to control if team members can see other
|
|
@@ -3023,7 +3230,14 @@ module Appwrite
|
|
|
3023
3230
|
# @param [] user_accessed_at Set to true if you want make user last access time visible to all team members, or false to hide it.
|
|
3024
3231
|
#
|
|
3025
3232
|
# @return [Project]
|
|
3026
|
-
def update_membership_privacy_policy(
|
|
3233
|
+
def update_membership_privacy_policy(
|
|
3234
|
+
user_id: nil,
|
|
3235
|
+
user_email: nil,
|
|
3236
|
+
user_phone: nil,
|
|
3237
|
+
user_name: nil,
|
|
3238
|
+
user_mfa: nil,
|
|
3239
|
+
user_accessed_at: nil
|
|
3240
|
+
)
|
|
3027
3241
|
api_path = '/project/policies/membership-privacy'
|
|
3028
3242
|
|
|
3029
3243
|
api_params = {
|
|
@@ -3034,7 +3248,7 @@ module Appwrite
|
|
|
3034
3248
|
userMFA: user_mfa,
|
|
3035
3249
|
userAccessedAt: user_accessed_at,
|
|
3036
3250
|
}
|
|
3037
|
-
|
|
3251
|
+
|
|
3038
3252
|
api_headers = {
|
|
3039
3253
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3040
3254
|
"content-type": 'application/json',
|
|
@@ -3048,7 +3262,48 @@ module Appwrite
|
|
|
3048
3262
|
params: api_params,
|
|
3049
3263
|
response_type: Models::Project
|
|
3050
3264
|
)
|
|
3265
|
+
end
|
|
3266
|
+
|
|
3267
|
+
# Updating this policy allows you to control which factors users can use to
|
|
3268
|
+
# complete an MFA challenge. Disabled factors cannot be used to create a
|
|
3269
|
+
# challenge and are reported as unavailable when listing factors. The custom
|
|
3270
|
+
# factor is disabled by default; enable it to deliver challenge codes through
|
|
3271
|
+
# your own channel. Recovery codes always remain available as a fallback.
|
|
3272
|
+
#
|
|
3273
|
+
# @param [] totp Set to true to allow TOTP to complete an MFA challenge, or false to disable it.
|
|
3274
|
+
# @param [] email Set to true to allow email to complete an MFA challenge, or false to disable it.
|
|
3275
|
+
# @param [] phone Set to true to allow phone (SMS) to complete an MFA challenge, or false to disable it.
|
|
3276
|
+
# @param [] custom Set to true to allow the custom factor to complete an MFA challenge, or false to disable it.
|
|
3277
|
+
#
|
|
3278
|
+
# @return [Project]
|
|
3279
|
+
def update_mfa_factors_policy(
|
|
3280
|
+
totp: nil,
|
|
3281
|
+
email: nil,
|
|
3282
|
+
phone: nil,
|
|
3283
|
+
custom: nil
|
|
3284
|
+
)
|
|
3285
|
+
api_path = '/project/policies/mfa-factors'
|
|
3286
|
+
|
|
3287
|
+
api_params = {
|
|
3288
|
+
totp: totp,
|
|
3289
|
+
email: email,
|
|
3290
|
+
phone: phone,
|
|
3291
|
+
custom: custom,
|
|
3292
|
+
}
|
|
3293
|
+
|
|
3294
|
+
api_headers = {
|
|
3295
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
3296
|
+
"content-type": 'application/json',
|
|
3297
|
+
"accept": 'application/json',
|
|
3298
|
+
}
|
|
3051
3299
|
|
|
3300
|
+
@client.call(
|
|
3301
|
+
method: 'PATCH',
|
|
3302
|
+
path: api_path,
|
|
3303
|
+
headers: api_headers,
|
|
3304
|
+
params: api_params,
|
|
3305
|
+
response_type: Models::Project
|
|
3306
|
+
)
|
|
3052
3307
|
end
|
|
3053
3308
|
|
|
3054
3309
|
# Updating this policy allows you to control if new passwords are checked
|
|
@@ -3058,17 +3313,19 @@ module Appwrite
|
|
|
3058
3313
|
# @param [] enabled Toggle password dictionary policy. Set to true if you want password change to block passwords in the dictionary, or false to allow them. When changing this policy, existing passwords remain valid.
|
|
3059
3314
|
#
|
|
3060
3315
|
# @return [Project]
|
|
3061
|
-
def update_password_dictionary_policy(
|
|
3316
|
+
def update_password_dictionary_policy(
|
|
3317
|
+
enabled:
|
|
3318
|
+
)
|
|
3062
3319
|
api_path = '/project/policies/password-dictionary'
|
|
3063
3320
|
|
|
3064
3321
|
if enabled.nil?
|
|
3065
|
-
|
|
3322
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3066
3323
|
end
|
|
3067
3324
|
|
|
3068
3325
|
api_params = {
|
|
3069
3326
|
enabled: enabled,
|
|
3070
3327
|
}
|
|
3071
|
-
|
|
3328
|
+
|
|
3072
3329
|
api_headers = {
|
|
3073
3330
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3074
3331
|
"content-type": 'application/json',
|
|
@@ -3082,33 +3339,34 @@ module Appwrite
|
|
|
3082
3339
|
params: api_params,
|
|
3083
3340
|
response_type: Models::Project
|
|
3084
3341
|
)
|
|
3085
|
-
|
|
3086
3342
|
end
|
|
3087
3343
|
|
|
3088
3344
|
# Updates one of password strength policies. Based on total length
|
|
3089
3345
|
# configured, previous password hashes are stored, and users cannot choose a
|
|
3090
3346
|
# new password that is already stored in the passwird history list, when
|
|
3091
3347
|
# updating an user password, or setting new one through password recovery.
|
|
3092
|
-
#
|
|
3348
|
+
#
|
|
3093
3349
|
# Keep in mind, while password history policy is disabled, the history is not
|
|
3094
3350
|
# being stored. Enabling the policy will not have any history on existing
|
|
3095
3351
|
# users, and it will only start to collect and enforce the policy on password
|
|
3096
3352
|
# changes since the policy is enabled.
|
|
3097
3353
|
#
|
|
3098
|
-
# @param [Integer] total Set the password history length per user. Value can be between 1 and
|
|
3354
|
+
# @param [Integer] total Set the password history length per user. Value can be between 1 and 20, or null to disable the limit.
|
|
3099
3355
|
#
|
|
3100
3356
|
# @return [Project]
|
|
3101
|
-
def update_password_history_policy(
|
|
3357
|
+
def update_password_history_policy(
|
|
3358
|
+
total:
|
|
3359
|
+
)
|
|
3102
3360
|
api_path = '/project/policies/password-history'
|
|
3103
3361
|
|
|
3104
3362
|
if total.nil?
|
|
3105
|
-
|
|
3363
|
+
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3106
3364
|
end
|
|
3107
3365
|
|
|
3108
3366
|
api_params = {
|
|
3109
3367
|
total: total,
|
|
3110
3368
|
}
|
|
3111
|
-
|
|
3369
|
+
|
|
3112
3370
|
api_headers = {
|
|
3113
3371
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3114
3372
|
"content-type": 'application/json',
|
|
@@ -3122,7 +3380,6 @@ module Appwrite
|
|
|
3122
3380
|
params: api_params,
|
|
3123
3381
|
response_type: Models::Project
|
|
3124
3382
|
)
|
|
3125
|
-
|
|
3126
3383
|
end
|
|
3127
3384
|
|
|
3128
3385
|
# Updating this policy allows you to control if password strength is checked
|
|
@@ -3130,20 +3387,22 @@ module Appwrite
|
|
|
3130
3387
|
# password, the password must not contain user ID, name, email or phone
|
|
3131
3388
|
# number.
|
|
3132
3389
|
#
|
|
3133
|
-
# @param [] enabled Toggle password personal data policy. Set to true if you want to block passwords including user
|
|
3390
|
+
# @param [] enabled Toggle password personal data policy. Set to true if you want to block passwords including user's personal data, or false to allow it. When changing this policy, existing passwords remain valid.
|
|
3134
3391
|
#
|
|
3135
3392
|
# @return [Project]
|
|
3136
|
-
def update_password_personal_data_policy(
|
|
3393
|
+
def update_password_personal_data_policy(
|
|
3394
|
+
enabled:
|
|
3395
|
+
)
|
|
3137
3396
|
api_path = '/project/policies/password-personal-data'
|
|
3138
3397
|
|
|
3139
3398
|
if enabled.nil?
|
|
3140
|
-
|
|
3399
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3141
3400
|
end
|
|
3142
3401
|
|
|
3143
3402
|
api_params = {
|
|
3144
3403
|
enabled: enabled,
|
|
3145
3404
|
}
|
|
3146
|
-
|
|
3405
|
+
|
|
3147
3406
|
api_headers = {
|
|
3148
3407
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3149
3408
|
"content-type": 'application/json',
|
|
@@ -3157,7 +3416,6 @@ module Appwrite
|
|
|
3157
3416
|
params: api_params,
|
|
3158
3417
|
response_type: Models::Project
|
|
3159
3418
|
)
|
|
3160
|
-
|
|
3161
3419
|
end
|
|
3162
3420
|
|
|
3163
3421
|
# Update the password strength requirements for users in the project.
|
|
@@ -3169,7 +3427,13 @@ module Appwrite
|
|
|
3169
3427
|
# @param [] symbols Whether passwords must include at least one symbol.
|
|
3170
3428
|
#
|
|
3171
3429
|
# @return [PolicyPasswordStrength]
|
|
3172
|
-
def update_password_strength_policy(
|
|
3430
|
+
def update_password_strength_policy(
|
|
3431
|
+
min: nil,
|
|
3432
|
+
uppercase: nil,
|
|
3433
|
+
lowercase: nil,
|
|
3434
|
+
number: nil,
|
|
3435
|
+
symbols: nil
|
|
3436
|
+
)
|
|
3173
3437
|
api_path = '/project/policies/password-strength'
|
|
3174
3438
|
|
|
3175
3439
|
api_params = {
|
|
@@ -3179,7 +3443,7 @@ module Appwrite
|
|
|
3179
3443
|
number: number,
|
|
3180
3444
|
symbols: symbols,
|
|
3181
3445
|
}
|
|
3182
|
-
|
|
3446
|
+
|
|
3183
3447
|
api_headers = {
|
|
3184
3448
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3185
3449
|
"content-type": 'application/json',
|
|
@@ -3193,7 +3457,6 @@ module Appwrite
|
|
|
3193
3457
|
params: api_params,
|
|
3194
3458
|
response_type: Models::PolicyPasswordStrength
|
|
3195
3459
|
)
|
|
3196
|
-
|
|
3197
3460
|
end
|
|
3198
3461
|
|
|
3199
3462
|
# Updating this policy allows you to control if email alert is sent upon
|
|
@@ -3205,17 +3468,19 @@ module Appwrite
|
|
|
3205
3468
|
# @param [] enabled Toggle session alert policy. Set to true if you want users to receive email notifications when a sessions are created for their users, or false to not send email alerts.
|
|
3206
3469
|
#
|
|
3207
3470
|
# @return [Project]
|
|
3208
|
-
def update_session_alert_policy(
|
|
3471
|
+
def update_session_alert_policy(
|
|
3472
|
+
enabled:
|
|
3473
|
+
)
|
|
3209
3474
|
api_path = '/project/policies/session-alert'
|
|
3210
3475
|
|
|
3211
3476
|
if enabled.nil?
|
|
3212
|
-
|
|
3477
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3213
3478
|
end
|
|
3214
3479
|
|
|
3215
3480
|
api_params = {
|
|
3216
3481
|
enabled: enabled,
|
|
3217
3482
|
}
|
|
3218
|
-
|
|
3483
|
+
|
|
3219
3484
|
api_headers = {
|
|
3220
3485
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3221
3486
|
"content-type": 'application/json',
|
|
@@ -3229,26 +3494,27 @@ module Appwrite
|
|
|
3229
3494
|
params: api_params,
|
|
3230
3495
|
response_type: Models::Project
|
|
3231
3496
|
)
|
|
3232
|
-
|
|
3233
3497
|
end
|
|
3234
3498
|
|
|
3235
3499
|
# Update maximum duration how long sessions created within a project should
|
|
3236
3500
|
# stay active for.
|
|
3237
3501
|
#
|
|
3238
|
-
# @param [Integer] duration Maximum session length in seconds. Minium allowed value is
|
|
3502
|
+
# @param [Integer] duration Maximum session length in seconds. Minium allowed value is 60 seconds, and maximum is 1 year, which is 31536000 seconds.
|
|
3239
3503
|
#
|
|
3240
3504
|
# @return [Project]
|
|
3241
|
-
def update_session_duration_policy(
|
|
3505
|
+
def update_session_duration_policy(
|
|
3506
|
+
duration:
|
|
3507
|
+
)
|
|
3242
3508
|
api_path = '/project/policies/session-duration'
|
|
3243
3509
|
|
|
3244
3510
|
if duration.nil?
|
|
3245
|
-
|
|
3511
|
+
raise Appwrite::Exception.new('Missing required parameter: "duration"')
|
|
3246
3512
|
end
|
|
3247
3513
|
|
|
3248
3514
|
api_params = {
|
|
3249
3515
|
duration: duration,
|
|
3250
3516
|
}
|
|
3251
|
-
|
|
3517
|
+
|
|
3252
3518
|
api_headers = {
|
|
3253
3519
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3254
3520
|
"content-type": 'application/json',
|
|
@@ -3262,7 +3528,6 @@ module Appwrite
|
|
|
3262
3528
|
params: api_params,
|
|
3263
3529
|
response_type: Models::Project
|
|
3264
3530
|
)
|
|
3265
|
-
|
|
3266
3531
|
end
|
|
3267
3532
|
|
|
3268
3533
|
# Updating this policy allows you to control if existing sessions should be
|
|
@@ -3272,17 +3537,19 @@ module Appwrite
|
|
|
3272
3537
|
# @param [] enabled Toggle session invalidation policy. Set to true if you want password change to invalidate all sessions of an user, or false to keep sessions active.
|
|
3273
3538
|
#
|
|
3274
3539
|
# @return [Project]
|
|
3275
|
-
def update_session_invalidation_policy(
|
|
3540
|
+
def update_session_invalidation_policy(
|
|
3541
|
+
enabled:
|
|
3542
|
+
)
|
|
3276
3543
|
api_path = '/project/policies/session-invalidation'
|
|
3277
3544
|
|
|
3278
3545
|
if enabled.nil?
|
|
3279
|
-
|
|
3546
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3280
3547
|
end
|
|
3281
3548
|
|
|
3282
3549
|
api_params = {
|
|
3283
3550
|
enabled: enabled,
|
|
3284
3551
|
}
|
|
3285
|
-
|
|
3552
|
+
|
|
3286
3553
|
api_headers = {
|
|
3287
3554
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3288
3555
|
"content-type": 'application/json',
|
|
@@ -3296,26 +3563,27 @@ module Appwrite
|
|
|
3296
3563
|
params: api_params,
|
|
3297
3564
|
response_type: Models::Project
|
|
3298
3565
|
)
|
|
3299
|
-
|
|
3300
3566
|
end
|
|
3301
3567
|
|
|
3302
3568
|
# Update the maximum number of sessions allowed per user. When the limit is
|
|
3303
3569
|
# hit, the oldest session will be deleted to make room for new one.
|
|
3304
3570
|
#
|
|
3305
|
-
# @param [Integer] total Set the maximum number of sessions allowed per user. Value can be between 1 and
|
|
3571
|
+
# @param [Integer] total Set the maximum number of sessions allowed per user. Value can be between 1 and 100.
|
|
3306
3572
|
#
|
|
3307
3573
|
# @return [Project]
|
|
3308
|
-
def update_session_limit_policy(
|
|
3574
|
+
def update_session_limit_policy(
|
|
3575
|
+
total:
|
|
3576
|
+
)
|
|
3309
3577
|
api_path = '/project/policies/session-limit'
|
|
3310
3578
|
|
|
3311
3579
|
if total.nil?
|
|
3312
|
-
|
|
3580
|
+
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3313
3581
|
end
|
|
3314
3582
|
|
|
3315
3583
|
api_params = {
|
|
3316
3584
|
total: total,
|
|
3317
3585
|
}
|
|
3318
|
-
|
|
3586
|
+
|
|
3319
3587
|
api_headers = {
|
|
3320
3588
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3321
3589
|
"content-type": 'application/json',
|
|
@@ -3329,27 +3597,28 @@ module Appwrite
|
|
|
3329
3597
|
params: api_params,
|
|
3330
3598
|
response_type: Models::Project
|
|
3331
3599
|
)
|
|
3332
|
-
|
|
3333
3600
|
end
|
|
3334
3601
|
|
|
3335
3602
|
# Update the maximum number of users in the project. When the limit is hit or
|
|
3336
3603
|
# amount of existing users already exceeded the limit, all users remain
|
|
3337
3604
|
# active, but new user sign up will be prohibited.
|
|
3338
3605
|
#
|
|
3339
|
-
# @param [Integer] total Set the maximum number of users allowed in the project. Value can be between
|
|
3606
|
+
# @param [Integer] total Set the maximum number of users allowed in the project. Value can be between 0 and 10000. Use 0 or null to disable the limit.
|
|
3340
3607
|
#
|
|
3341
3608
|
# @return [Project]
|
|
3342
|
-
def update_user_limit_policy(
|
|
3609
|
+
def update_user_limit_policy(
|
|
3610
|
+
total:
|
|
3611
|
+
)
|
|
3343
3612
|
api_path = '/project/policies/user-limit'
|
|
3344
3613
|
|
|
3345
3614
|
if total.nil?
|
|
3346
|
-
|
|
3615
|
+
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3347
3616
|
end
|
|
3348
3617
|
|
|
3349
3618
|
api_params = {
|
|
3350
3619
|
total: total,
|
|
3351
3620
|
}
|
|
3352
|
-
|
|
3621
|
+
|
|
3353
3622
|
api_headers = {
|
|
3354
3623
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3355
3624
|
"content-type": 'application/json',
|
|
@@ -3363,26 +3632,26 @@ module Appwrite
|
|
|
3363
3632
|
params: api_params,
|
|
3364
3633
|
response_type: Models::Project
|
|
3365
3634
|
)
|
|
3366
|
-
|
|
3367
3635
|
end
|
|
3368
3636
|
|
|
3369
3637
|
# Get a policy by its unique ID. This endpoint returns the current
|
|
3370
3638
|
# configuration for the requested project policy.
|
|
3371
3639
|
#
|
|
3372
|
-
# @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
|
|
3640
|
+
# @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, mfa-factors, deny-aliased-email, deny-disposable-email, deny-free-email, deny-corporate-email.
|
|
3373
3641
|
#
|
|
3374
|
-
# @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail]
|
|
3375
|
-
def get_policy(
|
|
3642
|
+
# @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail]
|
|
3643
|
+
def get_policy(
|
|
3644
|
+
policy_id:
|
|
3645
|
+
)
|
|
3376
3646
|
api_path = '/project/policies/{policyId}'
|
|
3377
3647
|
.gsub('{policyId}', policy_id)
|
|
3378
3648
|
|
|
3379
3649
|
if policy_id.nil?
|
|
3380
|
-
|
|
3650
|
+
raise Appwrite::Exception.new('Missing required parameter: "policyId"')
|
|
3381
3651
|
end
|
|
3382
3652
|
|
|
3383
|
-
api_params = {
|
|
3384
|
-
|
|
3385
|
-
|
|
3653
|
+
api_params = {}
|
|
3654
|
+
|
|
3386
3655
|
api_headers = {
|
|
3387
3656
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3388
3657
|
"accept": 'application/json',
|
|
@@ -3449,6 +3718,11 @@ module Appwrite
|
|
|
3449
3718
|
return Models::PolicyMembershipPrivacy.from(map: response)
|
|
3450
3719
|
end
|
|
3451
3720
|
|
|
3721
|
+
if response['$id'] == 'mfa-factors'
|
|
3722
|
+
|
|
3723
|
+
return Models::PolicyMfaFactors.from(map: response)
|
|
3724
|
+
end
|
|
3725
|
+
|
|
3452
3726
|
if response['$id'] == 'deny-aliased-email'
|
|
3453
3727
|
|
|
3454
3728
|
return Models::PolicyDenyAliasedEmail.from(map: response)
|
|
@@ -3470,32 +3744,34 @@ module Appwrite
|
|
|
3470
3744
|
end
|
|
3471
3745
|
|
|
3472
3746
|
raise Exception, "Unable to match response to any expected response model"
|
|
3473
|
-
|
|
3474
3747
|
end
|
|
3475
3748
|
|
|
3476
3749
|
# Update properties of a specific protocol. Use this endpoint to enable or
|
|
3477
|
-
# disable a protocol in your project.
|
|
3750
|
+
# disable a protocol in your project.
|
|
3478
3751
|
#
|
|
3479
3752
|
# @param [ProjectProtocolId] protocol_id Protocol name. Can be one of: rest, graphql, websocket
|
|
3480
3753
|
# @param [] enabled Protocol status.
|
|
3481
3754
|
#
|
|
3482
3755
|
# @return [Project]
|
|
3483
|
-
def update_protocol(
|
|
3756
|
+
def update_protocol(
|
|
3757
|
+
protocol_id:,
|
|
3758
|
+
enabled:
|
|
3759
|
+
)
|
|
3484
3760
|
api_path = '/project/protocols/{protocolId}'
|
|
3485
3761
|
.gsub('{protocolId}', protocol_id)
|
|
3486
3762
|
|
|
3487
3763
|
if protocol_id.nil?
|
|
3488
|
-
|
|
3764
|
+
raise Appwrite::Exception.new('Missing required parameter: "protocolId"')
|
|
3489
3765
|
end
|
|
3490
3766
|
|
|
3491
3767
|
if enabled.nil?
|
|
3492
|
-
|
|
3768
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3493
3769
|
end
|
|
3494
3770
|
|
|
3495
3771
|
api_params = {
|
|
3496
3772
|
enabled: enabled,
|
|
3497
3773
|
}
|
|
3498
|
-
|
|
3774
|
+
|
|
3499
3775
|
api_headers = {
|
|
3500
3776
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3501
3777
|
"content-type": 'application/json',
|
|
@@ -3509,32 +3785,34 @@ module Appwrite
|
|
|
3509
3785
|
params: api_params,
|
|
3510
3786
|
response_type: Models::Project
|
|
3511
3787
|
)
|
|
3512
|
-
|
|
3513
3788
|
end
|
|
3514
3789
|
|
|
3515
3790
|
# Update properties of a specific service. Use this endpoint to enable or
|
|
3516
|
-
# disable a service in your project.
|
|
3791
|
+
# disable a service in your project.
|
|
3517
3792
|
#
|
|
3518
3793
|
# @param [ProjectServiceId] service_id Service name. Can be one of: account, avatars, databases, tablesdb, locale, health, project, storage, teams, users, vcs, sites, functions, proxy, graphql, migrations, messaging, advisor, oauth2
|
|
3519
3794
|
# @param [] enabled Service status.
|
|
3520
3795
|
#
|
|
3521
3796
|
# @return [Project]
|
|
3522
|
-
def update_service(
|
|
3797
|
+
def update_service(
|
|
3798
|
+
service_id:,
|
|
3799
|
+
enabled:
|
|
3800
|
+
)
|
|
3523
3801
|
api_path = '/project/services/{serviceId}'
|
|
3524
3802
|
.gsub('{serviceId}', service_id)
|
|
3525
3803
|
|
|
3526
3804
|
if service_id.nil?
|
|
3527
|
-
|
|
3805
|
+
raise Appwrite::Exception.new('Missing required parameter: "serviceId"')
|
|
3528
3806
|
end
|
|
3529
3807
|
|
|
3530
3808
|
if enabled.nil?
|
|
3531
|
-
|
|
3809
|
+
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3532
3810
|
end
|
|
3533
3811
|
|
|
3534
3812
|
api_params = {
|
|
3535
3813
|
enabled: enabled,
|
|
3536
3814
|
}
|
|
3537
|
-
|
|
3815
|
+
|
|
3538
3816
|
api_headers = {
|
|
3539
3817
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3540
3818
|
"content-type": 'application/json',
|
|
@@ -3548,11 +3826,10 @@ module Appwrite
|
|
|
3548
3826
|
params: api_params,
|
|
3549
3827
|
response_type: Models::Project
|
|
3550
3828
|
)
|
|
3551
|
-
|
|
3552
3829
|
end
|
|
3553
3830
|
|
|
3554
3831
|
# Update the SMTP configuration for your project. Use this endpoint to
|
|
3555
|
-
# configure your project
|
|
3832
|
+
# configure your project's SMTP provider with your custom settings for
|
|
3556
3833
|
# sending transactional emails.
|
|
3557
3834
|
#
|
|
3558
3835
|
# @param [String] host SMTP server hostname (domain)
|
|
@@ -3567,7 +3844,18 @@ module Appwrite
|
|
|
3567
3844
|
# @param [] enabled Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.
|
|
3568
3845
|
#
|
|
3569
3846
|
# @return [Project]
|
|
3570
|
-
def update_smtp(
|
|
3847
|
+
def update_smtp(
|
|
3848
|
+
host: nil,
|
|
3849
|
+
port: nil,
|
|
3850
|
+
username: nil,
|
|
3851
|
+
password: nil,
|
|
3852
|
+
sender_email: nil,
|
|
3853
|
+
sender_name: nil,
|
|
3854
|
+
reply_to_email: nil,
|
|
3855
|
+
reply_to_name: nil,
|
|
3856
|
+
secure: nil,
|
|
3857
|
+
enabled: nil
|
|
3858
|
+
)
|
|
3571
3859
|
api_path = '/project/smtp'
|
|
3572
3860
|
|
|
3573
3861
|
api_params = {
|
|
@@ -3582,7 +3870,7 @@ module Appwrite
|
|
|
3582
3870
|
secure: secure,
|
|
3583
3871
|
enabled: enabled,
|
|
3584
3872
|
}
|
|
3585
|
-
|
|
3873
|
+
|
|
3586
3874
|
api_headers = {
|
|
3587
3875
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3588
3876
|
"content-type": 'application/json',
|
|
@@ -3596,25 +3884,26 @@ module Appwrite
|
|
|
3596
3884
|
params: api_params,
|
|
3597
3885
|
response_type: Models::Project
|
|
3598
3886
|
)
|
|
3599
|
-
|
|
3600
3887
|
end
|
|
3601
3888
|
|
|
3602
|
-
# Send a test email to verify SMTP configuration.
|
|
3889
|
+
# Send a test email to verify SMTP configuration.
|
|
3603
3890
|
#
|
|
3604
3891
|
# @param [Array] emails Array of emails to send test email to. Maximum of 10 emails are allowed.
|
|
3605
3892
|
#
|
|
3606
3893
|
# @return []
|
|
3607
|
-
def create_smtp_test(
|
|
3894
|
+
def create_smtp_test(
|
|
3895
|
+
emails:
|
|
3896
|
+
)
|
|
3608
3897
|
api_path = '/project/smtp/tests'
|
|
3609
3898
|
|
|
3610
3899
|
if emails.nil?
|
|
3611
|
-
|
|
3900
|
+
raise Appwrite::Exception.new('Missing required parameter: "emails"')
|
|
3612
3901
|
end
|
|
3613
3902
|
|
|
3614
3903
|
api_params = {
|
|
3615
3904
|
emails: emails,
|
|
3616
3905
|
}
|
|
3617
|
-
|
|
3906
|
+
|
|
3618
3907
|
api_headers = {
|
|
3619
3908
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3620
3909
|
"content-type": 'application/json',
|
|
@@ -3626,7 +3915,6 @@ module Appwrite
|
|
|
3626
3915
|
headers: api_headers,
|
|
3627
3916
|
params: api_params,
|
|
3628
3917
|
)
|
|
3629
|
-
|
|
3630
3918
|
end
|
|
3631
3919
|
|
|
3632
3920
|
# Get a list of all custom email templates configured for the project. This
|
|
@@ -3637,14 +3925,17 @@ module Appwrite
|
|
|
3637
3925
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3638
3926
|
#
|
|
3639
3927
|
# @return [EmailTemplateList]
|
|
3640
|
-
def list_email_templates(
|
|
3928
|
+
def list_email_templates(
|
|
3929
|
+
queries: nil,
|
|
3930
|
+
total: nil
|
|
3931
|
+
)
|
|
3641
3932
|
api_path = '/project/templates/email'
|
|
3642
3933
|
|
|
3643
3934
|
api_params = {
|
|
3644
3935
|
queries: queries,
|
|
3645
3936
|
total: total,
|
|
3646
3937
|
}
|
|
3647
|
-
|
|
3938
|
+
|
|
3648
3939
|
api_headers = {
|
|
3649
3940
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3650
3941
|
"accept": 'application/json',
|
|
@@ -3657,7 +3948,6 @@ module Appwrite
|
|
|
3657
3948
|
params: api_params,
|
|
3658
3949
|
response_type: Models::EmailTemplateList
|
|
3659
3950
|
)
|
|
3660
|
-
|
|
3661
3951
|
end
|
|
3662
3952
|
|
|
3663
3953
|
# Update a custom email template for the specified locale and type. Use this
|
|
@@ -3673,11 +3963,20 @@ module Appwrite
|
|
|
3673
3963
|
# @param [String] reply_to_name Reply to name.
|
|
3674
3964
|
#
|
|
3675
3965
|
# @return [EmailTemplate]
|
|
3676
|
-
def update_email_template(
|
|
3966
|
+
def update_email_template(
|
|
3967
|
+
template_id:,
|
|
3968
|
+
locale: nil,
|
|
3969
|
+
subject: nil,
|
|
3970
|
+
message: nil,
|
|
3971
|
+
sender_name: nil,
|
|
3972
|
+
sender_email: nil,
|
|
3973
|
+
reply_to_email: nil,
|
|
3974
|
+
reply_to_name: nil
|
|
3975
|
+
)
|
|
3677
3976
|
api_path = '/project/templates/email'
|
|
3678
3977
|
|
|
3679
3978
|
if template_id.nil?
|
|
3680
|
-
|
|
3979
|
+
raise Appwrite::Exception.new('Missing required parameter: "templateId"')
|
|
3681
3980
|
end
|
|
3682
3981
|
|
|
3683
3982
|
api_params = {
|
|
@@ -3690,7 +3989,7 @@ module Appwrite
|
|
|
3690
3989
|
replyToEmail: reply_to_email,
|
|
3691
3990
|
replyToName: reply_to_name,
|
|
3692
3991
|
}
|
|
3693
|
-
|
|
3992
|
+
|
|
3694
3993
|
api_headers = {
|
|
3695
3994
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3696
3995
|
"content-type": 'application/json',
|
|
@@ -3704,7 +4003,6 @@ module Appwrite
|
|
|
3704
4003
|
params: api_params,
|
|
3705
4004
|
response_type: Models::EmailTemplate
|
|
3706
4005
|
)
|
|
3707
|
-
|
|
3708
4006
|
end
|
|
3709
4007
|
|
|
3710
4008
|
# Get a custom email template for the specified locale and type. This
|
|
@@ -3715,18 +4013,21 @@ module Appwrite
|
|
|
3715
4013
|
# @param [ProjectEmailTemplateLocale] locale Custom email template locale. If left empty, the fallback locale (en) will be used.
|
|
3716
4014
|
#
|
|
3717
4015
|
# @return [EmailTemplate]
|
|
3718
|
-
def get_email_template(
|
|
4016
|
+
def get_email_template(
|
|
4017
|
+
template_id:,
|
|
4018
|
+
locale: nil
|
|
4019
|
+
)
|
|
3719
4020
|
api_path = '/project/templates/email/{templateId}'
|
|
3720
4021
|
.gsub('{templateId}', template_id)
|
|
3721
4022
|
|
|
3722
4023
|
if template_id.nil?
|
|
3723
|
-
|
|
4024
|
+
raise Appwrite::Exception.new('Missing required parameter: "templateId"')
|
|
3724
4025
|
end
|
|
3725
4026
|
|
|
3726
4027
|
api_params = {
|
|
3727
4028
|
locale: locale,
|
|
3728
4029
|
}
|
|
3729
|
-
|
|
4030
|
+
|
|
3730
4031
|
api_headers = {
|
|
3731
4032
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3732
4033
|
"accept": 'application/json',
|
|
@@ -3739,7 +4040,6 @@ module Appwrite
|
|
|
3739
4040
|
params: api_params,
|
|
3740
4041
|
response_type: Models::EmailTemplate
|
|
3741
4042
|
)
|
|
3742
|
-
|
|
3743
4043
|
end
|
|
3744
4044
|
|
|
3745
4045
|
# Get a list of all project environment variables.
|
|
@@ -3748,14 +4048,17 @@ module Appwrite
|
|
|
3748
4048
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
3749
4049
|
#
|
|
3750
4050
|
# @return [VariableList]
|
|
3751
|
-
def list_variables(
|
|
4051
|
+
def list_variables(
|
|
4052
|
+
queries: nil,
|
|
4053
|
+
total: nil
|
|
4054
|
+
)
|
|
3752
4055
|
api_path = '/project/variables'
|
|
3753
4056
|
|
|
3754
4057
|
api_params = {
|
|
3755
4058
|
queries: queries,
|
|
3756
4059
|
total: total,
|
|
3757
4060
|
}
|
|
3758
|
-
|
|
4061
|
+
|
|
3759
4062
|
api_headers = {
|
|
3760
4063
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3761
4064
|
"accept": 'application/json',
|
|
@@ -3768,31 +4071,35 @@ module Appwrite
|
|
|
3768
4071
|
params: api_params,
|
|
3769
4072
|
response_type: Models::VariableList
|
|
3770
4073
|
)
|
|
3771
|
-
|
|
3772
4074
|
end
|
|
3773
4075
|
|
|
3774
4076
|
# Create a new project environment variable. These variables can be accessed
|
|
3775
4077
|
# by all functions and sites in the project.
|
|
3776
4078
|
#
|
|
3777
|
-
# @param [String] variable_id Variable 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
|
|
3778
|
-
# @param [String] key Variable key. Max length: 255 chars.
|
|
4079
|
+
# @param [String] variable_id Variable 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.
|
|
4080
|
+
# @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
|
|
3779
4081
|
# @param [String] value Variable value. Max length: 8192 chars.
|
|
3780
4082
|
# @param [] secret Secret variables can be updated or deleted, but only projects can read them during build and runtime.
|
|
3781
4083
|
#
|
|
3782
4084
|
# @return [Variable]
|
|
3783
|
-
def create_variable(
|
|
4085
|
+
def create_variable(
|
|
4086
|
+
variable_id:,
|
|
4087
|
+
key:,
|
|
4088
|
+
value:,
|
|
4089
|
+
secret: nil
|
|
4090
|
+
)
|
|
3784
4091
|
api_path = '/project/variables'
|
|
3785
4092
|
|
|
3786
4093
|
if variable_id.nil?
|
|
3787
|
-
|
|
4094
|
+
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
3788
4095
|
end
|
|
3789
4096
|
|
|
3790
4097
|
if key.nil?
|
|
3791
|
-
|
|
4098
|
+
raise Appwrite::Exception.new('Missing required parameter: "key"')
|
|
3792
4099
|
end
|
|
3793
4100
|
|
|
3794
4101
|
if value.nil?
|
|
3795
|
-
|
|
4102
|
+
raise Appwrite::Exception.new('Missing required parameter: "value"')
|
|
3796
4103
|
end
|
|
3797
4104
|
|
|
3798
4105
|
api_params = {
|
|
@@ -3801,7 +4108,7 @@ module Appwrite
|
|
|
3801
4108
|
value: value,
|
|
3802
4109
|
secret: secret,
|
|
3803
4110
|
}
|
|
3804
|
-
|
|
4111
|
+
|
|
3805
4112
|
api_headers = {
|
|
3806
4113
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3807
4114
|
"content-type": 'application/json',
|
|
@@ -3815,25 +4122,25 @@ module Appwrite
|
|
|
3815
4122
|
params: api_params,
|
|
3816
4123
|
response_type: Models::Variable
|
|
3817
4124
|
)
|
|
3818
|
-
|
|
3819
4125
|
end
|
|
3820
4126
|
|
|
3821
|
-
# Get a variable by its unique ID.
|
|
4127
|
+
# Get a variable by its unique ID.
|
|
3822
4128
|
#
|
|
3823
4129
|
# @param [String] variable_id Variable unique ID.
|
|
3824
4130
|
#
|
|
3825
4131
|
# @return [Variable]
|
|
3826
|
-
def get_variable(
|
|
4132
|
+
def get_variable(
|
|
4133
|
+
variable_id:
|
|
4134
|
+
)
|
|
3827
4135
|
api_path = '/project/variables/{variableId}'
|
|
3828
4136
|
.gsub('{variableId}', variable_id)
|
|
3829
4137
|
|
|
3830
4138
|
if variable_id.nil?
|
|
3831
|
-
|
|
4139
|
+
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
3832
4140
|
end
|
|
3833
4141
|
|
|
3834
|
-
api_params = {
|
|
3835
|
-
|
|
3836
|
-
|
|
4142
|
+
api_params = {}
|
|
4143
|
+
|
|
3837
4144
|
api_headers = {
|
|
3838
4145
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3839
4146
|
"accept": 'application/json',
|
|
@@ -3846,23 +4153,27 @@ module Appwrite
|
|
|
3846
4153
|
params: api_params,
|
|
3847
4154
|
response_type: Models::Variable
|
|
3848
4155
|
)
|
|
3849
|
-
|
|
3850
4156
|
end
|
|
3851
4157
|
|
|
3852
4158
|
# Update variable by its unique ID.
|
|
3853
4159
|
#
|
|
3854
4160
|
# @param [String] variable_id Variable unique ID.
|
|
3855
|
-
# @param [String] key Variable key. Max length: 255 chars.
|
|
4161
|
+
# @param [String] key Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
|
|
3856
4162
|
# @param [String] value Variable value. Max length: 8192 chars.
|
|
3857
4163
|
# @param [] secret Secret variables can be updated or deleted, but only projects can read them during build and runtime.
|
|
3858
4164
|
#
|
|
3859
4165
|
# @return [Variable]
|
|
3860
|
-
def update_variable(
|
|
4166
|
+
def update_variable(
|
|
4167
|
+
variable_id:,
|
|
4168
|
+
key: nil,
|
|
4169
|
+
value: nil,
|
|
4170
|
+
secret: nil
|
|
4171
|
+
)
|
|
3861
4172
|
api_path = '/project/variables/{variableId}'
|
|
3862
4173
|
.gsub('{variableId}', variable_id)
|
|
3863
4174
|
|
|
3864
4175
|
if variable_id.nil?
|
|
3865
|
-
|
|
4176
|
+
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
3866
4177
|
end
|
|
3867
4178
|
|
|
3868
4179
|
api_params = {
|
|
@@ -3870,7 +4181,7 @@ module Appwrite
|
|
|
3870
4181
|
value: value,
|
|
3871
4182
|
secret: secret,
|
|
3872
4183
|
}
|
|
3873
|
-
|
|
4184
|
+
|
|
3874
4185
|
api_headers = {
|
|
3875
4186
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3876
4187
|
"content-type": 'application/json',
|
|
@@ -3884,25 +4195,25 @@ module Appwrite
|
|
|
3884
4195
|
params: api_params,
|
|
3885
4196
|
response_type: Models::Variable
|
|
3886
4197
|
)
|
|
3887
|
-
|
|
3888
4198
|
end
|
|
3889
4199
|
|
|
3890
|
-
# Delete a variable by its unique ID.
|
|
4200
|
+
# Delete a variable by its unique ID.
|
|
3891
4201
|
#
|
|
3892
4202
|
# @param [String] variable_id Variable unique ID.
|
|
3893
4203
|
#
|
|
3894
4204
|
# @return []
|
|
3895
|
-
def delete_variable(
|
|
4205
|
+
def delete_variable(
|
|
4206
|
+
variable_id:
|
|
4207
|
+
)
|
|
3896
4208
|
api_path = '/project/variables/{variableId}'
|
|
3897
4209
|
.gsub('{variableId}', variable_id)
|
|
3898
4210
|
|
|
3899
4211
|
if variable_id.nil?
|
|
3900
|
-
|
|
4212
|
+
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
3901
4213
|
end
|
|
3902
4214
|
|
|
3903
|
-
api_params = {
|
|
3904
|
-
|
|
3905
|
-
|
|
4215
|
+
api_params = {}
|
|
4216
|
+
|
|
3906
4217
|
api_headers = {
|
|
3907
4218
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3908
4219
|
"content-type": 'application/json',
|
|
@@ -3914,8 +4225,6 @@ module Appwrite
|
|
|
3914
4225
|
headers: api_headers,
|
|
3915
4226
|
params: api_params,
|
|
3916
4227
|
)
|
|
3917
|
-
|
|
3918
4228
|
end
|
|
3919
|
-
|
|
3920
|
-
end
|
|
4229
|
+
end
|
|
3921
4230
|
end
|