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