appwrite 28.3.2 → 29.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 +36 -20
- data/lib/appwrite/enums/billing_plan_group.rb +2 -1
- data/lib/appwrite/enums/build_runtime.rb +2 -0
- data/lib/appwrite/enums/databases_index_type.rb +1 -0
- data/lib/appwrite/enums/domain_registration_type.rb +10 -0
- data/lib/appwrite/enums/domain_transfer_status_enum.rb +14 -0
- data/lib/appwrite/enums/execution_trigger.rb +1 -0
- data/lib/appwrite/enums/framework.rb +1 -0
- data/lib/appwrite/enums/id_token_provider.rb +8 -0
- data/lib/appwrite/enums/image_gravity.rb +1 -0
- data/lib/appwrite/enums/o_auth2_auth0_prompt.rb +9 -0
- data/lib/appwrite/enums/o_auth2_discord_prompt.rb +8 -0
- data/lib/appwrite/enums/o_auth2_github_prompt.rb +7 -0
- data/lib/appwrite/enums/o_auth2_kakao_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth2_microsoft_prompt.rb +10 -0
- data/lib/appwrite/enums/o_auth2_okta_prompt.rb +9 -0
- data/lib/appwrite/enums/o_auth2_salesforce_prompt.rb +8 -0
- data/lib/appwrite/enums/o_auth2_zoho_prompt.rb +7 -0
- data/lib/appwrite/enums/o_auth_provider.rb +3 -0
- data/lib/appwrite/enums/project_email_template_id.rb +2 -0
- data/lib/appwrite/enums/project_key_scopes.rb +4 -0
- data/lib/appwrite/enums/project_o_auth2_auth0_prompt.rb +9 -0
- data/lib/appwrite/enums/project_o_auth2_discord_prompt.rb +8 -0
- data/lib/appwrite/enums/project_o_auth2_git_hub_prompt.rb +7 -0
- data/lib/appwrite/enums/project_o_auth2_kakao_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth2_microsoft_prompt.rb +10 -0
- data/lib/appwrite/enums/project_o_auth2_okta_prompt.rb +9 -0
- data/lib/appwrite/enums/project_o_auth2_salesforce_prompt.rb +8 -0
- data/lib/appwrite/enums/project_o_auth2_zoho_prompt.rb +7 -0
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +3 -0
- data/lib/appwrite/enums/project_policy_id.rb +2 -0
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -0
- data/lib/appwrite/enums/proxy_rule_protocol.rb +8 -0
- data/lib/appwrite/enums/runtime.rb +2 -0
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -0
- data/lib/appwrite/enums/waf_rule_action.rb +11 -0
- data/lib/appwrite/models/account.rb +143 -0
- data/lib/appwrite/models/activity_event.rb +1 -0
- data/lib/appwrite/models/activity_event_list.rb +1 -0
- data/lib/appwrite/models/additional_resource.rb +1 -0
- data/lib/appwrite/models/algo_argon2.rb +1 -0
- data/lib/appwrite/models/algo_bcrypt.rb +1 -0
- data/lib/appwrite/models/algo_md5.rb +1 -0
- data/lib/appwrite/models/algo_phpass.rb +1 -0
- data/lib/appwrite/models/algo_scrypt.rb +1 -0
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -0
- data/lib/appwrite/models/algo_sha.rb +1 -0
- data/lib/appwrite/models/app.rb +1 -0
- data/lib/appwrite/models/app_installation.rb +2 -1
- data/lib/appwrite/models/app_installation_list.rb +1 -0
- data/lib/appwrite/models/app_key.rb +2 -1
- data/lib/appwrite/models/app_key_list.rb +1 -0
- data/lib/appwrite/models/app_scope.rb +1 -0
- data/lib/appwrite/models/app_scope_list.rb +1 -0
- data/lib/appwrite/models/app_secret.rb +2 -1
- data/lib/appwrite/models/app_secret_list.rb +1 -0
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -1
- data/lib/appwrite/models/apps_list.rb +1 -0
- data/lib/appwrite/models/attribute_bigint.rb +5 -4
- data/lib/appwrite/models/attribute_boolean.rb +3 -2
- data/lib/appwrite/models/attribute_datetime.rb +3 -2
- data/lib/appwrite/models/attribute_email.rb +3 -2
- data/lib/appwrite/models/attribute_enum.rb +3 -2
- data/lib/appwrite/models/attribute_float.rb +5 -4
- data/lib/appwrite/models/attribute_integer.rb +5 -4
- data/lib/appwrite/models/attribute_ip.rb +3 -2
- data/lib/appwrite/models/attribute_line.rb +3 -2
- data/lib/appwrite/models/attribute_list.rb +1 -0
- data/lib/appwrite/models/attribute_longtext.rb +4 -3
- data/lib/appwrite/models/attribute_mediumtext.rb +4 -3
- data/lib/appwrite/models/attribute_object.rb +2 -1
- data/lib/appwrite/models/attribute_point.rb +3 -2
- data/lib/appwrite/models/attribute_polygon.rb +3 -2
- data/lib/appwrite/models/attribute_relationship.rb +2 -1
- data/lib/appwrite/models/attribute_string.rb +4 -3
- data/lib/appwrite/models/attribute_text.rb +4 -3
- data/lib/appwrite/models/attribute_url.rb +3 -2
- data/lib/appwrite/models/attribute_varchar.rb +4 -3
- data/lib/appwrite/models/attribute_vector.rb +2 -1
- data/lib/appwrite/models/backup_archive.rb +5 -4
- data/lib/appwrite/models/backup_archive_list.rb +1 -0
- data/lib/appwrite/models/backup_policy.rb +3 -2
- data/lib/appwrite/models/backup_policy_list.rb +1 -0
- data/lib/appwrite/models/backup_restoration.rb +2 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -0
- data/lib/appwrite/models/billing_limits.rb +8 -8
- data/lib/appwrite/models/billing_plan.rb +25 -13
- data/lib/appwrite/models/billing_plan_addon.rb +2 -2
- data/lib/appwrite/models/billing_plan_addon_details.rb +2 -1
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +19 -19
- data/lib/appwrite/models/billing_plan_limits.rb +2 -2
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -0
- data/lib/appwrite/models/block.rb +4 -33
- data/lib/appwrite/models/bucket.rb +1 -0
- data/lib/appwrite/models/bucket_list.rb +1 -0
- data/lib/appwrite/models/collection.rb +1 -0
- data/lib/appwrite/models/collection_list.rb +1 -0
- data/lib/appwrite/models/column_bigint.rb +5 -4
- data/lib/appwrite/models/column_boolean.rb +3 -2
- data/lib/appwrite/models/column_datetime.rb +3 -2
- data/lib/appwrite/models/column_email.rb +3 -2
- data/lib/appwrite/models/column_enum.rb +3 -2
- data/lib/appwrite/models/column_float.rb +5 -4
- data/lib/appwrite/models/column_index.rb +2 -1
- data/lib/appwrite/models/column_index_list.rb +1 -0
- data/lib/appwrite/models/column_integer.rb +5 -4
- data/lib/appwrite/models/column_ip.rb +3 -2
- data/lib/appwrite/models/column_line.rb +3 -2
- data/lib/appwrite/models/column_list.rb +1 -0
- data/lib/appwrite/models/column_longtext.rb +4 -3
- data/lib/appwrite/models/column_mediumtext.rb +4 -3
- data/lib/appwrite/models/column_point.rb +3 -2
- data/lib/appwrite/models/column_polygon.rb +3 -2
- data/lib/appwrite/models/column_relationship.rb +2 -1
- data/lib/appwrite/models/column_string.rb +4 -3
- data/lib/appwrite/models/column_text.rb +4 -3
- data/lib/appwrite/models/column_url.rb +3 -2
- data/lib/appwrite/models/column_varchar.rb +4 -3
- data/lib/appwrite/models/continent.rb +1 -0
- data/lib/appwrite/models/continent_list.rb +1 -0
- data/lib/appwrite/models/country.rb +1 -0
- data/lib/appwrite/models/country_list.rb +1 -0
- data/lib/appwrite/models/currency.rb +1 -0
- data/lib/appwrite/models/currency_list.rb +1 -0
- data/lib/appwrite/models/database.rb +10 -9
- data/lib/appwrite/models/database_list.rb +1 -0
- data/lib/appwrite/models/database_migration.rb +1 -0
- data/lib/appwrite/models/database_migration_list.rb +1 -0
- data/lib/appwrite/models/database_status.rb +6 -5
- data/lib/appwrite/models/database_status_connections.rb +1 -0
- data/lib/appwrite/models/database_status_replica.rb +3 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -0
- data/lib/appwrite/models/dedicated_database.rb +22 -6
- data/lib/appwrite/models/dedicated_database_backup.rb +6 -5
- data/lib/appwrite/models/dedicated_database_backup_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +1 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +2 -1
- data/lib/appwrite/models/dedicated_database_branch_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +1 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +1 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +1 -0
- data/lib/appwrite/models/dedicated_database_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_member.rb +3 -2
- data/lib/appwrite/models/dedicated_database_operation.rb +4 -3
- data/lib/appwrite/models/dedicated_database_operation_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +1 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +1 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +3 -2
- data/lib/appwrite/models/dedicated_database_restoration.rb +11 -5
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +1 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +21 -0
- data/lib/appwrite/models/dedicated_database_specification_list.rb +4 -8
- data/lib/appwrite/models/deployment.rb +1 -0
- data/lib/appwrite/models/deployment_list.rb +1 -0
- data/lib/appwrite/models/dns_record.rb +83 -0
- data/lib/appwrite/models/dns_records_list.rb +33 -0
- data/lib/appwrite/models/document.rb +1 -0
- data/lib/appwrite/models/document_list.rb +1 -0
- data/lib/appwrite/models/domain.rb +109 -0
- data/lib/appwrite/models/domain_price.rb +63 -0
- data/lib/appwrite/models/domain_prices_list.rb +33 -0
- data/lib/appwrite/models/domain_transfer_status.rb +59 -0
- data/lib/appwrite/models/domains_list.rb +33 -0
- data/lib/appwrite/models/email_template.rb +1 -0
- data/lib/appwrite/models/email_template_list.rb +1 -0
- data/lib/appwrite/models/embedding.rb +1 -0
- data/lib/appwrite/models/embedding_list.rb +1 -0
- data/lib/appwrite/models/ephemeral_key.rb +1 -0
- data/lib/appwrite/models/execution.rb +3 -1
- data/lib/appwrite/models/execution_list.rb +1 -0
- data/lib/appwrite/models/file.rb +1 -0
- data/lib/appwrite/models/file_list.rb +1 -0
- data/lib/appwrite/models/framework.rb +1 -0
- data/lib/appwrite/models/framework_adapter.rb +2 -1
- data/lib/appwrite/models/framework_list.rb +1 -0
- data/lib/appwrite/models/function.rb +10 -4
- data/lib/appwrite/models/function_list.rb +1 -0
- data/lib/appwrite/models/headers.rb +1 -0
- data/lib/appwrite/models/identity.rb +9 -3
- data/lib/appwrite/models/identity_list.rb +1 -0
- data/lib/appwrite/models/index.rb +2 -1
- data/lib/appwrite/models/index_list.rb +1 -0
- data/lib/appwrite/models/insight.rb +4 -3
- data/lib/appwrite/models/insight_cta.rb +1 -0
- data/lib/appwrite/models/insight_list.rb +1 -0
- data/lib/appwrite/models/jwt.rb +1 -0
- data/lib/appwrite/models/key.rb +1 -0
- data/lib/appwrite/models/key_list.rb +1 -0
- data/lib/appwrite/models/language.rb +1 -0
- data/lib/appwrite/models/language_list.rb +1 -0
- data/lib/appwrite/models/locale.rb +12 -11
- data/lib/appwrite/models/locale_code.rb +1 -0
- data/lib/appwrite/models/locale_code_list.rb +1 -0
- data/lib/appwrite/models/membership.rb +1 -0
- data/lib/appwrite/models/membership_list.rb +1 -0
- data/lib/appwrite/models/message.rb +4 -3
- data/lib/appwrite/models/message_list.rb +1 -0
- data/lib/appwrite/models/mfa_challenge.rb +1 -0
- data/lib/appwrite/models/mfa_challenge_secret.rb +1 -0
- data/lib/appwrite/models/mfa_factors.rb +1 -0
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -0
- data/lib/appwrite/models/mfa_type.rb +1 -0
- data/lib/appwrite/models/mock_number.rb +1 -0
- data/lib/appwrite/models/mock_number_list.rb +1 -0
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -0
- data/lib/appwrite/models/o_auth2_apple.rb +14 -3
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -0
- data/lib/appwrite/models/o_auth2_auth0.rb +24 -0
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -0
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -0
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -0
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -0
- data/lib/appwrite/models/o_auth2_box.rb +1 -0
- data/lib/appwrite/models/o_auth2_cloudflare.rb +1 -0
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -0
- data/lib/appwrite/models/o_auth2_discord.rb +26 -3
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -0
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -0
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -0
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -0
- data/lib/appwrite/models/o_auth2_figma.rb +1 -0
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -0
- data/lib/appwrite/models/o_auth2_github.rb +25 -3
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -0
- data/lib/appwrite/models/o_auth2_google.rb +18 -5
- data/lib/appwrite/models/o_auth2_hugging_face.rb +1 -0
- data/lib/appwrite/models/o_auth2_kakao.rb +67 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -0
- data/lib/appwrite/models/o_auth2_kick.rb +1 -0
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -0
- data/lib/appwrite/models/o_auth2_microsoft.rb +25 -0
- data/lib/appwrite/models/o_auth2_notion.rb +1 -0
- data/lib/appwrite/models/o_auth2_oidc.rb +11 -8
- data/lib/appwrite/models/o_auth2_okta.rb +24 -0
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -0
- data/lib/appwrite/models/o_auth2_podio.rb +1 -0
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -0
- data/lib/appwrite/models/o_auth2_resend.rb +1 -0
- data/lib/appwrite/models/o_auth2_salesforce.rb +26 -3
- data/lib/appwrite/models/o_auth2_slack.rb +1 -0
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -0
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -0
- data/lib/appwrite/models/o_auth2_tik_tok.rb +43 -0
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -0
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -0
- data/lib/appwrite/models/o_auth2_webflow.rb +43 -0
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -0
- data/lib/appwrite/models/o_auth2_x.rb +1 -0
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -0
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -0
- data/lib/appwrite/models/o_auth2_zoho.rb +25 -3
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -0
- data/lib/appwrite/models/oauth2_approve.rb +1 -0
- data/lib/appwrite/models/oauth2_authorize.rb +1 -0
- data/lib/appwrite/models/oauth2_consent.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -0
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -0
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -0
- data/lib/appwrite/models/oauth2_grant.rb +1 -0
- data/lib/appwrite/models/oauth2_introspection.rb +83 -0
- data/lib/appwrite/models/oauth2_organization.rb +1 -0
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -0
- data/lib/appwrite/models/oauth2_par.rb +1 -0
- data/lib/appwrite/models/oauth2_project.rb +1 -0
- data/lib/appwrite/models/oauth2_project_list.rb +1 -0
- data/lib/appwrite/models/oauth2_reject.rb +1 -0
- data/lib/appwrite/models/oauth2_token.rb +3 -2
- data/lib/appwrite/models/organization.rb +21 -20
- data/lib/appwrite/models/passkey.rb +1 -0
- data/lib/appwrite/models/passkey_challenge.rb +1 -0
- data/lib/appwrite/models/passkey_list.rb +1 -0
- data/lib/appwrite/models/phone.rb +1 -0
- data/lib/appwrite/models/phone_list.rb +1 -0
- data/lib/appwrite/models/platform_android.rb +9 -3
- data/lib/appwrite/models/platform_apple.rb +1 -0
- data/lib/appwrite/models/platform_linux.rb +1 -0
- data/lib/appwrite/models/platform_list.rb +1 -0
- data/lib/appwrite/models/platform_web.rb +1 -0
- data/lib/appwrite/models/platform_windows.rb +1 -0
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -0
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -0
- data/lib/appwrite/models/policy_list.rb +1 -0
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -0
- data/lib/appwrite/models/policy_mfa_factors.rb +1 -0
- data/lib/appwrite/models/policy_passkey.rb +1 -0
- data/lib/appwrite/models/policy_password_dictionary.rb +1 -0
- data/lib/appwrite/models/policy_password_history.rb +1 -0
- data/lib/appwrite/models/policy_password_personal_data.rb +1 -0
- data/lib/appwrite/models/policy_password_pwned.rb +43 -0
- data/lib/appwrite/models/policy_password_rotation.rb +38 -0
- data/lib/appwrite/models/policy_password_strength.rb +1 -0
- data/lib/appwrite/models/policy_session_alert.rb +1 -0
- data/lib/appwrite/models/policy_session_duration.rb +1 -0
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -0
- data/lib/appwrite/models/policy_session_limit.rb +1 -0
- data/lib/appwrite/models/policy_user_limit.rb +1 -0
- data/lib/appwrite/models/postgres_extension.rb +1 -0
- data/lib/appwrite/models/presence.rb +4 -3
- data/lib/appwrite/models/presence_list.rb +1 -0
- data/lib/appwrite/models/program.rb +1 -0
- data/lib/appwrite/models/project.rb +35 -24
- data/lib/appwrite/models/project_auth_method.rb +1 -0
- data/lib/appwrite/models/project_list.rb +1 -0
- data/lib/appwrite/models/project_protocol.rb +1 -0
- data/lib/appwrite/models/project_service.rb +1 -0
- data/lib/appwrite/models/provider.rb +2 -1
- data/lib/appwrite/models/provider_list.rb +1 -0
- data/lib/appwrite/models/proxy_invalidation.rb +1 -0
- data/lib/appwrite/models/proxy_rule.rb +24 -4
- data/lib/appwrite/models/proxy_rule_list.rb +1 -0
- data/lib/appwrite/models/report.rb +2 -1
- data/lib/appwrite/models/report_list.rb +1 -0
- data/lib/appwrite/models/resource_token.rb +1 -0
- data/lib/appwrite/models/resource_token_list.rb +1 -0
- data/lib/appwrite/models/row.rb +1 -0
- data/lib/appwrite/models/row_list.rb +1 -0
- data/lib/appwrite/models/runtime.rb +1 -0
- data/lib/appwrite/models/runtime_list.rb +1 -0
- data/lib/appwrite/models/session.rb +1 -0
- data/lib/appwrite/models/session_list.rb +1 -0
- data/lib/appwrite/models/site.rb +1 -0
- data/lib/appwrite/models/site_list.rb +1 -0
- data/lib/appwrite/models/specification.rb +1 -0
- data/lib/appwrite/models/specification_list.rb +1 -0
- data/lib/appwrite/models/subscriber.rb +1 -0
- data/lib/appwrite/models/subscriber_list.rb +1 -0
- data/lib/appwrite/models/table.rb +1 -0
- data/lib/appwrite/models/table_list.rb +1 -0
- data/lib/appwrite/models/target.rb +2 -1
- data/lib/appwrite/models/target_list.rb +1 -0
- data/lib/appwrite/models/team.rb +1 -0
- data/lib/appwrite/models/team_list.rb +1 -0
- data/lib/appwrite/models/token.rb +1 -0
- data/lib/appwrite/models/token_secret.rb +1 -0
- data/lib/appwrite/models/topic.rb +14 -3
- data/lib/appwrite/models/topic_list.rb +1 -0
- data/lib/appwrite/models/transaction.rb +1 -0
- data/lib/appwrite/models/transaction_list.rb +1 -0
- data/lib/appwrite/models/usage_billing_plan.rb +27 -27
- data/lib/appwrite/models/user.rb +16 -10
- data/lib/appwrite/models/user_list.rb +1 -0
- data/lib/appwrite/models/variable.rb +1 -0
- data/lib/appwrite/models/variable_list.rb +1 -0
- data/lib/appwrite/models/vectorsdb_collection.rb +1 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +1 -0
- data/lib/appwrite/models/waf_rule_bypass.rb +111 -0
- data/lib/appwrite/models/waf_rule_challenge.rb +126 -0
- data/lib/appwrite/models/waf_rule_deny.rb +111 -0
- data/lib/appwrite/models/{log_list.rb → waf_rule_list.rb} +8 -7
- data/lib/appwrite/models/waf_rule_rate_limit.rb +136 -0
- data/lib/appwrite/models/waf_rule_redirect.rb +121 -0
- data/lib/appwrite/models/webhook.rb +1 -0
- data/lib/appwrite/models/webhook_list.rb +1 -0
- data/lib/appwrite/query/builder.rb +361 -0
- data/lib/appwrite/query.rb +190 -0
- data/lib/appwrite/services/account.rb +409 -133
- data/lib/appwrite/services/activities.rb +4 -4
- data/lib/appwrite/services/advisor.rb +19 -18
- data/lib/appwrite/services/apps.rb +89 -89
- data/lib/appwrite/services/avatars.rb +92 -21
- data/lib/appwrite/services/backups.rb +30 -30
- data/lib/appwrite/services/databases.rb +504 -453
- data/lib/appwrite/services/documents_db.rb +199 -191
- data/lib/appwrite/services/domains.rb +2318 -0
- data/lib/appwrite/services/embeddings.rb +2 -2
- data/lib/appwrite/services/functions.rb +128 -112
- data/lib/appwrite/services/graphql.rb +4 -4
- data/lib/appwrite/services/locale.rb +49 -14
- data/lib/appwrite/services/messaging.rb +281 -153
- data/lib/appwrite/services/mongo.rb +194 -130
- data/lib/appwrite/services/mysql.rb +212 -144
- data/lib/appwrite/services/oauth2.rb +72 -27
- data/lib/appwrite/services/organization.rb +255 -221
- data/lib/appwrite/services/postgresql.rb +226 -158
- data/lib/appwrite/services/presences.rb +17 -16
- data/lib/appwrite/services/project.rb +588 -157
- data/lib/appwrite/services/proxy.rb +70 -23
- data/lib/appwrite/services/sites.rb +119 -107
- data/lib/appwrite/services/storage.rb +62 -59
- data/lib/appwrite/services/tables_db.rb +617 -558
- data/lib/appwrite/services/teams.rb +87 -82
- data/lib/appwrite/services/tokens.rb +25 -24
- data/lib/appwrite/services/users.rb +170 -199
- data/lib/appwrite/services/vectors_db.rb +185 -177
- data/lib/appwrite/services/waf.rb +859 -0
- data/lib/appwrite/services/webhooks.rb +23 -22
- data/lib/appwrite/topic.rb +53 -0
- data/lib/appwrite.rb +48 -9
- metadata +47 -7
- data/lib/appwrite/enums/organization_key_scopes.rb +0 -22
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +0 -42
- data/lib/appwrite/models/dev_key.rb +0 -62
- data/lib/appwrite/models/log.rb +0 -132
|
@@ -17,6 +17,7 @@ module Appwrite
|
|
|
17
17
|
|
|
18
18
|
api_headers = {
|
|
19
19
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
20
|
+
"accept": 'application/json',
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
@client.call(
|
|
@@ -40,6 +41,7 @@ module Appwrite
|
|
|
40
41
|
api_headers = {
|
|
41
42
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
42
43
|
"content-type": 'application/json',
|
|
44
|
+
"accept": 'application/json',
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
@client.call(
|
|
@@ -53,7 +55,7 @@ module Appwrite
|
|
|
53
55
|
# Update properties of a specific auth method. Use this endpoint to enable or
|
|
54
56
|
# disable a method in your project.
|
|
55
57
|
#
|
|
56
|
-
# @param [ProjectAuthMethodId] method_id Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
|
|
58
|
+
# @param [ProjectAuthMethodId] method_id Auth Method ID. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone,passkey
|
|
57
59
|
# @param [] enabled Auth method status.
|
|
58
60
|
#
|
|
59
61
|
# @return [Project]
|
|
@@ -61,9 +63,6 @@ module Appwrite
|
|
|
61
63
|
method_id:,
|
|
62
64
|
enabled:
|
|
63
65
|
)
|
|
64
|
-
api_path = '/project/auth-methods/{methodId}'
|
|
65
|
-
.gsub('{methodId}', method_id)
|
|
66
|
-
|
|
67
66
|
if method_id.nil?
|
|
68
67
|
raise Appwrite::Exception.new('Missing required parameter: "methodId"')
|
|
69
68
|
end
|
|
@@ -72,6 +71,9 @@ module Appwrite
|
|
|
72
71
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
73
72
|
end
|
|
74
73
|
|
|
74
|
+
api_path = '/project/auth-methods/{methodId}'
|
|
75
|
+
.gsub('{methodId}', method_id)
|
|
76
|
+
|
|
75
77
|
api_params = {
|
|
76
78
|
enabled: enabled,
|
|
77
79
|
}
|
|
@@ -91,6 +93,182 @@ module Appwrite
|
|
|
91
93
|
)
|
|
92
94
|
end
|
|
93
95
|
|
|
96
|
+
# Get a list of all environments of the project. You can use the query params
|
|
97
|
+
# to filter your results.
|
|
98
|
+
#
|
|
99
|
+
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId, labels, search, accessedAt, status, parentId
|
|
100
|
+
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
101
|
+
#
|
|
102
|
+
# @return [ProjectList]
|
|
103
|
+
def list_environments(
|
|
104
|
+
queries: nil,
|
|
105
|
+
total: nil
|
|
106
|
+
)
|
|
107
|
+
api_path = '/project/environments'
|
|
108
|
+
|
|
109
|
+
api_params = {
|
|
110
|
+
queries: queries,
|
|
111
|
+
total: total,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
api_headers = {
|
|
115
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
116
|
+
"accept": 'application/json',
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@client.call(
|
|
120
|
+
method: 'GET',
|
|
121
|
+
path: api_path,
|
|
122
|
+
headers: api_headers,
|
|
123
|
+
params: api_params,
|
|
124
|
+
response_type: Models::ProjectList
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Create a new environment of the project. An environment is a separate
|
|
129
|
+
# project in the same organization and region, with its own resources and
|
|
130
|
+
# users. Its usage is billed under the project it belongs to.
|
|
131
|
+
#
|
|
132
|
+
# @param [String] environment_id Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
133
|
+
# @param [String] name Environment name. Max length: 128 chars.
|
|
134
|
+
#
|
|
135
|
+
# @return [Project]
|
|
136
|
+
def create_environment(
|
|
137
|
+
environment_id:,
|
|
138
|
+
name:
|
|
139
|
+
)
|
|
140
|
+
if environment_id.nil?
|
|
141
|
+
raise Appwrite::Exception.new('Missing required parameter: "environmentId"')
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if name.nil?
|
|
145
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
api_path = '/project/environments'
|
|
149
|
+
|
|
150
|
+
api_params = {
|
|
151
|
+
environmentId: environment_id,
|
|
152
|
+
name: name,
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
api_headers = {
|
|
156
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
157
|
+
"content-type": 'application/json',
|
|
158
|
+
"accept": 'application/json',
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@client.call(
|
|
162
|
+
method: 'POST',
|
|
163
|
+
path: api_path,
|
|
164
|
+
headers: api_headers,
|
|
165
|
+
params: api_params,
|
|
166
|
+
response_type: Models::Project
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Get an environment of the project by its unique ID.
|
|
171
|
+
#
|
|
172
|
+
# @param [String] environment_id Environment unique ID.
|
|
173
|
+
#
|
|
174
|
+
# @return [Project]
|
|
175
|
+
def get_environment(
|
|
176
|
+
environment_id:
|
|
177
|
+
)
|
|
178
|
+
if environment_id.nil? || environment_id == ''
|
|
179
|
+
raise Appwrite::Exception.new('Missing required parameter: "environmentId"')
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
api_path = '/project/environments/{environmentId}'
|
|
183
|
+
.gsub('{environmentId}', environment_id)
|
|
184
|
+
|
|
185
|
+
api_params = {}
|
|
186
|
+
|
|
187
|
+
api_headers = {
|
|
188
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
189
|
+
"accept": 'application/json',
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@client.call(
|
|
193
|
+
method: 'GET',
|
|
194
|
+
path: api_path,
|
|
195
|
+
headers: api_headers,
|
|
196
|
+
params: api_params,
|
|
197
|
+
response_type: Models::Project
|
|
198
|
+
)
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Update the name of an environment of the project.
|
|
202
|
+
#
|
|
203
|
+
# @param [String] environment_id Environment unique ID.
|
|
204
|
+
# @param [String] name Environment name. Max length: 128 chars.
|
|
205
|
+
#
|
|
206
|
+
# @return [Project]
|
|
207
|
+
def update_environment(
|
|
208
|
+
environment_id:,
|
|
209
|
+
name:
|
|
210
|
+
)
|
|
211
|
+
if environment_id.nil? || environment_id == ''
|
|
212
|
+
raise Appwrite::Exception.new('Missing required parameter: "environmentId"')
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if name.nil?
|
|
216
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
api_path = '/project/environments/{environmentId}'
|
|
220
|
+
.gsub('{environmentId}', environment_id)
|
|
221
|
+
|
|
222
|
+
api_params = {
|
|
223
|
+
name: name,
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
api_headers = {
|
|
227
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
228
|
+
"content-type": 'application/json',
|
|
229
|
+
"accept": 'application/json',
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@client.call(
|
|
233
|
+
method: 'PATCH',
|
|
234
|
+
path: api_path,
|
|
235
|
+
headers: api_headers,
|
|
236
|
+
params: api_params,
|
|
237
|
+
response_type: Models::Project
|
|
238
|
+
)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Delete an environment of the project, with all of its resources and users.
|
|
242
|
+
#
|
|
243
|
+
# @param [String] environment_id Environment unique ID.
|
|
244
|
+
#
|
|
245
|
+
# @return []
|
|
246
|
+
def delete_environment(
|
|
247
|
+
environment_id:
|
|
248
|
+
)
|
|
249
|
+
if environment_id.nil? || environment_id == ''
|
|
250
|
+
raise Appwrite::Exception.new('Missing required parameter: "environmentId"')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
api_path = '/project/environments/{environmentId}'
|
|
254
|
+
.gsub('{environmentId}', environment_id)
|
|
255
|
+
|
|
256
|
+
api_params = {}
|
|
257
|
+
|
|
258
|
+
api_headers = {
|
|
259
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
260
|
+
"content-type": 'application/json',
|
|
261
|
+
"accept": 'application/json',
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
@client.call(
|
|
265
|
+
method: 'DELETE',
|
|
266
|
+
path: api_path,
|
|
267
|
+
headers: api_headers,
|
|
268
|
+
params: api_params,
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
|
|
94
272
|
# Get a list of all API keys from the current project.
|
|
95
273
|
#
|
|
96
274
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire, accessedAt, name, scopes
|
|
@@ -136,8 +314,6 @@ module Appwrite
|
|
|
136
314
|
scopes:,
|
|
137
315
|
duration:
|
|
138
316
|
)
|
|
139
|
-
api_path = '/project/keys/ephemeral'
|
|
140
|
-
|
|
141
317
|
if scopes.nil?
|
|
142
318
|
raise Appwrite::Exception.new('Missing required parameter: "scopes"')
|
|
143
319
|
end
|
|
@@ -146,6 +322,8 @@ module Appwrite
|
|
|
146
322
|
raise Appwrite::Exception.new('Missing required parameter: "duration"')
|
|
147
323
|
end
|
|
148
324
|
|
|
325
|
+
api_path = '/project/keys/ephemeral'
|
|
326
|
+
|
|
149
327
|
api_params = {
|
|
150
328
|
scopes: scopes,
|
|
151
329
|
duration: duration,
|
|
@@ -174,13 +352,13 @@ module Appwrite
|
|
|
174
352
|
def get_key(
|
|
175
353
|
key_id:
|
|
176
354
|
)
|
|
177
|
-
|
|
178
|
-
.gsub('{keyId}', key_id)
|
|
179
|
-
|
|
180
|
-
if key_id.nil?
|
|
355
|
+
if key_id.nil? || key_id == ''
|
|
181
356
|
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
182
357
|
end
|
|
183
358
|
|
|
359
|
+
api_path = '/project/keys/{keyId}'
|
|
360
|
+
.gsub('{keyId}', key_id)
|
|
361
|
+
|
|
184
362
|
api_params = {}
|
|
185
363
|
|
|
186
364
|
api_headers = {
|
|
@@ -212,10 +390,7 @@ module Appwrite
|
|
|
212
390
|
scopes:,
|
|
213
391
|
expire: nil
|
|
214
392
|
)
|
|
215
|
-
|
|
216
|
-
.gsub('{keyId}', key_id)
|
|
217
|
-
|
|
218
|
-
if key_id.nil?
|
|
393
|
+
if key_id.nil? || key_id == ''
|
|
219
394
|
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
220
395
|
end
|
|
221
396
|
|
|
@@ -227,6 +402,9 @@ module Appwrite
|
|
|
227
402
|
raise Appwrite::Exception.new('Missing required parameter: "scopes"')
|
|
228
403
|
end
|
|
229
404
|
|
|
405
|
+
api_path = '/project/keys/{keyId}'
|
|
406
|
+
.gsub('{keyId}', key_id)
|
|
407
|
+
|
|
230
408
|
api_params = {
|
|
231
409
|
name: name,
|
|
232
410
|
scopes: scopes,
|
|
@@ -257,18 +435,19 @@ module Appwrite
|
|
|
257
435
|
def delete_key(
|
|
258
436
|
key_id:
|
|
259
437
|
)
|
|
260
|
-
|
|
261
|
-
.gsub('{keyId}', key_id)
|
|
262
|
-
|
|
263
|
-
if key_id.nil?
|
|
438
|
+
if key_id.nil? || key_id == ''
|
|
264
439
|
raise Appwrite::Exception.new('Missing required parameter: "keyId"')
|
|
265
440
|
end
|
|
266
441
|
|
|
442
|
+
api_path = '/project/keys/{keyId}'
|
|
443
|
+
.gsub('{keyId}', key_id)
|
|
444
|
+
|
|
267
445
|
api_params = {}
|
|
268
446
|
|
|
269
447
|
api_headers = {
|
|
270
448
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
271
449
|
"content-type": 'application/json',
|
|
450
|
+
"accept": 'application/json',
|
|
272
451
|
}
|
|
273
452
|
|
|
274
453
|
@client.call(
|
|
@@ -288,12 +467,12 @@ module Appwrite
|
|
|
288
467
|
def update_labels(
|
|
289
468
|
labels:
|
|
290
469
|
)
|
|
291
|
-
api_path = '/project/labels'
|
|
292
|
-
|
|
293
470
|
if labels.nil?
|
|
294
471
|
raise Appwrite::Exception.new('Missing required parameter: "labels"')
|
|
295
472
|
end
|
|
296
473
|
|
|
474
|
+
api_path = '/project/labels'
|
|
475
|
+
|
|
297
476
|
api_params = {
|
|
298
477
|
labels: labels,
|
|
299
478
|
}
|
|
@@ -356,8 +535,6 @@ module Appwrite
|
|
|
356
535
|
number:,
|
|
357
536
|
otp:
|
|
358
537
|
)
|
|
359
|
-
api_path = '/project/mock-phones'
|
|
360
|
-
|
|
361
538
|
if number.nil?
|
|
362
539
|
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
363
540
|
end
|
|
@@ -366,6 +543,8 @@ module Appwrite
|
|
|
366
543
|
raise Appwrite::Exception.new('Missing required parameter: "otp"')
|
|
367
544
|
end
|
|
368
545
|
|
|
546
|
+
api_path = '/project/mock-phones'
|
|
547
|
+
|
|
369
548
|
api_params = {
|
|
370
549
|
number: number,
|
|
371
550
|
otp: otp,
|
|
@@ -395,13 +574,13 @@ module Appwrite
|
|
|
395
574
|
def get_mock_phone(
|
|
396
575
|
number:
|
|
397
576
|
)
|
|
398
|
-
|
|
399
|
-
.gsub('{number}', number)
|
|
400
|
-
|
|
401
|
-
if number.nil?
|
|
577
|
+
if number.nil? || number == ''
|
|
402
578
|
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
403
579
|
end
|
|
404
580
|
|
|
581
|
+
api_path = '/project/mock-phones/{number}'
|
|
582
|
+
.gsub('{number}', number)
|
|
583
|
+
|
|
405
584
|
api_params = {}
|
|
406
585
|
|
|
407
586
|
api_headers = {
|
|
@@ -429,10 +608,7 @@ module Appwrite
|
|
|
429
608
|
number:,
|
|
430
609
|
otp:
|
|
431
610
|
)
|
|
432
|
-
|
|
433
|
-
.gsub('{number}', number)
|
|
434
|
-
|
|
435
|
-
if number.nil?
|
|
611
|
+
if number.nil? || number == ''
|
|
436
612
|
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
437
613
|
end
|
|
438
614
|
|
|
@@ -440,6 +616,9 @@ module Appwrite
|
|
|
440
616
|
raise Appwrite::Exception.new('Missing required parameter: "otp"')
|
|
441
617
|
end
|
|
442
618
|
|
|
619
|
+
api_path = '/project/mock-phones/{number}'
|
|
620
|
+
.gsub('{number}', number)
|
|
621
|
+
|
|
443
622
|
api_params = {
|
|
444
623
|
otp: otp,
|
|
445
624
|
}
|
|
@@ -468,18 +647,19 @@ module Appwrite
|
|
|
468
647
|
def delete_mock_phone(
|
|
469
648
|
number:
|
|
470
649
|
)
|
|
471
|
-
|
|
472
|
-
.gsub('{number}', number)
|
|
473
|
-
|
|
474
|
-
if number.nil?
|
|
650
|
+
if number.nil? || number == ''
|
|
475
651
|
raise Appwrite::Exception.new('Missing required parameter: "number"')
|
|
476
652
|
end
|
|
477
653
|
|
|
654
|
+
api_path = '/project/mock-phones/{number}'
|
|
655
|
+
.gsub('{number}', number)
|
|
656
|
+
|
|
478
657
|
api_params = {}
|
|
479
658
|
|
|
480
659
|
api_headers = {
|
|
481
660
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
482
661
|
"content-type": 'application/json',
|
|
662
|
+
"accept": 'application/json',
|
|
483
663
|
}
|
|
484
664
|
|
|
485
665
|
@client.call(
|
|
@@ -561,8 +741,6 @@ module Appwrite
|
|
|
561
741
|
default_scopes: nil,
|
|
562
742
|
installation_scopes: nil
|
|
563
743
|
)
|
|
564
|
-
api_path = '/project/oauth2-server'
|
|
565
|
-
|
|
566
744
|
if enabled.nil?
|
|
567
745
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
568
746
|
end
|
|
@@ -571,6 +749,8 @@ module Appwrite
|
|
|
571
749
|
raise Appwrite::Exception.new('Missing required parameter: "authorizationUrl"')
|
|
572
750
|
end
|
|
573
751
|
|
|
752
|
+
api_path = '/project/oauth2-server'
|
|
753
|
+
|
|
574
754
|
api_params = {
|
|
575
755
|
enabled: enabled,
|
|
576
756
|
authorizationUrl: authorization_url,
|
|
@@ -646,7 +826,9 @@ module Appwrite
|
|
|
646
826
|
# @param [String] key_id 'Key ID' of Apple OAuth2 app. For example: P4000000N8
|
|
647
827
|
# @param [String] team_id 'Team ID' of Apple OAuth2 app. For example: D4000000R6
|
|
648
828
|
# @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-----
|
|
649
|
-
# @param [] enabled OAuth2 sign-in
|
|
829
|
+
# @param [] enabled Browser-based OAuth2 sign-in status. Set to true to enable new session creation through the redirect flow. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. Has no effect on native sign-in, which is controlled by nativeEnabled only.
|
|
830
|
+
# @param [Array] native_client_ids App bundle IDs accepted as ID token audiences for native Sign in with Apple. For example: com.example.app. Together with the Services ID, these are the only client IDs whose tokens are trusted. Pass an empty array to clear the list.
|
|
831
|
+
# @param [] native_enabled Native Sign in with Apple status. This is the only switch for creating sessions from ID tokens obtained on device and is independent of enabled. Needs a Services ID or at least one native client ID to match tokens against, but no key or team ID: this method verifies a signature rather than redeeming an authorization code.
|
|
650
832
|
#
|
|
651
833
|
# @return [OAuth2Apple]
|
|
652
834
|
def update_o_auth2_apple(
|
|
@@ -654,7 +836,9 @@ module Appwrite
|
|
|
654
836
|
key_id: nil,
|
|
655
837
|
team_id: nil,
|
|
656
838
|
p8_file: nil,
|
|
657
|
-
enabled: nil
|
|
839
|
+
enabled: nil,
|
|
840
|
+
native_client_ids: nil,
|
|
841
|
+
native_enabled: nil
|
|
658
842
|
)
|
|
659
843
|
api_path = '/project/oauth2/apple'
|
|
660
844
|
|
|
@@ -664,6 +848,8 @@ module Appwrite
|
|
|
664
848
|
teamId: team_id,
|
|
665
849
|
p8File: p8_file,
|
|
666
850
|
enabled: enabled,
|
|
851
|
+
nativeClientIds: native_client_ids,
|
|
852
|
+
nativeEnabled: native_enabled,
|
|
667
853
|
}
|
|
668
854
|
|
|
669
855
|
api_headers = {
|
|
@@ -722,13 +908,15 @@ module Appwrite
|
|
|
722
908
|
# @param [String] client_secret 'Client Secret' of Auth0 OAuth2 app. For example: zXz0000-00000000000000000000000000000-00000000000000000000PJafnF
|
|
723
909
|
# @param [String] endpoint Domain of Auth0 instance. For example: example.us.auth0.com
|
|
724
910
|
# @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
|
+
# @param [Array] prompt Array of Auth0 OAuth2 prompt values. 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. Pass an empty array to use the Auth0 default.
|
|
725
912
|
#
|
|
726
913
|
# @return [OAuth2Auth0]
|
|
727
914
|
def update_o_auth2_auth0(
|
|
728
915
|
client_id: nil,
|
|
729
916
|
client_secret: nil,
|
|
730
917
|
endpoint: nil,
|
|
731
|
-
enabled: nil
|
|
918
|
+
enabled: nil,
|
|
919
|
+
prompt: nil
|
|
732
920
|
)
|
|
733
921
|
api_path = '/project/oauth2/auth0'
|
|
734
922
|
|
|
@@ -737,6 +925,7 @@ module Appwrite
|
|
|
737
925
|
clientSecret: client_secret,
|
|
738
926
|
endpoint: endpoint,
|
|
739
927
|
enabled: enabled,
|
|
928
|
+
prompt: prompt,
|
|
740
929
|
}
|
|
741
930
|
|
|
742
931
|
api_headers = {
|
|
@@ -1007,12 +1196,14 @@ module Appwrite
|
|
|
1007
1196
|
# @param [String] client_id 'Client ID' of Discord OAuth2 app. For example: 950722000000343754
|
|
1008
1197
|
# @param [String] client_secret 'Client Secret' of Discord OAuth2 app. For example: YmPXnM000000000000000000002zFg5D
|
|
1009
1198
|
# @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.
|
|
1199
|
+
# @param [Array] prompt Array with at most one Discord OAuth2 prompt value. "none" means: skip the authorization screen for users who already authorized the app with the requested scopes. "consent" means: ask users who already authorized the app to approve it again. Pass an empty array to use the Discord default.
|
|
1010
1200
|
#
|
|
1011
1201
|
# @return [OAuth2Discord]
|
|
1012
1202
|
def update_o_auth2_discord(
|
|
1013
1203
|
client_id: nil,
|
|
1014
1204
|
client_secret: nil,
|
|
1015
|
-
enabled: nil
|
|
1205
|
+
enabled: nil,
|
|
1206
|
+
prompt: nil
|
|
1016
1207
|
)
|
|
1017
1208
|
api_path = '/project/oauth2/discord'
|
|
1018
1209
|
|
|
@@ -1020,6 +1211,7 @@ module Appwrite
|
|
|
1020
1211
|
clientId: client_id,
|
|
1021
1212
|
clientSecret: client_secret,
|
|
1022
1213
|
enabled: enabled,
|
|
1214
|
+
prompt: prompt,
|
|
1023
1215
|
}
|
|
1024
1216
|
|
|
1025
1217
|
api_headers = {
|
|
@@ -1255,12 +1447,14 @@ module Appwrite
|
|
|
1255
1447
|
# @param [String] client_id 'OAuth2 app Client ID, or App ID' of GitHub OAuth2 app. For example: e4d87900000000540733. Example of wrong value: 370006
|
|
1256
1448
|
# @param [String] client_secret 'Client Secret' of GitHub OAuth2 app. For example: 5e07c00000000000000000000000000000198bcc
|
|
1257
1449
|
# @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.
|
|
1450
|
+
# @param [Array] prompt Array of GitHub OAuth2 prompt values. "select_account" means: prompt the user to select an account. Pass an empty array to use the GitHub default.
|
|
1258
1451
|
#
|
|
1259
1452
|
# @return [OAuth2Github]
|
|
1260
1453
|
def update_o_auth2_git_hub(
|
|
1261
1454
|
client_id: nil,
|
|
1262
1455
|
client_secret: nil,
|
|
1263
|
-
enabled: nil
|
|
1456
|
+
enabled: nil,
|
|
1457
|
+
prompt: nil
|
|
1264
1458
|
)
|
|
1265
1459
|
api_path = '/project/oauth2/github'
|
|
1266
1460
|
|
|
@@ -1268,6 +1462,7 @@ module Appwrite
|
|
|
1268
1462
|
clientId: client_id,
|
|
1269
1463
|
clientSecret: client_secret,
|
|
1270
1464
|
enabled: enabled,
|
|
1465
|
+
prompt: prompt,
|
|
1271
1466
|
}
|
|
1272
1467
|
|
|
1273
1468
|
api_headers = {
|
|
@@ -1328,14 +1523,18 @@ module Appwrite
|
|
|
1328
1523
|
# @param [String] client_id 'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com
|
|
1329
1524
|
# @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj
|
|
1330
1525
|
# @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.
|
|
1331
|
-
# @param [] enabled OAuth2 sign-in
|
|
1526
|
+
# @param [] enabled Browser-based OAuth2 sign-in status. Set to true to enable new session creation through the redirect flow. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. Has no effect on native sign-in, which is controlled by nativeEnabled only.
|
|
1527
|
+
# @param [Array] native_client_ids Additional OAuth2 client IDs accepted as ID token audiences for native sign-in (Android and iOS client IDs). Together with the client ID, which is always accepted, these are the only client IDs whose tokens are trusted. Pass an empty array to clear the list.
|
|
1528
|
+
# @param [] native_enabled Native Google sign-in status. This is the only switch for creating sessions from ID tokens obtained on device and is independent of enabled. Needs a client ID or at least one native client ID to match tokens against, but no client secret: this method verifies a signature rather than redeeming an authorization code.
|
|
1332
1529
|
#
|
|
1333
1530
|
# @return [OAuth2Google]
|
|
1334
1531
|
def update_o_auth2_google(
|
|
1335
1532
|
client_id: nil,
|
|
1336
1533
|
client_secret: nil,
|
|
1337
1534
|
prompt: nil,
|
|
1338
|
-
enabled: nil
|
|
1535
|
+
enabled: nil,
|
|
1536
|
+
native_client_ids: nil,
|
|
1537
|
+
native_enabled: nil
|
|
1339
1538
|
)
|
|
1340
1539
|
api_path = '/project/oauth2/google'
|
|
1341
1540
|
|
|
@@ -1344,6 +1543,8 @@ module Appwrite
|
|
|
1344
1543
|
clientSecret: client_secret,
|
|
1345
1544
|
prompt: prompt,
|
|
1346
1545
|
enabled: enabled,
|
|
1546
|
+
nativeClientIds: native_client_ids,
|
|
1547
|
+
nativeEnabled: native_enabled,
|
|
1347
1548
|
}
|
|
1348
1549
|
|
|
1349
1550
|
api_headers = {
|
|
@@ -1396,6 +1597,44 @@ module Appwrite
|
|
|
1396
1597
|
)
|
|
1397
1598
|
end
|
|
1398
1599
|
|
|
1600
|
+
# Update the project OAuth2 Kakao configuration.
|
|
1601
|
+
#
|
|
1602
|
+
# @param [String] client_id 'REST API key' of Kakao OAuth2 app. For example: 839ff5000000000000000000013206de
|
|
1603
|
+
# @param [String] client_secret 'Client Secret' of Kakao OAuth2 app. For example: jLNVOK00000000000000000000yJebea. Generate it under Kakao Login > Security and set its status to enabled
|
|
1604
|
+
# @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.
|
|
1605
|
+
# @param [Array] prompt Array of Kakao OAuth2 prompt values. 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. "create" means: prompt the user to sign up. "select_account" means: prompt the user to select an account. Pass an empty array to use the Kakao default.
|
|
1606
|
+
#
|
|
1607
|
+
# @return [OAuth2Kakao]
|
|
1608
|
+
def update_o_auth2_kakao(
|
|
1609
|
+
client_id: nil,
|
|
1610
|
+
client_secret: nil,
|
|
1611
|
+
enabled: nil,
|
|
1612
|
+
prompt: nil
|
|
1613
|
+
)
|
|
1614
|
+
api_path = '/project/oauth2/kakao'
|
|
1615
|
+
|
|
1616
|
+
api_params = {
|
|
1617
|
+
clientId: client_id,
|
|
1618
|
+
clientSecret: client_secret,
|
|
1619
|
+
enabled: enabled,
|
|
1620
|
+
prompt: prompt,
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
api_headers = {
|
|
1624
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
1625
|
+
"content-type": 'application/json',
|
|
1626
|
+
"accept": 'application/json',
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
@client.call(
|
|
1630
|
+
method: 'PATCH',
|
|
1631
|
+
path: api_path,
|
|
1632
|
+
headers: api_headers,
|
|
1633
|
+
params: api_params,
|
|
1634
|
+
response_type: Models::OAuth2Kakao
|
|
1635
|
+
)
|
|
1636
|
+
end
|
|
1637
|
+
|
|
1399
1638
|
# Update the project OAuth2 Keycloak configuration.
|
|
1400
1639
|
#
|
|
1401
1640
|
# @param [String] client_id 'Client ID' of Keycloak OAuth2 app. For example: appwrite-o0000000st-app
|
|
@@ -1513,13 +1752,15 @@ module Appwrite
|
|
|
1513
1752
|
# @param [String] application_secret 'Entra ID Application Secret, also known as Client Secret' of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u
|
|
1514
1753
|
# @param [String] tenant Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID. For example: common
|
|
1515
1754
|
# @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
|
|
1755
|
+
# @param [Array] prompt Array of Microsoft OAuth2 prompt values. "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. Pass an empty array to use the Microsoft default.
|
|
1516
1756
|
#
|
|
1517
1757
|
# @return [OAuth2Microsoft]
|
|
1518
1758
|
def update_o_auth2_microsoft(
|
|
1519
1759
|
application_id: nil,
|
|
1520
1760
|
application_secret: nil,
|
|
1521
1761
|
tenant: nil,
|
|
1522
|
-
enabled: nil
|
|
1762
|
+
enabled: nil,
|
|
1763
|
+
prompt: nil
|
|
1523
1764
|
)
|
|
1524
1765
|
api_path = '/project/oauth2/microsoft'
|
|
1525
1766
|
|
|
@@ -1528,6 +1769,7 @@ module Appwrite
|
|
|
1528
1769
|
applicationSecret: application_secret,
|
|
1529
1770
|
tenant: tenant,
|
|
1530
1771
|
enabled: enabled,
|
|
1772
|
+
prompt: prompt,
|
|
1531
1773
|
}
|
|
1532
1774
|
|
|
1533
1775
|
api_headers = {
|
|
@@ -1640,6 +1882,7 @@ module Appwrite
|
|
|
1640
1882
|
# @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/
|
|
1641
1883
|
# @param [String] authorization_server_id Custom Authorization Servers. Optional, can be left empty or unconfigured. For example: aus000000000000000h7z
|
|
1642
1884
|
# @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.
|
|
1885
|
+
# @param [Array] prompt Array of Okta OAuth2 prompt values. 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. Pass an empty array to use the Okta default.
|
|
1643
1886
|
#
|
|
1644
1887
|
# @return [OAuth2Okta]
|
|
1645
1888
|
def update_o_auth2_okta(
|
|
@@ -1647,7 +1890,8 @@ module Appwrite
|
|
|
1647
1890
|
client_secret: nil,
|
|
1648
1891
|
domain: nil,
|
|
1649
1892
|
authorization_server_id: nil,
|
|
1650
|
-
enabled: nil
|
|
1893
|
+
enabled: nil,
|
|
1894
|
+
prompt: nil
|
|
1651
1895
|
)
|
|
1652
1896
|
api_path = '/project/oauth2/okta'
|
|
1653
1897
|
|
|
@@ -1657,6 +1901,7 @@ module Appwrite
|
|
|
1657
1901
|
domain: domain,
|
|
1658
1902
|
authorizationServerId: authorization_server_id,
|
|
1659
1903
|
enabled: enabled,
|
|
1904
|
+
prompt: prompt,
|
|
1660
1905
|
}
|
|
1661
1906
|
|
|
1662
1907
|
api_headers = {
|
|
@@ -1819,12 +2064,14 @@ module Appwrite
|
|
|
1819
2064
|
# @param [String] customer_key 'Consumer Key' of Salesforce OAuth2 app. For example: 3MVG9I0000000000000000000000000000000000000000000000000000000000000000000000000C5Aejq
|
|
1820
2065
|
# @param [String] customer_secret 'Consumer Secret' of Salesforce OAuth2 app. For example: 3w000000000000e2
|
|
1821
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.
|
|
2067
|
+
# @param [Array] prompt Array of Salesforce OAuth2 prompt values. "login" means: prompt the user to re-authenticate. "consent" means: prompt the user for consent. Pass an empty array to use the Salesforce default.
|
|
1822
2068
|
#
|
|
1823
2069
|
# @return [OAuth2Salesforce]
|
|
1824
2070
|
def update_o_auth2_salesforce(
|
|
1825
2071
|
customer_key: nil,
|
|
1826
2072
|
customer_secret: nil,
|
|
1827
|
-
enabled: nil
|
|
2073
|
+
enabled: nil,
|
|
2074
|
+
prompt: nil
|
|
1828
2075
|
)
|
|
1829
2076
|
api_path = '/project/oauth2/salesforce'
|
|
1830
2077
|
|
|
@@ -1832,6 +2079,7 @@ module Appwrite
|
|
|
1832
2079
|
customerKey: customer_key,
|
|
1833
2080
|
customerSecret: customer_secret,
|
|
1834
2081
|
enabled: enabled,
|
|
2082
|
+
prompt: prompt,
|
|
1835
2083
|
}
|
|
1836
2084
|
|
|
1837
2085
|
api_headers = {
|
|
@@ -1954,6 +2202,41 @@ module Appwrite
|
|
|
1954
2202
|
)
|
|
1955
2203
|
end
|
|
1956
2204
|
|
|
2205
|
+
# Update the project OAuth2 TikTok configuration.
|
|
2206
|
+
#
|
|
2207
|
+
# @param [String] client_id 'Client key' of TikTok OAuth2 app. For example: awz000000000tyw0
|
|
2208
|
+
# @param [String] client_secret 'Client secret' of TikTok OAuth2 app. For example: 6wXewM00000000000000000000yXnite
|
|
2209
|
+
# @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.
|
|
2210
|
+
#
|
|
2211
|
+
# @return [OAuth2TikTok]
|
|
2212
|
+
def update_o_auth2_tik_tok(
|
|
2213
|
+
client_id: nil,
|
|
2214
|
+
client_secret: nil,
|
|
2215
|
+
enabled: nil
|
|
2216
|
+
)
|
|
2217
|
+
api_path = '/project/oauth2/tiktok'
|
|
2218
|
+
|
|
2219
|
+
api_params = {
|
|
2220
|
+
clientId: client_id,
|
|
2221
|
+
clientSecret: client_secret,
|
|
2222
|
+
enabled: enabled,
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
api_headers = {
|
|
2226
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
2227
|
+
"content-type": 'application/json',
|
|
2228
|
+
"accept": 'application/json',
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
@client.call(
|
|
2232
|
+
method: 'PATCH',
|
|
2233
|
+
path: api_path,
|
|
2234
|
+
headers: api_headers,
|
|
2235
|
+
params: api_params,
|
|
2236
|
+
response_type: Models::OAuth2TikTok
|
|
2237
|
+
)
|
|
2238
|
+
end
|
|
2239
|
+
|
|
1957
2240
|
# Update the project OAuth2 Tradeshift configuration.
|
|
1958
2241
|
#
|
|
1959
2242
|
# @param [String] oauth2_client_id 'OAuth2 Client ID' of Tradeshift OAuth2 app. For example: appwrite-tes00000.0000000000est-app
|
|
@@ -2024,19 +2307,54 @@ module Appwrite
|
|
|
2024
2307
|
)
|
|
2025
2308
|
end
|
|
2026
2309
|
|
|
2027
|
-
# Update the project OAuth2 Twitch configuration.
|
|
2310
|
+
# Update the project OAuth2 Twitch configuration.
|
|
2311
|
+
#
|
|
2312
|
+
# @param [String] client_id 'Client ID' of Twitch OAuth2 app. For example: vvi0in000000000000000000ikmt9p
|
|
2313
|
+
# @param [String] client_secret 'Client Secret' of Twitch OAuth2 app. For example: pmapue000000000000000000zylw3v
|
|
2314
|
+
# @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.
|
|
2315
|
+
#
|
|
2316
|
+
# @return [OAuth2Twitch]
|
|
2317
|
+
def update_o_auth2_twitch(
|
|
2318
|
+
client_id: nil,
|
|
2319
|
+
client_secret: nil,
|
|
2320
|
+
enabled: nil
|
|
2321
|
+
)
|
|
2322
|
+
api_path = '/project/oauth2/twitch'
|
|
2323
|
+
|
|
2324
|
+
api_params = {
|
|
2325
|
+
clientId: client_id,
|
|
2326
|
+
clientSecret: client_secret,
|
|
2327
|
+
enabled: enabled,
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
api_headers = {
|
|
2331
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
2332
|
+
"content-type": 'application/json',
|
|
2333
|
+
"accept": 'application/json',
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
@client.call(
|
|
2337
|
+
method: 'PATCH',
|
|
2338
|
+
path: api_path,
|
|
2339
|
+
headers: api_headers,
|
|
2340
|
+
params: api_params,
|
|
2341
|
+
response_type: Models::OAuth2Twitch
|
|
2342
|
+
)
|
|
2343
|
+
end
|
|
2344
|
+
|
|
2345
|
+
# Update the project OAuth2 Webflow configuration.
|
|
2028
2346
|
#
|
|
2029
|
-
# @param [String] client_id 'Client ID' of
|
|
2030
|
-
# @param [String] client_secret 'Client Secret' of
|
|
2347
|
+
# @param [String] client_id 'Client ID' of Webflow OAuth2 app. For example: 8bb20000000000000000000000000000000000000000000000000000000040dd
|
|
2348
|
+
# @param [String] client_secret 'Client Secret' of Webflow OAuth2 app. For example: 59bf00000000000000000000000000000000000000000000000000000000fe59
|
|
2031
2349
|
# @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.
|
|
2032
2350
|
#
|
|
2033
|
-
# @return [
|
|
2034
|
-
def
|
|
2351
|
+
# @return [OAuth2Webflow]
|
|
2352
|
+
def update_o_auth2_webflow(
|
|
2035
2353
|
client_id: nil,
|
|
2036
2354
|
client_secret: nil,
|
|
2037
2355
|
enabled: nil
|
|
2038
2356
|
)
|
|
2039
|
-
api_path = '/project/oauth2/
|
|
2357
|
+
api_path = '/project/oauth2/webflow'
|
|
2040
2358
|
|
|
2041
2359
|
api_params = {
|
|
2042
2360
|
clientId: client_id,
|
|
@@ -2055,7 +2373,7 @@ module Appwrite
|
|
|
2055
2373
|
path: api_path,
|
|
2056
2374
|
headers: api_headers,
|
|
2057
2375
|
params: api_params,
|
|
2058
|
-
response_type: Models::
|
|
2376
|
+
response_type: Models::OAuth2Webflow
|
|
2059
2377
|
)
|
|
2060
2378
|
end
|
|
2061
2379
|
|
|
@@ -2204,12 +2522,14 @@ module Appwrite
|
|
|
2204
2522
|
# @param [String] client_id 'Client ID' of Zoho OAuth2 app. For example: 1000.83C178000000000000000000RPNX0B
|
|
2205
2523
|
# @param [String] client_secret 'Client Secret' of Zoho OAuth2 app. For example: fb5cac000000000000000000000000000000a68f6e
|
|
2206
2524
|
# @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.
|
|
2525
|
+
# @param [Array] prompt Array of Zoho OAuth2 prompt values. "consent" means: prompt the user for consent. Pass an empty array to use the Zoho default.
|
|
2207
2526
|
#
|
|
2208
2527
|
# @return [OAuth2Zoho]
|
|
2209
2528
|
def update_o_auth2_zoho(
|
|
2210
2529
|
client_id: nil,
|
|
2211
2530
|
client_secret: nil,
|
|
2212
|
-
enabled: nil
|
|
2531
|
+
enabled: nil,
|
|
2532
|
+
prompt: nil
|
|
2213
2533
|
)
|
|
2214
2534
|
api_path = '/project/oauth2/zoho'
|
|
2215
2535
|
|
|
@@ -2217,6 +2537,7 @@ module Appwrite
|
|
|
2217
2537
|
clientId: client_id,
|
|
2218
2538
|
clientSecret: client_secret,
|
|
2219
2539
|
enabled: enabled,
|
|
2540
|
+
prompt: prompt,
|
|
2220
2541
|
}
|
|
2221
2542
|
|
|
2222
2543
|
api_headers = {
|
|
@@ -2274,17 +2595,17 @@ module Appwrite
|
|
|
2274
2595
|
#
|
|
2275
2596
|
# @param [ProjectOAuthProviderId] provider_id OAuth2 provider key. For example: github, google, apple.
|
|
2276
2597
|
#
|
|
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]
|
|
2598
|
+
# @return [OAuth2Github, OAuth2Discord, OAuth2Figma, OAuth2Dropbox, OAuth2Dailymotion, OAuth2Bitbucket, OAuth2Bitly, OAuth2Box, OAuth2Autodesk, OAuth2Google, OAuth2Zoom, OAuth2Zoho, OAuth2Yandex, OAuth2X, OAuth2WordPress, OAuth2Webflow, 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, OAuth2TikTok, OAuth2Kakao]
|
|
2278
2599
|
def get_o_auth2_provider(
|
|
2279
2600
|
provider_id:
|
|
2280
2601
|
)
|
|
2281
|
-
api_path = '/project/oauth2/{providerId}'
|
|
2282
|
-
.gsub('{providerId}', provider_id)
|
|
2283
|
-
|
|
2284
2602
|
if provider_id.nil?
|
|
2285
2603
|
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
2286
2604
|
end
|
|
2287
2605
|
|
|
2606
|
+
api_path = '/project/oauth2/{providerId}'
|
|
2607
|
+
.gsub('{providerId}', provider_id)
|
|
2608
|
+
|
|
2288
2609
|
api_params = {}
|
|
2289
2610
|
|
|
2290
2611
|
api_headers = {
|
|
@@ -2378,6 +2699,11 @@ module Appwrite
|
|
|
2378
2699
|
return Models::OAuth2WordPress.from(map: response)
|
|
2379
2700
|
end
|
|
2380
2701
|
|
|
2702
|
+
if response['$id'] == 'webflow'
|
|
2703
|
+
|
|
2704
|
+
return Models::OAuth2Webflow.from(map: response)
|
|
2705
|
+
end
|
|
2706
|
+
|
|
2381
2707
|
if response['$id'] == 'twitch'
|
|
2382
2708
|
|
|
2383
2709
|
return Models::OAuth2Twitch.from(map: response)
|
|
@@ -2518,6 +2844,16 @@ module Appwrite
|
|
|
2518
2844
|
return Models::OAuth2Microsoft.from(map: response)
|
|
2519
2845
|
end
|
|
2520
2846
|
|
|
2847
|
+
if response['$id'] == 'tiktok'
|
|
2848
|
+
|
|
2849
|
+
return Models::OAuth2TikTok.from(map: response)
|
|
2850
|
+
end
|
|
2851
|
+
|
|
2852
|
+
if response['$id'] == 'kakao'
|
|
2853
|
+
|
|
2854
|
+
return Models::OAuth2Kakao.from(map: response)
|
|
2855
|
+
end
|
|
2856
|
+
|
|
2521
2857
|
raise Exception, "Unable to match response to any expected response model"
|
|
2522
2858
|
end
|
|
2523
2859
|
|
|
@@ -2560,15 +2896,15 @@ module Appwrite
|
|
|
2560
2896
|
# @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.
|
|
2561
2897
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2562
2898
|
# @param [String] application_id Android application ID. Max length: 256 chars.
|
|
2899
|
+
# @param [Array] fingerprints SHA-256 fingerprints of the certificates your app is signed with, such as "14:6D:E9:...:2B:6A". Passkeys created in the app are accepted when its signature matches one. Find them under App signing in Play Console, or with `./gradlew signingReport`.
|
|
2563
2900
|
#
|
|
2564
2901
|
# @return [PlatformAndroid]
|
|
2565
2902
|
def create_android_platform(
|
|
2566
2903
|
platform_id:,
|
|
2567
2904
|
name:,
|
|
2568
|
-
application_id
|
|
2905
|
+
application_id:,
|
|
2906
|
+
fingerprints: nil
|
|
2569
2907
|
)
|
|
2570
|
-
api_path = '/project/platforms/android'
|
|
2571
|
-
|
|
2572
2908
|
if platform_id.nil?
|
|
2573
2909
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2574
2910
|
end
|
|
@@ -2581,10 +2917,13 @@ module Appwrite
|
|
|
2581
2917
|
raise Appwrite::Exception.new('Missing required parameter: "applicationId"')
|
|
2582
2918
|
end
|
|
2583
2919
|
|
|
2920
|
+
api_path = '/project/platforms/android'
|
|
2921
|
+
|
|
2584
2922
|
api_params = {
|
|
2585
2923
|
platformId: platform_id,
|
|
2586
2924
|
name: name,
|
|
2587
2925
|
applicationId: application_id,
|
|
2926
|
+
fingerprints: fingerprints,
|
|
2588
2927
|
}
|
|
2589
2928
|
|
|
2590
2929
|
api_headers = {
|
|
@@ -2603,22 +2942,21 @@ module Appwrite
|
|
|
2603
2942
|
end
|
|
2604
2943
|
|
|
2605
2944
|
# Update an Android platform by its unique ID. Use this endpoint to update
|
|
2606
|
-
# the platform's name or
|
|
2945
|
+
# the platform's name, application ID or signing certificate fingerprints.
|
|
2607
2946
|
#
|
|
2608
2947
|
# @param [String] platform_id Platform ID.
|
|
2609
2948
|
# @param [String] name Platform name. Max length: 128 chars.
|
|
2610
2949
|
# @param [String] application_id Android application ID. Max length: 256 chars.
|
|
2950
|
+
# @param [Array] fingerprints SHA-256 fingerprints of the certificates your app is signed with, such as "14:6D:E9:...:2B:6A". Passkeys created in the app are accepted when its signature matches one. Find them under App signing in Play Console, or with `./gradlew signingReport`. Omit to keep the current list, or pass an empty array to clear it.
|
|
2611
2951
|
#
|
|
2612
2952
|
# @return [PlatformAndroid]
|
|
2613
2953
|
def update_android_platform(
|
|
2614
2954
|
platform_id:,
|
|
2615
2955
|
name:,
|
|
2616
|
-
application_id
|
|
2956
|
+
application_id:,
|
|
2957
|
+
fingerprints: nil
|
|
2617
2958
|
)
|
|
2618
|
-
|
|
2619
|
-
.gsub('{platformId}', platform_id)
|
|
2620
|
-
|
|
2621
|
-
if platform_id.nil?
|
|
2959
|
+
if platform_id.nil? || platform_id == ''
|
|
2622
2960
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2623
2961
|
end
|
|
2624
2962
|
|
|
@@ -2630,9 +2968,13 @@ module Appwrite
|
|
|
2630
2968
|
raise Appwrite::Exception.new('Missing required parameter: "applicationId"')
|
|
2631
2969
|
end
|
|
2632
2970
|
|
|
2971
|
+
api_path = '/project/platforms/android/{platformId}'
|
|
2972
|
+
.gsub('{platformId}', platform_id)
|
|
2973
|
+
|
|
2633
2974
|
api_params = {
|
|
2634
2975
|
name: name,
|
|
2635
2976
|
applicationId: application_id,
|
|
2977
|
+
fingerprints: fingerprints,
|
|
2636
2978
|
}
|
|
2637
2979
|
|
|
2638
2980
|
api_headers = {
|
|
@@ -2664,8 +3006,6 @@ module Appwrite
|
|
|
2664
3006
|
name:,
|
|
2665
3007
|
bundle_identifier:
|
|
2666
3008
|
)
|
|
2667
|
-
api_path = '/project/platforms/apple'
|
|
2668
|
-
|
|
2669
3009
|
if platform_id.nil?
|
|
2670
3010
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2671
3011
|
end
|
|
@@ -2678,6 +3018,8 @@ module Appwrite
|
|
|
2678
3018
|
raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"')
|
|
2679
3019
|
end
|
|
2680
3020
|
|
|
3021
|
+
api_path = '/project/platforms/apple'
|
|
3022
|
+
|
|
2681
3023
|
api_params = {
|
|
2682
3024
|
platformId: platform_id,
|
|
2683
3025
|
name: name,
|
|
@@ -2712,10 +3054,7 @@ module Appwrite
|
|
|
2712
3054
|
name:,
|
|
2713
3055
|
bundle_identifier:
|
|
2714
3056
|
)
|
|
2715
|
-
|
|
2716
|
-
.gsub('{platformId}', platform_id)
|
|
2717
|
-
|
|
2718
|
-
if platform_id.nil?
|
|
3057
|
+
if platform_id.nil? || platform_id == ''
|
|
2719
3058
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2720
3059
|
end
|
|
2721
3060
|
|
|
@@ -2727,6 +3066,9 @@ module Appwrite
|
|
|
2727
3066
|
raise Appwrite::Exception.new('Missing required parameter: "bundleIdentifier"')
|
|
2728
3067
|
end
|
|
2729
3068
|
|
|
3069
|
+
api_path = '/project/platforms/apple/{platformId}'
|
|
3070
|
+
.gsub('{platformId}', platform_id)
|
|
3071
|
+
|
|
2730
3072
|
api_params = {
|
|
2731
3073
|
name: name,
|
|
2732
3074
|
bundleIdentifier: bundle_identifier,
|
|
@@ -2761,8 +3103,6 @@ module Appwrite
|
|
|
2761
3103
|
name:,
|
|
2762
3104
|
package_name:
|
|
2763
3105
|
)
|
|
2764
|
-
api_path = '/project/platforms/linux'
|
|
2765
|
-
|
|
2766
3106
|
if platform_id.nil?
|
|
2767
3107
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2768
3108
|
end
|
|
@@ -2775,6 +3115,8 @@ module Appwrite
|
|
|
2775
3115
|
raise Appwrite::Exception.new('Missing required parameter: "packageName"')
|
|
2776
3116
|
end
|
|
2777
3117
|
|
|
3118
|
+
api_path = '/project/platforms/linux'
|
|
3119
|
+
|
|
2778
3120
|
api_params = {
|
|
2779
3121
|
platformId: platform_id,
|
|
2780
3122
|
name: name,
|
|
@@ -2809,10 +3151,7 @@ module Appwrite
|
|
|
2809
3151
|
name:,
|
|
2810
3152
|
package_name:
|
|
2811
3153
|
)
|
|
2812
|
-
|
|
2813
|
-
.gsub('{platformId}', platform_id)
|
|
2814
|
-
|
|
2815
|
-
if platform_id.nil?
|
|
3154
|
+
if platform_id.nil? || platform_id == ''
|
|
2816
3155
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2817
3156
|
end
|
|
2818
3157
|
|
|
@@ -2824,6 +3163,9 @@ module Appwrite
|
|
|
2824
3163
|
raise Appwrite::Exception.new('Missing required parameter: "packageName"')
|
|
2825
3164
|
end
|
|
2826
3165
|
|
|
3166
|
+
api_path = '/project/platforms/linux/{platformId}'
|
|
3167
|
+
.gsub('{platformId}', platform_id)
|
|
3168
|
+
|
|
2827
3169
|
api_params = {
|
|
2828
3170
|
name: name,
|
|
2829
3171
|
packageName: package_name,
|
|
@@ -2858,8 +3200,6 @@ module Appwrite
|
|
|
2858
3200
|
name:,
|
|
2859
3201
|
hostname:
|
|
2860
3202
|
)
|
|
2861
|
-
api_path = '/project/platforms/web'
|
|
2862
|
-
|
|
2863
3203
|
if platform_id.nil?
|
|
2864
3204
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2865
3205
|
end
|
|
@@ -2872,6 +3212,8 @@ module Appwrite
|
|
|
2872
3212
|
raise Appwrite::Exception.new('Missing required parameter: "hostname"')
|
|
2873
3213
|
end
|
|
2874
3214
|
|
|
3215
|
+
api_path = '/project/platforms/web'
|
|
3216
|
+
|
|
2875
3217
|
api_params = {
|
|
2876
3218
|
platformId: platform_id,
|
|
2877
3219
|
name: name,
|
|
@@ -2906,10 +3248,7 @@ module Appwrite
|
|
|
2906
3248
|
name:,
|
|
2907
3249
|
hostname:
|
|
2908
3250
|
)
|
|
2909
|
-
|
|
2910
|
-
.gsub('{platformId}', platform_id)
|
|
2911
|
-
|
|
2912
|
-
if platform_id.nil?
|
|
3251
|
+
if platform_id.nil? || platform_id == ''
|
|
2913
3252
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2914
3253
|
end
|
|
2915
3254
|
|
|
@@ -2921,6 +3260,9 @@ module Appwrite
|
|
|
2921
3260
|
raise Appwrite::Exception.new('Missing required parameter: "hostname"')
|
|
2922
3261
|
end
|
|
2923
3262
|
|
|
3263
|
+
api_path = '/project/platforms/web/{platformId}'
|
|
3264
|
+
.gsub('{platformId}', platform_id)
|
|
3265
|
+
|
|
2924
3266
|
api_params = {
|
|
2925
3267
|
name: name,
|
|
2926
3268
|
hostname: hostname,
|
|
@@ -2955,8 +3297,6 @@ module Appwrite
|
|
|
2955
3297
|
name:,
|
|
2956
3298
|
package_identifier_name:
|
|
2957
3299
|
)
|
|
2958
|
-
api_path = '/project/platforms/windows'
|
|
2959
|
-
|
|
2960
3300
|
if platform_id.nil?
|
|
2961
3301
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
2962
3302
|
end
|
|
@@ -2969,6 +3309,8 @@ module Appwrite
|
|
|
2969
3309
|
raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"')
|
|
2970
3310
|
end
|
|
2971
3311
|
|
|
3312
|
+
api_path = '/project/platforms/windows'
|
|
3313
|
+
|
|
2972
3314
|
api_params = {
|
|
2973
3315
|
platformId: platform_id,
|
|
2974
3316
|
name: name,
|
|
@@ -3003,10 +3345,7 @@ module Appwrite
|
|
|
3003
3345
|
name:,
|
|
3004
3346
|
package_identifier_name:
|
|
3005
3347
|
)
|
|
3006
|
-
|
|
3007
|
-
.gsub('{platformId}', platform_id)
|
|
3008
|
-
|
|
3009
|
-
if platform_id.nil?
|
|
3348
|
+
if platform_id.nil? || platform_id == ''
|
|
3010
3349
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
3011
3350
|
end
|
|
3012
3351
|
|
|
@@ -3018,6 +3357,9 @@ module Appwrite
|
|
|
3018
3357
|
raise Appwrite::Exception.new('Missing required parameter: "packageIdentifierName"')
|
|
3019
3358
|
end
|
|
3020
3359
|
|
|
3360
|
+
api_path = '/project/platforms/windows/{platformId}'
|
|
3361
|
+
.gsub('{platformId}', platform_id)
|
|
3362
|
+
|
|
3021
3363
|
api_params = {
|
|
3022
3364
|
name: name,
|
|
3023
3365
|
packageIdentifierName: package_identifier_name,
|
|
@@ -3047,13 +3389,13 @@ module Appwrite
|
|
|
3047
3389
|
def get_platform(
|
|
3048
3390
|
platform_id:
|
|
3049
3391
|
)
|
|
3050
|
-
|
|
3051
|
-
.gsub('{platformId}', platform_id)
|
|
3052
|
-
|
|
3053
|
-
if platform_id.nil?
|
|
3392
|
+
if platform_id.nil? || platform_id == ''
|
|
3054
3393
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
3055
3394
|
end
|
|
3056
3395
|
|
|
3396
|
+
api_path = '/project/platforms/{platformId}'
|
|
3397
|
+
.gsub('{platformId}', platform_id)
|
|
3398
|
+
|
|
3057
3399
|
api_params = {}
|
|
3058
3400
|
|
|
3059
3401
|
api_headers = {
|
|
@@ -3109,18 +3451,19 @@ module Appwrite
|
|
|
3109
3451
|
def delete_platform(
|
|
3110
3452
|
platform_id:
|
|
3111
3453
|
)
|
|
3112
|
-
|
|
3113
|
-
.gsub('{platformId}', platform_id)
|
|
3114
|
-
|
|
3115
|
-
if platform_id.nil?
|
|
3454
|
+
if platform_id.nil? || platform_id == ''
|
|
3116
3455
|
raise Appwrite::Exception.new('Missing required parameter: "platformId"')
|
|
3117
3456
|
end
|
|
3118
3457
|
|
|
3458
|
+
api_path = '/project/platforms/{platformId}'
|
|
3459
|
+
.gsub('{platformId}', platform_id)
|
|
3460
|
+
|
|
3119
3461
|
api_params = {}
|
|
3120
3462
|
|
|
3121
3463
|
api_headers = {
|
|
3122
3464
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
3123
3465
|
"content-type": 'application/json',
|
|
3466
|
+
"accept": 'application/json',
|
|
3124
3467
|
}
|
|
3125
3468
|
|
|
3126
3469
|
@client.call(
|
|
@@ -3171,12 +3514,12 @@ module Appwrite
|
|
|
3171
3514
|
def update_deny_aliased_email_policy(
|
|
3172
3515
|
enabled:
|
|
3173
3516
|
)
|
|
3174
|
-
api_path = '/project/policies/deny-aliased-email'
|
|
3175
|
-
|
|
3176
3517
|
if enabled.nil?
|
|
3177
3518
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3178
3519
|
end
|
|
3179
3520
|
|
|
3521
|
+
api_path = '/project/policies/deny-aliased-email'
|
|
3522
|
+
|
|
3180
3523
|
api_params = {
|
|
3181
3524
|
enabled: enabled,
|
|
3182
3525
|
}
|
|
@@ -3205,12 +3548,12 @@ module Appwrite
|
|
|
3205
3548
|
def update_deny_corporate_email_policy(
|
|
3206
3549
|
enabled:
|
|
3207
3550
|
)
|
|
3208
|
-
api_path = '/project/policies/deny-corporate-email'
|
|
3209
|
-
|
|
3210
3551
|
if enabled.nil?
|
|
3211
3552
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3212
3553
|
end
|
|
3213
3554
|
|
|
3555
|
+
api_path = '/project/policies/deny-corporate-email'
|
|
3556
|
+
|
|
3214
3557
|
api_params = {
|
|
3215
3558
|
enabled: enabled,
|
|
3216
3559
|
}
|
|
@@ -3239,12 +3582,12 @@ module Appwrite
|
|
|
3239
3582
|
def update_deny_disposable_email_policy(
|
|
3240
3583
|
enabled:
|
|
3241
3584
|
)
|
|
3242
|
-
api_path = '/project/policies/deny-disposable-email'
|
|
3243
|
-
|
|
3244
3585
|
if enabled.nil?
|
|
3245
3586
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3246
3587
|
end
|
|
3247
3588
|
|
|
3589
|
+
api_path = '/project/policies/deny-disposable-email'
|
|
3590
|
+
|
|
3248
3591
|
api_params = {
|
|
3249
3592
|
enabled: enabled,
|
|
3250
3593
|
}
|
|
@@ -3273,12 +3616,12 @@ module Appwrite
|
|
|
3273
3616
|
def update_deny_free_email_policy(
|
|
3274
3617
|
enabled:
|
|
3275
3618
|
)
|
|
3276
|
-
api_path = '/project/policies/deny-free-email'
|
|
3277
|
-
|
|
3278
3619
|
if enabled.nil?
|
|
3279
3620
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3280
3621
|
end
|
|
3281
3622
|
|
|
3623
|
+
api_path = '/project/policies/deny-free-email'
|
|
3624
|
+
|
|
3282
3625
|
api_params = {
|
|
3283
3626
|
enabled: enabled,
|
|
3284
3627
|
}
|
|
@@ -3434,12 +3777,12 @@ module Appwrite
|
|
|
3434
3777
|
def update_password_dictionary_policy(
|
|
3435
3778
|
enabled:
|
|
3436
3779
|
)
|
|
3437
|
-
api_path = '/project/policies/password-dictionary'
|
|
3438
|
-
|
|
3439
3780
|
if enabled.nil?
|
|
3440
3781
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3441
3782
|
end
|
|
3442
3783
|
|
|
3784
|
+
api_path = '/project/policies/password-dictionary'
|
|
3785
|
+
|
|
3443
3786
|
api_params = {
|
|
3444
3787
|
enabled: enabled,
|
|
3445
3788
|
}
|
|
@@ -3475,12 +3818,12 @@ module Appwrite
|
|
|
3475
3818
|
def update_password_history_policy(
|
|
3476
3819
|
total:
|
|
3477
3820
|
)
|
|
3478
|
-
api_path = '/project/policies/password-history'
|
|
3479
|
-
|
|
3480
3821
|
if total.nil?
|
|
3481
3822
|
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3482
3823
|
end
|
|
3483
3824
|
|
|
3825
|
+
api_path = '/project/policies/password-history'
|
|
3826
|
+
|
|
3484
3827
|
api_params = {
|
|
3485
3828
|
total: total,
|
|
3486
3829
|
}
|
|
@@ -3511,14 +3854,90 @@ module Appwrite
|
|
|
3511
3854
|
def update_password_personal_data_policy(
|
|
3512
3855
|
enabled:
|
|
3513
3856
|
)
|
|
3514
|
-
api_path = '/project/policies/password-personal-data'
|
|
3515
|
-
|
|
3516
3857
|
if enabled.nil?
|
|
3517
3858
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3518
3859
|
end
|
|
3519
3860
|
|
|
3861
|
+
api_path = '/project/policies/password-personal-data'
|
|
3862
|
+
|
|
3863
|
+
api_params = {
|
|
3864
|
+
enabled: enabled,
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
api_headers = {
|
|
3868
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
3869
|
+
"content-type": 'application/json',
|
|
3870
|
+
"accept": 'application/json',
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
@client.call(
|
|
3874
|
+
method: 'PATCH',
|
|
3875
|
+
path: api_path,
|
|
3876
|
+
headers: api_headers,
|
|
3877
|
+
params: api_params,
|
|
3878
|
+
response_type: Models::Project
|
|
3879
|
+
)
|
|
3880
|
+
end
|
|
3881
|
+
|
|
3882
|
+
# Updating this policy allows you to control if passwords are checked against
|
|
3883
|
+
# the Have I Been Pwned breach database. When enabled, every password a user
|
|
3884
|
+
# signs up, signs in or resets with is checked and the result is recorded on
|
|
3885
|
+
# the user as `passwordPwned`. On its own the policy only records. Enable
|
|
3886
|
+
# `users` to reject a breached password when a user signs up or sets a new
|
|
3887
|
+
# password, and `sessions` to refuse a sign-in with a breached password until
|
|
3888
|
+
# it is reset. Only the first five characters of the password hash are ever
|
|
3889
|
+
# shared with the service. Options left out keep their current value.
|
|
3890
|
+
#
|
|
3891
|
+
# @param [] enabled Toggle password pwned policy. Set to true to check passwords against known data breaches and record the result on the user, or false to never check. Default is true. On its own this only records; use `users` and `sessions` to block. When changing this policy, existing passwords remain valid.
|
|
3892
|
+
# @param [] sessions Whether a sign-in with a breached password is refused until the password is reset. Default is false, which allows the sign-in and only records the result.
|
|
3893
|
+
# @param [] users Whether a breached password is rejected when a user signs up or sets a new password. Default is false, which allows the password and only records the result.
|
|
3894
|
+
#
|
|
3895
|
+
# @return [Project]
|
|
3896
|
+
def update_password_pwned_policy(
|
|
3897
|
+
enabled: nil,
|
|
3898
|
+
sessions: nil,
|
|
3899
|
+
users: nil
|
|
3900
|
+
)
|
|
3901
|
+
api_path = '/project/policies/password-pwned'
|
|
3902
|
+
|
|
3903
|
+
api_params = {
|
|
3904
|
+
enabled: enabled,
|
|
3905
|
+
sessions: sessions,
|
|
3906
|
+
users: users,
|
|
3907
|
+
}
|
|
3908
|
+
|
|
3909
|
+
api_headers = {
|
|
3910
|
+
"X-Appwrite-Project": @client.get_config('project'),
|
|
3911
|
+
"content-type": 'application/json',
|
|
3912
|
+
"accept": 'application/json',
|
|
3913
|
+
}
|
|
3914
|
+
|
|
3915
|
+
@client.call(
|
|
3916
|
+
method: 'PATCH',
|
|
3917
|
+
path: api_path,
|
|
3918
|
+
headers: api_headers,
|
|
3919
|
+
params: api_params,
|
|
3920
|
+
response_type: Models::Project
|
|
3921
|
+
)
|
|
3922
|
+
end
|
|
3923
|
+
|
|
3924
|
+
# Require a password reset when an email/password sign-in uses a password
|
|
3925
|
+
# older than the configured maximum age. Options left out keep their current
|
|
3926
|
+
# value.
|
|
3927
|
+
#
|
|
3928
|
+
# @param [] enabled Enable password rotation. Disabled by default.
|
|
3929
|
+
# @param [Integer] max_age Maximum password age in seconds. Minimum allowed value is 86400 seconds (1 day), and maximum is 10 years, which is 315360000 seconds. Defaults to 1 year, which is 31536000 seconds.
|
|
3930
|
+
#
|
|
3931
|
+
# @return [Project]
|
|
3932
|
+
def update_password_rotation_policy(
|
|
3933
|
+
enabled: nil,
|
|
3934
|
+
max_age: nil
|
|
3935
|
+
)
|
|
3936
|
+
api_path = '/project/policies/password-rotation'
|
|
3937
|
+
|
|
3520
3938
|
api_params = {
|
|
3521
3939
|
enabled: enabled,
|
|
3940
|
+
maxAge: max_age,
|
|
3522
3941
|
}
|
|
3523
3942
|
|
|
3524
3943
|
api_headers = {
|
|
@@ -3589,12 +4008,12 @@ module Appwrite
|
|
|
3589
4008
|
def update_session_alert_policy(
|
|
3590
4009
|
enabled:
|
|
3591
4010
|
)
|
|
3592
|
-
api_path = '/project/policies/session-alert'
|
|
3593
|
-
|
|
3594
4011
|
if enabled.nil?
|
|
3595
4012
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3596
4013
|
end
|
|
3597
4014
|
|
|
4015
|
+
api_path = '/project/policies/session-alert'
|
|
4016
|
+
|
|
3598
4017
|
api_params = {
|
|
3599
4018
|
enabled: enabled,
|
|
3600
4019
|
}
|
|
@@ -3623,12 +4042,12 @@ module Appwrite
|
|
|
3623
4042
|
def update_session_duration_policy(
|
|
3624
4043
|
duration:
|
|
3625
4044
|
)
|
|
3626
|
-
api_path = '/project/policies/session-duration'
|
|
3627
|
-
|
|
3628
4045
|
if duration.nil?
|
|
3629
4046
|
raise Appwrite::Exception.new('Missing required parameter: "duration"')
|
|
3630
4047
|
end
|
|
3631
4048
|
|
|
4049
|
+
api_path = '/project/policies/session-duration'
|
|
4050
|
+
|
|
3632
4051
|
api_params = {
|
|
3633
4052
|
duration: duration,
|
|
3634
4053
|
}
|
|
@@ -3658,12 +4077,12 @@ module Appwrite
|
|
|
3658
4077
|
def update_session_invalidation_policy(
|
|
3659
4078
|
enabled:
|
|
3660
4079
|
)
|
|
3661
|
-
api_path = '/project/policies/session-invalidation'
|
|
3662
|
-
|
|
3663
4080
|
if enabled.nil?
|
|
3664
4081
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3665
4082
|
end
|
|
3666
4083
|
|
|
4084
|
+
api_path = '/project/policies/session-invalidation'
|
|
4085
|
+
|
|
3667
4086
|
api_params = {
|
|
3668
4087
|
enabled: enabled,
|
|
3669
4088
|
}
|
|
@@ -3692,12 +4111,12 @@ module Appwrite
|
|
|
3692
4111
|
def update_session_limit_policy(
|
|
3693
4112
|
total:
|
|
3694
4113
|
)
|
|
3695
|
-
api_path = '/project/policies/session-limit'
|
|
3696
|
-
|
|
3697
4114
|
if total.nil?
|
|
3698
4115
|
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3699
4116
|
end
|
|
3700
4117
|
|
|
4118
|
+
api_path = '/project/policies/session-limit'
|
|
4119
|
+
|
|
3701
4120
|
api_params = {
|
|
3702
4121
|
total: total,
|
|
3703
4122
|
}
|
|
@@ -3727,12 +4146,12 @@ module Appwrite
|
|
|
3727
4146
|
def update_user_limit_policy(
|
|
3728
4147
|
total:
|
|
3729
4148
|
)
|
|
3730
|
-
api_path = '/project/policies/user-limit'
|
|
3731
|
-
|
|
3732
4149
|
if total.nil?
|
|
3733
4150
|
raise Appwrite::Exception.new('Missing required parameter: "total"')
|
|
3734
4151
|
end
|
|
3735
4152
|
|
|
4153
|
+
api_path = '/project/policies/user-limit'
|
|
4154
|
+
|
|
3736
4155
|
api_params = {
|
|
3737
4156
|
total: total,
|
|
3738
4157
|
}
|
|
@@ -3755,19 +4174,19 @@ module Appwrite
|
|
|
3755
4174
|
# Get a policy by its unique ID. This endpoint returns the current
|
|
3756
4175
|
# configuration for the requested project policy.
|
|
3757
4176
|
#
|
|
3758
|
-
# @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.
|
|
4177
|
+
# @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, password-pwned, password-rotation, 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, passkey.
|
|
3759
4178
|
#
|
|
3760
|
-
# @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail, PolicyPasskey]
|
|
4179
|
+
# @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicyPasswordPwned, PolicyPasswordRotation, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyMfaFactors, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail, PolicyDenyCorporateEmail, PolicyPasskey]
|
|
3761
4180
|
def get_policy(
|
|
3762
4181
|
policy_id:
|
|
3763
4182
|
)
|
|
3764
|
-
api_path = '/project/policies/{policyId}'
|
|
3765
|
-
.gsub('{policyId}', policy_id)
|
|
3766
|
-
|
|
3767
4183
|
if policy_id.nil?
|
|
3768
4184
|
raise Appwrite::Exception.new('Missing required parameter: "policyId"')
|
|
3769
4185
|
end
|
|
3770
4186
|
|
|
4187
|
+
api_path = '/project/policies/{policyId}'
|
|
4188
|
+
.gsub('{policyId}', policy_id)
|
|
4189
|
+
|
|
3771
4190
|
api_params = {}
|
|
3772
4191
|
|
|
3773
4192
|
api_headers = {
|
|
@@ -3806,6 +4225,16 @@ module Appwrite
|
|
|
3806
4225
|
return Models::PolicyPasswordPersonalData.from(map: response)
|
|
3807
4226
|
end
|
|
3808
4227
|
|
|
4228
|
+
if response['$id'] == 'password-pwned'
|
|
4229
|
+
|
|
4230
|
+
return Models::PolicyPasswordPwned.from(map: response)
|
|
4231
|
+
end
|
|
4232
|
+
|
|
4233
|
+
if response['$id'] == 'password-rotation'
|
|
4234
|
+
|
|
4235
|
+
return Models::PolicyPasswordRotation.from(map: response)
|
|
4236
|
+
end
|
|
4237
|
+
|
|
3809
4238
|
if response['$id'] == 'session-alert'
|
|
3810
4239
|
|
|
3811
4240
|
return Models::PolicySessionAlert.from(map: response)
|
|
@@ -3880,9 +4309,6 @@ module Appwrite
|
|
|
3880
4309
|
protocol_id:,
|
|
3881
4310
|
enabled:
|
|
3882
4311
|
)
|
|
3883
|
-
api_path = '/project/protocols/{protocolId}'
|
|
3884
|
-
.gsub('{protocolId}', protocol_id)
|
|
3885
|
-
|
|
3886
4312
|
if protocol_id.nil?
|
|
3887
4313
|
raise Appwrite::Exception.new('Missing required parameter: "protocolId"')
|
|
3888
4314
|
end
|
|
@@ -3891,6 +4317,9 @@ module Appwrite
|
|
|
3891
4317
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3892
4318
|
end
|
|
3893
4319
|
|
|
4320
|
+
api_path = '/project/protocols/{protocolId}'
|
|
4321
|
+
.gsub('{protocolId}', protocol_id)
|
|
4322
|
+
|
|
3894
4323
|
api_params = {
|
|
3895
4324
|
enabled: enabled,
|
|
3896
4325
|
}
|
|
@@ -3921,9 +4350,6 @@ module Appwrite
|
|
|
3921
4350
|
service_id:,
|
|
3922
4351
|
enabled:
|
|
3923
4352
|
)
|
|
3924
|
-
api_path = '/project/services/{serviceId}'
|
|
3925
|
-
.gsub('{serviceId}', service_id)
|
|
3926
|
-
|
|
3927
4353
|
if service_id.nil?
|
|
3928
4354
|
raise Appwrite::Exception.new('Missing required parameter: "serviceId"')
|
|
3929
4355
|
end
|
|
@@ -3932,6 +4358,9 @@ module Appwrite
|
|
|
3932
4358
|
raise Appwrite::Exception.new('Missing required parameter: "enabled"')
|
|
3933
4359
|
end
|
|
3934
4360
|
|
|
4361
|
+
api_path = '/project/services/{serviceId}'
|
|
4362
|
+
.gsub('{serviceId}', service_id)
|
|
4363
|
+
|
|
3935
4364
|
api_params = {
|
|
3936
4365
|
enabled: enabled,
|
|
3937
4366
|
}
|
|
@@ -4017,12 +4446,12 @@ module Appwrite
|
|
|
4017
4446
|
def create_smtp_test(
|
|
4018
4447
|
emails:
|
|
4019
4448
|
)
|
|
4020
|
-
api_path = '/project/smtp/tests'
|
|
4021
|
-
|
|
4022
4449
|
if emails.nil?
|
|
4023
4450
|
raise Appwrite::Exception.new('Missing required parameter: "emails"')
|
|
4024
4451
|
end
|
|
4025
4452
|
|
|
4453
|
+
api_path = '/project/smtp/tests'
|
|
4454
|
+
|
|
4026
4455
|
api_params = {
|
|
4027
4456
|
emails: emails,
|
|
4028
4457
|
}
|
|
@@ -4030,6 +4459,7 @@ module Appwrite
|
|
|
4030
4459
|
api_headers = {
|
|
4031
4460
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
4032
4461
|
"content-type": 'application/json',
|
|
4462
|
+
"accept": 'application/json',
|
|
4033
4463
|
}
|
|
4034
4464
|
|
|
4035
4465
|
@client.call(
|
|
@@ -4076,7 +4506,7 @@ module Appwrite
|
|
|
4076
4506
|
# Update a custom email template for the specified locale and type. Use this
|
|
4077
4507
|
# endpoint to modify the content of your email templates.
|
|
4078
4508
|
#
|
|
4079
|
-
# @param [ProjectEmailTemplateId] template_id Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
4509
|
+
# @param [ProjectEmailTemplateId] template_id Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
4080
4510
|
# @param [ProjectEmailTemplateLocale] locale Custom email template locale. If left empty, the fallback locale (en) will be used.
|
|
4081
4511
|
# @param [String] subject Subject of the email template. Can be up to 255 characters.
|
|
4082
4512
|
# @param [String] message Plain or HTML body of the email template message. Can be up to 10MB of content.
|
|
@@ -4096,12 +4526,12 @@ module Appwrite
|
|
|
4096
4526
|
reply_to_email: nil,
|
|
4097
4527
|
reply_to_name: nil
|
|
4098
4528
|
)
|
|
4099
|
-
api_path = '/project/templates/email'
|
|
4100
|
-
|
|
4101
4529
|
if template_id.nil?
|
|
4102
4530
|
raise Appwrite::Exception.new('Missing required parameter: "templateId"')
|
|
4103
4531
|
end
|
|
4104
4532
|
|
|
4533
|
+
api_path = '/project/templates/email'
|
|
4534
|
+
|
|
4105
4535
|
api_params = {
|
|
4106
4536
|
templateId: template_id,
|
|
4107
4537
|
locale: locale,
|
|
@@ -4132,7 +4562,7 @@ module Appwrite
|
|
|
4132
4562
|
# endpoint returns the template content, subject, and other configuration
|
|
4133
4563
|
# details.
|
|
4134
4564
|
#
|
|
4135
|
-
# @param [ProjectEmailTemplateId] template_id Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession
|
|
4565
|
+
# @param [ProjectEmailTemplateId] template_id Custom email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
4136
4566
|
# @param [ProjectEmailTemplateLocale] locale Custom email template locale. If left empty, the fallback locale (en) will be used.
|
|
4137
4567
|
#
|
|
4138
4568
|
# @return [EmailTemplate]
|
|
@@ -4140,13 +4570,13 @@ module Appwrite
|
|
|
4140
4570
|
template_id:,
|
|
4141
4571
|
locale: nil
|
|
4142
4572
|
)
|
|
4143
|
-
api_path = '/project/templates/email/{templateId}'
|
|
4144
|
-
.gsub('{templateId}', template_id)
|
|
4145
|
-
|
|
4146
4573
|
if template_id.nil?
|
|
4147
4574
|
raise Appwrite::Exception.new('Missing required parameter: "templateId"')
|
|
4148
4575
|
end
|
|
4149
4576
|
|
|
4577
|
+
api_path = '/project/templates/email/{templateId}'
|
|
4578
|
+
.gsub('{templateId}', template_id)
|
|
4579
|
+
|
|
4150
4580
|
api_params = {
|
|
4151
4581
|
locale: locale,
|
|
4152
4582
|
}
|
|
@@ -4211,8 +4641,6 @@ module Appwrite
|
|
|
4211
4641
|
value:,
|
|
4212
4642
|
secret: nil
|
|
4213
4643
|
)
|
|
4214
|
-
api_path = '/project/variables'
|
|
4215
|
-
|
|
4216
4644
|
if variable_id.nil?
|
|
4217
4645
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
4218
4646
|
end
|
|
@@ -4225,6 +4653,8 @@ module Appwrite
|
|
|
4225
4653
|
raise Appwrite::Exception.new('Missing required parameter: "value"')
|
|
4226
4654
|
end
|
|
4227
4655
|
|
|
4656
|
+
api_path = '/project/variables'
|
|
4657
|
+
|
|
4228
4658
|
api_params = {
|
|
4229
4659
|
variableId: variable_id,
|
|
4230
4660
|
key: key,
|
|
@@ -4255,13 +4685,13 @@ module Appwrite
|
|
|
4255
4685
|
def get_variable(
|
|
4256
4686
|
variable_id:
|
|
4257
4687
|
)
|
|
4258
|
-
|
|
4259
|
-
.gsub('{variableId}', variable_id)
|
|
4260
|
-
|
|
4261
|
-
if variable_id.nil?
|
|
4688
|
+
if variable_id.nil? || variable_id == ''
|
|
4262
4689
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
4263
4690
|
end
|
|
4264
4691
|
|
|
4692
|
+
api_path = '/project/variables/{variableId}'
|
|
4693
|
+
.gsub('{variableId}', variable_id)
|
|
4694
|
+
|
|
4265
4695
|
api_params = {}
|
|
4266
4696
|
|
|
4267
4697
|
api_headers = {
|
|
@@ -4292,13 +4722,13 @@ module Appwrite
|
|
|
4292
4722
|
value: nil,
|
|
4293
4723
|
secret: nil
|
|
4294
4724
|
)
|
|
4295
|
-
|
|
4296
|
-
.gsub('{variableId}', variable_id)
|
|
4297
|
-
|
|
4298
|
-
if variable_id.nil?
|
|
4725
|
+
if variable_id.nil? || variable_id == ''
|
|
4299
4726
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
4300
4727
|
end
|
|
4301
4728
|
|
|
4729
|
+
api_path = '/project/variables/{variableId}'
|
|
4730
|
+
.gsub('{variableId}', variable_id)
|
|
4731
|
+
|
|
4302
4732
|
api_params = {
|
|
4303
4733
|
key: key,
|
|
4304
4734
|
value: value,
|
|
@@ -4328,18 +4758,19 @@ module Appwrite
|
|
|
4328
4758
|
def delete_variable(
|
|
4329
4759
|
variable_id:
|
|
4330
4760
|
)
|
|
4331
|
-
|
|
4332
|
-
.gsub('{variableId}', variable_id)
|
|
4333
|
-
|
|
4334
|
-
if variable_id.nil?
|
|
4761
|
+
if variable_id.nil? || variable_id == ''
|
|
4335
4762
|
raise Appwrite::Exception.new('Missing required parameter: "variableId"')
|
|
4336
4763
|
end
|
|
4337
4764
|
|
|
4765
|
+
api_path = '/project/variables/{variableId}'
|
|
4766
|
+
.gsub('{variableId}', variable_id)
|
|
4767
|
+
|
|
4338
4768
|
api_params = {}
|
|
4339
4769
|
|
|
4340
4770
|
api_headers = {
|
|
4341
4771
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
4342
4772
|
"content-type": 'application/json',
|
|
4773
|
+
"accept": 'application/json',
|
|
4343
4774
|
}
|
|
4344
4775
|
|
|
4345
4776
|
@client.call(
|