appwrite 27.0.0 → 28.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +27 -24
- data/lib/appwrite/enums/adapter.rb +1 -1
- data/lib/appwrite/enums/attribute_status.rb +1 -1
- data/lib/appwrite/enums/authentication_factor.rb +1 -1
- data/lib/appwrite/enums/authenticator_type.rb +1 -1
- data/lib/appwrite/enums/backup_services.rb +1 -1
- data/lib/appwrite/enums/billing_plan_group.rb +1 -1
- data/lib/appwrite/enums/browser.rb +1 -1
- data/lib/appwrite/enums/browser_permission.rb +1 -1
- data/lib/appwrite/enums/browser_theme.rb +1 -1
- data/lib/appwrite/enums/build_runtime.rb +2 -1
- data/lib/appwrite/enums/column_status.rb +1 -1
- data/lib/appwrite/enums/compression.rb +1 -1
- data/lib/appwrite/enums/credit_card.rb +1 -1
- data/lib/appwrite/enums/database_status.rb +1 -1
- data/lib/appwrite/enums/database_type.rb +1 -1
- data/lib/appwrite/enums/databases_index_type.rb +1 -1
- data/lib/appwrite/enums/deployment_download_type.rb +1 -1
- data/lib/appwrite/enums/deployment_status.rb +1 -1
- data/lib/appwrite/enums/documents_db_index_type.rb +9 -0
- data/lib/appwrite/enums/embedding_model.rb +1 -3
- data/lib/appwrite/enums/execution_method.rb +1 -1
- data/lib/appwrite/enums/execution_resource_type.rb +8 -0
- data/lib/appwrite/enums/execution_status.rb +1 -1
- data/lib/appwrite/enums/execution_trigger.rb +1 -1
- data/lib/appwrite/enums/flag.rb +1 -1
- data/lib/appwrite/enums/framework.rb +1 -1
- data/lib/appwrite/enums/image_format.rb +1 -1
- data/lib/appwrite/enums/image_gravity.rb +1 -1
- data/lib/appwrite/enums/index_status.rb +1 -1
- data/lib/appwrite/enums/invalidation_type.rb +1 -1
- data/lib/appwrite/enums/message_priority.rb +1 -1
- data/lib/appwrite/enums/message_status.rb +1 -1
- data/lib/appwrite/enums/messaging_provider_type.rb +1 -1
- data/lib/appwrite/enums/o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/o_auth_provider.rb +2 -1
- data/lib/appwrite/enums/order_by.rb +1 -1
- data/lib/appwrite/enums/organization_key_scopes.rb +1 -1
- data/lib/appwrite/enums/password_hash.rb +1 -1
- data/lib/appwrite/enums/platform_type.rb +1 -1
- data/lib/appwrite/enums/project_auth_method_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_id.rb +1 -1
- data/lib/appwrite/enums/project_email_template_locale.rb +1 -1
- data/lib/appwrite/enums/project_key_scopes.rb +14 -3
- data/lib/appwrite/enums/project_o_auth2_google_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth2_oidc_prompt.rb +1 -1
- data/lib/appwrite/enums/project_o_auth_provider_id.rb +2 -1
- data/lib/appwrite/enums/project_policy_id.rb +1 -1
- data/lib/appwrite/enums/project_protocol_id.rb +1 -1
- data/lib/appwrite/enums/project_service_id.rb +1 -1
- data/lib/appwrite/enums/project_smtp_secure.rb +1 -1
- data/lib/appwrite/enums/proxy_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_deployment_resource_type.rb +1 -1
- data/lib/appwrite/enums/proxy_rule_status.rb +1 -1
- data/lib/appwrite/enums/region.rb +1 -1
- data/lib/appwrite/enums/relation_mutate.rb +1 -1
- data/lib/appwrite/enums/relationship_type.rb +1 -1
- data/lib/appwrite/enums/runtime.rb +2 -1
- data/lib/appwrite/enums/smtp_encryption.rb +1 -1
- data/lib/appwrite/enums/status_code.rb +1 -1
- data/lib/appwrite/enums/tables_db_index_type.rb +1 -1
- data/lib/appwrite/enums/template_reference_type.rb +1 -1
- data/lib/appwrite/enums/timezone.rb +1 -1
- data/lib/appwrite/enums/vcs_reference_type.rb +1 -1
- data/lib/appwrite/enums/vectors_db_index_type.rb +12 -0
- data/lib/appwrite/exception.rb +1 -1
- data/lib/appwrite/id.rb +3 -3
- data/lib/appwrite/input_file.rb +1 -1
- data/lib/appwrite/models/activity_event.rb +1 -1
- data/lib/appwrite/models/activity_event_list.rb +1 -1
- data/lib/appwrite/models/additional_resource.rb +1 -1
- data/lib/appwrite/models/algo_argon2.rb +1 -1
- data/lib/appwrite/models/algo_bcrypt.rb +1 -1
- data/lib/appwrite/models/algo_md5.rb +1 -1
- data/lib/appwrite/models/algo_phpass.rb +1 -1
- data/lib/appwrite/models/algo_scrypt.rb +1 -1
- data/lib/appwrite/models/algo_scrypt_modified.rb +1 -1
- data/lib/appwrite/models/algo_sha.rb +1 -1
- data/lib/appwrite/models/app.rb +1 -1
- data/lib/appwrite/models/app_installation.rb +2 -2
- data/lib/appwrite/models/app_installation_list.rb +1 -1
- data/lib/appwrite/models/app_key.rb +2 -2
- data/lib/appwrite/models/app_key_list.rb +1 -1
- data/lib/appwrite/models/app_scope.rb +1 -1
- data/lib/appwrite/models/app_scope_list.rb +1 -1
- data/lib/appwrite/models/app_secret.rb +2 -2
- data/lib/appwrite/models/app_secret_list.rb +1 -1
- data/lib/appwrite/models/app_secret_plaintext.rb +2 -2
- data/lib/appwrite/models/apps_list.rb +1 -1
- data/lib/appwrite/models/attribute_bigint.rb +5 -6
- data/lib/appwrite/models/attribute_boolean.rb +3 -4
- data/lib/appwrite/models/attribute_datetime.rb +3 -4
- data/lib/appwrite/models/attribute_email.rb +3 -4
- data/lib/appwrite/models/attribute_enum.rb +3 -4
- data/lib/appwrite/models/attribute_float.rb +5 -6
- data/lib/appwrite/models/attribute_integer.rb +5 -6
- data/lib/appwrite/models/attribute_ip.rb +3 -4
- data/lib/appwrite/models/attribute_line.rb +3 -4
- data/lib/appwrite/models/attribute_list.rb +1 -1
- data/lib/appwrite/models/attribute_longtext.rb +4 -5
- data/lib/appwrite/models/attribute_mediumtext.rb +4 -5
- data/lib/appwrite/models/attribute_object.rb +80 -0
- data/lib/appwrite/models/attribute_point.rb +3 -4
- data/lib/appwrite/models/attribute_polygon.rb +3 -4
- data/lib/appwrite/models/attribute_relationship.rb +2 -3
- data/lib/appwrite/models/attribute_string.rb +4 -5
- data/lib/appwrite/models/attribute_text.rb +4 -5
- data/lib/appwrite/models/attribute_url.rb +3 -4
- data/lib/appwrite/models/attribute_varchar.rb +4 -5
- data/lib/appwrite/models/attribute_vector.rb +85 -0
- data/lib/appwrite/models/backup_archive.rb +3 -3
- data/lib/appwrite/models/backup_archive_list.rb +1 -1
- data/lib/appwrite/models/backup_policy.rb +3 -3
- data/lib/appwrite/models/backup_policy_list.rb +1 -1
- data/lib/appwrite/models/backup_restoration.rb +1 -1
- data/lib/appwrite/models/backup_restoration_list.rb +1 -1
- data/lib/appwrite/models/billing_limits.rb +9 -9
- data/lib/appwrite/models/billing_plan.rb +19 -10
- data/lib/appwrite/models/billing_plan_addon.rb +3 -3
- data/lib/appwrite/models/billing_plan_addon_details.rb +2 -2
- data/lib/appwrite/models/billing_plan_dedicated_database_limits.rb +20 -20
- data/lib/appwrite/models/billing_plan_limits.rb +3 -3
- data/lib/appwrite/models/billing_plan_supported_addons.rb +1 -1
- data/lib/appwrite/models/block.rb +3 -3
- data/lib/appwrite/models/bucket.rb +1 -1
- data/lib/appwrite/models/bucket_list.rb +1 -1
- data/lib/appwrite/models/collection.rb +1 -1
- data/lib/appwrite/models/collection_list.rb +1 -1
- data/lib/appwrite/models/column_bigint.rb +5 -6
- data/lib/appwrite/models/column_boolean.rb +3 -4
- data/lib/appwrite/models/column_datetime.rb +3 -4
- data/lib/appwrite/models/column_email.rb +3 -4
- data/lib/appwrite/models/column_enum.rb +3 -4
- data/lib/appwrite/models/column_float.rb +5 -6
- data/lib/appwrite/models/column_index.rb +2 -2
- data/lib/appwrite/models/column_index_list.rb +1 -1
- data/lib/appwrite/models/column_integer.rb +5 -6
- data/lib/appwrite/models/column_ip.rb +3 -4
- data/lib/appwrite/models/column_line.rb +3 -4
- data/lib/appwrite/models/column_list.rb +1 -1
- data/lib/appwrite/models/column_longtext.rb +4 -5
- data/lib/appwrite/models/column_mediumtext.rb +4 -5
- data/lib/appwrite/models/column_point.rb +3 -4
- data/lib/appwrite/models/column_polygon.rb +3 -4
- data/lib/appwrite/models/column_relationship.rb +2 -3
- data/lib/appwrite/models/column_string.rb +4 -5
- data/lib/appwrite/models/column_text.rb +4 -5
- data/lib/appwrite/models/column_url.rb +3 -4
- data/lib/appwrite/models/column_varchar.rb +4 -5
- data/lib/appwrite/models/continent.rb +1 -1
- data/lib/appwrite/models/continent_list.rb +1 -1
- data/lib/appwrite/models/country.rb +1 -1
- data/lib/appwrite/models/country_list.rb +1 -1
- data/lib/appwrite/models/currency.rb +1 -1
- data/lib/appwrite/models/currency_list.rb +1 -1
- data/lib/appwrite/models/database.rb +22 -8
- data/lib/appwrite/models/database_list.rb +1 -1
- data/lib/appwrite/models/database_migration.rb +6 -1
- data/lib/appwrite/models/database_migration_list.rb +1 -1
- data/lib/appwrite/models/database_status.rb +3 -3
- data/lib/appwrite/models/database_status_connections.rb +1 -1
- data/lib/appwrite/models/database_status_replica.rb +7 -2
- data/lib/appwrite/models/database_status_volume.rb +1 -1
- data/lib/appwrite/models/dedicated_database.rb +3 -3
- data/lib/appwrite/models/dedicated_database_backup.rb +107 -0
- data/lib/appwrite/models/dedicated_database_backup_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_backup_storage.rb +47 -0
- data/lib/appwrite/models/dedicated_database_branch.rb +82 -0
- data/lib/appwrite/models/dedicated_database_branch_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_execution.rb +52 -0
- data/lib/appwrite/models/dedicated_database_execution_column.rb +32 -0
- data/lib/appwrite/models/dedicated_database_extensions.rb +37 -0
- data/lib/appwrite/models/dedicated_database_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_member.rb +7 -2
- data/lib/appwrite/models/dedicated_database_operation.rb +4 -4
- data/lib/appwrite/models/dedicated_database_operation_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_pitr_windows.rb +32 -0
- data/lib/appwrite/models/dedicated_database_pooler.rb +72 -0
- data/lib/appwrite/models/dedicated_database_replicas.rb +3 -3
- data/lib/appwrite/models/dedicated_database_restoration.rb +82 -0
- data/lib/appwrite/models/dedicated_database_restoration_list.rb +32 -0
- data/lib/appwrite/models/dedicated_database_specification.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_list.rb +1 -1
- data/lib/appwrite/models/dedicated_database_specification_pricing.rb +1 -1
- data/lib/appwrite/models/deployment.rb +1 -2
- data/lib/appwrite/models/deployment_list.rb +1 -1
- data/lib/appwrite/models/dev_key.rb +1 -1
- data/lib/appwrite/models/document.rb +1 -1
- data/lib/appwrite/models/document_list.rb +1 -1
- data/lib/appwrite/models/email_template.rb +1 -1
- data/lib/appwrite/models/email_template_list.rb +1 -1
- data/lib/appwrite/models/embedding.rb +1 -1
- data/lib/appwrite/models/embedding_list.rb +1 -1
- data/lib/appwrite/models/ephemeral_key.rb +1 -1
- data/lib/appwrite/models/execution.rb +25 -8
- data/lib/appwrite/models/execution_list.rb +1 -1
- data/lib/appwrite/models/file.rb +1 -1
- data/lib/appwrite/models/file_list.rb +1 -1
- data/lib/appwrite/models/framework.rb +1 -1
- data/lib/appwrite/models/framework_adapter.rb +1 -1
- data/lib/appwrite/models/framework_list.rb +1 -1
- data/lib/appwrite/models/function.rb +1 -1
- data/lib/appwrite/models/function_list.rb +1 -1
- data/lib/appwrite/models/headers.rb +1 -1
- data/lib/appwrite/models/identity.rb +1 -1
- data/lib/appwrite/models/identity_list.rb +1 -1
- data/lib/appwrite/models/index.rb +2 -3
- data/lib/appwrite/models/index_list.rb +1 -1
- data/lib/appwrite/models/insight.rb +4 -4
- data/lib/appwrite/models/insight_cta.rb +1 -1
- data/lib/appwrite/models/insight_list.rb +1 -1
- data/lib/appwrite/models/jwt.rb +1 -1
- data/lib/appwrite/models/key.rb +1 -1
- data/lib/appwrite/models/key_list.rb +1 -1
- data/lib/appwrite/models/language.rb +1 -1
- data/lib/appwrite/models/language_list.rb +1 -1
- data/lib/appwrite/models/locale.rb +12 -12
- data/lib/appwrite/models/locale_code.rb +1 -1
- data/lib/appwrite/models/locale_code_list.rb +1 -1
- data/lib/appwrite/models/log.rb +1 -1
- data/lib/appwrite/models/log_list.rb +1 -1
- data/lib/appwrite/models/membership.rb +1 -1
- data/lib/appwrite/models/membership_list.rb +1 -1
- data/lib/appwrite/models/message.rb +4 -5
- data/lib/appwrite/models/message_list.rb +1 -1
- data/lib/appwrite/models/mfa_challenge.rb +1 -1
- data/lib/appwrite/models/mfa_challenge_secret.rb +1 -1
- data/lib/appwrite/models/mfa_factors.rb +1 -1
- data/lib/appwrite/models/mfa_recovery_codes.rb +1 -1
- data/lib/appwrite/models/mfa_type.rb +1 -1
- data/lib/appwrite/models/mock_number.rb +1 -1
- data/lib/appwrite/models/mock_number_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_amazon.rb +1 -1
- data/lib/appwrite/models/o_auth2_apple.rb +1 -1
- data/lib/appwrite/models/o_auth2_appwrite.rb +1 -1
- data/lib/appwrite/models/o_auth2_auth0.rb +1 -1
- data/lib/appwrite/models/o_auth2_authentik.rb +1 -1
- data/lib/appwrite/models/o_auth2_autodesk.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitbucket.rb +1 -1
- data/lib/appwrite/models/o_auth2_bitly.rb +1 -1
- data/lib/appwrite/models/o_auth2_box.rb +1 -1
- data/lib/appwrite/models/o_auth2_dailymotion.rb +1 -1
- data/lib/appwrite/models/o_auth2_discord.rb +1 -1
- data/lib/appwrite/models/o_auth2_disqus.rb +1 -1
- data/lib/appwrite/models/o_auth2_dropbox.rb +1 -1
- data/lib/appwrite/models/o_auth2_etsy.rb +1 -1
- data/lib/appwrite/models/o_auth2_facebook.rb +1 -1
- data/lib/appwrite/models/o_auth2_figma.rb +1 -1
- data/lib/appwrite/models/o_auth2_fusion_auth.rb +1 -1
- data/lib/appwrite/models/o_auth2_github.rb +1 -1
- data/lib/appwrite/models/o_auth2_gitlab.rb +1 -1
- data/lib/appwrite/models/o_auth2_google.rb +18 -2
- data/lib/appwrite/models/o_auth2_hugging_face.rb +42 -0
- data/lib/appwrite/models/o_auth2_keycloak.rb +1 -1
- data/lib/appwrite/models/o_auth2_kick.rb +1 -1
- data/lib/appwrite/models/o_auth2_linkedin.rb +1 -1
- data/lib/appwrite/models/o_auth2_microsoft.rb +1 -1
- data/lib/appwrite/models/o_auth2_notion.rb +1 -1
- data/lib/appwrite/models/o_auth2_oidc.rb +20 -3
- data/lib/appwrite/models/o_auth2_okta.rb +1 -1
- data/lib/appwrite/models/o_auth2_paypal.rb +1 -1
- data/lib/appwrite/models/o_auth2_podio.rb +1 -1
- data/lib/appwrite/models/o_auth2_provider_list.rb +1 -1
- data/lib/appwrite/models/o_auth2_salesforce.rb +1 -1
- data/lib/appwrite/models/o_auth2_slack.rb +1 -1
- data/lib/appwrite/models/o_auth2_spotify.rb +1 -1
- data/lib/appwrite/models/o_auth2_stripe.rb +1 -1
- data/lib/appwrite/models/o_auth2_tradeshift.rb +1 -1
- data/lib/appwrite/models/o_auth2_twitch.rb +1 -1
- data/lib/appwrite/models/o_auth2_word_press.rb +1 -1
- data/lib/appwrite/models/o_auth2_x.rb +1 -1
- data/lib/appwrite/models/o_auth2_yahoo.rb +1 -1
- data/lib/appwrite/models/o_auth2_yandex.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoho.rb +1 -1
- data/lib/appwrite/models/o_auth2_zoom.rb +1 -1
- data/lib/appwrite/models/oauth2_approve.rb +1 -1
- data/lib/appwrite/models/oauth2_authorize.rb +1 -1
- data/lib/appwrite/models/oauth2_consent.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_list.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token.rb +1 -1
- data/lib/appwrite/models/oauth2_consent_token_list.rb +1 -1
- data/lib/appwrite/models/oauth2_device_authorization.rb +1 -1
- data/lib/appwrite/models/oauth2_grant.rb +1 -1
- data/lib/appwrite/models/oauth2_organization.rb +1 -1
- data/lib/appwrite/models/oauth2_organization_list.rb +1 -1
- data/lib/appwrite/models/oauth2_par.rb +1 -1
- data/lib/appwrite/models/oauth2_project.rb +1 -1
- data/lib/appwrite/models/oauth2_project_list.rb +1 -1
- data/lib/appwrite/models/oauth2_reject.rb +1 -1
- data/lib/appwrite/models/oauth2_token.rb +3 -3
- data/lib/appwrite/models/organization.rb +14 -14
- data/lib/appwrite/models/phone.rb +1 -1
- data/lib/appwrite/models/phone_list.rb +1 -1
- data/lib/appwrite/models/platform_android.rb +1 -2
- data/lib/appwrite/models/platform_apple.rb +1 -2
- data/lib/appwrite/models/platform_linux.rb +1 -2
- data/lib/appwrite/models/platform_list.rb +1 -1
- data/lib/appwrite/models/platform_web.rb +1 -2
- data/lib/appwrite/models/platform_windows.rb +1 -2
- data/lib/appwrite/models/policy_deny_aliased_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_corporate_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_disposable_email.rb +1 -1
- data/lib/appwrite/models/policy_deny_free_email.rb +1 -1
- data/lib/appwrite/models/policy_list.rb +1 -1
- data/lib/appwrite/models/policy_membership_privacy.rb +1 -1
- data/lib/appwrite/models/policy_mfa_factors.rb +1 -1
- data/lib/appwrite/models/policy_password_dictionary.rb +1 -1
- data/lib/appwrite/models/policy_password_history.rb +1 -1
- data/lib/appwrite/models/policy_password_personal_data.rb +1 -1
- data/lib/appwrite/models/policy_password_strength.rb +1 -1
- data/lib/appwrite/models/policy_session_alert.rb +1 -1
- data/lib/appwrite/models/policy_session_duration.rb +1 -1
- data/lib/appwrite/models/policy_session_invalidation.rb +1 -1
- data/lib/appwrite/models/policy_session_limit.rb +1 -1
- data/lib/appwrite/models/policy_user_limit.rb +1 -1
- data/lib/appwrite/models/postgres_extension.rb +42 -0
- data/lib/appwrite/models/preferences.rb +1 -1
- data/lib/appwrite/models/presence.rb +4 -4
- data/lib/appwrite/models/presence_list.rb +1 -1
- data/lib/appwrite/models/program.rb +1 -1
- data/lib/appwrite/models/project.rb +19 -19
- data/lib/appwrite/models/project_auth_method.rb +1 -2
- data/lib/appwrite/models/project_list.rb +1 -1
- data/lib/appwrite/models/project_protocol.rb +1 -2
- data/lib/appwrite/models/project_service.rb +1 -2
- data/lib/appwrite/models/provider.rb +2 -2
- data/lib/appwrite/models/provider_list.rb +1 -1
- data/lib/appwrite/models/proxy_invalidation.rb +1 -1
- data/lib/appwrite/models/proxy_rule.rb +2 -3
- data/lib/appwrite/models/proxy_rule_list.rb +1 -1
- data/lib/appwrite/models/report.rb +2 -2
- data/lib/appwrite/models/report_list.rb +1 -1
- data/lib/appwrite/models/resource_token.rb +1 -1
- data/lib/appwrite/models/resource_token_list.rb +1 -1
- data/lib/appwrite/models/row.rb +1 -1
- data/lib/appwrite/models/row_list.rb +1 -1
- data/lib/appwrite/models/runtime.rb +1 -1
- data/lib/appwrite/models/runtime_list.rb +1 -1
- data/lib/appwrite/models/session.rb +1 -1
- data/lib/appwrite/models/session_list.rb +1 -1
- data/lib/appwrite/models/site.rb +6 -1
- data/lib/appwrite/models/site_list.rb +1 -1
- data/lib/appwrite/models/specification.rb +1 -1
- data/lib/appwrite/models/specification_list.rb +1 -1
- data/lib/appwrite/models/subscriber.rb +1 -1
- data/lib/appwrite/models/subscriber_list.rb +1 -1
- data/lib/appwrite/models/table.rb +1 -1
- data/lib/appwrite/models/table_list.rb +1 -1
- data/lib/appwrite/models/target.rb +2 -2
- data/lib/appwrite/models/target_list.rb +1 -1
- data/lib/appwrite/models/team.rb +1 -1
- data/lib/appwrite/models/team_list.rb +1 -1
- data/lib/appwrite/models/token.rb +1 -1
- data/lib/appwrite/models/topic.rb +1 -1
- data/lib/appwrite/models/topic_list.rb +1 -1
- data/lib/appwrite/models/transaction.rb +1 -1
- data/lib/appwrite/models/transaction_list.rb +1 -1
- data/lib/appwrite/models/usage_billing_plan.rb +4 -4
- data/lib/appwrite/models/user.rb +11 -11
- data/lib/appwrite/models/user_list.rb +1 -1
- data/lib/appwrite/models/variable.rb +1 -1
- data/lib/appwrite/models/variable_list.rb +1 -1
- data/lib/appwrite/models/vectorsdb_collection.rb +87 -0
- data/lib/appwrite/models/vectorsdb_collection_list.rb +32 -0
- data/lib/appwrite/models/webhook.rb +1 -1
- data/lib/appwrite/models/webhook_list.rb +1 -1
- data/lib/appwrite/operator.rb +6 -0
- data/lib/appwrite/permission.rb +4 -0
- data/lib/appwrite/query.rb +4 -4
- data/lib/appwrite/role.rb +12 -14
- data/lib/appwrite/service.rb +1 -1
- data/lib/appwrite/services/account.rb +328 -289
- data/lib/appwrite/services/activities.rb +13 -14
- data/lib/appwrite/services/advisor.rb +41 -37
- data/lib/appwrite/services/apps.rb +185 -130
- data/lib/appwrite/services/avatars.rb +156 -55
- data/lib/appwrite/services/backups.rb +102 -83
- data/lib/appwrite/services/databases.rb +871 -512
- data/lib/appwrite/services/documents_db.rb +1683 -0
- data/lib/appwrite/services/embeddings.rb +9 -9
- data/lib/appwrite/services/functions.rb +276 -172
- data/lib/appwrite/services/graphql.rb +12 -12
- data/lib/appwrite/services/locale.rb +19 -37
- data/lib/appwrite/services/messaging.rb +544 -259
- data/lib/appwrite/services/mongo.rb +1359 -0
- data/lib/appwrite/services/mysql.rb +1503 -0
- data/lib/appwrite/services/oauth2.rb +122 -53
- data/lib/appwrite/services/organization.rb +153 -123
- data/lib/appwrite/services/postgresql.rb +1615 -0
- data/lib/appwrite/services/presences.rb +49 -35
- data/lib/appwrite/services/project.rb +842 -528
- data/lib/appwrite/services/proxy.rb +73 -58
- data/lib/appwrite/services/sites.rb +269 -164
- data/lib/appwrite/services/storage.rb +151 -92
- data/lib/appwrite/services/tables_db.rb +947 -568
- data/lib/appwrite/services/teams.rb +161 -122
- data/lib/appwrite/services/tokens.rb +38 -31
- data/lib/appwrite/services/users.rb +376 -274
- data/lib/appwrite/services/vectors_db.rb +1614 -0
- data/lib/appwrite/services/webhooks.rb +59 -40
- data/lib/appwrite.rb +27 -0
- metadata +31 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#frozen_string_literal: true
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Appwrite
|
|
4
4
|
class Messaging < Service
|
|
5
|
-
|
|
6
5
|
def initialize(client)
|
|
7
6
|
@client = client
|
|
8
7
|
end
|
|
@@ -14,7 +13,11 @@ module Appwrite
|
|
|
14
13
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
15
14
|
#
|
|
16
15
|
# @return [MessageList]
|
|
17
|
-
def list_messages(
|
|
16
|
+
def list_messages(
|
|
17
|
+
queries: nil,
|
|
18
|
+
search: nil,
|
|
19
|
+
total: nil
|
|
20
|
+
)
|
|
18
21
|
api_path = '/messaging/messages'
|
|
19
22
|
|
|
20
23
|
api_params = {
|
|
@@ -22,7 +25,7 @@ module Appwrite
|
|
|
22
25
|
search: search,
|
|
23
26
|
total: total,
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
|
|
26
29
|
api_headers = {
|
|
27
30
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
28
31
|
"accept": 'application/json',
|
|
@@ -35,12 +38,11 @@ module Appwrite
|
|
|
35
38
|
params: api_params,
|
|
36
39
|
response_type: Models::MessageList
|
|
37
40
|
)
|
|
38
|
-
|
|
39
41
|
end
|
|
40
42
|
|
|
41
43
|
# Create a new email message.
|
|
42
44
|
#
|
|
43
|
-
# @param [String] message_id Message 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
|
|
45
|
+
# @param [String] message_id Message 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.
|
|
44
46
|
# @param [String] subject Email Subject.
|
|
45
47
|
# @param [String] content Email Content.
|
|
46
48
|
# @param [Array] topics List of Topic IDs.
|
|
@@ -48,25 +50,38 @@ module Appwrite
|
|
|
48
50
|
# @param [Array] targets List of Targets IDs.
|
|
49
51
|
# @param [Array] cc Array of target IDs to be added as CC.
|
|
50
52
|
# @param [Array] bcc Array of target IDs to be added as BCC.
|
|
51
|
-
# @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as
|
|
53
|
+
# @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
52
54
|
# @param [] draft Is message a draft
|
|
53
55
|
# @param [] html Is content of type HTML
|
|
54
56
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
55
57
|
#
|
|
56
58
|
# @return [Message]
|
|
57
|
-
def create_email(
|
|
59
|
+
def create_email(
|
|
60
|
+
message_id:,
|
|
61
|
+
subject:,
|
|
62
|
+
content:,
|
|
63
|
+
topics: nil,
|
|
64
|
+
users: nil,
|
|
65
|
+
targets: nil,
|
|
66
|
+
cc: nil,
|
|
67
|
+
bcc: nil,
|
|
68
|
+
attachments: nil,
|
|
69
|
+
draft: nil,
|
|
70
|
+
html: nil,
|
|
71
|
+
scheduled_at: nil
|
|
72
|
+
)
|
|
58
73
|
api_path = '/messaging/messages/email'
|
|
59
74
|
|
|
60
75
|
if message_id.nil?
|
|
61
|
-
|
|
76
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
62
77
|
end
|
|
63
78
|
|
|
64
79
|
if subject.nil?
|
|
65
|
-
|
|
80
|
+
raise Appwrite::Exception.new('Missing required parameter: "subject"')
|
|
66
81
|
end
|
|
67
82
|
|
|
68
83
|
if content.nil?
|
|
69
|
-
|
|
84
|
+
raise Appwrite::Exception.new('Missing required parameter: "content"')
|
|
70
85
|
end
|
|
71
86
|
|
|
72
87
|
api_params = {
|
|
@@ -83,7 +98,7 @@ module Appwrite
|
|
|
83
98
|
html: html,
|
|
84
99
|
scheduledAt: scheduled_at,
|
|
85
100
|
}
|
|
86
|
-
|
|
101
|
+
|
|
87
102
|
api_headers = {
|
|
88
103
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
89
104
|
"content-type": 'application/json',
|
|
@@ -97,13 +112,12 @@ module Appwrite
|
|
|
97
112
|
params: api_params,
|
|
98
113
|
response_type: Models::Message
|
|
99
114
|
)
|
|
100
|
-
|
|
101
115
|
end
|
|
102
116
|
|
|
103
117
|
# Update an email message by its unique ID. This endpoint only works on
|
|
104
118
|
# messages that are in draft status. Messages that are already processing,
|
|
105
119
|
# sent, or failed cannot be updated.
|
|
106
|
-
#
|
|
120
|
+
#
|
|
107
121
|
#
|
|
108
122
|
# @param [String] message_id Message ID.
|
|
109
123
|
# @param [Array] topics List of Topic IDs.
|
|
@@ -116,15 +130,28 @@ module Appwrite
|
|
|
116
130
|
# @param [Array] cc Array of target IDs to be added as CC.
|
|
117
131
|
# @param [Array] bcc Array of target IDs to be added as BCC.
|
|
118
132
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
119
|
-
# @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as
|
|
133
|
+
# @param [Array] attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
120
134
|
#
|
|
121
135
|
# @return [Message]
|
|
122
|
-
def update_email(
|
|
136
|
+
def update_email(
|
|
137
|
+
message_id:,
|
|
138
|
+
topics: nil,
|
|
139
|
+
users: nil,
|
|
140
|
+
targets: nil,
|
|
141
|
+
subject: nil,
|
|
142
|
+
content: nil,
|
|
143
|
+
draft: nil,
|
|
144
|
+
html: nil,
|
|
145
|
+
cc: nil,
|
|
146
|
+
bcc: nil,
|
|
147
|
+
scheduled_at: nil,
|
|
148
|
+
attachments: nil
|
|
149
|
+
)
|
|
123
150
|
api_path = '/messaging/messages/email/{messageId}'
|
|
124
151
|
.gsub('{messageId}', message_id)
|
|
125
152
|
|
|
126
153
|
if message_id.nil?
|
|
127
|
-
|
|
154
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
128
155
|
end
|
|
129
156
|
|
|
130
157
|
api_params = {
|
|
@@ -140,7 +167,7 @@ module Appwrite
|
|
|
140
167
|
scheduledAt: scheduled_at,
|
|
141
168
|
attachments: attachments,
|
|
142
169
|
}
|
|
143
|
-
|
|
170
|
+
|
|
144
171
|
api_headers = {
|
|
145
172
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
146
173
|
"content-type": 'application/json',
|
|
@@ -154,12 +181,11 @@ module Appwrite
|
|
|
154
181
|
params: api_params,
|
|
155
182
|
response_type: Models::Message
|
|
156
183
|
)
|
|
157
|
-
|
|
158
184
|
end
|
|
159
185
|
|
|
160
186
|
# Create a new push notification.
|
|
161
187
|
#
|
|
162
|
-
# @param [String] message_id Message 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
|
|
188
|
+
# @param [String] message_id Message 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.
|
|
163
189
|
# @param [String] title Title for push notification.
|
|
164
190
|
# @param [String] body Body for push notification.
|
|
165
191
|
# @param [Array] topics List of Topic IDs.
|
|
@@ -167,7 +193,7 @@ module Appwrite
|
|
|
167
193
|
# @param [Array] targets List of Targets IDs.
|
|
168
194
|
# @param [Hash] data Additional key-value pair data for push notification.
|
|
169
195
|
# @param [String] action Action for push notification.
|
|
170
|
-
# @param [String] image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as
|
|
196
|
+
# @param [String] image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
171
197
|
# @param [String] icon Icon for push notification. Available only for Android and Web Platform.
|
|
172
198
|
# @param [String] sound Sound for push notification. Available only for Android and iOS Platform.
|
|
173
199
|
# @param [String] color Color for push notification. Available only for Android Platform.
|
|
@@ -177,14 +203,34 @@ module Appwrite
|
|
|
177
203
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
178
204
|
# @param [] content_available If set to true, the notification will be delivered in the background. Available only for iOS Platform.
|
|
179
205
|
# @param [] critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
|
|
180
|
-
# @param [MessagePriority] priority Set the notification priority.
|
|
206
|
+
# @param [MessagePriority] priority Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.
|
|
181
207
|
#
|
|
182
208
|
# @return [Message]
|
|
183
|
-
def create_push(
|
|
209
|
+
def create_push(
|
|
210
|
+
message_id:,
|
|
211
|
+
title: nil,
|
|
212
|
+
body: nil,
|
|
213
|
+
topics: nil,
|
|
214
|
+
users: nil,
|
|
215
|
+
targets: nil,
|
|
216
|
+
data: nil,
|
|
217
|
+
action: nil,
|
|
218
|
+
image: nil,
|
|
219
|
+
icon: nil,
|
|
220
|
+
sound: nil,
|
|
221
|
+
color: nil,
|
|
222
|
+
tag: nil,
|
|
223
|
+
badge: nil,
|
|
224
|
+
draft: nil,
|
|
225
|
+
scheduled_at: nil,
|
|
226
|
+
content_available: nil,
|
|
227
|
+
critical: nil,
|
|
228
|
+
priority: nil
|
|
229
|
+
)
|
|
184
230
|
api_path = '/messaging/messages/push'
|
|
185
231
|
|
|
186
232
|
if message_id.nil?
|
|
187
|
-
|
|
233
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
188
234
|
end
|
|
189
235
|
|
|
190
236
|
api_params = {
|
|
@@ -208,7 +254,7 @@ module Appwrite
|
|
|
208
254
|
critical: critical,
|
|
209
255
|
priority: priority,
|
|
210
256
|
}
|
|
211
|
-
|
|
257
|
+
|
|
212
258
|
api_headers = {
|
|
213
259
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
214
260
|
"content-type": 'application/json',
|
|
@@ -222,13 +268,12 @@ module Appwrite
|
|
|
222
268
|
params: api_params,
|
|
223
269
|
response_type: Models::Message
|
|
224
270
|
)
|
|
225
|
-
|
|
226
271
|
end
|
|
227
272
|
|
|
228
273
|
# Update a push notification by its unique ID. This endpoint only works on
|
|
229
274
|
# messages that are in draft status. Messages that are already processing,
|
|
230
275
|
# sent, or failed cannot be updated.
|
|
231
|
-
#
|
|
276
|
+
#
|
|
232
277
|
#
|
|
233
278
|
# @param [String] message_id Message ID.
|
|
234
279
|
# @param [Array] topics List of Topic IDs.
|
|
@@ -238,7 +283,7 @@ module Appwrite
|
|
|
238
283
|
# @param [String] body Body for push notification.
|
|
239
284
|
# @param [Hash] data Additional Data for push notification.
|
|
240
285
|
# @param [String] action Action for push notification.
|
|
241
|
-
# @param [String] image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as
|
|
286
|
+
# @param [String] image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
|
|
242
287
|
# @param [String] icon Icon for push notification. Available only for Android and Web platforms.
|
|
243
288
|
# @param [String] sound Sound for push notification. Available only for Android and iOS platforms.
|
|
244
289
|
# @param [String] color Color for push notification. Available only for Android platforms.
|
|
@@ -248,15 +293,35 @@ module Appwrite
|
|
|
248
293
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
249
294
|
# @param [] content_available If set to true, the notification will be delivered in the background. Available only for iOS Platform.
|
|
250
295
|
# @param [] critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
|
|
251
|
-
# @param [MessagePriority] priority Set the notification priority.
|
|
296
|
+
# @param [MessagePriority] priority Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.
|
|
252
297
|
#
|
|
253
298
|
# @return [Message]
|
|
254
|
-
def update_push(
|
|
299
|
+
def update_push(
|
|
300
|
+
message_id:,
|
|
301
|
+
topics: nil,
|
|
302
|
+
users: nil,
|
|
303
|
+
targets: nil,
|
|
304
|
+
title: nil,
|
|
305
|
+
body: nil,
|
|
306
|
+
data: nil,
|
|
307
|
+
action: nil,
|
|
308
|
+
image: nil,
|
|
309
|
+
icon: nil,
|
|
310
|
+
sound: nil,
|
|
311
|
+
color: nil,
|
|
312
|
+
tag: nil,
|
|
313
|
+
badge: nil,
|
|
314
|
+
draft: nil,
|
|
315
|
+
scheduled_at: nil,
|
|
316
|
+
content_available: nil,
|
|
317
|
+
critical: nil,
|
|
318
|
+
priority: nil
|
|
319
|
+
)
|
|
255
320
|
api_path = '/messaging/messages/push/{messageId}'
|
|
256
321
|
.gsub('{messageId}', message_id)
|
|
257
322
|
|
|
258
323
|
if message_id.nil?
|
|
259
|
-
|
|
324
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
260
325
|
end
|
|
261
326
|
|
|
262
327
|
api_params = {
|
|
@@ -279,7 +344,7 @@ module Appwrite
|
|
|
279
344
|
critical: critical,
|
|
280
345
|
priority: priority,
|
|
281
346
|
}
|
|
282
|
-
|
|
347
|
+
|
|
283
348
|
api_headers = {
|
|
284
349
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
285
350
|
"content-type": 'application/json',
|
|
@@ -293,12 +358,11 @@ module Appwrite
|
|
|
293
358
|
params: api_params,
|
|
294
359
|
response_type: Models::Message
|
|
295
360
|
)
|
|
296
|
-
|
|
297
361
|
end
|
|
298
362
|
|
|
299
363
|
# Create a new SMS message.
|
|
300
364
|
#
|
|
301
|
-
# @param [String] message_id Message 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
|
|
365
|
+
# @param [String] message_id Message 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.
|
|
302
366
|
# @param [String] content SMS Content.
|
|
303
367
|
# @param [Array] topics List of Topic IDs.
|
|
304
368
|
# @param [Array] users List of User IDs.
|
|
@@ -307,15 +371,23 @@ module Appwrite
|
|
|
307
371
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
308
372
|
#
|
|
309
373
|
# @return [Message]
|
|
310
|
-
def create_sms(
|
|
374
|
+
def create_sms(
|
|
375
|
+
message_id:,
|
|
376
|
+
content:,
|
|
377
|
+
topics: nil,
|
|
378
|
+
users: nil,
|
|
379
|
+
targets: nil,
|
|
380
|
+
draft: nil,
|
|
381
|
+
scheduled_at: nil
|
|
382
|
+
)
|
|
311
383
|
api_path = '/messaging/messages/sms'
|
|
312
384
|
|
|
313
385
|
if message_id.nil?
|
|
314
|
-
|
|
386
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
315
387
|
end
|
|
316
388
|
|
|
317
389
|
if content.nil?
|
|
318
|
-
|
|
390
|
+
raise Appwrite::Exception.new('Missing required parameter: "content"')
|
|
319
391
|
end
|
|
320
392
|
|
|
321
393
|
api_params = {
|
|
@@ -327,7 +399,7 @@ module Appwrite
|
|
|
327
399
|
draft: draft,
|
|
328
400
|
scheduledAt: scheduled_at,
|
|
329
401
|
}
|
|
330
|
-
|
|
402
|
+
|
|
331
403
|
api_headers = {
|
|
332
404
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
333
405
|
"content-type": 'application/json',
|
|
@@ -341,13 +413,12 @@ module Appwrite
|
|
|
341
413
|
params: api_params,
|
|
342
414
|
response_type: Models::Message
|
|
343
415
|
)
|
|
344
|
-
|
|
345
416
|
end
|
|
346
417
|
|
|
347
418
|
# Update an SMS message by its unique ID. This endpoint only works on
|
|
348
419
|
# messages that are in draft status. Messages that are already processing,
|
|
349
420
|
# sent, or failed cannot be updated.
|
|
350
|
-
#
|
|
421
|
+
#
|
|
351
422
|
#
|
|
352
423
|
# @param [String] message_id Message ID.
|
|
353
424
|
# @param [Array] topics List of Topic IDs.
|
|
@@ -358,12 +429,20 @@ module Appwrite
|
|
|
358
429
|
# @param [String] scheduled_at Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
|
|
359
430
|
#
|
|
360
431
|
# @return [Message]
|
|
361
|
-
def update_sms(
|
|
432
|
+
def update_sms(
|
|
433
|
+
message_id:,
|
|
434
|
+
topics: nil,
|
|
435
|
+
users: nil,
|
|
436
|
+
targets: nil,
|
|
437
|
+
content: nil,
|
|
438
|
+
draft: nil,
|
|
439
|
+
scheduled_at: nil
|
|
440
|
+
)
|
|
362
441
|
api_path = '/messaging/messages/sms/{messageId}'
|
|
363
442
|
.gsub('{messageId}', message_id)
|
|
364
443
|
|
|
365
444
|
if message_id.nil?
|
|
366
|
-
|
|
445
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
367
446
|
end
|
|
368
447
|
|
|
369
448
|
api_params = {
|
|
@@ -374,7 +453,7 @@ module Appwrite
|
|
|
374
453
|
draft: draft,
|
|
375
454
|
scheduledAt: scheduled_at,
|
|
376
455
|
}
|
|
377
|
-
|
|
456
|
+
|
|
378
457
|
api_headers = {
|
|
379
458
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
380
459
|
"content-type": 'application/json',
|
|
@@ -388,26 +467,26 @@ module Appwrite
|
|
|
388
467
|
params: api_params,
|
|
389
468
|
response_type: Models::Message
|
|
390
469
|
)
|
|
391
|
-
|
|
392
470
|
end
|
|
393
471
|
|
|
394
472
|
# Get a message by its unique ID.
|
|
395
|
-
#
|
|
473
|
+
#
|
|
396
474
|
#
|
|
397
475
|
# @param [String] message_id Message ID.
|
|
398
476
|
#
|
|
399
477
|
# @return [Message]
|
|
400
|
-
def get_message(
|
|
478
|
+
def get_message(
|
|
479
|
+
message_id:
|
|
480
|
+
)
|
|
401
481
|
api_path = '/messaging/messages/{messageId}'
|
|
402
482
|
.gsub('{messageId}', message_id)
|
|
403
483
|
|
|
404
484
|
if message_id.nil?
|
|
405
|
-
|
|
485
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
406
486
|
end
|
|
407
487
|
|
|
408
|
-
api_params = {
|
|
409
|
-
|
|
410
|
-
|
|
488
|
+
api_params = {}
|
|
489
|
+
|
|
411
490
|
api_headers = {
|
|
412
491
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
413
492
|
"accept": 'application/json',
|
|
@@ -420,7 +499,6 @@ module Appwrite
|
|
|
420
499
|
params: api_params,
|
|
421
500
|
response_type: Models::Message
|
|
422
501
|
)
|
|
423
|
-
|
|
424
502
|
end
|
|
425
503
|
|
|
426
504
|
# Delete a message. If the message is not a draft or scheduled, but has been
|
|
@@ -429,17 +507,18 @@ module Appwrite
|
|
|
429
507
|
# @param [String] message_id Message ID.
|
|
430
508
|
#
|
|
431
509
|
# @return []
|
|
432
|
-
def delete(
|
|
510
|
+
def delete(
|
|
511
|
+
message_id:
|
|
512
|
+
)
|
|
433
513
|
api_path = '/messaging/messages/{messageId}'
|
|
434
514
|
.gsub('{messageId}', message_id)
|
|
435
515
|
|
|
436
516
|
if message_id.nil?
|
|
437
|
-
|
|
517
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
438
518
|
end
|
|
439
519
|
|
|
440
|
-
api_params = {
|
|
441
|
-
|
|
442
|
-
|
|
520
|
+
api_params = {}
|
|
521
|
+
|
|
443
522
|
api_headers = {
|
|
444
523
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
445
524
|
"content-type": 'application/json',
|
|
@@ -451,7 +530,6 @@ module Appwrite
|
|
|
451
530
|
headers: api_headers,
|
|
452
531
|
params: api_params,
|
|
453
532
|
)
|
|
454
|
-
|
|
455
533
|
end
|
|
456
534
|
|
|
457
535
|
# Get a list of the targets associated with a message.
|
|
@@ -461,19 +539,23 @@ module Appwrite
|
|
|
461
539
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
462
540
|
#
|
|
463
541
|
# @return [TargetList]
|
|
464
|
-
def list_targets(
|
|
542
|
+
def list_targets(
|
|
543
|
+
message_id:,
|
|
544
|
+
queries: nil,
|
|
545
|
+
total: nil
|
|
546
|
+
)
|
|
465
547
|
api_path = '/messaging/messages/{messageId}/targets'
|
|
466
548
|
.gsub('{messageId}', message_id)
|
|
467
549
|
|
|
468
550
|
if message_id.nil?
|
|
469
|
-
|
|
551
|
+
raise Appwrite::Exception.new('Missing required parameter: "messageId"')
|
|
470
552
|
end
|
|
471
553
|
|
|
472
554
|
api_params = {
|
|
473
555
|
queries: queries,
|
|
474
556
|
total: total,
|
|
475
557
|
}
|
|
476
|
-
|
|
558
|
+
|
|
477
559
|
api_headers = {
|
|
478
560
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
479
561
|
"accept": 'application/json',
|
|
@@ -486,7 +568,6 @@ module Appwrite
|
|
|
486
568
|
params: api_params,
|
|
487
569
|
response_type: Models::TargetList
|
|
488
570
|
)
|
|
489
|
-
|
|
490
571
|
end
|
|
491
572
|
|
|
492
573
|
# Get a list of all providers from the current Appwrite project.
|
|
@@ -496,7 +577,11 @@ module Appwrite
|
|
|
496
577
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
497
578
|
#
|
|
498
579
|
# @return [ProviderList]
|
|
499
|
-
def list_providers(
|
|
580
|
+
def list_providers(
|
|
581
|
+
queries: nil,
|
|
582
|
+
search: nil,
|
|
583
|
+
total: nil
|
|
584
|
+
)
|
|
500
585
|
api_path = '/messaging/providers'
|
|
501
586
|
|
|
502
587
|
api_params = {
|
|
@@ -504,7 +589,7 @@ module Appwrite
|
|
|
504
589
|
search: search,
|
|
505
590
|
total: total,
|
|
506
591
|
}
|
|
507
|
-
|
|
592
|
+
|
|
508
593
|
api_headers = {
|
|
509
594
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
510
595
|
"accept": 'application/json',
|
|
@@ -517,12 +602,11 @@ module Appwrite
|
|
|
517
602
|
params: api_params,
|
|
518
603
|
response_type: Models::ProviderList
|
|
519
604
|
)
|
|
520
|
-
|
|
521
605
|
end
|
|
522
606
|
|
|
523
607
|
# Create a new Apple Push Notification service provider.
|
|
524
608
|
#
|
|
525
|
-
# @param [String] provider_id Provider 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
|
|
609
|
+
# @param [String] provider_id Provider 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.
|
|
526
610
|
# @param [String] name Provider name.
|
|
527
611
|
# @param [String] auth_key APNS authentication key.
|
|
528
612
|
# @param [String] auth_key_id APNS authentication key ID.
|
|
@@ -532,15 +616,24 @@ module Appwrite
|
|
|
532
616
|
# @param [] enabled Set as enabled.
|
|
533
617
|
#
|
|
534
618
|
# @return [Provider]
|
|
535
|
-
def create_apns_provider(
|
|
619
|
+
def create_apns_provider(
|
|
620
|
+
provider_id:,
|
|
621
|
+
name:,
|
|
622
|
+
auth_key: nil,
|
|
623
|
+
auth_key_id: nil,
|
|
624
|
+
team_id: nil,
|
|
625
|
+
bundle_id: nil,
|
|
626
|
+
sandbox: nil,
|
|
627
|
+
enabled: nil
|
|
628
|
+
)
|
|
536
629
|
api_path = '/messaging/providers/apns'
|
|
537
630
|
|
|
538
631
|
if provider_id.nil?
|
|
539
|
-
|
|
632
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
540
633
|
end
|
|
541
634
|
|
|
542
635
|
if name.nil?
|
|
543
|
-
|
|
636
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
544
637
|
end
|
|
545
638
|
|
|
546
639
|
api_params = {
|
|
@@ -553,7 +646,7 @@ module Appwrite
|
|
|
553
646
|
sandbox: sandbox,
|
|
554
647
|
enabled: enabled,
|
|
555
648
|
}
|
|
556
|
-
|
|
649
|
+
|
|
557
650
|
api_headers = {
|
|
558
651
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
559
652
|
"content-type": 'application/json',
|
|
@@ -567,7 +660,6 @@ module Appwrite
|
|
|
567
660
|
params: api_params,
|
|
568
661
|
response_type: Models::Provider
|
|
569
662
|
)
|
|
570
|
-
|
|
571
663
|
end
|
|
572
664
|
|
|
573
665
|
# Update a Apple Push Notification service provider by its unique ID.
|
|
@@ -582,12 +674,21 @@ module Appwrite
|
|
|
582
674
|
# @param [] sandbox Use APNS sandbox environment.
|
|
583
675
|
#
|
|
584
676
|
# @return [Provider]
|
|
585
|
-
def update_apns_provider(
|
|
677
|
+
def update_apns_provider(
|
|
678
|
+
provider_id:,
|
|
679
|
+
name: nil,
|
|
680
|
+
enabled: nil,
|
|
681
|
+
auth_key: nil,
|
|
682
|
+
auth_key_id: nil,
|
|
683
|
+
team_id: nil,
|
|
684
|
+
bundle_id: nil,
|
|
685
|
+
sandbox: nil
|
|
686
|
+
)
|
|
586
687
|
api_path = '/messaging/providers/apns/{providerId}'
|
|
587
688
|
.gsub('{providerId}', provider_id)
|
|
588
689
|
|
|
589
690
|
if provider_id.nil?
|
|
590
|
-
|
|
691
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
591
692
|
end
|
|
592
693
|
|
|
593
694
|
api_params = {
|
|
@@ -599,7 +700,7 @@ module Appwrite
|
|
|
599
700
|
bundleId: bundle_id,
|
|
600
701
|
sandbox: sandbox,
|
|
601
702
|
}
|
|
602
|
-
|
|
703
|
+
|
|
603
704
|
api_headers = {
|
|
604
705
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
605
706
|
"content-type": 'application/json',
|
|
@@ -613,26 +714,30 @@ module Appwrite
|
|
|
613
714
|
params: api_params,
|
|
614
715
|
response_type: Models::Provider
|
|
615
716
|
)
|
|
616
|
-
|
|
617
717
|
end
|
|
618
718
|
|
|
619
719
|
# Create a new Firebase Cloud Messaging provider.
|
|
620
720
|
#
|
|
621
|
-
# @param [String] provider_id Provider 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
|
|
721
|
+
# @param [String] provider_id Provider 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.
|
|
622
722
|
# @param [String] name Provider name.
|
|
623
723
|
# @param [Hash] service_account_json FCM service account JSON.
|
|
624
724
|
# @param [] enabled Set as enabled.
|
|
625
725
|
#
|
|
626
726
|
# @return [Provider]
|
|
627
|
-
def create_fcm_provider(
|
|
727
|
+
def create_fcm_provider(
|
|
728
|
+
provider_id:,
|
|
729
|
+
name:,
|
|
730
|
+
service_account_json: nil,
|
|
731
|
+
enabled: nil
|
|
732
|
+
)
|
|
628
733
|
api_path = '/messaging/providers/fcm'
|
|
629
734
|
|
|
630
735
|
if provider_id.nil?
|
|
631
|
-
|
|
736
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
632
737
|
end
|
|
633
738
|
|
|
634
739
|
if name.nil?
|
|
635
|
-
|
|
740
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
636
741
|
end
|
|
637
742
|
|
|
638
743
|
api_params = {
|
|
@@ -641,7 +746,7 @@ module Appwrite
|
|
|
641
746
|
serviceAccountJSON: service_account_json,
|
|
642
747
|
enabled: enabled,
|
|
643
748
|
}
|
|
644
|
-
|
|
749
|
+
|
|
645
750
|
api_headers = {
|
|
646
751
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
647
752
|
"content-type": 'application/json',
|
|
@@ -655,7 +760,6 @@ module Appwrite
|
|
|
655
760
|
params: api_params,
|
|
656
761
|
response_type: Models::Provider
|
|
657
762
|
)
|
|
658
|
-
|
|
659
763
|
end
|
|
660
764
|
|
|
661
765
|
# Update a Firebase Cloud Messaging provider by its unique ID.
|
|
@@ -666,12 +770,17 @@ module Appwrite
|
|
|
666
770
|
# @param [Hash] service_account_json FCM service account JSON.
|
|
667
771
|
#
|
|
668
772
|
# @return [Provider]
|
|
669
|
-
def update_fcm_provider(
|
|
773
|
+
def update_fcm_provider(
|
|
774
|
+
provider_id:,
|
|
775
|
+
name: nil,
|
|
776
|
+
enabled: nil,
|
|
777
|
+
service_account_json: nil
|
|
778
|
+
)
|
|
670
779
|
api_path = '/messaging/providers/fcm/{providerId}'
|
|
671
780
|
.gsub('{providerId}', provider_id)
|
|
672
781
|
|
|
673
782
|
if provider_id.nil?
|
|
674
|
-
|
|
783
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
675
784
|
end
|
|
676
785
|
|
|
677
786
|
api_params = {
|
|
@@ -679,7 +788,7 @@ module Appwrite
|
|
|
679
788
|
enabled: enabled,
|
|
680
789
|
serviceAccountJSON: service_account_json,
|
|
681
790
|
}
|
|
682
|
-
|
|
791
|
+
|
|
683
792
|
api_headers = {
|
|
684
793
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
685
794
|
"content-type": 'application/json',
|
|
@@ -693,12 +802,11 @@ module Appwrite
|
|
|
693
802
|
params: api_params,
|
|
694
803
|
response_type: Models::Provider
|
|
695
804
|
)
|
|
696
|
-
|
|
697
805
|
end
|
|
698
806
|
|
|
699
807
|
# Create a new Mailgun provider.
|
|
700
808
|
#
|
|
701
|
-
# @param [String] provider_id Provider 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
|
|
809
|
+
# @param [String] provider_id Provider 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.
|
|
702
810
|
# @param [String] name Provider name.
|
|
703
811
|
# @param [String] api_key Mailgun API Key.
|
|
704
812
|
# @param [String] domain Mailgun Domain.
|
|
@@ -710,15 +818,26 @@ module Appwrite
|
|
|
710
818
|
# @param [] enabled Set as enabled.
|
|
711
819
|
#
|
|
712
820
|
# @return [Provider]
|
|
713
|
-
def create_mailgun_provider(
|
|
821
|
+
def create_mailgun_provider(
|
|
822
|
+
provider_id:,
|
|
823
|
+
name:,
|
|
824
|
+
api_key: nil,
|
|
825
|
+
domain: nil,
|
|
826
|
+
is_eu_region: nil,
|
|
827
|
+
from_name: nil,
|
|
828
|
+
from_email: nil,
|
|
829
|
+
reply_to_name: nil,
|
|
830
|
+
reply_to_email: nil,
|
|
831
|
+
enabled: nil
|
|
832
|
+
)
|
|
714
833
|
api_path = '/messaging/providers/mailgun'
|
|
715
834
|
|
|
716
835
|
if provider_id.nil?
|
|
717
|
-
|
|
836
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
718
837
|
end
|
|
719
838
|
|
|
720
839
|
if name.nil?
|
|
721
|
-
|
|
840
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
722
841
|
end
|
|
723
842
|
|
|
724
843
|
api_params = {
|
|
@@ -733,7 +852,7 @@ module Appwrite
|
|
|
733
852
|
replyToEmail: reply_to_email,
|
|
734
853
|
enabled: enabled,
|
|
735
854
|
}
|
|
736
|
-
|
|
855
|
+
|
|
737
856
|
api_headers = {
|
|
738
857
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
739
858
|
"content-type": 'application/json',
|
|
@@ -747,7 +866,6 @@ module Appwrite
|
|
|
747
866
|
params: api_params,
|
|
748
867
|
response_type: Models::Provider
|
|
749
868
|
)
|
|
750
|
-
|
|
751
869
|
end
|
|
752
870
|
|
|
753
871
|
# Update a Mailgun provider by its unique ID.
|
|
@@ -764,12 +882,23 @@ module Appwrite
|
|
|
764
882
|
# @param [String] reply_to_email Email set in the reply to field for the mail. Default value is sender email.
|
|
765
883
|
#
|
|
766
884
|
# @return [Provider]
|
|
767
|
-
def update_mailgun_provider(
|
|
885
|
+
def update_mailgun_provider(
|
|
886
|
+
provider_id:,
|
|
887
|
+
name: nil,
|
|
888
|
+
api_key: nil,
|
|
889
|
+
domain: nil,
|
|
890
|
+
is_eu_region: nil,
|
|
891
|
+
enabled: nil,
|
|
892
|
+
from_name: nil,
|
|
893
|
+
from_email: nil,
|
|
894
|
+
reply_to_name: nil,
|
|
895
|
+
reply_to_email: nil
|
|
896
|
+
)
|
|
768
897
|
api_path = '/messaging/providers/mailgun/{providerId}'
|
|
769
898
|
.gsub('{providerId}', provider_id)
|
|
770
899
|
|
|
771
900
|
if provider_id.nil?
|
|
772
|
-
|
|
901
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
773
902
|
end
|
|
774
903
|
|
|
775
904
|
api_params = {
|
|
@@ -783,7 +912,7 @@ module Appwrite
|
|
|
783
912
|
replyToName: reply_to_name,
|
|
784
913
|
replyToEmail: reply_to_email,
|
|
785
914
|
}
|
|
786
|
-
|
|
915
|
+
|
|
787
916
|
api_headers = {
|
|
788
917
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
789
918
|
"content-type": 'application/json',
|
|
@@ -797,12 +926,11 @@ module Appwrite
|
|
|
797
926
|
params: api_params,
|
|
798
927
|
response_type: Models::Provider
|
|
799
928
|
)
|
|
800
|
-
|
|
801
929
|
end
|
|
802
930
|
|
|
803
931
|
# Create a new MSG91 provider.
|
|
804
932
|
#
|
|
805
|
-
# @param [String] provider_id Provider 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
|
|
933
|
+
# @param [String] provider_id Provider 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.
|
|
806
934
|
# @param [String] name Provider name.
|
|
807
935
|
# @param [String] template_id Msg91 template ID
|
|
808
936
|
# @param [String] sender_id Msg91 sender ID.
|
|
@@ -810,15 +938,22 @@ module Appwrite
|
|
|
810
938
|
# @param [] enabled Set as enabled.
|
|
811
939
|
#
|
|
812
940
|
# @return [Provider]
|
|
813
|
-
def create_msg91_provider(
|
|
941
|
+
def create_msg91_provider(
|
|
942
|
+
provider_id:,
|
|
943
|
+
name:,
|
|
944
|
+
template_id: nil,
|
|
945
|
+
sender_id: nil,
|
|
946
|
+
auth_key: nil,
|
|
947
|
+
enabled: nil
|
|
948
|
+
)
|
|
814
949
|
api_path = '/messaging/providers/msg91'
|
|
815
950
|
|
|
816
951
|
if provider_id.nil?
|
|
817
|
-
|
|
952
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
818
953
|
end
|
|
819
954
|
|
|
820
955
|
if name.nil?
|
|
821
|
-
|
|
956
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
822
957
|
end
|
|
823
958
|
|
|
824
959
|
api_params = {
|
|
@@ -829,7 +964,7 @@ module Appwrite
|
|
|
829
964
|
authKey: auth_key,
|
|
830
965
|
enabled: enabled,
|
|
831
966
|
}
|
|
832
|
-
|
|
967
|
+
|
|
833
968
|
api_headers = {
|
|
834
969
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
835
970
|
"content-type": 'application/json',
|
|
@@ -843,7 +978,6 @@ module Appwrite
|
|
|
843
978
|
params: api_params,
|
|
844
979
|
response_type: Models::Provider
|
|
845
980
|
)
|
|
846
|
-
|
|
847
981
|
end
|
|
848
982
|
|
|
849
983
|
# Update a MSG91 provider by its unique ID.
|
|
@@ -856,12 +990,19 @@ module Appwrite
|
|
|
856
990
|
# @param [String] auth_key Msg91 auth key.
|
|
857
991
|
#
|
|
858
992
|
# @return [Provider]
|
|
859
|
-
def update_msg91_provider(
|
|
993
|
+
def update_msg91_provider(
|
|
994
|
+
provider_id:,
|
|
995
|
+
name: nil,
|
|
996
|
+
enabled: nil,
|
|
997
|
+
template_id: nil,
|
|
998
|
+
sender_id: nil,
|
|
999
|
+
auth_key: nil
|
|
1000
|
+
)
|
|
860
1001
|
api_path = '/messaging/providers/msg91/{providerId}'
|
|
861
1002
|
.gsub('{providerId}', provider_id)
|
|
862
1003
|
|
|
863
1004
|
if provider_id.nil?
|
|
864
|
-
|
|
1005
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
865
1006
|
end
|
|
866
1007
|
|
|
867
1008
|
api_params = {
|
|
@@ -871,7 +1012,7 @@ module Appwrite
|
|
|
871
1012
|
senderId: sender_id,
|
|
872
1013
|
authKey: auth_key,
|
|
873
1014
|
}
|
|
874
|
-
|
|
1015
|
+
|
|
875
1016
|
api_headers = {
|
|
876
1017
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
877
1018
|
"content-type": 'application/json',
|
|
@@ -885,12 +1026,11 @@ module Appwrite
|
|
|
885
1026
|
params: api_params,
|
|
886
1027
|
response_type: Models::Provider
|
|
887
1028
|
)
|
|
888
|
-
|
|
889
1029
|
end
|
|
890
1030
|
|
|
891
1031
|
# Create a new Resend provider.
|
|
892
1032
|
#
|
|
893
|
-
# @param [String] provider_id Provider 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
|
|
1033
|
+
# @param [String] provider_id Provider 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.
|
|
894
1034
|
# @param [String] name Provider name.
|
|
895
1035
|
# @param [String] api_key Resend API key.
|
|
896
1036
|
# @param [String] from_name Sender Name.
|
|
@@ -900,15 +1040,24 @@ module Appwrite
|
|
|
900
1040
|
# @param [] enabled Set as enabled.
|
|
901
1041
|
#
|
|
902
1042
|
# @return [Provider]
|
|
903
|
-
def create_resend_provider(
|
|
1043
|
+
def create_resend_provider(
|
|
1044
|
+
provider_id:,
|
|
1045
|
+
name:,
|
|
1046
|
+
api_key: nil,
|
|
1047
|
+
from_name: nil,
|
|
1048
|
+
from_email: nil,
|
|
1049
|
+
reply_to_name: nil,
|
|
1050
|
+
reply_to_email: nil,
|
|
1051
|
+
enabled: nil
|
|
1052
|
+
)
|
|
904
1053
|
api_path = '/messaging/providers/resend'
|
|
905
1054
|
|
|
906
1055
|
if provider_id.nil?
|
|
907
|
-
|
|
1056
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
908
1057
|
end
|
|
909
1058
|
|
|
910
1059
|
if name.nil?
|
|
911
|
-
|
|
1060
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
912
1061
|
end
|
|
913
1062
|
|
|
914
1063
|
api_params = {
|
|
@@ -921,7 +1070,7 @@ module Appwrite
|
|
|
921
1070
|
replyToEmail: reply_to_email,
|
|
922
1071
|
enabled: enabled,
|
|
923
1072
|
}
|
|
924
|
-
|
|
1073
|
+
|
|
925
1074
|
api_headers = {
|
|
926
1075
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
927
1076
|
"content-type": 'application/json',
|
|
@@ -935,7 +1084,6 @@ module Appwrite
|
|
|
935
1084
|
params: api_params,
|
|
936
1085
|
response_type: Models::Provider
|
|
937
1086
|
)
|
|
938
|
-
|
|
939
1087
|
end
|
|
940
1088
|
|
|
941
1089
|
# Update a Resend provider by its unique ID.
|
|
@@ -950,12 +1098,21 @@ module Appwrite
|
|
|
950
1098
|
# @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
951
1099
|
#
|
|
952
1100
|
# @return [Provider]
|
|
953
|
-
def update_resend_provider(
|
|
1101
|
+
def update_resend_provider(
|
|
1102
|
+
provider_id:,
|
|
1103
|
+
name: nil,
|
|
1104
|
+
enabled: nil,
|
|
1105
|
+
api_key: nil,
|
|
1106
|
+
from_name: nil,
|
|
1107
|
+
from_email: nil,
|
|
1108
|
+
reply_to_name: nil,
|
|
1109
|
+
reply_to_email: nil
|
|
1110
|
+
)
|
|
954
1111
|
api_path = '/messaging/providers/resend/{providerId}'
|
|
955
1112
|
.gsub('{providerId}', provider_id)
|
|
956
1113
|
|
|
957
1114
|
if provider_id.nil?
|
|
958
|
-
|
|
1115
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
959
1116
|
end
|
|
960
1117
|
|
|
961
1118
|
api_params = {
|
|
@@ -967,7 +1124,7 @@ module Appwrite
|
|
|
967
1124
|
replyToName: reply_to_name,
|
|
968
1125
|
replyToEmail: reply_to_email,
|
|
969
1126
|
}
|
|
970
|
-
|
|
1127
|
+
|
|
971
1128
|
api_headers = {
|
|
972
1129
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
973
1130
|
"content-type": 'application/json',
|
|
@@ -981,12 +1138,11 @@ module Appwrite
|
|
|
981
1138
|
params: api_params,
|
|
982
1139
|
response_type: Models::Provider
|
|
983
1140
|
)
|
|
984
|
-
|
|
985
1141
|
end
|
|
986
1142
|
|
|
987
1143
|
# Create a new Sendgrid provider.
|
|
988
1144
|
#
|
|
989
|
-
# @param [String] provider_id Provider 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
|
|
1145
|
+
# @param [String] provider_id Provider 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.
|
|
990
1146
|
# @param [String] name Provider name.
|
|
991
1147
|
# @param [String] api_key Sendgrid API key.
|
|
992
1148
|
# @param [String] from_name Sender Name.
|
|
@@ -996,15 +1152,24 @@ module Appwrite
|
|
|
996
1152
|
# @param [] enabled Set as enabled.
|
|
997
1153
|
#
|
|
998
1154
|
# @return [Provider]
|
|
999
|
-
def create_sendgrid_provider(
|
|
1155
|
+
def create_sendgrid_provider(
|
|
1156
|
+
provider_id:,
|
|
1157
|
+
name:,
|
|
1158
|
+
api_key: nil,
|
|
1159
|
+
from_name: nil,
|
|
1160
|
+
from_email: nil,
|
|
1161
|
+
reply_to_name: nil,
|
|
1162
|
+
reply_to_email: nil,
|
|
1163
|
+
enabled: nil
|
|
1164
|
+
)
|
|
1000
1165
|
api_path = '/messaging/providers/sendgrid'
|
|
1001
1166
|
|
|
1002
1167
|
if provider_id.nil?
|
|
1003
|
-
|
|
1168
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1004
1169
|
end
|
|
1005
1170
|
|
|
1006
1171
|
if name.nil?
|
|
1007
|
-
|
|
1172
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1008
1173
|
end
|
|
1009
1174
|
|
|
1010
1175
|
api_params = {
|
|
@@ -1017,7 +1182,7 @@ module Appwrite
|
|
|
1017
1182
|
replyToEmail: reply_to_email,
|
|
1018
1183
|
enabled: enabled,
|
|
1019
1184
|
}
|
|
1020
|
-
|
|
1185
|
+
|
|
1021
1186
|
api_headers = {
|
|
1022
1187
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1023
1188
|
"content-type": 'application/json',
|
|
@@ -1031,7 +1196,6 @@ module Appwrite
|
|
|
1031
1196
|
params: api_params,
|
|
1032
1197
|
response_type: Models::Provider
|
|
1033
1198
|
)
|
|
1034
|
-
|
|
1035
1199
|
end
|
|
1036
1200
|
|
|
1037
1201
|
# Update a Sendgrid provider by its unique ID.
|
|
@@ -1046,12 +1210,21 @@ module Appwrite
|
|
|
1046
1210
|
# @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1047
1211
|
#
|
|
1048
1212
|
# @return [Provider]
|
|
1049
|
-
def update_sendgrid_provider(
|
|
1213
|
+
def update_sendgrid_provider(
|
|
1214
|
+
provider_id:,
|
|
1215
|
+
name: nil,
|
|
1216
|
+
enabled: nil,
|
|
1217
|
+
api_key: nil,
|
|
1218
|
+
from_name: nil,
|
|
1219
|
+
from_email: nil,
|
|
1220
|
+
reply_to_name: nil,
|
|
1221
|
+
reply_to_email: nil
|
|
1222
|
+
)
|
|
1050
1223
|
api_path = '/messaging/providers/sendgrid/{providerId}'
|
|
1051
1224
|
.gsub('{providerId}', provider_id)
|
|
1052
1225
|
|
|
1053
1226
|
if provider_id.nil?
|
|
1054
|
-
|
|
1227
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1055
1228
|
end
|
|
1056
1229
|
|
|
1057
1230
|
api_params = {
|
|
@@ -1063,7 +1236,7 @@ module Appwrite
|
|
|
1063
1236
|
replyToName: reply_to_name,
|
|
1064
1237
|
replyToEmail: reply_to_email,
|
|
1065
1238
|
}
|
|
1066
|
-
|
|
1239
|
+
|
|
1067
1240
|
api_headers = {
|
|
1068
1241
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1069
1242
|
"content-type": 'application/json',
|
|
@@ -1077,12 +1250,11 @@ module Appwrite
|
|
|
1077
1250
|
params: api_params,
|
|
1078
1251
|
response_type: Models::Provider
|
|
1079
1252
|
)
|
|
1080
|
-
|
|
1081
1253
|
end
|
|
1082
1254
|
|
|
1083
1255
|
# Create a new Amazon SES provider.
|
|
1084
1256
|
#
|
|
1085
|
-
# @param [String] provider_id Provider 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
|
|
1257
|
+
# @param [String] provider_id Provider 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.
|
|
1086
1258
|
# @param [String] name Provider name.
|
|
1087
1259
|
# @param [String] access_key AWS access key ID.
|
|
1088
1260
|
# @param [String] secret_key AWS secret access key.
|
|
@@ -1094,15 +1266,26 @@ module Appwrite
|
|
|
1094
1266
|
# @param [] enabled Set as enabled.
|
|
1095
1267
|
#
|
|
1096
1268
|
# @return [Provider]
|
|
1097
|
-
def create_ses_provider(
|
|
1269
|
+
def create_ses_provider(
|
|
1270
|
+
provider_id:,
|
|
1271
|
+
name:,
|
|
1272
|
+
access_key: nil,
|
|
1273
|
+
secret_key: nil,
|
|
1274
|
+
region: nil,
|
|
1275
|
+
from_name: nil,
|
|
1276
|
+
from_email: nil,
|
|
1277
|
+
reply_to_name: nil,
|
|
1278
|
+
reply_to_email: nil,
|
|
1279
|
+
enabled: nil
|
|
1280
|
+
)
|
|
1098
1281
|
api_path = '/messaging/providers/ses'
|
|
1099
1282
|
|
|
1100
1283
|
if provider_id.nil?
|
|
1101
|
-
|
|
1284
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1102
1285
|
end
|
|
1103
1286
|
|
|
1104
1287
|
if name.nil?
|
|
1105
|
-
|
|
1288
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1106
1289
|
end
|
|
1107
1290
|
|
|
1108
1291
|
api_params = {
|
|
@@ -1117,7 +1300,7 @@ module Appwrite
|
|
|
1117
1300
|
replyToEmail: reply_to_email,
|
|
1118
1301
|
enabled: enabled,
|
|
1119
1302
|
}
|
|
1120
|
-
|
|
1303
|
+
|
|
1121
1304
|
api_headers = {
|
|
1122
1305
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1123
1306
|
"content-type": 'application/json',
|
|
@@ -1131,7 +1314,6 @@ module Appwrite
|
|
|
1131
1314
|
params: api_params,
|
|
1132
1315
|
response_type: Models::Provider
|
|
1133
1316
|
)
|
|
1134
|
-
|
|
1135
1317
|
end
|
|
1136
1318
|
|
|
1137
1319
|
# Update an Amazon SES provider by its unique ID.
|
|
@@ -1148,12 +1330,23 @@ module Appwrite
|
|
|
1148
1330
|
# @param [String] reply_to_email Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1149
1331
|
#
|
|
1150
1332
|
# @return [Provider]
|
|
1151
|
-
def update_ses_provider(
|
|
1333
|
+
def update_ses_provider(
|
|
1334
|
+
provider_id:,
|
|
1335
|
+
name: nil,
|
|
1336
|
+
enabled: nil,
|
|
1337
|
+
access_key: nil,
|
|
1338
|
+
secret_key: nil,
|
|
1339
|
+
region: nil,
|
|
1340
|
+
from_name: nil,
|
|
1341
|
+
from_email: nil,
|
|
1342
|
+
reply_to_name: nil,
|
|
1343
|
+
reply_to_email: nil
|
|
1344
|
+
)
|
|
1152
1345
|
api_path = '/messaging/providers/ses/{providerId}'
|
|
1153
1346
|
.gsub('{providerId}', provider_id)
|
|
1154
1347
|
|
|
1155
1348
|
if provider_id.nil?
|
|
1156
|
-
|
|
1349
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1157
1350
|
end
|
|
1158
1351
|
|
|
1159
1352
|
api_params = {
|
|
@@ -1167,7 +1360,7 @@ module Appwrite
|
|
|
1167
1360
|
replyToName: reply_to_name,
|
|
1168
1361
|
replyToEmail: reply_to_email,
|
|
1169
1362
|
}
|
|
1170
|
-
|
|
1363
|
+
|
|
1171
1364
|
api_headers = {
|
|
1172
1365
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1173
1366
|
"content-type": 'application/json',
|
|
@@ -1181,18 +1374,17 @@ module Appwrite
|
|
|
1181
1374
|
params: api_params,
|
|
1182
1375
|
response_type: Models::Provider
|
|
1183
1376
|
)
|
|
1184
|
-
|
|
1185
1377
|
end
|
|
1186
1378
|
|
|
1187
1379
|
# Create a new SMTP provider.
|
|
1188
1380
|
#
|
|
1189
|
-
# @param [String] provider_id Provider 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
|
|
1381
|
+
# @param [String] provider_id Provider 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.
|
|
1190
1382
|
# @param [String] name Provider name.
|
|
1191
|
-
# @param [String] host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465
|
|
1383
|
+
# @param [String] host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
|
|
1192
1384
|
# @param [Integer] port The default SMTP server port.
|
|
1193
1385
|
# @param [String] username Authentication username.
|
|
1194
1386
|
# @param [String] password Authentication password.
|
|
1195
|
-
# @param [SmtpEncryption] encryption Encryption type. Can be omitted,
|
|
1387
|
+
# @param [SmtpEncryption] encryption Encryption type. Can be omitted, 'ssl', or 'tls'
|
|
1196
1388
|
# @param [] auto_tls Enable SMTP AutoTLS feature.
|
|
1197
1389
|
# @param [String] mailer The value to use for the X-Mailer header.
|
|
1198
1390
|
# @param [String] from_name Sender Name.
|
|
@@ -1202,19 +1394,34 @@ module Appwrite
|
|
|
1202
1394
|
# @param [] enabled Set as enabled.
|
|
1203
1395
|
#
|
|
1204
1396
|
# @return [Provider]
|
|
1205
|
-
def create_smtp_provider(
|
|
1397
|
+
def create_smtp_provider(
|
|
1398
|
+
provider_id:,
|
|
1399
|
+
name:,
|
|
1400
|
+
host:,
|
|
1401
|
+
port: nil,
|
|
1402
|
+
username: nil,
|
|
1403
|
+
password: nil,
|
|
1404
|
+
encryption: nil,
|
|
1405
|
+
auto_tls: nil,
|
|
1406
|
+
mailer: nil,
|
|
1407
|
+
from_name: nil,
|
|
1408
|
+
from_email: nil,
|
|
1409
|
+
reply_to_name: nil,
|
|
1410
|
+
reply_to_email: nil,
|
|
1411
|
+
enabled: nil
|
|
1412
|
+
)
|
|
1206
1413
|
api_path = '/messaging/providers/smtp'
|
|
1207
1414
|
|
|
1208
1415
|
if provider_id.nil?
|
|
1209
|
-
|
|
1416
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1210
1417
|
end
|
|
1211
1418
|
|
|
1212
1419
|
if name.nil?
|
|
1213
|
-
|
|
1420
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1214
1421
|
end
|
|
1215
1422
|
|
|
1216
1423
|
if host.nil?
|
|
1217
|
-
|
|
1424
|
+
raise Appwrite::Exception.new('Missing required parameter: "host"')
|
|
1218
1425
|
end
|
|
1219
1426
|
|
|
1220
1427
|
api_params = {
|
|
@@ -1233,7 +1440,7 @@ module Appwrite
|
|
|
1233
1440
|
replyToEmail: reply_to_email,
|
|
1234
1441
|
enabled: enabled,
|
|
1235
1442
|
}
|
|
1236
|
-
|
|
1443
|
+
|
|
1237
1444
|
api_headers = {
|
|
1238
1445
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1239
1446
|
"content-type": 'application/json',
|
|
@@ -1247,18 +1454,17 @@ module Appwrite
|
|
|
1247
1454
|
params: api_params,
|
|
1248
1455
|
response_type: Models::Provider
|
|
1249
1456
|
)
|
|
1250
|
-
|
|
1251
1457
|
end
|
|
1252
1458
|
|
|
1253
1459
|
# Update a SMTP provider by its unique ID.
|
|
1254
1460
|
#
|
|
1255
1461
|
# @param [String] provider_id Provider ID.
|
|
1256
1462
|
# @param [String] name Provider name.
|
|
1257
|
-
# @param [String] host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465
|
|
1463
|
+
# @param [String] host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
|
|
1258
1464
|
# @param [Integer] port SMTP port.
|
|
1259
1465
|
# @param [String] username Authentication username.
|
|
1260
1466
|
# @param [String] password Authentication password.
|
|
1261
|
-
# @param [SmtpEncryption] encryption Encryption type. Can be
|
|
1467
|
+
# @param [SmtpEncryption] encryption Encryption type. Can be 'ssl' or 'tls'
|
|
1262
1468
|
# @param [] auto_tls Enable SMTP AutoTLS feature.
|
|
1263
1469
|
# @param [String] mailer The value to use for the X-Mailer header.
|
|
1264
1470
|
# @param [String] from_name Sender Name.
|
|
@@ -1268,12 +1474,27 @@ module Appwrite
|
|
|
1268
1474
|
# @param [] enabled Set as enabled.
|
|
1269
1475
|
#
|
|
1270
1476
|
# @return [Provider]
|
|
1271
|
-
def update_smtp_provider(
|
|
1477
|
+
def update_smtp_provider(
|
|
1478
|
+
provider_id:,
|
|
1479
|
+
name: nil,
|
|
1480
|
+
host: nil,
|
|
1481
|
+
port: nil,
|
|
1482
|
+
username: nil,
|
|
1483
|
+
password: nil,
|
|
1484
|
+
encryption: nil,
|
|
1485
|
+
auto_tls: nil,
|
|
1486
|
+
mailer: nil,
|
|
1487
|
+
from_name: nil,
|
|
1488
|
+
from_email: nil,
|
|
1489
|
+
reply_to_name: nil,
|
|
1490
|
+
reply_to_email: nil,
|
|
1491
|
+
enabled: nil
|
|
1492
|
+
)
|
|
1272
1493
|
api_path = '/messaging/providers/smtp/{providerId}'
|
|
1273
1494
|
.gsub('{providerId}', provider_id)
|
|
1274
1495
|
|
|
1275
1496
|
if provider_id.nil?
|
|
1276
|
-
|
|
1497
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1277
1498
|
end
|
|
1278
1499
|
|
|
1279
1500
|
api_params = {
|
|
@@ -1291,7 +1512,7 @@ module Appwrite
|
|
|
1291
1512
|
replyToEmail: reply_to_email,
|
|
1292
1513
|
enabled: enabled,
|
|
1293
1514
|
}
|
|
1294
|
-
|
|
1515
|
+
|
|
1295
1516
|
api_headers = {
|
|
1296
1517
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1297
1518
|
"content-type": 'application/json',
|
|
@@ -1305,28 +1526,34 @@ module Appwrite
|
|
|
1305
1526
|
params: api_params,
|
|
1306
1527
|
response_type: Models::Provider
|
|
1307
1528
|
)
|
|
1308
|
-
|
|
1309
1529
|
end
|
|
1310
1530
|
|
|
1311
1531
|
# Create a new Telesign provider.
|
|
1312
1532
|
#
|
|
1313
|
-
# @param [String] provider_id Provider 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
|
|
1533
|
+
# @param [String] provider_id Provider 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.
|
|
1314
1534
|
# @param [String] name Provider name.
|
|
1315
|
-
# @param [String] from Sender Phone number. Format this number with a leading
|
|
1535
|
+
# @param [String] from Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1316
1536
|
# @param [String] customer_id Telesign customer ID.
|
|
1317
1537
|
# @param [String] api_key Telesign API key.
|
|
1318
1538
|
# @param [] enabled Set as enabled.
|
|
1319
1539
|
#
|
|
1320
1540
|
# @return [Provider]
|
|
1321
|
-
def create_telesign_provider(
|
|
1541
|
+
def create_telesign_provider(
|
|
1542
|
+
provider_id:,
|
|
1543
|
+
name:,
|
|
1544
|
+
from: nil,
|
|
1545
|
+
customer_id: nil,
|
|
1546
|
+
api_key: nil,
|
|
1547
|
+
enabled: nil
|
|
1548
|
+
)
|
|
1322
1549
|
api_path = '/messaging/providers/telesign'
|
|
1323
1550
|
|
|
1324
1551
|
if provider_id.nil?
|
|
1325
|
-
|
|
1552
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1326
1553
|
end
|
|
1327
1554
|
|
|
1328
1555
|
if name.nil?
|
|
1329
|
-
|
|
1556
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1330
1557
|
end
|
|
1331
1558
|
|
|
1332
1559
|
api_params = {
|
|
@@ -1337,7 +1564,7 @@ module Appwrite
|
|
|
1337
1564
|
apiKey: api_key,
|
|
1338
1565
|
enabled: enabled,
|
|
1339
1566
|
}
|
|
1340
|
-
|
|
1567
|
+
|
|
1341
1568
|
api_headers = {
|
|
1342
1569
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1343
1570
|
"content-type": 'application/json',
|
|
@@ -1351,7 +1578,6 @@ module Appwrite
|
|
|
1351
1578
|
params: api_params,
|
|
1352
1579
|
response_type: Models::Provider
|
|
1353
1580
|
)
|
|
1354
|
-
|
|
1355
1581
|
end
|
|
1356
1582
|
|
|
1357
1583
|
# Update a Telesign provider by its unique ID.
|
|
@@ -1364,12 +1590,19 @@ module Appwrite
|
|
|
1364
1590
|
# @param [String] from Sender number.
|
|
1365
1591
|
#
|
|
1366
1592
|
# @return [Provider]
|
|
1367
|
-
def update_telesign_provider(
|
|
1593
|
+
def update_telesign_provider(
|
|
1594
|
+
provider_id:,
|
|
1595
|
+
name: nil,
|
|
1596
|
+
enabled: nil,
|
|
1597
|
+
customer_id: nil,
|
|
1598
|
+
api_key: nil,
|
|
1599
|
+
from: nil
|
|
1600
|
+
)
|
|
1368
1601
|
api_path = '/messaging/providers/telesign/{providerId}'
|
|
1369
1602
|
.gsub('{providerId}', provider_id)
|
|
1370
1603
|
|
|
1371
1604
|
if provider_id.nil?
|
|
1372
|
-
|
|
1605
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1373
1606
|
end
|
|
1374
1607
|
|
|
1375
1608
|
api_params = {
|
|
@@ -1379,7 +1612,7 @@ module Appwrite
|
|
|
1379
1612
|
apiKey: api_key,
|
|
1380
1613
|
from: from,
|
|
1381
1614
|
}
|
|
1382
|
-
|
|
1615
|
+
|
|
1383
1616
|
api_headers = {
|
|
1384
1617
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1385
1618
|
"content-type": 'application/json',
|
|
@@ -1393,28 +1626,34 @@ module Appwrite
|
|
|
1393
1626
|
params: api_params,
|
|
1394
1627
|
response_type: Models::Provider
|
|
1395
1628
|
)
|
|
1396
|
-
|
|
1397
1629
|
end
|
|
1398
1630
|
|
|
1399
1631
|
# Create a new Textmagic provider.
|
|
1400
1632
|
#
|
|
1401
|
-
# @param [String] provider_id Provider 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
|
|
1633
|
+
# @param [String] provider_id Provider 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.
|
|
1402
1634
|
# @param [String] name Provider name.
|
|
1403
|
-
# @param [String] from Sender Phone number. Format this number with a leading
|
|
1635
|
+
# @param [String] from Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1404
1636
|
# @param [String] username Textmagic username.
|
|
1405
1637
|
# @param [String] api_key Textmagic apiKey.
|
|
1406
1638
|
# @param [] enabled Set as enabled.
|
|
1407
1639
|
#
|
|
1408
1640
|
# @return [Provider]
|
|
1409
|
-
def create_textmagic_provider(
|
|
1641
|
+
def create_textmagic_provider(
|
|
1642
|
+
provider_id:,
|
|
1643
|
+
name:,
|
|
1644
|
+
from: nil,
|
|
1645
|
+
username: nil,
|
|
1646
|
+
api_key: nil,
|
|
1647
|
+
enabled: nil
|
|
1648
|
+
)
|
|
1410
1649
|
api_path = '/messaging/providers/textmagic'
|
|
1411
1650
|
|
|
1412
1651
|
if provider_id.nil?
|
|
1413
|
-
|
|
1652
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1414
1653
|
end
|
|
1415
1654
|
|
|
1416
1655
|
if name.nil?
|
|
1417
|
-
|
|
1656
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1418
1657
|
end
|
|
1419
1658
|
|
|
1420
1659
|
api_params = {
|
|
@@ -1425,7 +1664,7 @@ module Appwrite
|
|
|
1425
1664
|
apiKey: api_key,
|
|
1426
1665
|
enabled: enabled,
|
|
1427
1666
|
}
|
|
1428
|
-
|
|
1667
|
+
|
|
1429
1668
|
api_headers = {
|
|
1430
1669
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1431
1670
|
"content-type": 'application/json',
|
|
@@ -1439,7 +1678,6 @@ module Appwrite
|
|
|
1439
1678
|
params: api_params,
|
|
1440
1679
|
response_type: Models::Provider
|
|
1441
1680
|
)
|
|
1442
|
-
|
|
1443
1681
|
end
|
|
1444
1682
|
|
|
1445
1683
|
# Update a Textmagic provider by its unique ID.
|
|
@@ -1452,12 +1690,19 @@ module Appwrite
|
|
|
1452
1690
|
# @param [String] from Sender number.
|
|
1453
1691
|
#
|
|
1454
1692
|
# @return [Provider]
|
|
1455
|
-
def update_textmagic_provider(
|
|
1693
|
+
def update_textmagic_provider(
|
|
1694
|
+
provider_id:,
|
|
1695
|
+
name: nil,
|
|
1696
|
+
enabled: nil,
|
|
1697
|
+
username: nil,
|
|
1698
|
+
api_key: nil,
|
|
1699
|
+
from: nil
|
|
1700
|
+
)
|
|
1456
1701
|
api_path = '/messaging/providers/textmagic/{providerId}'
|
|
1457
1702
|
.gsub('{providerId}', provider_id)
|
|
1458
1703
|
|
|
1459
1704
|
if provider_id.nil?
|
|
1460
|
-
|
|
1705
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1461
1706
|
end
|
|
1462
1707
|
|
|
1463
1708
|
api_params = {
|
|
@@ -1467,7 +1712,7 @@ module Appwrite
|
|
|
1467
1712
|
apiKey: api_key,
|
|
1468
1713
|
from: from,
|
|
1469
1714
|
}
|
|
1470
|
-
|
|
1715
|
+
|
|
1471
1716
|
api_headers = {
|
|
1472
1717
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1473
1718
|
"content-type": 'application/json',
|
|
@@ -1481,28 +1726,34 @@ module Appwrite
|
|
|
1481
1726
|
params: api_params,
|
|
1482
1727
|
response_type: Models::Provider
|
|
1483
1728
|
)
|
|
1484
|
-
|
|
1485
1729
|
end
|
|
1486
1730
|
|
|
1487
1731
|
# Create a new Twilio provider.
|
|
1488
1732
|
#
|
|
1489
|
-
# @param [String] provider_id Provider 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
|
|
1733
|
+
# @param [String] provider_id Provider 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.
|
|
1490
1734
|
# @param [String] name Provider name.
|
|
1491
|
-
# @param [String] from Sender Phone number. Format this number with a leading
|
|
1735
|
+
# @param [String] from Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1492
1736
|
# @param [String] account_sid Twilio account secret ID.
|
|
1493
1737
|
# @param [String] auth_token Twilio authentication token.
|
|
1494
1738
|
# @param [] enabled Set as enabled.
|
|
1495
1739
|
#
|
|
1496
1740
|
# @return [Provider]
|
|
1497
|
-
def create_twilio_provider(
|
|
1741
|
+
def create_twilio_provider(
|
|
1742
|
+
provider_id:,
|
|
1743
|
+
name:,
|
|
1744
|
+
from: nil,
|
|
1745
|
+
account_sid: nil,
|
|
1746
|
+
auth_token: nil,
|
|
1747
|
+
enabled: nil
|
|
1748
|
+
)
|
|
1498
1749
|
api_path = '/messaging/providers/twilio'
|
|
1499
1750
|
|
|
1500
1751
|
if provider_id.nil?
|
|
1501
|
-
|
|
1752
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1502
1753
|
end
|
|
1503
1754
|
|
|
1504
1755
|
if name.nil?
|
|
1505
|
-
|
|
1756
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1506
1757
|
end
|
|
1507
1758
|
|
|
1508
1759
|
api_params = {
|
|
@@ -1513,7 +1764,7 @@ module Appwrite
|
|
|
1513
1764
|
authToken: auth_token,
|
|
1514
1765
|
enabled: enabled,
|
|
1515
1766
|
}
|
|
1516
|
-
|
|
1767
|
+
|
|
1517
1768
|
api_headers = {
|
|
1518
1769
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1519
1770
|
"content-type": 'application/json',
|
|
@@ -1527,7 +1778,6 @@ module Appwrite
|
|
|
1527
1778
|
params: api_params,
|
|
1528
1779
|
response_type: Models::Provider
|
|
1529
1780
|
)
|
|
1530
|
-
|
|
1531
1781
|
end
|
|
1532
1782
|
|
|
1533
1783
|
# Update a Twilio provider by its unique ID.
|
|
@@ -1540,12 +1790,19 @@ module Appwrite
|
|
|
1540
1790
|
# @param [String] from Sender number.
|
|
1541
1791
|
#
|
|
1542
1792
|
# @return [Provider]
|
|
1543
|
-
def update_twilio_provider(
|
|
1793
|
+
def update_twilio_provider(
|
|
1794
|
+
provider_id:,
|
|
1795
|
+
name: nil,
|
|
1796
|
+
enabled: nil,
|
|
1797
|
+
account_sid: nil,
|
|
1798
|
+
auth_token: nil,
|
|
1799
|
+
from: nil
|
|
1800
|
+
)
|
|
1544
1801
|
api_path = '/messaging/providers/twilio/{providerId}'
|
|
1545
1802
|
.gsub('{providerId}', provider_id)
|
|
1546
1803
|
|
|
1547
1804
|
if provider_id.nil?
|
|
1548
|
-
|
|
1805
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1549
1806
|
end
|
|
1550
1807
|
|
|
1551
1808
|
api_params = {
|
|
@@ -1555,7 +1812,7 @@ module Appwrite
|
|
|
1555
1812
|
authToken: auth_token,
|
|
1556
1813
|
from: from,
|
|
1557
1814
|
}
|
|
1558
|
-
|
|
1815
|
+
|
|
1559
1816
|
api_headers = {
|
|
1560
1817
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1561
1818
|
"content-type": 'application/json',
|
|
@@ -1569,28 +1826,34 @@ module Appwrite
|
|
|
1569
1826
|
params: api_params,
|
|
1570
1827
|
response_type: Models::Provider
|
|
1571
1828
|
)
|
|
1572
|
-
|
|
1573
1829
|
end
|
|
1574
1830
|
|
|
1575
1831
|
# Create a new Vonage provider.
|
|
1576
1832
|
#
|
|
1577
|
-
# @param [String] provider_id Provider 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
|
|
1833
|
+
# @param [String] provider_id Provider 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.
|
|
1578
1834
|
# @param [String] name Provider name.
|
|
1579
|
-
# @param [String] from Sender Phone number. Format this number with a leading
|
|
1835
|
+
# @param [String] from Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
1580
1836
|
# @param [String] api_key Vonage API key.
|
|
1581
1837
|
# @param [String] api_secret Vonage API secret.
|
|
1582
1838
|
# @param [] enabled Set as enabled.
|
|
1583
1839
|
#
|
|
1584
1840
|
# @return [Provider]
|
|
1585
|
-
def create_vonage_provider(
|
|
1841
|
+
def create_vonage_provider(
|
|
1842
|
+
provider_id:,
|
|
1843
|
+
name:,
|
|
1844
|
+
from: nil,
|
|
1845
|
+
api_key: nil,
|
|
1846
|
+
api_secret: nil,
|
|
1847
|
+
enabled: nil
|
|
1848
|
+
)
|
|
1586
1849
|
api_path = '/messaging/providers/vonage'
|
|
1587
1850
|
|
|
1588
1851
|
if provider_id.nil?
|
|
1589
|
-
|
|
1852
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1590
1853
|
end
|
|
1591
1854
|
|
|
1592
1855
|
if name.nil?
|
|
1593
|
-
|
|
1856
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1594
1857
|
end
|
|
1595
1858
|
|
|
1596
1859
|
api_params = {
|
|
@@ -1601,7 +1864,7 @@ module Appwrite
|
|
|
1601
1864
|
apiSecret: api_secret,
|
|
1602
1865
|
enabled: enabled,
|
|
1603
1866
|
}
|
|
1604
|
-
|
|
1867
|
+
|
|
1605
1868
|
api_headers = {
|
|
1606
1869
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1607
1870
|
"content-type": 'application/json',
|
|
@@ -1615,7 +1878,6 @@ module Appwrite
|
|
|
1615
1878
|
params: api_params,
|
|
1616
1879
|
response_type: Models::Provider
|
|
1617
1880
|
)
|
|
1618
|
-
|
|
1619
1881
|
end
|
|
1620
1882
|
|
|
1621
1883
|
# Update a Vonage provider by its unique ID.
|
|
@@ -1628,12 +1890,19 @@ module Appwrite
|
|
|
1628
1890
|
# @param [String] from Sender number.
|
|
1629
1891
|
#
|
|
1630
1892
|
# @return [Provider]
|
|
1631
|
-
def update_vonage_provider(
|
|
1893
|
+
def update_vonage_provider(
|
|
1894
|
+
provider_id:,
|
|
1895
|
+
name: nil,
|
|
1896
|
+
enabled: nil,
|
|
1897
|
+
api_key: nil,
|
|
1898
|
+
api_secret: nil,
|
|
1899
|
+
from: nil
|
|
1900
|
+
)
|
|
1632
1901
|
api_path = '/messaging/providers/vonage/{providerId}'
|
|
1633
1902
|
.gsub('{providerId}', provider_id)
|
|
1634
1903
|
|
|
1635
1904
|
if provider_id.nil?
|
|
1636
|
-
|
|
1905
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1637
1906
|
end
|
|
1638
1907
|
|
|
1639
1908
|
api_params = {
|
|
@@ -1643,7 +1912,7 @@ module Appwrite
|
|
|
1643
1912
|
apiSecret: api_secret,
|
|
1644
1913
|
from: from,
|
|
1645
1914
|
}
|
|
1646
|
-
|
|
1915
|
+
|
|
1647
1916
|
api_headers = {
|
|
1648
1917
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1649
1918
|
"content-type": 'application/json',
|
|
@@ -1657,26 +1926,26 @@ module Appwrite
|
|
|
1657
1926
|
params: api_params,
|
|
1658
1927
|
response_type: Models::Provider
|
|
1659
1928
|
)
|
|
1660
|
-
|
|
1661
1929
|
end
|
|
1662
1930
|
|
|
1663
1931
|
# Get a provider by its unique ID.
|
|
1664
|
-
#
|
|
1932
|
+
#
|
|
1665
1933
|
#
|
|
1666
1934
|
# @param [String] provider_id Provider ID.
|
|
1667
1935
|
#
|
|
1668
1936
|
# @return [Provider]
|
|
1669
|
-
def get_provider(
|
|
1937
|
+
def get_provider(
|
|
1938
|
+
provider_id:
|
|
1939
|
+
)
|
|
1670
1940
|
api_path = '/messaging/providers/{providerId}'
|
|
1671
1941
|
.gsub('{providerId}', provider_id)
|
|
1672
1942
|
|
|
1673
1943
|
if provider_id.nil?
|
|
1674
|
-
|
|
1944
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1675
1945
|
end
|
|
1676
1946
|
|
|
1677
|
-
api_params = {
|
|
1678
|
-
|
|
1679
|
-
|
|
1947
|
+
api_params = {}
|
|
1948
|
+
|
|
1680
1949
|
api_headers = {
|
|
1681
1950
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1682
1951
|
"accept": 'application/json',
|
|
@@ -1689,7 +1958,6 @@ module Appwrite
|
|
|
1689
1958
|
params: api_params,
|
|
1690
1959
|
response_type: Models::Provider
|
|
1691
1960
|
)
|
|
1692
|
-
|
|
1693
1961
|
end
|
|
1694
1962
|
|
|
1695
1963
|
# Delete a provider by its unique ID.
|
|
@@ -1697,17 +1965,18 @@ module Appwrite
|
|
|
1697
1965
|
# @param [String] provider_id Provider ID.
|
|
1698
1966
|
#
|
|
1699
1967
|
# @return []
|
|
1700
|
-
def delete_provider(
|
|
1968
|
+
def delete_provider(
|
|
1969
|
+
provider_id:
|
|
1970
|
+
)
|
|
1701
1971
|
api_path = '/messaging/providers/{providerId}'
|
|
1702
1972
|
.gsub('{providerId}', provider_id)
|
|
1703
1973
|
|
|
1704
1974
|
if provider_id.nil?
|
|
1705
|
-
|
|
1975
|
+
raise Appwrite::Exception.new('Missing required parameter: "providerId"')
|
|
1706
1976
|
end
|
|
1707
1977
|
|
|
1708
|
-
api_params = {
|
|
1709
|
-
|
|
1710
|
-
|
|
1978
|
+
api_params = {}
|
|
1979
|
+
|
|
1711
1980
|
api_headers = {
|
|
1712
1981
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1713
1982
|
"content-type": 'application/json',
|
|
@@ -1719,7 +1988,6 @@ module Appwrite
|
|
|
1719
1988
|
headers: api_headers,
|
|
1720
1989
|
params: api_params,
|
|
1721
1990
|
)
|
|
1722
|
-
|
|
1723
1991
|
end
|
|
1724
1992
|
|
|
1725
1993
|
# Get a list of all topics from the current Appwrite project.
|
|
@@ -1729,7 +1997,11 @@ module Appwrite
|
|
|
1729
1997
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
1730
1998
|
#
|
|
1731
1999
|
# @return [TopicList]
|
|
1732
|
-
def list_topics(
|
|
2000
|
+
def list_topics(
|
|
2001
|
+
queries: nil,
|
|
2002
|
+
search: nil,
|
|
2003
|
+
total: nil
|
|
2004
|
+
)
|
|
1733
2005
|
api_path = '/messaging/topics'
|
|
1734
2006
|
|
|
1735
2007
|
api_params = {
|
|
@@ -1737,7 +2009,7 @@ module Appwrite
|
|
|
1737
2009
|
search: search,
|
|
1738
2010
|
total: total,
|
|
1739
2011
|
}
|
|
1740
|
-
|
|
2012
|
+
|
|
1741
2013
|
api_headers = {
|
|
1742
2014
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1743
2015
|
"accept": 'application/json',
|
|
@@ -1750,7 +2022,6 @@ module Appwrite
|
|
|
1750
2022
|
params: api_params,
|
|
1751
2023
|
response_type: Models::TopicList
|
|
1752
2024
|
)
|
|
1753
|
-
|
|
1754
2025
|
end
|
|
1755
2026
|
|
|
1756
2027
|
# Create a new topic.
|
|
@@ -1760,15 +2031,19 @@ module Appwrite
|
|
|
1760
2031
|
# @param [Array] subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
1761
2032
|
#
|
|
1762
2033
|
# @return [Topic]
|
|
1763
|
-
def create_topic(
|
|
2034
|
+
def create_topic(
|
|
2035
|
+
topic_id:,
|
|
2036
|
+
name:,
|
|
2037
|
+
subscribe: nil
|
|
2038
|
+
)
|
|
1764
2039
|
api_path = '/messaging/topics'
|
|
1765
2040
|
|
|
1766
2041
|
if topic_id.nil?
|
|
1767
|
-
|
|
2042
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1768
2043
|
end
|
|
1769
2044
|
|
|
1770
2045
|
if name.nil?
|
|
1771
|
-
|
|
2046
|
+
raise Appwrite::Exception.new('Missing required parameter: "name"')
|
|
1772
2047
|
end
|
|
1773
2048
|
|
|
1774
2049
|
api_params = {
|
|
@@ -1776,7 +2051,7 @@ module Appwrite
|
|
|
1776
2051
|
name: name,
|
|
1777
2052
|
subscribe: subscribe,
|
|
1778
2053
|
}
|
|
1779
|
-
|
|
2054
|
+
|
|
1780
2055
|
api_headers = {
|
|
1781
2056
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1782
2057
|
"content-type": 'application/json',
|
|
@@ -1790,26 +2065,26 @@ module Appwrite
|
|
|
1790
2065
|
params: api_params,
|
|
1791
2066
|
response_type: Models::Topic
|
|
1792
2067
|
)
|
|
1793
|
-
|
|
1794
2068
|
end
|
|
1795
2069
|
|
|
1796
2070
|
# Get a topic by its unique ID.
|
|
1797
|
-
#
|
|
2071
|
+
#
|
|
1798
2072
|
#
|
|
1799
2073
|
# @param [String] topic_id Topic ID.
|
|
1800
2074
|
#
|
|
1801
2075
|
# @return [Topic]
|
|
1802
|
-
def get_topic(
|
|
2076
|
+
def get_topic(
|
|
2077
|
+
topic_id:
|
|
2078
|
+
)
|
|
1803
2079
|
api_path = '/messaging/topics/{topicId}'
|
|
1804
2080
|
.gsub('{topicId}', topic_id)
|
|
1805
2081
|
|
|
1806
2082
|
if topic_id.nil?
|
|
1807
|
-
|
|
2083
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1808
2084
|
end
|
|
1809
2085
|
|
|
1810
|
-
api_params = {
|
|
1811
|
-
|
|
1812
|
-
|
|
2086
|
+
api_params = {}
|
|
2087
|
+
|
|
1813
2088
|
api_headers = {
|
|
1814
2089
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1815
2090
|
"accept": 'application/json',
|
|
@@ -1822,30 +2097,33 @@ module Appwrite
|
|
|
1822
2097
|
params: api_params,
|
|
1823
2098
|
response_type: Models::Topic
|
|
1824
2099
|
)
|
|
1825
|
-
|
|
1826
2100
|
end
|
|
1827
2101
|
|
|
1828
2102
|
# Update a topic by its unique ID.
|
|
1829
|
-
#
|
|
2103
|
+
#
|
|
1830
2104
|
#
|
|
1831
2105
|
# @param [String] topic_id Topic ID.
|
|
1832
2106
|
# @param [String] name Topic Name.
|
|
1833
2107
|
# @param [Array] subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
1834
2108
|
#
|
|
1835
2109
|
# @return [Topic]
|
|
1836
|
-
def update_topic(
|
|
2110
|
+
def update_topic(
|
|
2111
|
+
topic_id:,
|
|
2112
|
+
name: nil,
|
|
2113
|
+
subscribe: nil
|
|
2114
|
+
)
|
|
1837
2115
|
api_path = '/messaging/topics/{topicId}'
|
|
1838
2116
|
.gsub('{topicId}', topic_id)
|
|
1839
2117
|
|
|
1840
2118
|
if topic_id.nil?
|
|
1841
|
-
|
|
2119
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1842
2120
|
end
|
|
1843
2121
|
|
|
1844
2122
|
api_params = {
|
|
1845
2123
|
name: name,
|
|
1846
2124
|
subscribe: subscribe,
|
|
1847
2125
|
}
|
|
1848
|
-
|
|
2126
|
+
|
|
1849
2127
|
api_headers = {
|
|
1850
2128
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1851
2129
|
"content-type": 'application/json',
|
|
@@ -1859,7 +2137,6 @@ module Appwrite
|
|
|
1859
2137
|
params: api_params,
|
|
1860
2138
|
response_type: Models::Topic
|
|
1861
2139
|
)
|
|
1862
|
-
|
|
1863
2140
|
end
|
|
1864
2141
|
|
|
1865
2142
|
# Delete a topic by its unique ID.
|
|
@@ -1867,17 +2144,18 @@ module Appwrite
|
|
|
1867
2144
|
# @param [String] topic_id Topic ID.
|
|
1868
2145
|
#
|
|
1869
2146
|
# @return []
|
|
1870
|
-
def delete_topic(
|
|
2147
|
+
def delete_topic(
|
|
2148
|
+
topic_id:
|
|
2149
|
+
)
|
|
1871
2150
|
api_path = '/messaging/topics/{topicId}'
|
|
1872
2151
|
.gsub('{topicId}', topic_id)
|
|
1873
2152
|
|
|
1874
2153
|
if topic_id.nil?
|
|
1875
|
-
|
|
2154
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1876
2155
|
end
|
|
1877
2156
|
|
|
1878
|
-
api_params = {
|
|
1879
|
-
|
|
1880
|
-
|
|
2157
|
+
api_params = {}
|
|
2158
|
+
|
|
1881
2159
|
api_headers = {
|
|
1882
2160
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1883
2161
|
"content-type": 'application/json',
|
|
@@ -1889,7 +2167,6 @@ module Appwrite
|
|
|
1889
2167
|
headers: api_headers,
|
|
1890
2168
|
params: api_params,
|
|
1891
2169
|
)
|
|
1892
|
-
|
|
1893
2170
|
end
|
|
1894
2171
|
|
|
1895
2172
|
# Get a list of all subscribers from the current Appwrite project.
|
|
@@ -1900,12 +2177,17 @@ module Appwrite
|
|
|
1900
2177
|
# @param [] total When set to false, the total count returned will be 0 and will not be calculated.
|
|
1901
2178
|
#
|
|
1902
2179
|
# @return [SubscriberList]
|
|
1903
|
-
def list_subscribers(
|
|
2180
|
+
def list_subscribers(
|
|
2181
|
+
topic_id:,
|
|
2182
|
+
queries: nil,
|
|
2183
|
+
search: nil,
|
|
2184
|
+
total: nil
|
|
2185
|
+
)
|
|
1904
2186
|
api_path = '/messaging/topics/{topicId}/subscribers'
|
|
1905
2187
|
.gsub('{topicId}', topic_id)
|
|
1906
2188
|
|
|
1907
2189
|
if topic_id.nil?
|
|
1908
|
-
|
|
2190
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1909
2191
|
end
|
|
1910
2192
|
|
|
1911
2193
|
api_params = {
|
|
@@ -1913,7 +2195,7 @@ module Appwrite
|
|
|
1913
2195
|
search: search,
|
|
1914
2196
|
total: total,
|
|
1915
2197
|
}
|
|
1916
|
-
|
|
2198
|
+
|
|
1917
2199
|
api_headers = {
|
|
1918
2200
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1919
2201
|
"accept": 'application/json',
|
|
@@ -1926,7 +2208,6 @@ module Appwrite
|
|
|
1926
2208
|
params: api_params,
|
|
1927
2209
|
response_type: Models::SubscriberList
|
|
1928
2210
|
)
|
|
1929
|
-
|
|
1930
2211
|
end
|
|
1931
2212
|
|
|
1932
2213
|
# Create a new subscriber.
|
|
@@ -1936,27 +2217,31 @@ module Appwrite
|
|
|
1936
2217
|
# @param [String] target_id Target ID. The target ID to link to the specified Topic ID.
|
|
1937
2218
|
#
|
|
1938
2219
|
# @return [Subscriber]
|
|
1939
|
-
def create_subscriber(
|
|
2220
|
+
def create_subscriber(
|
|
2221
|
+
topic_id:,
|
|
2222
|
+
subscriber_id:,
|
|
2223
|
+
target_id:
|
|
2224
|
+
)
|
|
1940
2225
|
api_path = '/messaging/topics/{topicId}/subscribers'
|
|
1941
2226
|
.gsub('{topicId}', topic_id)
|
|
1942
2227
|
|
|
1943
2228
|
if topic_id.nil?
|
|
1944
|
-
|
|
2229
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1945
2230
|
end
|
|
1946
2231
|
|
|
1947
2232
|
if subscriber_id.nil?
|
|
1948
|
-
|
|
2233
|
+
raise Appwrite::Exception.new('Missing required parameter: "subscriberId"')
|
|
1949
2234
|
end
|
|
1950
2235
|
|
|
1951
2236
|
if target_id.nil?
|
|
1952
|
-
|
|
2237
|
+
raise Appwrite::Exception.new('Missing required parameter: "targetId"')
|
|
1953
2238
|
end
|
|
1954
2239
|
|
|
1955
2240
|
api_params = {
|
|
1956
2241
|
subscriberId: subscriber_id,
|
|
1957
2242
|
targetId: target_id,
|
|
1958
2243
|
}
|
|
1959
|
-
|
|
2244
|
+
|
|
1960
2245
|
api_headers = {
|
|
1961
2246
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
1962
2247
|
"content-type": 'application/json',
|
|
@@ -1970,32 +2255,33 @@ module Appwrite
|
|
|
1970
2255
|
params: api_params,
|
|
1971
2256
|
response_type: Models::Subscriber
|
|
1972
2257
|
)
|
|
1973
|
-
|
|
1974
2258
|
end
|
|
1975
2259
|
|
|
1976
2260
|
# Get a subscriber by its unique ID.
|
|
1977
|
-
#
|
|
2261
|
+
#
|
|
1978
2262
|
#
|
|
1979
2263
|
# @param [String] topic_id Topic ID. The topic ID subscribed to.
|
|
1980
2264
|
# @param [String] subscriber_id Subscriber ID.
|
|
1981
2265
|
#
|
|
1982
2266
|
# @return [Subscriber]
|
|
1983
|
-
def get_subscriber(
|
|
2267
|
+
def get_subscriber(
|
|
2268
|
+
topic_id:,
|
|
2269
|
+
subscriber_id:
|
|
2270
|
+
)
|
|
1984
2271
|
api_path = '/messaging/topics/{topicId}/subscribers/{subscriberId}'
|
|
1985
2272
|
.gsub('{topicId}', topic_id)
|
|
1986
2273
|
.gsub('{subscriberId}', subscriber_id)
|
|
1987
2274
|
|
|
1988
2275
|
if topic_id.nil?
|
|
1989
|
-
|
|
2276
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
1990
2277
|
end
|
|
1991
2278
|
|
|
1992
2279
|
if subscriber_id.nil?
|
|
1993
|
-
|
|
2280
|
+
raise Appwrite::Exception.new('Missing required parameter: "subscriberId"')
|
|
1994
2281
|
end
|
|
1995
2282
|
|
|
1996
|
-
api_params = {
|
|
1997
|
-
|
|
1998
|
-
|
|
2283
|
+
api_params = {}
|
|
2284
|
+
|
|
1999
2285
|
api_headers = {
|
|
2000
2286
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2001
2287
|
"accept": 'application/json',
|
|
@@ -2008,7 +2294,6 @@ module Appwrite
|
|
|
2008
2294
|
params: api_params,
|
|
2009
2295
|
response_type: Models::Subscriber
|
|
2010
2296
|
)
|
|
2011
|
-
|
|
2012
2297
|
end
|
|
2013
2298
|
|
|
2014
2299
|
# Delete a subscriber by its unique ID.
|
|
@@ -2017,22 +2302,24 @@ module Appwrite
|
|
|
2017
2302
|
# @param [String] subscriber_id Subscriber ID.
|
|
2018
2303
|
#
|
|
2019
2304
|
# @return []
|
|
2020
|
-
def delete_subscriber(
|
|
2305
|
+
def delete_subscriber(
|
|
2306
|
+
topic_id:,
|
|
2307
|
+
subscriber_id:
|
|
2308
|
+
)
|
|
2021
2309
|
api_path = '/messaging/topics/{topicId}/subscribers/{subscriberId}'
|
|
2022
2310
|
.gsub('{topicId}', topic_id)
|
|
2023
2311
|
.gsub('{subscriberId}', subscriber_id)
|
|
2024
2312
|
|
|
2025
2313
|
if topic_id.nil?
|
|
2026
|
-
|
|
2314
|
+
raise Appwrite::Exception.new('Missing required parameter: "topicId"')
|
|
2027
2315
|
end
|
|
2028
2316
|
|
|
2029
2317
|
if subscriber_id.nil?
|
|
2030
|
-
|
|
2318
|
+
raise Appwrite::Exception.new('Missing required parameter: "subscriberId"')
|
|
2031
2319
|
end
|
|
2032
2320
|
|
|
2033
|
-
api_params = {
|
|
2034
|
-
|
|
2035
|
-
|
|
2321
|
+
api_params = {}
|
|
2322
|
+
|
|
2036
2323
|
api_headers = {
|
|
2037
2324
|
"X-Appwrite-Project": @client.get_config('project'),
|
|
2038
2325
|
"content-type": 'application/json',
|
|
@@ -2044,8 +2331,6 @@ module Appwrite
|
|
|
2044
2331
|
headers: api_headers,
|
|
2045
2332
|
params: api_params,
|
|
2046
2333
|
)
|
|
2047
|
-
|
|
2048
2334
|
end
|
|
2049
|
-
|
|
2050
|
-
end
|
|
2335
|
+
end
|
|
2051
2336
|
end
|